summaryrefslogtreecommitdiff
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
parent6c29007756301f513c0151e2b63af073f310af66 (diff)
Move the copy of CopyISOLatin1Lowered near its user, and un-weak it.
-rw-r--r--src/fontfile/fontfile.c24
-rw-r--r--src/util/miscutil.c22
2 files changed, 23 insertions, 23 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
*/
diff --git a/src/util/miscutil.c b/src/util/miscutil.c
index 6e5d52e..3459275 100644
--- a/src/util/miscutil.c
+++ b/src/util/miscutil.c
@@ -43,7 +43,6 @@ from The Open Group.
#ifdef __SUNPRO_C
#pragma weak serverGeneration
-#pragma weak CopyISOLatin1Lowered
#pragma weak register_fpe_functions
#endif
@@ -51,27 +50,6 @@ from The Open Group.
weak long serverGeneration = 1;
weak void
-CopyISOLatin1Lowered (char *dst, char *src, int len)
-{
- register unsigned char *dest, *source;
-
- for (dest = (unsigned char *)dst, source = (unsigned char *)src;
- *source && len > 0;
- source++, dest++, len--)
- {
- if ((*source >= XK_A) && (*source <= XK_Z))
- *dest = *source + (XK_a - XK_A);
- else if ((*source >= XK_Agrave) && (*source <= XK_Odiaeresis))
- *dest = *source + (XK_agrave - XK_Agrave);
- else if ((*source >= XK_Ooblique) && (*source <= XK_Thorn))
- *dest = *source + (XK_oslash - XK_Ooblique);
- else
- *dest = *source;
- }
- *dest = '\0';
-}
-
-weak void
register_fpe_functions (void)
{
}