Re: Serious 'tr' bug, patch for review included

2003-08-01 Thread Tim Robbins
On Fri, Aug 01, 2003 at 06:12:13AM +0400, Andrey Chernov wrote: > On Fri, Aug 01, 2003 at 12:02:04 +1000, Tim Robbins wrote: > > > 8 bits by casting to char. Using charcoll() to sort char arrays may > > work on little endian machines, but may not on big endian machines. > > s->set is array of in

Re: Serious 'tr' bug, patch for review included

2003-07-31 Thread Andrey Chernov
On Fri, Aug 01, 2003 at 12:02:04 +1000, Tim Robbins wrote: > 8 bits by casting to char. Using charcoll() to sort char arrays may > work on little endian machines, but may not on big endian machines. s->set is array of ints, not array of chars. In any case thanx for looking. > Also, watch out fo

Re: Serious 'tr' bug, patch for review included

2003-07-31 Thread Tim Robbins
On Fri, Aug 01, 2003 at 04:44:08AM +0400, Andrey Chernov wrote: > @@ -208,10 +210,18 @@ > if ((func)(cnt)) > *p++ = cnt; > *p = OOBCH; > + n = p - cp->set; > > s->cnt = 0; > - s->state = SET; > s->set = cp->set; > + if (strcmp(s->