| 3611 | }; |
| 3612 | |
| 3613 | static const char *ext_to_lang(const char *ext) { |
| 3614 | if (!ext) { |
| 3615 | return NULL; |
| 3616 | } |
| 3617 | for (const ext_lang_entry_t *e = ext_lang_table; e->ext; e++) { |
| 3618 | if (strcmp(ext, e->ext) == 0) { |
| 3619 | return e->lang; |
| 3620 | } |
| 3621 | } |
| 3622 | return NULL; |
| 3623 | } |
| 3624 | |
| 3625 | /* Get lowercase file extension from path */ |
| 3626 | static const char *file_ext(const char *path) { |