| 5542 | }; |
| 5543 | |
| 5544 | static const char *ext_to_lang(const char *ext) { |
| 5545 | if (!ext) { |
| 5546 | return NULL; |
| 5547 | } |
| 5548 | for (const ext_lang_entry_t *e = ext_lang_table; e->ext; e++) { |
| 5549 | if (strcmp(ext, e->ext) == 0) { |
| 5550 | return e->lang; |
| 5551 | } |
| 5552 | } |
| 5553 | return NULL; |
| 5554 | } |
| 5555 | |
| 5556 | /* Get lowercase file extension from path */ |
| 5557 | static const char *file_ext(const char *path) { |