redefinition removal

This commit is contained in:
Mike 2024-12-19 21:25:46 -06:00
parent 68ef9301d1
commit 14fe1db2ab

View file

@ -286,38 +286,6 @@ const char* ini_get(ini_t *ini, const char *section, const char *key) {
return NULL;
}
/**
* Finds first key with matching value
* @return string of key name
*/
const char* ini_find_key(ini_t *ini, const char* section, const char* value) {
char *current_section = "";
char *val;
char *p = ini->data;
if (*p == '\0') {
p = next(ini, p);
}
while (p < ini->end) {
if (*p == '[') {
current_section = p + 1;
}
else {
val = next(ini, p);
if (!section || !strcmpci(section, current_section)) {
if (!strcmpci(val,value)) {
return p;
}
}
p = val;
}
p = next(ini,p);
}
return NULL;
}
/**
* Gets value by specified key, section and format string.
* @return a value specified in the format in `dst`.