summaryrefslogtreecommitdiff
path: root/src/fontfile
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-01-20 23:20:20 -0500
committerAdam Jackson <ajax@redhat.com>2009-01-20 23:20:20 -0500
commitdaa7af2bb2326de363aa5ea51c29616e3634343a (patch)
treeeb12a65553cae9e4c572b086b5ca091d2bd4dfb5 /src/fontfile
parent6c29007756301f513c0151e2b63af073f310af66 (diff)
Move the copy of CopyISOLatin1Lowered near its user, and un-weak it.
Diffstat (limited to 'src/fontfile')
-rw-r--r--src/fontfile/fontfile.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/fontfile/fontfile.c b/src/fontfile/fontfile.c
index 09fc555..c2eae29 100644
--- a/src/fontfile/fontfile.c
+++ b/src/fontfile/fontfile.c
@@ -36,11 +36,33 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <X11/fonts/fntfilst.h>
+#include <X11/fonts/fntfilst.h>
+#include <X11/keysym.h>
#ifdef WIN32
#include <ctype.h>
#endif
+static unsigned char
+ISOLatin1ToLower(unsigned char source)
+{
+ if (source >= XK_A && source <= XK_Z)
+ return source + (XK_a - XK_A);
+ if (source >= XK_Agrave && source <= XK_Odiaeresis)
+ return source + (XK_agrave - XK_Agrave);
+ if (source >= XK_Ooblique && source <= XK_Thorn)
+ return source + (XK_oslash - XK_Ooblique);
+ return source;
+}
+
+_X_HIDDEN void
+CopyISOLatin1Lowered(char *dest, char *source, int length)
+{
+ int i;
+ for (i = 0; i < length; i++, source++, dest++)
+ *dest = ISOLatin1ToLower(*source);
+ *dest = '\0';
+}
+
/*
* Map FPE functions to renderer functions
*/