summaryrefslogtreecommitdiff
path: root/graphics/xaos/files/patch-aa
blob: 05af514f3a3e827172cb1f59d4e42cd78056fbb9 (plain) (blame)
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
--- src/engine/blur.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/blur.c	Fri Jul  3 15:39:10 1998
@@ -1,5 +1,10 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <string.h>
 #include <math.h>
 #include <config.h>
@@ -294,6 +299,7 @@
 }
 #define AMOUNT 0.005
 #define DIV 1000.0
+#undef MAX
 #define MAX 800*1000		/*after 800 frames should be OK */
 static int
 doit (struct filter *f, int flags, int time1)
--- src/engine/btrace.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/btrace.c	Fri Jul  3 16:24:08 1998
@@ -1,5 +1,12 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <math.h>
 #include <stdio.h>
 #include <string.h>
--- src/engine/dither.c--	Fri Jul  3 14:15:34 1998
+++ src/engine/dither.c	Fri Jul  3 15:36:23 1998
@@ -13,8 +13,13 @@
  * Note that quite interesting alg. is for preparing dithering table at
  * fixedcolor displays.
  */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <config.h>
 #include <stdio.h>
 #include <string.h>
@@ -31,6 +36,7 @@
 #include <filter.h>
 #include <fractal.h>
 #include <xthread.h>
+#undef MSIZE
 #define MSIZE 8
 static int matrix[MSIZE][MSIZE] =
 {
--- src/engine/edge.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/edge.c	Fri Jul  3 14:16:28 1998
@@ -2,8 +2,15 @@
  * This is very simple filter - it initializes smalliter image and then
  * does an simple edge detection algo on it.
  */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>		/*for NULL */
 #else
 #include <u.h>
--- src/engine/edge2.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/edge2.c	Fri Jul  3 14:17:40 1998
@@ -2,8 +2,15 @@
  * This is very simple filter - it initializes smalliter image and then
  * does an simple edge detection algo on it.
  */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>		/*for NULL */
 #else
 #include <u.h>
--- src/engine/emboss.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/emboss.c	Fri Jul  3 14:11:39 1998
@@ -1,5 +1,12 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>
 #else
 #include <u.h>
--- src/engine/fractal.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/fractal.c	Wed Sep  8 00:45:59 1999
@@ -20,15 +20,21 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 /*#define STATISTICS */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifdef _plan9_
 #include <u.h>
 #include <libc.h>
 #include <stdio.h>
 #else
 #include <stdio.h>
-#ifndef _MAC
+#if (!defined(_MAC) && (!defined(BSD) || (BSD < 199506)))
 #include <malloc.h>
 #endif
+#if (defined(BSD) && (BSD >= 199506))
+#include <stdlib.h>
+#endif
 #include <aconfig.h>
 #include <string.h>
 #include <config.h>
@@ -50,16 +56,21 @@
 #include <timers.h>
 #ifdef __GNUC__
 #ifdef __i386__
+#ifdef __linux__
 #ifndef PC_64
 #include <i386/ctrl87.h>
 #endif
 #endif
 #endif
+#endif
 #ifdef __alpha__
 #ifdef __linux__
 #include <asm/fpu.h>
 #endif
 #endif
+#if (defined(BSD) && (BSD >= 199506))
+#include <floatingpoint.h>
+#endif
 #ifndef M_PI
 #define M_PI 3.1415
 #endif
@@ -335,9 +346,11 @@
 
 #ifdef __GNUC__
 #ifdef __i386__
+#ifdef __linux__
   _control87 (PC_64 | MCW_EM | MCW_RC, MCW_PC | MCW_EM | MCW_RC);
 #endif
 #endif
+#endif
 #ifdef __alpha__
 #ifdef __linux__
   extern void ieee_set_fp_control(unsigned long);
@@ -352,6 +365,16 @@
     /*fcr &= ~(FPINEX | FPOVFL | FPUNFL | FPZDIV);*/
     setfcr (fcr);
   }
+#endif
+#ifdef BSD
+  /* ignore all possible exceptions */
+#ifdef __alpha__
+  (void) fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ |
+		FP_X_IMP));
+#else
+  (void) fpsetmask(~(FP_X_INV | FP_X_OFL | FP_X_UFL | FP_X_DZ |
+		FP_X_IMP | FP_X_DNML));
+#endif
 #endif
   new_ctxt = (fractal_context *) calloc (sizeof (fractal_context), 1);
   if (new_ctxt == NULL)
--- src/engine/i386.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/i386.c	Fri Jul  3 17:48:38 1998
@@ -1,4 +1,4 @@
-
+#ifdef __linux__
 /*
  * ctrl87.c
  */
@@ -211,6 +211,7 @@
     }
   return _to;
 }
+#endif
 #endif
 #endif
 #endif
--- src/engine/interlace.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/interlace.c	Fri Jul  3 14:21:21 1998
@@ -1,5 +1,12 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>		/*for NULL */
 #include <string.h>		/*for memcpy */
 #else
--- src/engine/itersmall.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/itersmall.c	Fri Jul  3 14:22:29 1998
@@ -1,5 +1,10 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <config.h>
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
--- src/engine/julia.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/julia.c	Fri Jul  3 14:24:57 1998
@@ -1,3 +1,6 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifdef _plan9_
 #include <u.h>
 #include <stdio.h>
@@ -5,7 +8,9 @@
 #else
 #include <math.h>
 #include <string.h>
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #endif
--- src/engine/palettef.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/palettef.c	Fri Jul  3 14:09:38 1998
@@ -1,5 +1,12 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>
 #else
 #include <u.h>
--- src/engine/rotate.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/rotate.c	Fri Jul  3 16:24:16 1998
@@ -4,12 +4,19 @@
  * 'E' menu.
  * It is used to implement fast rotation mode
  */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
 #include <string.h>
 #include <limits.h>
 #include <archaccel.h>
 #include <math.h>
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #else
 #include <u.h>
 #include <libc.h>
--- src/engine/star.c--	Fri Jul  3 14:12:59 1998
+++ src/engine/star.c	Fri Jul  3 14:51:59 1998
@@ -1,5 +1,10 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <config.h>
 #include <limits.h>
 #ifdef HAVE_ALLOCA_H
--- src/engine/stereogram.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/stereogram.c	Fri Jul  3 14:22:55 1998
@@ -1,5 +1,10 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#endif
 #include <config.h>
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
--- src/engine/subwindow.c--	Fri Jul  3 14:24:23 1998
+++ src/engine/subwindow.c	Fri Jul  3 14:23:57 1998
@@ -1,5 +1,12 @@
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifndef _plan9_
+#if (!defined(BSD) || (BSD < 199506))
 #include <malloc.h>
+#else
+#include <stdlib.h>
+#endif
 #include <stdio.h>		/*for NULL */
 #include <string.h>		/*for memcpy */
 #else
--- src/engine/zoom.c--	Thu Mar  5 03:19:12 1998
+++ src/engine/zoom.c	Fri Jul  3 16:24:03 1998
@@ -20,6 +20,9 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 /*#define DRAW */
+#if defined(HAVE_SYS_PARAM_H)
+#include <sys/param.h>
+#endif
 #ifdef _plan9_
 #include <u.h>
 #include <libc.h>
@@ -27,7 +30,7 @@
 #else
 #include <stdlib.h>
 #include <stdio.h>
-#ifndef _MAC
+#if (!defined(_MAC) && (!defined(BSD) || (BSD < 199506)))
 #include <malloc.h>
 #endif
 #ifdef __EMX__
@@ -61,6 +64,7 @@
 #include "calculate.h"		/*an inlined calulate function */
 
 #define ASIZE 16
+#undef ALIGN
 #define ALIGN(x) (((x)+ASIZE-1)&(~(ASIZE-1)))
 static int nsymetrized;
 static unsigned char *tmpdata, *tmpdata1;