[AD] File selector improvement

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


This patch removes an obvious inefficiency from the code of the file 
selector: currently, the extension string (for example "bmp;tga;/-h") that 
is passed to file_select_ex() is (re-)parsed for *each* file found on the 
disk in the working directory!

The parsing code is now simply factored out and we only do the required 
checks for each file. Tested on Linux, applied on mainline.

The patch also fixes the library build with GCC 3.1 or later because it 
replaces the only occurence of deprecated API functions in the library, a 
call to for_each_file(), by its newer equivalent, for_each_file_ex() here.

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/