#include #include "symbols.h" const struct symbolname regiondefs[] = { { .symbol = 'A', .name = "ASIA PAL area" }, { .symbol = 'B', .name = "BRAZIL" }, { .symbol = 'E', .name = "EUROPE" }, { .symbol = 'J', .name = "JAPAN" }, { .symbol = 'K', .name = "KOREA" }, { .symbol = 'L', .name = "LATIN AMERICA" }, { .symbol = 'T', .name = "TAIWAN and PHILIPINES" }, { .symbol = 'U', .name = "USA and CANADA" }, { 0 } }; const struct symbolname *find_symbol(const struct symbolname *symbols, char symbol) { for (; symbols->symbol; symbols++) { if (symbols->symbol == symbol) { return symbols; } } return NULL; }