util.h (680B)
1 #undef MIN 2 #define MIN(x,y) ((x) < (y) ? (x) : (y)) 3 #undef MAX 4 #define MAX(x,y) ((x) > (y) ? (x) : (y)) 5 6 #define LEN(x) (sizeof (x) / sizeof *(x)) 7 8 /* eprintf.c */ 9 extern char *argv0; 10 11 /* ealloc.c */ 12 void *ecalloc(size_t, size_t); 13 void *emalloc(size_t size); 14 void *erealloc(void *, size_t); 15 char *estrdup(const char *); 16 17 /* eprintf.c */ 18 void enprintf(int, const char *, ...); 19 void eprintf(const char *, ...); 20 void weprintf(const char *, ...); 21 22 #undef strtonum 23 #define strtonum xstrtonum 24 long long strtonum(const char *, long long, long long, const char **); 25 long long enstrtonum(int, const char *, long long, long long); 26 long long estrtonum(const char *, long long, long long);