View Single Post
Old 07-02-2012, 12:48 PM   #162
varnie
Connoisseur
varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.varnie can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
Posts: 99
Karma: 30196
Join Date: Dec 2011
Device: Kindle Touch
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.

Last edited by varnie; 07-02-2012 at 12:53 PM.
varnie is offline   Reply With Quote