diff -ur lsdldoom-1.4.4.4.orig1/src/d_deh.c lsdldoom-1.4.4.4/src/d_deh.c --- lsdldoom-1.4.4.4.orig1/src/d_deh.c 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/d_deh.c 2006-04-22 20:08:50.000000000 +0100 @@ -965,7 +965,7 @@ // Prototypes for block processing functions // Pointers to these functions are used as the blocks are encountered. -void deh_procThing(DEHFILE *, FILE*, char *); +static void deh_procThing(DEHFILE *fpin, FILE* fpout, char *line); void deh_procFrame(DEHFILE *, FILE*, char *); void deh_procPointer(DEHFILE *, FILE*, char *); void deh_procSounds(DEHFILE *, FILE*, char *); diff -ur lsdldoom-1.4.4.4.orig1/src/doomtype.h lsdldoom-1.4.4.4/src/doomtype.h --- lsdldoom-1.4.4.4.orig1/src/doomtype.h 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/doomtype.h 2006-04-22 20:08:50.000000000 +0100 @@ -47,6 +47,12 @@ typedef signed long long int_64_t; typedef unsigned long long uint_64_t; +#ifdef __GNUC__ +#define CONSTFUNC __attribute__((const)) +#else +#define CONSTFUNC +#endif + /* CPhipps - use limits.h instead of depreciated values.h */ #include #endif diff -ur lsdldoom-1.4.4.4.orig1/src/drawcol.S lsdldoom-1.4.4.4/src/drawcol.S --- lsdldoom-1.4.4.4.orig1/src/drawcol.S 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/drawcol.S 2006-04-22 20:23:39.000000000 +0100 @@ -41,7 +41,7 @@ .text .align 8 - .globl R_DrawColumn_Normal +// .globl R_DrawColumn_Normal R_DrawColumn_Normal: pushl %ebp @@ -196,7 +196,7 @@ //================ .align 8 - .globl R_DrawTLColumn_Normal +// .globl R_DrawTLColumn_Normal R_DrawTLColumn_Normal: pushl %ebp @@ -386,7 +386,7 @@ ret .align 8 - .globl R_DrawColumn_HighRes +// .globl R_DrawColumn_HighRes R_DrawColumn_HighRes: pushl %ebp @@ -540,7 +540,7 @@ //================ .align 8 - .globl R_DrawTLColumn_HighRes +// .globl R_DrawTLColumn_HighRes R_DrawTLColumn_HighRes: pushl %ebp diff -ur lsdldoom-1.4.4.4.orig1/src/drawspan.S lsdldoom-1.4.4.4/src/drawspan.S --- lsdldoom-1.4.4.4.orig1/src/drawspan.S 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/drawspan.S 2006-04-22 20:23:39.000000000 +0100 @@ -44,7 +44,7 @@ .text .align 8 -.globl R_DrawSpan +//.globl R_DrawSpan R_DrawSpan: pushl %ebp diff -ur lsdldoom-1.4.4.4.orig1/src/m_fixed.h lsdldoom-1.4.4.4/src/m_fixed.h --- lsdldoom-1.4.4.4.orig1/src/m_fixed.h 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/m_fixed.h 2006-04-22 20:16:25.000000000 +0100 @@ -63,7 +63,7 @@ /* killough 5/10/98: In djgpp, use inlined assembly for performance * CPhipps - made __inline__ to inline, as specified in the gcc docs * Also made const */ -inline static const fixed_t FixedMul(fixed_t a, fixed_t b) +inline static CONSTFUNC fixed_t FixedMul(fixed_t a, fixed_t b) { fixed_t result; int dummy; @@ -103,7 +103,7 @@ * killough 9/5/98: optimized to reduce the number of branches * CPhipps - made __inline__ to inline, as specified in the gcc docs * Also made const */ -inline static const fixed_t FixedDiv(fixed_t a, fixed_t b) +inline static CONSTFUNC fixed_t FixedDiv(fixed_t a, fixed_t b) { if (abs(a) >> 14 < abs(b)) { @@ -126,7 +126,7 @@ #else /* I386_ASM */ /* CPhipps - made __inline__ to inline, as specified in the gcc docs * Also made const */ -inline static const fixed_t FixedDiv(fixed_t a, fixed_t b) +inline static CONSTFUNC fixed_t FixedDiv(fixed_t a, fixed_t b) { return (abs(a)>>14) >= abs(b) ? ((a^b)>>31) ^ INT_MAX : (fixed_t)(((int_64_t) a << FRACBITS) / b); @@ -138,7 +138,7 @@ * FixedMod - returns a % b, guaranteeing 0<=a=0) // texture height is a power of 2 -- killough { *dest = tranmap[(*dest<<8)+colormap[source[(frac>>FRACBITS) & heightmask]]]; // phares diff -ur lsdldoom-1.4.4.4.orig1/src/r_main.c lsdldoom-1.4.4.4/src/r_main.c --- lsdldoom-1.4.4.4.orig1/src/r_main.c 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/r_main.c 2006-04-22 20:08:50.000000000 +0100 @@ -116,7 +116,7 @@ // killough 5/2/98: reformatted // -const int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node) +CONSTFUNC int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node) { if (!node->dx) return x <= node->x ? node->dy > 0 : node->dy < 0; @@ -135,7 +135,7 @@ // killough 5/2/98: reformatted -const int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line) +CONSTFUNC int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line) { fixed_t lx = line->v1->x; fixed_t ly = line->v1->y; diff -ur lsdldoom-1.4.4.4.orig1/src/r_main.h lsdldoom-1.4.4.4/src/r_main.h --- lsdldoom-1.4.4.4.orig1/src/r_main.h 2006-04-22 19:54:57.000000000 +0100 +++ lsdldoom-1.4.4.4/src/r_main.h 2006-04-22 20:08:50.000000000 +0100 @@ -108,8 +108,8 @@ // Utility functions. // -const int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node); -const int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line); +CONSTFUNC int R_PointOnSide(fixed_t x, fixed_t y, const node_t *node); +CONSTFUNC int R_PointOnSegSide(fixed_t x, fixed_t y, const seg_t *line); angle_t R_PointToAngle(fixed_t x, fixed_t y); angle_t R_PointToAngle2(fixed_t x1, fixed_t y1, fixed_t x2, fixed_t y2); subsector_t *R_PointInSubsector(fixed_t x, fixed_t y);