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);
35 sprint(u, "%s%s", s, t);
40 eappend(char *s, char *sep, char *t)
45 u = estrstrdup(s, sep);
47 u = emalloc(strlen(s)+strlen(sep)+strlen(t)+1);
48 sprint(u, "%s%s%s", s, sep, t);
55 egrow(char *s, char *sep, char *t)
57 s = eappend(s, sep, t);
69 fmtfdinit(&f, 2, buf, sizeof buf);
70 fmtprint(&f, "win: ");
72 fmtvprint(&f, fmt, arg);
80 ctlprint(int fd, char *fmt, ...)
86 n = vfprint(fd, fmt, arg);
89 error("control file write error: %r");