]> Pileus Git - lackey/blobdiff - src/util.h
Add alloc0 and new0 functions
[lackey] / src / util.h
index a424b7bd73e531dcd2e6a7fce0b197ede10cf3d9..d0baa3b37e28a7010eca8ff4ef0ddc4948114396 100644 (file)
 #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, ...);