| 162 | } |
| 163 | |
| 164 | char *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 | |
| 178 | int IniFile_GetInteger(const char *key, int defaultValue) |
| 179 | { |
no test coverage detected