]> Pileus Git - ~andy/crypt/blob - util.h
Add some initial code
[~andy/crypt] / util.h
1 /* Macros */
2 #define N_ELEM(x) (sizeof(x)/sizeof(*(x)))
3
4 /* Globals */
5 extern int loglevel;
6
7 /* Debug functions */
8 void info(const char *fmt, ...);
9 void debug(const char *fmt, ...);
10 void warn(const char *fmt, ...);
11 void error(const char *fmt, ...);
12
13 /* Output functions */
14 void hexdump(const char *fmt, const char *prefix, const uint8_t *data, ...);
15
16 /* Misc */
17 void *alloc0(int size);