mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 20:11:42 +00:00
redefinition removal
This commit is contained in:
parent
68ef9301d1
commit
14fe1db2ab
1 changed files with 0 additions and 32 deletions
32
src/pc/ini.c
32
src/pc/ini.c
|
|
@ -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`.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue