Re: patch /bin/ls again, for mb supporting.

2001-03-21 Thread Andrey A. Chernov
On Tue, Mar 20, 2001 at 18:13:20 +, thinker wrote: > + sz = mbtowc(&c, p, dc); > + if (isprint(c)) { As MINOURA correctly notes, you can't use isprint() with wchar_t type (isprint() is for runes and single chars only, but runes are not widely accepted standar

Re: patch /bin/ls again, for mb supporting.

2001-03-20 Thread Warner Losh
In message <[EMAIL PROTECTED]> thinker writes: : + *ri = 0; *ri = '\0'; Yes, they are the same, but the style here is that you are terminating the string. Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message

Re: patch /bin/ls again, for mb supporting.

2001-03-20 Thread thinker
For style reason, I make another patch file. - begin --- --- util.c.orig Sun Mar 18 16:35:12 2001 +++ util.c Tue Mar 20 18:12:23 2001 @@ -60,15 +60,43 @@ prn_printable(s) const char *s; { - unsigned char c; - int n; + const char *p; /* Str

Re: patch /bin/ls again, for mb supporting.

2001-03-20 Thread thinker
On Tue, Mar 20, 2001 at 01:12:46AM -0800, Alfred Perlstein wrote: .. skip ... > > + size_t sz; > > + wchar_t c; > > C has allowed for identifiers larger than 6 characters for quite > some time, any chance on you making use of this feature? Or at > least adding a comment here and ther

Re: patch /bin/ls again, for mb supporting.

2001-03-20 Thread Andrey A. Chernov
On Tue, Mar 20, 2001 at 01:12:46 -0800, Alfred Perlstein wrote: > > + p += sz; > > + while(sz--) > > + *ri++ = '?'; > > Why didn't you use strlcpy/memcpy as suggested? Choosen method is right. Calling *cpy for

Re: patch /bin/ls again, for mb supporting.

2001-03-20 Thread Alfred Perlstein
* thinker <[EMAIL PROTECTED]> [010320 00:48] wrote: > Hi, > There are some disscuss about patch file of /bin/ls. You guys > give me some suggestion, and I make a new patch file for /bin/ls to > meet people's wish. Following is patch for /bin/ls, plz review again. > I had change from rune to