| 5441 | }; |
| 5442 | |
| 5443 | static const char *ext_to_lang(const char *ext) { |
| 5444 | if (!ext) { |
| 5445 | return NULL; |
| 5446 | } |
| 5447 | for (const ext_lang_entry_t *e = ext_lang_table; e->ext; e++) { |
| 5448 | if (strcmp(ext, e->ext) == 0) { |
| 5449 | return e->lang; |
| 5450 | } |
| 5451 | } |
| 5452 | return NULL; |
| 5453 | } |
| 5454 | |
| 5455 | /* Get lowercase file extension from path */ |
| 5456 | static const char *file_ext(const char *path) { |