changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: upas/ned: fix %.*s format in parsesearch(), improve mkfile

changeset 7043: ee85e5437edf
parent 7042: 4564c92bb864
child 7044: 5f04b19f5ad5
author: cinap_lenrek@felloff.net
date: Mon, 25 Feb 2019 03:34:25 +0100
files: sys/src/cmd/upas/ned/mkfile sys/src/cmd/upas/ned/nedmail.c
description: upas/ned: fix %.*s format in parsesearch(), improve mkfile
     1.1--- a/sys/src/cmd/upas/ned/mkfile
     1.2+++ b/sys/src/cmd/upas/ned/mkfile
     1.3@@ -1,5 +1,4 @@
     1.4 </$objtype/mkfile
     1.5-<../mkupas
     1.6 
     1.7 TARG=nedmail
     1.8 
     1.9@@ -17,3 +16,4 @@ UPDATE=\
    1.10 </sys/src/cmd/mkone
    1.11 CFLAGS=$CFLAGS -I../common
    1.12 
    1.13+<../mkupas
     2.1--- a/sys/src/cmd/upas/ned/nedmail.c
     2.2+++ b/sys/src/cmd/upas/ned/nedmail.c
     2.3@@ -1074,7 +1074,7 @@ parsesearch(char **pp, char *buf, int bu
     2.4 	np = qstrchr(p, c);
     2.5 	if(c == '#' && np)
     2.6 	if(e = qstrchr(np + 1, c)){
     2.7-		snprint(buf, bufl, "%.*s", (int)(np - p), p);
     2.8+		snprint(buf, bufl, "%.*s", utfnlen(p, np - p), p);
     2.9 		p = np + 1;
    2.10 		np = e;
    2.11 	}