[GRASS-SVN] r46215 - grass-addons/grass7/raster/r.stream.extract
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon May 9 08:22:47 EDT 2011
Author: neteler
Date: 2011-05-09 05:22:47 -0700 (Mon, 09 May 2011)
New Revision: 46215
Modified:
grass-addons/grass7/raster/r.stream.extract/local_proto.h
grass-addons/grass7/raster/r.stream.extract/main.c
Log:
compilation fix
Modified: grass-addons/grass7/raster/r.stream.extract/local_proto.h
===================================================================
--- grass-addons/grass7/raster/r.stream.extract/local_proto.h 2011-05-09 12:22:33 UTC (rev 46214)
+++ grass-addons/grass7/raster/r.stream.extract/local_proto.h 2011-05-09 12:22:47 UTC (rev 46215)
@@ -27,7 +27,14 @@
DCELL wat;
};
-struct snode
+/* global variables */
+#ifdef MAIN
+# define GLOBAL
+#else
+# define GLOBAL extern
+#endif
+
+GLOBAL struct snode
{
int r, c;
int id;
@@ -37,25 +44,24 @@
int *trib;
} *stream_node;
-/* global variables */
-extern int nrows, ncols;
-extern unsigned int n_search_points, n_points, nxt_avail_pt;
-extern unsigned int heap_size;
-extern unsigned int n_stream_nodes, n_alloc_nodes;
-extern POINT *outlets;
-extern unsigned int n_outlets, n_alloc_outlets;
-extern char drain[3][3];
-extern char sides;
-extern int c_fac;
-extern int ele_scale;
-extern int have_depressions;
+GLOBAL int nrows, ncols;
+GLOBAL unsigned int n_search_points, n_points, nxt_avail_pt;
+GLOBAL unsigned int heap_size;
+GLOBAL unsigned int n_stream_nodes, n_alloc_nodes;
+GLOBAL POINT *outlets;
+GLOBAL unsigned int n_outlets, n_alloc_outlets;
+GLOBAL char drain[3][3];
+GLOBAL char sides;
+GLOBAL int c_fac;
+GLOBAL int ele_scale;
+GLOBAL int have_depressions;
-extern SSEG search_heap;
-extern SSEG astar_pts;
-extern BSEG bitflags;
-extern SSEG watalt;
-extern BSEG asp;
-extern CSEG stream;
+GLOBAL SSEG search_heap;
+GLOBAL SSEG astar_pts;
+GLOBAL BSEG bitflags;
+GLOBAL SSEG watalt;
+GLOBAL BSEG asp;
+GLOBAL CSEG stream;
/* load.c */
int load_maps(int, int);
Modified: grass-addons/grass7/raster/r.stream.extract/main.c
===================================================================
--- grass-addons/grass7/raster/r.stream.extract/main.c 2011-05-09 12:22:33 UTC (rev 46214)
+++ grass-addons/grass7/raster/r.stream.extract/main.c 2011-05-09 12:22:47 UTC (rev 46215)
@@ -19,6 +19,7 @@
#include <math.h>
#include <grass/raster.h>
#include <grass/glocale.h>
+#define MAIN
#include "local_proto.h"
/* global variables */
More information about the grass-commit
mailing list