upas/scanmail: fix %.*s format in xprint(), improve mkfile
This commit is contained in:
parent
e3aee39a38
commit
536805bce3
2 changed files with 6 additions and 2 deletions
|
@ -624,7 +624,10 @@ xprint(int fd, char *type, Resub *m)
|
|||
while(*q && *q != ' ')
|
||||
q++;
|
||||
|
||||
fprint(fd, "%s %.*s~%.*s~%.*s\n", type, (int)(m->sp-p), p, (int)(m->ep-m->sp), m->sp, (int)(q-m->ep), m->ep);
|
||||
fprint(fd, "%s %.*s~%.*s~%.*s\n", type,
|
||||
utfnlen(p, m->sp-p), p,
|
||||
utfnlen(m->sp, m->ep-m->sp), m->sp,
|
||||
utfnlen(m->ep, q-m->ep), m->ep);
|
||||
}
|
||||
|
||||
enum {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
</$objtype/mkfile
|
||||
<../mkupas
|
||||
|
||||
TARG=scanmail\
|
||||
testscan
|
||||
|
@ -20,5 +19,7 @@ UPDATE=\
|
|||
</sys/src/cmd/mkmany
|
||||
CFLAGS=$CFLAGS -I../common
|
||||
|
||||
<../mkupas
|
||||
|
||||
scanmail.$O: scanmail.c
|
||||
$CC $CFLAGS scanmail.c
|
||||
|
|
Loading…
Reference in a new issue