-static int Compare (const void* Key, const void* Id)
-/* Compare function for bsearch */
+int CompareFileId (const void* Key, const void* Id)
+/* Compare function used when calling bsearch with a table of FileIds */
{
return strcmp (Key, ((const FileId*) Id)->Ext);
}
}
/* Search for a table entry and return it */
- return bsearch (Ext+1, Table, Count, sizeof (FileId), Compare);
+ return bsearch (Ext+1, Table, Count, sizeof (FileId), CompareFileId);
}
+int CompareFileId (const void* Key, const void* Id);
+/* Compare function used when calling bsearch with a table of FileIds */
+
const FileId* GetFileId (const char* Name, const FileId* Table, unsigned Count);
/* Determine the id of the given file by looking at file extension of the name.
* The table passed to the function must be sorted alphabetically. If the