fix bsearch tables that must be sorted, add comment to all tables that must be sorted

This commit is contained in:
mrdudz
2025-06-09 17:58:58 +02:00
parent 58171691d0
commit ba80de5efc
18 changed files with 50 additions and 24 deletions

View File

@@ -48,6 +48,7 @@
/* CAUTION: table must be sorted for bsearch */
static const FileId TypeTable[] = {
/* Upper case stuff for obsolete operating systems */
{ "A", FILETYPE_LIB },

View File

@@ -138,8 +138,9 @@ struct TargetEntry {
target_t Id; /* Target ID */
};
/* Table that maps target names to IDs. Sorted alphabetically for bsearch().
/* Table that maps target names to IDs.
** Allows multiple entries for one target ID (target name aliases).
** CAUTION: must be alphabetically for bsearch().
*/
static const TargetEntry TargetMap[] = {
{ "apple2", TGT_APPLE2 },