summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
dd881cf)
deprecated g_strcasecmp (since all the strings being compared are
parts of XLFDs and won't be in interesting character sets anyway).
git-svn-id: svn://svn.tartarus.org/sgt/putty@9376
cda61777-01e9-0310-a592-
d414129be87e
* I haven't the energy.
*/
* I haven't the energy.
*/
+#if !GLIB_CHECK_VERSION(1,3,7)
+#define g_ascii_strcasecmp g_strcasecmp
+#define g_ascii_strncasecmp g_strncasecmp
+#endif
+
/*
* Ad-hoc vtable mechanism to allow font structures to be
* polymorphic.
/*
* Ad-hoc vtable mechanism to allow font structures to be
* polymorphic.
style = p;
p += sprintf(p, "%s", components[2][0] ? components[2] :
"regular");
style = p;
p += sprintf(p, "%s", components[2][0] ? components[2] :
"regular");
- if (!g_strcasecmp(components[3], "i"))
+ if (!g_ascii_strcasecmp(components[3], "i"))
p += sprintf(p, " italic");
p += sprintf(p, " italic");
- else if (!g_strcasecmp(components[3], "o"))
+ else if (!g_ascii_strcasecmp(components[3], "o"))
p += sprintf(p, " oblique");
p += sprintf(p, " oblique");
- else if (!g_strcasecmp(components[3], "ri"))
+ else if (!g_ascii_strcasecmp(components[3], "ri"))
p += sprintf(p, " reverse italic");
p += sprintf(p, " reverse italic");
- else if (!g_strcasecmp(components[3], "ro"))
+ else if (!g_ascii_strcasecmp(components[3], "ro"))
p += sprintf(p, " reverse oblique");
p += sprintf(p, " reverse oblique");
- else if (!g_strcasecmp(components[3], "ot"))
+ else if (!g_ascii_strcasecmp(components[3], "ot"))
p += sprintf(p, " other-slant");
p += sprintf(p, " other-slant");
- if (components[4][0] && g_strcasecmp(components[4], "normal"))
+ if (components[4][0] && g_ascii_strcasecmp(components[4], "normal"))
p += sprintf(p, " %s", components[4]);
p += sprintf(p, " %s", components[4]);
- if (!g_strcasecmp(components[10], "m"))
+ if (!g_ascii_strcasecmp(components[10], "m"))
- if (!g_strcasecmp(components[10], "c"))
+ if (!g_ascii_strcasecmp(components[10], "c"))
p += sprintf(p, " [C]");
if (components[5][0])
p += sprintf(p, " %s", components[5]);
p += sprintf(p, " [C]");
if (components[5][0])
p += sprintf(p, " %s", components[5]);
- if (!g_strcasecmp(components[2], "medium") ||
- !g_strcasecmp(components[2], "regular") ||
- !g_strcasecmp(components[2], "normal") ||
- !g_strcasecmp(components[2], "book"))
+ if (!g_ascii_strcasecmp(components[2], "medium") ||
+ !g_ascii_strcasecmp(components[2], "regular") ||
+ !g_ascii_strcasecmp(components[2], "normal") ||
+ !g_ascii_strcasecmp(components[2], "book"))
- else if (!g_strncasecmp(components[2], "demi", 4) ||
- !g_strncasecmp(components[2], "semi", 4))
+ else if (!g_ascii_strncasecmp(components[2], "demi", 4) ||
+ !g_ascii_strncasecmp(components[2], "semi", 4))
weightkey = 1;
else
weightkey = 2;
weightkey = 1;
else
weightkey = 2;
- if (!g_strcasecmp(components[3], "r"))
+ if (!g_ascii_strcasecmp(components[3], "r"))
- else if (!g_strncasecmp(components[3], "r", 1))
+ else if (!g_ascii_strncasecmp(components[3], "r", 1))
slantkey = 2;
else
slantkey = 1;
slantkey = 2;
else
slantkey = 1;
- if (!g_strcasecmp(components[4], "normal"))
+ if (!g_ascii_strcasecmp(components[4], "normal"))
setwidthkey = 0;
else
setwidthkey = 1;
setwidthkey = 0;
else
setwidthkey = 1;
matched = FALSE;
for (i = 0; i < nfamilies; i++) {
matched = FALSE;
for (i = 0; i < nfamilies; i++) {
- if (!g_strcasecmp(pango_font_family_get_name(families[i]),
- pango_font_description_get_family(desc))) {
+ if (!g_ascii_strcasecmp(pango_font_family_get_name(families[i]),
+ pango_font_description_get_family(desc))) {
/*
* Otherwise, ordinary strcasecmp.
*/
/*
* Otherwise, ordinary strcasecmp.
*/
- return g_strcasecmp(a, b);
+ return g_ascii_strcasecmp(a, b);
}
static int fontinfo_realname_compare(void *av, void *bv)
}
static int fontinfo_realname_compare(void *av, void *bv)