File: 0006-Switch-to-ANSI-C-function-declaration-syntax.patch

package info (click to toggle)
unclutter 8-26
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 352 kB
  • sloc: ansic: 1,758; makefile: 170; sh: 81
file content (82 lines) | stat: -rw-r--r-- 2,144 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
From: Ian Jackson <ijackson@chiark.greenend.org.uk>
Date: Sat, 20 Sep 2025 18:18:35 +0100
Subject: Switch to ANSI C function declaration syntax.

Closes: #1098037.
---
 unclutter.c | 18 ++++++------------
 vroot.h     |  4 +---
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/unclutter.c b/unclutter.c
index de5a971..4164ea4 100644
--- a/unclutter.c
+++ b/unclutter.c
@@ -33,7 +33,7 @@
 
 char *progname;
 void
-pexit(str)char *str;{
+pexit(char *str){
     fprintf(stderr,"%s: %s\n",progname,str);
     exit(1);
 }
@@ -78,10 +78,8 @@ static void dsleep(float t)
  * window can disappear while we are trying to create the child. Trap and
  * ignore these errors.
  */
-int (*defaulthandler)();
-int errorhandler(display,error)
-Display *display;
-XErrorEvent *error;
+int (*defaulthandler)(Display *display, XErrorEvent *error);
+int errorhandler(Display *display, XErrorEvent *error)
 {
     if(error->error_code!=BadWindow)
 	(*defaulthandler)(display,error);
@@ -96,9 +94,7 @@ regex_t *nc_re = 0;     /* regex for list of classes/names to avoid */
  * one of the given names (classes) to avoid
  */
 int
-nameinlist(display,window)
-Display *display;
-Window window;
+nameinlist(Display *display, Window window)
 {
     char **cpp;
     char *name = 0;
@@ -135,9 +131,7 @@ Window window;
  * create a small 1x1 curssor with all pixels masked out on the given screen.
  */
 Cursor
-createnullcursor(display,root)
-Display *display;
-Window root;
+createnullcursor(Display *display, Window root)
 {
     Pixmap cursormask;
     XGCValues xgc;
@@ -160,7 +154,7 @@ Window root;
 }
 
 int
-main(argc,argv)char **argv; int argc;{
+main(int argc, char **argv){
     Display *display;
     int screen,oldx = -99,oldy = -99,numscreens;
     int doroot = 0, jitter = 0, usegrabmethod = 0, waitagain = 0,
diff --git a/vroot.h b/vroot.h
index cbe41dc..edf11de 100644
--- a/vroot.h
+++ b/vroot.h
@@ -38,9 +38,7 @@
 #include <X11/Xatom.h>
 
 static Window
-VirtualRootWindow(dpy, screen)
-Display *dpy;
-int screen;
+VirtualRootWindow(Display *dpy, int screen)
 {
 	static Display *save_dpy = (Display *)0;
 	static int save_screen = -1;