[Bug 27933] Implement "sort" command

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Sep 28 16:52:18 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=27933

Jason Edmeades <us at edmeades.me.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |us at edmeades.me.uk

--- Comment #1 from Jason Edmeades <us at edmeades.me.uk> 2012-09-28 16:52:18 CDT ---
I took a look at how difficult it would be to wrapper the Unix sort and use it
for out purposes. There was good news and bad news..

I'll attach a patch which provides a reasonable 'sort' implementation which we
could probably commit into wine.... BUT... we cant use it for the test suite
because unix sort ordering differs from windows sort ordering in ways we cannot
control.

The main issue we have with not using it for the cmd.exe tests is that Windows
is case insensitive, and lists \ before letters, which I think means it folds
upper to lowercase when doing the compare. Unix folds lower to uppercase when
you turn on case insensitivity meaning \ comes out after the letters. This
screws up the ability to use it to sort output from for, as we have e.g. \foo
\foobar and \foo\bar and the order differs windows to unix.

There are other issues around locale which we can avoid by forcing LC_ALL="C"
when driving the unix sort, and stdin/stdout can be worked around well enough. 

I'm now torn - I could just submit the attached patch as-is as its as complete
as I think we can get without writing a fresh implementation which implements
our own collating (probably around CompareString), BUT it doesnt actually help
us for the test suite.

As an aside, I've found an alternative way of checking findfirst/next results
between implementations in a slightly hacky way within shell language, which I
plan on using in the for/r stuff I've coded, and will extend to the missing
parts once working.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list