Overview
| Artifact ID: | 0c84dae5c629e6456a150a5e01150df5d14db11f |
|---|---|
| Ticket: | 218489ffffffffffffffffffffffffffffffffff
patch for lsort -dictionary: bug sorting string beginning wi |
| User & Date: | nobody on 2000-10-26 01:01:12 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 706 Bug Version: 8.0.4 SubmitDate: '1998-10-13' LastModified: '1998-10-13' Severity: SER Status: Released Submitter: admin ChangedBy: rjohnson OS: All OSVersion: NA Machine: NA FixedDate: '1998-10-13' FixedInVersion: NA ClosedDate: '2000-10-25' >> Jarle Greipsland wrote: >> > I believe there is a bug in the lsort function when the -dictionary style >> > comparisons are used. >> > >> > Example: >> > % lsort -dictionary {0k 1k 10k} >> > 1k 0k 10k >> > >> > As I understand the documentation for this option the correct result should >> > have been {0k 1k 10k}. Perhaps this should be fixed in tcl8.1? >> > >> Bug is still present in 8.1a2 (same bad results on NT). > >I think the patch shown below applied to the >"generic/tclCmdIL.c" source file may fix the problem. > >*** tclCmdIL.c Fri Aug 7 16:19:52 1998 >--- tclCmdIL.c.new Sun Aug 30 19:07:26 1998 >*************** >*** 2863,2873 **** > */ > > zeros = 0; >! while ((*right == '0') && (*(right + 1) != '\0')) { > right++; > zeros--; > } >! while ((*left == '0') && (*(left + 1) != '\0')) { > left++; > zeros++; > } >--- 2863,2873 ---- > */ > > zeros = 0; >! while ((*right == '0') && (isdigit(UCHAR(right[1])))) { > right++; > zeros--; > } >! while ((*left == '0') && (isdigit(UCHAR(left[1])))) { > left++; > zeros++; > } . . . ! Am I reading that correctly? Lexicographic sorting which encounters any string which begins with a zero, and embeds non-digits, is likely to be in error? That sounds important. What's the process, again? Does Scriptics write you an acknowledgement, or is there a place under www.scriptics.com where faults are analyzed, or what? - foundin changed to: "obsolete: 8.0.4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
patch for lsort -dictionary: bug sorting string beginning wi
- type changed to: "Bug"