summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-03-04 23:33:16 (GMT)
committer James Bursa <james@netsurf-browser.org>2005-03-04 23:33:16 (GMT)
commit5a03b4dccd89ba5b6bba097655891419670e68fd (patch)
treee31b391b0a33008657c78d05cc9950af19d71b0c
parentedf5f3b1373ae9260dac965bd5efe3a579caa0ba (diff)
downloadlibrufl-5a03b4dccd89ba5b6bba097655891419670e68fd.tar.gz
librufl-5a03b4dccd89ba5b6bba097655891419670e68fd.tar.bz2
[project @ 2005-03-04 23:33:16 by bursa]
Font manager font list is case-insensitive sorted. svn path=/import/rufl/; revision=2456
-rw-r--r--rufl_init.c2
-rw-r--r--rufl_paint.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/rufl_init.c b/rufl_init.c
index 34fbf9a..d2e21a0 100644
--- a/rufl_init.c
+++ b/rufl_init.c
@@ -910,5 +910,5 @@ int rufl_font_list_cmp(const void *keyval, const void *datum)
{
const char *key = keyval;
const struct rufl_font_list_entry *entry = datum;
- return strcmp(key, entry->identifier);
+ return strcasecmp(key, entry->identifier);
}
diff --git a/rufl_paint.c b/rufl_paint.c
index ffafb1b..412a5bd 100644
--- a/rufl_paint.c
+++ b/rufl_paint.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include "oslib/font.h"
#include "rufl_internal.h"
@@ -225,7 +226,7 @@ int rufl_family_list_cmp(const void *keyval, const void *datum)
{
const char *key = keyval;
const char * const *entry = datum;
- return strcmp(key, *entry);
+ return strcasecmp(key, *entry);
}