6 void pdie(const char *msg
)
12 void die(const char *msg
, ...)
16 vfprintf(stderr
, msg
, ap
);
21 void pindent(int indent
, FILE *out
)
23 for (int i
= 0; i
<indent
; i
++)
24 if (fputc('\t', out
) == EOF
)
28 void safe_fprintf(FILE *out
, const char *msg
, ...)
32 int r
= vfprintf(out
, msg
, ap
);
38 void *safe_malloc(size_t size
)
40 void *res
= malloc(size
);
46 void *safe_strdup(const char *c
)
48 char *res
= strdup(c
);