9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: [9fans]  sort -df vs. μ
Date: Wed, 12 Mar 2014 19:16:34 -0400	[thread overview]
Message-ID: <a1eeecff62602d8040a292007fa2a7d5@ladd.quanstro.net> (raw)

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



                 reply	other threads:[~2014-03-12 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a1eeecff62602d8040a292007fa2a7d5@ladd.quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).