From owner-freebsd-i18n Mon Mar 19 22:48:22 2001 Delivered-To: freebsd-i18n@freebsd.org Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 666C037B736; Mon, 19 Mar 2001 22:48:17 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f2K6mD912877; Mon, 19 Mar 2001 23:48:14 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200103200648.f2K6mD912877@harmony.village.org> To: "Michael C . Wu" Subject: Re: Request for review [Re: /bin/ls patch round #2] Cc: current@freebsd.org, ache@freebsd.org, i18n@freebsd.org In-reply-to: Your message of "Tue, 20 Mar 2001 00:20:43 CST." <20010320002043.A46115@peorth.iteration.net> References: <20010320002043.A46115@peorth.iteration.net> <20010319195438.A43266@peorth.iteration.net> Date: Mon, 19 Mar 2001 23:48:13 -0700 From: Warner Losh Sender: owner-freebsd-i18n@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20010320002043.A46115@peorth.iteration.net> "Michael C . Wu" writes: : | + while(*p1 != 0) { while (*p1 != '\0') { : | + c = sgetrune(p1, dc, &p2); : | + if(c == _INVALID_RUNE) { space after the if. ditto further . : | + p1++; : | + dc--; : | + *ri++ = '?'; : | + } else { : | + dc -= p2 - p1; : | + if(isprint(c)) : | + while(p1 != p2) : | + *ri++ = *p1++; : | + else : | + while(p1 != p2) { : | + *ri++ = '?'; : | + p1++; : | + } I think this might be clearer: if (isprint(c)) strlcpy(ri, p1, p2 - p1); else memset(ri, '?', p2 - p1); ri += (p2 - p1); p1 = p2; : | + return len; Style(9) wants parens around (len). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-i18n" in the body of the message