eliminate multiple warnings about missing default order

fix e3 catalog file syntax
This commit is contained in:
Enno Rehling 2014-06-02 07:31:46 +02:00
parent e17a3fc8fa
commit 9940025a96
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<!DOCTYPE catalog
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"

View File

@ -3023,14 +3023,17 @@ static order * defaults[MAXLOCALES];
order *default_order(const struct locale *lang)
{
static int usedefault = 1;
int i = locale_index(lang);
order *result = 0;
assert(i<MAXLOCALES);
result = defaults[i];
if (!result) {
if (!result && usedefault) {
const char * str = locale_string(lang, "defaultorder");
if (str) {
result = defaults[i] = parse_order(str, lang);
} else {
usedefault = 0;
}
}
return result ? copy_order(result) : 0;