summaryrefslogtreecommitdiff
path: root/x11
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2013-01-17 16:06:49 +0000
committerjoerg <joerg@pkgsrc.org>2013-01-17 16:06:49 +0000
commitf301e1dd7ac51df0e3534a0ec7f1d4a9487cef49 (patch)
tree949a2d3e94dad6c1e808efb46ff404379a73afcb /x11
parent3a28e9942092c261efd3394f5a34d404399367f5 (diff)
downloadpkgsrc-f301e1dd7ac51df0e3534a0ec7f1d4a9487cef49.tar.gz
Use more static. Fix return types
Diffstat (limited to 'x11')
-rw-r--r--x11/xcolors/distinfo3
-rw-r--r--x11/xcolors/patches/patch-xcolors.c46
2 files changed, 48 insertions, 1 deletions
diff --git a/x11/xcolors/distinfo b/x11/xcolors/distinfo
index 49199cec7ae..161e8d92cfe 100644
--- a/x11/xcolors/distinfo
+++ b/x11/xcolors/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.6 2008/01/17 07:04:09 tnn Exp $
+$NetBSD: distinfo,v 1.7 2013/01/17 16:06:49 joerg Exp $
SHA1 (xcolors.tar.gz) = 5be585937c0a5076175635bd68366a0d2438c798
RMD160 (xcolors.tar.gz) = 9b57be44fda3af028120dad1905d4d0723d7ff71
Size (xcolors.tar.gz) = 6309 bytes
SHA1 (patch-aa) = 41f1edd7bf36ca6d883eb3091910b2f317a14f2e
+SHA1 (patch-xcolors.c) = 35c745d2ad5ae80294a39075ecf2a2eec9612fd3
diff --git a/x11/xcolors/patches/patch-xcolors.c b/x11/xcolors/patches/patch-xcolors.c
new file mode 100644
index 00000000000..b6a1fa764d7
--- /dev/null
+++ b/x11/xcolors/patches/patch-xcolors.c
@@ -0,0 +1,46 @@
+$NetBSD: patch-xcolors.c,v 1.1 2013/01/17 16:06:49 joerg Exp $
+
+--- xcolors.c.orig 2013-01-16 14:05:59.000000000 +0000
++++ xcolors.c
+@@ -26,12 +26,16 @@ static char*id="$XConsortium: xcolors.c,
+ #include <X11/Xaw/Label.h>
+ #include <stdio.h>
+ #include <ctype.h>
++#include <stdlib.h>
+ #include <math.h> /* for sqrt() */
+
+ #ifndef RGB_TXT
+ #define RGB_TXT "/usr/lib/X11/rgb.txt"
+ #endif
+
++static int l_strcasecmp(char *s1, char *s2);
++static void colordemo(Widget parent, char *startcolor, XColor nearcolor, int maxdist);
++
+ String fallback_resources[] = {
+ "*Label.Font: 5x7",
+ "*panes.Width: 985",
+@@ -274,11 +278,7 @@ main(argc, argv)
+ /* NOTREACHED */
+ }
+
+-colordemo(parent, startcolor, nearcolor, maxdist)
+- Widget parent;
+- char *startcolor;
+- XColor nearcolor; /* scaled 0-255 */
+- int maxdist;
++static void colordemo(Widget parent, char *startcolor, XColor nearcolor, int maxdist)
+ {
+ int r, g, b, prev_r, prev_g, prev_b;
+ char rgb_line[100];
+@@ -373,9 +373,8 @@ do_color(parent, colorname)
+ * Similar to strcmp, but ignores case.
+ * Always returns 1 if different.
+ */
+-int
+-l_strcasecmp(s1, s2)
+- char *s1, *s2;
++static int
++l_strcasecmp(char *s1, char *s2)
+ {
+ for ( ; *s1 && *s2 ; s1++, s2++)
+ if ((isupper(*s1) ? tolower(*s1) : *s1) !=