11 void vdie(const char *fmt, int ev, va_list al) {
12 vfprintf(stderr,fmt,al);
13 if (ev) fprintf(stderr,": %s",strerror(ev));
18 void die(const char *fmt, ...)
19 { va_list al; va_start(al,fmt); vdie(fmt,0,al); }
20 void diee(const char *fmt, ...)
21 { va_list al; va_start(al,fmt); vdie(fmt,errno,al); }
23 { diee("malloc failed"); }
25 void *mmalloc(size_t sz) {
33 char *mstrdupl(const char *s, int l) {
41 char *mstrdup(const char *s) { return mstrdupl(s,strlen(s)); }