Subject: Re: /usr/bin/sort bug?
To: None <current-users@netbsd.org>
From: MLH <mlh@goathill.org>
List: current-users
Date: 02/12/2004 16:28:29
MLH wrote:

> There appears to be a somewhat-recently created bug in /usr/bin/sort.

Also, reverse-numeric field sorts are ignored and field specified
-b options are ignored, in addition to the original 'fields containing
blanks are not correctly sorted' problem.

What exactly does this mean:
init.c(315) :
/*
 * ascii, Rascii, Ftable, and RFtable map
 * REC_D -> REC_D;  {not REC_D} -> {not REC_D}.
 * gweights maps REC_D -> (0 or 255); {not REC_D} -> {not gweights[REC_D]}.
 * Note: when sorting in forward order, to encode character zero in a key,
 * use \001\001; character 1 becomes \001\002.  In this case, character 0
 * is reserved for the field delimiter.  Analagously for -r (fld_d = 255).
 * Note: this is only good for ASCII sorting.  For different LC 's,
 * all bets are off.  See also num_init in number.c
 */
void
settables(gflags)