[Bug 27933] New: Implement "sort" command
http://bugs.winehq.org/show_bug.cgi?id=27933 Summary: Implement "sort" command Product: Wine Version: 1.3.25 Platform: x86-64 OS/Version: Linux Status: NEW Keywords: download, source Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs(a)winehq.org ReportedBy: frederic.delanoy(a)gmail.com CC: dank(a)kegel.com Blocks: 15359 Windows expands file wildcards (e.g. f?oo*) according to directory (unsorted) order, and not alphanumeric order. This prevents consistent testing of many cmd command expanding file wildcards (e.g. for /d, for /f) An external command would probably be preferable to an intrinsic, as windows does. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=27933 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |us(a)edmeades.me.uk --- Comment #1 from Jason Edmeades <us(a)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.
http://bugs.winehq.org/show_bug.cgi?id=27933 --- Comment #2 from Jason Edmeades <us(a)edmeades.me.uk> 2012-09-28 16:53:22 CDT --- Created attachment 41872 --> http://bugs.winehq.org/attachment.cgi?id=41872 Patch to give fully functional 'sort' command line utility This is ready for submission but holding off as I only wanted it for the command shell tests, and due to the collation differences windows->unix, it doesnt help. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=27933 --- Comment #3 from Dan Kegel <dank(a)kegel.com> 2012-09-28 16:54:23 CDT --- I don't think it's worth trying to write a wrapper around unix sort. It'd be fine to have our own little implementation. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=27933 --- Comment #4 from Jason Edmeades <us(a)edmeades.me.uk> 2012-09-28 17:02:08 CDT --- Beyond my coding skills, I'm afraid... However someone coding it can use the attached patch to do all the parameter parsing etc if they want :-) -- 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.
https://bugs.winehq.org/show_bug.cgi?id=27933 --- Comment #5 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- I imagine this is still an issue. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=27933 super_man(a)post.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man(a)post.com --- Comment #6 from super_man(a)post.com --- The patch still applies patching file configure Hunk #1 succeeded at 18094 with fuzz 2 (offset 2225 lines). patching file configure.ac Hunk #1 succeeded at 3542 with fuzz 2 (offset 400 lines). patching file programs/sort/Makefile.in patching file programs/sort/sort.c patching file programs/sort/sort.h patching file programs/sort/sort.rc wine 1.7.54 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=27933 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Implement "sort" command |Implement sort.exe command -- 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.
https://bugs.winehq.org/show_bug.cgi?id=27933 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |infyquest(a)gmail.com Resolution|--- |FIXED Fixed by SHA1| |9c7cded5ff68ac48039f5c8ac10 | |27a5cf5c2febe --- Comment #7 from Vijay Kamuju <infyquest(a)gmail.com> --- Basic sort command is implemented, if more functionality is needed then please raise a new bug. Fixed by commit - https://gitlab.winehq.org/wine/wine/-/commit/9c7cded5ff68ac48039f5c8ac1027a5... -- 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.
https://bugs.winehq.org/show_bug.cgi?id=27933 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #8 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 9.21. -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla