From owner-freebsd-i18n@FreeBSD.ORG Thu Jul 31 19:12:15 2003 Return-Path: Delivered-To: freebsd-i18n@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB52037B401; Thu, 31 Jul 2003 19:12:15 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B500E43FB1; Thu, 31 Jul 2003 19:12:14 -0700 (PDT) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.9/8.12.9) with ESMTP id h712CDYk023365; Fri, 1 Aug 2003 06:12:13 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h712CDcb023364; Fri, 1 Aug 2003 06:12:13 +0400 (MSD) Date: Fri, 1 Aug 2003 06:12:13 +0400 From: Andrey Chernov To: Tim Robbins Message-ID: <20030801021213.GA23278@nagual.pp.ru> References: <20030801004408.GA22054@nagual.pp.ru> <20030801020204.GA32843@dilbert.robbins.dropbear.id.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030801020204.GA32843@dilbert.robbins.dropbear.id.au> User-Agent: Mutt/1.5.4i cc: current@FreeBSD.ORG cc: i18n@FreeBSD.ORG Subject: Re: Serious 'tr' bug, patch for review included X-BeenThere: freebsd-i18n@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD Internationalization Effort List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2003 02:12:16 -0000 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.