From owner-freebsd-i18n@FreeBSD.ORG Thu Jul 31 17:44:13 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 3DE2F37B401; Thu, 31 Jul 2003 17:44:13 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40BC943F3F; Thu, 31 Jul 2003 17:44:12 -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 h710i8Yk022101; Fri, 1 Aug 2003 04:44:11 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h710i8Ag022100; Fri, 1 Aug 2003 04:44:08 +0400 (MSD) Date: Fri, 1 Aug 2003 04:44:08 +0400 From: Andrey Chernov To: current@freebsd.org Message-ID: <20030801004408.GA22054@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.4i cc: i18n@freebsd.org Subject: 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 00:44:13 -0000 This patch address two problems. 1st one is relatively minor: according our own manpage, upper and lower classes must be sorted, but currently not. 2nd one is serious: tr '[:lower:]' '[:upper:]' (and vice versa) currently works only if upper and lower classes have exact the same number of elements. When it is not true, like for many ISO8859-x locales which have bigger amount of lowercase letters, tr may do nasty things. The patch is complex, because whole conversion string need to be processed each time l-u or u->l conversion occurse, not single character at time, like in previous variant. See this page http://www.opengroup.org/onlinepubs/007908799/xcu/tr.html for detailed description of desired tr behaviour in such cases. Please test this patch on your system & locale and report me any strange things. diff -u ./extern.h /usr/src/usr.bin/tr/extern.h --- ./extern.h Fri Jun 14 19:56:52 2002 +++ /usr/src/usr.bin/tr/extern.h Fri Aug 1 04:19:36 2003 @@ -40,7 +40,8 @@ typedef struct { enum { STRING1, STRING2 } which; - enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, SET } state; + enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, + SET, SET_UPPER, SET_LOWER } state; int cnt; /* character count */ int lastch; /* last character */ int equiv[NCHARS]; /* equivalence set */ @@ -49,3 +50,5 @@ } STR; int next(STR *); +int charcoll(const void *, const void *); + diff -u ./str.c /usr/src/usr.bin/tr/str.c --- ./str.c Fri Jul 5 13:28:13 2002 +++ /usr/src/usr.bin/tr/str.c Fri Aug 1 04:22:11 2003 @@ -106,6 +106,8 @@ } return (1); case SET: + case SET_UPPER: + case SET_LOWER: if ((s->lastch = s->set[s->cnt++]) == OOBCH) { s->state = NORMAL; return (next(s)); @@ -194,7 +196,7 @@ { int cnt, (*func)(int); CLASS *cp, tmp; - int *p; + int *p, n; tmp.name = s->str; if ((cp = (CLASS *)bsearch(&tmp, classes, sizeof(classes) / @@ -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->str, "upper") == 0) + s->state = SET_UPPER; + else if (strcmp(s->str, "lower") == 0) { + s->state = SET_LOWER; + } else + s->state = SET; + if ((s->state == SET_LOWER || s->state == SET_UPPER) && n > 1) + mergesort(s->set, n, sizeof(*(s->set)), charcoll); } static int diff -u ./tr.c /usr/src/usr.bin/tr/tr.c --- ./tr.c Thu Sep 5 03:29:07 2002 +++ /usr/src/usr.bin/tr/tr.c Fri Aug 1 04:32:01 2003 @@ -101,8 +101,9 @@ STR s1 = { STRING1, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; STR s2 = { STRING2, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; -static int charcoll(const void *, const void *); static void setup(int *, char *, STR *, int, int); +static void process_upper(int); +static void process_lower(int); static void usage(void); int @@ -110,7 +111,7 @@ { static int collorder[NCHARS], tmpmap[NCHARS]; int ch, cnt, lastch, *p; - int Cflag, cflag, dflag, sflag, isstring2; + int Cflag, cflag, dflag, sflag, isstring2, do_upper, do_lower; (void)setlocale(LC_ALL, ""); @@ -224,19 +225,67 @@ if (!next(&s2)) errx(1, "empty string2"); - ch = s2.lastch; + do_upper = do_lower = 0; /* If string2 runs out of characters, use the last one specified. */ - if (sflag) - while (next(&s1)) { - string1[s1.lastch] = ch = s2.lastch; - string2[ch] = 1; - (void)next(&s2); - } - else - while (next(&s1)) { - string1[s1.lastch] = ch = s2.lastch; - (void)next(&s2); + while (next(&s1)) { + if (s1.state == SET_LOWER && + s2.state == SET_UPPER) { + if (do_lower) { + process_lower(sflag); + do_lower = 0; + } + do_upper = 1; + } else if (s1.state == SET_UPPER && + s2.state == SET_LOWER) { + if (do_upper) { + process_upper(sflag); + do_upper = 0; + } + do_lower = 1; + } else { + if (do_lower) { + /* Skip until aligned */ + if (s1.state == SET_UPPER) { + do { + if (!next(&s1)) + goto endloop; + } while (s1.state == SET_UPPER); + } else if (s2.state == SET_LOWER) { + do { + if (!next(&s2)) + break; + } while (s2.state == SET_LOWER); + } + process_lower(sflag); + do_lower = 0; + } else if (do_upper) { + /* Skip until aligned */ + if (s1.state == SET_LOWER) { + do { + if (!next(&s1)) + goto endloop; + } while (s1.state == SET_LOWER); + } else if (s2.state == SET_UPPER) { + do { + if (!next(&s2)) + break; + } while (s2.state == SET_UPPER); + } + process_upper(sflag); + do_upper = 0; + } + string1[s1.lastch] = s2.lastch; + if (sflag) + string2[s2.lastch] = 1; } + (void)next(&s2); + } +endloop: + if (do_lower) + process_lower(sflag); + else if (do_upper) + process_upper(sflag); + /* End of upper & lower special processing */ if (cflag || Cflag) { s2.str = argv[1]; @@ -294,15 +343,55 @@ string[cnt] = !string[cnt] && ISCHAR(cnt); } -static int +int charcoll(const void *a, const void *b) { - char sa[2], sb[2]; + static char sa[2], sb[2]; sa[0] = *(const int *)a; sb[0] = *(const int *)b; - sa[1] = sb[1] = '\0'; return (strcoll(sa, sb)); +} + + +/* + * For -s result will contain only those characters defined + * as the second characters in each of the toupper or tolower + * pairs. + */ + +static void +process_upper(int sflag) +{ + int cnt, ch; + + for (cnt = 0; cnt < NCHARS; cnt++) { + ch = string1[cnt]; + if (ch == OOBCH) /* [Cc]flag */ + ch = cnt; + if (islower(ch)) { + string1[cnt] = ch = toupper(ch); + if (sflag && isupper(ch)) + string2[ch] = 1; + } + } +} + +static void +process_lower(int sflag) +{ + int cnt, ch; + + for (cnt = 0; cnt < NCHARS; cnt++) { + ch = string1[cnt]; + if (ch == OOBCH) /* [Cc]flag */ + ch = cnt; + if (isupper(ch)) { + string1[cnt] = ch = tolower(ch); + if (sflag && islower(ch)) + string2[ch] = 1; + } + } } static void From owner-freebsd-i18n@FreeBSD.ORG Thu Jul 31 19:02:50 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 1543E37B405; Thu, 31 Jul 2003 19:02:50 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82AA543F85; Thu, 31 Jul 2003 19:02:49 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from mail.robbins.dropbear.id.au (210.50.250.240) by smtp02.syd.iprimus.net.au (7.0.018) id 3F13130D0035FD6E; Fri, 1 Aug 2003 12:02:48 +1000 Received: by mail.robbins.dropbear.id.au (Postfix, from userid 1000) id 6CC9EC975; Fri, 1 Aug 2003 12:02:04 +1000 (EST) Date: Fri, 1 Aug 2003 12:02:04 +1000 From: Tim Robbins To: Andrey Chernov Message-ID: <20030801020204.GA32843@dilbert.robbins.dropbear.id.au> References: <20030801004408.GA22054@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030801004408.GA22054@nagual.pp.ru> User-Agent: Mutt/1.4.1i 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:02:50 -0000 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->str, "upper") == 0) > + s->state = SET_UPPER; > + else if (strcmp(s->str, "lower") == 0) { > + s->state = SET_LOWER; > + } else > + s->state = SET; > + if ((s->state == SET_LOWER || s->state == SET_UPPER) && n > 1) > + mergesort(s->set, n, sizeof(*(s->set)), charcoll); > } > > static int I haven't tested the patch yet, but I don't think it's safe to use charcoll() to sort "set", which is a char array; charcoll() casts its arguments to int *, dereferences them, then discards all but the low 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. 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''. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Tim 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. From owner-freebsd-i18n@FreeBSD.ORG Thu Jul 31 19:37:05 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 3661737B401; Thu, 31 Jul 2003 19:37:05 -0700 (PDT) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 366ED43F75; Thu, 31 Jul 2003 19:37:04 -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 h712b3Yk023739; Fri, 1 Aug 2003 06:37:03 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.9/8.12.9/Submit) id h712b3vN023738; Fri, 1 Aug 2003 06:37:03 +0400 (MSD) Date: Fri, 1 Aug 2003 06:37:03 +0400 From: Andrey Chernov To: current@freebsd.org Message-ID: <20030801023703.GA23702@nagual.pp.ru> References: <20030801004408.GA22054@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030801004408.GA22054@nagual.pp.ru> User-Agent: Mutt/1.5.4i cc: i18n@freebsd.org Subject: Revised version (was 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:37:05 -0000 On Fri, Aug 01, 2003 at 04:44:08 +0400, Andrey Chernov wrote: > This patch address two problems. Revides patch version with accurate skipping. Surprisingly, the code is reduced. Only in .: CVS diff -u ./extern.h /usr/src/usr.bin/tr/extern.h --- ./extern.h Fri Jun 14 19:56:52 2002 +++ /usr/src/usr.bin/tr/extern.h Fri Aug 1 04:19:36 2003 @@ -40,7 +40,8 @@ typedef struct { enum { STRING1, STRING2 } which; - enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, SET } state; + enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE, + SET, SET_UPPER, SET_LOWER } state; int cnt; /* character count */ int lastch; /* last character */ int equiv[NCHARS]; /* equivalence set */ @@ -49,3 +50,5 @@ } STR; int next(STR *); +int charcoll(const void *, const void *); + diff -u ./str.c /usr/src/usr.bin/tr/str.c --- ./str.c Fri Jul 5 13:28:13 2002 +++ /usr/src/usr.bin/tr/str.c Fri Aug 1 04:22:11 2003 @@ -106,6 +106,8 @@ } return (1); case SET: + case SET_UPPER: + case SET_LOWER: if ((s->lastch = s->set[s->cnt++]) == OOBCH) { s->state = NORMAL; return (next(s)); @@ -194,7 +196,7 @@ { int cnt, (*func)(int); CLASS *cp, tmp; - int *p; + int *p, n; tmp.name = s->str; if ((cp = (CLASS *)bsearch(&tmp, classes, sizeof(classes) / @@ -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->str, "upper") == 0) + s->state = SET_UPPER; + else if (strcmp(s->str, "lower") == 0) { + s->state = SET_LOWER; + } else + s->state = SET; + if ((s->state == SET_LOWER || s->state == SET_UPPER) && n > 1) + mergesort(s->set, n, sizeof(*(s->set)), charcoll); } static int diff -u ./tr.c /usr/src/usr.bin/tr/tr.c --- ./tr.c Thu Sep 5 03:29:07 2002 +++ /usr/src/usr.bin/tr/tr.c Fri Aug 1 06:30:24 2003 @@ -101,8 +101,9 @@ STR s1 = { STRING1, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; STR s2 = { STRING2, NORMAL, 0, OOBCH, { 0, OOBCH }, NULL, NULL }; -static int charcoll(const void *, const void *); static void setup(int *, char *, STR *, int, int); +static void process_upper(int); +static void process_lower(int); static void usage(void); int @@ -224,20 +225,47 @@ if (!next(&s2)) errx(1, "empty string2"); - ch = s2.lastch; /* If string2 runs out of characters, use the last one specified. */ - if (sflag) - while (next(&s1)) { - string1[s1.lastch] = ch = s2.lastch; - string2[ch] = 1; - (void)next(&s2); - } - else - while (next(&s1)) { - string1[s1.lastch] = ch = s2.lastch; - (void)next(&s2); + while (next(&s1)) { + again: + if (s1.state == SET_LOWER && + s2.state == SET_UPPER && + s1.cnt == 1 && s2.cnt == 1) { + do { + if (!next(&s1)) { + process_upper(sflag); + goto endloop; + } + } while (s1.state == SET_LOWER && s1.cnt > 1); + do { + if (!next(&s2)) + break; + } while (s2.state == SET_UPPER && s2.cnt > 1); + process_upper(sflag); + goto again; + } else if (s1.state == SET_UPPER && + s2.state == SET_LOWER && + s1.cnt == 1 && s2.cnt == 1) { + do { + if (!next(&s1)) { + process_lower(sflag); + goto endloop; + } + } while (s1.state == SET_UPPER && s1.cnt > 1); + do { + if (!next(&s2)) + break; + } while (s2.state == SET_LOWER && s2.cnt > 1); + process_lower(sflag); + goto again; + } else { + string1[s1.lastch] = s2.lastch; + if (sflag) + string2[s2.lastch] = 1; } - + (void)next(&s2); + } +endloop: if (cflag || Cflag) { s2.str = argv[1]; s2.state = NORMAL; @@ -294,15 +322,59 @@ string[cnt] = !string[cnt] && ISCHAR(cnt); } -static int +int charcoll(const void *a, const void *b) { - char sa[2], sb[2]; + static char sa[2], sb[2]; + int r; sa[0] = *(const int *)a; sb[0] = *(const int *)b; - sa[1] = sb[1] = '\0'; - return (strcoll(sa, sb)); + r = strcoll(sa, sb); + if (r == 0) + r = *(const int *)a - *(const int *)b; + return (r); +} + + +/* + * For -s result will contain only those characters defined + * as the second characters in each of the toupper or tolower + * pairs. + */ + +static void +process_upper(int sflag) +{ + int cnt, ch; + + for (cnt = 0; cnt < NCHARS; cnt++) { + ch = string1[cnt]; + if (ch == OOBCH) /* [Cc]flag */ + ch = cnt; + if (islower(ch)) { + string1[cnt] = ch = toupper(ch); + if (sflag && isupper(ch)) + string2[ch] = 1; + } + } +} + +static void +process_lower(int sflag) +{ + int cnt, ch; + + for (cnt = 0; cnt < NCHARS; cnt++) { + ch = string1[cnt]; + if (ch == OOBCH) /* [Cc]flag */ + ch = cnt; + if (isupper(ch)) { + string1[cnt] = ch = tolower(ch); + if (sflag && islower(ch)) + string2[ch] = 1; + } + } } static void From owner-freebsd-i18n@FreeBSD.ORG Fri Aug 1 01:01: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 CFC4A37B401; Fri, 1 Aug 2003 01:01:15 -0700 (PDT) Received: from smtp02.syd.iprimus.net.au (smtp02.syd.iprimus.net.au [210.50.76.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4954A43F75; Fri, 1 Aug 2003 01:01:15 -0700 (PDT) (envelope-from tim@robbins.dropbear.id.au) Received: from mail.robbins.dropbear.id.au (203.134.132.225) by smtp02.syd.iprimus.net.au (7.0.018) id 3F13130D0036F2DB; Fri, 1 Aug 2003 18:01:13 +1000 Received: by mail.robbins.dropbear.id.au (Postfix, from userid 1000) id D8D90C975; Fri, 1 Aug 2003 18:01:10 +1000 (EST) Date: Fri, 1 Aug 2003 18:01:10 +1000 From: Tim Robbins To: Andrey Chernov Message-ID: <20030801080110.GA33709@dilbert.robbins.dropbear.id.au> References: <20030801004408.GA22054@nagual.pp.ru> <20030801020204.GA32843@dilbert.robbins.dropbear.id.au> <20030801021213.GA23278@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030801021213.GA23278@nagual.pp.ru> User-Agent: Mutt/1.4.1i 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 08:01:16 -0000 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 ints, not array of chars. In any case thanx for > looking. Sorry, I must be going blind. Tim