+
+ if(!res)
+ bad_malloc(size);
+ return res;
+}
+
+void
+eprint(const char *errstr, ...)
+{
+ va_list ap;
+
+ va_start(ap, errstr);
+ vfprintf(stderr, errstr, ap);
+ va_end(ap);
+ exit(EXIT_FAILURE);
+}
+
+void *
+erealloc(void *ptr, unsigned int size)
+{
+ void *res = realloc(ptr, size);