use explicit markers (comments) for the bsearch table checking, simplifies the scripts and makes them more robust too :)

This commit is contained in:
mrdudz
2025-06-09 21:48:20 +02:00
parent 717e32ba6a
commit aaa1058d32
22 changed files with 165 additions and 124 deletions

View File

@@ -64,12 +64,14 @@ struct ConverterMapEntry {
/* Converter table */
/* CAUTION: table must be alphabetically sorted for bsearch */
static const ConverterMapEntry ConverterMap[] = {
/* BEGIN SORTED.SH */
{ "geos-bitmap", GenGeosBitmap },
{ "geos-icon", GenGeosIcon },
{ "koala", GenKoala },
{ "lynx-sprite", GenLynxSprite },
{ "raw", GenRaw },
{ "vic2-sprite", GenVic2Sprite },
/* END SORTED.SH */
};

View File

@@ -73,9 +73,10 @@ static InputFormatDesc InputFormatTable[ifCount] = {
/* CAUTION: table must be alphabetically sorted for bsearch */
static const FileId FormatTable[] = {
/* Upper case stuff for obsolete operating systems */
/* BEGIN SORTED.SH */
{ "PCX", ifPCX },
{ "pcx", ifPCX },
/* END SORTED.SH */
};

View File

@@ -82,19 +82,20 @@ static OutputFormatDesc OutputFormatTable[ofCount] = {
/* CAUTION: table must be alphabetically sorted for bsearch */
static const FileId FormatTable[] = {
/* Upper case stuff for obsolete operating systems */
/* BEGIN SORTED.SH */
{ "A", ofAsm },
{ "ASM", ofAsm },
{ "BIN", ofBin },
{ "C", ofC },
{ "INC", ofAsm },
{ "S", ofAsm },
{ "a", ofAsm },
{ "asm", ofAsm },
{ "bin", ofBin },
{ "c", ofC },
{ "inc", ofAsm },
{ "s", ofAsm },
/* END SORTED.SH */
};

View File

@@ -59,7 +59,9 @@ struct PaletteMapEntry {
/* Converter table */
/* CAUTION: table must be alphabetically sorted for bsearch */
static const PaletteMapEntry PaletteMap[] = {
/* BEGIN SORTED.SH */
{ "lynx-palette", GenLynxPalette },
/* END SORTED.SH */
};