Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: Alpha on November 03, 2011, 11:55:51 pm

Title: File alphabetizing
Post by: Alpha on November 03, 2011, 11:55:51 pm
I have noticed something a little strange.  In the Projects tab of the Management pane, source files are alphabetized (as expected); however, if the project uses a mix different case files, lower case filenames come after all of the capitalized filenames (see the NassiShneiderman plugin for an example).  Assuming the alphabetizing is based on comparison of ASCII values, the following pseudo-code could be used:
Code
[... gather values to alphabetize ...]
    if(characterValue > 96)
    {
        characterValue -= 32;
    }
[... alphabetize names (displaying original names, not the modified ones) ...]
Title: Re: File alphabetizing
Post by: Jenna on November 04, 2011, 06:41:09 am
You can test the patch I attached here (http://forums.codeblocks.org/index.php/topic,14543.msg103572.html#msg103572) or in Mortens post (one post below mine).
It does a case insensitive sort.
Even if the cause for creating it is the loadspeed for very large projects (especially) on linux.
Title: Re: File alphabetizing
Post by: Alpha on November 05, 2011, 12:11:10 am
Thank you jens, that is exactly what I was looking for.  The patch works.  (Except for my error of miss-applying it :(; I had to revert and try again.)