util.h - ploot - simple plotting tools HTML git clone git://bitreich.org/ploot git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/ploot DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- util.h (620B) --- 1 #ifndef TOOL_H 2 #define TOOL_H 3 4 #include <stddef.h> 5 #include <time.h> 6 7 #define LEN(x) (sizeof(x) / sizeof(*x)) 8 #define MAX(x, y) ((x) > (y) ? (x) : (y)) 9 #define MIN(x, y) ((x) < (y) ? (x) : (y)) 10 #define ABS(x) ((x) < 0 ? -(x) : (x)) 11 12 extern char const *arg0; 13 14 void err(int, char const *fmt, ...); 15 void warn(char const *fmt, ...); 16 void debug(char const *fmt, ...); 17 size_t strlcpy(char *, const char *, size_t); 18 void put3utf(long); 19 char *strsep(char **, const char *); 20 void strchomp(char *); 21 int humanize(char *, double); 22 time_t scale_time_t(time_t, time_t, int); 23 double scale_double(double, double, int); 24 25 #endif