/*****************************************************************************/
-/* Code */
+/* Code */
/*****************************************************************************/
-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);
}
/* Do we have an extension? */
if (Ext == 0) {
- return 0;
+ return 0;
}
/* 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);
}