15 error("can't malloc: %r");
17 setmalloctag(p, getcallerpc(&n));
22 erealloc(void *p, uint n)
26 error("can't realloc: %r");
27 setmalloctag(p, getcallerpc(&n));
36 t = emalloc(strlen(s)+1);
42 estrstrdup(char *s, char *t)
46 u = emalloc(strlen(s)+strlen(t)+1);
53 eappend(char *s, char *sep, char *t)
58 u = estrstrdup(s, sep);
60 u = emalloc(strlen(s)+strlen(sep)+strlen(t)+1);
70 egrow(char *s, char *sep, char *t)
72 s = eappend(s, sep, t);
84 fmtfdinit(&f, 2, buf, sizeof buf);
85 fmtprint(&f, "Mail: ");
87 fmtvprint(&f, fmt, arg);
95 ctlprint(int fd, char *fmt, ...)
101 n = vfprint(fd, fmt, arg);
104 error("control file write error: %r");