[GRASS-SVN] r38136 - in grass/trunk: display/d.title imagery/i.cca imagery/i.gensig imagery/i.his.rgb imagery/i.modis.qc imagery/i.rgb.his imagery/i.smap include lib/raster ps/ps.map raster/r.carve raster/r.cross raster/r.describe raster/r.distance raster/r.flow raster/r.in.gridatb raster/r.in.poly raster/r.info raster/r.kappa raster/r.li/r.li.daemon raster/r.los raster/r.mapcalc raster/r.mfilter raster/r.neighbors raster/r.out.gridatb raster/r.param.scale raster/r.profile raster/r.quant raster/r.random raster/r.random.cells raster/r.random.surface raster/r.reclass raster/r.recode raster/r.report raster/r.ros raster/r.spread raster/r.surf.contour raster/r.surf.idw raster/r.thin raster/r.water.outlet raster/r.watershed/seg raster3d/base swig/include/python vector/lidar/v.lidar.edgedetection vector/v.to.rast

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 1 05:48:49 EDT 2009


Author: martinl
Date: 2009-07-01 05:48:48 -0400 (Wed, 01 Jul 2009)
New Revision: 38136

Added:
   grass/trunk/include/raster.h
   grass/trunk/include/rasterdefs.h
Removed:
   grass/trunk/include/raster.h
Modified:
   grass/trunk/display/d.title/fancy.c
   grass/trunk/display/d.title/local_proto.h
   grass/trunk/imagery/i.cca/local_proto.h
   grass/trunk/imagery/i.gensig/local_proto.h
   grass/trunk/imagery/i.his.rgb/globals.h
   grass/trunk/imagery/i.modis.qc/mod09A1a.c
   grass/trunk/imagery/i.modis.qc/mod09A1c.c
   grass/trunk/imagery/i.modis.qc/mod09A1d.c
   grass/trunk/imagery/i.modis.qc/mod09A1e.c
   grass/trunk/imagery/i.modis.qc/mod09A1sa.c
   grass/trunk/imagery/i.modis.qc/mod09A1sb.c
   grass/trunk/imagery/i.modis.qc/mod09A1sc.c
   grass/trunk/imagery/i.modis.qc/mod09A1sd.c
   grass/trunk/imagery/i.modis.qc/mod09A1se.c
   grass/trunk/imagery/i.modis.qc/mod09A1sf.c
   grass/trunk/imagery/i.modis.qc/mod09A1sg.c
   grass/trunk/imagery/i.modis.qc/mod09A1sh.c
   grass/trunk/imagery/i.modis.qc/mod09A1si.c
   grass/trunk/imagery/i.modis.qc/mod09A1sj.c
   grass/trunk/imagery/i.modis.qc/mod09A1sk.c
   grass/trunk/imagery/i.modis.qc/mod09Q1a.c
   grass/trunk/imagery/i.modis.qc/mod09Q1b.c
   grass/trunk/imagery/i.modis.qc/mod09Q1c.c
   grass/trunk/imagery/i.modis.qc/mod09Q1d.c
   grass/trunk/imagery/i.modis.qc/mod09Q1e.c
   grass/trunk/imagery/i.modis.qc/mod09Q1f.c
   grass/trunk/imagery/i.modis.qc/mod11A2a.c
   grass/trunk/imagery/i.modis.qc/mod11A2b.c
   grass/trunk/imagery/i.modis.qc/mod11A2c.c
   grass/trunk/imagery/i.modis.qc/mod11A2d.c
   grass/trunk/imagery/i.rgb.his/globals.h
   grass/trunk/imagery/i.smap/bouman.h
   grass/trunk/include/G3d.h
   grass/trunk/include/gis.h
   grass/trunk/include/site.h
   grass/trunk/include/stats.h
   grass/trunk/lib/raster/color_init.c
   grass/trunk/lib/raster/color_insrt.c
   grass/trunk/lib/raster/color_invrt.c
   grass/trunk/lib/raster/color_range.c
   grass/trunk/lib/raster/color_rule_get.c
   grass/trunk/lib/raster/color_shift.c
   grass/trunk/lib/raster/history.c
   grass/trunk/lib/raster/interp.c
   grass/trunk/ps/ps.map/local_proto.h
   grass/trunk/ps/ps.map/parse_list.c
   grass/trunk/ps/ps.map/ps_info.h
   grass/trunk/raster/r.carve/enforce.h
   grass/trunk/raster/r.cross/glob.h
   grass/trunk/raster/r.describe/local_proto.h
   grass/trunk/raster/r.describe/tree.c
   grass/trunk/raster/r.distance/defs.h
   grass/trunk/raster/r.distance/distance.c
   grass/trunk/raster/r.distance/edges.c
   grass/trunk/raster/r.distance/report.c
   grass/trunk/raster/r.flow/r.flow.h
   grass/trunk/raster/r.in.gridatb/local_proto.h
   grass/trunk/raster/r.in.poly/getformat.c
   grass/trunk/raster/r.info/local_proto.h
   grass/trunk/raster/r.kappa/kappa.h
   grass/trunk/raster/r.li/r.li.daemon/GenericCell.h
   grass/trunk/raster/r.li/r.li.daemon/daemon.h
   grass/trunk/raster/r.los/delete.c
   grass/trunk/raster/r.los/mark_pts.c
   grass/trunk/raster/r.mapcalc/mapcalc.h
   grass/trunk/raster/r.mapcalc/xrand.c
   grass/trunk/raster/r.mapcalc/xrowcol.c
   grass/trunk/raster/r.mfilter/filter.h
   grass/trunk/raster/r.neighbors/ncb.h
   grass/trunk/raster/r.out.gridatb/local_proto.h
   grass/trunk/raster/r.param.scale/param.h
   grass/trunk/raster/r.profile/local_proto.h
   grass/trunk/raster/r.quant/global.h
   grass/trunk/raster/r.random.cells/ransurf.h
   grass/trunk/raster/r.random.surface/ransurf.h
   grass/trunk/raster/r.random/local_proto.h
   grass/trunk/raster/r.reclass/rule.h
   grass/trunk/raster/r.recode/global.h
   grass/trunk/raster/r.report/global.h
   grass/trunk/raster/r.report/main.c
   grass/trunk/raster/r.report/parse.c
   grass/trunk/raster/r.report/stats.c
   grass/trunk/raster/r.ros/spot_dist.c
   grass/trunk/raster/r.spread/select_linksB.c
   grass/trunk/raster/r.spread/spot.c
   grass/trunk/raster/r.spread/spread.c
   grass/trunk/raster/r.surf.contour/contour.h
   grass/trunk/raster/r.surf.idw/main.h
   grass/trunk/raster/r.thin/local_proto.h
   grass/trunk/raster/r.water.outlet/basin.h
   grass/trunk/raster/r.watershed/seg/cseg.h
   grass/trunk/raster3d/base/mask_functions.h
   grass/trunk/swig/include/python/common.i
   grass/trunk/swig/include/python/utils.i
   grass/trunk/vector/lidar/v.lidar.edgedetection/edgedetection.c
   grass/trunk/vector/v.to.rast/local.h
Log:
rasterlib: prototypes moved to rasterdefs.h
raster related macros and structure moved from gis.h to raster.h
module fixed, grass/raster.h included where missing


Modified: grass/trunk/display/d.title/fancy.c
===================================================================
--- grass/trunk/display/d.title/fancy.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/display/d.title/fancy.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,5 @@
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "options.h"
 
 void fancy(struct Cell_head *window, struct Categories *cats, FILE * fp)

Modified: grass/trunk/display/d.title/local_proto.h
===================================================================
--- grass/trunk/display/d.title/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/display/d.title/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 /* fancy.c */
 void fancy(struct Cell_head *, struct Categories *, FILE *);
 

Modified: grass/trunk/imagery/i.cca/local_proto.h
===================================================================
--- grass/trunk/imagery/i.cca/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.cca/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,8 @@
 #ifndef __LOCAL_PROTO_H__
 #define __LOCAL_PROTO_H__
 
+#include <grass/raster.h>
+
 #define MX 9
 #define MC 50
 

Modified: grass/trunk/imagery/i.gensig/local_proto.h
===================================================================
--- grass/trunk/imagery/i.gensig/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.gensig/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 /* alloc.c */
 double *vector(int, int);
 double **matrix(int, int, int, int);

Modified: grass/trunk/imagery/i.his.rgb/globals.h
===================================================================
--- grass/trunk/imagery/i.his.rgb/globals.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.his.rgb/globals.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,7 @@
 #ifndef __GLOBALS_H__
 #define __GLOBALS_H__
 
+#include <grass/raster.h>
 
 /* closefiles.c */
 int closefiles(char *, char *, char *, int[3], CELL *[3]);

Modified: grass/trunk/imagery/i.modis.qc/mod09A1a.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1a.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1a.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1a(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1c.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1c.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1c.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -13,7 +13,7 @@
  * Class 10-15: Combination of bits unused
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1c(CELL pixel, int bandno) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1d.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1d.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1d.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: Corrected product
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1d(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1e.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1e.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1e.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: Corrected product
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1e(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sa.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sa.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sa.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: not set, assumed clear
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sa(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sb.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sb.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sb.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: no
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sb(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sc.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sc.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sc.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -9,7 +9,7 @@
  * 111 -> class 7: Deep ocean
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sc(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sd.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sd.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sd.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: High
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sd(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1se.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1se.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1se.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: High
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1se(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sf.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sf.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sf.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No cloud
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sf(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sg.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sg.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sg.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No fire
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sg(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sh.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sh.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sh.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sh(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1si.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1si.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1si.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1si(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sj.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sj.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sj.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sj(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09A1sk.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09A1sk.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09A1sk.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: No snow
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09A1sk(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1a.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1a.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1a.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -4,7 +4,7 @@
  * 10 -> class 2: Corrected product NOT produced due to cloud effect -- all bands
  * 11 -> class 3: Corrected product NOT produced due to other reasons -- some or all bands mayb be fill value (Note that a value of [11] overrides a value of [01])
  */  
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09Q1a (CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1b.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1b.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1b.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: Not Set ; Assumed Clear
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09Q1b(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1c.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1c.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1c.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -11,7 +11,7 @@
  * 1111 -> class 9: not processed due to deep ocean or cloud
  * Class 11-15: Combination of bits unused
  */
-#include "grass/gis.h"
+#include <grass/raster.h>
   
 CELL mod09Q1c(CELL pixel, int bandno) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1d.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1d.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1d.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: Corrected product
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09Q1d(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1e.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1e.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1e.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: Corrected product
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09Q1e(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod09Q1f.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod09Q1f.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod09Q1f.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
  * 1 -> class 1: different orbit from 500m
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod09Q1f(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod11A2a.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod11A2a.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod11A2a.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -4,7 +4,7 @@
  * 10 -> class 2: LST not produced due to cloud effects
  * 11 -> class 3: LST not produced primarily due to reasons other than cloud
  */  
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod11A2a (CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod11A2b.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod11A2b.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod11A2b.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: TBD
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod11A2b(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod11A2c.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod11A2c.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod11A2c.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: Average emissivity error > 0.04
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod11A2c(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.modis.qc/mod11A2d.c
===================================================================
--- grass/trunk/imagery/i.modis.qc/mod11A2d.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.modis.qc/mod11A2d.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,7 +5,7 @@
  * 11 -> class 3: Average LST error > 3
  */  
 
-#include "grass/gis.h"
+#include <grass/raster.h>
 
 CELL mod11A2d(CELL pixel) 
 {

Modified: grass/trunk/imagery/i.rgb.his/globals.h
===================================================================
--- grass/trunk/imagery/i.rgb.his/globals.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.rgb.his/globals.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,8 @@
 #ifndef __GLOBALS_H__
 #define __GLOBALS_H__
 
+#include <grass/raster.h>
+
 /* closefiles.c */
 int closefiles(char *, char *, char *, int[3], CELL *[3]);
 

Modified: grass/trunk/imagery/i.smap/bouman.h
===================================================================
--- grass/trunk/imagery/i.smap/bouman.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/imagery/i.smap/bouman.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,6 @@
 #include <math.h>
 #include <string.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 #define LIKELIHOOD float
 

Modified: grass/trunk/include/G3d.h
===================================================================
--- grass/trunk/include/G3d.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/include/G3d.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,8 +1,9 @@
-#include <grass/gis.h>
-
 #ifndef GRASS_G3D_H
 #define GRASS_G3D_H
 
+#include <grass/gis.h>
+#include <grass/raster.h>
+
 #define G3D_TILE_SAME_AS_FILE 2
 
 #define G3D_NO_COMPRESSION 0

Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/include/gis.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -53,21 +53,12 @@
 #define FALSE 0
 #endif
 
-#define MAXEDLINES  50
-#define RECORD_LEN  80
 #define NEWLINE     '\n'
-#define RECLASS_TABLE 1
-#define RECLASS_RULES 2
-#define RECLASS_SCALE 3
 
 #define METERS    1
 #define FEET      2
 #define DEGREES   3
 
-#define CELL_TYPE 0
-#define FCELL_TYPE 1
-#define DCELL_TYPE 2
-
 #define PROJECTION_XY  0
 #define PROJECTION_UTM 1
 #define PROJECTION_SP  2
@@ -217,12 +208,6 @@
 #define DEFAULT_FG_COLOR "black"
 #define DEFAULT_BG_COLOR "white"
 
-/* for G_get_raster_sample(), INTERP_TYPE */
-#define UNKNOWN	  0
-#define NEAREST   1		/* nearest neighbor interpolation  */
-#define BILINEAR  2		/* bilinear interpolation          */
-#define CUBIC     3		/* cubic interpolation             */
-
 /* for raster maps */
 #define GR_FATAL_EXIT    0
 #define GR_FATAL_PRINT   1
@@ -247,15 +232,6 @@
 
 /*=========================== Typedefs/Structures ==========================*/
 
-typedef int CELL;
-typedef double DCELL;
-typedef float FCELL;
-
-typedef int RASTER_MAP_TYPE;
-
-/* for G_get_raster_sample() */
-typedef int INTERP_TYPE;
-
 struct Cell_head
 {
     int format;			/* max number of bytes per cell minus 1         */
@@ -280,271 +256,6 @@
     double bottom;
 };
 
-struct _Color_Value_
-{
-    DCELL value;
-    unsigned char red;
-    unsigned char grn;
-    unsigned char blu;
-};
-
-struct _Color_Rule_
-{
-    struct _Color_Value_ low, high;
-    struct _Color_Rule_ *next;
-    struct _Color_Rule_ *prev;
-};
-
-struct _Color_Info_
-{
-    struct _Color_Rule_ *rules;
-    int n_rules;
-
-    struct
-    {
-	unsigned char *red;
-	unsigned char *grn;
-	unsigned char *blu;
-	unsigned char *set;
-	int nalloc;
-	int active;
-    } lookup;
-
-    struct
-    {
-	DCELL *vals;
-	/* pointers to color rules corresponding to the intervals btwn vals */
-	struct _Color_Rule_ **rules;
-	int nalloc;
-	int active;
-    } fp_lookup;
-
-    DCELL min, max;
-};
-
-struct Colors
-{
-    int version;		/* set by read_colors: -1=old,1=new */
-    DCELL shift;
-    int invert;
-    int is_float;		/* defined on floating point raster data? */
-    int null_set;		/* the colors for null are set? */
-    unsigned char null_red;
-    unsigned char null_grn;
-    unsigned char null_blu;
-    int undef_set;		/* the colors for cells not in range are set? */
-    unsigned char undef_red;
-    unsigned char undef_grn;
-    unsigned char undef_blu;
-    struct _Color_Info_ fixed;
-    struct _Color_Info_ modular;
-    DCELL cmin;
-    DCELL cmax;
-    int organizing;
-};
-
-
-typedef struct
-{
-    unsigned char r, g, b, a;	/* red, green, blue, and alpha */
-} RGBA_Color;
-
-typedef RGBA_Color RGB_Color;
-
-/* RGBA_Color alpha presets */
-#define RGBA_COLOR_OPAQUE     255
-#define RGBA_COLOR_TRANSPARENT  0
-#define RGBA_COLOR_NONE         0
-
-
-struct Reclass
-{
-    char *name;			/* name of raster map being reclassed    */
-    char *mapset;		/* mapset in which "name" is found      */
-    int type;			/* type of reclass                      */
-    int num;			/* size of reclass table                */
-    CELL min;			/* table min                            */
-    CELL max;			/* table max                            */
-    CELL *table;		/* reclass table                        */
-};
-
-struct FPReclass_table
-{
-    DCELL dLow;			/* domain low */
-    DCELL dHigh;		/* domain high */
-    DCELL rLow;			/* range low */
-    DCELL rHigh;		/* range high */
-};
-
-/* reclass structure from double to double used by r.recode to reclass */
-/* between types: int to double, float to int,... */
-struct FPReclass
-{
-    int defaultDRuleSet;	/* 1 if default domain rule set */
-    int defaultRRuleSet;	/* 1 if default range rule set */
-    int infiniteLeftSet;	/* 1 if negative infinite interval rule exists */
-    int infiniteRightSet;	/* 1 if positive infinite interval rule exists */
-    int rRangeSet;		/* 1 if range range (i.e. interval) is set */
-    int maxNofRules;
-    int nofRules;
-    DCELL defaultDMin;		/* default domain minimum value */
-    DCELL defaultDMax;		/* default domain maximum value */
-    DCELL defaultRMin;		/* default range minimum value */
-    DCELL defaultRMax;		/* default range maximum value */
-    DCELL infiniteDLeft;	/* neg infinite rule */
-    DCELL infiniteDRight;	/* neg infinite rule */
-    DCELL infiniteRLeft;	/* pos infinite rule */
-    DCELL infiniteRRight;	/* pos infinite rule */
-    DCELL dMin;			/* minimum domain values in rules */
-    DCELL dMax;			/* maximum domain values in rules */
-    DCELL rMin;			/* minimum range values in rules */
-    DCELL rMax;			/* maximum range values in rules */
-    struct FPReclass_table *table;
-};
-
-struct Quant_table
-{
-    DCELL dLow;
-    DCELL dHigh;
-    CELL cLow;
-    CELL cHigh;
-};
-
-struct Quant
-{
-    int truncate_only;
-    int round_only;
-    int defaultDRuleSet;
-    int defaultCRuleSet;
-    int infiniteLeftSet;
-    int infiniteRightSet;
-    int cRangeSet;
-    int maxNofRules;
-    int nofRules;
-    DCELL defaultDMin;
-    DCELL defaultDMax;
-    CELL defaultCMin;
-    CELL defaultCMax;
-    DCELL infiniteDLeft;
-    DCELL infiniteDRight;
-    CELL infiniteCLeft;
-    CELL infiniteCRight;
-    DCELL dMin;
-    DCELL dMax;
-    CELL cMin;
-    CELL cMax;
-    struct Quant_table *table;
-
-    struct
-    {
-	DCELL *vals;
-
-	/* pointers to quant rules corresponding to the intervals btwn vals */
-	struct Quant_table **rules;
-	int nalloc;
-	int active;
-	DCELL inf_dmin;
-	DCELL inf_dmax;
-	CELL inf_min;
-	CELL inf_max;
-	/* all values smaller than inf_dmin become inf_min */
-	/* all values larger than inf_dmax become inf_max */
-	/* inf_min and/or inf_max can be NULL if there are no inf rules */
-    } fp_lookup;
-};
-
-struct Categories
-{
-    CELL ncats;			/* total number of categories              */
-    CELL num;			/* the highest cell values. Only exists    
-				   for backwards compatibility = (CELL)
-				   max_fp_values in quant rules          */
-    char *title;		/* name of data layer                      */
-    char *fmt;			/* printf-like format to generate labels   */
-    float m1;			/* Multiplication coefficient 1            */
-    float a1;			/* Addition coefficient 1                  */
-    float m2;			/* Multiplication coefficient 2            */
-    float a2;			/* Addition coefficient 2                  */
-    struct Quant q;		/* rules mapping cell values to index in
-				   list of labels                        */
-    char **labels;		/* array of labels of size num             */
-    int *marks;			/* was the value with this label was used? */
-    int nalloc;
-    int last_marked_rule;
-    /* NOTE: to get a rule corresponfing to cats.labels[i], use */
-    /* G_get_ith_c/f/d_raster_cat (pcats, i, val1, val2) */
-    /* it calls */
-    /* G_quant_get_ith_rule(&cats->q, i, val1, val2, &index, &index); */
-    /* and idex ==i, because rule is added at the same time as a */
-    /* label, and quant rules are never reordered. Olga apr,95 */
-};
-
-struct History
-{
-    char mapid[RECORD_LEN];
-    char title[RECORD_LEN];
-    char mapset[RECORD_LEN];
-    char creator[RECORD_LEN];
-    char maptype[RECORD_LEN];
-    char datsrc_1[RECORD_LEN];
-    char datsrc_2[RECORD_LEN];
-    char keywrd[RECORD_LEN];
-    int edlinecnt;
-    char edhist[MAXEDLINES][RECORD_LEN];
-};
-
-struct Cell_stats
-{
-    struct Cell_stats_node
-    {
-	int idx;
-	long *count;
-	int left;
-	int right;
-    } *node;			/* tree of values */
-
-    int tlen;			/* allocated tree size */
-    int N;			/* number of actual nodes in tree */
-    int curp;
-    long null_data_count;
-    int curoffset;
-};
-
-struct Histogram
-{
-    int num;
-
-    struct Histogram_list
-    {
-	CELL cat;
-	long count;
-    } *list;
-};
-
-struct Range
-{
-    CELL min;
-    CELL max;
-    int first_time;		/* whether or not range was updated */
-};
-
-struct FPRange
-{
-    DCELL min;
-    DCELL max;
-    int first_time;		/* whether or not range was updated */
-};
-
-struct FP_stats {
-    int geometric;
-    int geom_abs;
-    int flip;
-    int count;
-    DCELL min, max;
-    unsigned long *stats;
-    unsigned long total;
-};
-
 /*
  ** Structure for I/O of 3dview files  (view.c)
  */
@@ -637,8 +348,6 @@
     int count;
 };
 
-struct GDAL_link;
-
 struct Counter {
     int value;
 };

Deleted: grass/trunk/include/raster.h
===================================================================
--- grass/trunk/include/raster.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/include/raster.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,512 +0,0 @@
-#ifndef GRASS_RAST_H
-#define GRASS_RAST_H
-#include <grass/gis.h>
-
-/* --- ANSI prototypes for the lib/raster functions --- */
-
-/* alloc_cell.c */
-size_t Rast_cell_size(RASTER_MAP_TYPE);
-void *Rast_allocate_buf(RASTER_MAP_TYPE);
-CELL *Rast_allocate_c_buf(void);
-FCELL *Rast_allocate_f_buf(void);
-DCELL *Rast_allocate_d_buf(void);
-char *Rast_allocate_null_buf(void);
-unsigned char *Rast__allocate_null_bits(int);
-int Rast__null_bitstream_size(int);
-
-/* auto_mask.c */
-int Rast__check_for_auto_masking(void);
-void Rast_suppress_masking(void);
-void Rast_unsuppress_masking(void);
-
-/* cats.c */
-int Rast_read_cats(const char *, const char *, struct Categories *);
-int Rast_read_vector_cats(const char *, const char *, struct Categories *);
-CELL Rast_get_max_c_cat(const char *, const char *);
-char *Rast_get_cats_title(const struct Categories *);
-char *Rast_get_c_cat(CELL *, struct Categories *);
-char *Rast_get_f_cat(FCELL *, struct Categories *);
-char *Rast_get_d_cat(DCELL *, struct Categories *);
-char *Rast_get_cat(void *, struct Categories *, RASTER_MAP_TYPE);
-void Rast_unmark_cats(struct Categories *);
-void Rast_mark_c_cats(const CELL *, int, struct Categories *);
-void Rast_mark_f_cats(const FCELL *, int, struct Categories *);
-void Rast_mark_d_cats(const DCELL *, int, struct Categories *);
-int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE);
-void Rast_rewind_cats(struct Categories *);
-char *Rast_get_next_marked_d_cat(struct Categories *, DCELL *, DCELL *,
-				 long *);
-char *Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *,
-				 long *);
-char *Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *,
-				     long *);
-char *Rast_get_next_marked_cat(struct Categories *, void *, void *,
-			       long *, RASTER_MAP_TYPE);
-int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *);
-int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *);
-int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *);
-int Rast_set_cat(const void *, const void *, const char *, struct Categories *,
-		 RASTER_MAP_TYPE);
-int Rast_write_cats(const char *, struct Categories *);
-int Rast_write_vector_cats(const char *, struct Categories *);
-char *Rast_get_ith_d_cat(const struct Categories *, int, DCELL *,
-			 DCELL *);
-char *Rast_get_ith_f_cat(const struct Categories *, int, void *, void *);
-char *Rast_get_ith_c_cat(const struct Categories *, int, void *, void *);
-char *Rast_get_ith_cat(const struct Categories *, int, void *, void *,
-		       RASTER_MAP_TYPE);
-void Rast_init_cats(const char *, struct Categories *);
-void Rast_set_cats_title(const char *, struct Categories *);
-void Rast_set_cats_fmt(const char *, double, double, double, double,
-			   struct Categories *);
-void Rast_free_cats(struct Categories *);
-void Rast_copy_cats(struct Categories *, const struct Categories *);
-int Rast_number_of_cats(struct Categories *);
-int Rast_sort_cats(struct Categories *);
-
-/* cell_stats.c */
-void Rast_init_cell_stats(struct Cell_stats *);
-int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *);
-int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *);
-int Rast_rewind_cell_stats(struct Cell_stats *);
-int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *);
-void Rast_get_stats_for_null_value(long *, const struct Cell_stats *);
-void Rast_free_cell_stats(struct Cell_stats *);
-
-/* cell_title.c */
-char *Rast_get_cell_title(const char *, const char *);
-
-/* cellstats_eq.c */
-int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
-			  void (*)(CELL, CELL, CELL));
-
-/* closecell.c */
-int Rast_close(int);
-int Rast_unopen(int);
-
-/* color_compat.c */
-void Rast_make_ryg_colors(struct Colors *, CELL, CELL);
-void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_aspect_colors(struct Colors *, CELL, CELL);
-void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_byr_colors(struct Colors *, CELL, CELL);
-void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_bgyr_colors(struct Colors *, CELL, CELL);
-void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_byg_colors(struct Colors *, CELL, CELL);
-void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL);
-void Rast_make_grey_scale_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_gyr_colors(struct Colors *, CELL, CELL);
-void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_rainbow_colors(struct Colors *, CELL, CELL);
-void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_ramp_colors(struct Colors *, CELL, CELL);
-void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
-void Rast_make_wave_colors(struct Colors *, CELL, CELL);
-void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
-
-/* color_free.c */
-void Rast_free_colors(struct Colors *);
-void Rast__color_free_rules(struct _Color_Info_ *);
-void Rast__color_free_lookup(struct _Color_Info_ *);
-void Rast__color_free_fp_lookup(struct _Color_Info_ *);
-void Rast__color_reset(struct Colors *);
-
-/* color_get.c */
-int Rast_get_color(const void *, int *, int *, int *, struct Colors *,
-		   RASTER_MAP_TYPE);
-int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *);
-int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *);
-int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *);
-void Rast_get_null_value_color(int *, int *, int *, const struct Colors *);
-void Rast_get_default_color(int *, int *, int *, const struct Colors *);
-
-/* color_hist.c */
-void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
-void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int);
-
-/* color_init.c */
-void Rast_init_colors(struct Colors *);
-
-/* color_insrt.c */
-int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
-
-/* color_invrt.c */
-int Rast_invert_colors(struct Colors *);
-
-/* color_look.c */
-void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *,
-			  unsigned char *, unsigned char *, int,
-			  struct Colors *);
-void Rast_lookup_colors(const void *, unsigned char *, unsigned char *,
-			unsigned char *, unsigned char *, int,
-			struct Colors *, RASTER_MAP_TYPE);
-void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *,
-			  unsigned char *, unsigned char *, int,
-			  struct Colors *);
-void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *,
-			  unsigned char *, unsigned char *, int,
-			  struct Colors *);
-void Rast__lookup_colors(const void *, unsigned char *, unsigned char *,
-			 unsigned char *, unsigned char *, int, struct Colors *,
-			 int, int, RASTER_MAP_TYPE);
-void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
-				  unsigned char *, const struct _Color_Rule_ *);
-
-/* color_org.c */
-void Rast__organize_colors(struct Colors *);
-
-/* color_rand.c */
-void Rast_make_random_colors(struct Colors *, CELL, CELL);
-
-/* color_range.c */
-void Rast_set_c_color_range(CELL, CELL, struct Colors *);
-void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
-void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
-void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
-
-/* color_read.c */
-int Rast_read_colors(const char *, const char *, struct Colors *);
-void Rast_mark_colors_as_fp(struct Colors *);
-
-/* color_remove.c */
-int Rast_remove_colors(const char *, const char *);
-
-/* color_rule.c */
-void Rast_add_d_color_rule(const DCELL *, int, int, int,
-			   const DCELL *, int, int, int,
-			   struct Colors *);
-void Rast_add_f_color_rule(const FCELL *, int, int, int,
-			   const FCELL *, int, int, int,
-			   struct Colors *);
-void Rast_add_c_color_rule(const CELL *, int, int, int,
-			   const CELL *, int, int, int,
-			   struct Colors *);
-void Rast_add_color_rule(const void *, int, int, int,
-			 const void *, int, int, int,
-			 struct Colors *, RASTER_MAP_TYPE);
-int Rast_add_modular_d_color_rule(const DCELL *, int, int, int,
-				  const DCELL *, int, int, int,
-				  struct Colors *);
-int Rast_add_modular_f_color_rule(const FCELL *, int, int, int,
-				  const FCELL *, int, int, int,
-				  struct Colors *);
-int Rast_add_modular_c_color_rule(const CELL *, int, int, int,
-				  const CELL *, int, int, int,
-				  struct Colors *);
-int Rast_add_modular_color_rule(const void *, int, int, int,
-				const void *, int, int, int,
-				struct Colors *, RASTER_MAP_TYPE);
-
-/* color_rule_get.c */
-int Rast_colors_count(const struct Colors *);
-int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
-		       unsigned char *, DCELL *, unsigned char *,
-		       unsigned char *, unsigned char *,
-		       const struct Colors *, int);
-
-/* color_rules.c */
-typedef int read_rule_fn(void *, DCELL, DCELL,
-			 DCELL *, int *, int *, int *, int *, int *, int *);
-int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
-		       int *, int *, int *, int *);
-const char *Rast_parse_color_rule_error(int);
-int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
-		      int *, int *, int *);
-int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
-int Rast_load_colors(struct Colors *, const char *, CELL, CELL);
-int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
-void Rast_make_colors(struct Colors *, const char *, CELL, CELL);
-void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
-
-/* color_set.c */
-void Rast_set_c_color(CELL, int, int, int, struct Colors *);
-void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
-void Rast_set_null_value_color(int, int, int, struct Colors *);
-void Rast_set_default_color(int, int, int, struct Colors *);
-
-/* color_shift.c */
-void Rast_shift_c_colors(CELL, struct Colors *);
-void Rast_shift_d_colors(DCELL, struct Colors *);
-
-/* color_write.c */
-int Rast_write_colors(const char *, const char *, struct Colors *);
-void Rast__write_colors(FILE *, struct Colors *);
-
-/* color_xform.c */
-void Rast_histogram_eq_colors(struct Colors *, struct Colors *,
-			   struct Cell_stats *);
-void Rast_histogram_eq_fp_colors(struct Colors *,
-			      struct Colors *, struct FP_stats *);
-void Rast_log_colors(struct Colors *, struct Colors *, int);
-void Rast_abs_log_colors(struct Colors *, struct Colors *, int);
-
-/* format.c */
-int Rast__check_format(int);
-int Rast__read_row_ptrs(int);
-int Rast__write_row_ptrs(int);
-
-/* fpreclass.c */
-void Rast_fpreclass_clear(struct FPReclass *);
-void Rast_fpreclass_reset(struct FPReclass *);
-void Rast_fpreclass_init(struct FPReclass *);
-void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
-void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
-int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
-			   DCELL *, DCELL *);
-int Rast_fpreclass_nof_rules(const struct FPReclass *);
-void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
-			      DCELL *, DCELL *);
-void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
-int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
-				      DCELL *);
-void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
-int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
-				      DCELL *);
-void Rast_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
-void Rast_fpreclass_reverse_rule_order(struct FPReclass *);
-DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
-void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
-			    int);
-void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
-			    int);
-void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
-			    int);
-void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
-			    int);
-void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
-			    int);
-void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
-			    int);
-void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
-			    int);
-void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
-			    int);
-void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
-			    int);
-/* gdal.c */
-void Rast_init_gdal(void);
-struct GDAL_link *Rast_get_gdal_link(const char *, const char *);
-struct GDAL_link *Rast_create_gdal_link(const char *, RASTER_MAP_TYPE);
-void Rast_close_gdal_link(struct GDAL_link *);
-int Rast_close_gdal_write_link(struct GDAL_link *);
-
-/* get_cellhd.c */
-int Rast_get_cellhd(const char *, const char *, struct Cell_head *);
-
-/* get_row.c */
-int Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
-int Rast_get_c_row_nomask(int, CELL *, int);
-int Rast_get_f_row_nomask(int, FCELL *, int);
-int Rast_get_d_row_nomask(int, DCELL *, int);
-int Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
-int Rast_get_c_row(int, CELL *, int);
-int Rast_get_f_row(int, FCELL *, int);
-int Rast_get_d_row(int, DCELL *, int);
-int Rast_get_null_value_row(int, char *, int);
-
-/* get_row_colr.c */
-int Rast_get_row_colors(int, int, struct Colors *,
-			    unsigned char *, unsigned char *, unsigned char *,
-			    unsigned char *);
-/* histo_eq.c */
-void Rast_histogram_eq(const struct Histogram *, unsigned char **,
-		    CELL *, CELL *);
-
-/* histogram.c */
-void Rast_init_histogram(struct Histogram *);
-int Rast_read_histogram(const char *, const char *, struct Histogram *);
-int Rast_write_histogram(const char *, const struct Histogram *);
-int Rast_write_histogram_cs(const char *, struct Cell_stats *);
-void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *);
-int Rast_get_histogram_num(const struct Histogram *);
-CELL Rast_get_histogram_cat(int, const struct Histogram *);
-long Rast_get_histogram_count(int, const struct Histogram *);
-void Rast_free_histogram(struct Histogram *);
-int Rast_sort_histogram(struct Histogram *);
-int Rast_sort_histogram_by_count(struct Histogram *);
-void Rast_remove_histogram(const char *);
-int Rast_add_histogram(CELL, long, struct Histogram *);
-int Rast_set_histogram(CELL, long, struct Histogram *);
-void Rast_extend_histogram(CELL, long, struct Histogram *);
-void Rast_zero_histogram(struct Histogram *);
-
-/* history.c */
-int Rast_read_history(const char *, const char *, struct History *);
-int Rast_write_history(const char *, struct History *);
-void Rast_short_history(const char *, const char *, struct History *);
-int Rast_command_history(struct History *);
-
-/* init.c */
-void Rast__init(void);
-void Rast__check_init(void);
-void Rast_init_all(void);
-
-/* interp.c */
-DCELL Rast_interp_linear(double, DCELL, DCELL);
-DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
-DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
-DCELL Rast_interp_bicubic(double, double,
-		       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
-		       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
-		       DCELL);
-
-/* mask_info.c */
-char *Rast_mask_info(void);
-int Rast__mask_info(char *, char *);
-
-/* maskfd.c */
-int Rast_maskfd(void);
-
-/* null_val.c */
-void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE);
-void Rast_set_null_value(void *, int, RASTER_MAP_TYPE);
-void Rast_set_c_null_value(CELL *, int);
-void Rast_set_f_null_value(FCELL *, int);
-void Rast_set_d_null_value(DCELL *, int);
-int Rast_is_null_value(const void *, RASTER_MAP_TYPE);
-int Rast_is_c_null_value(const CELL *);
-int Rast_is_f_null_value(const FCELL *);
-int Rast_is_d_null_value(const DCELL *);
-void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
-void Rast_insert_c_null_values(CELL *, char *, int);
-void Rast_insert_f_null_values(FCELL *, char *, int);
-void Rast_insert_d_null_values(DCELL *, char *, int);
-int Rast__check_null_bit(const unsigned char *, int, int);
-void Rast__convert_01_flags(const char *, unsigned char *, int);
-void Rast__convert_flags_01(char *, const unsigned char *, int);
-void Rast__init_null_bits(unsigned char *, int);
-
-/* opencell.c */
-int Rast_open_old(const char *, const char *);
-int Rast__open_old(const char *, const char *);
-int Rast_open_c_new(const char *);
-int Rast_open_c_new_uncompressed(const char *);
-void Rast_want_histogram(int);
-void Rast_set_cell_format(int);
-int Rast_get_cell_format(CELL);
-int Rast_open_fp_new(const char *);
-int Rast_open_fp_new_uncompressed(const char *);
-int Rast_set_fp_type(RASTER_MAP_TYPE);
-int Rast_map_is_fp(const char *, const char *);
-RASTER_MAP_TYPE Rast_map_type(const char *, const char *);
-RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
-RASTER_MAP_TYPE Rast_get_map_type(int);
-int Rast_open_new(const char *, RASTER_MAP_TYPE);
-int Rast_open_new_uncompressed(const char *, RASTER_MAP_TYPE);
-int Rast_set_quant_rules(int, struct Quant *);
-
-/* put_cellhd.c */
-int Rast_put_cellhd(const char *, struct Cell_head *);
-
-/* put_row.c */
-int Rast_put_row(int, const void *, RASTER_MAP_TYPE);
-int Rast_put_c_row(int, const CELL *);
-int Rast_put_f_row(int, const FCELL *);
-int Rast_put_d_row(int, const DCELL *);
-int Rast__open_null_write(int);
-int Rast__write_null_bits(int, const unsigned char *, int, int, int);
-
-/* put_title.c */
-int Rast_put_cell_title(const char *, const char *);
-
-/* quant.c */
-void Rast_quant_clear(struct Quant *);
-void Rast_quant_free(struct Quant *);
-int Rast__quant_organize_fp_lookup(struct Quant *);
-void Rast_quant_init(struct Quant *);
-int Rast_quant_is_truncate(const struct Quant *);
-int Rast_quant_is_round(const struct Quant *);
-void Rast_quant_truncate(struct Quant *);
-void Rast_quant_round(struct Quant *);
-int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
-		       CELL *);
-int Rast_quant_nof_rules(const struct Quant *);
-void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
-			  CELL *);
-void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
-int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
-void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
-int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
-void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
-void Rast_quant_reverse_rule_order(struct Quant *);
-CELL Rast_quant_get_cell_value(struct Quant *, DCELL);
-void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
-void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
-struct Quant_table *Rast__quant_get_rule_for_d_raster_val(const struct Quant *,
-						       DCELL);
-
-/* quant_io.c */
-int Rast__quant_import(const char *, const char *, struct Quant *);
-int Rast__quant_export(const char *, const char *, const struct Quant *);
-
-/* quant_rw.c */
-int Rast_truncate_fp_map(const char *, const char *);
-int Rast_round_fp_map(const char *, const char *);
-int Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
-int Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
-			    CELL);
-int Rast_write_quant(const char *, const char *, const struct Quant *);
-int Rast_read_quant(const char *, const char *, struct Quant *);
-
-/* range.c */
-void Rast__remove_fp_range(const char *);
-void Rast_construct_default_range(struct Range *);
-int Rast_read_fp_range(const char *, const char *, struct FPRange *);
-int Rast_read_range(const char *, const char *, struct Range *);
-int Rast_write_range(const char *, const struct Range *);
-int Rast_write_fp_range(const char *, const struct FPRange *);
-void Rast_update_range(CELL, struct Range *);
-void Rast_update_fp_range(DCELL, struct FPRange *);
-void Rast_row_update_range(const CELL *, int, struct Range *);
-void Rast__row_update_range(const CELL *, int, struct Range *, int);
-void Rast_row_update_fp_range(const void *, int, struct FPRange *,
-			  RASTER_MAP_TYPE);
-void Rast_init_range(struct Range *);
-void Rast_get_range_min_max(const struct Range *, CELL *, CELL *);
-void Rast_init_fp_range(struct FPRange *);
-void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
-
-/* raster.c */
-int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
-void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
-void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE);
-void Rast_set_f_value(void *, FCELL, RASTER_MAP_TYPE);
-void Rast_set_d_value(void *, DCELL, RASTER_MAP_TYPE);
-CELL Rast_get_c_value(const void *, RASTER_MAP_TYPE);
-FCELL Rast_get_f_value(const void *, RASTER_MAP_TYPE);
-DCELL Rast_get_d_value(const void *, RASTER_MAP_TYPE);
-
-/* raster_metadata.c */
-int Rast_read_units(const char *, const char *, char *);
-int Rast_read_vdatum(const char *, const char *, char *);
-int Rast_write_units(const char *, const char *);
-int Rast_write_vdatum(const char *, const char *);
-
-/* reclass.c */
-int Rast_is_reclass(const char *, const char *, char *, char *);
-int Rast_is_reclassed_to(const char *, const char *, int *, char ***);
-int Rast_get_reclass(const char *, const char *, struct Reclass *);
-void Rast_free_reclass(struct Reclass *);
-int Rast_put_reclass(const char *, const struct Reclass *);
-
-/* sample.c */
-DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int);
-DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int);
-DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int);
-DCELL Rast_get_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE);
-
-/* set_window.c */
-int Rast_set_window(struct Cell_head *);
-
-/* window_map.c */
-void Rast__init_window(void);
-void Rast__create_window_mapping(int);
-int Rast_row_repeat_nomask(int, int);
-
-/* zero_cell.c */
-void Rast_zero_c_buf(CELL *);
-void Rast_zero_buf(void *, RASTER_MAP_TYPE);
-
-#endif

Added: grass/trunk/include/raster.h
===================================================================
--- grass/trunk/include/raster.h	                        (rev 0)
+++ grass/trunk/include/raster.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -0,0 +1,301 @@
+#ifndef GRASS_RASTER_H
+#define GRASS_RASTER_H
+
+/*** defines ***/
+#define RECLASS_TABLE 1
+#define RECLASS_RULES 2
+#define RECLASS_SCALE 3
+
+#define CELL_TYPE 0
+#define FCELL_TYPE 1
+#define DCELL_TYPE 2
+
+#define RECORD_LEN  80
+
+/* for G_get_raster_sample(), INTERP_TYPE */
+#define UNKNOWN	  0
+#define NEAREST   1		/* nearest neighbor interpolation  */
+#define BILINEAR  2		/* bilinear interpolation          */
+#define CUBIC     3		/* cubic interpolation             */
+
+/*** typedefs ***/
+typedef int CELL;
+typedef double DCELL;
+typedef float FCELL;
+
+typedef int RASTER_MAP_TYPE;
+
+/* for G_get_raster_sample() */
+typedef int INTERP_TYPE;
+
+/*** structures ***/
+struct Reclass
+{
+    char *name;			/* name of raster map being reclassed    */
+    char *mapset;		/* mapset in which "name" is found      */
+    int type;			/* type of reclass                      */
+    int num;			/* size of reclass table                */
+    CELL min;			/* table min                            */
+    CELL max;			/* table max                            */
+    CELL *table;		/* reclass table                        */
+};
+
+struct FPReclass_table
+{
+    DCELL dLow;			/* domain low */
+    DCELL dHigh;		/* domain high */
+    DCELL rLow;			/* range low */
+    DCELL rHigh;		/* range high */
+};
+
+/* reclass structure from double to double used by r.recode to reclass */
+/* between types: int to double, float to int,... */
+struct FPReclass
+{
+    int defaultDRuleSet;	/* 1 if default domain rule set */
+    int defaultRRuleSet;	/* 1 if default range rule set */
+    int infiniteLeftSet;	/* 1 if negative infinite interval rule exists */
+    int infiniteRightSet;	/* 1 if positive infinite interval rule exists */
+    int rRangeSet;		/* 1 if range range (i.e. interval) is set */
+    int maxNofRules;
+    int nofRules;
+    DCELL defaultDMin;		/* default domain minimum value */
+    DCELL defaultDMax;		/* default domain maximum value */
+    DCELL defaultRMin;		/* default range minimum value */
+    DCELL defaultRMax;		/* default range maximum value */
+    DCELL infiniteDLeft;	/* neg infinite rule */
+    DCELL infiniteDRight;	/* neg infinite rule */
+    DCELL infiniteRLeft;	/* pos infinite rule */
+    DCELL infiniteRRight;	/* pos infinite rule */
+    DCELL dMin;			/* minimum domain values in rules */
+    DCELL dMax;			/* maximum domain values in rules */
+    DCELL rMin;			/* minimum range values in rules */
+    DCELL rMax;			/* maximum range values in rules */
+    struct FPReclass_table *table;
+};
+
+struct Quant_table
+{
+    DCELL dLow;
+    DCELL dHigh;
+    CELL cLow;
+    CELL cHigh;
+};
+
+struct Quant
+{
+    int truncate_only;
+    int round_only;
+    int defaultDRuleSet;
+    int defaultCRuleSet;
+    int infiniteLeftSet;
+    int infiniteRightSet;
+    int cRangeSet;
+    int maxNofRules;
+    int nofRules;
+    DCELL defaultDMin;
+    DCELL defaultDMax;
+    CELL defaultCMin;
+    CELL defaultCMax;
+    DCELL infiniteDLeft;
+    DCELL infiniteDRight;
+    CELL infiniteCLeft;
+    CELL infiniteCRight;
+    DCELL dMin;
+    DCELL dMax;
+    CELL cMin;
+    CELL cMax;
+    struct Quant_table *table;
+
+    struct
+    {
+	DCELL *vals;
+
+	/* pointers to quant rules corresponding to the intervals btwn vals */
+	struct Quant_table **rules;
+	int nalloc;
+	int active;
+	DCELL inf_dmin;
+	DCELL inf_dmax;
+	CELL inf_min;
+	CELL inf_max;
+	/* all values smaller than inf_dmin become inf_min */
+	/* all values larger than inf_dmax become inf_max */
+	/* inf_min and/or inf_max can be NULL if there are no inf rules */
+    } fp_lookup;
+};
+
+struct Categories
+{
+    CELL ncats;			/* total number of categories              */
+    CELL num;			/* the highest cell values. Only exists    
+				   for backwards compatibility = (CELL)
+				   max_fp_values in quant rules          */
+    char *title;		/* name of data layer                      */
+    char *fmt;			/* printf-like format to generate labels   */
+    float m1;			/* Multiplication coefficient 1            */
+    float a1;			/* Addition coefficient 1                  */
+    float m2;			/* Multiplication coefficient 2            */
+    float a2;			/* Addition coefficient 2                  */
+    struct Quant q;		/* rules mapping cell values to index in
+				   list of labels                        */
+    char **labels;		/* array of labels of size num             */
+    int *marks;			/* was the value with this label was used? */
+    int nalloc;
+    int last_marked_rule;
+    /* NOTE: to get a rule corresponfing to cats.labels[i], use */
+    /* G_get_ith_c/f/d_raster_cat (pcats, i, val1, val2) */
+    /* it calls */
+    /* G_quant_get_ith_rule(&cats->q, i, val1, val2, &index, &index); */
+    /* and idex ==i, because rule is added at the same time as a */
+    /* label, and quant rules are never reordered. Olga apr,95 */
+};
+
+struct History
+{
+    char mapid[RECORD_LEN];
+    char title[RECORD_LEN];
+    char mapset[RECORD_LEN];
+    char creator[RECORD_LEN];
+    char maptype[RECORD_LEN];
+    char datsrc_1[RECORD_LEN];
+    char datsrc_2[RECORD_LEN];
+    char keywrd[RECORD_LEN];
+    int edlinecnt;
+    char edhist[MAXEDLINES][RECORD_LEN];
+};
+
+struct Cell_stats
+{
+    struct Cell_stats_node
+    {
+	int idx;
+	long *count;
+	int left;
+	int right;
+    } *node;			/* tree of values */
+
+    int tlen;			/* allocated tree size */
+    int N;			/* number of actual nodes in tree */
+    int curp;
+    long null_data_count;
+    int curoffset;
+};
+
+struct Histogram
+{
+    int num;
+
+    struct Histogram_list
+    {
+	CELL cat;
+	long count;
+    } *list;
+};
+
+struct Range
+{
+    CELL min;
+    CELL max;
+    int first_time;		/* whether or not range was updated */
+};
+
+struct FPRange
+{
+    DCELL min;
+    DCELL max;
+    int first_time;		/* whether or not range was updated */
+};
+
+struct FP_stats {
+    int geometric;
+    int geom_abs;
+    int flip;
+    int count;
+    DCELL min, max;
+    unsigned long *stats;
+    unsigned long total;
+};
+
+struct GDAL_link;
+
+struct _Color_Value_
+{
+    DCELL value;
+    unsigned char red;
+    unsigned char grn;
+    unsigned char blu;
+};
+
+struct _Color_Rule_
+{
+    struct _Color_Value_ low, high;
+    struct _Color_Rule_ *next;
+    struct _Color_Rule_ *prev;
+};
+
+struct _Color_Info_
+{
+    struct _Color_Rule_ *rules;
+    int n_rules;
+
+    struct
+    {
+	unsigned char *red;
+	unsigned char *grn;
+	unsigned char *blu;
+	unsigned char *set;
+	int nalloc;
+	int active;
+    } lookup;
+
+    struct
+    {
+	DCELL *vals;
+	/* pointers to color rules corresponding to the intervals btwn vals */
+	struct _Color_Rule_ **rules;
+	int nalloc;
+	int active;
+    } fp_lookup;
+
+    DCELL min, max;
+};
+
+struct Colors
+{
+    int version;		/* set by read_colors: -1=old,1=new */
+    DCELL shift;
+    int invert;
+    int is_float;		/* defined on floating point raster data? */
+    int null_set;		/* the colors for null are set? */
+    unsigned char null_red;
+    unsigned char null_grn;
+    unsigned char null_blu;
+    int undef_set;		/* the colors for cells not in range are set? */
+    unsigned char undef_red;
+    unsigned char undef_grn;
+    unsigned char undef_blu;
+    struct _Color_Info_ fixed;
+    struct _Color_Info_ modular;
+    DCELL cmin;
+    DCELL cmax;
+    int organizing;
+};
+
+
+typedef struct
+{
+    unsigned char r, g, b, a;	/* red, green, blue, and alpha */
+} RGBA_Color;
+
+typedef RGBA_Color RGB_Color;
+
+/* RGBA_Color alpha presets */
+#define RGBA_COLOR_OPAQUE     255
+#define RGBA_COLOR_TRANSPARENT  0
+#define RGBA_COLOR_NONE         0
+
+/*** prototypes ***/
+#include <grass/rasterdefs.h>
+
+#endif /* GRASS_RASTER_H */

Copied: grass/trunk/include/rasterdefs.h (from rev 38131, grass/trunk/include/raster.h)
===================================================================
--- grass/trunk/include/rasterdefs.h	                        (rev 0)
+++ grass/trunk/include/rasterdefs.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -0,0 +1,513 @@
+#ifndef GRASS_RASTERDEFS_H
+#define GRASS_RASTERDEFS_H
+
+#include <grass/gis.h>
+
+/* --- ANSI prototypes for the lib/raster functions --- */
+
+/* alloc_cell.c */
+size_t Rast_cell_size(RASTER_MAP_TYPE);
+void *Rast_allocate_buf(RASTER_MAP_TYPE);
+CELL *Rast_allocate_c_buf(void);
+FCELL *Rast_allocate_f_buf(void);
+DCELL *Rast_allocate_d_buf(void);
+char *Rast_allocate_null_buf(void);
+unsigned char *Rast__allocate_null_bits(int);
+int Rast__null_bitstream_size(int);
+
+/* auto_mask.c */
+int Rast__check_for_auto_masking(void);
+void Rast_suppress_masking(void);
+void Rast_unsuppress_masking(void);
+
+/* cats.c */
+int Rast_read_cats(const char *, const char *, struct Categories *);
+int Rast_read_vector_cats(const char *, const char *, struct Categories *);
+CELL Rast_get_max_c_cat(const char *, const char *);
+char *Rast_get_cats_title(const struct Categories *);
+char *Rast_get_c_cat(CELL *, struct Categories *);
+char *Rast_get_f_cat(FCELL *, struct Categories *);
+char *Rast_get_d_cat(DCELL *, struct Categories *);
+char *Rast_get_cat(void *, struct Categories *, RASTER_MAP_TYPE);
+void Rast_unmark_cats(struct Categories *);
+void Rast_mark_c_cats(const CELL *, int, struct Categories *);
+void Rast_mark_f_cats(const FCELL *, int, struct Categories *);
+void Rast_mark_d_cats(const DCELL *, int, struct Categories *);
+int Rast_mark_cats(const void *, int, struct Categories *, RASTER_MAP_TYPE);
+void Rast_rewind_cats(struct Categories *);
+char *Rast_get_next_marked_d_cat(struct Categories *, DCELL *, DCELL *,
+				 long *);
+char *Rast_get_next_marked_c_cat(struct Categories *, CELL *, CELL *,
+				 long *);
+char *Rast_get_next_marked_f_cat(struct Categories *, FCELL *, FCELL *,
+				     long *);
+char *Rast_get_next_marked_cat(struct Categories *, void *, void *,
+			       long *, RASTER_MAP_TYPE);
+int Rast_set_c_cat(const CELL *, const CELL *, const char *, struct Categories *);
+int Rast_set_f_cat(const FCELL *, const FCELL *, const char *, struct Categories *);
+int Rast_set_d_cat(const DCELL *, const DCELL *, const char *, struct Categories *);
+int Rast_set_cat(const void *, const void *, const char *, struct Categories *,
+		 RASTER_MAP_TYPE);
+int Rast_write_cats(const char *, struct Categories *);
+int Rast_write_vector_cats(const char *, struct Categories *);
+char *Rast_get_ith_d_cat(const struct Categories *, int, DCELL *,
+			 DCELL *);
+char *Rast_get_ith_f_cat(const struct Categories *, int, void *, void *);
+char *Rast_get_ith_c_cat(const struct Categories *, int, void *, void *);
+char *Rast_get_ith_cat(const struct Categories *, int, void *, void *,
+		       RASTER_MAP_TYPE);
+void Rast_init_cats(const char *, struct Categories *);
+void Rast_set_cats_title(const char *, struct Categories *);
+void Rast_set_cats_fmt(const char *, double, double, double, double,
+			   struct Categories *);
+void Rast_free_cats(struct Categories *);
+void Rast_copy_cats(struct Categories *, const struct Categories *);
+int Rast_number_of_cats(struct Categories *);
+int Rast_sort_cats(struct Categories *);
+
+/* cell_stats.c */
+void Rast_init_cell_stats(struct Cell_stats *);
+int Rast_update_cell_stats(const CELL *, int, struct Cell_stats *);
+int Rast_find_cell_stat(CELL, long *, const struct Cell_stats *);
+int Rast_rewind_cell_stats(struct Cell_stats *);
+int Rast_next_cell_stat(CELL *, long *, struct Cell_stats *);
+void Rast_get_stats_for_null_value(long *, const struct Cell_stats *);
+void Rast_free_cell_stats(struct Cell_stats *);
+
+/* cell_title.c */
+char *Rast_get_cell_title(const char *, const char *);
+
+/* cellstats_eq.c */
+int Rast_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
+			  void (*)(CELL, CELL, CELL));
+
+/* closecell.c */
+int Rast_close(int);
+int Rast_unopen(int);
+
+/* color_compat.c */
+void Rast_make_ryg_colors(struct Colors *, CELL, CELL);
+void Rast_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_aspect_colors(struct Colors *, CELL, CELL);
+void Rast_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_byr_colors(struct Colors *, CELL, CELL);
+void Rast_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_bgyr_colors(struct Colors *, CELL, CELL);
+void Rast_make_bgyr_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_byg_colors(struct Colors *, CELL, CELL);
+void Rast_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_grey_scale_colors(struct Colors *, CELL, CELL);
+void Rast_make_grey_scale_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_gyr_colors(struct Colors *, CELL, CELL);
+void Rast_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_rainbow_colors(struct Colors *, CELL, CELL);
+void Rast_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_ramp_colors(struct Colors *, CELL, CELL);
+void Rast_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
+void Rast_make_wave_colors(struct Colors *, CELL, CELL);
+void Rast_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
+
+/* color_free.c */
+void Rast_free_colors(struct Colors *);
+void Rast__color_free_rules(struct _Color_Info_ *);
+void Rast__color_free_lookup(struct _Color_Info_ *);
+void Rast__color_free_fp_lookup(struct _Color_Info_ *);
+void Rast__color_reset(struct Colors *);
+
+/* color_get.c */
+int Rast_get_color(const void *, int *, int *, int *, struct Colors *,
+		   RASTER_MAP_TYPE);
+int Rast_get_c_color(const CELL *, int *, int *, int *, struct Colors *);
+int Rast_get_f_color(const FCELL *, int *, int *, int *, struct Colors *);
+int Rast_get_d_color(const DCELL *, int *, int *, int *, struct Colors *);
+void Rast_get_null_value_color(int *, int *, int *, const struct Colors *);
+void Rast_get_default_color(int *, int *, int *, const struct Colors *);
+
+/* color_hist.c */
+void Rast_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
+void Rast_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int, int);
+
+/* color_init.c */
+void Rast_init_colors(struct Colors *);
+
+/* color_insrt.c */
+int Rast__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
+
+/* color_invrt.c */
+void Rast_invert_colors(struct Colors *);
+
+/* color_look.c */
+void Rast_lookup_c_colors(const CELL *, unsigned char *, unsigned char *,
+			  unsigned char *, unsigned char *, int,
+			  struct Colors *);
+void Rast_lookup_colors(const void *, unsigned char *, unsigned char *,
+			unsigned char *, unsigned char *, int,
+			struct Colors *, RASTER_MAP_TYPE);
+void Rast_lookup_f_colors(const FCELL *, unsigned char *, unsigned char *,
+			  unsigned char *, unsigned char *, int,
+			  struct Colors *);
+void Rast_lookup_d_colors(const DCELL *, unsigned char *, unsigned char *,
+			  unsigned char *, unsigned char *, int,
+			  struct Colors *);
+void Rast__lookup_colors(const void *, unsigned char *, unsigned char *,
+			 unsigned char *, unsigned char *, int, struct Colors *,
+			 int, int, RASTER_MAP_TYPE);
+void Rast__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
+				  unsigned char *, const struct _Color_Rule_ *);
+
+/* color_org.c */
+void Rast__organize_colors(struct Colors *);
+
+/* color_rand.c */
+void Rast_make_random_colors(struct Colors *, CELL, CELL);
+
+/* color_range.c */
+void Rast_set_c_color_range(CELL, CELL, struct Colors *);
+void Rast_set_d_color_range(DCELL, DCELL, struct Colors *);
+void Rast_get_c_color_range(CELL *, CELL *, const struct Colors *);
+void Rast_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
+
+/* color_read.c */
+int Rast_read_colors(const char *, const char *, struct Colors *);
+void Rast_mark_colors_as_fp(struct Colors *);
+
+/* color_remove.c */
+int Rast_remove_colors(const char *, const char *);
+
+/* color_rule.c */
+void Rast_add_d_color_rule(const DCELL *, int, int, int,
+			   const DCELL *, int, int, int,
+			   struct Colors *);
+void Rast_add_f_color_rule(const FCELL *, int, int, int,
+			   const FCELL *, int, int, int,
+			   struct Colors *);
+void Rast_add_c_color_rule(const CELL *, int, int, int,
+			   const CELL *, int, int, int,
+			   struct Colors *);
+void Rast_add_color_rule(const void *, int, int, int,
+			 const void *, int, int, int,
+			 struct Colors *, RASTER_MAP_TYPE);
+int Rast_add_modular_d_color_rule(const DCELL *, int, int, int,
+				  const DCELL *, int, int, int,
+				  struct Colors *);
+int Rast_add_modular_f_color_rule(const FCELL *, int, int, int,
+				  const FCELL *, int, int, int,
+				  struct Colors *);
+int Rast_add_modular_c_color_rule(const CELL *, int, int, int,
+				  const CELL *, int, int, int,
+				  struct Colors *);
+int Rast_add_modular_color_rule(const void *, int, int, int,
+				const void *, int, int, int,
+				struct Colors *, RASTER_MAP_TYPE);
+
+/* color_rule_get.c */
+int Rast_colors_count(const struct Colors *);
+int Rast_get_fp_color_rule(DCELL *, unsigned char *, unsigned char *,
+		       unsigned char *, DCELL *, unsigned char *,
+		       unsigned char *, unsigned char *,
+		       const struct Colors *, int);
+
+/* color_rules.c */
+typedef int read_rule_fn(void *, DCELL, DCELL,
+			 DCELL *, int *, int *, int *, int *, int *, int *);
+int Rast_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
+		       int *, int *, int *, int *);
+const char *Rast_parse_color_rule_error(int);
+int Rast_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
+		      int *, int *, int *);
+int Rast_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
+int Rast_load_colors(struct Colors *, const char *, CELL, CELL);
+int Rast_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
+void Rast_make_colors(struct Colors *, const char *, CELL, CELL);
+void Rast_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
+
+/* color_set.c */
+void Rast_set_c_color(CELL, int, int, int, struct Colors *);
+void Rast_set_d_color(DCELL, int, int, int, struct Colors *);
+void Rast_set_null_value_color(int, int, int, struct Colors *);
+void Rast_set_default_color(int, int, int, struct Colors *);
+
+/* color_shift.c */
+void Rast_shift_c_colors(CELL, struct Colors *);
+void Rast_shift_d_colors(DCELL, struct Colors *);
+
+/* color_write.c */
+int Rast_write_colors(const char *, const char *, struct Colors *);
+void Rast__write_colors(FILE *, struct Colors *);
+
+/* color_xform.c */
+void Rast_histogram_eq_colors(struct Colors *, struct Colors *,
+			   struct Cell_stats *);
+void Rast_histogram_eq_fp_colors(struct Colors *,
+			      struct Colors *, struct FP_stats *);
+void Rast_log_colors(struct Colors *, struct Colors *, int);
+void Rast_abs_log_colors(struct Colors *, struct Colors *, int);
+
+/* format.c */
+int Rast__check_format(int);
+int Rast__read_row_ptrs(int);
+int Rast__write_row_ptrs(int);
+
+/* fpreclass.c */
+void Rast_fpreclass_clear(struct FPReclass *);
+void Rast_fpreclass_reset(struct FPReclass *);
+void Rast_fpreclass_init(struct FPReclass *);
+void Rast_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
+void Rast_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
+int Rast_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
+			   DCELL *, DCELL *);
+int Rast_fpreclass_nof_rules(const struct FPReclass *);
+void Rast_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
+			      DCELL *, DCELL *);
+void Rast_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
+int Rast_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
+				      DCELL *);
+void Rast_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
+int Rast_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
+				      DCELL *);
+void Rast_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
+void Rast_fpreclass_reverse_rule_order(struct FPReclass *);
+DCELL Rast_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
+void Rast_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
+			    int);
+void Rast_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
+			    int);
+void Rast_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
+			    int);
+void Rast_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
+			    int);
+void Rast_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
+			    int);
+void Rast_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
+			    int);
+void Rast_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
+			    int);
+void Rast_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
+			    int);
+void Rast_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
+			    int);
+/* gdal.c */
+void Rast_init_gdal(void);
+struct GDAL_link *Rast_get_gdal_link(const char *, const char *);
+struct GDAL_link *Rast_create_gdal_link(const char *, RASTER_MAP_TYPE);
+void Rast_close_gdal_link(struct GDAL_link *);
+int Rast_close_gdal_write_link(struct GDAL_link *);
+
+/* get_cellhd.c */
+int Rast_get_cellhd(const char *, const char *, struct Cell_head *);
+
+/* get_row.c */
+int Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
+int Rast_get_c_row_nomask(int, CELL *, int);
+int Rast_get_f_row_nomask(int, FCELL *, int);
+int Rast_get_d_row_nomask(int, DCELL *, int);
+int Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
+int Rast_get_c_row(int, CELL *, int);
+int Rast_get_f_row(int, FCELL *, int);
+int Rast_get_d_row(int, DCELL *, int);
+int Rast_get_null_value_row(int, char *, int);
+
+/* get_row_colr.c */
+int Rast_get_row_colors(int, int, struct Colors *,
+			    unsigned char *, unsigned char *, unsigned char *,
+			    unsigned char *);
+/* histo_eq.c */
+void Rast_histogram_eq(const struct Histogram *, unsigned char **,
+		    CELL *, CELL *);
+
+/* histogram.c */
+void Rast_init_histogram(struct Histogram *);
+int Rast_read_histogram(const char *, const char *, struct Histogram *);
+int Rast_write_histogram(const char *, const struct Histogram *);
+int Rast_write_histogram_cs(const char *, struct Cell_stats *);
+void Rast_make_histogram_cs(struct Cell_stats *, struct Histogram *);
+int Rast_get_histogram_num(const struct Histogram *);
+CELL Rast_get_histogram_cat(int, const struct Histogram *);
+long Rast_get_histogram_count(int, const struct Histogram *);
+void Rast_free_histogram(struct Histogram *);
+int Rast_sort_histogram(struct Histogram *);
+int Rast_sort_histogram_by_count(struct Histogram *);
+void Rast_remove_histogram(const char *);
+int Rast_add_histogram(CELL, long, struct Histogram *);
+int Rast_set_histogram(CELL, long, struct Histogram *);
+void Rast_extend_histogram(CELL, long, struct Histogram *);
+void Rast_zero_histogram(struct Histogram *);
+
+/* history.c */
+int Rast_read_history(const char *, const char *, struct History *);
+int Rast_write_history(const char *, struct History *);
+void Rast_short_history(const char *, const char *, struct History *);
+int Rast_command_history(struct History *);
+
+/* init.c */
+void Rast__init(void);
+void Rast__check_init(void);
+void Rast_init_all(void);
+
+/* interp.c */
+DCELL Rast_interp_linear(double, DCELL, DCELL);
+DCELL Rast_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
+DCELL Rast_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
+DCELL Rast_interp_bicubic(double, double,
+		       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
+		       DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
+		       DCELL);
+
+/* mask_info.c */
+char *Rast_mask_info(void);
+int Rast__mask_info(char *, char *);
+
+/* maskfd.c */
+int Rast_maskfd(void);
+
+/* null_val.c */
+void Rast__set_null_value(void *, int, int, RASTER_MAP_TYPE);
+void Rast_set_null_value(void *, int, RASTER_MAP_TYPE);
+void Rast_set_c_null_value(CELL *, int);
+void Rast_set_f_null_value(FCELL *, int);
+void Rast_set_d_null_value(DCELL *, int);
+int Rast_is_null_value(const void *, RASTER_MAP_TYPE);
+int Rast_is_c_null_value(const CELL *);
+int Rast_is_f_null_value(const FCELL *);
+int Rast_is_d_null_value(const DCELL *);
+void Rast_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
+void Rast_insert_c_null_values(CELL *, char *, int);
+void Rast_insert_f_null_values(FCELL *, char *, int);
+void Rast_insert_d_null_values(DCELL *, char *, int);
+int Rast__check_null_bit(const unsigned char *, int, int);
+void Rast__convert_01_flags(const char *, unsigned char *, int);
+void Rast__convert_flags_01(char *, const unsigned char *, int);
+void Rast__init_null_bits(unsigned char *, int);
+
+/* opencell.c */
+int Rast_open_old(const char *, const char *);
+int Rast__open_old(const char *, const char *);
+int Rast_open_c_new(const char *);
+int Rast_open_c_new_uncompressed(const char *);
+void Rast_want_histogram(int);
+void Rast_set_cell_format(int);
+int Rast_get_cell_format(CELL);
+int Rast_open_fp_new(const char *);
+int Rast_open_fp_new_uncompressed(const char *);
+int Rast_set_fp_type(RASTER_MAP_TYPE);
+int Rast_map_is_fp(const char *, const char *);
+RASTER_MAP_TYPE Rast_map_type(const char *, const char *);
+RASTER_MAP_TYPE Rast__check_fp_type(const char *, const char *);
+RASTER_MAP_TYPE Rast_get_map_type(int);
+int Rast_open_new(const char *, RASTER_MAP_TYPE);
+int Rast_open_new_uncompressed(const char *, RASTER_MAP_TYPE);
+int Rast_set_quant_rules(int, struct Quant *);
+
+/* put_cellhd.c */
+int Rast_put_cellhd(const char *, struct Cell_head *);
+
+/* put_row.c */
+int Rast_put_row(int, const void *, RASTER_MAP_TYPE);
+int Rast_put_c_row(int, const CELL *);
+int Rast_put_f_row(int, const FCELL *);
+int Rast_put_d_row(int, const DCELL *);
+int Rast__open_null_write(int);
+int Rast__write_null_bits(int, const unsigned char *, int, int, int);
+
+/* put_title.c */
+int Rast_put_cell_title(const char *, const char *);
+
+/* quant.c */
+void Rast_quant_clear(struct Quant *);
+void Rast_quant_free(struct Quant *);
+int Rast__quant_organize_fp_lookup(struct Quant *);
+void Rast_quant_init(struct Quant *);
+int Rast_quant_is_truncate(const struct Quant *);
+int Rast_quant_is_round(const struct Quant *);
+void Rast_quant_truncate(struct Quant *);
+void Rast_quant_round(struct Quant *);
+int Rast_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
+		       CELL *);
+int Rast_quant_nof_rules(const struct Quant *);
+void Rast_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
+			  CELL *);
+void Rast_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
+int Rast_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
+void Rast_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
+int Rast_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
+void Rast_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
+void Rast_quant_reverse_rule_order(struct Quant *);
+CELL Rast_quant_get_cell_value(struct Quant *, DCELL);
+void Rast_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
+void Rast_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
+struct Quant_table *Rast__quant_get_rule_for_d_raster_val(const struct Quant *,
+						       DCELL);
+
+/* quant_io.c */
+int Rast__quant_import(const char *, const char *, struct Quant *);
+int Rast__quant_export(const char *, const char *, const struct Quant *);
+
+/* quant_rw.c */
+int Rast_truncate_fp_map(const char *, const char *);
+int Rast_round_fp_map(const char *, const char *);
+int Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
+int Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
+			    CELL);
+int Rast_write_quant(const char *, const char *, const struct Quant *);
+int Rast_read_quant(const char *, const char *, struct Quant *);
+
+/* range.c */
+void Rast__remove_fp_range(const char *);
+void Rast_construct_default_range(struct Range *);
+int Rast_read_fp_range(const char *, const char *, struct FPRange *);
+int Rast_read_range(const char *, const char *, struct Range *);
+int Rast_write_range(const char *, const struct Range *);
+int Rast_write_fp_range(const char *, const struct FPRange *);
+void Rast_update_range(CELL, struct Range *);
+void Rast_update_fp_range(DCELL, struct FPRange *);
+void Rast_row_update_range(const CELL *, int, struct Range *);
+void Rast__row_update_range(const CELL *, int, struct Range *, int);
+void Rast_row_update_fp_range(const void *, int, struct FPRange *,
+			  RASTER_MAP_TYPE);
+void Rast_init_range(struct Range *);
+void Rast_get_range_min_max(const struct Range *, CELL *, CELL *);
+void Rast_init_fp_range(struct FPRange *);
+void Rast_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
+
+/* raster.c */
+int Rast_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
+void Rast_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
+void Rast_set_c_value(void *, CELL, RASTER_MAP_TYPE);
+void Rast_set_f_value(void *, FCELL, RASTER_MAP_TYPE);
+void Rast_set_d_value(void *, DCELL, RASTER_MAP_TYPE);
+CELL Rast_get_c_value(const void *, RASTER_MAP_TYPE);
+FCELL Rast_get_f_value(const void *, RASTER_MAP_TYPE);
+DCELL Rast_get_d_value(const void *, RASTER_MAP_TYPE);
+
+/* raster_metadata.c */
+int Rast_read_units(const char *, const char *, char *);
+int Rast_read_vdatum(const char *, const char *, char *);
+int Rast_write_units(const char *, const char *);
+int Rast_write_vdatum(const char *, const char *);
+
+/* reclass.c */
+int Rast_is_reclass(const char *, const char *, char *, char *);
+int Rast_is_reclassed_to(const char *, const char *, int *, char ***);
+int Rast_get_reclass(const char *, const char *, struct Reclass *);
+void Rast_free_reclass(struct Reclass *);
+int Rast_put_reclass(const char *, const struct Reclass *);
+
+/* sample.c */
+DCELL Rast_get_sample_nearest(int, const struct Cell_head *, struct Categories *, double, double, int);
+DCELL Rast_get_sample_bilinear(int, const struct Cell_head *, struct Categories *, double, double, int);
+DCELL Rast_get_sample_cubic(int, const struct Cell_head *, struct Categories *, double, double, int);
+DCELL Rast_get_sample(int, const struct Cell_head *, struct Categories *, double, double, int, INTERP_TYPE);
+
+/* set_window.c */
+int Rast_set_window(struct Cell_head *);
+
+/* window_map.c */
+void Rast__init_window(void);
+void Rast__create_window_mapping(int);
+int Rast_row_repeat_nomask(int, int);
+
+/* zero_cell.c */
+void Rast_zero_c_buf(CELL *);
+void Rast_zero_buf(void *, RASTER_MAP_TYPE);
+
+#endif /* GRASS_RASTERDEFS_H */

Modified: grass/trunk/include/site.h
===================================================================
--- grass/trunk/include/site.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/include/site.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,86 +1,12 @@
-
 /*-
- * $Log$
- * Revision 2.1  2006-02-09 03:08:54  glynn
- * Use <grass/gis.h> etc rather than <gis.h>
- *
- * Revision 2.0  2004/11/09 13:06:32  bernhard
- * copied within CVS repository from grass/src/include/site.h
- *
- * Revision 1.7  2000/10/09 01:57:03  eric
- * Added ability to ignore z-value completely using field=SITE_COL_NUL
- *
- * Revision 1.6  2000/10/07 21:23:24  eric
- * Added Cell_head *region parameter. Now respects region! Fixed index bug for
- * dimensions.
- *
- * Revision 1.5  2000/10/06 04:13:53  eric
- * Added the G_readsites_xyz() function and related G_alloc_site_xyz() and
- * G_free_site_xyz() convenience functions.  Will send Markus a short LaTeX
- * documentation and example...
- *
- * Revision 1.4  2000/01/02 12:23:20  markus
- * again comments fixed
- *
- * Revision 1.3  2000/01/02 12:21:47  markus
- * comments fixed
- *
- * Revision 1.2  2000/01/02 12:18:16  markus
- * Bill Hughes: some variable types fixed
- *
- * Revision 1.1.1.1  1999/12/29 15:10:23  markus
- * initial CVS import
- *
- * Revision 1.13  1996/05/23  brown - brown at gomez.gis.uiuc.edu
- * changed DateTime stuff to use TimeStamp instead
- *
- * Revision 1.12  1995/07/17  11:16:26  mccauley
- * took out has_cat and made part of struct
- * support for floating point categories
- *
- * Revision 1.11  1995/06/20  10:26:48  mccauley
- * moved prototypes to external file: P_site.h
- *
- * Revision 1.10  1995/05/24  00:05:58  mccauley
- * added DateTime stuff
- *
- * Revision 1.9  1995/04/17  22:58:24  mccauley
- * added "typedef struct ... Site_head;"
- *
- * Revision 1.8  1995/02/22  02:46:20  mccauley
- * added sites functions from 4.1 that we'll keep.
- *
- * Revision 1.7  1995/02/22  02:25:28  mccauley
- * changed names of functions to G_site_xxx().
- *
- * Revision 1.6  1995/02/22  02:16:41  mccauley
- * increased MAX_SITE_LEN and MAX_SITE_STRING on suggestion
- * of Michael Shapiro <mshapiro at ncsa.uiuc.edu>.
- *
- * Revision 1.5  1995/02/21  07:56:11  mccauley
- * added pragma ident
- *
- * Revision 1.4  1995/02/21  07:28:18  mccauley
- * added qsort comparison function definitions.
- *
- * Revision 1.3  1995/02/08  23:10:46  mccauley
- * added prototype for G_guess_site_fmt.
- *
- * Revision 1.2  1995/02/07  23:18:00  mccauley
- * added prototypes for G_new_get_site and G_new_put_site
- *
- * Revision 1.1  1995/02/07  21:00:51  mccauley
- * Initial revision
- * 
- */
-
-/*-
  * easting|northing|[z|[d4|]...][#category] [ [@attr_text OR %flt] ... ]
  *
  * to allow multidimensions (everything preceding the last '|') and any
  * number of text or numeric attribute fields.
  */
 
+#include <grass/raster.h>
+
 #define MAX_SITE_STRING 1024
 #define MAX_SITE_LEN 4096
 
@@ -134,7 +60,6 @@
 #define SITE_COL_DBL 2
 #define SITE_COL_STR 3
 
-
 /* The XYZ site struct. Note the use of a union for the cat value is
  * different than the Site struct.
  */

Modified: grass/trunk/include/stats.h
===================================================================
--- grass/trunk/include/stats.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/include/stats.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,6 +3,7 @@
 #define GRASS_STATS_H
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 typedef void stat_func(DCELL *, DCELL *, int, const void *);
 typedef void stat_func_w(DCELL *, DCELL(*)[2], int, const void *);

Modified: grass/trunk/lib/raster/color_init.c
===================================================================
--- grass/trunk/lib/raster/color_init.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_init.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -12,6 +12,7 @@
  */
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 /*!
  * \brief Initialize color structure

Modified: grass/trunk/lib/raster/color_insrt.c
===================================================================
--- grass/trunk/lib/raster/color_insrt.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_insrt.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -4,6 +4,8 @@
  * These routines know when it is approriate to call this routine.
  */
 #include <grass/gis.h>
+#include <grass/raster.h>
+
 #define umalloc(n) (unsigned char *) G_malloc((size_t)n)
 #define urealloc(s,n) (unsigned char *) G_realloc(s,(size_t)n)
 

Modified: grass/trunk/lib/raster/color_invrt.c
===================================================================
--- grass/trunk/lib/raster/color_invrt.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_invrt.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,18 @@
+/*!
+  \file raster/color_invrt.c
+
+  \brief Raster library - Invert colors
+
+  (C) 2003-2009 by the GRASS Development Team
+
+  This program is free software under the GNU General Public License
+  (>=v2).  Read the file COPYING that comes with GRASS for details.
+
+  \author Original author CERL
+ */
+
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 void Rast_invert_colors(struct Colors *colors)
 {

Modified: grass/trunk/lib/raster/color_range.c
===================================================================
--- grass/trunk/lib/raster/color_range.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_range.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -13,6 +13,7 @@
 
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 /*!
   \brief Set color range (CELL version)

Modified: grass/trunk/lib/raster/color_rule_get.c
===================================================================
--- grass/trunk/lib/raster/color_rule_get.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_rule_get.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -12,6 +12,7 @@
  */
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 /*! 
    \brief Get both modular and fixed rules count 

Modified: grass/trunk/lib/raster/color_shift.c
===================================================================
--- grass/trunk/lib/raster/color_shift.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/color_shift.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -12,6 +12,7 @@
  */
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 void Rast_shift_c_colors(CELL shift, struct Colors *colors)
 {

Modified: grass/trunk/lib/raster/history.c
===================================================================
--- grass/trunk/lib/raster/history.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/history.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -13,6 +13,7 @@
 
 #include <string.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/glocale.h>
 
 static void print_history_error(const char *, const char *, FILE *);

Modified: grass/trunk/lib/raster/interp.c
===================================================================
--- grass/trunk/lib/raster/interp.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/lib/raster/interp.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,18 @@
+/*!
+ * \file raster/interp.c
+ *
+ * \brief Raster Library - Interpolation
+ *
+ * (C) 2001-2009 GRASS Development Team
+ *
+ * This program is free software under the GNU General Public License 
+ * (>=v2). Read the file COPYING that comes with GRASS for details.
+ *
+ * \author Original author CERL
+ */
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 DCELL Rast_interp_linear(double u, DCELL c0, DCELL c1)
 {

Modified: grass/trunk/ps/ps.map/local_proto.h
===================================================================
--- grass/trunk/ps/ps.map/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/ps/ps.map/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 /* box.c */
 int box_path(double, double, double, double);
 int box_clip(double, double, double, double);
@@ -108,7 +110,7 @@
 int o_io_init(void);
 int o_read_row(void *);
 
-#ifdef GRASS_GIS_H
+#ifdef GRASS_RASTER_H
 RASTER_MAP_TYPE o_open_file(char *);
 #endif
 int o_close_file(void);

Modified: grass/trunk/ps/ps.map/parse_list.c
===================================================================
--- grass/trunk/ps/ps.map/parse_list.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/ps/ps.map/parse_list.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -19,7 +19,7 @@
  *
  * count will be negative if list is not valid
  ********************************************************/
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 int parse_val_list(char *buf, DCELL ** list)
 {

Modified: grass/trunk/ps/ps.map/ps_info.h
===================================================================
--- grass/trunk/ps/ps.map/ps_info.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/ps/ps.map/ps_info.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,4 @@
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 /* Font sizes */
 #define PS_FONT_MAX_SIZE      50

Modified: grass/trunk/raster/r.carve/enforce.h
===================================================================
--- grass/trunk/raster/r.carve/enforce.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.carve/enforce.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -22,6 +22,7 @@
 
 #include <stdio.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/bitmap.h>
 #include <grass/vector.h>
 

Modified: grass/trunk/raster/r.cross/glob.h
===================================================================
--- grass/trunk/raster/r.cross/glob.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.cross/glob.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -20,6 +20,7 @@
 #define __R_CROSS_GLOB_H__
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 #define NFILES 30		/* maximum number of layers */
 #define SHIFT 6			/* 2^SHIFT cats per node */

Modified: grass/trunk/raster/r.describe/local_proto.h
===================================================================
--- grass/trunk/raster/r.describe/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.describe/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -19,6 +19,8 @@
 #ifndef __R_DESC_LOCAL_PROTO_H__
 #define __R_DESC_LOCAL_PROTO_H__
 
+#include <grass/raster.h>
+
 /* describe.c */
 int describe(const char *, int, char *, int, int, int, int, int);
 

Modified: grass/trunk/raster/r.describe/tree.c
===================================================================
--- grass/trunk/raster/r.describe/tree.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.describe/tree.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -17,8 +17,8 @@
  ***************************************************************************/
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 
-
 #define INCR 10
 #define NCATS 100
 

Modified: grass/trunk/raster/r.distance/defs.h
===================================================================
--- grass/trunk/raster/r.distance/defs.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.distance/defs.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -20,7 +20,7 @@
 #define __R_DIST_DEFS_H__
 
 #include <grass/gis.h>
-#include <grass/glocale.h>
+#include <grass/raster.h>
 
 struct EdgeList			/* keep track of edge cells */
 {

Modified: grass/trunk/raster/r.distance/distance.c
===================================================================
--- grass/trunk/raster/r.distance/distance.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.distance/distance.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -17,6 +17,7 @@
  ***************************************************************************/
 
 #include <grass/raster.h>
+#include <grass/glocale.h>
 
 #include "defs.h"
 

Modified: grass/trunk/raster/r.distance/edges.c
===================================================================
--- grass/trunk/raster/r.distance/edges.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.distance/edges.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -19,6 +19,7 @@
 #include <stdlib.h>
 
 #include <grass/raster.h>
+#include <grass/glocale.h>
 
 #include "defs.h"
 

Modified: grass/trunk/raster/r.distance/report.c
===================================================================
--- grass/trunk/raster/r.distance/report.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.distance/report.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -16,6 +16,8 @@
  *
  ***************************************************************************/
 
+#include <grass/glocale.h>
+
 #include "defs.h"
 
 void report(struct Parms *parms)

Modified: grass/trunk/raster/r.flow/r.flow.h
===================================================================
--- grass/trunk/raster/r.flow/r.flow.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.flow/r.flow.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -32,6 +32,7 @@
 
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/segment.h>
 #include <grass/vector.h>
 #include <grass/bitmap.h>

Modified: grass/trunk/raster/r.in.gridatb/local_proto.h
===================================================================
--- grass/trunk/raster/r.in.gridatb/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.in.gridatb/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 int check_ready(void);
 int adjcellhd(struct Cell_head *cellhd);

Modified: grass/trunk/raster/r.in.poly/getformat.c
===================================================================
--- grass/trunk/raster/r.in.poly/getformat.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.in.poly/getformat.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,5 @@
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "format.h"
 
 int getformat(FILE * fd)

Modified: grass/trunk/raster/r.info/local_proto.h
===================================================================
--- grass/trunk/raster/r.info/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.info/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 /* reclas_txt.c */
 int reclass_text(char *, const CELL, struct Reclass *, const int);
 int do_text(char *, const long, const long);

Modified: grass/trunk/raster/r.kappa/kappa.h
===================================================================
--- grass/trunk/raster/r.kappa/kappa.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.kappa/kappa.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,6 @@
-
+#include <math.h>
 #include <grass/gis.h>
-#include <math.h>
+#include <grass/raster.h>
 
 struct _gstats_
 {

Modified: grass/trunk/raster/r.li/r.li.daemon/GenericCell.h
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/GenericCell.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.li/r.li.daemon/GenericCell.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -8,12 +8,12 @@
  *       BUGS: please send bugs reports to  pallecch at cli.di.unipi.it
  */
 
-#include <grass/gis.h>
-#include <grass/glocale.h>
-
 #ifndef GENERICCELL_H
 #define GENERICCELL_H
 
+#include <grass/gis.h>
+#include <grass/raster.h>
+
 #define GC_HIGHER 1
 #define GC_EQUAL 2
 #define GC_LOWER 3

Modified: grass/trunk/raster/r.li/r.li.daemon/daemon.h
===================================================================
--- grass/trunk/raster/r.li/r.li.daemon/daemon.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.li/r.li.daemon/daemon.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -18,6 +18,7 @@
  */
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "list.h"
 
 

Modified: grass/trunk/raster/r.los/delete.c
===================================================================
--- grass/trunk/raster/r.los/delete.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.los/delete.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -11,6 +11,7 @@
 
 #include <stdlib.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/segment.h>
 #include "point.h"
 

Modified: grass/trunk/raster/r.los/mark_pts.c
===================================================================
--- grass/trunk/raster/r.los/mark_pts.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.los/mark_pts.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -9,9 +9,10 @@
 
 /****************************************************************/
 
+#include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/segment.h>
 #include "point.h"
-#include <grass/gis.h>
 
 #define		PT_TO_MARK_X		PT_TO_MARK->x
 #define		PT_TO_MARK_Y		PT_TO_MARK->y

Modified: grass/trunk/raster/r.mapcalc/mapcalc.h
===================================================================
--- grass/trunk/raster/r.mapcalc/mapcalc.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.mapcalc/mapcalc.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -8,6 +8,7 @@
 
 #include <grass/config.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 #include "expression.h"
 

Modified: grass/trunk/raster/r.mapcalc/xrand.c
===================================================================
--- grass/trunk/raster/r.mapcalc/xrand.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.mapcalc/xrand.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,6 +3,7 @@
 
 #include <grass/config.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "globals.h"
 #include "expression.h"
 #include "func_proto.h"

Modified: grass/trunk/raster/r.mapcalc/xrowcol.c
===================================================================
--- grass/trunk/raster/r.mapcalc/xrowcol.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.mapcalc/xrowcol.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,6 @@
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "globals.h"
 #include "expression.h"
 #include "func_proto.h"

Modified: grass/trunk/raster/r.mfilter/filter.h
===================================================================
--- grass/trunk/raster/r.mfilter/filter.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.mfilter/filter.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,5 @@
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/rowio.h>
 typedef struct
 {

Modified: grass/trunk/raster/r.neighbors/ncb.h
===================================================================
--- grass/trunk/raster/r.neighbors/ncb.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.neighbors/ncb.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,4 @@
+#include <grass/raster.h>
 
 struct ncb			/* neighborhood control block */
 {

Modified: grass/trunk/raster/r.out.gridatb/local_proto.h
===================================================================
--- grass/trunk/raster/r.out.gridatb/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.out.gridatb/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 
 void check_ready(void);
 int adjcellhd(struct Cell_head *cellhd);

Modified: grass/trunk/raster/r.param.scale/param.h
===================================================================
--- grass/trunk/raster/r.param.scale/param.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.param.scale/param.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -9,6 +9,7 @@
 /************************************************************************/
 
 #include <grass/gis.h>
+#include <grass/raster.h>
 				/* programs. It sets up the necessary   */
 				/* prototypes for GRASS library calls.  */
 #include <math.h>

Modified: grass/trunk/raster/r.profile/local_proto.h
===================================================================
--- grass/trunk/raster/r.profile/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.profile/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -3,7 +3,7 @@
 #include <string.h>
 #include <math.h>
 #include <grass/gis.h>
-#include <grass/glocale.h>
+#include <grass/raster.h>
 
 /* main.c */
 int do_profile(double, double, double, double, char *, int, double, int, int,

Modified: grass/trunk/raster/r.quant/global.h
===================================================================
--- grass/trunk/raster/r.quant/global.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.quant/global.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,4 +1,4 @@
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 extern struct Quant quant_struct;
 extern CELL old_min, old_max;

Modified: grass/trunk/raster/r.random/local_proto.h
===================================================================
--- grass/trunk/raster/r.random/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.random/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,8 @@
 #ifndef __LOCAL_PROTO_H__
 #define __LOCAL_PHOTO_H__
 
+#include <grass/raster.h>
+
 /* raster_ptr.c: From Huidae Cho ... */
 union RASTER_PTR
 {

Modified: grass/trunk/raster/r.random.cells/ransurf.h
===================================================================
--- grass/trunk/raster/r.random.cells/ransurf.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.random.cells/ransurf.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -2,7 +2,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 #include "flag.h"
 
 #define ODD(a)	((a) & 1)

Modified: grass/trunk/raster/r.random.surface/ransurf.h
===================================================================
--- grass/trunk/raster/r.random.surface/ransurf.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.random.surface/ransurf.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -4,7 +4,7 @@
 
 #include <stdio.h>
 #include <math.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 #define ODD(a)	((a) & 1)
 

Modified: grass/trunk/raster/r.reclass/rule.h
===================================================================
--- grass/trunk/raster/r.reclass/rule.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.reclass/rule.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 #define RULE struct _rule_
 RULE {

Modified: grass/trunk/raster/r.recode/global.h
===================================================================
--- grass/trunk/raster/r.recode/global.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.recode/global.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,5 @@
 #include <stdio.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 
 extern RASTER_MAP_TYPE in_type;
 extern RASTER_MAP_TYPE out_type;

Modified: grass/trunk/raster/r.report/global.h
===================================================================
--- grass/trunk/raster/r.report/global.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.report/global.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -5,8 +5,7 @@
 # define INIT(x) = x
 #endif
 
-#include <grass/gis.h>
-#include <grass/glocale.h>
+#include <grass/raster.h>
 
 extern struct Cell_head window;
 

Modified: grass/trunk/raster/r.report/main.c
===================================================================
--- grass/trunk/raster/r.report/main.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.report/main.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -15,6 +15,7 @@
  *****************************************************************************/
 
 #include <stdlib.h>
+#include <grass/glocale.h>
 #include "global.h"
 
 struct Cell_head window;

Modified: grass/trunk/raster/r.report/parse.c
===================================================================
--- grass/trunk/raster/r.report/parse.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.report/parse.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <grass/raster.h>
+#include <grass/glocale.h>
 #include "global.h"
 
 int parse_command_line(int argc, char *argv[])

Modified: grass/trunk/raster/r.report/stats.c
===================================================================
--- grass/trunk/raster/r.report/stats.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.report/stats.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,7 +1,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
-#include <grass/raster.h>
+#include <grass/glocale.h>
 #include "global.h"
 
 static int die(void);

Modified: grass/trunk/raster/r.ros/spot_dist.c
===================================================================
--- grass/trunk/raster/r.ros/spot_dist.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.ros/spot_dist.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -32,10 +32,9 @@
  *	INT-438, 46 p.
  ******************************************************************************/
 
-#include <grass/gis.h>
 #include <math.h>
+#include <grass/raster.h>
 
-
 #define DATA(map, r, c) (map)[(r) * ncols + (c)]
 #define	DEG2RAD		0.017453292
 /*#define DEBUG */

Modified: grass/trunk/raster/r.spread/select_linksB.c
===================================================================
--- grass/trunk/raster/r.spread/select_linksB.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.spread/select_linksB.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -20,6 +20,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "costHa.h"
 #include "cell_ptrHa.h"
 #include "local_proto.h"

Modified: grass/trunk/raster/r.spread/spot.c
===================================================================
--- grass/trunk/raster/r.spread/spot.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.spread/spot.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -44,6 +44,7 @@
 #include <stdio.h>
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "cmd_line.h"
 #include "costHa.h"
 #include "cell_ptrHa.h"

Modified: grass/trunk/raster/r.spread/spread.c
===================================================================
--- grass/trunk/raster/r.spread/spread.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.spread/spread.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -33,6 +33,7 @@
 #include <stdlib.h>
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include "cmd_line.h"
 #include "costHa.h"
 #include "cell_ptrHa.h"

Modified: grass/trunk/raster/r.surf.contour/contour.h
===================================================================
--- grass/trunk/raster/r.surf.contour/contour.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.surf.contour/contour.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,6 @@
 #include <stdio.h>
 #include <math.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 #include "flag.h"
 
 #define NODE		struct _n_o_d_e_

Modified: grass/trunk/raster/r.surf.idw/main.h
===================================================================
--- grass/trunk/raster/r.surf.idw/main.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.surf.idw/main.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 #define         SHORT           short
 #define         TRUE    1
 #define         FALSE   0

Modified: grass/trunk/raster/r.thin/local_proto.h
===================================================================
--- grass/trunk/raster/r.thin/local_proto.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.thin/local_proto.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,5 @@
+#include <grass/raster.h>
+
 /* io.c */
 CELL *get_a_row(int);
 int put_a_row(int, CELL *);

Modified: grass/trunk/raster/r.water.outlet/basin.h
===================================================================
--- grass/trunk/raster/r.water.outlet/basin.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.water.outlet/basin.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,5 +1,5 @@
 #include <math.h>
-#include <grass/gis.h>
+#include <grass/raster.h>
 #include "ramseg.h"
 #include "flag.h"
 

Modified: grass/trunk/raster/r.watershed/seg/cseg.h
===================================================================
--- grass/trunk/raster/r.watershed/seg/cseg.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster/r.watershed/seg/cseg.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,7 +1,7 @@
 #ifndef __CSEG_H__
 #define __CSEG_H__
 
-
+#include <grass/raster.h>
 #include <grass/segment.h>
 
 #define CSEG struct _c_s_e_g_

Modified: grass/trunk/raster3d/base/mask_functions.h
===================================================================
--- grass/trunk/raster3d/base/mask_functions.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/raster3d/base/mask_functions.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -16,6 +16,9 @@
 
 #ifndef __MASK_FUNCTIONS_H__
 #define __MASK_FUNCTIONS_H__
+
+#include <grass/raster.h>
+
 /*Structures */
 typedef struct _d_interval
 {

Modified: grass/trunk/swig/include/python/common.i
===================================================================
--- grass/trunk/swig/include/python/common.i	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/swig/include/python/common.i	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,6 +1,7 @@
 %{
 #include <stdio.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 %}
 
 %rename(my_def) def;

Modified: grass/trunk/swig/include/python/utils.i
===================================================================
--- grass/trunk/swig/include/python/utils.i	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/swig/include/python/utils.i	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,3 +1,6 @@
+%{
+#include <grass/raster.h>
+%}
 
 %include "common.i"
 

Modified: grass/trunk/vector/lidar/v.lidar.edgedetection/edgedetection.c
===================================================================
--- grass/trunk/vector/lidar/v.lidar.edgedetection/edgedetection.c	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/vector/lidar/v.lidar.edgedetection/edgedetection.c	2009-07-01 09:48:48 UTC (rev 38136)
@@ -28,6 +28,7 @@
 #include <string.h>
 #include <math.h>
 #include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/vector.h>
 #include <grass/dbmi.h>
     /* #include <grass/PolimiFunct.h> */

Modified: grass/trunk/vector/v.to.rast/local.h
===================================================================
--- grass/trunk/vector/v.to.rast/local.h	2009-06-30 21:11:15 UTC (rev 38135)
+++ grass/trunk/vector/v.to.rast/local.h	2009-07-01 09:48:48 UTC (rev 38136)
@@ -1,7 +1,7 @@
 #ifndef __LOCAL_H__
 #define __LOCAL_H__
 
-#include <grass/gis.h>
+#include <grass/raster.h>
 #include <grass/dbmi.h>
 #include <grass/vector.h>
 



More information about the grass-commit mailing list