X-Git-Url: http://pileus.org/git/?p=lackey;a=blobdiff_plain;f=src%2Futil.h;h=d0baa3b37e28a7010eca8ff4ef0ddc4948114396;hp=a424b7bd73e531dcd2e6a7fce0b197ede10cf3d9;hb=6e84acb58056ce793a08041d202bb96861874025;hpb=b1d55fb742ca211967891dd71ceb2707d90f1bcf diff --git a/src/util.h b/src/util.h index a424b7b..d0baa3b 100644 --- a/src/util.h +++ b/src/util.h @@ -22,12 +22,17 @@ #define ROUND(x) ((int)((x)+0.5)) #define N_ELEMENTS(x) (sizeof(x)/sizeof((x)[0])) +#define new0(type) alloc0(sizeof(type)) + /* Debug functions */ void util_init(void); /* Stirng functions */ void strsub(char *str, char find, char repl); +/* Memory functions */ +void *alloc0(int size); + /* Debug functions */ void debug(char *fmt, ...); void error(char *fmt, ...);