From: Eric B. <ebo...@us...> - 2002-04-12 13:45:39
|
Update of /cvsroot/alleg/allegro/include/allegro In directory usw-pr-cvs1:/tmp/cvs-serv18881/include/allegro Modified Files: alcompat.h gfx.h rle.h text.h Log Message: Peter and I made it so that Allegro programs can compile with gcc -ansi -pedantic Index: alcompat.h =================================================================== RCS file: /cvsroot/alleg/allegro/include/allegro/alcompat.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- alcompat.h 24 Jan 2002 01:30:51 -0000 1.3 +++ alcompat.h 12 Apr 2002 13:45:31 -0000 1.4 @@ -26,7 +26,7 @@ #ifndef ALLEGRO_NO_CLEAR_BITMAP_ALIAS #if (defined ALLEGRO_GCC) - static __attribute__((unused)) inline void clear(BITMAP *bmp) + static __attribute__((unused)) __inline__ void clear(BITMAP *bmp) { clear_bitmap(bmp); } @@ -41,7 +41,7 @@ #ifndef ALLEGRO_NO_FIX_ALIASES #if (defined ALLEGRO_GCC) #define AL_ALIAS(DECL, CALL) \ - static __attribute__((unused)) inline DECL \ + static __attribute__((unused)) __inline__ DECL \ { \ return CALL; \ } @@ -52,21 +52,21 @@ return CALL; \ } #endif - AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y)); - AL_ALIAS(fixed fsub(fixed x, fixed y), fixsub(x, y)); - AL_ALIAS(fixed fmul(fixed x, fixed y), fixmul(x, y)); - AL_ALIAS(fixed fdiv(fixed x, fixed y), fixdiv(x, y)); - AL_ALIAS(int fceil(fixed x), fixceil(x)); - AL_ALIAS(int ffloor(fixed x), fixfloor(x)); - AL_ALIAS(fixed fcos(fixed x), fixcos(x)); - AL_ALIAS(fixed fsin(fixed x), fixsin(x)); - AL_ALIAS(fixed ftan(fixed x), fixtan(x)); - AL_ALIAS(fixed facos(fixed x), fixacos(x)); - AL_ALIAS(fixed fasin(fixed x), fixasin(x)); - AL_ALIAS(fixed fatan(fixed x), fixatan(x)); - AL_ALIAS(fixed fatan2(fixed y, fixed x), fixatan2(y, x)); - AL_ALIAS(fixed fsqrt(fixed x), fixsqrt(x)); - AL_ALIAS(fixed fhypot(fixed x, fixed y), fixhypot(x, y)); + AL_ALIAS(fixed fadd(fixed x, fixed y), fixadd(x, y)) + AL_ALIAS(fixed fsub(fixed x, fixed y), fixsub(x, y)) + AL_ALIAS(fixed fmul(fixed x, fixed y), fixmul(x, y)) + AL_ALIAS(fixed fdiv(fixed x, fixed y), fixdiv(x, y)) + AL_ALIAS(int fceil(fixed x), fixceil(x)) + AL_ALIAS(int ffloor(fixed x), fixfloor(x)) + AL_ALIAS(fixed fcos(fixed x), fixcos(x)) + AL_ALIAS(fixed fsin(fixed x), fixsin(x)) + AL_ALIAS(fixed ftan(fixed x), fixtan(x)) + AL_ALIAS(fixed facos(fixed x), fixacos(x)) + AL_ALIAS(fixed fasin(fixed x), fixasin(x)) + AL_ALIAS(fixed fatan(fixed x), fixatan(x)) + AL_ALIAS(fixed fatan2(fixed y, fixed x), fixatan2(y, x)) + AL_ALIAS(fixed fsqrt(fixed x), fixsqrt(x)) + AL_ALIAS(fixed fhypot(fixed x, fixed y), fixhypot(x, y)) #undef AL_ALIAS #endif Index: gfx.h =================================================================== RCS file: /cvsroot/alleg/allegro/include/allegro/gfx.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gfx.h 9 Jan 2002 01:37:25 -0000 1.5 +++ gfx.h 12 Apr 2002 13:45:31 -0000 1.6 @@ -230,7 +230,7 @@ int x_ofs; /* horizontal offset (for sub-bitmaps) */ int y_ofs; /* vertical offset (for sub-bitmaps) */ int seg; /* bitmap segment */ - unsigned char *line[ZERO_SIZE]; + ZERO_SIZE_ARRAY(unsigned char *, line); } BITMAP; Index: rle.h =================================================================== RCS file: /cvsroot/alleg/allegro/include/allegro/rle.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- rle.h 6 Nov 2001 16:06:47 -0000 1.1 +++ rle.h 12 Apr 2002 13:45:31 -0000 1.2 @@ -31,7 +31,7 @@ int w, h; /* width and height in pixels */ int color_depth; /* color depth of the image */ int size; /* size of sprite data in bytes */ - signed char dat[ZERO_SIZE]; + ZERO_SIZE_ARRAY(signed char, dat); } RLE_SPRITE; Index: text.h =================================================================== RCS file: /cvsroot/alleg/allegro/include/allegro/text.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- text.h 14 Nov 2001 05:45:27 -0000 1.3 +++ text.h 12 Apr 2002 13:45:31 -0000 1.4 @@ -30,7 +30,7 @@ typedef struct FONT_GLYPH /* a single monochrome font character */ { short w, h; - unsigned char dat[ZERO_SIZE]; + ZERO_SIZE_ARRAY(unsigned char, dat); } FONT_GLYPH; |