summaryrefslogtreecommitdiff
path: root/games-strategy/lgeneral/files/lgeneral-1.4.4-uninline.patch
blob: e81e521857087a9468a45fb1457c169bb0f11c21 (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
There was pathological amount of inlines, some of them caused warnings
and linking failures. All of them are now removed. Modern compilers are
smarter than that.
https://bugs.gentoo.org/876337
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -46,7 +46,7 @@
 #else
 static nls_uint32 SWAP PARAMS ((nls_uint32 i));
 
-static inline nls_uint32
+static nls_uint32
 SWAP (i)
      nls_uint32 i;
 {
--- a/intl/hash-string.h
+++ b/intl/hash-string.h
@@ -35,7 +35,7 @@
    1986, 1987 Bell Telephone Laboratories, Inc.]  */
 static unsigned long hash_string PARAMS ((const char *__str_param));
 
-static inline unsigned long
+static unsigned long
 hash_string (str_param)
      const char *str_param;
 {
--- a/intl/l10nflist.c
+++ b/intl/l10nflist.c
@@ -154,7 +154,7 @@
 /* Return number of bits set in X.  */
 static int pop PARAMS ((int x));
 
-static inline int
+static int
 pop (x)
      int x;
 {
--- a/lgc-pg/misc.c
+++ b/lgc-pg/misc.c
@@ -27,27 +27,27 @@
 extern char *dest_path;
 
 /* compares to strings and returns true if their first strlen(str1) chars are equal */
-inline int equal_str( char *str1, char *str2 )
+int equal_str( char *str1, char *str2 )
 {
     if ( strlen( str1 ) != strlen( str2 ) ) return 0;
     return ( !strncmp( str1, str2, strlen( str1 ) ) );
 }
 
 /* set delay to ms milliseconds */
-inline void set_delay( Delay *delay, int ms )
+void set_delay( Delay *delay, int ms )
 {
     delay->limit = ms;
     delay->cur = 0;
 }
 
 /* reset delay ( cur = 0 )*/
-inline void reset_delay( Delay *delay )
+void reset_delay( Delay *delay )
 {
     delay->cur = 0;
 }
 
 /* check if times out and reset */
-inline int timed_out( Delay *delay, int ms )
+int timed_out( Delay *delay, int ms )
 {
     delay->cur += ms;
     if ( delay->cur >= delay->limit ) {
@@ -60,7 +60,7 @@
 }
 
 
-inline void goto_tile( int *x, int *y, int d )
+void goto_tile( int *x, int *y, int d )
 {
     /*  0 -up, clockwise, 5 - left up */
     switch ( d ) {
--- a/lgc-pg/misc.h
+++ b/lgc-pg/misc.h
@@ -52,13 +52,13 @@
 } Delay;
 
 /* set delay to ms milliseconds */
-inline void set_delay( Delay *delay, int ms );
+void set_delay( Delay *delay, int ms );
 
 /* reset delay ( cur = 0 )*/
-inline void reset_delay( Delay *delay );
+void reset_delay( Delay *delay );
 
 /* check if time's out ( add ms milliseconds )and reset */
-inline int timed_out( Delay *delay, int ms );
+int timed_out( Delay *delay, int ms );
 
 /* return distance betwteen to map positions */
 int get_dist( int x1, int y1, int x2, int y2 );
--- a/lged/lged.c
+++ b/lged/lged.c
@@ -356,7 +356,7 @@
     free((void *)path);
     
     if (within_source_tree)
-      verbosef(2, "Source tree detected. Using inline paths.\n");
+      verbosef(2, "Source tree detected. Using paths.\n");
   }
   
   /* get path for unitdb */
@@ -387,7 +387,7 @@
 }
 
 /** returns 1 if criterion is to be omitted */
-inline static int is_omitted(const char *criterion) {
+static int is_omitted(const char *criterion) {
   return !criterion || strcmp(criterion, "-") == 0 || strcmp(criterion, "*") == 0;
 }
 
@@ -407,7 +407,7 @@
  * of ary. If found, the index of the first element is returned,
  * -1 otherwise. 'i' is the starting index, 'sz' the size of the array.
  */
-inline static int find_in_array(const char *needle, int i, const char **ary, int sz) {
+static int find_in_array(const char *needle, int i, const char **ary, int sz) {
   for (; i < sz; i++)
     if (strcasestr(ary[i], needle)) return i;
   return -1;
@@ -430,7 +430,7 @@
  * returns 1 if 'bitmap' is true at position 'idx'. 'sz' is the size of
  * the bitmap.
  */
-inline static int in_bitmap(int idx, const char *bitmap, int sz) {
+static int in_bitmap(int idx, const char *bitmap, int sz) {
   return idx >= 0 && idx < sz && bitmap[idx];
 }
 
--- a/src/campaign.c
+++ b/src/campaign.c
@@ -135,7 +135,7 @@
 }
 
 /** resolve key within entries and translate the result wrt domain */
-inline static char *camp_resolve_ref_localized(PData *entries, const char *key, const char *scen_stat, const char *domain)
+static char *camp_resolve_ref_localized(PData *entries, const char *key, const char *scen_stat, const char *domain)
 {
     const char *res = camp_resolve_ref(entries, key, scen_stat);
     return res ? strdup(trd(domain, res)) : 0;
--- a/src/engine.c
+++ b/src/engine.c
@@ -375,7 +375,7 @@
 Returns true when the status screen dismission events took place.
 ====================================================================
 */
-inline static int engine_status_screen_dismissed()
+static int engine_status_screen_dismissed()
 {
     int dummy;
     return event_get_buttonup( &dummy, &dummy, &dummy )
--- a/src/gui.c
+++ b/src/gui.c
@@ -1691,7 +1691,7 @@
 }
 
 /** unite with existing repaint rectangle */
-inline static void message_pane_unite_repaint_rect(MessagePane *pane, int x1, int y1, int x2, int y2)
+static void message_pane_unite_repaint_rect(MessagePane *pane, int x1, int y1, int x2, int y2)
 {
     if ((pane->refresh_x2 - pane->refresh_x1) <= 0
         || (pane->refresh_y2 - pane->refresh_y1) <= 0) {
--- a/src/lg-sdl.c
+++ b/src/lg-sdl.c
@@ -35,7 +35,7 @@
 /* sdl surface */
 
 /* return full path of bitmap */
-inline void get_full_bmp_path( char *full_path, const char *file_name )
+void get_full_bmp_path( char *full_path, const char *file_name )
 {
     sprintf(full_path,  "%s/gfx/%s", get_gamedir(), file_name );
 }
@@ -119,7 +119,7 @@
 /*
     lock surface
 */
-inline void lock_surf(SDL_Surface *sur)
+void lock_surf(SDL_Surface *sur)
 {
     if (SDL_MUSTLOCK(sur))
         SDL_LockSurface(sur);
@@ -128,7 +128,7 @@
 /*
     unlock surface
 */
-inline void unlock_surf(SDL_Surface *sur)
+void unlock_surf(SDL_Surface *sur)
 {
     if (SDL_MUSTLOCK(sur))
         SDL_UnlockSurface(sur);
@@ -477,7 +477,7 @@
 /*
     lock font surface
 */
-inline void lock_font(Font *fnt)
+void lock_font(Font *fnt)
 {
     if (SDL_MUSTLOCK(fnt->pic))
         SDL_LockSurface(fnt->pic);
@@ -486,7 +486,7 @@
 /*
     unlock font surface
 */
-inline void unlock_font(Font *fnt)
+void unlock_font(Font *fnt)
 {
     if (SDL_MUSTLOCK(fnt->pic))
         SDL_UnlockSurface(fnt->pic);
@@ -501,7 +501,7 @@
     return rect;
 }
 
-inline int  char_width(Font *fnt, char c)
+int  char_width(Font *fnt, char c)
 {
     unsigned i = (unsigned char)c;
     return fnt->char_offset[i + 1] - fnt->char_offset[i];
@@ -844,7 +844,7 @@
 /*
     lock surface
 */
-inline void lock_screen()
+void lock_screen()
 {
     if (SDL_MUSTLOCK(sdl.screen))
         SDL_LockSurface(sdl.screen);
@@ -853,7 +853,7 @@
 /*
     unlock surface
 */
-inline void unlock_screen()
+void unlock_screen()
 {
     if (SDL_MUSTLOCK(sdl.screen))
         SDL_UnlockSurface(sdl.screen);
@@ -862,7 +862,7 @@
 /*
     flip hardware screens (double buffer)
 */
-inline void flip_screen()
+void flip_screen()
 {
     SDL_Flip(sdl.screen);
 }
--- a/src/lg-sdl.h
+++ b/src/lg-sdl.h
@@ -43,8 +43,8 @@
 SDL_Surface* create_surf(int w, int h, int f);
 void free_surf( SDL_Surface **surf );
 int  disp_format(SDL_Surface *sur);
-inline void lock_surf(SDL_Surface *sur);
-inline void unlock_surf(SDL_Surface *sur);
+void lock_surf(SDL_Surface *sur);
+void unlock_surf(SDL_Surface *sur);
 void blit_surf(void);
 void alpha_blit_surf(int alpha);
 void fill_surf(int c);
@@ -93,8 +93,8 @@
 void free_font(Font **sfnt);
 int  write_text(Font *sfnt, SDL_Surface *dest, int x, int y, const char *str, int alpha);
 void write_line( SDL_Surface *surf, Font *font, const char *str, int x, int *y );
-inline void lock_font(Font *sfnt);
-inline void unlock_font(Font *sfnt);
+void lock_font(Font *sfnt);
+void unlock_font(Font *sfnt);
 SDL_Rect last_write_rect(Font *fnt);
 int  text_width(Font *fnt, const char *str);
 int  char_width(Font *fnt, char c);
@@ -132,9 +132,9 @@
 void undim_screen(int steps, int delay, int trp);
 int  wait_for_key();
 void wait_for_click();
-inline void lock_screen();
-inline void unlock_screen();
-inline void flip_screen();
+void lock_screen();
+void unlock_screen();
+void flip_screen();
 
 /* cursor */
 /* creates cursor */
--- a/src/misc.c
+++ b/src/misc.c
@@ -29,27 +29,27 @@
 extern int map_w, map_h; /* FIX ME! */
 
 /* compares to strings and returns true if their first strlen(str1) chars are equal */
-inline int equal_str( const char *str1, const char *str2 )
+int equal_str( const char *str1, const char *str2 )
 {
     if ( strlen( str1 ) != strlen( str2 ) ) return 0;
     return ( !strncmp( str1, str2, strlen( str1 ) ) );
 }
 
 /* set delay to ms milliseconds */
-inline void set_delay( Delay *delay, int ms )
+void set_delay( Delay *delay, int ms )
 {
     delay->limit = ms;
     delay->cur = 0;
 }
 
 /* reset delay ( cur = 0 )*/
-inline void reset_delay( Delay *delay )
+void reset_delay( Delay *delay )
 {
     delay->cur = 0;
 }
 
 /* check if times out and reset */
-inline int timed_out( Delay *delay, int ms )
+int timed_out( Delay *delay, int ms )
 {
     delay->cur += ms;
     if ( delay->cur >= delay->limit ) {
@@ -62,7 +62,7 @@
 }
 
 /* Convert grid coordinates into isometric (diagonal) coordinates. */
-inline static void convert_coords_to_diag( int *x, int *y )
+static void convert_coords_to_diag( int *x, int *y )
 {
   *y += (*x + 1) / 2;
 }
@@ -126,13 +126,13 @@
 }
 
 /** return 1 if ch is a line breaking character */
-inline static int text_is_linebreak(char ch)
+static int text_is_linebreak(char ch)
 {
     return ch == '#';
 }
 
 /** return 1 if text is breakable just before end */
-inline static int text_is_breakable(const char *begin, const char *end)
+static int text_is_breakable(const char *begin, const char *end)
 {
     return begin != end
             && (end[-1] == '\t' || end[-1] == '\n' || end[-1] == ' '
--- a/src/misc.h
+++ b/src/misc.h
@@ -101,13 +101,13 @@
 } Delay;
 
 /* set delay to ms milliseconds */
-inline void set_delay( Delay *delay, int ms );
+void set_delay( Delay *delay, int ms );
 
 /* reset delay ( cur = 0 )*/
-inline void reset_delay( Delay *delay );
+void reset_delay( Delay *delay );
 
 /* check if time's out ( add ms milliseconds )and reset */
-inline int timed_out( Delay *delay, int ms );
+int timed_out( Delay *delay, int ms );
 
 /* return distance betwteen to map positions */
 int get_dist( int x1, int y1, int x2, int y2 );
--- a/src/parser.c
+++ b/src/parser.c
@@ -51,11 +51,11 @@
     free(ctd->filename);
 }
 
-static inline void common_tree_data_ref(struct CommonTreeData *ctd) {
+static void common_tree_data_ref(struct CommonTreeData *ctd) {
     ctd->ref++;
 }
 
-static inline int common_tree_data_deref(struct CommonTreeData *ctd) {
+static int common_tree_data_deref(struct CommonTreeData *ctd) {
     int del = --ctd->ref == 0;
     if (del) common_tree_data_delete(ctd);
     return del;
@@ -115,7 +115,7 @@
 Returns whether this is a valid character for a string.
 ====================================================================
 */
-inline static int parser_is_valid_string_char(char ch)
+static int parser_is_valid_string_char(char ch)
 {
     switch (ch) {
     case '$': case '/': case '@': case '_': case '.': case ':': case '~':
@@ -272,7 +272,7 @@
 and return the new position.
 ====================================================================
 */
-static inline const char* string_ignore_whitespace( const char *string )
+static const char* string_ignore_whitespace( const char *string )
 {
     while ( *string != 0 && (unsigned char)*string <= 32 ) string++;
     return string;
@@ -286,7 +286,7 @@
 hours of precious sleep.
 ====================================================================
 */
-static inline PData *parser_create_pdata( char *name, List *values, int lineno, struct CommonTreeData *ctd )
+static PData *parser_create_pdata( char *name, List *values, int lineno, struct CommonTreeData *ctd )
 {
     PData *pd = calloc(1, sizeof(PData));
     pd->name = name;
--- a/src/slot.c
+++ b/src/slot.c
@@ -157,7 +157,7 @@
     /* we always write the platform-specific endianness */
     fwrite( &i, sizeof( int ), 1, file );
 }
-static inline int load_int( FILE *file )
+static int load_int( FILE *file )
 {
     return try_load_int( file, 0 );
 }
@@ -186,7 +186,7 @@
 {
     fwrite( &p, sizeof( void * ), 1, file );
 }
-static inline void *load_pointer( FILE *file )
+static void *load_pointer( FILE *file )
 {
     return try_load_pointer( file, 0 );
 }
--- a/util/hashtable_private.h
+++ b/util/hashtable_private.h
@@ -30,13 +30,13 @@
 
 /*****************************************************************************/
 /* indexFor */
-static inline unsigned int
+static unsigned int
 indexFor(unsigned int tablelength, unsigned int hashvalue) {
     return (hashvalue % tablelength);
 };
 
 /* Only works if tablelength == 2^N */
-/*static inline unsigned int
+/*static unsigned int
 indexFor(unsigned int tablelength, unsigned int hashvalue)
 {
     return (hashvalue & (tablelength - 1u));
--- a/util/localize.c
+++ b/util/localize.c
@@ -71,7 +71,7 @@
 }
 
 /** returns the domain-map */
-static inline struct hashtable *domain_map_instance() {
+static struct hashtable *domain_map_instance() {
   if (!domain_map) {
     domain_map = create_hashtable(10, (unsigned int (*) (void*))hash_string,
                               (int (*)(void *, void *))strcmp,
--- a/util/localize.h
+++ b/util/localize.h
@@ -37,7 +37,7 @@
 /** shorthand for fetching translation of default domain */
 #  define tr(s) gettext (s)
 /** shorthand for fetching translation of specified domain */
-inline static const char *trd(const char *dom, const char *s) { return *(s) ? dgettext ((dom), (s)) : ""; }
+static const char *trd(const char *dom, const char *s) { return *(s) ? dgettext ((dom), (s)) : ""; }
 /** shorthand for marking for translation of default domain */
 #  define TR_NOOP(s) (s)