File: std23.patch

package info (click to toggle)
libsx 2.08-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,716 kB
  • sloc: ansic: 8,713; sh: 8,603; makefile: 62
file content (233 lines) | stat: -rw-r--r-- 6,646 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
Description: Fixes needed for C Standard std23 (GCC-15)
Author: Alastair McKinstry <mckinstry@debian.org>
Bug-Origin: https://bugs.debian.org/1097276
Last-Updated: 2025-09-06
Forwarded: no

--- a/src/drawing.c
+++ b/src/drawing.c
@@ -19,15 +19,19 @@
 typedef char *caddr_t;
 #endif
 
-static void	Initialize();
-static void     MyRealize();  /* So we can do our own visual */
-static void	Destroy();
-static void	Redisplay();
-static void	input_draw();
-static void	motion_draw();
-static void	resize_draw();
-static void	enter_draw();
-static void	leave_draw();
+/* See drawingP.h: prototypes matching CoreClassPart of DrawingAreaWidget
+ * must match definitions in <X11/IntrinsicP.h>
+ */
+
+static void	Initialize(Widget request, Widget new, ArgList args, Cardinal *nargs);
+static void     MyRealize(DrawingAreaWidget w, XtValueMask *m, XSetWindowAttributes *attrs);  /* So we can do our own visual */
+static void	Destroy(Widget w);
+static void	Redisplay(Widget w,XEvent *ev, Region r);
+static void	input_draw(DrawingAreaWidget w, XEvent *ev,char *args[], int nargs);
+static void	motion_draw(DrawingAreaWidget w,XEvent *ev,char *args[], int nargs);
+static void	resize_draw(DrawingAreaWidget w,XEvent *ev,char *args[], int nargs);
+static void	enter_draw(DrawingAreaWidget w,XEvent *ev,char *args[], int nargs);
+static void	leave_draw(DrawingAreaWidget w,XEvent *ev,char *args[], int nargs);
 
 static char defaultTranslations[] = "<BtnDown>: input() \n <BtnUp>: input() \n <KeyDown>: input() \n <KeyUp>: input() \n <Motion>: motion() \n <Configure>: resize() \n <Enter>: enter() \n <Leave>: leave()";
 static XtActionsRec actionsList[] = {
@@ -75,7 +79,7 @@
     FALSE,				/* class_inited		  */
     Initialize,				/* initialize		  */
     NULL,				/* initialize_hook	  */
-    MyRealize,				/* realize		  */
+    (XtRealizeProc) MyRealize,		/* realize		  */
     actionsList,			/* actions		  */
     XtNumber(actionsList),		/* num_actions		  */
     resources,				/* resources		  */
@@ -112,8 +116,10 @@
 WidgetClass drawingAreaWidgetClass = (WidgetClass)&drawingAreaClassRec;
 
 
-static void Initialize( request, new)
-DrawingAreaWidget request, new;
+static void Initialize(Widget request,
+		       Widget new,
+		       ArgList args,
+		       Cardinal *nargs)
 {
   if (request->core.width == 0)
     new->core.width = 100;
@@ -156,10 +162,9 @@
     }
 }
 
-static void MyRealize(w, valueMask, attributes)
-    DrawingAreaWidget w;
-    Mask *valueMask;
-    XSetWindowAttributes *attributes;
+static void MyRealize(DrawingAreaWidget w,
+		      XtValueMask *valueMask,
+		      XSetWindowAttributes *attributes)
 {
     Pixmap border_pixmap = 0;
 
@@ -196,23 +201,21 @@
 
 
 
-static void Destroy( w)
-DrawingAreaWidget w;
+static void Destroy(Widget w)
 {
-  XtRemoveAllCallbacks((Widget)w, XtNexposeCallback);
-  XtRemoveAllCallbacks((Widget)w, XtNinputCallback);
-  XtRemoveAllCallbacks((Widget)w, XtNmotionCallback);
-  XtRemoveAllCallbacks((Widget)w, XtNresizeCallback);
-  XtRemoveAllCallbacks((Widget)w, XtNenterCallback);
-  XtRemoveAllCallbacks((Widget)w, XtNleaveCallback);
+  XtRemoveAllCallbacks(w, XtNexposeCallback);
+  XtRemoveAllCallbacks(w, XtNinputCallback);
+  XtRemoveAllCallbacks(w, XtNmotionCallback);
+  XtRemoveAllCallbacks(w, XtNresizeCallback);
+  XtRemoveAllCallbacks(w, XtNenterCallback);
+  XtRemoveAllCallbacks(w, XtNleaveCallback);
 }
 
 
 /* Invoke expose callbacks */
-static void Redisplay(w, event, region)
-DrawingAreaWidget w;
-XEvent		 *event;
-Region		  region;
+static void Redisplay(Widget w,
+		      XEvent *event,
+		      Region region)
 {
   XawDrawingAreaCallbackStruct cb;
 
@@ -223,11 +226,7 @@
 }
 
 /* Invoke resize callbacks */
-static void resize_draw(w, event, args, n_args)
-DrawingAreaWidget w;
-XEvent		 *event;
-char		 *args[];
-int		  n_args;
+static void resize_draw(DrawingAreaWidget w,XEvent *event, char *args[], int n_args)
 {
   XawDrawingAreaCallbackStruct cb;
 
@@ -238,11 +237,7 @@
 }
 
 /* Invoke input callbacks */
-static void input_draw(w, event, args, n_args)
-DrawingAreaWidget w;
-XEvent		 *event;
-char		 *args[];
-int		  n_args;
+static void input_draw(DrawingAreaWidget w,XEvent *event, char *args[], int n_args)
 {
   XawDrawingAreaCallbackStruct cb;
 
@@ -253,11 +248,7 @@
 }
 
 /* Invoke motion callbacks */
-static void motion_draw(w, event, args, n_args)
-DrawingAreaWidget w;
-XEvent		 *event;
-char		 *args[];
-int		  n_args;
+static void motion_draw(DrawingAreaWidget w,XEvent *event, char *args[], int n_args)
 {
   XawDrawingAreaCallbackStruct cb;
 
@@ -268,11 +259,7 @@
 }
 
 /* Invoke enter callbacks */
-static void enter_draw(w, event, args, n_args)
-DrawingAreaWidget w;
-XEvent		 *event;
-char		 *args[];
-int		  n_args;
+static void enter_draw(DrawingAreaWidget w,XEvent *event, char *args[], int n_args)
 {
   XawDrawingAreaCallbackStruct cb;
 
@@ -283,11 +270,7 @@
 }
 
 /* Invoke leave callbacks */
-static void leave_draw(w, event, args, n_args)
-DrawingAreaWidget w;
-XEvent		 *event;
-char		 *args[];
-int		  n_args;
+static void leave_draw(DrawingAreaWidget w,XEvent *event, char *args[], int n_args)
 {
   XawDrawingAreaCallbackStruct cb;
 
--- a/src/grabpix.c
+++ b/src/grabpix.c
@@ -42,7 +42,7 @@
     RootWindowPart	root;
 } RootWindowRec;
 
-static void Realize();
+static void Realize(Widget w,XtValueMask *value_mask,XSetWindowAttributes  *attributes);
 /*
 static void InitCursors();
 static void SetupGC();
@@ -102,10 +102,7 @@
   } hlStruct, *hlPtr;
 
 /*ARGSUSED*/
-static void Realize(w, value_mask, attributes)
-    Widget	w;
-    XtValueMask *value_mask;
-    XSetWindowAttributes *attributes;
+static void Realize(Widget w,XtValueMask *value_mask,XSetWindowAttributes  *attributes)
 {
     w->core.window = RootWindowOfScreen(w->core.screen);
 }
@@ -169,8 +166,7 @@
 		       &selectGCV);
 }  
 
-Window FindWindow(x, y)
-     int x, y;	  
+Window FindWindow(int x,int y)
 {
   XWindowAttributes wa;
   Window findW = DefaultRootWindow(dpy), stopW, childW;
@@ -196,7 +192,7 @@
   XtRealizeWidget(root);
 }
 
-void StartRootPtrGrab()   
+void StartRootPtrGrab(char *format)   
 {
   Window    rootR, childR, window;
   int       rootX, rootY, winX, winY;
@@ -207,7 +203,6 @@
   Pixel pixel;
   static XEvent event;
   char addstr[20];
-  char format[30];
 
   XtGrabPointer
     (root, False,
--- a/src/libsx.c
+++ b/src/libsx.c
@@ -527,7 +527,7 @@
 
 
 
-void AddTimeOut(unsigned long interval, void (*func)(), void *data)
+void AddTimeOut(unsigned long interval, GeneralCB func, void *data)
 {
   if (lsx_curwin->toplevel && func)
     XtAppAddTimeOut(lsx_app_con, interval, (XtTimerCallbackProc)func, data);