Case-insensitive prefix match (portable — no strncasecmp dependency). */
| 13575 | |
| 13576 | /* Case-insensitive prefix match (portable — no strncasecmp dependency). */ |
| 13577 | static bool prefix_icase(const char *s, const char *prefix) { |
| 13578 | while (*prefix) { |
| 13579 | if (tolower((unsigned char)*s) != tolower((unsigned char)*prefix)) { |
| 13580 | return false; |
| 13581 | } |
| 13582 | s++; |
| 13583 | prefix++; |
| 13584 | } |
| 13585 | return true; |
| 13586 | } |
| 13587 | |
| 13588 | /* Fetch latest release tag from GitHub via redirect header. |
| 13589 | * Returns heap-allocated tag (e.g. "v0.5.7") or NULL on failure. */ |