| 313 | } |
| 314 | |
| 315 | bool ini_section_exist(ini_t *ini, const char *section) { |
| 316 | char *p = ini->data; |
| 317 | while (p < ini->end) { |
| 318 | if (*p == '[') { |
| 319 | /* Handle section */ |
| 320 | char* current_section = p + 1; |
| 321 | if (!section || !strcmpci(section, current_section)) { |
| 322 | return true; |
| 323 | } |
| 324 | } |
| 325 | p = next(ini, p); |
| 326 | } |
| 327 | |
| 328 | return false; |
| 329 | } |
| 330 | |
| 331 | const char* ini_get(ini_t *ini, const char *section, const char *key) { |
| 332 | const char *current_section = ""; |
no test coverage detected