Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Aug 2003 06:12:13 +0400
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        Tim Robbins <tjr@FreeBSD.ORG>
Cc:        i18n@FreeBSD.ORG
Subject:   Re: Serious 'tr' bug, patch for review included
Message-ID:  <20030801021213.GA23278@nagual.pp.ru>
In-Reply-To: <20030801020204.GA32843@dilbert.robbins.dropbear.id.au>
References:  <20030801004408.GA22054@nagual.pp.ru> <20030801020204.GA32843@dilbert.robbins.dropbear.id.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030801021213.GA23278>