[GRASS-dev] Inline functions in GRASS

According to debugging.txt, GRASS should compile with
CFLAGS='-g -ansi -Wall -D_BSD_SOURCE=1 -D_SVID_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=199506L'
But r.carve would fail to compile because it uses inline functions introduced
in C99 (ISO/IEC 9899:1999).

So - who's wrong - debugging.txt or r.carve?

Maris.

grass-6.1.0RC1/raster/r.carve$ make
gcc -I/home/maris/soft/grass-6.1.0RC1/dist.i686-pc-linux-gnu/include -g -ansi -Wall -D_BSD_SOURCE=1 -D_SVID_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=199506L -I/usr/include -DPACKAGE=\""grassmods"\" -I/home/maris/soft/grass-6.1.0RC1/dist.i686-pc-linux-gnu/include
\
                -o OBJ.i686-pc-linux-gnu/enforce_ds.o -c enforce_ds.c
enforce_ds.c:17: error: syntax error before ‘void’
enforce_ds.c:20: error: syntax error before ‘void’
enforce_ds.c:21: error: syntax error before ‘void’
enforce_ds.c:23: error: syntax error before ‘void’
enforce_ds.c:25: error: syntax error before ‘double’
enforce_ds.c: In function ‘process_line’:
enforce_ds.c:82: warning: unused variable ‘j’
enforce_ds.c: At top level:
enforce_ds.c:194: error: syntax error before ‘void’
enforce_ds.c:204: error: syntax error before ‘void’
enforce_ds.c:230: error: syntax error before ‘void’
enforce_ds.c:258: error: syntax error before ‘void’
enforce_ds.c:288: error: syntax error before ‘double’
make: *** [OBJ.i686-pc-linux-gnu/enforce_ds.o] Error 1

On Thu, 2006-08-03 at 11:19 +0300, Māris Nartišs wrote:

According to debugging.txt, GRASS should compile with
CFLAGS='-g -ansi -Wall -D_BSD_SOURCE=1 -D_SVID_SOURCE=1 -D_POSIX_SOURCE=1 -D_POSIX_C_SOURCE=199506L'
But r.carve would fail to compile because it uses inline functions introduced
in C99 (ISO/IEC 9899:1999).

So - who's wrong - debugging.txt or r.carve?

I'm wrong. I made them inline because they are only called once. I was
using functions to compartmentalize code for readability, etc.

Changes committed.

--
Brad Douglas <rez touchofmadness com> KB8UYR
Address: 37.493,-121.924 / WGS84 National Map Corps #TNMC-3785