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

From: Andrey Chernov <ache_at_nagual.pp.ru>
Date: Fri, 1 Aug 2003 06:12:13 +0400
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 for this warning in qsort(3):
>      The qsort() and heapsort() functions sort an array of nmemb objects, the
>      initial member of which is pointed to by base.  The size of each object
>      is specified by size.  Mergesort() behaves similarly, but requires that
>      size be greater than ``sizeof(void *) / 2''.
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Its elements are size of int, which conform this condition.

BTW, I plan to repost slightly revised version of the patch in few 
minutes, because found that skipping needs more complex processing.
Received on Thu Jul 31 2003 - 17:12:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:17 UTC