1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 99-undo-brain-fuckage.dpatch by martin f. krafft <madduck@debian.org>
4
## All lines beginning with `## DP:' are a description of the patch.
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
13
struct vt_page *vtp = ev->p1;
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)
21
if (not dl_empty(reqs))
22
error("capture aborted. some pages are missing.");
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)
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
33
for (i = 0; i < HASH_SIZE; ++i)
34
while (not dl_empty(ca->hash + i))
36
- cp = $ ca->hash[i].first;
37
+ cp = VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE ca->hash[i].first;
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
51
struct cache_page *cp;
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)
60
struct cache_page *cp;
61
int h = hash(vtp->pgno);
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)
69
struct cache_page *cp;
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)
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
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)
91
struct fdset_node *fn;
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)
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)
105
FD_SET(fn->fd, rfds);
106
if (fn->fd >= max_fd)
108
/* A little bit complicated. A called handler may modify the fdset... */
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))
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
120
// generic macros/typedefs
121
//////////////////////////
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
132
u8 buf[H *(W+1) + 1];
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)
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
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);
154
struct vbi_client *cl;
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)
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
165
if (fdset_add_fd(fds, xio->fd, handle_event, xio) == -1)
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);
171
xio->icon = XCreateBitmapFromData(xio->dpy, xio->root,
172
icon_bits, icon_width, icon_height);
174
xio_close_win((struct xio_win *)xio->windows->first, 0);
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);
183
struct xio *xio, *vtn;
184
struct xio_win *xw, *vwn;
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)
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));
200
else if (type == xio->xa_timestamp)
202
u32 t = xw->sel_set_t;
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);
207
else if (type == XA_COLORMAP)
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);
214
else if (type == XA_STRING || type == xio->xa_text)
218
pm = sel_convert2pixmap(xw);
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);
224
else if (type == xio->xa_multiple)
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))
232
if (fo == 32 && n%2 == 0)
237
XChangeProperty(xio->dpy, w, prop, type, 32, PropModeReplace,
239
+ VOIDSTAR_DO_NOT_DO_CRAP_LIKE_THIS_PLEASE atoms, n);
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);
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))
259
if (fo == 8 && n != 0)
261
@@ -1009,7 +1009,7 @@
263
XNextEvent(xio->dpy, ev);
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)
269
if (xw->node->next == 0)
270
@@ -1179,7 +1179,7 @@
271
for_all_windows(xio_update_win, 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))
278
handle_event(xio, xio->fd);