summaryrefslogtreecommitdiff
path: root/Build/source/texk/cjkutils/cjkutils-4.8.3-PATCHES/patch-01-static
blob: f0bfeba60ba9299a9118fca81a7729a088749a9f (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
	Clang does not like non-static inline functions as used here.
	While at it, all local functions are declared static.

	Do not extend #ifdef HAVE_EMTEXDIR...#endif over several sections.

diff -ur cjkutils-4.8.3.orig/hbf2gf/hbf2gf.w cjkutils-4.8.3/hbf2gf/hbf2gf.w
--- cjkutils-4.8.3.orig/hbf2gf/hbf2gf.w	2012-05-07 00:00:00.000000000 +0200
+++ cjkutils-4.8.3/hbf2gf/hbf2gf.w	2012-05-20 14:09:25.143819152 +0200
@@ -427,7 +427,7 @@
 functions |write_pre()|, |write_data()|, and |write_post()| handle this.
 
 @<Prototypes@>=
-void write_file(void);
+static void write_file(void);
 
 
 @
@@ -435,7 +435,7 @@
 the \.{-n} option isn't specified; otherwise only `\.{.gf}' will be appended.
 
 @c
-void write_file(void)
+static void write_file(void)
    {char output_file[FILE_NAME_LENGTH + 1];
 
 
@@ -489,14 +489,14 @@
 @d header " hbf2gf output "
 
 @<Prototypes@>=
-void write_pre(void);
+static void write_pre(void);
 
 
 @
 @s tm int
 
 @c
-void write_pre(void)
+static void write_pre(void)
    {char out_s[40], s[20];
     time_t secs_now;
     struct tm *time_now;
@@ -577,12 +577,12 @@
 
 @
 @<Prototypes@>=
-void write_data(void);
+static void write_data(void);
 
 
 @
 @c
-void write_data(void)
+static void write_data(void)
    {dot_count = 0;
     char_adr_p = char_adr;@#
 
@@ -688,12 +688,12 @@
 \TeX\ defines that 72.27~points are exactly 1~inch.
 
 @<Prototypes@>=
-void write_post(void);
+static void write_post(void);
 
 
 @
 @c
-void write_post(void)
+static void write_post(void)
    {long special_adr;
     long post_adr;@#
 
@@ -832,12 +832,12 @@
 \TeX\ wants the most significant byte first.
 
 @<Prototypes@>=
-void fputl(long, FILE *);
+static void fputl(long, FILE *);
 
 
 @
 @c
-void fputl(long num, FILE *f)
+static void fputl(long num, FILE *f)
    {fputc(num >> 24, f);
     fputc(num >> 16, f);
     fputc(num >> 8, f);
@@ -992,12 +992,12 @@
 
 
 @<Prototypes@>=
-void make_pixel_array(void);
+static void make_pixel_array(void);
 
 
 @
 @c
-void make_pixel_array(void)
+static void make_pixel_array(void)
    {unsigned char *prP;
     unsigned char *temp_prP;
     unsigned char *new_prP;
@@ -1220,6 +1220,7 @@
 glyph).
 
 @<Prototypes@>=
+static
 #ifdef __GNUC__
 __inline__
 #endif
@@ -1228,6 +1229,7 @@
 
 @
 @c
+static
 #ifdef __GNUC__
 __inline__
 #endif
@@ -1270,6 +1272,7 @@
 
 @
 @<Prototypes@>=
+static
 #ifdef __GNUC__
 __inline__
 #endif
@@ -1278,6 +1281,7 @@
 
 @
 @c
+static
 #ifdef __GNUC__
 __inline__
 #endif
@@ -1323,7 +1327,7 @@
 @d NOOP        244         /* not used */
 
 @<Prototypes@>=
-void write_coding(void);
+static void write_coding(void);
 
 
 @
@@ -1331,7 +1335,7 @@
 ``Unreachable code $\ldots$'' or something similar.
 
 @c
-void write_coding(void)
+static void write_coding(void)
    {register int count, skip;
     register unsigned char paint;
     register int x, y;
@@ -1484,12 +1488,12 @@
 single bytes and use the \.{HEADER} command repeatedly.
 
 @<Prototypes@>=
-void write_pl(void);
+static void write_pl(void);
 
 
 @
 @c
-void write_pl(void)
+static void write_pl(void)
    {int i, pos;
     char output_file[FILE_NAME_LENGTH + 1];
     long t, sc;
@@ -1581,12 +1585,12 @@
 of the subfonts back to the original encoding positions.
 
 @<Prototypes@>=
-void write_ovp(void);
+static void write_ovp(void);
 
 
 @
 @c
-void write_ovp(void)
+static void write_ovp(void)
    {int c, i, nmb_subfonts, remainder, count, pos;
     char output_file[FILE_NAME_LENGTH + 1];
     long t, sc;
@@ -1726,12 +1730,12 @@
 
 @
 @<Prototypes@>=
-void write_job(void);
+static void write_job(void);
 
 
 @
 @c
-void write_job(void)
+static void write_job(void)
    {FILE *out;
     int i, j;
     char buffer[FILE_NAME_LENGTH + 1];
@@ -1975,7 +1979,7 @@
 
 @
 @<Prototypes@>=
-void read_config(void);
+static void read_config(void);
 
 
 @
@@ -1983,7 +1987,7 @@
 isn't a HBF font at all.
 
 @c
-void read_config(void)
+static void read_config(void)
    {HBF_BBOX *boxp;
     char *real_config_file;
 
@@ -2306,12 +2310,12 @@
 |Buffer| if existent. |fsearch()| returns~1 on success.
 
 @<Prototypes@>=
-int fsearch(const char *);
+static int fsearch(const char *);
 
 
 @
 @c
-int fsearch(const char *search_string)
+static int fsearch(const char *search_string)
    {char *P, p;
     const char *Q;
     char temp_buffer[STRING_LENGTH + 1];
@@ -2445,12 +2449,12 @@
 message.
 
 @<Prototypes@>=
-void config_error(const char *);
+static void config_error(const char *);
 
 
 @
 @c
-void config_error(const char *message)
+static void config_error(const char *message)
    {fprintf(stderr, "Couldn't find `%s' entry in configuration file\n",
             message);
     exit(1);
@@ -2488,12 +2492,12 @@
 
 @
 @<Prototypes@>=
-const char *TeX_search_version(void);
+static const char *TeX_search_version(void);
 
 
 @
 @c
-const char *TeX_search_version(void)
+static const char *TeX_search_version(void)
    {
 #if defined(HAVE_LIBKPATHSEA)
     return kpathsea_version_string;
@@ -2525,8 +2529,8 @@
 @<Prototypes@>=
 #ifdef HAVE_EMTEXDIR
 extern int setup_list(struct emtex_dir *, char *, const char *, unsigned);
-int dir_setup(struct emtex_dir *, const char *, const char *, unsigned);
-char *file_find(char *, struct emtex_dir *);
+static int dir_setup(struct emtex_dir *, const char *, const char *, unsigned);
+static char *file_find(char *, struct emtex_dir *);
 #endif
 
 
@@ -2536,7 +2540,7 @@
 
 @c
 #ifdef HAVE_EMTEXDIR
-int dir_setup(ed, env, dir, flags)
+static int dir_setup(ed, env, dir, flags)
   struct emtex_dir *ed;
   const char *env;
   const char *dir;
@@ -2558,16 +2562,20 @@
 
     return TRUE;
    }
+#endif
 
 
 @
 @<Global variables@>=
+#ifdef HAVE_EMTEXDIR
 char name_buffer[FILE_NAME_LENGTH + 1];
+#endif
 
 
 @
 @c
-char *file_find(name, list)
+#ifdef HAVE_EMTEXDIR
+static char *file_find(name, list)
   char *name;
   struct emtex_dir *list;
 
@@ -2611,38 +2619,38 @@
 versions, and within \.{HBF2GFINPUTS} for new versions.
 
 @<Prototypes@>=
-char *TeX_search_cfg_file(char *);
-char *TeX_search_hbf_file(char *);
+static char *TeX_search_cfg_file(char *);
+static char *TeX_search_hbf_file(char *);
 
 
 @
 @c
 #if defined(HAVE_LIBKPATHSEA)
-char *TeX_search_cfg_file(char *name)
+static char *TeX_search_cfg_file(char *name)
    {
     return kpse_find_file(name, kpse_program_text_format, TRUE);
    }@#
 
 
-char *TeX_search_hbf_file(char *name)
+static char *TeX_search_hbf_file(char *name)
    {
     return kpse_find_file(name, kpse_miscfonts_format, TRUE);
    }@#
 
 
 #elif defined(HAVE_EMTEXDIR)
-char *TeX_search_cfg_file(char *name)
+static char *TeX_search_cfg_file(char *name)
    {return file_find(name, &cfg_path);
    }@#
 
 
-char *TeX_search_hbf_file(char *name)
+static char *TeX_search_hbf_file(char *name)
    {return file_find(name, &hbf_path);
    }@#
 
 
 #elif defined(HAVE_MIKTEX)
-char *TeX_search_cfg_file(char *name)
+static char *TeX_search_cfg_file(char *name)
    {char result[_MAX_PATH];
 
     if (!miktex_find_input_file("hbf2gf", *name, result))
@@ -2651,7 +2659,7 @@
    }@#
 
 
-char *TeX_search_hbf_file(char *name)
+static char *TeX_search_hbf_file(char *name)
    {char result[_MAX_PATH];
 
 
@@ -2662,12 +2670,12 @@
 
 
 #else
-char *TeX_search_cfg_file(char *name)
+static char *TeX_search_cfg_file(char *name)
    {return name;
    }@#
 
 
-char *TeX_search_hbf_file(char *name)
+static char *TeX_search_hbf_file(char *name)
    {return name;
    }
 #endif