In message <[EMAIL PROTECTED]> "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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message