diff options
author | corvid <corvid@lavabit.com> | 2011-11-11 04:26:41 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2011-11-11 04:26:41 +0000 |
commit | 980fe05f47b9d6dd8626b5ea021e2c16807ff5ca (patch) | |
tree | 2e5670d74d8fcfb8e7f6b84ffaf5f77b74855746 /src/prefsparser.cc | |
parent | 119aa95ed6bc612dd4ef7a3121d9bf220148aaa4 (diff) |
locale-independent ASCII character case handling
Basically, I and i are different letters in Turkic languages, and this
causes problems for str(n)casecmp and toupper/tolower in these locales
when dillo is dealing with ASCII.
Diffstat (limited to 'src/prefsparser.cc')
-rw-r--r-- | src/prefsparser.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/prefsparser.cc b/src/prefsparser.cc index efe64a0e..7fd6cf4a 100644 --- a/src/prefsparser.cc +++ b/src/prefsparser.cc @@ -127,8 +127,8 @@ int PrefsParser::parseOption(char *name, char *value) switch (node->type) { case PREFS_BOOL: - *(bool_t *)node->pref = (!dStrcasecmp(value, "yes") || - !dStrcasecmp(value, "true")); + *(bool_t *)node->pref = (!dStrAsciiCasecmp(value, "yes") || + !dStrAsciiCasecmp(value, "true")); break; case PREFS_COLOR: *(int32_t *)node->pref = a_Color_parse(value, *(int32_t*)node->pref,&st); @@ -167,18 +167,18 @@ int PrefsParser::parseOption(char *name, char *value) &prefs.width, &prefs.height); break; case PREFS_FILTER: - if (!dStrcasecmp(value, "same_domain")) + if (!dStrAsciiCasecmp(value, "same_domain")) prefs.filter_auto_requests = PREFS_FILTER_SAME_DOMAIN; else { - if (dStrcasecmp(value, "allow_all")) + if (dStrAsciiCasecmp(value, "allow_all")) MSG_WARN("prefs: unrecognized value for filter_auto_requests\n"); prefs.filter_auto_requests = PREFS_FILTER_ALLOW_ALL; } break; case PREFS_PANEL_SIZE: - if (!dStrcasecmp(value, "tiny")) + if (!dStrAsciiCasecmp(value, "tiny")) prefs.panel_size = P_tiny; - else if (!dStrcasecmp(value, "small")) + else if (!dStrAsciiCasecmp(value, "small")) prefs.panel_size = P_small; else /* default to "medium" */ prefs.panel_size = P_medium; |