* [9fans] sort -df vs. μ
@ 2014-03-12 23:16 erik quanstrom
0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2014-03-12 23:16 UTC (permalink / raw)
To: 9fans
i've been fighting a bit with the manual, and found that μlawdec(1)
was coming in the middle of the ells. it appears that sort -df is
wrong. we should not treat mapto[255] like sign extension.
/n/atom/plan9/sys/src/cmd/sort.c:1292,1298 - sort.c:1292,1298
/*
* for characters out of range,
* the table does not do Rflag.
- * ignore is based on mapto[255]
+ * ignore is computed directly.
*/
if(c != 0 && c < nelem(f->mapto)) {
c = f->mapto[c];
/n/atom/plan9/sys/src/cmd/sort.c:1299,1305 - sort.c:1299,1305
if(c == 0)
continue;
} else {
- if(f->mapto[nelem(f->mapto)-1] == 0)
+ if(f->flags & Iflag)
continue;
/*
* consider building maps as necessary
this seems too obvious, so have i missed anything?
- erik
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-03-12 23:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 23:16 [9fans] sort -df vs. μ erik quanstrom
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).