2 * Various Utility Functions (extracted from the UCW Library)
4 * (c) 2005 Martin Mares <mj@ucw.cz>
10 #define NONRET __attribute__((noreturn))
11 #define UNUSED __attribute__((unused))
12 #define likely(x) __builtin_expect((x),1)
13 #define unlikely(x) __builtin_expect((x),0)
18 #define ulikely(x) (x)
22 #define STR(c) STR2(c)
24 typedef unsigned int uns;
33 extern const char progname[];
35 void NONRET die(char *x, ...);
36 void verb(int level, char *x, ...);
37 void *xmalloc(uns size);
38 void *xrealloc(void *old, uns size);
48 void sha1_init(struct sha1_ctx *ctx);
49 void sha1_update(struct sha1_ctx *sctx, const u8 *data, unsigned int len);
50 void sha1_final(struct sha1_ctx *sctx, u8 *out);