~ubuntu-branches/ubuntu/gutsy/alevt/gutsy

« back to all changes in this revision

Viewing changes to debian/patches/99-undo-brain-fuckage.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): martin f. krafft
  • Date: 2006-10-08 11:22:36 UTC
  • Revision ID: james.westby@ubuntu.com-20061008112236-cqqe1nwajwolboz6
Tags: 1:1.6.1-7.1
* Non-maintainer upload.
* 99-undo-brain-fuckage.dpatch: undo the amazing abuse of the C language by
  upstream. The package now builds on arm (closes: #391566), but it remains
  a mystery how it has ever been built on *any* architecture.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 99-undo-brain-fuckage.dpatch by martin f. krafft <madduck@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
@DPATCH@
 
8
diff -urNad alevt-1.6.1~/alevt-cap.c alevt-1.6.1/alevt-cap.c
 
9
--- alevt-1.6.1~/alevt-cap.c    2006-10-08 10:54:07.000000000 +0200
 
10
+++ alevt-1.6.1/alevt-cap.c     2006-10-08 11:11:12.000000000 +0200
 
11
@@ -169,7 +169,7 @@
 
12
        {
 
13
            struct vt_page *vtp = ev->p1;
 
14
 
 
15
-           for (req = $ reqs->first; nxt = $ req->node->next; req = nxt)
 
16
+           for (req = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE reqs->first; nxt = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE req->node->next; req = nxt)
 
17
                if (req->pgno == vtp->pgno)
 
18
                    if (req->subno == ANY_SUB || req->subno == vtp->subno)
 
19
                    {
 
20
@@ -306,7 +306,7 @@
 
21
     if (not dl_empty(reqs))
 
22
        error("capture aborted.  some pages are missing.");
 
23
 
 
24
-    for (req = $ reqs[1].first; req->node->next; req = $ req->node->next)
 
25
+    for (req = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE reqs[1].first; req->node->next; req = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE req->node->next)
 
26
     {
 
27
        fname = export_mkname(req->export, req->name, req->vtp, req->pgno_str);
 
28
        if (not fname || export(req->export, req->vtp, fname))
 
29
diff -urNad alevt-1.6.1~/cache.c alevt-1.6.1/cache.c
 
30
--- alevt-1.6.1~/cache.c        2000-09-21 21:17:29.000000000 +0200
 
31
+++ alevt-1.6.1/cache.c 2006-10-08 11:11:12.000000000 +0200
 
32
@@ -54,7 +54,7 @@
 
33
     for (i = 0; i < HASH_SIZE; ++i)
 
34
        while (not dl_empty(ca->hash + i))
 
35
        {
 
36
-           cp = $ ca->hash[i].first;
 
37
+           cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[i].first;
 
38
            dl_remove(cp->node);
 
39
            free(cp);
 
40
        }
 
41
@@ -68,7 +68,7 @@
 
42
     int i;
 
43
 
 
44
     for (i = 0; i < HASH_SIZE; ++i)
 
45
-       for (cp = $ ca->hash[i].first; cpn = $ cp->node->next; cp = cpn)
 
46
+       for (cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[i].first; cpn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cp->node->next; cp = cpn)
 
47
            if (cp->page->pgno / 256 != 9) // don't remove help pages
 
48
            {
 
49
                dl_remove(cp->node);
 
50
@@ -91,7 +91,7 @@
 
51
     struct cache_page *cp;
 
52
     int h = hash(pgno);
 
53
 
 
54
-    for (cp = $ ca->hash[h].first; cp->node->next; cp = $ cp->node->next)
 
55
+    for (cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[h].first; cp->node->next; cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cp->node->next)
 
56
        if (cp->page->pgno == pgno)
 
57
            if (subno == ANY_SUB || cp->page->subno == subno)
 
58
            {
 
59
@@ -114,7 +114,7 @@
 
60
     struct cache_page *cp;
 
61
     int h = hash(vtp->pgno);
 
62
     
 
63
-    for (cp = $ ca->hash[h].first; cp->node->next; cp = $ cp->node->next)
 
64
+    for (cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[h].first; cp->node->next; cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cp->node->next)
 
65
        if (cp->page->pgno == vtp->pgno && cp->page->subno == vtp->subno)
 
66
            break;
 
67
 
 
68
@@ -155,7 +155,7 @@
 
69
     struct cache_page *cp;
 
70
     int h = hash(pgno);
 
71
 
 
72
-    for (cp = $ ca->hash[h].first; cp->node->next; cp = $ cp->node->next)
 
73
+    for (cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[h].first; cp->node->next; cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cp->node->next)
 
74
        if (cp->page->pgno == pgno)
 
75
            if (subno == ANY_SUB || cp->page->subno == subno)
 
76
                return cp->page;
 
77
diff -urNad alevt-1.6.1~/fdset.c alevt-1.6.1/fdset.c
 
78
--- alevt-1.6.1~/fdset.c        1998-12-10 18:27:56.000000000 +0100
 
79
+++ alevt-1.6.1/fdset.c 2006-10-08 11:11:12.000000000 +0200
 
80
@@ -26,7 +26,7 @@
 
81
     if (handler == 0)
 
82
        return -1;
 
83
 
 
84
-    for (fn = $ fds->list->first; fn->node->next; fn = $ fn->node->next)
 
85
+    for (fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds->list->first; fn->node->next; fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fn->node->next)
 
86
        if (fn->fd == fd)
 
87
            return -1;
 
88
 
 
89
@@ -44,7 +44,7 @@
 
90
 {
 
91
     struct fdset_node *fn;
 
92
 
 
93
-    for (fn = $ fds->list->first; fn->node->next; fn = $ fn->node->next)
 
94
+    for (fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds->list->first; fn->node->next; fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fn->node->next)
 
95
        if (fn->fd == fd)
 
96
        {
 
97
            dl_remove(fn->node);
 
98
@@ -65,7 +65,7 @@
 
99
 
 
100
     FD_ZERO(rfds);
 
101
     max_fd = 0;
 
102
-    for (fn = $ fds->list->first; fn->node->next; fn = $ fn->node->next)
 
103
+    for (fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds->list->first; fn->node->next; fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fn->node->next)
 
104
     {
 
105
        FD_SET(fn->fd, rfds);
 
106
        if (fn->fd >= max_fd)
 
107
@@ -86,7 +86,7 @@
 
108
     /* A little bit complicated.  A called handler may modify the fdset... */
 
109
 restart:
 
110
     del_count = fds->del_count;
 
111
-    for (fn = $ fds->list->first; fn->node->next; fn = $ fn->node->next)
 
112
+    for (fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds->list->first; fn->node->next; fn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fn->node->next)
 
113
        if (FD_ISSET(fn->fd, rfds))
 
114
        {
 
115
            FD_CLR(fn->fd, rfds);
 
116
diff -urNad alevt-1.6.1~/misc.h alevt-1.6.1/misc.h
 
117
--- alevt-1.6.1~/misc.h 1999-07-14 21:54:30.000000000 +0200
 
118
+++ alevt-1.6.1/misc.h  2006-10-08 11:11:12.000000000 +0200
 
119
@@ -5,7 +5,7 @@
 
120
 // generic macros/typedefs
 
121
 //////////////////////////
 
122
 
 
123
-#define $ (void *)
 
124
+#define VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE (void *)
 
125
 #define NELEM(x) ((int)(sizeof(x)/sizeof(*(x))))
 
126
 #define NORETURN(x) void x __attribute__((__noreturn__))
 
127
 #define DEFINE(x) typeof(x) x
 
128
diff -urNad alevt-1.6.1~/search.c alevt-1.6.1/search.c
 
129
--- alevt-1.6.1~/search.c       1999-07-06 03:49:09.000000000 +0200
 
130
+++ alevt-1.6.1/search.c        2006-10-08 11:12:35.000000000 +0200
 
131
@@ -61,7 +61,7 @@
 
132
     u8 buf[H *(W+1) + 1];
 
133
     int line[H];
 
134
 
 
135
-    convert($ vtp->data, buf, line);
 
136
+    convert(VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE vtp->data, buf, line);
 
137
     if (regexec(s->pattern, buf, 1, m, 0) == 0)
 
138
     {
 
139
        s->len = 0;
 
140
diff -urNad alevt-1.6.1~/vbi.c alevt-1.6.1/vbi.c
 
141
--- alevt-1.6.1~/vbi.c  2006-10-08 10:54:07.000000000 +0200
 
142
+++ alevt-1.6.1/vbi.c   2006-10-08 11:11:12.000000000 +0200
 
143
@@ -82,7 +82,7 @@
 
144
     ev->i3 = i3;
 
145
     ev->p1 = p1;
 
146
 
 
147
-    for (cl = $ vbi->clients->first; cln = $ cl->node->next; cl = cln)
 
148
+    for (cl = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE vbi->clients->first; cln = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cl->node->next; cl = cln)
 
149
        cl->handler(cl->data, ev);
 
150
 }
 
151
 
 
152
@@ -449,7 +449,7 @@
 
153
 {
 
154
     struct vbi_client *cl;
 
155
 
 
156
-    for (cl = $ vbi->clients->first; cl->node->next; cl = $ cl->node->next)
 
157
+    for (cl = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE vbi->clients->first; cl->node->next; cl = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE cl->node->next)
 
158
        if (cl->handler == handler && cl->data == data)
 
159
        {
 
160
            dl_remove(cl->node);
 
161
diff -urNad alevt-1.6.1~/xio.c alevt-1.6.1/xio.c
 
162
--- alevt-1.6.1~/xio.c  2006-10-08 10:54:07.000000000 +0200
 
163
+++ alevt-1.6.1/xio.c   2006-10-08 11:11:12.000000000 +0200
 
164
@@ -197,7 +197,7 @@
 
165
     if (fdset_add_fd(fds, xio->fd, handle_event, xio) == -1)
 
166
        goto fail3;
 
167
     
 
168
-    XAddConnectionWatch(xio->dpy, $ xlib_conn_watch, $ fds);
 
169
+    XAddConnectionWatch(xio->dpy, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xlib_conn_watch, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds);
 
170
        
 
171
     xio->icon = XCreateBitmapFromData(xio->dpy, xio->root,
 
172
                                        icon_bits, icon_width, icon_height);
 
173
@@ -355,7 +355,7 @@
 
174
        xio_close_win((struct xio_win *)xio->windows->first, 0);
 
175
 
 
176
     XDestroyWindow(xio->dpy, xio->group_leader);
 
177
-    XRemoveConnectionWatch(xio->dpy, $ xlib_conn_watch, $ fds);
 
178
+    XRemoveConnectionWatch(xio->dpy, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xlib_conn_watch, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE fds);
 
179
     fdset_del_fd(fds, xio->fd);
 
180
     dl_remove(xio->node);
 
181
     free(xio);
 
182
@@ -664,8 +664,8 @@
 
183
     struct xio *xio, *vtn;
 
184
     struct xio_win *xw, *vwn;
 
185
 
 
186
-    for (xio = $ dpys->first; vtn = $ xio->node->next; xio = vtn)
 
187
-       for (xw = $ xio->windows->first; vwn = $ xw->node->next; xw = vwn)
 
188
+    for (xio = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE dpys->first; vtn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xio->node->next; xio = vtn)
 
189
+       for (xw = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xio->windows->first; vwn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xw->node->next; xw = vwn)
 
190
            if (xw != except)
 
191
                func(xw);
 
192
 }
 
193
@@ -857,19 +857,19 @@
 
194
        atoms[4] = xio->xa_multiple;
 
195
        atoms[5] = xio->xa_timestamp;
 
196
        XChangeProperty(xio->dpy, w, prop, type,
 
197
-                                   32, PropModeReplace, $ atoms, NELEM(atoms));
 
198
+                                   32, PropModeReplace, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE atoms, NELEM(atoms));
 
199
     }
 
200
     else if (type == xio->xa_timestamp)
 
201
     {
 
202
        u32 t = xw->sel_set_t;
 
203
 
 
204
-       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, $ &t, 1);
 
205
+       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &t, 1);
 
206
     }
 
207
     else if (type == XA_COLORMAP)
 
208
     {
 
209
        u32 t = xio->cmap;
 
210
 
 
211
-       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, $ &t, 1);
 
212
+       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &t, 1);
 
213
     }
 
214
     else if (type == XA_STRING || type == xio->xa_text)
 
215
     {
 
216
@@ -887,7 +887,7 @@
 
217
 
 
218
        pm = sel_convert2pixmap(xw);
 
219
 
 
220
-       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, $ &pm, 1);
 
221
+       XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &pm, 1);
 
222
        //prop = XA_PIXMAP;
 
223
     }
 
224
     else if (type == xio->xa_multiple)
 
225
@@ -898,7 +898,7 @@
 
226
        if (prop != None)
 
227
        {
 
228
            if (Success == XGetWindowProperty(xio->dpy, w, prop,
 
229
-               0, 1024, 0, AnyPropertyType, $ &ty, $ &fo, &n, &b, $ &atoms))
 
230
+               0, 1024, 0, AnyPropertyType, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &ty, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &fo, &n, &b, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &atoms))
 
231
            {
 
232
                if (fo == 32 && n%2 == 0)
 
233
                {
 
234
@@ -907,7 +907,7 @@
 
235
                            atoms[i] = None;
 
236
                }
 
237
                XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace,
 
238
-                        $ atoms, n);
 
239
+                        VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE atoms, n);
 
240
                XFree(atoms);
 
241
            }
 
242
        }
 
243
@@ -931,7 +931,7 @@
 
244
     ev->target = req->target;
 
245
     ev->property = sel_do_conv(xw, req->requestor, req->target, req->property);
 
246
     ev->time = req->time;
 
247
-    XSendEvent(xw->xio->dpy, req->requestor, False, 0, $ ev);
 
248
+    XSendEvent(xw->xio->dpy, req->requestor, False, 0, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ev);
 
249
 }
 
250
 
 
251
 static void
 
252
@@ -946,7 +946,7 @@
 
253
        return;
 
254
 
 
255
     if (Success == XGetWindowProperty(xio->dpy, w, prop,
 
256
-               0, 1024, del, AnyPropertyType, $ &ty, $ &fo, &n, &b, $ &data))
 
257
+               0, 1024, del, AnyPropertyType, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &ty, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &fo, &n, &b, VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE &data))
 
258
     {
 
259
        if (fo == 8 && n != 0)
 
260
        {
 
261
@@ -1009,7 +1009,7 @@
 
262
 
 
263
     XNextEvent(xio->dpy, ev);
 
264
 
 
265
-    for (xw = $ xio->windows->first; xw->node->next; xw = $ xw->node->next)
 
266
+    for (xw = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xio->windows->first; xw->node->next; xw = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xw->node->next)
 
267
        if (xw->win == ev->xany.window)
 
268
            break;
 
269
     if (xw->node->next == 0)
 
270
@@ -1179,7 +1179,7 @@
 
271
            for_all_windows(xio_update_win, 0);
 
272
 
 
273
            f = 0;
 
274
-           for (xio = $ dpys->first; vtn = $ xio->node->next; xio = vtn)
 
275
+           for (xio = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE dpys->first; vtn = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE xio->node->next; xio = vtn)
 
276
                while (XPending(xio->dpy))
 
277
                {
 
278
                    handle_event(xio, xio->fd);