summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/XpmI.h9
-rw-r--r--src/create.c33
2 files changed, 4 insertions, 38 deletions
diff --git a/src/XpmI.h b/src/XpmI.h
index 604230d..69e23c2 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -47,6 +47,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
+#include <strings.h>
#include <X11/Xos.h>
#include <X11/Xfuncs.h>
@@ -297,14 +298,6 @@ HFUNC(xpmstrdup, char *, (char *s1));
#include <string.h>
#endif
-#ifdef NEED_STRCASECMP
-HFUNC(xpmstrcasecmp, int, (char *s1, char *s2));
-#else
-#undef xpmstrcasecmp
-#define xpmstrcasecmp strcasecmp
-#include <strings.h>
-#endif
-
HFUNC(xpmatoui, unsigned int,
(char *p, unsigned int l, unsigned int *ui_return));
diff --git a/src/create.c b/src/create.c
index 42a5312..95a3df4 100644
--- a/src/create.c
+++ b/src/create.c
@@ -116,33 +116,6 @@ LFUNC(PutPixel8, int, (XImage *ximage, int x, int y, unsigned long pixel));
LFUNC(PutPixel1MSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
LFUNC(PutPixel1LSB, int, (XImage *ximage, int x, int y, unsigned long pixel));
-#ifdef NEED_STRCASECMP
-FUNC(xpmstrcasecmp, int, (char *s1, char *s2));
-
-/*
- * in case strcasecmp is not provided by the system here is one
- * which does the trick
- */
-int
-xpmstrcasecmp(
- register char *s1,
- register char *s2)
-{
- register int c1, c2;
-
- while (*s1 && *s2) {
- c1 = tolower(*s1);
- c2 = tolower(*s2);
- if (c1 != c2)
- return (c1 - c2);
- s1++;
- s2++;
- }
- return (int) (*s1 - *s2);
-}
-
-#endif
-
/*
* return the default color key related to the given visual
*/
@@ -410,7 +383,7 @@ SetColor(
XColor xcolor;
int status;
- if (xpmstrcasecmp(colorname, TRANSPARENT_COLOR)) {
+ if (strcasecmp(colorname, TRANSPARENT_COLOR)) {
status = (*allocColor)(display, colormap, colorname, &xcolor, closure);
if (status < 0) /* parse color failed */
return (1);
@@ -581,7 +554,7 @@ CreateColors(
}
if (def_index >= 2 && def_index <= 5 &&
defaults[def_index] != NULL &&
- !xpmstrcasecmp(symbol->value, defaults[def_index]))
+ !strcasecmp(symbol->value, defaults[def_index]))
break;
}
}
@@ -649,7 +622,7 @@ CreateColors(
/* the following makes the mask to be built even if none
is given a particular pixel */
if (symbol->value
- && !xpmstrcasecmp(symbol->value, TRANSPARENT_COLOR)) {
+ && !strcasecmp(symbol->value, TRANSPARENT_COLOR)) {
*mask_pixels = 0;
*mask_pixel_index = color;
} else