14 error("can't malloc: %r");
24 t = emalloc(strlen(s)+1);
30 estrstrdup(char *s, char *t)
34 u = emalloc(strlen(s)+strlen(t)+1);
41 estrstrstrdup(char *r, char *s, char *t)
45 u = emalloc(strlen(r)+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, "%s: ", argv0);
87 fmtprint(&f, fmt, arg);
95 ctlprint(int fd, char *fmt, ...)
102 n = vfprint(fd, fmt, arg);
105 error("control file write(%s) error: %r", buf);