/[public]/psiconv/trunk/lib/psiconv/configuration.c
ViewVC logotype

Diff of /psiconv/trunk/lib/psiconv/configuration.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 217 Revision 220
39 39
40#ifndef CONFIGURATION_SEARCH_PATH 40#ifndef CONFIGURATION_SEARCH_PATH
41#define CONFIGURATION_SEARCH_PATH PSICONVETCDIR "/psiconv.conf:~/.psiconv.conf" 41#define CONFIGURATION_SEARCH_PATH PSICONVETCDIR "/psiconv.conf:~/.psiconv.conf"
42#endif 42#endif
43static struct psiconv_config_s default_config = 43static struct psiconv_config_s default_config =
44 { PSICONV_VERB_WARN, 2, 0,0,0,psiconv_bool_false,NULL,'?' }; 44 { PSICONV_VERB_WARN, 2, 0,0,0,psiconv_bool_false,NULL,'?','?',{ 0 },psiconv_bool_false };
45 45
46static void psiconv_config_parse_statement(const char *filename, 46static void psiconv_config_parse_statement(const char *filename,
47 int linenr, 47 int linenr,
48 const char *var, int value, 48 const char *var, int value,
49 psiconv_config *config); 49 psiconv_config *config);
57psiconv_config psiconv_config_default(void) 57psiconv_config psiconv_config_default(void)
58{ 58{
59 psiconv_config result; 59 psiconv_config result;
60 result = malloc(sizeof(*result)); 60 result = malloc(sizeof(*result));
61 *result = default_config; 61 *result = default_config;
62 psiconv_unicode_select_characterset(result,1);
62 return result; 63 return result;
63} 64}
64 65
65void psiconv_config_free(psiconv_config config) 66void psiconv_config_free(psiconv_config config)
66{ 67{
184 } 185 }
185 soval ++; 186 soval ++;
186 while (line[soval] && (line[soval] <= 32)) 187 while (line[soval] && (line[soval] <= 32))
187 soval ++; 188 soval ++;
188 eoval = soval; 189 eoval = soval;
189 while (line[eoval] && ((line[eoval] >= '0') && (line[eovar] <= '9'))) 190 while (line[eoval] && ((line[eoval] >= '0') && (line[eoval] <= '9')))
190 eoval ++; 191 eoval ++;
191 if (eoval == soval) { 192 if (eoval == soval) {
192 psiconv_error(*config,0,0,"Configuration file %s, line %d: " 193 psiconv_error(*config,0,0,"Configuration file %s, line %d: "
193 "Syntax error (no value found)",filename,linenr); 194 "Syntax error (no value found)",filename,linenr);
194 return; 195 return;

Legend:
Removed from v.217  
changed lines
  Added in v.220

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26