22#include "utils/utils.h"
43 argc =
arr_len((
void **) *arg2);
49 stack[0].n = malloc(
sizeof(
int) * argc);
52 stack[1].n = malloc(
sizeof(
int) * argc);
97 if (stack.n[stack.len] == n)
115 stack[0].n[stack[0].len++] =
ft_atoi(*argv);
143 return (
err(
"Error\n", 1));
153 return (
err(
"Error\n", 1));
void ** arr_free(void **arr)
Free each element in a null-terminated array, and then the array itself.
int arr_len(void **arr)
Count number of elements in a null-terminated array.
int err(char *str, int retval)
Print str to stderr and return retval.
int ft_atoi(const char *str)
Converts ASCII string str to integer representation.
char * ft_itoa(int n)
Converts integer n to an allocated ASCII string.
char ** ft_split(char const *s, char c)
Split string s by characer c into allocated array of strings, with NULL as the last element.
size_t ft_strlen(const char *str)
Get length of str.
int ft_strncmp(const char *s1, const char *s2, size_t n)
Compare up to n characters of string s1 with string s2.