MCPcopy Create free account
hub / github.com/OpenDUNE/OpenDUNE / IniFile_GetString

Function IniFile_GetString

src/inifile.c:164–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164char *IniFile_GetString(const char *key, const char *defaultValue, char *dest, uint16 length)
165{
166 char * p;
167 uint16 i;
168 if (g_openduneini == NULL) return NULL;
169 p = Ini_GetString("opendune", key, defaultValue, dest, length, g_openduneini);
170 if (p) {
171 /* Trim space from the beginning of the dest */
172 for (i = 0; i < length && (dest[i] == ' ' || dest[i] == '\t') && (dest[i] != '\0'); i++);
173 if (i > 0 && i < length) memmove(dest, dest+i, length - i);
174 }
175 return p;
176}
177
178int IniFile_GetInteger(const char *key, int defaultValue)
179{

Callers 4

File_InitFunction · 0.85
SetLanguage_From_IniFileFunction · 0.85
mainFunction · 0.85
midi_initFunction · 0.85

Calls 1

Ini_GetStringFunction · 0.85

Tested by

no test coverage detected