my current implementation relies on the "readdir" standard C function.
speaking shortly, it doesn't guarantee any order.
here's what the docs say:
Quote:
The filenames returned by readdir() are not in sorted order, but rather in the order in which they happen to occur in the directory (this depends on the order in which the file system adds files to the directory and how it fills gaps in the directory list after files are removed). (The command ls –f lists files in the same unsorted order that they would be retrieved by readdir().)
|
but we can rewrite that dialog in another way, of course: either put all the filenames in the dynamically allocated array, sort it alphabetically, create dialogue entries, and free the array(!), or use the "scandir" function instead.
As for the images - sorry, I don't have enough knowledge about how it works in CoolReader.