View | Details | Raw Unified | Return to bug 249048 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +1 lines)
Lines 16-25 Link Here
16
16
17
PLIST_FILES=	bin/wmBinClock
17
PLIST_FILES=	bin/wmBinClock
18
USES=		gmake xorg
18
USES=		gmake xorg
19
USE_XORG=	xpm
19
USE_XORG=	x11 xext xpm
20
20
21
post-patch:
21
post-patch:
22
	@${REINPLACE_CMD} -e 's|#include <values.h>||' ${WRKSRC}/wmBinClock.c
23
	@${REINPLACE_CMD} -e 's|^CC.*=|CC ?=|' -e 's|^CFLAGS.*=|CFLAGS +=|' \
22
	@${REINPLACE_CMD} -e 's|^CC.*=|CC ?=|' -e 's|^CFLAGS.*=|CFLAGS +=|' \
24
		-e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile
23
		-e 's|/usr/X11R6|${LOCALBASE}|g' ${WRKSRC}/Makefile
25
24
(-)files/patch-wmBinClock.c (+76 lines)
Line 0 Link Here
1
--- wmBinClock.c.orig	2015-12-06 01:59:53 UTC
2
+++ wmBinClock.c
3
@@ -58,8 +58,9 @@ int GotFirstClick1, GotDoubleClick1;
4
 int GotFirstClick2, GotDoubleClick2;
5
 int GotFirstClick3, GotDoubleClick3;
6
 int DblClkDelay;
7
+extern Display		*display;
8
 
9
-void IntToBinary(int x, int *str[]);
10
+void IntToBinary(int x, int *str);
11
 void PrintHelp(char err[]);
12
 
13
 int main(int argc, char *argv[])
14
@@ -660,7 +661,7 @@ int main(int argc, char *argv[])
15
 	    }
16
 
17
 	    tmp_hour = tmworld->tm_hour;
18
-	    IntToBinary(tmp_hour, &tmp_str);
19
+	    IntToBinary(tmp_hour, tmp_str);
20
 
21
 	    for (s = 0; s < 6; s++)
22
 	    {
23
@@ -671,7 +672,7 @@ int main(int argc, char *argv[])
24
 	    }
25
 
26
 	    tmp_minute = tmworld->tm_min;
27
-	    IntToBinary(tmp_minute, &tmp_str);
28
+	    IntToBinary(tmp_minute, tmp_str);
29
 	    for (s = 0; s < 6; s++)
30
 	    {
31
 		if (tmp_str[s] == 1)
32
@@ -681,7 +682,7 @@ int main(int argc, char *argv[])
33
 	    }
34
 	
35
 	    tmp_second = tmworld->tm_sec;
36
-	    IntToBinary(tmp_second, &tmp_str);
37
+	    IntToBinary(tmp_second, tmp_str);
38
 	    
39
 	    for (s = 0; s < 6; s++)
40
 	    {
41
@@ -692,7 +693,7 @@ int main(int argc, char *argv[])
42
 	    }
43
 	    
44
 	    tmp_day = tmworld->tm_mday;
45
-	    IntToBinary(tmp_day, &tmp_str);
46
+	    IntToBinary(tmp_day, tmp_str);
47
 	    
48
 	    for (s = 0; s < 6; s++)
49
 	    {
50
@@ -703,7 +704,7 @@ int main(int argc, char *argv[])
51
 	    }
52
 
53
 	    tmp_month = tmworld->tm_mon + 1;
54
-	    IntToBinary(tmp_month, &tmp_str);
55
+	    IntToBinary(tmp_month, tmp_str);
56
 	    
57
 	    for (s = 0; s < 6; s++)
58
 	    {
59
@@ -773,7 +774,7 @@ int main(int argc, char *argv[])
60
 	usleep(DELAY);
61
     }
62
 }
63
-void IntToBinary(int x, int *str[])
64
+void IntToBinary(int x, int *str)
65
 {
66
     int i = 0;
67
     int counter = 0;
68
@@ -884,7 +885,7 @@ void PrintHelp(char err[])
69
 	strcpy(str,"Error in ");
70
 	strcat(str,err);
71
 	strcat(str,".\n\n");
72
-	printf(str);
73
+	printf("%s", str);
74
     }
75
 
76
     printf("Usage: wmBinClock [OPTIONS]\n\n");
(-)files/patch-xutils.c (+15 lines)
Line 0 Link Here
1
--- xutils.c.orig	2015-12-06 01:59:53 UTC
2
+++ xutils.c
3
@@ -52,6 +52,12 @@ char		*Geometry = "";
4
 XpmIcon		wmgen;
5
 Pixmap		pixmask;
6
 
7
+Display		*display;
8
+Window          Root;
9
+Window          iconwin, win;
10
+int             screen; 
11
+int             DisplayDepth;
12
+GC NormalGC;
13
 
14
 
15
 
(-)files/patch-xutils.h (+18 lines)
Line 0 Link Here
1
--- xutils.h.orig	2015-12-06 01:59:53 UTC
2
+++ xutils.h
3
@@ -15,15 +15,6 @@ typedef struct {
4
 
5
 
6
 
7
-/*
8
- *   Global variable
9
- */
10
-Display		*display;
11
-Window          Root;
12
-Window          iconwin, win;
13
-int             screen; 
14
-int             DisplayDepth;
15
-GC NormalGC;
16
 
17
 
18
 

Return to bug 249048