-#define NEW(type, variable, items) \
- type * variable = malloc(sizeof(type) * items)
+#define NEW(type, variable, items) \
+ type * variable = calloc(1, sizeof(type) * items)
+
+
+/* For MinGW use 'I' prefix to print size_t (instead of 'z') */
+
+#ifndef __MSVCRT__
+#define ZU "%zu"
+#else
+#define ZU "%Iu"
+#endif