summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/parse_ini.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/parse_ini.c b/lib/parse_ini.c
index 05d6a023..76953e9e 100644
--- a/lib/parse_ini.c
+++ b/lib/parse_ini.c
@@ -101,7 +101,7 @@ np_arg_list* np_get_defaults(const char *locator, const char *default_section){
101 } else { 101 } else {
102 inifile=fopen(i.file, "r"); 102 inifile=fopen(i.file, "r");
103 } 103 }
104 if(inifile==NULL) die(STATE_UNKNOWN, _("Can't read config file")); 104 if(inifile==NULL) die(STATE_UNKNOWN, "%s\n", _("Can't read config file"));
105 if(read_defaults(inifile, i.stanza, &defaults)==FALSE) 105 if(read_defaults(inifile, i.stanza, &defaults)==FALSE)
106 die(STATE_UNKNOWN, _("Invalid section '%s' in config file '%s'\n"), i.stanza, i.file); 106 die(STATE_UNKNOWN, _("Invalid section '%s' in config file '%s'\n"), i.stanza, i.file);
107 107
@@ -163,7 +163,7 @@ static int read_defaults(FILE *f, const char *stanza, np_arg_list **opts){
163 * we're dealing with a config error 163 * we're dealing with a config error
164 */ 164 */
165 case NOSTANZA: 165 case NOSTANZA:
166 die(STATE_UNKNOWN, _("Config file error")); 166 die(STATE_UNKNOWN, "%s\n", _("Config file error"));
167 break; 167 break;
168 /* we're in a stanza, but for a different plugin */ 168 /* we're in a stanza, but for a different plugin */
169 case WRONGSTANZA: 169 case WRONGSTANZA:
@@ -173,7 +173,7 @@ static int read_defaults(FILE *f, const char *stanza, np_arg_list **opts){
173 case RIGHTSTANZA: 173 case RIGHTSTANZA:
174 ungetc(c, f); 174 ungetc(c, f);
175 if(add_option(f, opts)){ 175 if(add_option(f, opts)){
176 die(STATE_UNKNOWN, _("Config file error")); 176 die(STATE_UNKNOWN, "%s\n", _("Config file error"));
177 } 177 }
178 status=TRUE; 178 status=TRUE;
179 break; 179 break;
@@ -229,7 +229,7 @@ static int add_option(FILE *f, np_arg_list **optlst){
229 if(optend==NULL) optend=eqptr; 229 if(optend==NULL) optend=eqptr;
230 --optend; 230 --optend;
231 /* ^[[:space:]]*=foo is a syntax error */ 231 /* ^[[:space:]]*=foo is a syntax error */
232 if(optptr==eqptr) die(STATE_UNKNOWN, _("Config file error\n")); 232 if(optptr==eqptr) die(STATE_UNKNOWN, "%s\n", _("Config file error"));
233 /* continue from '=' to start of value or EOL */ 233 /* continue from '=' to start of value or EOL */
234 for(valptr=eqptr+1; valptr<lineend && isspace(*valptr); valptr++); 234 for(valptr=eqptr+1; valptr<lineend && isspace(*valptr); valptr++);
235 /* continue to the end of value */ 235 /* continue to the end of value */
@@ -256,7 +256,7 @@ static int add_option(FILE *f, np_arg_list **optlst){
256 cfg_len+=1; 256 cfg_len+=1;
257 } 257 }
258 /* A line with no equal sign isn't valid */ 258 /* A line with no equal sign isn't valid */
259 if(equals==0) die(STATE_UNKNOWN, _("Config file error\n")); 259 if(equals==0) die(STATE_UNKNOWN, "%s\n", _("Config file error"));
260 260
261 /* okay, now we have all the info we need, so we create a new np_arg_list 261 /* okay, now we have all the info we need, so we create a new np_arg_list
262 * element and set the argument... 262 * element and set the argument...