This commit is contained in:
Ron Pedde 2004-09-25 21:43:56 +00:00
parent ebf43ff4fb
commit fc5fc7dfa6
1 changed files with 16 additions and 16 deletions

View File

@ -816,22 +816,6 @@ void db_freefile(MP3FILE *pmp3) {
MAYBEFREE(pmp3->description); MAYBEFREE(pmp3->description);
} }
/*
* db_enum_begin
*
* Begin to walk through an enum of the database. In order to retain
* some sanity in song ordering we scan all the songs and perform an
* insertion sort based on album, track, record id.
*
* Since the list is built entirely within this routine, it's also
* safe to release the lock once the list is built.
*
* Also we eliminate the static db_enum_helper which allows (the
* admittedly unnecessary) possibility of reentrance.
*
* this should be done quickly, as we'll be holding
* a reader lock on the db
*/
static int nullstrcmp(const char* a, const char* b) static int nullstrcmp(const char* a, const char* b)
{ {
if(a == 0) if(a == 0)
@ -858,6 +842,22 @@ int compare(MP3RECORD* a, MP3RECORD* b)
return a->mp3file.id - b->mp3file.id; return a->mp3file.id - b->mp3file.id;
} }
/*
* db_enum_begin
*
* Begin to walk through an enum of the database. In order to retain
* some sanity in song ordering we scan all the songs and perform an
* insertion sort based on album, track, record id.
*
* Since the list is built entirely within this routine, it's also
* safe to release the lock once the list is built.
*
* Also we eliminate the static db_enum_helper which allows (the
* admittedly unnecessary) possibility of reentrance.
*
* this should be done quickly, as we'll be holding
* a reader lock on the db
*/
ENUMHANDLE db_enum_begin(void) { ENUMHANDLE db_enum_begin(void) {
int err; int err;
MP3HELPER* helper; MP3HELPER* helper;