15e732e6885782c5f00e06eac24251d69a52985b
11 static char num
[FMT_ULONG
];
12 static stralloc line
= {0};
21 if (!stralloc_copyb(&line
,num
,fmt_ulong(num
,(unsigned long) now()))) return;
22 if (!stralloc_cats(&line
," ")) return;
23 if (!stralloc_cats(&line
,event
)) return;
24 if (!stralloc_cats(&line
," ")) return;
25 while (ch
= *addr
++) {
26 if ((ch
< 33) || (ch
> 126)) ch
= '?';
27 if (!stralloc_append(&line
,&ch
)) return;
29 if (!stralloc_cats(&line
,"\n")) return;
31 fd
= open_append("Log");
33 substdio_fdbuf(&ss
,write
,fd
,buf
,sizeof(buf
));
34 substdio_putflush(&ss
,line
.s
,line
.len
);