diff options
Diffstat (limited to 'src/config.l')
-rw-r--r-- | src/config.l | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/config.l b/src/config.l index 3d4362d..26e0283 100644 --- a/src/config.l +++ b/src/config.l @@ -242,7 +242,7 @@ QStrList &Config::getList(const char *fileName,int num,const char *name) const } else if (opt->kind()!=ConfigOption::O_List) { - config_err("%d<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); + config_err("%s<%d>: Internal error: Requested option %s not of list type!\n",fileName,num,name); exit(1); } return *((ConfigList *)opt)->valueRef(); @@ -1077,7 +1077,7 @@ void Config::checkFileName(const char *optionName) (val=="no" || val=="false" || val=="0" || val=="none")) { config_err("file name expected for option %s, got %s instead. Ignoring...\n",optionName,s.data()); - s=""; // note tihe use of &s above: this will change the option value! + s=""; // note the use of &s above: this will change the option value! } } @@ -1119,14 +1119,15 @@ void Config::check() QCString &paperType = Config_getEnum("PAPER_TYPE"); paperType=paperType.lower().stripWhiteSpace(); - if (paperType.isEmpty()) + if (paperType.isEmpty() || paperType=="a4wide") { paperType = "a4"; } - if (paperType!="a4" && paperType!="a4wide" && paperType!="letter" && + if (paperType!="a4" && paperType!="letter" && paperType!="legal" && paperType!="executive") { config_err("Unknown page type specified\n"); + paperType="a4"; } QCString &outputLanguage=Config_getEnum("OUTPUT_LANGUAGE"); @@ -1198,6 +1199,12 @@ void Config::check() exit(1); } } + QCString &path = Config_getString("MATHJAX_RELPATH"); + if (!path.isEmpty() && path.at(path.length()-1)!='/') + { + path+="/"; + } + } // Test to see if LaTeX header is valid @@ -1692,6 +1699,7 @@ static QCString configFileToString(const char *name) if (!fileOpened) { config_err("cannot open file `%s' for reading\n",name); + exit(1); } return ""; } |