Permalink
Browse files

Merge remote-tracking branch 'mywave82/fix-no-ini-file'

  • Loading branch information...
miniupnp committed Sep 24, 2018
2 parents f34ae9e + 0573523 commit 31a0b965cf6d365fd456da7732687fd7fe86dbfd
Showing with 8 additions and 1 deletion.
  1. +5 −0 src/ini.h
  2. +1 −1 src/inifile.c
  3. +2 −0 src/inifile.h
View
@@ -3,8 +3,13 @@
#ifndef INI_H
#define INI_H
/* if source is NULL, defaultValue will still be returned */
extern char *Ini_GetString(const char *category, const char *key, const char *defaultValue, char *dest, uint16 length, char *source);
/* if source is NULL, defaultValue will still be returned */
extern int Ini_GetInteger(const char *category, const char *key, int defaultValue, char *source);
/* if source is NULL, no action will be performed */
extern void Ini_SetString(const char *category, const char *key, const char *value, char *source);
#endif /* INI_H */
View
@@ -165,7 +165,7 @@ char *IniFile_GetString(const char *key, const char *defaultValue, char *dest, u
{
char * p;
uint16 i;
if (g_openduneini == NULL) return NULL;
/* if g_openduneini is NULL, Ini_GetString() still does what we expect */
p = Ini_GetString("opendune", key, defaultValue, dest, length, g_openduneini);
if (p) {
/* Trim space from the beginning of the dest */
View
@@ -11,8 +11,10 @@ extern void Free_IniFile(void);
extern bool SetLanguage_From_IniFile(DuneCfg *config);
/* if source is NULL, defaultValue will still be returned */
extern char *IniFile_GetString(const char *key, const char *defaultValue, char *dest, uint16 length);
/* if source is NULL, defaultValue will still be returned */
extern int IniFile_GetInteger(const char *key, int defaultValue);
#endif /* INIFILE_H */

0 comments on commit 31a0b96

Please sign in to comment.