File: fix-prototypes.patch

package info (click to toggle)
kali 3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 716 kB
  • sloc: ansic: 3,502; makefile: 61
file content (168 lines) | stat: -rw-r--r-- 2,853 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
From 8864b1898f6547243021086731a31597205c346f Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 27 Jan 2014 07:47:15 +0000
Subject: Tidy up prototypes to fix build with clang

Forwarded: no
Last-Update: 2013-02-07

Patch-Name: fix-prototypes.patch
---
 xio.c | 47 +++++++++++++++++++++++++++++++++++------------
 1 file changed, 35 insertions(+), 12 deletions(-)

diff --git a/xio.c b/xio.c
index aad10f3..6af0d49 100644
--- a/xio.c
+++ b/xio.c
@@ -78,6 +78,12 @@ struct GXdata {
 
 static struct GXdata *gxd;
 
+void bgnline(void);
+void endline(void);
+void bgnpoint(void);
+void endpoint(void);
+void reshapeviewport(void);
+
 void GXinit(DRAWER *d, Display *dpy, Window w)
 {
   Screen *s = DefaultScreenOfDisplay(dpy);
@@ -104,21 +110,25 @@ void GXinit(DRAWER *d, Display *dpy, Window w)
   }
 }
 
-swapbuffers()
+void
+swapbuffers(void)
 {
    if(gxd->backpix != None)
 	XCopyArea(gxd->dpy, gxd->backpix, gxd->wvis, gxd->gc,
 		0, 0, gxd->xsize, gxd->ysize, 0, 0);
 }
 
+void
 winset(int w)
 { /* Could do something useful, but for now just assume we have only 1 window */
 }
 
-winconstraints()
+void
+winconstraints(void)
 {}
 
-foreground()
+void
+foreground(void)
 {}
 
 /*
@@ -161,19 +171,22 @@ winopen(char *title)
   return gxd->wvis;
 }
 
+void
 getsize(long *x, long *y)
 {
   *x = gxd->xsize;
   *y = gxd->ysize;
 }
 
+void
 getorigin(long *x, long *y)
 {
   *x = gxd->xbase;
   *y = gxd->ybase;
 }
 
-doublebuffer()
+void
+doublebuffer(void)
 {
   if(gxd->backpix != None)
     XFreePixmap(gxd->dpy, gxd->backpix);
@@ -181,10 +194,12 @@ doublebuffer()
 		gxd->xsize, gxd->ysize, gxd->depth);
 }
 
-gconfig()
+void
+gconfig(void)
 { }
 
-RGBmode()
+void
+RGBmode(void)
 { }
 
 void
@@ -196,7 +211,8 @@ prefposition(int x0, int x1, int y0, int y1)
   gxd->ysize = y1-y0+1;
 }
 
-reshapeviewport()
+void
+reshapeviewport(void)
 {
   Window rootw;
   int x0, y0;
@@ -230,6 +246,7 @@ static struct knowncolor {
   int abgr;
 } knowncolors[MAXC];
 
+void
 cpack(int abgr)
 {
   XColor c;
@@ -263,7 +280,8 @@ cpack(int abgr)
   XSetForeground(gxd->dpy, gxd->gc, knowncolors[i].pixel);
 }
 
-clear()
+void
+clear(void)
 {
   XSetBackground(gxd->dpy, gxd->gc, gxd->cpixel);
   XFillRectangle(gxd->dpy, gxd->w, gxd->gc, 0, 0, gxd->xsize, gxd->ysize);
@@ -274,6 +292,7 @@ static XPoint xp[MAXP];
 static int xpc = 0;
 static int in_line = 0;
 
+void
 v2f(float p[2])
 {
   if(xpc >= MAXP) {
@@ -290,25 +309,29 @@ v2f(float p[2])
   xpc++;
 }
 
-bgnline()
+void
+bgnline(void)
 {
   xpc = 0;
   in_line = 1;
 }
 
-endline()
+void
+endline(void)
 {
   XDrawLines(gxd->dpy, gxd->w, gxd->gc, xp, xpc, CoordModeOrigin);
   xpc = 0;
 }
 
-bgnpoint()
+void
+bgnpoint(void)
 {
   xpc = 0;
   in_line = 0;
 }
 
-endpoint()
+void
+endpoint(void)
 {
   XDrawPoints(gxd->dpy, gxd->w, gxd->gc, xp, xpc, CoordModeOrigin);
   xpc = 0;