Changeset 423
- Timestamp:
- Apr 21, 2010, 1:39:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/Lucide/gui/lucide.cpp ¶
r421 r423 38 38 39 39 #include <string> 40 #include <set> 40 #include <vector> 41 #include <algorithm> 41 42 #include <stdio.h> 42 43 #include <stdlib.h> … … 137 138 138 139 // List of files in current directory 139 static std:: set<std::string> fileList;140 static std:: set<std::string>::const_iterator fileListIterator;140 static std::vector<std::string> fileList; 141 static std::vector<std::string>::const_iterator fileListIterator; 141 142 142 143 HMODULE _hmod = NULLHANDLE; … … 631 632 while ( done == 0 ) 632 633 { 633 fileList. insert( find_t_name( ffblk ) );634 fileList.push_back( find_t_name( ffblk ) ); 634 635 done = _dos_findnext( &ffblk ); 635 636 } … … 638 639 } 639 640 delete buf; 641 } 642 643 // comparison, not case sensitive. 644 bool compare_nocase( const std::string &first, const std::string &second) 645 { 646 // note: stricmp is locale aware in kLIBC 647 return stricmp( first.c_str(), second.c_str() ) < 0; 640 648 } 641 649 … … 654 662 delete exts; 655 663 656 fileListIterator = fileList.find( docFileName ); 664 std::sort( fileList.begin(), fileList.end(), compare_nocase ); 665 fileListIterator = std::find( fileList.begin(), fileList.end(), docFileName ); 657 666 } 658 667
Note:
See TracChangeset
for help on using the changeset viewer.