Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37876652
en ru br
ALT Linux repos
S:1.2.7-alt1
5.0: 1.0.12-alt1
4.1: 1.0.7-alt1
4.0: 1.0.7-alt1
3.0: 1.0.7-alt1

Group :: Games/Arcade
RPM: ltris

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: ltris-1.0.19-inlines.patch
Download


Fix warnings like:
tools.h:57:13: warning: inline function 'delay_force_time_out' declared but never defined
 inline void delay_force_time_out( Delay *delay );
             ^
tools.h:54:12: warning: inline function 'delay_timed_out' declared but never defined
 inline int delay_timed_out( Delay *delay, int ms );
            ^
tools.h:51:13: warning: inline function 'delay_reset' declared but never defined
 inline void delay_reset( Delay *delay );
 
Which ends up with this king of errors:
/builddir/build/BUILD/ltris-1.0.19/src/bowl.c:1353: undefined reference to `delay_timed_out'
/builddir/build/BUILD/ltris-1.0.19/src/bowl.c:1311: undefined reference to `delay_force_time_out'
diff -rup ltris-1.0.19.orig/src/sdl.h ltris-1.0.19/src/sdl.h
--- ltris-1.0.19.orig/src/sdl.h	2013-05-03 18:13:11.000000000 +0100
+++ ltris-1.0.19/src/sdl.h	2015-05-11 18:54:37.949653509 +0100
@@ -41,8 +41,8 @@ typedef struct {
 SDL_Surface* load_surf(char *fname, int f);
 SDL_Surface* create_surf(int w, int h, int f);
 void free_surf( SDL_Surface **surf );
-inline void lock_surf(SDL_Surface *sur);
-inline void unlock_surf(SDL_Surface *sur);
+extern void lock_surf(SDL_Surface *sur);
+extern void unlock_surf(SDL_Surface *sur);
 void blit_surf(void);
 void alpha_blit_surf(int alpha);
 void fill_surf(int c);
@@ -86,8 +86,8 @@ Font* load_font(char *fname);
 Font* load_fixed_font(char *fname, int off, int len, int w);
 void free_font(Font **sfnt);
 int  write_text(Font *sfnt, SDL_Surface *dest, int x, int y, char *str, int alpha);
-inline void lock_font(Font *sfnt);
-inline void unlock_font(Font *sfnt);
+extern void lock_font(Font *sfnt);
+extern void unlock_font(Font *sfnt);
 SDL_Rect last_write_rect(Font *fnt);
 int  text_width(Font *fnt, char *str);
 
@@ -132,14 +132,14 @@ Video_Mode* cur_video_mode();
 char** get_mode_names( int *count );
 int  set_video_mode( Video_Mode mode );
 void hardware_cap();
-inline void refresh_screen( int x, int y, int w, int h );
+extern void refresh_screen( int x, int y, int w, int h );
 void refresh_rects();
 void add_refresh_rect(int x, int y, int w, int h);
 int  wait_for_key();
 void wait_for_click();
-inline void lock_screen();
-inline void unlock_screen();
-inline void flip_screen();
+extern void lock_screen();
+extern void unlock_screen();
+extern void flip_screen();
 void fade_screen( int type, int ms );
 void take_screenshot( int i );
 
@@ -148,8 +148,8 @@ void take_screenshot( int i );
 SDL_Cursor* create_cursor( int width, int height, int hot_x, int hot_y, char *source );
 
 /* timer */
-inline int get_time();
-inline void reset_timer();
+extern int get_time();
+extern void reset_timer();
 
 #ifdef __cplusplus
 };
diff -rup ltris-1.0.19.orig/src/tools.h ltris-1.0.19/src/tools.h
--- ltris-1.0.19.orig/src/tools.h	2013-05-03 18:13:11.000000000 +0100
+++ ltris-1.0.19/src/tools.h	2015-05-11 18:48:11.099638130 +0100
@@ -33,7 +33,7 @@
 #define VEC_DIST( vec1, vec2 ) ( sqrt( ( vec1.x - vec2.x ) * ( vec1.x - vec2.x ) + ( vec1.y - vec2.y ) * ( vec1.y - vec2.y ) ) )
 
 /* compares to strings and returns true if their first strlen(str1) chars are equal */
-inline int strequal( char *str1, char *str2 );
+extern int strequal( char *str1, char *str2 );
 
 /* delete lines */
 void delete_lines( char **lines, int line_number );
@@ -45,16 +45,16 @@ typedef struct {
 } Delay;
 
 /* set delay to ms milliseconds */
-inline void delay_set( Delay *delay, int ms );
+extern void delay_set( Delay *delay, int ms );
 
 /* reset delay ( cur = 0 )*/
-inline void delay_reset( Delay *delay );
+extern void delay_reset( Delay *delay );
 
 /* check if time's out ( add ms milliseconds )and reset */
-inline int delay_timed_out( Delay *delay, int ms );
+extern int delay_timed_out( Delay *delay, int ms );
 
 /* set timer so that we have a time out next call of delay_timed_out() */
-inline void delay_force_time_out( Delay *delay );
+extern void delay_force_time_out( Delay *delay );
 
 /* return distance betwteen to map positions */
 int get_dist( int x1, int y1, int x2, int y2 );
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin