summaryrefslogtreecommitdiff
path: root/patches/source/libwmf/libwmf-0.2.8.4-reducesymbols.patch
blob: 45d82b3279800b985aa6be9a853db085fad827fb (plain)
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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
diff -ru libwmf-0.2.8.4/src/extra/gd/gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd.c
--- libwmf-0.2.8.4/src/extra/gd/gd.c	2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.c	2006-11-16 12:27:05.000000000 +0000
@@ -249,6 +249,7 @@
   }
 HWBType;
 
+#if 0
 static HWBType *
 RGB_to_HWB (RGBType RGB, HWBType * HWB)
 {
@@ -308,7 +309,6 @@
   return diff;
 }
 
-#if 0
 /*
  * This is not actually used, but is here for completeness, in case someone wants to
  * use the HWB stuff for anything else...
@@ -355,6 +355,7 @@
 }
 #endif
 
+#if 0
 int
 gdImageColorClosestHWB (gdImagePtr im, int r, int g, int b)
 {
@@ -384,6 +385,7 @@
     }
   return ct;
 }
+#endif
 
 int
 gdImageColorExact (gdImagePtr im, int r, int g, int b)
@@ -677,7 +679,7 @@
     }
 }
 
-int
+static int
 gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
 {
   int p = gdImageGetPixel (im, x, y);
@@ -1286,11 +1288,11 @@
   return len;
 }
 
-#ifndef HAVE_LSQRT
+#if 0
 /* If you don't have a nice square root function for longs, you can use
    ** this hack
  */
-long
+static long
 lsqrt (long n)
 {
   long result = (long) sqrt ((double) n);
@@ -2250,7 +2252,7 @@
     }
 }
 
-int gdCompareInt (const void *a, const void *b);
+static int gdCompareInt (const void *a, const void *b);
 
 /* THANKS to Kirsten Schulz for the polygon fixes! */
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdcache.h libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h
--- libwmf-0.2.8.4/src/extra/gd/gdcache.h	2001-08-21 15:40:33.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdcache.h	2006-11-16 12:13:40.000000000 +0000
@@ -41,6 +41,9 @@
 /*********************************************************/
 
 /* #include <malloc.h> */
+
+#pragma GCC visibility push(hidden)
+
 #ifndef NULL
 #define NULL (void *)0
 #endif
@@ -81,3 +84,5 @@
 
 void *
 gdCacheGet( gdCache_head_t *head, void *keydata );
+
+#pragma GCC visibility pop
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_clip.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h
--- libwmf-0.2.8.4/src/extra/gd/gd_clip.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_clip.h	2006-11-16 12:11:49.000000000 +0000
@@ -1,6 +1,8 @@
 #ifndef GD_CLIP_H
 #define GD_CLIP_H 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -23,4 +25,6 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif /* GD_CLIP_H */
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontg.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontg.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontg.h	2006-11-16 12:12:03.000000000 +0000
@@ -2,6 +2,8 @@
 #ifndef _GDFONTG_H_
 #define _GDFONTG_H_ 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -25,5 +27,7 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontl.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontl.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontl.h	2006-11-16 12:12:11.000000000 +0000
@@ -2,6 +2,8 @@
 #ifndef _GDFONTL_H_
 #define _GDFONTL_H_ 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -26,5 +28,7 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontmb.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontmb.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontmb.h	2006-11-16 12:12:19.000000000 +0000
@@ -2,6 +2,8 @@
 #ifndef _GDFONTMB_H_
 #define _GDFONTMB_H_ 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -24,5 +26,7 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfonts.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h
--- libwmf-0.2.8.4/src/extra/gd/gdfonts.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfonts.h	2006-11-16 12:12:28.000000000 +0000
@@ -2,6 +2,8 @@
 #ifndef _GDFONTS_H_
 #define _GDFONTS_H_ 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -24,5 +26,7 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdfontt.h libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h
--- libwmf-0.2.8.4/src/extra/gd/gdfontt.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdfontt.h	2006-11-16 12:12:36.000000000 +0000
@@ -2,6 +2,8 @@
 #ifndef _GDFONTT_H_
 #define _GDFONTT_H_ 1
 
+#pragma GCC visibility push(hidden)
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -25,5 +27,7 @@
 }
 #endif
 
+#pragma GCC visibility pop
+
 #endif
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gdft.c libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c
--- libwmf-0.2.8.4/src/extra/gd/gdft.c	2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdft.c	2006-11-16 12:24:50.000000000 +0000
@@ -533,7 +533,7 @@
 }
 
 /* draw_bitmap - transfers glyph bitmap to GD image */
-/* static */ char *
+static char *
 gdft_draw_bitmap (gdImage * im, int fg, FT_Bitmap bitmap, int pen_x, int pen_y)
 {
   unsigned char *pixel = 0;
@@ -643,7 +643,7 @@
   return (char *) NULL;
 }
 
-int
+static int
 gdroundupdown (FT_F26Dot6 v1, int updown)
 {
   return (!updown)
@@ -651,7 +651,9 @@
     : (v1 > 0 ? ((v1 + 63) >> 6) : v1 >> 6);
 }
 
+#pragma GCC visibility push(hidden)
 extern int any2eucjp (char *, char *, unsigned int);
+#pragma GCC visibility pop
 
 /********************************************************************/
 /* gdImageStringFT -  render a utf8 string onto a gd image          */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd2.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c
--- libwmf-0.2.8.4/src/extra/gd/gd_gd2.c	2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd2.c	2006-11-16 12:21:28.000000000 +0000
@@ -34,8 +34,10 @@
   }
 t_chunk_info;
 
+#pragma GCC visibility push(hidden)
 extern int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
 extern void _gdPutColors (gdImagePtr im, gdIOCtx * out);
+#pragma GCC visibility pop
 
 /* */
 /* Read the extra info in the gd2 header. */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_gd.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c
--- libwmf-0.2.8.4/src/extra/gd/gd_gd.c	2005-07-27 21:35:05.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_gd.c	2006-11-16 12:21:43.000000000 +0000
@@ -11,6 +11,11 @@
 /* Exported functions: */
 extern void gdImageGd (gdImagePtr im, FILE * out);
 
+#pragma GCC visibility push(hidden)
+int _gdGetColors (gdIOCtx * in, gdImagePtr im, int gd2xFlag);
+void _gdPutColors (gdImagePtr im, gdIOCtx * out);
+#pragma GCC visibility pop
+
 
 /* Use this for commenting out debug-print statements. */
 /* Just use the first '#define' to allow all the prints... */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd.h libwmf-0.2.8.4.symbols/src/extra/gd/gd.h
--- libwmf-0.2.8.4/src/extra/gd/gd.h	2002-12-05 20:09:11.000000000 +0000
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd.h	2006-11-16 12:14:11.000000000 +0000
@@ -25,6 +25,8 @@
 #include <gd_io.h>
 #include <gd_clip.h>
 
+#pragma GCC visibility push(hidden)
+
 /* The maximum number of palette entries in palette-based images.
 	In the wonderful new world of gd 2.0, you can of course have
 	many more colors when using truecolor mode. */
@@ -497,6 +499,8 @@
 /* resolution affects ttf font rendering, particularly hinting */
 #define GD_RESOLUTION           96      /* pixels per inch */
 
+#pragma GCC visibility pop
+
 #ifdef __cplusplus
 }
 #endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gdhelpers.h libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h
--- libwmf-0.2.8.4/src/extra/gd/gdhelpers.h	2001-03-28 10:37:31.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdhelpers.h	2006-11-16 12:12:55.000000000 +0000
@@ -1,6 +1,8 @@
 #ifndef GDHELPERS_H 
 #define GDHELPERS_H 1
 
+#pragma GCC visibility push(hidden)
+
 /* TBB: strtok_r is not universal; provide an implementation of it. */
 
 extern char *gd_strtok_r(char *s, char *sep, char **state);
@@ -13,5 +15,7 @@
 void *gdMalloc(size_t size);
 void *gdRealloc(void *ptr, size_t size);
 
+#pragma GCC visibility pop
+
 #endif /* GDHELPERS_H */
 
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_io.h libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h
--- libwmf-0.2.8.4/src/extra/gd/gd_io.h	2001-03-28 10:37:30.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_io.h	2006-11-16 12:13:08.000000000 +0000
@@ -2,6 +2,8 @@
 #define GD_IO_H 1
 
 #include <stdio.h>
+
+#pragma GCC visibility push(hidden)
  
 typedef struct gdIOCtx {
 	int	(*getC)(struct gdIOCtx*);
@@ -36,4 +38,6 @@
 int gdSeek(gdIOCtx *ctx, const int);
 long gdTell(gdIOCtx *ctx);
 
+#pragma GCC visibility pop
+
 #endif
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c
--- libwmf-0.2.8.4/src/extra/gd/gd_jpeg.c	2005-07-27 21:35:06.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_jpeg.c	2006-11-16 12:28:13.000000000 +0000
@@ -99,7 +99,7 @@
   return rv;
 }
 
-void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
+static void jpeg_gdIOCtx_dest (j_compress_ptr cinfo, gdIOCtx * outfile);
 
 void
 gdImageJpegCtx (gdImagePtr im, gdIOCtx * outfile, int quality)
@@ -266,7 +266,7 @@
   return im;
 }
 
-void
+static void
   jpeg_gdIOCtx_src (j_decompress_ptr cinfo,
 		    gdIOCtx * infile);
 
@@ -511,7 +511,7 @@
  * before any data is actually read.
  */
 
-void
+static void
 init_source (j_decompress_ptr cinfo)
 {
   my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -559,7 +559,7 @@
 
 #define END_JPEG_SEQUENCE "\r\n[*]--:END JPEG:--[*]\r\n"
 
-safeboolean
+static safeboolean
 fill_input_buffer (j_decompress_ptr cinfo)
 {
   my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -627,7 +627,7 @@
  * buffer is the application writer's problem.
  */
 
-void
+static void
 skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 {
   my_src_ptr src = (my_src_ptr) cinfo->src;
@@ -669,7 +669,7 @@
  * for error exit.
  */
 
-void
+static void
 term_source (j_decompress_ptr cinfo)
 {
   
@@ -742,7 +742,7 @@
  * before any data is actually written.
  */
 
-void
+static void
 init_destination (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -780,7 +780,7 @@
  * write it out when emptying the buffer externally.
  */
 
-safeboolean
+static safeboolean
 empty_output_buffer (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
@@ -805,7 +805,7 @@
  * for error exit.
  */
 
-void
+static void
 term_destination (j_compress_ptr cinfo)
 {
   my_dest_ptr dest = (my_dest_ptr) cinfo->dest;
diff -ru libwmf-0.2.8.4/src/extra/gd/gdkanji.c libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c
--- libwmf-0.2.8.4/src/extra/gd/gdkanji.c	2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdkanji.c	2006-11-16 12:29:42.000000000 +0000
@@ -555,6 +555,11 @@
   return kanji;
 }
 
+#pragma GCC visibility push(hidden)
+int
+any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max);
+#pragma GCC visibility pop
+
 int
 any2eucjp (unsigned char *dest, unsigned char *src, unsigned int dest_max)
 {
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_topal.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c
--- libwmf-0.2.8.4/src/extra/gd/gd_topal.c	2005-07-27 21:35:06.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_topal.c	2006-11-16 12:25:45.000000000 +0000
@@ -1129,7 +1129,7 @@
  * Map some rows of pixels to the output colormapped representation.
  */
 
-void
+static void
 pass2_no_dither (gdImagePtr im, my_cquantize_ptr cquantize)
 /* This version performs no dithering */
 {
@@ -1217,7 +1217,7 @@
 #endif
 
 
-void
+static void
 pass2_fs_dither (gdImagePtr im, my_cquantize_ptr cquantize)
 
 /* This version performs Floyd-Steinberg dithering */
diff -ru libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c
--- libwmf-0.2.8.4/src/extra/gd/gd_wbmp.c	2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gd_wbmp.c	2006-11-16 12:28:33.000000000 +0000
@@ -67,7 +67,7 @@
    ** Wrapper around gdPutC for use with writewbmp
    **
  */
-void
+static void
 gd_putout (int i, void *out)
 {
   gdPutC (i, (gdIOCtx *) out);
@@ -79,7 +79,7 @@
    ** Wrapper around gdGetC for use with readwbmp
    **
  */
-int
+static int
 gd_getin (void *in)
 {
   return (gdGetC ((gdIOCtx *) in));
diff -ru libwmf-0.2.8.4/src/extra/gd/gdxpm.c libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c
--- libwmf-0.2.8.4/src/extra/gd/gdxpm.c	2001-05-19 14:09:34.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/gdxpm.c	2006-11-16 12:18:29.000000000 +0000
@@ -10,6 +10,7 @@
 #include "gd.h"
 #include "gdhelpers.h"
 
+#if 0
 #ifndef HAVE_XPM
 gdImagePtr
 gdImageCreateFromXpm (char *filename)
@@ -146,3 +147,4 @@
   return (im);
 }
 #endif
+#endif
diff -ru libwmf-0.2.8.4/src/extra/gd/jisx0208.h libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h
--- libwmf-0.2.8.4/src/extra/gd/jisx0208.h	2001-03-28 10:37:35.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/jisx0208.h	2006-11-16 12:13:19.000000000 +0000
@@ -1,5 +1,8 @@
 #ifndef JISX0208_H
 #define JISX0208_H
+
+#pragma GCC visibility push(hidden)
+
 /* This file was derived from "src/VF_Ftype.c" in VFlib2-2.24.2
    by Dr. Kakugawa */
 
@@ -1202,4 +1205,6 @@
 0x2170, 0x2171, 0x2172, 0x2173, 0x2174, 0x2175, 0x2176, 0x2177,
 0x2178, 0x2179, 0xFFE2, 0xFFE4, 0xFF07, 0xFF02}};
 
+#pragma GCC visibility pop
+
 #endif /* JISX0208_H */
diff -ru libwmf-0.2.8.4/src/extra/gd/wbmp.h libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h
--- libwmf-0.2.8.4/src/extra/gd/wbmp.h	2001-03-28 10:37:37.000000000 +0100
+++ libwmf-0.2.8.4.symbols/src/extra/gd/wbmp.h	2006-11-16 12:14:19.000000000 +0000
@@ -12,6 +12,8 @@
 #ifndef __WBMP_H
 #define __WBMP_H	1
 
+#pragma GCC visibility push(hidden)
+
 
 /* WBMP struct
 ** -----------
@@ -44,4 +46,6 @@
 void    freewbmp( Wbmp *wbmp );
 void    printwbmp( Wbmp *wbmp );  
 
+#pragma GCC visibility pop
+
 #endif