[GRASS-SVN] r49183 - in grass/trunk: db/db.columns db/db.connect db/db.copy db/db.createdb db/db.databases db/db.describe db/db.drivers db/db.dropdb db/db.execute db/db.select db/db.tables include include/defs lib/btree lib/gmath lib/ogsf lib/python/ctypes misc/m.nviz.image ps/ps.map visualization/nviz/src

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Nov 11 12:44:36 EST 2011


Author: martinl
Date: 2011-11-11 09:44:36 -0800 (Fri, 11 Nov 2011)
New Revision: 49183

Added:
   grass/trunk/include/defs/
   grass/trunk/include/defs/Paintlib.h
   grass/trunk/include/defs/arraystats.h
   grass/trunk/include/defs/bitmap.h
   grass/trunk/include/defs/btree.h
   grass/trunk/include/defs/cdhc.h
   grass/trunk/include/defs/cluster.h
   grass/trunk/include/defs/colors.h
   grass/trunk/include/defs/datetime.h
   grass/trunk/include/defs/dbmi.h
   grass/trunk/include/defs/devlib.h
   grass/trunk/include/defs/dig_atts.h
   grass/trunk/include/defs/display.h
   grass/trunk/include/defs/dlg.h
   grass/trunk/include/defs/form.h
   grass/trunk/include/defs/gis.h
   grass/trunk/include/defs/glocale.h
   grass/trunk/include/defs/gmath.h
   grass/trunk/include/defs/gprojects.h
   grass/trunk/include/defs/ibtree.h
   grass/trunk/include/defs/icon.h
   grass/trunk/include/defs/imagery.h
   grass/trunk/include/defs/la.h
   grass/trunk/include/defs/libtrans.h
   grass/trunk/include/defs/linkm.h
   grass/trunk/include/defs/manage.h
   grass/trunk/include/defs/neta.h
   grass/trunk/include/defs/nviz.h
   grass/trunk/include/defs/ogsf.h
   grass/trunk/include/defs/ortholib.h
   grass/trunk/include/defs/raster.h
   grass/trunk/include/defs/raster3d.h
   grass/trunk/include/defs/rbtree.h
   grass/trunk/include/defs/rowio.h
   grass/trunk/include/defs/segment.h
   grass/trunk/include/defs/site.h
   grass/trunk/include/defs/sitelib.h
   grass/trunk/include/defs/spawn.h
   grass/trunk/include/defs/sqlp.h
   grass/trunk/include/defs/stats.h
   grass/trunk/include/defs/symbol.h
   grass/trunk/include/defs/transform.h
   grass/trunk/include/defs/vedit.h
   grass/trunk/include/ogsf.h
Removed:
   grass/trunk/include/P_datetime.h
   grass/trunk/include/P_site.h
   grass/trunk/include/codes.h
   grass/trunk/include/dbmidefs.h
   grass/trunk/include/geom.h
   grass/trunk/include/gisdefs.h
   grass/trunk/include/gstypes.h
   grass/trunk/include/gsurf.h
   grass/trunk/include/imagedefs.h
   grass/trunk/include/keyframe.h
   grass/trunk/include/kftypes.h
   grass/trunk/include/ogsf_proto.h
   grass/trunk/include/raster3ddefs.h
   grass/trunk/include/rasterdefs.h
   grass/trunk/include/readsites.h
   grass/trunk/include/search.h
Modified:
   grass/trunk/db/db.columns/main.c
   grass/trunk/db/db.connect/main.c
   grass/trunk/db/db.copy/main.c
   grass/trunk/db/db.createdb/main.c
   grass/trunk/db/db.databases/main.c
   grass/trunk/db/db.describe/main.c
   grass/trunk/db/db.drivers/main.c
   grass/trunk/db/db.dropdb/main.c
   grass/trunk/db/db.execute/main.c
   grass/trunk/db/db.select/main.c
   grass/trunk/db/db.tables/main.c
   grass/trunk/include/Makefile
   grass/trunk/include/Paintlib.h
   grass/trunk/include/arraystats.h
   grass/trunk/include/bitmap.h
   grass/trunk/include/blas.h
   grass/trunk/include/btree.h
   grass/trunk/include/cdhc.h
   grass/trunk/include/cluster.h
   grass/trunk/include/colors.h
   grass/trunk/include/datetime.h
   grass/trunk/include/dbmi.h
   grass/trunk/include/display.h
   grass/trunk/include/dlg.h
   grass/trunk/include/fontcap.h
   grass/trunk/include/form.h
   grass/trunk/include/gis.h
   grass/trunk/include/glocale.h
   grass/trunk/include/gmath.h
   grass/trunk/include/gprojects.h
   grass/trunk/include/ibtree.h
   grass/trunk/include/icon.h
   grass/trunk/include/imagery.h
   grass/trunk/include/la.h
   grass/trunk/include/libtrans.h
   grass/trunk/include/linkm.h
   grass/trunk/include/lock.h
   grass/trunk/include/manage.h
   grass/trunk/include/neta.h
   grass/trunk/include/nviz.h
   grass/trunk/include/ortholib.h
   grass/trunk/include/raster.h
   grass/trunk/include/raster3d.h
   grass/trunk/include/rbtree.h
   grass/trunk/include/rowio.h
   grass/trunk/include/segment.h
   grass/trunk/include/site.h
   grass/trunk/include/sitelib.h
   grass/trunk/include/spawn.h
   grass/trunk/include/sqlp.h
   grass/trunk/include/stats.h
   grass/trunk/include/symbol.h
   grass/trunk/include/transform.h
   grass/trunk/include/vbuildlib.h
   grass/trunk/include/vector.h
   grass/trunk/include/vedit.h
   grass/trunk/lib/btree/free.c
   grass/trunk/lib/gmath/blas_level_1.c
   grass/trunk/lib/gmath/blas_level_2.c
   grass/trunk/lib/ogsf/GK2.c
   grass/trunk/lib/ogsf/GP2.c
   grass/trunk/lib/ogsf/GS2.c
   grass/trunk/lib/ogsf/GSX.c
   grass/trunk/lib/ogsf/GS_util.c
   grass/trunk/lib/ogsf/GV2.c
   grass/trunk/lib/ogsf/GVL2.c
   grass/trunk/lib/ogsf/Gp3.c
   grass/trunk/lib/ogsf/Gs3.c
   grass/trunk/lib/ogsf/Gv3.c
   grass/trunk/lib/ogsf/Gvl3.c
   grass/trunk/lib/ogsf/gk.c
   grass/trunk/lib/ogsf/gp.c
   grass/trunk/lib/ogsf/gpd.c
   grass/trunk/lib/ogsf/gs.c
   grass/trunk/lib/ogsf/gs_bm.c
   grass/trunk/lib/ogsf/gs_norms.c
   grass/trunk/lib/ogsf/gs_query.c
   grass/trunk/lib/ogsf/gsd_cplane.c
   grass/trunk/lib/ogsf/gsd_fonts.c
   grass/trunk/lib/ogsf/gsd_fringe.c
   grass/trunk/lib/ogsf/gsd_img_mpeg.c
   grass/trunk/lib/ogsf/gsd_img_ppm.c
   grass/trunk/lib/ogsf/gsd_img_tif.c
   grass/trunk/lib/ogsf/gsd_label.c
   grass/trunk/lib/ogsf/gsd_legend.c
   grass/trunk/lib/ogsf/gsd_objs.c
   grass/trunk/lib/ogsf/gsd_prim.c
   grass/trunk/lib/ogsf/gsd_surf.c
   grass/trunk/lib/ogsf/gsd_views.c
   grass/trunk/lib/ogsf/gsd_wire.c
   grass/trunk/lib/ogsf/gsdiff.c
   grass/trunk/lib/ogsf/gsdrape.c
   grass/trunk/lib/ogsf/gsds.c
   grass/trunk/lib/ogsf/gsget.c
   grass/trunk/lib/ogsf/gsget.h
   grass/trunk/lib/ogsf/gv.c
   grass/trunk/lib/ogsf/gv_quick.c
   grass/trunk/lib/ogsf/gvd.c
   grass/trunk/lib/ogsf/gvl.c
   grass/trunk/lib/ogsf/gvl_calc.c
   grass/trunk/lib/ogsf/gvl_calc2.c
   grass/trunk/lib/ogsf/gvl_file.c
   grass/trunk/lib/ogsf/gvld.c
   grass/trunk/lib/ogsf/trans.c
   grass/trunk/lib/python/ctypes/Makefile
   grass/trunk/misc/m.nviz.image/write_img.c
   grass/trunk/ps/ps.map/local_proto.h
   grass/trunk/visualization/nviz/src/anim_support.c
   grass/trunk/visualization/nviz/src/interface.h
Log:
move prototypes from include/ to include/defs


Modified: grass/trunk/db/db.columns/main.c
===================================================================
--- grass/trunk/db/db.columns/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.columns/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,7 +15,6 @@
 
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <stdlib.h>
 #include <grass/glocale.h>
 

Modified: grass/trunk/db/db.connect/main.c
===================================================================
--- grass/trunk/db/db.connect/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.connect/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,7 +21,6 @@
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 /* database for DBF can be written with variables:

Modified: grass/trunk/db/db.copy/main.c
===================================================================
--- grass/trunk/db/db.copy/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.copy/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 

Modified: grass/trunk/db/db.createdb/main.c
===================================================================
--- grass/trunk/db/db.createdb/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.createdb/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,6 @@
 #include <stdlib.h>
 #include <grass/dbmi.h>
 #include <grass/gis.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 

Modified: grass/trunk/db/db.databases/main.c
===================================================================
--- grass/trunk/db/db.databases/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.databases/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,6 @@
 #include <stdlib.h>
 #include <grass/dbmi.h>
 #include <grass/gis.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 

Modified: grass/trunk/db/db.describe/main.c
===================================================================
--- grass/trunk/db/db.describe/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.describe/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,6 @@
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 

Modified: grass/trunk/db/db.drivers/main.c
===================================================================
--- grass/trunk/db/db.drivers/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.drivers/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -14,9 +14,7 @@
  *****************************************************************************/
 
 #include <stdlib.h>
-#include <grass/codes.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/gis.h>
 #include <grass/glocale.h>
 

Modified: grass/trunk/db/db.dropdb/main.c
===================================================================
--- grass/trunk/db/db.dropdb/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.dropdb/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,6 @@
 #include <stdlib.h>
 #include <grass/dbmi.h>
 #include <grass/gis.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 

Modified: grass/trunk/db/db.execute/main.c
===================================================================
--- grass/trunk/db/db.execute/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.execute/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -23,7 +23,6 @@
 #include <errno.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 struct

Modified: grass/trunk/db/db.select/main.c
===================================================================
--- grass/trunk/db/db.select/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.select/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -22,7 +22,6 @@
 
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 #include "local_proto.h"
 

Modified: grass/trunk/db/db.tables/main.c
===================================================================
--- grass/trunk/db/db.tables/main.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/db/db.tables/main.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,6 @@
 #include <stdlib.h>
 #include <grass/gis.h>
 #include <grass/dbmi.h>
-#include <grass/codes.h>
 #include <grass/glocale.h>
 
 

Modified: grass/trunk/include/Makefile
===================================================================
--- grass/trunk/include/Makefile	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/Makefile	2011-11-11 17:44:36 UTC (rev 49183)
@@ -3,7 +3,7 @@
 include $(MODULE_TOPDIR)/include/Make/Vars.make
 include $(MODULE_TOPDIR)/include/Make/Rules.make
 
-SRCH := $(wildcard ../include/*.h ../include/vect/*.h ../include/iostream/*.h)
+SRCH := $(wildcard ../include/*.h ../include/defs/*.h ../include/vect/*.h ../include/iostream/*.h)
 DSTH := $(patsubst ../include/%.h,$(ARCH_INCDIR)/%.h,$(SRCH))
 DSTH_EXTRA = $(ARCH_INCDIR)/copying.h $(ARCH_INCDIR)/confparms.h
 
@@ -15,6 +15,9 @@
 # cancel rule from Rules.make
 $(ARCH_INCDIR)/%.h: %.h
 
+$(ARCH_INCDIR)/defs/%.h: defs/%.h | $(ARCH_INCDIR)/defs
+	$(INSTALL_DATA) $< $@
+
 $(ARCH_INCDIR)/vect/%.h: vect/%.h | $(ARCH_INCDIR)/vect
 	$(INSTALL_DATA) $< $@
 
@@ -24,6 +27,9 @@
 $(ARCH_INCDIR)/%.h: %.h | $(ARCH_INCDIR)
 	$(INSTALL_DATA) $< $@
 
+$(ARCH_INCDIR)/defs: | $(ARCH_INCDIR)
+	$(MKDIR) $@
+
 $(ARCH_INCDIR)/vect: | $(ARCH_INCDIR)
 	$(MKDIR) $@
 

Deleted: grass/trunk/include/P_datetime.h
===================================================================
--- grass/trunk/include/P_datetime.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/P_datetime.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,107 +0,0 @@
-
-#ifndef GRASS_P_DATETIME_H
-#define GRASS_P_DATETIME_H
-
-/* between.c */
-int datetime_is_between(int x, int a, int b);
-
-/* change.c */
-int datetime_change_from_to(DateTime * dt, int from, int to, int round);
-
-/* copy.c */
-void datetime_copy(DateTime * src, const DateTime * dst);
-
-/* diff.c */
-int datetime_difference(const DateTime * a, const DateTime * b,
-			DateTime * result);
-
-/* error.c */
-int datetime_error(int code, char *msg);
-int datetime_error_code(void);
-char *datetime_error_msg(void);
-void datetime_clear_error(void);
-
-/* format.c */
-int datetime_format(const DateTime * dt, char *buf);
-
-/* incr1.c */
-int datetime_increment(DateTime * src, DateTime * incr);
-
-/* incr2.c */
-int datetime_is_valid_increment(const DateTime * src, const DateTime * incr);
-int datetime_check_increment(const DateTime * src, const DateTime * incr);
-
-/* incr3.c */
-int datetime_get_increment_type(const DateTime * dt, int *mode, int *from,
-				int *to, int *fracsec);
-int datetime_set_increment_type(const DateTime * src, DateTime * incr);
-
-/* local.c */
-int datetime_get_local_timezone(int *minutes);
-void datetime_get_local_time(DateTime * dt);
-
-/* misc.c */
-int datetime_days_in_month(int year, int month, int ad);
-int datetime_is_leap_year(int year, int ad);
-int datetime_days_in_year(int year, int ad);
-
-/* same.c */
-int datetime_is_same(const DateTime * src, const DateTime * dst);
-
-/* scan.c */
-int datetime_scan(DateTime * dt, const char *buf);
-
-/* sign.c */
-int datetime_is_positive(const DateTime * dt);
-int datetime_is_negative(const DateTime * dt);
-void datetime_set_positive(DateTime * dt);
-void datetime_set_negative(DateTime * dt);
-void datetime_invert_sign(DateTime * dt);
-
-/* type.c */
-int datetime_set_type(DateTime * dt, int mode, int from, int to, int fracsec);
-int datetime_get_type(const DateTime * dt, int *mode, int *from, int *to,
-		      int *fracsec);
-int datetime_is_valid_type(const DateTime * dt);
-int datetime_check_type(const DateTime * dt);
-int datetime_in_interval_year_month(int x);
-int datetime_in_interval_day_second(int x);
-int datetime_is_absolute(const DateTime * dt);
-int datetime_is_relative(const DateTime * dt);
-
-/* tz1.c */
-int datetime_check_timezone(const DateTime * dt, int minutes);
-int datetime_get_timezone(const DateTime * dt, int *minutes);
-int datetime_set_timezone(DateTime * dt, int minutes);
-int datetime_unset_timezone(DateTime * dt);
-int datetime_is_valid_timezone(int minutes);
-
-/* tz2.c */
-int datetime_change_timezone(DateTime * dt, int minutes);
-int datetime_change_to_utc(DateTime * dt);
-void datetime_decompose_timezone(int tz, int *hours, int *minutes);
-
-/* values.c */
-int datetime_check_year(const DateTime * dt, int year);
-int datetime_check_month(const DateTime * dt, int month);
-int datetime_check_day(const DateTime * dt, int day);
-int datetime_check_hour(const DateTime * dt, int hour);
-int datetime_check_minute(const DateTime * dt, int minute);
-int datetime_check_second(const DateTime * dt, double second);
-int datetime_check_fracsec(const DateTime * dt, int fracsec);
-int datetime_get_year(const DateTime * dt, int *year);
-int datetime_set_year(DateTime * dt, int year);
-int datetime_get_month(const DateTime * dt, int *month);
-int datetime_set_month(DateTime * dt, int month);
-int datetime_get_day(const DateTime * dt, int *day);
-int datetime_set_day(DateTime * dt, int day);
-int datetime_get_hour(const DateTime * dt, int *hour);
-int datetime_set_hour(DateTime * dt, int hour);
-int datetime_get_minute(const DateTime * dt, int *minute);
-int datetime_set_minute(DateTime * dt, int minute);
-int datetime_get_second(const DateTime * dt, double *second);
-int datetime_set_second(DateTime * dt, double second);
-int datetime_get_fracsec(const DateTime * dt, int *fracsec);
-int datetime_set_fracsec(DateTime * dt, int fracsec);
-
-#endif /* GRASS_P_DATETIME_H */

Deleted: grass/trunk/include/P_site.h
===================================================================
--- grass/trunk/include/P_site.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/P_site.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,46 +0,0 @@
-
-#ifndef GRASS_P_SITE_H
-#define GRASS_P_SITE_H
-
-struct Map_info;
-
-/* The same for old and new, format independent */
-Site *G_site_new_struct(RASTER_MAP_TYPE cattype, int ndim, int ns, int nd);
-void G_site_free_struct(Site * s);
-int G_site_in_region(const Site * s, const struct Cell_head *region);
-int G_site_d_cmp(const void *a, const void *b);
-int G_site_c_cmp(const void *a, const void *b);
-int G_site_s_cmp(const void *a, const void *b);
-char *G_site_format(const Site * s, const char *fs, int id);
-
-/* struct site_att * G_sites_get_atts (struct Map_info * ptr, int* cat); */
-int G_sites_get_fields(struct Map_info *ptr, char ***cnames, int **ctypes,
-		       int **ndx);
-void G_sites_free_fields(int ncols, char **cnames, int *ctypes, int *ndx);
-
-/* Old version used by v.in.sites */
-FILE *G_oldsites_open_old(const char *name, const char *mapset);
-int G_oldsite_describe(FILE * p, int *dims, int *cat, int *strs, int *dbls);
-int G_oldsite_get(FILE * p, Site * s);
-int G__oldsite_get(FILE *, Site *, int);
-
-/* New version based on vectors used in old, not updated sites modules */
-int G_site_get(struct Map_info *p, Site * s);
-int G_site_put(struct Map_info *p, const Site * s);
-int G_site_describe(struct Map_info *p, int *dims, int *cat, int *strs,
-		    int *dbls);
-int G_site_get_head(struct Map_info *p, Site_head * head);
-int G_site_put_head(struct Map_info *p, Site_head * head);
-struct Map_info *G_sites_open_old(const char *name, const char *mapset);
-struct Map_info *G_sites_open_new(const char *name);
-void G_sites_close(struct Map_info *);
-const char *G_find_sites(char *name, const char *mapset);
-const char *G_find_sites2(const char *name, const char *mapset);
-int G__site_put(struct Map_info *, Site *, int);
-
-struct Map_info *G_fopen_sites_old(const char *, const char *);
-struct Map_info *G_fopen_sites_new(const char *);
-int G_get_site(struct Map_info *, double *, double *, char **);
-int G_put_site(struct Map_info *, double, double, const char *);
-
-#endif

Modified: grass/trunk/include/Paintlib.h
===================================================================
--- grass/trunk/include/Paintlib.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/Paintlib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,136 +1,6 @@
-/* From applib */
-/* alpha.c */
-int Palpha(void);
+#ifndef GRASS_PAINTLIB_H
+#define GRASS_PAINTLIB_H
 
-/* close.c */
-int Pclose(void);
+#include <grass/defs/paintlib.h>
 
-/* colorlevel.c */
-int Pcolorlevels(int *, int *, int *);
-
-/* colormult.c */
-int Pcolormultipliers(int *, int *, int *);
-
-/* colornum.c */
-int Pcolornum(double, double, double);
-
-/* colortable.c */
-int Pcolortable(unsigned char *, unsigned char *, unsigned char *,
-		unsigned char *, int);
-/* colorvalue.c */
-int Pcolorvalue(int, float *, float *, float *);
-
-/* connect.c */
-int Pconnect(void);
-int Pdisconnect(void);
-
-/* data.c */
-int Pdata_begin(void);
-int Pdata(unsigned char *, int);
-int Pdata_end(void);
-
-/* device.c */
-int P__closedev(void);
-int P__errordev(char *);
-int P__flushdev(void);
-int P__opendev(char *, char *[], char *);
-int P__readdev(void *, int);
-int P__writedev(void *, int);
-
-/* flush.c */
-int Pflush(void);
-
-/* hres.c */
-double Phres(void);
-
-/* io.c */
-int P__opcode(int);
-int P__get(char *, int);
-int P__gets(char *);
-int P__geti(void);
-double P__getf(void);
-int P__send(char *, int);
-int P__sendi(int);
-int P__sendf(double);
-int P__sends(char *);
-int P__transparent(int);
-
-/* lock.c */
-int Plock(void);
-
-/* misc.c */
-int Pblockspace(void);
-int Pblocksize(void);
-int Pnblocks(void);
-int Ptextspace(void);
-int Ptextfudge(void);
-double Ptextscale(void);
-
-/* nchars.c */
-int Pnchars(void);
-
-/* ncolors.c */
-int Pncolors(void);
-
-/* npixels.c */
-int Pnpixels(int *, int *);
-
-/* painter.c */
-char *Ppainter_name(void);
-
-/* pictsize.c */
-int Ppictsize(int, int);
-
-/* raster.c */
-int Praster(void);
-
-/* rle.c */
-int Prle_begin(void);
-int Prle_end(void);
-int Prle_set_cols(int);
-
-/* text.c */
-int Ptext(char *);
-
-/* vres.c */
-double Pvres(void);
-
-/* From Driver/{whatever} code */
-/* init.c */
-int Pinit(void);
-
-/* finish.c */
-int Pfinish(void);
-
-/* From driverlib */
-/* interface.c */
-int paint_interface(int, char **);
-int paint_error(char *);
-int paint_delay(int);
-int paint_lock(char *, int);
-int paint_unlock(void);
-int paint_colortable(int);
-
-/* colors.c */
-int Pset_color_levels(int);
-int Pcolorlevels(int *, int *, int *);
-int Pcolormultipliers(int *, int *, int *);
-int Pcolornum(double, double, double);
-int Pcolorvalue(int, float *, float *, float *);
-int Pncolors(void);
-
-/* io.c */
-int Pclose(void);
-int Pflush(void);
-int Pout(char *, int);
-int Poutc(int);
-int Pouts(char *);
-
-#ifdef PAINT_DRIVERLIB
-int Popen(char *);
-int Prle(unsigned char *, int);
-#else
-/* open.c */
-int Popen(void);
-int Prle(unsigned char, int);
 #endif

Modified: grass/trunk/include/arraystats.h
===================================================================
--- grass/trunk/include/arraystats.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/arraystats.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_ARRAYSTATS_H
+#define GRASS_ARRAYSTATS_H
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
@@ -19,14 +22,6 @@
     double stdev;
 };
 
-double class_apply_algorithm(char *, double *, int, int *, double *);
-int class_interval(double *, int, int, double *);
-int class_quant(double *, int, int, double *);
-double class_discont(double *, int, int, double *);
-double class_stdev(double *, int, int, double *);
-int class_equiprob(double *, int, int *, double *);
+#include <grass/defs/arraystats.h>
 
-int class_frequencies(double *, int, int, double *, int *);
-
-void eqdrt(double[], double[], int, int, double *);
-void basic_stats(double *, int, struct GASTATS *);
+#endif

Modified: grass/trunk/include/bitmap.h
===================================================================
--- grass/trunk/include/bitmap.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/bitmap.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,5 +1,5 @@
-#ifndef __GRASS_BITMAP__
-#define __GRASS_BITMAP__
+#ifndef GRASS_BITMAP_H
+#define GRASS_BITMAP_H
 
 #define BM_MAGIC  2
 
@@ -37,24 +37,6 @@
 #include <stdio.h>
 #endif
 
-/* bitmap.c */
-struct BM *BM_create(int, int);
-int BM_destroy(struct BM *);
-int BM_set_mode(int, int);
-int BM_set(struct BM *, int, int, int);
-int BM_get(struct BM *, int, int);
-int BM_get_map_size(struct BM *);
-int BM_file_write(FILE *, struct BM *);
-struct BM *BM_file_read(FILE *);
+#include <grass/defs/bitmap.h>
 
-/* sparse.c */
-struct BM *BM_create_sparse(int, int);
-int BM_destroy_sparse(struct BM *);
-int BM_set_sparse(struct BM *, int, int, int);
-int BM_get_sparse(struct BM *, int, int);
-int BM_get_map_size_sparse(struct BM *);
-int BM_dump_map_sparse(struct BM *);
-int BM_dump_map_row_sparse(struct BM *, int);
-int BM_file_write_sparse(FILE *, struct BM *);
-
-#endif /*  __GRASS_BITMAP__  */
+#endif /*  GRASS_BITMAP_H  */

Modified: grass/trunk/include/blas.h
===================================================================
--- grass/trunk/include/blas.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/blas.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,5 +1,5 @@
-#ifndef BLAS_WRAP_
-#define BLAS_WRAP_
+#ifndef BLAS_WRAP_H
+#define BLAS_WRAP_H
 
 extern int caxpy_(integer * n, complex * ca, complex * cx, integer * incx,
 		  complex * cy, integer * incy);

Modified: grass/trunk/include/btree.h
===================================================================
--- grass/trunk/include/btree.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/btree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_BTREE_H
+#define GRASS_BTREE_H
+
 typedef struct
 {
     void *key;
@@ -16,20 +19,6 @@
     int (*cmp) (const void *, const void *);	/* routine to compare keys */
 } BTREE;
 
-/* create.c */
-int btree_create(BTREE *, int (*)(const void *, const void *), int);
+#include <grass/defs/btree.h>
 
-/* find.c */
-int btree_find(const BTREE *, const void *, void **);
-
-/* free.c */
-int btree_free(BTREE *);
-
-/* next.c */
-int btree_next(BTREE *, void **, void **);
-
-/* rewind.c */
-int btree_rewind(BTREE *);
-
-/* update.c */
-int btree_update(BTREE *, const void *, int, const void *, int);
+#endif

Modified: grass/trunk/include/cdhc.h
===================================================================
--- grass/trunk/include/cdhc.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/cdhc.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,37 +1,6 @@
-#ifndef __CDHC_H__
-#define __CDHC_H__
+#ifndef CDHC_H
+#define CDHC_H
 
+#include <grass/defs/cdhc.h>
 
-double enormp(double);
-double normp(double);
-double xinormal(double);
-double *dmax(double *, int);
-double *dmax_exp(double *, int);
-double *omnibus_moments(double *, int);
-double *geary_test(double *, int);
-double *dagostino_d(double *, int);
-double *extreme(double *, int);
-double *kuipers_v(double *, int);
-double *watson_u2(double *, int);
-double *durbins_exact(double *, int);
-double *anderson_darling(double *, int);
-double *cramer_von_mises(double *, int);
-double *kolmogorov_smirnov(double *, int);
-double *chi_square(double *, int);
-double *shapiro_wilk(double *, int);
-double *shapiro_francia(double *, int);
-double *weisberg_bingham(double *, int);
-double *royston(double *, int);
-double *shapiro_wilk_exp(double *, int);
-double *kolmogorov_smirnov_exp(double *, int);
-double *cramer_von_mises_exp(double *, int);
-double *kuipers_v_exp(double *, int);
-double *watson_u2_exp(double *, int);
-double *anderson_darling_exp(double *, int);
-double *chi_square_exp(double *, int);
-double *mod_maxlik_ratio(double *, int);
-double *coeff_variation(double *, int);
-double *kotz_families(double *, int);
-
-
-#endif /* __CDHC_H__ */
+#endif /* CDHC_H */

Modified: grass/trunk/include/cluster.h
===================================================================
--- grass/trunk/include/cluster.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/cluster.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -30,53 +30,6 @@
     double percent_stable;      /* percentage stable */
 };
 
-/* c_assign.c */
-int I_cluster_assign(struct Cluster *, int *);
+#include <grass/defs/cluster.h>
 
-/* c_begin.c */
-int I_cluster_begin(struct Cluster *, int);
-
-/* c_clear.c */
-int I_cluster_clear(struct Cluster *);
-
-/* c_distinct.c */
-int I_cluster_distinct(struct Cluster *, double);
-
-/* c_exec.c */
-int I_cluster_exec(struct Cluster *, int, int, double, double, int, int (*)(),
-		   int *);
-/* c_execmem.c */
-int I_cluster_exec_allocate(struct Cluster *);
-int I_cluster_exec_free(struct Cluster *);
-
-/* c_means.c */
-int I_cluster_means(struct Cluster *);
-
-/* c_merge.c */
-int I_cluster_merge(struct Cluster *);
-
-/* c_nclasses.c */
-int I_cluster_nclasses(struct Cluster *, int);
-
-/* c_point.c */
-int I_cluster_point(struct Cluster *, DCELL *);
-int I_cluster_begin_point_set(struct Cluster *, int);
-int I_cluster_point_part(struct Cluster *, DCELL, int, int);
-int I_cluster_end_point_set(struct Cluster *, int);
-
-/* c_reassign.c */
-int I_cluster_reassign(struct Cluster *, int *);
-
-/* c_reclass.c */
-int I_cluster_reclass(struct Cluster *, int);
-
-/* c_sep.c */
-double I_cluster_separation(struct Cluster *, int, int);
-
-/* c_sig.c */
-int I_cluster_signatures(struct Cluster *);
-
-/* c_sum2.c */
-int I_cluster_sum2(struct Cluster *);
-
 #endif

Deleted: grass/trunk/include/codes.h
===================================================================
--- grass/trunk/include/codes.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/codes.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +0,0 @@
-/* exit codes */
-#define OK 0
-#define ERROR 1

Modified: grass/trunk/include/colors.h
===================================================================
--- grass/trunk/include/colors.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/colors.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -41,10 +41,6 @@
     int number;
 };
 
-int G_num_standard_colors(void);
-struct color_rgb G_standard_color_rgb(int);
-int G_num_standard_color_names(void);
-const struct color_name *G_standard_color_name(int);
-int G_str_to_color(const char *, int *, int *, int *);
+#include <grass/defs/colors.h>
 
 #endif

Modified: grass/trunk/include/datetime.h
===================================================================
--- grass/trunk/include/datetime.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/datetime.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -25,6 +25,6 @@
 } DateTime;
 
 /* prototype of functions */
-#include <grass/P_datetime.h>
+#include <grass/defs/datetime.h>
 
 #endif

Modified: grass/trunk/include/dbmi.h
===================================================================
--- grass/trunk/include/dbmi.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/dbmi.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,6 +15,10 @@
 #include <stdio.h>
 #include <grass/gis.h>
 
+/* exit codes */
+#define OK 0
+#define ERROR 1
+
 #define DB_VERSION "0"
 
 #define DB_DEFAULT_DRIVER "sqlite"
@@ -311,6 +315,6 @@
     char **label;		/* array of new category labels */
 } dbRclsRule;
 
-#include <grass/dbmidefs.h>
+#include <grass/defs/dbmi.h>
 
 #endif

Deleted: grass/trunk/include/dbmidefs.h
===================================================================
--- grass/trunk/include/dbmidefs.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/dbmidefs.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,410 +0,0 @@
-#ifndef _PROTO_DBMI_H_
-#define _PROTO_DBMI_H_
-
-void db_Cstring_to_lowercase(char *);
-void db_Cstring_to_uppercase(char *);
-int db_add_column(dbDriver *, dbString *, dbColumn *);
-void db__add_cursor_to_driver_state(dbCursor *);
-int db_alloc_cursor_column_flags(dbCursor *);
-int db_alloc_cursor_table(dbCursor *, int);
-int db_append_table_column(dbTable * , dbColumn *);
-dbDirent *db_alloc_dirent_array(int);
-dbHandle *db_alloc_handle_array(int);
-dbIndex *db_alloc_index_array(int);
-int db_alloc_index_columns(dbIndex *, int);
-dbString *db_alloc_string_array(int);
-dbTable *db_alloc_table(int);
-int db_append_string(dbString *, const char *);
-void db_auto_print_errors(int);
-void db_auto_print_protocol_errors(int);
-int db_bind_update(dbCursor *);
-void *db_calloc(int, int);
-int db_CatValArray_alloc(dbCatValArray *, int);
-int db_CatValArray_realloc(dbCatValArray *, int);
-void db_CatValArray_free(dbCatValArray *);
-void db_CatValArray_init(dbCatValArray *);
-void db_CatValArray_sort(dbCatValArray *);
-int db_CatValArray_sort_by_value(dbCatValArray *);
-int db_CatValArray_get_value(dbCatValArray *, int, dbCatVal **);
-int db_CatValArray_get_value_int(dbCatValArray *, int, int *);
-int db_CatValArray_get_value_double(dbCatValArray *, int,
-				    double *);
-void db_char_to_lowercase(char *);
-void db_char_to_uppercase(char *);
-void db_clear_error(void);
-dbTable *db_clone_table(dbTable *);
-void db__close_all_cursors(void);
-int db_close_cursor(dbCursor *);
-int db_close_database(dbDriver *);
-int db_close_database_shutdown_driver(dbDriver *);
-int db_column_sqltype(dbDriver *, const char *, const char *);
-int db_column_Ctype(dbDriver *, const char *, const char *);
-int db_convert_Cstring_to_column_default_value(const char *,
-					       dbColumn *);
-int db_convert_Cstring_to_column_value(const char *,
-				       dbColumn *);
-int db_convert_Cstring_to_value(const char *, int,
-				dbValue *);
-int db_convert_Cstring_to_value_datetime(const char *, int,
-					 dbValue *);
-int db_convert_column_default_value_to_string(dbColumn *,
-					      dbString *);
-int db_convert_column_value_to_string(dbColumn *, dbString *);
-int db_convert_value_datetime_into_string(dbValue *, int,
-					  dbString *);
-int db_convert_value_to_string(dbValue *, int,
-			       dbString *);
-dbColumn *db_copy_column(dbColumn *, dbColumn *);
-void db_copy_dbmscap_entry(dbDbmscap *, dbDbmscap *);
-int db_copy_string(dbString *, const dbString *);
-int db_table_to_sql(dbTable *, dbString *);
-int db_copy_table(const char *, const char *, const char *, const char *,
-		  const char *, const char *);
-int db_copy_table_where(const char *, const char *, const char *,
-			const char *, const char *, const char *,
-			const char *);
-int db_copy_table_select(const char *, const char *, const char *,
-			 const char *, const char *, const char *,
-			 const char *);
-int db_copy_table_by_ints(const char *, const char *, const char *,
-			  const char *, const char *, const char *,
-			  const char *, int *, int);
-void db_copy_value(dbValue *, dbValue *);
-int db_create_database(dbDriver *, dbHandle *);
-int db_create_index(dbDriver *, dbIndex *);
-int db_create_index2(dbDriver *, const char *,
-		     const char *);
-int db_create_table(dbDriver *, dbTable *);
-int db_d_add_column(void);
-int db_d_bind_update(void);
-const char *db_dbmscap_filename(void);
-int db_d_close_cursor(void);
-int db_d_close_database(void);
-int db_d_create_database(void);
-int db_d_create_index(void);
-int db_d_create_table(void);
-int db_d_delete(void);
-int db_d_delete_database(void);
-int db_d_describe_table(void);
-int db_d_drop_column(void);
-int db_d_drop_index(void);
-int db_d_drop_table(void);
-void db_debug(const char *);
-void db_debug_off(void);
-void db_debug_on(void);
-int db_delete(dbCursor *);
-int db_delete_database(dbDriver *, dbHandle *);
-int db_delete_table(const char *, const char *, const char *);
-int db_describe_table(dbDriver *, dbString *, dbTable **);
-int db_d_execute_immediate(void);
-int db_d_begin_transaction(void);
-int db_d_commit_transaction(void);
-int db_d_fetch(void);
-int db_d_find_database(void);
-int db_d_get_num_rows(void);
-int db_d_grant_on_table(void);
-int db_d_insert(void);
-dbDirent *db_dirent(const char *, int *);
-int db_d_list_databases(void);
-int db_d_list_indexes(void);
-int db_d_list_tables(void);
-int db_d_open_database(void);
-int db_d_open_insert_cursor(void);
-int db_d_open_select_cursor(void);
-int db_d_open_update_cursor(void);
-void db_double_quote_string(dbString *);
-int db_driver(int, char **);
-
-int db_driver_mkdir(const char *, int, int);
-int db_drop_column(dbDriver *, dbString *,
-		   dbString *);
-void db__drop_cursor_from_driver_state(dbCursor *);
-int db_drop_index(dbDriver *, dbString *);
-int db_drop_table(dbDriver *, dbString *);
-void db_drop_token(dbToken);
-int db_d_update(void);
-int db_d_version(void);
-int db_enlarge_string(dbString *, int);
-void db_error(const char *);
-int db_execute_immediate(dbDriver *, dbString *);
-int db_begin_transaction(dbDriver *);
-int db_commit_transaction(dbDriver *);
-int db_fetch(dbCursor *, int, int *);
-int db_find_database(dbDriver *, dbHandle *, int *);
-dbAddress db_find_token(dbToken);
-void db_free(void *);
-void db_free_column(dbColumn *);
-void db_free_cursor(dbCursor *);
-void db_free_cursor_column_flags(dbCursor *);
-void db_free_dbmscap(dbDbmscap *);
-void db_free_dirent_array(dbDirent *, int);
-void db_free_handle(dbHandle *);
-void db_free_handle_array(dbHandle *, int);
-void db_free_index(dbIndex *);
-void db_free_index_array(dbIndex *, int);
-void db_free_string(dbString *);
-void db_free_string_array(dbString *, int);
-void db_free_table(dbTable *);
-int db_get_column(dbDriver *, const char *, const char *,
-		  dbColumn **);
-dbValue *db_get_column_default_value(dbColumn *);
-const char *db_get_column_description(dbColumn *);
-int db_get_column_host_type(dbColumn *);
-int db_get_column_length(dbColumn *);
-const char *db_get_column_name(dbColumn *);
-int db_get_column_precision(dbColumn *);
-int db_get_column_scale(dbColumn *);
-int db_get_column_select_priv(dbColumn *);
-int db_get_column_sqltype(dbColumn *);
-int db_get_column_update_priv(dbColumn *);
-dbValue *db_get_column_value(dbColumn *);
-int db_get_connection(dbConnection *);
-int db_get_cursor_number_of_columns(dbCursor *);
-dbTable *db_get_cursor_table(dbCursor *);
-dbToken db_get_cursor_token(dbCursor *);
-const char *db_get_default_driver_name(void);
-const char *db_get_default_database_name(void);
-const char *db_get_default_schema_name(void);
-const char *db_get_default_group_name(void);
-dbDriverState *db__get_driver_state(void);
-int db_get_error_code(void);
-const char *db_get_error_msg(void);
-const char *db_get_error_who(void);
-const char *db_get_handle_dbname(dbHandle *);
-const char *db_get_handle_dbschema(dbHandle *);
-const char *db_get_index_column_name(dbIndex *, int);
-const char *db_get_index_name(dbIndex *);
-int db_get_index_number_of_columns(dbIndex *);
-const char *db_get_index_table_name(dbIndex *);
-int db_get_num_rows(dbCursor *);
-char *db_get_string(const dbString *);
-dbColumn *db_get_table_column(dbTable *, int);
-dbColumn *db_get_table_column_by_name(dbTable *, const char*);
-int db_get_table_delete_priv(dbTable *);
-const char *db_get_table_description(dbTable *);
-int db_get_table_insert_priv(dbTable *);
-const char *db_get_table_name(dbTable *);
-int db_get_table_number_of_columns(dbTable *);
-int db_get_table_number_of_rows(dbDriver *, dbString *);
-int db_get_table_select_priv(dbTable *);
-int db_get_table_update_priv(dbTable *);
-double db_get_value_as_double(dbValue *, int);
-int db_get_value_day(dbValue *);
-double db_get_value_double(dbValue *);
-int db_get_value_hour(dbValue *);
-int db_get_value_int(dbValue *);
-int db_get_value_minute(dbValue *);
-int db_get_value_month(dbValue *);
-double db_get_value_seconds(dbValue *);
-const char *db_get_value_string(dbValue *);
-int db_get_value_year(dbValue *);
-int db_grant_on_table(dbDriver *, const char *, int,
-		      int);
-int db_has_dbms(void);
-void db_init_column(dbColumn *);
-void db_init_cursor(dbCursor *);
-void db__init_driver_state(void);
-void db_init_handle(dbHandle *);
-void db_init_index(dbIndex *);
-void db_init_string(dbString *);
-void db_init_table(dbTable *);
-int db_insert(dbCursor *);
-void db_interval_range(int, int *, int *);
-int db_isdir(const char *);
-int db_legal_tablename(const char *);
-int db_list_databases(dbDriver *, dbString *, int,
-		      dbHandle **, int *);
-const char *db_list_drivers(void);
-int db_list_indexes(dbDriver *, dbString *, dbIndex **,
-		    int *);
-int db_list_tables(dbDriver *, dbString **, int *,
-		   int);
-void *db_malloc(int);
-void db__mark_database_closed(void);
-void db__mark_database_open(const char *, const char *);
-void db_memory_error(void);
-dbToken db_new_token(dbAddress);
-int db_nocase_compare(const char *, const char *);
-void db_noproc_error(int);
-int db_open_database(dbDriver *, dbHandle *);
-int db_open_insert_cursor(dbDriver *, dbCursor *);
-int db_open_select_cursor(dbDriver *, dbString *,
-			  dbCursor *, int);
-int db_open_update_cursor(dbDriver *, dbString *_name,
-			  dbString *, dbCursor *, int);
-void db_print_column_definition(FILE *, dbColumn *);
-void db_print_error(void);
-void db_print_index(FILE *, dbIndex *);
-void db_print_table_definition(FILE *, dbTable *);
-void db_procedure_not_implemented(const char *);
-void db_protocol_error(void);
-dbDbmscap *db_read_dbmscap(void);
-void *db_realloc(void *, int);
-int db__recv_char(char *);
-int db__recv_column_default_value(dbColumn *);
-int db__recv_column_definition(dbColumn *);
-int db__recv_column_value(dbColumn *);
-int db__recv_datetime(dbDateTime *);
-int db__recv_double(double *);
-int db__recv_double_array(double **, int *);
-int db__recv_float(float *);
-int db__recv_float_array(float **, int *);
-int db__recv_handle(dbHandle *);
-int db__recv_index(dbIndex *);
-int db__recv_index_array(dbIndex **, int *);
-int db__recv_int(int *);
-int db__recv_int_array(int **, int *);
-int db__recv_procnum(int *);
-int db__recv_return_code(int *);
-int db__recv_short(short *);
-int db__recv_short_array(short **, int *);
-int db__recv_string(dbString *);
-int db__recv_string_array(dbString **, int *);
-int db__recv_table_data(dbTable *);
-int db__recv_table_definition(dbTable **);
-int db__recv_token(dbToken *);
-int db__recv_value(dbValue *, int);
-int db__send_Cstring(const char *);
-int db__send_char(int);
-int db__send_column_default_value(dbColumn *);
-int db__send_column_definition(dbColumn *);
-int db__send_column_value(dbColumn *);
-int db__send_datetime(dbDateTime *);
-int db__send_double(double);
-int db__send_double_array(const double *, int);
-int db__send_failure(void);
-int db__send_float(float);
-int db__send_float_array(const float *, int);
-int db__send_handle(dbHandle *);
-int db__send_index(dbIndex *);
-int db__send_index_array(dbIndex *, int);
-int db__send_int(int);
-int db__send_int_array(const int *, int);
-int db__send_procedure_not_implemented(int);
-int db__send_procedure_ok(int);
-int db__send_short(int);
-int db__send_short_array(const short *, int);
-int db__send_string(dbString *);
-int db__send_string_array(dbString *, int);
-int db__send_success(void);
-int db__send_table_data(dbTable *);
-int db__send_table_definition(dbTable *);
-int db__send_token(dbToken *);
-int db__send_value(dbValue *, int);
-int db_select_CatValArray(dbDriver *, const char *, const char *,
-			  const char *, const char *,
-			  dbCatValArray *);
-int db_select_int(dbDriver *, const char *, const char *,
-		  const char *, int **);
-int db_select_value(dbDriver *, const char *, const char *,
-		    int, const char *, dbValue *);
-int db_set_column_description(dbColumn *, const char *);
-void db_set_column_has_defined_default_value(dbColumn *);
-void db_set_column_has_undefined_default_value(dbColumn *);
-void db_set_column_host_type(dbColumn *, int);
-void db_set_column_length(dbColumn *, int);
-int db_set_column_name(dbColumn *, const char *);
-void db_set_column_null_allowed(dbColumn *);
-void db_set_column_precision(dbColumn *, int);
-void db_set_column_scale(dbColumn *, int);
-void db_set_column_select_priv_granted(dbColumn *);
-void db_set_column_select_priv_not_granted(dbColumn *);
-void db_set_column_sqltype(dbColumn *, int);
-void db_set_column_update_priv_granted(dbColumn *);
-void db_set_column_update_priv_not_granted(dbColumn *);
-void db_set_column_use_default_value(dbColumn *);
-int db_set_connection(dbConnection *);
-void db_set_cursor_column_flag(dbCursor *, int);
-void db_set_cursor_column_for_update(dbCursor *, int);
-void db_set_cursor_mode(dbCursor *, int);
-void db_set_cursor_mode_insensitive(dbCursor *);
-void db_set_cursor_mode_scroll(dbCursor *);
-void db_set_cursor_table(dbCursor *, dbTable *);
-void db_set_cursor_token(dbCursor *, dbToken);
-void db_set_cursor_type_insert(dbCursor *);
-void db_set_cursor_type_readonly(dbCursor *);
-void db_set_cursor_type_update(dbCursor *);
-int db_set_default_connection(void);
-void db_set_error_who(const char *);
-int db_set_handle(dbHandle *, const char *, const char *);
-int db_set_index_column_name(dbIndex *, int,
-			     const char *);
-int db_set_index_name(dbIndex *, const char *);
-int db_set_index_table_name(dbIndex *, const char *);
-int db_set_index_type_non_unique(dbIndex *);
-int db_set_index_type_unique(dbIndex *);
-void db__set_protocol_fds(FILE *, FILE *);
-int db_set_string(dbString *, const char *);
-int db_set_string_no_copy(dbString *, char *);
-int db_set_table_column(dbTable *, int, dbColumn *);
-void db_set_table_delete_priv_granted(dbTable *);
-void db_set_table_delete_priv_not_granted(dbTable *);
-int db_set_table_description(dbTable *, const char *);
-void db_set_table_insert_priv_granted(dbTable *);
-void db_set_table_insert_priv_not_granted(dbTable *);
-int db_set_table_name(dbTable *, const char *);
-void db_set_table_select_priv_granted(dbTable *);
-void db_set_table_select_priv_not_granted(dbTable *);
-void db_set_table_update_priv_granted(dbTable *);
-void db_set_table_update_priv_not_granted(dbTable *);
-void db_set_value_datetime_current(dbValue *);
-void db_set_value_datetime_not_current(dbValue *);
-void db_set_value_day(dbValue *, int);
-void db_set_value_double(dbValue *, double);
-void db_set_value_hour(dbValue *, int);
-void db_set_value_int(dbValue *, int);
-void db_set_value_minute(dbValue *, int);
-void db_set_value_month(dbValue *, int);
-void db_set_value_not_null(dbValue *);
-void db_set_value_null(dbValue *);
-void db_set_value_seconds(dbValue *, double);
-int db_set_value_string(dbValue *, const char *);
-void db_set_value_year(dbValue *, int);
-int db_shutdown_driver(dbDriver *);
-const char *db_sqltype_name(int);
-int db_sqltype_to_Ctype(int);
-dbDriver *db_start_driver(const char *);
-dbDriver *db_start_driver_open_database(const char *, const char *);
-int db__start_procedure_call(int);
-char *db_store(const char *);
-void db_strip(char *);
-void db_syserror(const char *);
-int db_table_exists(const char *, const char *,
-		    const char *);
-int db_test_column_has_default_value(dbColumn *);
-int db_test_column_has_defined_default_value(dbColumn *);
-int db_test_column_has_undefined_default_value(dbColumn *);
-int db_test_column_null_allowed(dbColumn *);
-int db_test_column_use_default_value(dbColumn *);
-int db_test_cursor_any_column_flag(dbCursor *);
-int db_test_cursor_any_column_for_update(dbCursor *);
-int db_test_cursor_column_flag(dbCursor *, int);
-int db_test_cursor_column_for_update(dbCursor *, int);
-int db_test_cursor_mode_insensitive(dbCursor *);
-int db_test_cursor_mode_scroll(dbCursor *);
-int db_test_cursor_type_fetch(dbCursor *);
-int db_test_cursor_type_insert(dbCursor *);
-int db_test_cursor_type_update(dbCursor *);
-int db__test_database_open(void);
-int db_test_index_type_unique(dbIndex *);
-int db_test_value_datetime_current(dbValue *);
-int db_test_value_isnull(dbValue *);
-void db_unset_column_has_default_value(dbColumn *);
-void db_unset_column_null_allowed(dbColumn *);
-void db_unset_column_use_default_value(dbColumn *);
-void db_unset_cursor_column_flag(dbCursor *, int);
-void db_unset_cursor_column_for_update(dbCursor *, int);
-void db_unset_cursor_mode(dbCursor *);
-void db_unset_cursor_mode_insensitive(dbCursor *);
-void db_unset_cursor_mode_scroll(dbCursor *);
-int db_update(dbCursor *);
-int db_gversion(dbDriver *, dbString *,
-		dbString *);
-const char *db_whoami(void);
-void db_zero(void *, int);
-void db_zero_string(dbString *);
-unsigned int db_sizeof_string(const dbString *);
-int db_set_login(const char *, const char *, const char *, const char *);
-int db_get_login(const char *, const char *, const char **, const char **);
-
-#endif

Copied: grass/trunk/include/defs/Paintlib.h (from rev 49164, grass/trunk/include/Paintlib.h)
===================================================================
--- grass/trunk/include/defs/Paintlib.h	                        (rev 0)
+++ grass/trunk/include/defs/Paintlib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,141 @@
+#ifndef GRASS_PAINTLIBDEFS_H
+#define GRASS_PAINTLIBDEFS_H
+
+/* From applib */
+/* alpha.c */
+int Palpha(void);
+
+/* close.c */
+int Pclose(void);
+
+/* colorlevel.c */
+int Pcolorlevels(int *, int *, int *);
+
+/* colormult.c */
+int Pcolormultipliers(int *, int *, int *);
+
+/* colornum.c */
+int Pcolornum(double, double, double);
+
+/* colortable.c */
+int Pcolortable(unsigned char *, unsigned char *, unsigned char *,
+		unsigned char *, int);
+/* colorvalue.c */
+int Pcolorvalue(int, float *, float *, float *);
+
+/* connect.c */
+int Pconnect(void);
+int Pdisconnect(void);
+
+/* data.c */
+int Pdata_begin(void);
+int Pdata(unsigned char *, int);
+int Pdata_end(void);
+
+/* device.c */
+int P__closedev(void);
+int P__errordev(char *);
+int P__flushdev(void);
+int P__opendev(char *, char *[], char *);
+int P__readdev(void *, int);
+int P__writedev(void *, int);
+
+/* flush.c */
+int Pflush(void);
+
+/* hres.c */
+double Phres(void);
+
+/* io.c */
+int P__opcode(int);
+int P__get(char *, int);
+int P__gets(char *);
+int P__geti(void);
+double P__getf(void);
+int P__send(char *, int);
+int P__sendi(int);
+int P__sendf(double);
+int P__sends(char *);
+int P__transparent(int);
+
+/* lock.c */
+int Plock(void);
+
+/* misc.c */
+int Pblockspace(void);
+int Pblocksize(void);
+int Pnblocks(void);
+int Ptextspace(void);
+int Ptextfudge(void);
+double Ptextscale(void);
+
+/* nchars.c */
+int Pnchars(void);
+
+/* ncolors.c */
+int Pncolors(void);
+
+/* npixels.c */
+int Pnpixels(int *, int *);
+
+/* painter.c */
+char *Ppainter_name(void);
+
+/* pictsize.c */
+int Ppictsize(int, int);
+
+/* raster.c */
+int Praster(void);
+
+/* rle.c */
+int Prle_begin(void);
+int Prle_end(void);
+int Prle_set_cols(int);
+
+/* text.c */
+int Ptext(char *);
+
+/* vres.c */
+double Pvres(void);
+
+/* From Driver/{whatever} code */
+/* init.c */
+int Pinit(void);
+
+/* finish.c */
+int Pfinish(void);
+
+/* From driverlib */
+/* interface.c */
+int paint_interface(int, char **);
+int paint_error(char *);
+int paint_delay(int);
+int paint_lock(char *, int);
+int paint_unlock(void);
+int paint_colortable(int);
+
+/* colors.c */
+int Pset_color_levels(int);
+int Pcolorlevels(int *, int *, int *);
+int Pcolormultipliers(int *, int *, int *);
+int Pcolornum(double, double, double);
+int Pcolorvalue(int, float *, float *, float *);
+int Pncolors(void);
+
+/* io.c */
+int Pclose(void);
+int Pflush(void);
+int Pout(char *, int);
+int Poutc(int);
+int Pouts(char *);
+
+#ifdef PAINT_DRIVERLIB
+int Popen(char *);
+int Prle(unsigned char *, int);
+#else
+/* open.c */
+int Popen(void);
+int Prle(unsigned char, int);
+#endif
+
+#endif

Copied: grass/trunk/include/defs/arraystats.h (from rev 49164, grass/trunk/include/arraystats.h)
===================================================================
--- grass/trunk/include/defs/arraystats.h	                        (rev 0)
+++ grass/trunk/include/defs/arraystats.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,16 @@
+#ifndef GRASS_ARRAYSTATSDEFS_H
+#define GRASS_ARRAYSTATSDEFS_H
+
+double class_apply_algorithm(char *, double *, int, int *, double *);
+int class_interval(double *, int, int, double *);
+int class_quant(double *, int, int, double *);
+double class_discont(double *, int, int, double *);
+double class_stdev(double *, int, int, double *);
+int class_equiprob(double *, int, int *, double *);
+
+int class_frequencies(double *, int, int, double *, int *);
+
+void eqdrt(double[], double[], int, int, double *);
+void basic_stats(double *, int, struct GASTATS *);
+
+#endif

Copied: grass/trunk/include/defs/bitmap.h (from rev 49164, grass/trunk/include/bitmap.h)
===================================================================
--- grass/trunk/include/defs/bitmap.h	                        (rev 0)
+++ grass/trunk/include/defs/bitmap.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,24 @@
+#ifndef GRASS_BITMAPDEFS_H
+#define GRASS_BITMAPDEFS_H
+
+/* bitmap.c */
+struct BM *BM_create(int, int);
+int BM_destroy(struct BM *);
+int BM_set_mode(int, int);
+int BM_set(struct BM *, int, int, int);
+int BM_get(struct BM *, int, int);
+int BM_get_map_size(struct BM *);
+int BM_file_write(FILE *, struct BM *);
+struct BM *BM_file_read(FILE *);
+
+/* sparse.c */
+struct BM *BM_create_sparse(int, int);
+int BM_destroy_sparse(struct BM *);
+int BM_set_sparse(struct BM *, int, int, int);
+int BM_get_sparse(struct BM *, int, int);
+int BM_get_map_size_sparse(struct BM *);
+int BM_dump_map_sparse(struct BM *);
+int BM_dump_map_row_sparse(struct BM *, int);
+int BM_file_write_sparse(FILE *, struct BM *);
+
+#endif /*  GRASS_BITMAPDEFS_H  */

Copied: grass/trunk/include/defs/btree.h (from rev 49164, grass/trunk/include/btree.h)
===================================================================
--- grass/trunk/include/defs/btree.h	                        (rev 0)
+++ grass/trunk/include/defs/btree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,22 @@
+#ifndef GRASS_BTREEDEFS_H
+#define GRASS_BTREEDEFS_H
+
+/* create.c */
+int btree_create(BTREE *, int (*)(const void *, const void *), int);
+
+/* find.c */
+int btree_find(const BTREE *, const void *, void **);
+
+/* free.c */
+int btree_free(BTREE *);
+
+/* next.c */
+int btree_next(BTREE *, void **, void **);
+
+/* rewind.c */
+int btree_rewind(BTREE *);
+
+/* update.c */
+int btree_update(BTREE *, const void *, int, const void *, int);
+
+#endif

Copied: grass/trunk/include/defs/cdhc.h (from rev 49164, grass/trunk/include/cdhc.h)
===================================================================
--- grass/trunk/include/defs/cdhc.h	                        (rev 0)
+++ grass/trunk/include/defs/cdhc.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,35 @@
+#ifndef CDHCDEFS_H
+#define CDHCDEFS_H
+
+double enormp(double);
+double normp(double);
+double xinormal(double);
+double *dmax(double *, int);
+double *dmax_exp(double *, int);
+double *omnibus_moments(double *, int);
+double *geary_test(double *, int);
+double *dagostino_d(double *, int);
+double *extreme(double *, int);
+double *kuipers_v(double *, int);
+double *watson_u2(double *, int);
+double *durbins_exact(double *, int);
+double *anderson_darling(double *, int);
+double *cramer_von_mises(double *, int);
+double *kolmogorov_smirnov(double *, int);
+double *chi_square(double *, int);
+double *shapiro_wilk(double *, int);
+double *shapiro_francia(double *, int);
+double *weisberg_bingham(double *, int);
+double *royston(double *, int);
+double *shapiro_wilk_exp(double *, int);
+double *kolmogorov_smirnov_exp(double *, int);
+double *cramer_von_mises_exp(double *, int);
+double *kuipers_v_exp(double *, int);
+double *watson_u2_exp(double *, int);
+double *anderson_darling_exp(double *, int);
+double *chi_square_exp(double *, int);
+double *mod_maxlik_ratio(double *, int);
+double *coeff_variation(double *, int);
+double *kotz_families(double *, int);
+
+#endif /* CDHCDEFS_H */

Copied: grass/trunk/include/defs/cluster.h (from rev 49164, grass/trunk/include/cluster.h)
===================================================================
--- grass/trunk/include/defs/cluster.h	                        (rev 0)
+++ grass/trunk/include/defs/cluster.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,53 @@
+#ifndef GRASS_CLUSTERDEFS_H
+#define GRASS_CLUSTERDEFS_H
+
+/* c_assign.c */
+int I_cluster_assign(struct Cluster *, int *);
+
+/* c_begin.c */
+int I_cluster_begin(struct Cluster *, int);
+
+/* c_clear.c */
+int I_cluster_clear(struct Cluster *);
+
+/* c_distinct.c */
+int I_cluster_distinct(struct Cluster *, double);
+
+/* c_exec.c */
+int I_cluster_exec(struct Cluster *, int, int, double, double, int, int (*)(),
+		   int *);
+/* c_execmem.c */
+int I_cluster_exec_allocate(struct Cluster *);
+int I_cluster_exec_free(struct Cluster *);
+
+/* c_means.c */
+int I_cluster_means(struct Cluster *);
+
+/* c_merge.c */
+int I_cluster_merge(struct Cluster *);
+
+/* c_nclasses.c */
+int I_cluster_nclasses(struct Cluster *, int);
+
+/* c_point.c */
+int I_cluster_point(struct Cluster *, DCELL *);
+int I_cluster_begin_point_set(struct Cluster *, int);
+int I_cluster_point_part(struct Cluster *, DCELL, int, int);
+int I_cluster_end_point_set(struct Cluster *, int);
+
+/* c_reassign.c */
+int I_cluster_reassign(struct Cluster *, int *);
+
+/* c_reclass.c */
+int I_cluster_reclass(struct Cluster *, int);
+
+/* c_sep.c */
+double I_cluster_separation(struct Cluster *, int, int);
+
+/* c_sig.c */
+int I_cluster_signatures(struct Cluster *);
+
+/* c_sum2.c */
+int I_cluster_sum2(struct Cluster *);
+
+#endif

Copied: grass/trunk/include/defs/colors.h (from rev 49164, grass/trunk/include/colors.h)
===================================================================
--- grass/trunk/include/defs/colors.h	                        (rev 0)
+++ grass/trunk/include/defs/colors.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,10 @@
+#ifndef GRASS_COLORSDEFS_H
+#define GRASS_COLORSDEFS_H
+
+int G_num_standard_colors(void);
+struct color_rgb G_standard_color_rgb(int);
+int G_num_standard_color_names(void);
+const struct color_name *G_standard_color_name(int);
+int G_str_to_color(const char *, int *, int *, int *);
+
+#endif

Copied: grass/trunk/include/defs/datetime.h (from rev 49164, grass/trunk/include/datetime.h)
===================================================================
--- grass/trunk/include/defs/datetime.h	                        (rev 0)
+++ grass/trunk/include/defs/datetime.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,106 @@
+#ifndef GRASS_DATETIMEDEFS_H
+#define GRASS_DATETIMEDEFS_H
+
+/* between.c */
+int datetime_is_between(int x, int a, int b);
+
+/* change.c */
+int datetime_change_from_to(DateTime * dt, int from, int to, int round);
+
+/* copy.c */
+void datetime_copy(DateTime * src, const DateTime * dst);
+
+/* diff.c */
+int datetime_difference(const DateTime * a, const DateTime * b,
+			DateTime * result);
+
+/* error.c */
+int datetime_error(int code, char *msg);
+int datetime_error_code(void);
+char *datetime_error_msg(void);
+void datetime_clear_error(void);
+
+/* format.c */
+int datetime_format(const DateTime * dt, char *buf);
+
+/* incr1.c */
+int datetime_increment(DateTime * src, DateTime * incr);
+
+/* incr2.c */
+int datetime_is_valid_increment(const DateTime * src, const DateTime * incr);
+int datetime_check_increment(const DateTime * src, const DateTime * incr);
+
+/* incr3.c */
+int datetime_get_increment_type(const DateTime * dt, int *mode, int *from,
+				int *to, int *fracsec);
+int datetime_set_increment_type(const DateTime * src, DateTime * incr);
+
+/* local.c */
+int datetime_get_local_timezone(int *minutes);
+void datetime_get_local_time(DateTime * dt);
+
+/* misc.c */
+int datetime_days_in_month(int year, int month, int ad);
+int datetime_is_leap_year(int year, int ad);
+int datetime_days_in_year(int year, int ad);
+
+/* same.c */
+int datetime_is_same(const DateTime * src, const DateTime * dst);
+
+/* scan.c */
+int datetime_scan(DateTime * dt, const char *buf);
+
+/* sign.c */
+int datetime_is_positive(const DateTime * dt);
+int datetime_is_negative(const DateTime * dt);
+void datetime_set_positive(DateTime * dt);
+void datetime_set_negative(DateTime * dt);
+void datetime_invert_sign(DateTime * dt);
+
+/* type.c */
+int datetime_set_type(DateTime * dt, int mode, int from, int to, int fracsec);
+int datetime_get_type(const DateTime * dt, int *mode, int *from, int *to,
+		      int *fracsec);
+int datetime_is_valid_type(const DateTime * dt);
+int datetime_check_type(const DateTime * dt);
+int datetime_in_interval_year_month(int x);
+int datetime_in_interval_day_second(int x);
+int datetime_is_absolute(const DateTime * dt);
+int datetime_is_relative(const DateTime * dt);
+
+/* tz1.c */
+int datetime_check_timezone(const DateTime * dt, int minutes);
+int datetime_get_timezone(const DateTime * dt, int *minutes);
+int datetime_set_timezone(DateTime * dt, int minutes);
+int datetime_unset_timezone(DateTime * dt);
+int datetime_is_valid_timezone(int minutes);
+
+/* tz2.c */
+int datetime_change_timezone(DateTime * dt, int minutes);
+int datetime_change_to_utc(DateTime * dt);
+void datetime_decompose_timezone(int tz, int *hours, int *minutes);
+
+/* values.c */
+int datetime_check_year(const DateTime * dt, int year);
+int datetime_check_month(const DateTime * dt, int month);
+int datetime_check_day(const DateTime * dt, int day);
+int datetime_check_hour(const DateTime * dt, int hour);
+int datetime_check_minute(const DateTime * dt, int minute);
+int datetime_check_second(const DateTime * dt, double second);
+int datetime_check_fracsec(const DateTime * dt, int fracsec);
+int datetime_get_year(const DateTime * dt, int *year);
+int datetime_set_year(DateTime * dt, int year);
+int datetime_get_month(const DateTime * dt, int *month);
+int datetime_set_month(DateTime * dt, int month);
+int datetime_get_day(const DateTime * dt, int *day);
+int datetime_set_day(DateTime * dt, int day);
+int datetime_get_hour(const DateTime * dt, int *hour);
+int datetime_set_hour(DateTime * dt, int hour);
+int datetime_get_minute(const DateTime * dt, int *minute);
+int datetime_set_minute(DateTime * dt, int minute);
+int datetime_get_second(const DateTime * dt, double *second);
+int datetime_set_second(DateTime * dt, double second);
+int datetime_get_fracsec(const DateTime * dt, int *fracsec);
+int datetime_set_fracsec(DateTime * dt, int fracsec);
+
+#endif /* GRASS_DATETIMEDEFS_H */

Copied: grass/trunk/include/defs/dbmi.h (from rev 49164, grass/trunk/include/dbmidefs.h)
===================================================================
--- grass/trunk/include/defs/dbmi.h	                        (rev 0)
+++ grass/trunk/include/defs/dbmi.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,410 @@
+#ifndef GRASS_DBMIDEFS_H
+#define GRASS_DBMIDEFS_H
+
+void db_Cstring_to_lowercase(char *);
+void db_Cstring_to_uppercase(char *);
+int db_add_column(dbDriver *, dbString *, dbColumn *);
+void db__add_cursor_to_driver_state(dbCursor *);
+int db_alloc_cursor_column_flags(dbCursor *);
+int db_alloc_cursor_table(dbCursor *, int);
+int db_append_table_column(dbTable * , dbColumn *);
+dbDirent *db_alloc_dirent_array(int);
+dbHandle *db_alloc_handle_array(int);
+dbIndex *db_alloc_index_array(int);
+int db_alloc_index_columns(dbIndex *, int);
+dbString *db_alloc_string_array(int);
+dbTable *db_alloc_table(int);
+int db_append_string(dbString *, const char *);
+void db_auto_print_errors(int);
+void db_auto_print_protocol_errors(int);
+int db_bind_update(dbCursor *);
+void *db_calloc(int, int);
+int db_CatValArray_alloc(dbCatValArray *, int);
+int db_CatValArray_realloc(dbCatValArray *, int);
+void db_CatValArray_free(dbCatValArray *);
+void db_CatValArray_init(dbCatValArray *);
+void db_CatValArray_sort(dbCatValArray *);
+int db_CatValArray_sort_by_value(dbCatValArray *);
+int db_CatValArray_get_value(dbCatValArray *, int, dbCatVal **);
+int db_CatValArray_get_value_int(dbCatValArray *, int, int *);
+int db_CatValArray_get_value_double(dbCatValArray *, int,
+				    double *);
+void db_char_to_lowercase(char *);
+void db_char_to_uppercase(char *);
+void db_clear_error(void);
+dbTable *db_clone_table(dbTable *);
+void db__close_all_cursors(void);
+int db_close_cursor(dbCursor *);
+int db_close_database(dbDriver *);
+int db_close_database_shutdown_driver(dbDriver *);
+int db_column_sqltype(dbDriver *, const char *, const char *);
+int db_column_Ctype(dbDriver *, const char *, const char *);
+int db_convert_Cstring_to_column_default_value(const char *,
+					       dbColumn *);
+int db_convert_Cstring_to_column_value(const char *,
+				       dbColumn *);
+int db_convert_Cstring_to_value(const char *, int,
+				dbValue *);
+int db_convert_Cstring_to_value_datetime(const char *, int,
+					 dbValue *);
+int db_convert_column_default_value_to_string(dbColumn *,
+					      dbString *);
+int db_convert_column_value_to_string(dbColumn *, dbString *);
+int db_convert_value_datetime_into_string(dbValue *, int,
+					  dbString *);
+int db_convert_value_to_string(dbValue *, int,
+			       dbString *);
+dbColumn *db_copy_column(dbColumn *, dbColumn *);
+void db_copy_dbmscap_entry(dbDbmscap *, dbDbmscap *);
+int db_copy_string(dbString *, const dbString *);
+int db_table_to_sql(dbTable *, dbString *);
+int db_copy_table(const char *, const char *, const char *, const char *,
+		  const char *, const char *);
+int db_copy_table_where(const char *, const char *, const char *,
+			const char *, const char *, const char *,
+			const char *);
+int db_copy_table_select(const char *, const char *, const char *,
+			 const char *, const char *, const char *,
+			 const char *);
+int db_copy_table_by_ints(const char *, const char *, const char *,
+			  const char *, const char *, const char *,
+			  const char *, int *, int);
+void db_copy_value(dbValue *, dbValue *);
+int db_create_database(dbDriver *, dbHandle *);
+int db_create_index(dbDriver *, dbIndex *);
+int db_create_index2(dbDriver *, const char *,
+		     const char *);
+int db_create_table(dbDriver *, dbTable *);
+int db_d_add_column(void);
+int db_d_bind_update(void);
+const char *db_dbmscap_filename(void);
+int db_d_close_cursor(void);
+int db_d_close_database(void);
+int db_d_create_database(void);
+int db_d_create_index(void);
+int db_d_create_table(void);
+int db_d_delete(void);
+int db_d_delete_database(void);
+int db_d_describe_table(void);
+int db_d_drop_column(void);
+int db_d_drop_index(void);
+int db_d_drop_table(void);
+void db_debug(const char *);
+void db_debug_off(void);
+void db_debug_on(void);
+int db_delete(dbCursor *);
+int db_delete_database(dbDriver *, dbHandle *);
+int db_delete_table(const char *, const char *, const char *);
+int db_describe_table(dbDriver *, dbString *, dbTable **);
+int db_d_execute_immediate(void);
+int db_d_begin_transaction(void);
+int db_d_commit_transaction(void);
+int db_d_fetch(void);
+int db_d_find_database(void);
+int db_d_get_num_rows(void);
+int db_d_grant_on_table(void);
+int db_d_insert(void);
+dbDirent *db_dirent(const char *, int *);
+int db_d_list_databases(void);
+int db_d_list_indexes(void);
+int db_d_list_tables(void);
+int db_d_open_database(void);
+int db_d_open_insert_cursor(void);
+int db_d_open_select_cursor(void);
+int db_d_open_update_cursor(void);
+void db_double_quote_string(dbString *);
+int db_driver(int, char **);
+
+int db_driver_mkdir(const char *, int, int);
+int db_drop_column(dbDriver *, dbString *,
+		   dbString *);
+void db__drop_cursor_from_driver_state(dbCursor *);
+int db_drop_index(dbDriver *, dbString *);
+int db_drop_table(dbDriver *, dbString *);
+void db_drop_token(dbToken);
+int db_d_update(void);
+int db_d_version(void);
+int db_enlarge_string(dbString *, int);
+void db_error(const char *);
+int db_execute_immediate(dbDriver *, dbString *);
+int db_begin_transaction(dbDriver *);
+int db_commit_transaction(dbDriver *);
+int db_fetch(dbCursor *, int, int *);
+int db_find_database(dbDriver *, dbHandle *, int *);
+dbAddress db_find_token(dbToken);
+void db_free(void *);
+void db_free_column(dbColumn *);
+void db_free_cursor(dbCursor *);
+void db_free_cursor_column_flags(dbCursor *);
+void db_free_dbmscap(dbDbmscap *);
+void db_free_dirent_array(dbDirent *, int);
+void db_free_handle(dbHandle *);
+void db_free_handle_array(dbHandle *, int);
+void db_free_index(dbIndex *);
+void db_free_index_array(dbIndex *, int);
+void db_free_string(dbString *);
+void db_free_string_array(dbString *, int);
+void db_free_table(dbTable *);
+int db_get_column(dbDriver *, const char *, const char *,
+		  dbColumn **);
+dbValue *db_get_column_default_value(dbColumn *);
+const char *db_get_column_description(dbColumn *);
+int db_get_column_host_type(dbColumn *);
+int db_get_column_length(dbColumn *);
+const char *db_get_column_name(dbColumn *);
+int db_get_column_precision(dbColumn *);
+int db_get_column_scale(dbColumn *);
+int db_get_column_select_priv(dbColumn *);
+int db_get_column_sqltype(dbColumn *);
+int db_get_column_update_priv(dbColumn *);
+dbValue *db_get_column_value(dbColumn *);
+int db_get_connection(dbConnection *);
+int db_get_cursor_number_of_columns(dbCursor *);
+dbTable *db_get_cursor_table(dbCursor *);
+dbToken db_get_cursor_token(dbCursor *);
+const char *db_get_default_driver_name(void);
+const char *db_get_default_database_name(void);
+const char *db_get_default_schema_name(void);
+const char *db_get_default_group_name(void);
+dbDriverState *db__get_driver_state(void);
+int db_get_error_code(void);
+const char *db_get_error_msg(void);
+const char *db_get_error_who(void);
+const char *db_get_handle_dbname(dbHandle *);
+const char *db_get_handle_dbschema(dbHandle *);
+const char *db_get_index_column_name(dbIndex *, int);
+const char *db_get_index_name(dbIndex *);
+int db_get_index_number_of_columns(dbIndex *);
+const char *db_get_index_table_name(dbIndex *);
+int db_get_num_rows(dbCursor *);
+char *db_get_string(const dbString *);
+dbColumn *db_get_table_column(dbTable *, int);
+dbColumn *db_get_table_column_by_name(dbTable *, const char*);
+int db_get_table_delete_priv(dbTable *);
+const char *db_get_table_description(dbTable *);
+int db_get_table_insert_priv(dbTable *);
+const char *db_get_table_name(dbTable *);
+int db_get_table_number_of_columns(dbTable *);
+int db_get_table_number_of_rows(dbDriver *, dbString *);
+int db_get_table_select_priv(dbTable *);
+int db_get_table_update_priv(dbTable *);
+double db_get_value_as_double(dbValue *, int);
+int db_get_value_day(dbValue *);
+double db_get_value_double(dbValue *);
+int db_get_value_hour(dbValue *);
+int db_get_value_int(dbValue *);
+int db_get_value_minute(dbValue *);
+int db_get_value_month(dbValue *);
+double db_get_value_seconds(dbValue *);
+const char *db_get_value_string(dbValue *);
+int db_get_value_year(dbValue *);
+int db_grant_on_table(dbDriver *, const char *, int,
+		      int);
+int db_has_dbms(void);
+void db_init_column(dbColumn *);
+void db_init_cursor(dbCursor *);
+void db__init_driver_state(void);
+void db_init_handle(dbHandle *);
+void db_init_index(dbIndex *);
+void db_init_string(dbString *);
+void db_init_table(dbTable *);
+int db_insert(dbCursor *);
+void db_interval_range(int, int *, int *);
+int db_isdir(const char *);
+int db_legal_tablename(const char *);
+int db_list_databases(dbDriver *, dbString *, int,
+		      dbHandle **, int *);
+const char *db_list_drivers(void);
+int db_list_indexes(dbDriver *, dbString *, dbIndex **,
+		    int *);
+int db_list_tables(dbDriver *, dbString **, int *,
+		   int);
+void *db_malloc(int);
+void db__mark_database_closed(void);
+void db__mark_database_open(const char *, const char *);
+void db_memory_error(void);
+dbToken db_new_token(dbAddress);
+int db_nocase_compare(const char *, const char *);
+void db_noproc_error(int);
+int db_open_database(dbDriver *, dbHandle *);
+int db_open_insert_cursor(dbDriver *, dbCursor *);
+int db_open_select_cursor(dbDriver *, dbString *,
+			  dbCursor *, int);
+int db_open_update_cursor(dbDriver *, dbString *_name,
+			  dbString *, dbCursor *, int);
+void db_print_column_definition(FILE *, dbColumn *);
+void db_print_error(void);
+void db_print_index(FILE *, dbIndex *);
+void db_print_table_definition(FILE *, dbTable *);
+void db_procedure_not_implemented(const char *);
+void db_protocol_error(void);
+dbDbmscap *db_read_dbmscap(void);
+void *db_realloc(void *, int);
+int db__recv_char(char *);
+int db__recv_column_default_value(dbColumn *);
+int db__recv_column_definition(dbColumn *);
+int db__recv_column_value(dbColumn *);
+int db__recv_datetime(dbDateTime *);
+int db__recv_double(double *);
+int db__recv_double_array(double **, int *);
+int db__recv_float(float *);
+int db__recv_float_array(float **, int *);
+int db__recv_handle(dbHandle *);
+int db__recv_index(dbIndex *);
+int db__recv_index_array(dbIndex **, int *);
+int db__recv_int(int *);
+int db__recv_int_array(int **, int *);
+int db__recv_procnum(int *);
+int db__recv_return_code(int *);
+int db__recv_short(short *);
+int db__recv_short_array(short **, int *);
+int db__recv_string(dbString *);
+int db__recv_string_array(dbString **, int *);
+int db__recv_table_data(dbTable *);
+int db__recv_table_definition(dbTable **);
+int db__recv_token(dbToken *);
+int db__recv_value(dbValue *, int);
+int db__send_Cstring(const char *);
+int db__send_char(int);
+int db__send_column_default_value(dbColumn *);
+int db__send_column_definition(dbColumn *);
+int db__send_column_value(dbColumn *);
+int db__send_datetime(dbDateTime *);
+int db__send_double(double);
+int db__send_double_array(const double *, int);
+int db__send_failure(void);
+int db__send_float(float);
+int db__send_float_array(const float *, int);
+int db__send_handle(dbHandle *);
+int db__send_index(dbIndex *);
+int db__send_index_array(dbIndex *, int);
+int db__send_int(int);
+int db__send_int_array(const int *, int);
+int db__send_procedure_not_implemented(int);
+int db__send_procedure_ok(int);
+int db__send_short(int);
+int db__send_short_array(const short *, int);
+int db__send_string(dbString *);
+int db__send_string_array(dbString *, int);
+int db__send_success(void);
+int db__send_table_data(dbTable *);
+int db__send_table_definition(dbTable *);
+int db__send_token(dbToken *);
+int db__send_value(dbValue *, int);
+int db_select_CatValArray(dbDriver *, const char *, const char *,
+			  const char *, const char *,
+			  dbCatValArray *);
+int db_select_int(dbDriver *, const char *, const char *,
+		  const char *, int **);
+int db_select_value(dbDriver *, const char *, const char *,
+		    int, const char *, dbValue *);
+int db_set_column_description(dbColumn *, const char *);
+void db_set_column_has_defined_default_value(dbColumn *);
+void db_set_column_has_undefined_default_value(dbColumn *);
+void db_set_column_host_type(dbColumn *, int);
+void db_set_column_length(dbColumn *, int);
+int db_set_column_name(dbColumn *, const char *);
+void db_set_column_null_allowed(dbColumn *);
+void db_set_column_precision(dbColumn *, int);
+void db_set_column_scale(dbColumn *, int);
+void db_set_column_select_priv_granted(dbColumn *);
+void db_set_column_select_priv_not_granted(dbColumn *);
+void db_set_column_sqltype(dbColumn *, int);
+void db_set_column_update_priv_granted(dbColumn *);
+void db_set_column_update_priv_not_granted(dbColumn *);
+void db_set_column_use_default_value(dbColumn *);
+int db_set_connection(dbConnection *);
+void db_set_cursor_column_flag(dbCursor *, int);
+void db_set_cursor_column_for_update(dbCursor *, int);
+void db_set_cursor_mode(dbCursor *, int);
+void db_set_cursor_mode_insensitive(dbCursor *);
+void db_set_cursor_mode_scroll(dbCursor *);
+void db_set_cursor_table(dbCursor *, dbTable *);
+void db_set_cursor_token(dbCursor *, dbToken);
+void db_set_cursor_type_insert(dbCursor *);
+void db_set_cursor_type_readonly(dbCursor *);
+void db_set_cursor_type_update(dbCursor *);
+int db_set_default_connection(void);
+void db_set_error_who(const char *);
+int db_set_handle(dbHandle *, const char *, const char *);
+int db_set_index_column_name(dbIndex *, int,
+			     const char *);
+int db_set_index_name(dbIndex *, const char *);
+int db_set_index_table_name(dbIndex *, const char *);
+int db_set_index_type_non_unique(dbIndex *);
+int db_set_index_type_unique(dbIndex *);
+void db__set_protocol_fds(FILE *, FILE *);
+int db_set_string(dbString *, const char *);
+int db_set_string_no_copy(dbString *, char *);
+int db_set_table_column(dbTable *, int, dbColumn *);
+void db_set_table_delete_priv_granted(dbTable *);
+void db_set_table_delete_priv_not_granted(dbTable *);
+int db_set_table_description(dbTable *, const char *);
+void db_set_table_insert_priv_granted(dbTable *);
+void db_set_table_insert_priv_not_granted(dbTable *);
+int db_set_table_name(dbTable *, const char *);
+void db_set_table_select_priv_granted(dbTable *);
+void db_set_table_select_priv_not_granted(dbTable *);
+void db_set_table_update_priv_granted(dbTable *);
+void db_set_table_update_priv_not_granted(dbTable *);
+void db_set_value_datetime_current(dbValue *);
+void db_set_value_datetime_not_current(dbValue *);
+void db_set_value_day(dbValue *, int);
+void db_set_value_double(dbValue *, double);
+void db_set_value_hour(dbValue *, int);
+void db_set_value_int(dbValue *, int);
+void db_set_value_minute(dbValue *, int);
+void db_set_value_month(dbValue *, int);
+void db_set_value_not_null(dbValue *);
+void db_set_value_null(dbValue *);
+void db_set_value_seconds(dbValue *, double);
+int db_set_value_string(dbValue *, const char *);
+void db_set_value_year(dbValue *, int);
+int db_shutdown_driver(dbDriver *);
+const char *db_sqltype_name(int);
+int db_sqltype_to_Ctype(int);
+dbDriver *db_start_driver(const char *);
+dbDriver *db_start_driver_open_database(const char *, const char *);
+int db__start_procedure_call(int);
+char *db_store(const char *);
+void db_strip(char *);
+void db_syserror(const char *);
+int db_table_exists(const char *, const char *,
+		    const char *);
+int db_test_column_has_default_value(dbColumn *);
+int db_test_column_has_defined_default_value(dbColumn *);
+int db_test_column_has_undefined_default_value(dbColumn *);
+int db_test_column_null_allowed(dbColumn *);
+int db_test_column_use_default_value(dbColumn *);
+int db_test_cursor_any_column_flag(dbCursor *);
+int db_test_cursor_any_column_for_update(dbCursor *);
+int db_test_cursor_column_flag(dbCursor *, int);
+int db_test_cursor_column_for_update(dbCursor *, int);
+int db_test_cursor_mode_insensitive(dbCursor *);
+int db_test_cursor_mode_scroll(dbCursor *);
+int db_test_cursor_type_fetch(dbCursor *);
+int db_test_cursor_type_insert(dbCursor *);
+int db_test_cursor_type_update(dbCursor *);
+int db__test_database_open(void);
+int db_test_index_type_unique(dbIndex *);
+int db_test_value_datetime_current(dbValue *);
+int db_test_value_isnull(dbValue *);
+void db_unset_column_has_default_value(dbColumn *);
+void db_unset_column_null_allowed(dbColumn *);
+void db_unset_column_use_default_value(dbColumn *);
+void db_unset_cursor_column_flag(dbCursor *, int);
+void db_unset_cursor_column_for_update(dbCursor *, int);
+void db_unset_cursor_mode(dbCursor *);
+void db_unset_cursor_mode_insensitive(dbCursor *);
+void db_unset_cursor_mode_scroll(dbCursor *);
+int db_update(dbCursor *);
+int db_gversion(dbDriver *, dbString *,
+		dbString *);
+const char *db_whoami(void);
+void db_zero(void *, int);
+void db_zero_string(dbString *);
+unsigned int db_sizeof_string(const dbString *);
+int db_set_login(const char *, const char *, const char *, const char *);
+int db_get_login(const char *, const char *, const char **, const char **);
+
+#endif

Copied: grass/trunk/include/defs/devlib.h (from rev 49164, grass/trunk/include/devlib.h)
===================================================================
--- grass/trunk/include/defs/devlib.h	                        (rev 0)
+++ grass/trunk/include/defs/devlib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,66 @@
+int Box_abs(int, int, int, int);
+int Box_rel(int, int);
+int Color_table_float(void);
+int Color_table_fixed(void);
+int _get_lookup_for_color(int, int, int);
+int get_table_type(void);
+int Color(int);
+int RGB_color(unsigned char, unsigned char, unsigned char);
+int _get_color_index(int);
+int _get_color_index_array(int *, int);
+int Standard_color(int);
+int Color_offset(int);
+int get_color_offset(void);
+int Cont_abs(int, int);
+int Cont_rel(int, int);
+int Erase(void);
+int Font(char *);
+int Get_text_box(char *, int *, int *, int *, int *);
+int Linemod(char *);
+int Move_abs(int, int);
+int Get_current_xy(int *, int *);
+int Move_rel(int, int);
+int Number_of_colors(int *);
+int Polydots_abs(int *, int *, int);
+int Polydots_rel(int *, int *, int);
+int Polyline_abs(int *, int *, int);
+int Polyline_rel(int *, int *, int);
+int Polygon_rel(int *, int *, int);
+int Set_RGB_color(unsigned char, unsigned char, unsigned char);
+int RGB_raster(int, int, register unsigned char *, register unsigned char *,
+	       register unsigned char *, int);
+int Raster_char(int, int, unsigned char *, int, int);
+int Raster_int_def(int, int, int *, int, int);
+int Raster_int(int, int, int *, int, int);
+int Reset_colors(int, int, unsigned char *, unsigned char *, unsigned char *);
+int Reset_color(unsigned char, unsigned char, unsigned char, int);
+void close_mon(void);
+int Set_window(int, int, int, int);
+int window_clip(double *, double *, double *, double *);
+int window_box_clip(double *, double *, double *, double *);
+int Text(char *);
+int Text_size(int, int);
+int Text_rotation(float);
+int clip(register double, register double, register double, register double,
+	 register double *, register double *, register double *,
+	 register double *);
+int assign_fixed_color(int, int);
+int get_fixed_color(int);
+int get_fixed_color_array(register int *, register int);
+int assign_standard_color(int, int);
+int get_standard_color(int);
+int get_max_std_colors(void);
+int get_connection(char *, int *, int *);
+int prepare_connection(void);
+int check_connection(char *, char *;
+		     int init_font(char *);
+		     int get_char_vects(unsigned char, int *,
+					unsigned char **, unsigned char **);
+		     int drawchar(double, double, register double,
+				  register double, char);
+		     int soft_text_ext(int, int, double, double, double,
+				       char *);
+		     int get_text_ext(int *, int *, int *, int *);
+		     int soft_text(int, int, double, double, double, char *);
+		     int onechar(int, int, double, double, double,
+				 register char);

Copied: grass/trunk/include/defs/dig_atts.h (from rev 49164, grass/trunk/include/dig_atts.h)
===================================================================
--- grass/trunk/include/defs/dig_atts.h	                        (rev 0)
+++ grass/trunk/include/defs/dig_atts.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,59 @@
+#ifndef _STDIO_H
+#include <stdio.h>
+#endif
+
+/*
+   #define              WRITE_ATT_FORMAT        "%c  %12.2lf  %12.2lf  %8d"
+   #define              WRITE_ATT_FORMAT        "%c %14.2lf %14.2lf %7d"
+ */
+#define		WRITE_ATT_FORMAT	"%c %14s %14s %10d"
+#define FlSIZ 14
+#define		READ_ATT_FORMAT		"%c %lf %lf %d"
+
+/*  only types allowed in atts file 
+ *      A - area, L - line, P - point
+ */
+#define		ATT_TYPES		"LAP"
+
+/*      removed Jun 25 1991  dpg
+   #define LINE 0
+   #define AREA 1
+   #define DOT 2
+   #define DEAD_LINE 4
+   #define DEAD_AREA 5
+   #define DEAD_DOT 6
+ */
+
+struct attribute
+{
+    char type;
+    double x;
+    double y;
+    int cat;
+    long offset;
+};
+
+
+struct atts_index
+{
+    long *area_off;
+    long *line_off;
+    long *point_off;
+    int area_alloc;
+    int line_alloc;
+    int point_alloc;
+    int max_areas;
+    int max_lines;
+    int max_points;
+    int max_atts;
+};
+
+int atts_init(FILE *, struct atts_index *);
+int free_atts(struct atts_index *);
+int read_area_att(FILE *, struct atts_index *, struct attribute *, int);
+int read_line_att(FILE *, struct atts_index *, struct attribute *, int);
+int read_att_struct(FILE *, struct attribute *);
+int read_att(FILE *, char *, double *, double *, int *, long *);
+int write_att(FILE *, char, double, double, int);
+int write_att_struct(FILE *, struct attribute *);
+int write_att_line(FILE *, double *, double *, int, int);

Copied: grass/trunk/include/defs/display.h (from rev 49164, grass/trunk/include/display.h)
===================================================================
--- grass/trunk/include/defs/display.h	                        (rev 0)
+++ grass/trunk/include/defs/display.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,165 @@
+#ifndef GRASS_DISPLAYDEFS_H
+#define GRASS_DISPLAYDEFS_H
+
+/* cnversions.c */
+void D_update_conversions(void);
+void D_fit_d_to_u(void);
+void D_fit_u_to_d(void);
+void D_show_conversions(void);
+
+void D_do_conversions(const struct Cell_head *, double, double, double, double);
+
+int D_is_lat_lon(void);
+
+double D_get_d_to_a_xconv(void);
+double D_get_d_to_a_yconv(void);
+double D_get_d_to_u_xconv(void);
+double D_get_d_to_u_yconv(void);
+double D_get_a_to_u_xconv(void);
+double D_get_a_to_u_yconv(void);
+double D_get_a_to_d_xconv(void);
+double D_get_a_to_d_yconv(void);
+double D_get_u_to_d_xconv(void);
+double D_get_u_to_d_yconv(void);
+double D_get_u_to_a_xconv(void);
+double D_get_u_to_a_yconv(void);
+
+double D_get_ns_resolution(void);
+double D_get_ew_resolution(void);
+
+double D_get_u_west(void);
+double D_get_u_east(void);
+double D_get_u_north(void);
+double D_get_u_south(void);
+double D_get_a_west(void);
+double D_get_a_east(void);
+double D_get_a_north(void);
+double D_get_a_south(void);
+double D_get_d_west(void);
+double D_get_d_east(void);
+double D_get_d_north(void);
+double D_get_d_south(void);
+
+void D_set_region(const struct Cell_head *);
+void D_set_src(double, double, double, double);
+void D_get_src(double *, double *, double *, double *);
+void D_set_grid(int, int, int, int);
+void D_get_grid(int *, int *, int *, int *);
+void D_set_dst(double, double, double, double);
+void D_get_dst(double *, double *, double *, double *);
+
+void D_get_u(double [2][2]);
+void D_get_a(int [2][2]);
+void D_get_d(double [2][2]);
+
+double D_d_to_a_row(double);
+double D_d_to_a_col(double);
+double D_d_to_u_row(double);
+double D_d_to_u_col(double);
+double D_a_to_u_row(double);
+double D_a_to_u_col(double);
+double D_a_to_d_row(double);
+double D_a_to_d_col(double);
+double D_u_to_d_row(double);
+double D_u_to_d_col(double);
+double D_u_to_a_row(double);
+double D_u_to_a_col(double);
+
+/* draw2.c */
+
+void D_set_clip(double, double, double, double);
+void D_clip_to_map(void);
+void D_set_clip_mode(int);
+void D_set_reduction(double);
+
+void D_line_width(double);
+void D_get_text_box(const char *, double *, double *, double *, double *);
+
+void D_pos_abs(double, double);
+void D_pos_rel(double, double);
+void D_move_abs(double, double);
+void D_move_rel(double, double);
+void D_cont_abs(double, double);
+void D_cont_rel(double, double);
+void D_line_abs(double, double, double, double);
+void D_line_rel(double, double, double, double);
+void D_polydots_abs(const double *, const double *, int);
+void D_polydots_rel(const double *, const double *, int);
+void D_polyline_abs(const double *, const double *, int);
+void D_polyline_rel(const double *, const double *, int);
+void D_polygon_abs(const double *, const double *, int);
+void D_polygon_rel(const double *, const double *, int);
+void D_box_abs(double, double, double, double);
+void D_box_rel(double, double);
+
+void D_begin(void);
+void D_end(void);
+void D_close(void);
+void D_stroke(void);
+void D_fill(void);
+void D_dots(void);
+
+/* icon.c */
+void D_plot_icon(double, double, int, double, double);
+
+/* raster.c */
+int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE);
+int D_draw_d_raster(int, const DCELL *, struct Colors *);
+int D_draw_f_raster(int, const FCELL *, struct Colors *);
+int D_draw_c_raster(int, const CELL *, struct Colors *);
+int D_draw_cell(int, const CELL *, struct Colors *);
+void D_cell_draw_begin(void);
+int D_draw_raster_RGB(int, const void *, const void *, const void *,
+		      struct Colors *, struct Colors *, struct Colors *,
+		      RASTER_MAP_TYPE, RASTER_MAP_TYPE, RASTER_MAP_TYPE);
+void D_cell_draw_end(void);
+
+/* raster2.c */
+int D_set_overlay_mode(int);
+int D_color(CELL, struct Colors *);
+int D_c_color(CELL, struct Colors *);
+int D_d_color(DCELL, struct Colors *);
+int D_f_color(FCELL, struct Colors *);
+int D_color_of_type(const void *, struct Colors *, RASTER_MAP_TYPE);
+
+/* setup.c */
+void D_setup(int);
+void D_setup_unity(int);
+void D_setup2(int, int, double, double, double, double);
+
+/* symbol.c */
+void D_symbol(const SYMBOL *, double, double, const RGBA_Color *,
+	      const RGBA_Color *);
+void D_symbol2(const SYMBOL *, double, double, const RGBA_Color *,
+	       const RGBA_Color *);
+
+/* tran_colr.c */
+int D_translate_color(const char *);
+int D_parse_color(const char *, int);
+int D_use_color(int);
+int D_color_number_to_RGB(int, int *, int *, int *);
+void D_RGB_color(int, int, int);
+
+/* window.c */
+void D_erase(const char *);
+
+/* r_raster.c */
+
+int D_open_driver(void);
+void D_close_driver(void);
+int D_save_command(const char *);
+
+void D_get_window(double *, double *, double *, double *);
+
+void D__erase(void);
+
+void D_text_size(double, double);
+void D_text_rotation(double);
+void D_text(const char *);
+
+void D_font(const char *);
+void D_encoding(const char *);
+void D_font_list(char ***, int *);
+void D_font_info(char ***, int *);
+
+#endif /* GRASS_DISPLAYDEFS_H */

Copied: grass/trunk/include/defs/dlg.h (from rev 49164, grass/trunk/include/dlg.h)
===================================================================
--- grass/trunk/include/defs/dlg.h	                        (rev 0)
+++ grass/trunk/include/defs/dlg.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,25 @@
+#ifndef GRASS_DLGDEFS_H
+#define GRASS_DLGDEFS_H
+
+int dlg_init(FILE *, struct dlg *);
+int dlg_read(FILE *, struct dlg *);
+int _dlg_read_node(struct dlg_node *, FILE *);
+int _dlg_read_area(struct dlg_area *, FILE *);
+int _dlg_read_line(struct dlg_line *, FILE *);
+int _dlg_write_area(struct dlg_area *, FILE *);
+int dlg_write_header(FILE *, struct dlg *);
+int _dlg_write_line(struct dlg_line *, FILE *);
+int _dlg_write_node(struct dlg_node *, FILE *);
+int dlg_read_whole_area(FILE *, struct dlg *, int, double **, double **,
+			int *, int *);
+int dlg_read_area(FILE *, struct dlg *, int);
+int dlg_read_line(FILE *, struct dlg *, int);
+int dlg_read_node(FILE *, struct dlg *, int);
+int dlg_read_int(FILE *, int, int **);
+int dlg_write_int(FILE *, int, int *);
+int dlg_write_double(FILE *, int, double *);
+int dlg_write_area(FILE *, struct dlg *, int);
+int dlg_write_line(FILE *, struct dlg *, int);
+int dlg_write_node(FILE *, struct dlg *, int);
+
+#endif

Copied: grass/trunk/include/defs/form.h (from rev 49164, grass/trunk/include/form.h)
===================================================================
--- grass/trunk/include/defs/form.h	                        (rev 0)
+++ grass/trunk/include/defs/form.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,11 @@
+#ifndef GRASS_FORMDEFS_H
+#define GRASS_FORMDEFS_H
+
+int F_generate(char *driver, char *database, char *table, char *key,
+	       int keyval, char *frmname, char *frmmapset, int edit_mode,
+	       int format, char **form);
+int F_open(char *title, char *html);
+void F_clear(void);
+void F_close(void);
+
+#endif

Copied: grass/trunk/include/defs/gis.h (from rev 49164, grass/trunk/include/gisdefs.h)
===================================================================
--- grass/trunk/include/defs/gis.h	                        (rev 0)
+++ grass/trunk/include/defs/gis.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,718 @@
+/*
+ *****************************************************************************
+ *
+ * MODULE:      Grass Include Files
+ * AUTHOR(S):   Original author unknown - probably CERL
+ *              Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
+ * PURPOSE:     This file contains the prototypes for all the functions in the
+ *              gis library (src/libes/gis).
+ * COPYRIGHT:    (C) 2000 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.
+ *
+ *****************************************************************************/
+
+#ifndef GRASS_GISDEFS_H
+#define GRASS_GISDEFS_H
+
+/*============================= Include Files ==============================*/
+
+/* none */
+
+/*=========================== Constants/Defines ============================*/
+
+/* none (look in gis.h) */
+
+/*=========================== Typedefs/Structures ==========================*/
+
+/* none (look in gis.h) */
+
+/*============================== Prototypes ================================*/
+
+#include <grass/config.h>
+
+#ifdef __GNUC__
+# ifdef __MINGW32__
+#  include <malloc.h>
+# else
+#  include <alloca.h>
+# endif
+# define G__alloca(n) alloca(n)
+# define G__freea(p)
+#else
+# define G__alloca(n) G_malloc(n)
+# define G__freea(p) G_free(p)
+#endif
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+/* adj_cellhd.c */
+void G_adjust_Cell_head(struct Cell_head *, int, int);
+void G_adjust_Cell_head3(struct Cell_head *, int, int, int);
+
+/* alloc.c */
+#define G_incr_void_ptr(ptr, size) \
+    ((void *)((const unsigned char *)(ptr) + (size)))
+
+void *G__malloc(const char *, int, size_t);
+void *G__calloc(const char *, int, size_t, size_t);
+void *G__realloc(const char *, int, void *, size_t);
+void G_free(void *);
+#ifndef G_incr_void_ptr
+void *G_incr_void_ptr(const void *, size_t);
+#endif
+
+#ifndef CTYPESGEN
+#define G_malloc(n)     G__malloc(__FILE__, __LINE__, (n))
+#define G_calloc(m, n)  G__calloc(__FILE__, __LINE__, (m), (n))
+#define G_realloc(p, n) G__realloc(__FILE__, __LINE__, (p), (n))
+#else
+#define G_malloc(n)     G__malloc("<ctypesgen>", 0, (n))
+#define G_calloc(m, n)  G__calloc("<ctypesgen>", 0, (m), (n))
+#define G_realloc(p, n) G__realloc("<ctypesgen>", 0, (p), (n))
+#endif
+
+/* area.c */
+int G_begin_cell_area_calculations(void);
+double G_area_of_cell_at_row(int);
+int G_begin_polygon_area_calculations(void);
+double G_area_of_polygon(const double *, const double *, int);
+
+/* area_ellipse.c */
+void G_begin_zone_area_on_ellipsoid(double, double, double);
+double G_darea0_on_ellipsoid(double);
+double G_area_for_zone_on_ellipsoid(double, double);
+
+/* area_poly1.c */
+void G_begin_ellipsoid_polygon_area(double, double);
+double G_ellipsoid_polygon_area(const double *, const double *, int);
+
+/* area_poly2.c */
+double G_planimetric_polygon_area(const double *, const double *, int);
+
+/* area_sphere.c */
+void G_begin_zone_area_on_sphere(double, double);
+double G_darea0_on_sphere(double);
+double G_area_for_zone_on_sphere(double, double);
+
+/* ascii_chk.c */
+void G_ascii_check(char *);
+
+
+/* asprintf.c */
+/* Do it better if you know how */
+/* asprintf is not found on MINGW but exists */
+
+/* 
+ *  Because configure script in GDAL test is G_asprintf exists in gis lib
+ *  the G_asprintf macro is disabled until a stable version of GDAL
+ *  with a different function becomes widely used 
+ */
+int G_vasprintf(char **, const char *, va_list);
+int G_asprintf(char **, const char *, ...)
+    __attribute__ ((format(printf, 2, 3)));
+
+/* basename.c */
+char *G_basename(char *, const char *);
+
+/* bres_line.c */
+void G_bresenham_line(int, int, int, int, int (*)(int, int));
+
+/* clicker.c */
+void G_clicker(void);
+
+/* color_rules.c */
+char *G_color_rules_options(void);
+char *G_color_rules_descriptions(void);
+void G_list_color_rules(FILE *);
+int G_find_color_rule(const char *);
+
+/* color_str.c */
+int G_num_standard_colors(void);
+
+/* commas.c */
+int G_insert_commas(char *);
+void G_remove_commas(char *);
+
+/* copy_dir.c */
+int G_recursive_copy(const char *, const char *);
+
+/* copy_file.c */
+int G_copy_file(const char *, const char *);
+
+/* counter.c */
+int G_is_initialized(int *);
+void G_initialize_done(int *);
+void G_init_counter(struct Counter *, int);
+int G_counter_next(struct Counter *);
+
+/* date.c */
+const char *G_date(void);
+
+/* datum.c */
+int G_get_datum_by_name(const char *);
+const char *G_datum_name(int);
+const char *G_datum_description(int);
+const char *G_datum_ellipsoid(int);
+int G_get_datumparams_from_projinfo(const struct Key_Value *, char *, char *);
+void G_read_datum_table(void);
+
+
+/* debug.c */
+void G_init_debug(void);
+int G_debug(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
+
+/* distance.c */
+int G_begin_distance_calculations(void);
+double G_distance(double, double, double, double);
+double G_distance_between_line_segments(double, double, double, double,
+					double, double, double, double);
+double G_distance_point_to_line_segment(double, double, double, double,
+					double, double);
+
+/* done_msg.c */
+void G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
+
+/* endian.c */
+int G_is_little_endian(void);
+
+/* env.c */
+void G_init_env(void);
+const char *G_getenv(const char *);
+const char *G_getenv2(const char *, int);
+const char *G__getenv(const char *);
+const char *G__getenv2(const char *, int);
+void G_setenv(const char *, const char *);
+void G_setenv2(const char *, const char *, int);
+void G__setenv(const char *, const char *);
+void G__setenv2(const char *, const char *, int);
+void G_unsetenv(const char *);
+void G_unsetenv2(const char *, int);
+void G__write_env(void);
+const char *G__env_name(int);
+void G__read_env(void);
+void G_set_gisrc_mode(int);
+int G_get_gisrc_mode(void);
+void G__create_alt_env(void);
+void G__switch_env(void);
+
+/* error.c */
+int G_info_format(void);
+void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2)));
+void G_verbose_message(const char *, ...)
+    __attribute__ ((format(printf, 1, 2)));
+void G_important_message(const char *, ...)
+    __attribute__ ((format(printf, 1, 2)));
+void G_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
+    __attribute__ ((noreturn));
+void G_warning(const char *, ...) __attribute__ ((format(printf, 1, 2)));
+int G_suppress_warnings(int);
+int G_sleep_on_error(int);
+void G_set_error_routine(int (*)(const char *, int));
+void G_unset_error_routine(void);
+void G_init_logging(void);
+
+/* file_name.c */
+char *G_file_name(char *, const char *, const char *, const char *);
+char *G_file_name_misc(char *, const char *, const char *, const char *,
+		       const char *);
+
+/* find_file.c */
+const char *G_find_file(const char *, char *, const char *);
+const char *G_find_file2(const char *, const char *, const char *);
+const char *G_find_file_misc(const char *, const char *, char *, const char *);
+const char *G_find_file2_misc(const char *, const char *, const char *,
+			      const char *);
+
+/* find_etc.c */
+char *G_find_etc(const char *);
+
+/* find_rast.c */
+const char *G_find_raster(char *, const char *);
+const char *G_find_raster2(const char *, const char *);
+
+/* find_rast3d.c */
+const char *G_find_raster3d(const char *, const char *);
+
+/* find_vect.c */
+const char *G_find_vector(char *, const char *);
+const char *G_find_vector2(const char *, const char *);
+
+/* flate.c */
+int G_zlib_compress(const unsigned char *, int, unsigned char *, int);
+int G_zlib_expand(const unsigned char *, int, unsigned char *, int);
+int G_zlib_write(int, const unsigned char *, int);
+int G_zlib_read(int, int, unsigned char *, int);
+int G_zlib_write_noCompress(int, const unsigned char *, int);
+
+/* geodesic.c */
+int G_begin_geodesic_equation(double, double, double, double);
+double G_geodesic_lat_from_lon(double);
+
+/* geodist.c */
+void G_begin_geodesic_distance(double, double);
+void G_set_geodesic_distance_lat1(double);
+void G_set_geodesic_distance_lat2(double);
+double G_geodesic_distance_lon_to_lon(double, double);
+double G_geodesic_distance(double, double, double, double);
+
+/* get_ellipse.c */
+int G_get_ellipsoid_parameters(double *, double *);
+int G_get_spheroid_by_name(const char *, double *, double *, double *);
+int G_get_ellipsoid_by_name(const char *, double *, double *);
+const char *G_ellipsoid_name(int);
+const char *G_ellipsoid_description(int);
+int G_read_ellipsoid_table(int);
+
+/* get_projinfo.c */
+struct Key_Value *G_get_projunits(void);
+struct Key_Value *G_get_projinfo(void);
+
+/* get_window.c */
+void G_get_window(struct Cell_head *);
+void G_get_default_window(struct Cell_head *);
+void G__get_window(struct Cell_head *, const char *, const char *,
+		   const char *);
+
+/* getl.c */
+int G_getl(char *, int, FILE *);
+int G_getl2(char *, int, FILE *);
+
+/* gisbase.c */
+const char *G_gisbase(void);
+
+/* gisdbase.c */
+const char *G_gisdbase(void);
+
+/* gisinit.c */
+void G__gisinit(const char *, const char *);
+void G__no_gisinit(const char *);
+void G__check_gisinit(void);
+void G_init_all(void);
+
+/* handler.c */
+void G_add_error_handler(void (*)(void *), void *);
+void G_remove_error_handler(void (*)(void *), void *);
+void G__call_error_handlers(void);
+
+/* home.c */
+const char *G_home(void);
+const char *G__home(void);
+
+/* intersect.c */
+int G_intersect_line_segments(double, double, double, double, double, double,
+			      double, double, double *, double *, double *,
+			      double *);
+
+/* is.c */
+int G_is_gisbase(const char *);
+int G_is_location(const char *);
+int G_is_mapset(const char *);
+
+/* key_value1.c */
+struct Key_Value *G_create_key_value(void);
+void G_set_key_value(const char *, const char *, struct Key_Value *);
+const char *G_find_key_value(const char *, const struct Key_Value *);
+void G_free_key_value(struct Key_Value *);
+
+/* key_value2.c */
+int G_fwrite_key_value(FILE *, const struct Key_Value *);
+struct Key_Value *G_fread_key_value(FILE *);
+
+/* key_value3.c */
+void G_write_key_value_file(const char *, const struct Key_Value *);
+struct Key_Value *G_read_key_value_file(const char *);
+
+/* key_value4.c */
+void G_update_key_value_file(const char *, const char *, const char *);
+int G_lookup_key_value_from_file(const char *, const char *, char[], int);
+
+/* legal_name.c */
+int G_legal_filename(const char *);
+int G_check_input_output_name(const char *, const char *, int);
+
+/* line_dist.c */
+void G_set_distance_to_line_tolerance(double);
+double G_distance2_point_to_line(double, double, double, double, double,
+				 double);
+
+/* list.c */
+void G_list_element(const char *, const char *, const char *,
+		    int (*)(const char *, const char *, const char *));
+char **G_list(int, const char *, const char *, const char *);
+void G_free_list(char **);
+
+/* ll_format.c */
+void G_lat_format(double, char *);
+const char *G_lat_format_string(void);
+void G_lon_format(double, char *);
+const char *G_lon_format_string(void);
+void G_llres_format(double, char *);
+const char *G_llres_format_string(void);
+void G_lat_parts(double, int *, int *, double *, char *);
+void G_lon_parts(double, int *, int *, double *, char *);
+
+/* ll_scan.c */
+int G_lat_scan(const char *, double *);
+int G_lon_scan(const char *, double *);
+int G_llres_scan(const char *, double *);
+
+/* location.c */
+const char *G_location(void);
+char *G_location_path(void);
+char *G__location_path(void);
+
+/* ls.c */
+void G_set_ls_filter(int (*)(const char *, void *), void *);
+void G_set_ls_exclude_filter(int (*)(const char *, void *), void *);
+char **G__ls(const char *, int *);
+void G_ls(const char *, FILE *);
+void G_ls_format(char **, int, int, FILE *);
+
+/* ls_filter.c */
+#ifdef HAVE_REGEX_H
+void *G_ls_regex_filter(const char *, int, int);
+void *G_ls_glob_filter(const char *, int);
+void G_free_ls_filter(void *);
+#endif
+
+/* mach_name.c */
+const char *G__machine_name(void);
+
+/* make_loc.c */
+int G__make_location(const char *, struct Cell_head *, struct Key_Value *,
+		     struct Key_Value *, FILE *);
+int G_make_location(const char *, struct Cell_head *, struct Key_Value *,
+		    struct Key_Value *, FILE *);
+int G_compare_projections(const struct Key_Value *, const struct Key_Value *,
+			  const struct Key_Value *, const struct Key_Value *);
+
+/* make_mapset.c */
+int G__make_mapset(const char *gisdbase_name, const char *location_name,
+		   const char *mapset_name);
+int G_make_mapset(const char *gisdbase_name, const char *location_name,
+		  const char *mapset_name);
+
+/* mapcase.c */
+char *G_tolcase(char *);
+char *G_toucase(char *);
+
+/* mapset.c */
+const char *G_mapset(void);
+const char *G__mapset(void);
+
+/* mapset_msc.c */
+int G__make_mapset_element(const char *);
+int G__make_mapset_element_misc(const char *, const char *);
+int G__mapset_permissions(const char *);
+int G__mapset_permissions2(const char *, const char *, const char *);
+
+/* mapset_nme.c */
+const char *G__mapset_name(int);
+void G_get_list_of_mapsets(void);
+void G__create_alt_search_path(void);
+void G__switch_search_path(void);
+void G_reset_mapsets(void);
+char **G_available_mapsets(void);
+void G_add_mapset_to_search_path(const char *);
+int G_is_mapset_in_search_path(const char *);
+
+/* myname.c */
+char *G_myname(void);
+
+/* named_colr.c */
+int G_color_values(const char *, float *, float *, float *);
+const char *G_color_name(int);
+
+/* nl_to_spaces.c */
+void G_newlines_to_spaces(char *);
+
+/* nme_in_mps.c */
+int G_name_is_fully_qualified(const char *, char *, char *);
+char *G_fully_qualified_name(const char *, const char *);
+int G_unqualified_name(const char *, const char *, char *, char *);
+
+/* open.c */
+int G_open_new(const char *, const char *);
+int G_open_old(const char *, const char *, const char *);
+int G_open_update(const char *, const char *);
+FILE *G_fopen_new(const char *, const char *);
+FILE *G_fopen_old(const char *, const char *, const char *);
+FILE *G_fopen_append(const char *, const char *);
+FILE *G_fopen_modify(const char *, const char *);
+
+/* open_misc.c */
+int G_open_new_misc(const char *, const char *, const char *);
+int G_open_old_misc(const char *, const char *, const char *, const char *);
+int G_open_update_misc(const char *, const char *, const char *);
+FILE *G_fopen_new_misc(const char *, const char *, const char *);
+FILE *G_fopen_old_misc(const char *, const char *, const char *,
+		       const char *);
+FILE *G_fopen_append_misc(const char *, const char *, const char *);
+FILE *G_fopen_modify_misc(const char *, const char *, const char *);
+
+/* overwrite.c */
+int G_check_overwrite(int argc, char **argv);
+
+/* pager.c */
+FILE *G_open_pager(struct Popen *);
+void G_close_pager(struct Popen *);
+FILE *G_open_mail(struct Popen *);
+void G_close_mail(struct Popen *);
+
+/* parser.c */
+void G_disable_interactive(void);
+struct GModule *G_define_module(void);
+struct Flag *G_define_flag(void);
+struct Option *G_define_option(void);
+struct Option *G_define_standard_option(int);
+int G_parser(int, char **);
+void G_usage(void);
+char *G_recreate_command(void);
+void G_add_keyword(const char *);
+void G_set_keywords(const char *);
+int G_get_overwrite();
+
+/* paths.c */
+int G_mkdir(const char *);
+int G_is_dirsep(char);
+int G_is_absolute_path(const char *);
+char *G_convert_dirseps_to_host(char *);
+char *G_convert_dirseps_from_host(char *);
+int G_lstat(const char *, STRUCT_STAT *);
+int G_stat(const char *, STRUCT_STAT *);
+
+/* percent.c */
+void G_percent(long, long, int);
+void G_percent_reset(void);
+void G_progress(long, int);
+void G_set_percent_routine(int (*) (int));
+void G_unset_percent_routine(void);
+
+/* popen.c */
+void G_popen_clear(struct Popen *);
+FILE *G_popen_write(struct Popen *, const char *, const char **);
+FILE *G_popen_read(struct Popen *, const char *, const char **);
+void G_popen_close(struct Popen *);
+
+/* plot.c */
+void G_setup_plot(double, double, double, double, int (*)(int, int),
+		  int (*)(int, int));
+void G_setup_fill(int);
+void G_plot_where_xy(double, double, int *, int *);
+void G_plot_where_en(int, int, double *, double *);
+void G_plot_point(double, double);
+void G_plot_line(double, double, double, double);
+void G_plot_line2(double, double, double, double);
+int G_plot_polygon(const double *, const double *, int);
+int G_plot_area(double *const *, double *const *, int *, int);
+void G_plot_fx(double (*)(double), double, double);
+
+/* pole_in_poly.c */
+int G_pole_in_polygon(const double *, const double *, int);
+
+/* progrm_nme.c */
+const char *G_program_name(void);
+void G_set_program_name(const char *);
+
+/* proj1.c */
+int G_projection(void);
+
+/* proj2.c */
+int G__projection_units(int);
+const char *G__projection_name(int);
+
+/* proj3.c */
+const char *G_database_unit_name(int);
+const char *G_database_projection_name(void);
+const char *G_database_datum_name(void);
+const char *G_database_ellipse_name(void);
+double G_database_units_to_meters_factor(void);
+
+/* put_window.c */
+int G_put_window(const struct Cell_head *);
+int G__put_window(const struct Cell_head *, const char *, const char *);
+
+/* putenv.c */
+void G_putenv(const char *, const char *);
+
+/* radii.c */
+double G_meridional_radius_of_curvature(double, double, double);
+double G_transverse_radius_of_curvature(double, double, double);
+double G_radius_of_conformal_tangent_sphere(double, double, double);
+
+/* rd_cellhd.c */
+void G__read_Cell_head(FILE *, struct Cell_head *, int);
+void G__read_Cell_head_array(char **, struct Cell_head *, int);
+
+/* remove.c */
+int G_remove(const char *, const char *);
+int G_remove_misc(const char *, const char *, const char *);
+
+/* rename.c */
+int G_rename_file(const char *, const char *);
+int G_rename(const char *, const char *, const char *);
+
+/* rhumbline.c */
+int G_begin_rhumbline_equation(double, double, double, double);
+double G_rhumbline_lat_from_lon(double);
+
+/* rotate.c */
+void G_rotate_around_point(double, double, double *, double *, double);
+void G_rotate_around_point_int(int, int, int *, int *, double);
+
+/* seek.c */
+off_t G_ftell(FILE *);
+void G_fseek(FILE *, off_t, int);
+
+/* set_window.c */
+void G_get_set_window(struct Cell_head *);
+void G_set_window(struct Cell_head *);
+void G_unset_window();
+
+/* short_way.c */
+void G_shortest_way(double *, double *);
+
+/* sleep.c */
+void G_sleep(unsigned int);
+
+/* snprintf.c */
+int G_snprintf(char *, size_t, const char *, ...)
+    __attribute__ ((format(printf, 3, 4)));
+
+/* strings.c */
+int G_strcasecmp(const char *, const char *);
+int G_strncasecmp(const char *, const char *, int);
+char *G_store(const char *);
+char *G_strchg(char *, char, char);
+char *G_str_replace(const char *, const char *, const char *);
+void G_strip(char *);
+char *G_chop(char *);
+void G_str_to_upper(char *);
+void G_str_to_lower(char *);
+int G_str_to_sql(char *);
+void G_squeeze(char *);
+char *G_strcasestr(const char *, const char *);
+
+/* tempfile.c */
+void G_init_tempfile(void);
+char *G_tempfile(void);
+char *G__tempfile(int);
+void G__temp_element(char *);
+
+/* timestamp.c */
+void G_init_timestamp(struct TimeStamp *);
+void G_set_timestamp(struct TimeStamp *, const struct DateTime *);
+void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *,
+			   const struct DateTime *);
+int G__read_timestamp(FILE *, struct TimeStamp *);
+int G__write_timestamp(FILE *, const struct TimeStamp *);
+void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *);
+int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *);
+int G_read_vector_timestamp(const char *, const char *, struct TimeStamp *);
+int G_write_raster_timestamp(const char *, const struct TimeStamp *);
+int G_write_vector_timestamp(const char *, const struct TimeStamp *);
+int G_format_timestamp(const struct TimeStamp *, char *);
+int G_scan_timestamp(struct TimeStamp *, const char *);
+int G_remove_raster_timestamp(const char *);
+int G_remove_vector_timestamp(const char *);
+int G_read_grid3_timestamp(const char *, const char *, struct TimeStamp *);
+int G_remove_grid3_timestamp(const char *);
+int G_write_grid3_timestamp(const char *, const struct TimeStamp *);
+
+/* token.c */
+char **G_tokenize(const char *, const char *);
+char **G_tokenize2(const char *, const char *, const char *);
+int G_number_of_tokens(char **);
+void G_free_tokens(char **);
+
+/* trim_dec.c */
+void G_trim_decimal(char *);
+
+/* units.c */
+double G_units_to_meters_factor(int);
+double G_units_to_meters_factor_sq(int);
+const char *G_get_units_name(int, int, int);
+int G_units(const char *);
+
+/* user_config.c */
+#ifndef __MINGW32__
+char *G_rc_path(const char *, const char *);
+#endif
+
+/* verbose.c */
+int G_verbose(void);
+int G_verbose_min(void);
+int G_verbose_std(void);
+int G_verbose_max(void);
+int G_set_verbose(int);
+
+/* view.c */
+void G_3dview_warning(int);
+int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *);
+int G_put_3dview(const char *, const char *, const struct G_3dview *,
+		 const struct Cell_head *);
+int G_get_3dview(const char *, const char *, struct G_3dview *);
+
+/* whoami.c */
+const char *G_whoami(void);
+
+/* wind_2_box.c */
+void G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
+			    int);
+
+/* wind_format.c */
+void G_format_northing(double, char *, int);
+void G_format_easting(double, char *, int);
+void G_format_resolution(double, char *, int);
+
+/* wind_in.c */
+int G_point_in_region(double, double);
+int G_point_in_window(double, double, const struct Cell_head *);
+
+/* wind_limits.c */
+int G_limit_east(double *, int);
+int G_limit_west(double *, int);
+int G_limit_north(double *, int);
+int G_limit_south(double *, int);
+
+/* wind_overlap.c */
+int G_window_overlap(const struct Cell_head *, double, double, double,
+		     double);
+double G_window_percentage_overlap(const struct Cell_head *, double, double,
+				   double, double);
+
+/* wind_scan.c */
+int G_scan_northing(const char *, double *, int);
+int G_scan_easting(const char *, double *, int);
+int G_scan_resolution(const char *, double *, int);
+
+/* window_map.c */
+double G_adjust_east_longitude(double, double);
+double G_adjust_easting(double, const struct Cell_head *);
+void G__init_window(void);
+
+/* worker.c */
+void G_begin_execute(void (*func)(void *), void *, void **, int);
+void G_end_execute(void **);
+void G_init_workers(void);
+void G_finish_workers(void);
+
+/* wr_cellhd.c */
+void G__write_Cell_head(FILE *, const struct Cell_head *, int);
+void G__write_Cell_head3(FILE *, const struct Cell_head *, int);
+
+/* writ_zeros.c */
+void G_write_zeros(int, size_t);
+
+/* zero.c */
+void G_zero(void *, int);
+
+/* zone.c */
+int G_zone(void);
+
+#endif /* GRASS_GISDEFS_H */

Copied: grass/trunk/include/defs/glocale.h (from rev 49182, grass/trunk/include/glocale.h)
===================================================================
--- grass/trunk/include/defs/glocale.h	                        (rev 0)
+++ grass/trunk/include/defs/glocale.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,7 @@
+#ifndef GRASS_GLOCALEDEFS_H
+#define GRASS_GLOCALEDEFS_H
+
+extern void G_init_locale(void);
+extern char *G_gettext(const char *, const char *);
+
+#endif

Copied: grass/trunk/include/defs/gmath.h (from rev 49164, grass/trunk/include/gmath.h)
===================================================================
--- grass/trunk/include/defs/gmath.h	                        (rev 0)
+++ grass/trunk/include/defs/gmath.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,180 @@
+#ifndef GRASS_GMATHDEFS_H
+#define GRASS_GMATHDEFS_H
+
+/* dalloc.c */
+double *G_alloc_vector(size_t);
+double **G_alloc_matrix(int, int);
+float  *G_alloc_fvector(size_t);
+float  **G_alloc_fmatrix(int, int);
+void G_free_vector(double *);
+void G_free_matrix(double **);
+void G_free_fvector(float *);
+void G_free_fmatrix(float **);
+
+/* ialloc.c */
+int *G_alloc_ivector(size_t);
+int **G_alloc_imatrix(int, int);
+void G_free_ivector(int *);
+void G_free_imatrix(int **);
+
+/* fft.c */
+extern int fft(int, double *[2], int, int, int);
+extern int fft2(int, double (*)[2], int, int, int);
+
+/* gauss.c */
+extern double G_math_rand_gauss(int, double);
+
+/* max_pow2.c */
+extern long G_math_max_pow2 (long n);
+extern long G_math_min_pow2 (long n);
+
+/* rand1.c */
+extern float G_math_rand(int);
+
+/* del2g.c */
+extern int del2g(double *[2], int, double);
+
+/* getg.c */
+extern int getg(double, double *[2], int);
+
+/* eigen_tools.c */
+extern int G_math_egvorder(double *, double **, long);
+
+/* mult.c */
+extern int G_math_complex_mult (double *v1[2], int size1, double *v2[2], int size2, double *v3[2], int size3);
+
+/* lu.c*/
+extern int G_ludcmp(double **, int, int *, double *);
+extern void G_lubksb(double **a, int n, int *indx, double b[]);
+
+/* findzc.c */
+extern int G_math_findzc(double conv[], int size, double zc[], double thresh, int num_orients);
+
+
+/* *************************************************************** */
+/* ***** WRAPPER FOR CCMATH FUNCTIONS USED IN GRASS ************** */
+/* *************************************************************** */
+extern int G_math_solv(double **,double *,int);
+extern int G_math_solvps(double **,double *,int);
+extern void G_math_solvtd(double *,double *,double *,double *,int);
+extern int G_math_solvru(double **,double *,int);
+extern int G_math_minv(double **,int);
+extern int G_math_psinv(double **,int);
+extern int G_math_ruinv(double **,int);
+extern void G_math_eigval(double **,double *,int);
+extern void G_math_eigen(double **,double *,int);
+extern double G_math_evmax(double **,double *,int);
+extern int G_math_svdval(double *,double **,int,int);
+extern int G_math_sv2val(double *,double **,int,int);
+extern int G_math_svduv(double *,double **,double **, int,double **,int);
+extern int G_math_sv2uv(double *,double **,double **,int,double **,int);
+extern int G_math_svdu1v(double *,double **,int,double **,int);
+
+/* *************************************************************** */
+/* *************** LINEARE EQUATION SYSTEM PART ****************** */
+/* *************************************************************** */
+
+/* Sparse matrix and sparse vector functions
+ * */
+extern G_math_spvector *G_math_alloc_spvector(int );
+extern G_math_spvector **G_math_alloc_spmatrix(int );
+extern void G_math_free_spmatrix(G_math_spvector ** , int );
+extern void G_math_free_spvector(G_math_spvector * );
+extern int G_math_add_spvector(G_math_spvector **, G_math_spvector * , int );
+extern G_math_spvector **G_math_A_to_Asp(double **, int, double);
+extern double **G_math_Asp_to_A(G_math_spvector **, int);
+extern double **G_math_Asp_to_sband_matrix(G_math_spvector **, int, int);
+extern G_math_spvector **G_math_sband_matrix_to_Asp(double **, int, int, double);
+extern void G_math_print_spmatrix(G_math_spvector **, int);
+extern void G_math_Ax_sparse(G_math_spvector **, double *, double *, int );
+
+/*Symmetric band matrix handling */
+extern double **G_math_matrix_to_sband_matrix(double **, int, int);
+extern double **G_math_sband_matrix_to_matrix(double **, int, int);
+extern void G_math_Ax_sband(double ** A, double *x, double *y, int rows, int bandwidth);
+
+/*linear equation solver, most of them are multithreaded wih OpenMP*/
+extern int G_math_solver_gauss(double **, double *, double *, int );
+extern int G_math_solver_lu(double **, double *, double *, int );
+extern int G_math_solver_cholesky(double **, double *, double *, int , int );
+extern void G_math_solver_cholesky_sband(double **, double *, double *, int, int);
+extern int G_math_solver_jacobi(double **, double *, double *, int , int , double , double );
+extern int G_math_solver_gs(double **, double *, double *, int , int , double , double );
+
+extern int G_math_solver_pcg(double **, double *, double *, int , int , double , int );
+extern int G_math_solver_cg(double **, double *, double *, int , int , double );
+extern int G_math_solver_cg_sband(double **, double *, double *, int, int, int, double);
+extern int G_math_solver_bicgstab(double **, double *, double *, int , int , double );
+extern int G_math_solver_sparse_jacobi(G_math_spvector **, double *, double *, int , int , double , double );
+extern int G_math_solver_sparse_gs(G_math_spvector **, double *, double *, int , int , double , double );
+extern int G_math_solver_sparse_pcg(G_math_spvector **, double *, double *, int , int , double , int );
+extern int G_math_solver_sparse_cg(G_math_spvector **, double *, double *, int , int , double );
+extern int G_math_solver_sparse_bicgstab(G_math_spvector **, double *, double *, int , int , double );
+
+/* solver algoithms and helper functions*/
+extern void G_math_gauss_elimination(double **, double *, int );
+extern void G_math_lu_decomposition(double **, double *, int );
+extern int G_math_cholesky_decomposition(double **, int , int );
+extern void G_math_cholesky_sband_decomposition(double **, double **, int, int);
+extern void G_math_backward_substitution(double **, double *, double *, int );
+extern void G_math_forward_substitution(double **, double *, double *, int );
+extern void G_math_cholesky_sband_substitution(double **, double *, double *, int, int);
+
+/*BLAS like level 1,2 and 3 functions*/
+
+/*level 1 vector - vector grass implementation with OpenMP thread support*/
+extern void G_math_d_x_dot_y(double *, double *, double *, int );
+extern void G_math_d_asum_norm(double *, double *, int );
+extern void G_math_d_euclid_norm(double *, double *, int );
+extern void G_math_d_max_norm(double *, double *, int );
+extern void G_math_d_ax_by(double *, double *, double *, double , double , int );
+extern void G_math_d_copy(double *, double *, int );
+
+extern void G_math_f_x_dot_y(float *, float *, float *, int );
+extern void G_math_f_asum_norm(float *, float *, int );
+extern void G_math_f_euclid_norm(float *, float *, int );
+extern void G_math_f_max_norm(float *, float *, int );
+extern void G_math_f_ax_by(float *, float *, float *, float , float , int );
+extern void G_math_f_copy(float *, float *, int );
+
+extern void G_math_i_x_dot_y(int *, int *,  double *, int );
+extern void G_math_i_asum_norm(int *,  double *, int );
+extern void G_math_i_euclid_norm(int *,  double *,int );
+extern void G_math_i_max_norm(int *,  int *, int );
+extern void G_math_i_ax_by(int *, int *, int *, int , int , int );
+extern void G_math_i_copy(int *, int *, int );
+
+/*ATLAS blas level 1 wrapper*/
+extern double G_math_ddot(double *, double *, int );
+extern float G_math_sdot(float *, float *, int );
+extern float G_math_sdsdot(float *, float *, float , int );
+extern double G_math_dnrm2(double *, int );
+extern double G_math_dasum(double *, int );
+extern double G_math_idamax(double *, int );
+extern float  G_math_snrm2(float *, int );
+extern float  G_math_sasum(float *, int );
+extern float  G_math_isamax(float *, int );
+extern void G_math_dscal(double *, double , int );
+extern void G_math_sscal(float *, float , int );
+extern void G_math_dcopy(double *, double *, int );
+extern void G_math_scopy(float *, float *, int );
+extern void G_math_daxpy(double *, double *, double , int );
+extern void G_math_saxpy(float *, float *, float , int );
+
+/*level 2 matrix - vector grass implementation with OpenMP thread support*/
+extern void G_math_d_Ax(double **, double *, double *, int , int );
+extern void G_math_f_Ax(float **, float *, float *, int , int );
+extern void G_math_d_x_dyad_y(double *, double *, double **, int, int );
+extern void G_math_f_x_dyad_y(float *, float *, float **, int, int );
+extern void G_math_d_aAx_by(double **, double *, double *, double , double , double *, int , int );
+extern void G_math_f_aAx_by(float **, float *, float *, float , float , float *, int , int );
+extern int G_math_d_A_T(double **A, int rows);
+extern int G_math_f_A_T(float **A, int rows);
+
+/*level 3 matrix - matrix grass implementation with OpenMP thread support*/
+extern void G_math_d_aA_B(double **, double **, double , double **, int , int );
+extern void G_math_f_aA_B(float **, float **, float , float **, int , int );
+extern void G_math_d_AB(double **, double **, double **, int , int , int );
+extern void G_math_f_AB(float **,  float **,  float **,  int , int , int );
+
+#endif /* GRASS_GMATHDEFS_H */

Copied: grass/trunk/include/defs/gprojects.h (from rev 49164, grass/trunk/include/gprojects.h)
===================================================================
--- grass/trunk/include/defs/gprojects.h	                        (rev 0)
+++ grass/trunk/include/defs/gprojects.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,51 @@
+#ifndef GRASS_GPROJECTSDEFS_H
+#define GRASS_GPROJECTSDEFS_H
+
+/* do_proj.c */
+int pj_do_proj(double *, double *, struct pj_info *, struct pj_info *);
+int pj_do_transform(int, double *, double *, double *,
+		    struct pj_info *, struct pj_info *);
+
+/* get_proj.c */
+int pj_get_kv(struct pj_info *, struct Key_Value *, struct Key_Value *);
+int pj_get_string(struct pj_info *, char *);
+int GPJ_get_equivalent_latlong(struct pj_info *, struct pj_info *);
+const char *set_proj_lib(const char *);
+int pj_print_proj_params(struct pj_info *, struct pj_info *);
+
+/* convert.c */
+#ifdef HAVE_OGR
+char *GPJ_grass_to_wkt(struct Key_Value *, struct Key_Value *, int, int);
+OGRSpatialReferenceH GPJ_grass_to_osr(struct Key_Value *, struct Key_Value *);
+int GPJ_wkt_to_grass(struct Cell_head *, struct Key_Value **,
+		     struct Key_Value **, const char *, int);
+int GPJ_osr_to_grass(struct Cell_head *, struct Key_Value **,
+		     struct Key_Value **, OGRSpatialReferenceH, int);
+const char *GPJ_set_csv_loc(const char *);
+#endif
+
+/* datum.c */
+int GPJ_get_datum_by_name(const char *, struct gpj_datum *);
+int GPJ_get_default_datum_params_by_name(const char *, char **);
+int GPJ_get_datum_params(char **, char **);
+int GPJ__get_datum_params(struct Key_Value *, char **, char **);
+void GPJ_free_datum(struct gpj_datum *);
+struct gpj_datum_transform_list *GPJ_get_datum_transform_by_name(const char *);
+void GPJ_free_datum_transform(struct gpj_datum_transform_list *);
+
+/* ellipse.c */
+int GPJ_get_ellipsoid_by_name(const char *, struct gpj_ellps *);
+int GPJ_get_ellipsoid_params(double *, double *, double *);
+int GPJ__get_ellipsoid_params(struct Key_Value *,
+			      double *, double *, double *);
+void GPJ_free_ellps(struct gpj_ellps *);
+
+
+/* PROJ.4's private datastructures copied from projects.h as removed
+   from upstream; pending better solution. see:
+   http://trac.osgeo.org/proj/ticket/98 */
+
+int pj_factors(LP, void *, double, struct FACTORS *);
+/* end of copy */
+
+#endif

Copied: grass/trunk/include/defs/ibtree.h (from rev 49164, grass/trunk/include/ibtree.h)
===================================================================
--- grass/trunk/include/defs/ibtree.h	                        (rev 0)
+++ grass/trunk/include/defs/ibtree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,14 @@
+#ifndef GRASS_IBTREEDEFS_H
+#define GRASS_IBTREEDEFS_H
+
+int ibtree_create(IBTREE *, int (*)(), int);
+int ibtree_find(IBTREE *, int, int *);
+int ibtree_free(IBTREE *);
+int ibtree_next(IBTREE *, int *, int *);
+int ibtree_rewind(IBTREE *);
+int Btree_init();
+int Btree_add(int);
+int Btree_report();
+int ibtree_update(IBTREE *, int, int);
+
+#endif

Copied: grass/trunk/include/defs/icon.h (from rev 49164, grass/trunk/include/icon.h)
===================================================================
--- grass/trunk/include/defs/icon.h	                        (rev 0)
+++ grass/trunk/include/defs/icon.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,14 @@
+#ifndef GRASS_ICONDEFS_H
+#define GRASS_ICONDEFS_H
+
+char *ask_icon_any(char *, char *, int);
+char *ask_icon_new(char *, char *);
+char *ask_icon_old(char *, char *);
+int get_icon(char *, char *, ICON *);
+int get_default_icon(ICON *);
+int put_icon(char *, ICON *);
+int read_icon(FILE *, ICON *);
+int release_icon(ICON *);
+int scale_icon(ICON *, ICON *, float);
+int write_icon(FILE *, ICON *, int);
+#endif

Copied: grass/trunk/include/defs/imagery.h (from rev 49164, grass/trunk/include/imagedefs.h)
===================================================================
--- grass/trunk/include/defs/imagery.h	                        (rev 0)
+++ grass/trunk/include/defs/imagery.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,118 @@
+#ifndef GRASS_IMAGEDEFS_H
+#define GRASS_IMAGEDEFS_H
+
+/* alloc.c */
+void *I_malloc(size_t);
+void *I_realloc(void *, size_t);
+int I_free(void *);
+double **I_alloc_double2(int, int);
+int *I_alloc_int(int);
+int **I_alloc_int2(int, int);
+int I_free_int2(int **);
+int I_free_double2(double **);
+double ***I_alloc_double3(int, int, int);
+int I_free_double3(double ***);
+
+/* eol.c */
+int I_get_to_eol(char *, int, FILE *);
+
+/* find.c */
+int I_find_group(const char *);
+int I_find_group_file(const char *, const char *);
+int I_find_subgroup(const char *, const char *);
+int I_find_subgroup_file(const char *, const char *, const char *);
+
+/* fopen.c */
+FILE *I_fopen_group_file_new(const char *, const char *);
+FILE *I_fopen_group_file_append(const char *, const char *);
+FILE *I_fopen_group_file_old(const char *, const char *);
+FILE *I_fopen_subgroup_file_new(const char *, const char *, const char *);
+FILE *I_fopen_subgroup_file_append(const char *, const char *, const char *);
+FILE *I_fopen_subgroup_file_old(const char *, const char *, const char *);
+
+/* georef.c */
+int I_compute_georef_equations(struct Control_Points *, double[3], double[3],
+			       double[3], double[3]);
+int I_georef(double, double, double *, double *, double[3], double[3]);
+
+/* group.c */
+int I_get_group(char *);
+int I_put_group(const char *);
+int I_get_subgroup(const char *, char *);
+int I_put_subgroup(const char *, const char *);
+int I_get_group_ref(const char *, struct Ref *);
+int I_get_subgroup_ref(const char *, const char *, struct Ref *);
+int I_init_ref_color_nums(struct Ref *);
+int I_put_group_ref(const char *, const struct Ref *);
+int I_put_subgroup_ref(const char *, const char *, const struct Ref *);
+int I_add_file_to_group_ref(const char *, const char *, struct Ref *);
+int I_transfer_group_ref_file(const struct Ref *, int, struct Ref *);
+int I_init_group_ref(struct Ref *);
+int I_free_group_ref(struct Ref *);
+
+/* list_gp.c */
+int I_list_group(const char *, const struct Ref *, FILE *);
+int I_list_group_simple(const struct Ref *, FILE *);
+
+/* list_subgp.c */
+int I_list_subgroup(const char *, const char *, const struct Ref *, FILE *);
+int I_list_subgroup_simple(const struct Ref *, FILE *);
+
+/* loc_info.c */
+char *I_location_info(const char *);
+
+/* points.c */
+int I_new_control_point(struct Control_Points *, double, double, double,
+			double, int);
+int I_get_control_points(const char *, struct Control_Points *);
+int I_put_control_points(const char *, const struct Control_Points *);
+
+/* ref.c */
+FILE *I_fopen_group_ref_new(const char *);
+FILE *I_fopen_group_ref_old(const char *);
+FILE *I_fopen_subgroup_ref_new(const char *, const char *);
+FILE *I_fopen_subgroup_ref_old(const char *, const char *);
+
+/* sig.c */
+int I_init_signatures(struct Signature *, int);
+int I_new_signature(struct Signature *);
+int I_free_signatures(struct Signature *);
+int I_read_one_signature(FILE *, struct Signature *);
+int I_read_signatures(FILE *, struct Signature *);
+int I_write_signatures(FILE *, struct Signature *);
+
+/* sigfile.c */
+FILE *I_fopen_signature_file_new(const char *, const char *, const char *);
+FILE *I_fopen_signature_file_old(const char *, const char *, const char *);
+
+/* sigset.c */
+int I_SigSetNClasses(struct SigSet *);
+struct ClassData *I_AllocClassData(struct SigSet *, struct ClassSig *, int);
+int I_InitSigSet(struct SigSet *);
+int I_SigSetNBands(struct SigSet *, int);
+struct ClassSig *I_NewClassSig(struct SigSet *);
+struct SubSig *I_NewSubSig(struct SigSet *, struct ClassSig *);
+int I_ReadSigSet(FILE *, struct SigSet *);
+int I_SetSigTitle(struct SigSet *, const char *);
+const char *I_GetSigTitle(const struct SigSet *);
+int I_SetClassTitle(struct ClassSig *, const char *);
+const char *I_GetClassTitle(const struct ClassSig *);
+int I_WriteSigSet(FILE *, const struct SigSet *);
+
+/* sigsetfile.c */
+FILE *I_fopen_sigset_file_new(const char *, const char *, const char *);
+FILE *I_fopen_sigset_file_old(const char *, const char *, const char *);
+
+/* target.c */
+int I_get_target(const char *, char *, char *);
+int I_put_target(const char *, const char *, const char *);
+
+/* title.c */
+int I_get_group_title(const char *, char *, int);
+int I_put_group_title(const char *, const char *);
+
+/* var.c */
+double I_variance(double, double, int);
+double I_stddev(double, double, int);
+
+#endif

Copied: grass/trunk/include/defs/la.h (from rev 49164, grass/trunk/include/la.h)
===================================================================
--- grass/trunk/include/defs/la.h	                        (rev 0)
+++ grass/trunk/include/defs/la.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,51 @@
+#ifndef GRASS_LADEFSDEFS_H
+#define GRASS_LADEFSDEFS_H
+
+/* Matrix routines corresponding to BLAS Level III */
+
+mat_struct *G_matrix_init(int, int, int);
+int G_matrix_zero(mat_struct *);
+int G_matrix_set(mat_struct *, int, int, int);
+mat_struct *G_matrix_copy(const mat_struct *);
+mat_struct *G_matrix_add(mat_struct *, mat_struct *);
+mat_struct *G_matrix_subtract(mat_struct *, mat_struct *);
+mat_struct *G_matrix_scale(mat_struct *, const double);
+mat_struct *G__matrix_add(mat_struct *, mat_struct *, const double,
+			  const double);
+mat_struct *G_matrix_product(mat_struct *, mat_struct *);
+mat_struct *G_matrix_transpose(mat_struct *);
+int G_matrix_LU_solve(const mat_struct *, mat_struct **, const mat_struct *,
+		      mat_type);
+mat_struct *G_matrix_inverse(mat_struct *);
+void G_matrix_free(mat_struct *);
+void G_matrix_print(mat_struct *);
+int G_matrix_set_element(mat_struct *, int, int, double);
+double G_matrix_get_element(mat_struct *, int, int);
+
+
+/* Matrix-vector routines corresponding to BLAS Level II */
+
+vec_struct *G_matvect_get_column(mat_struct *, int);
+vec_struct *G_matvect_get_row(mat_struct *, int);
+int G_matvect_extract_vector(mat_struct *, vtype, int);
+int G_matvect_retrieve_matrix(vec_struct *);
+
+
+/* Vector routines corresponding to BLAS Level I */
+
+vec_struct *G_vector_init(int, int, vtype);
+int G_vector_set(vec_struct *, int, int, vtype, int);
+double G_vector_norm_euclid(vec_struct *);
+double G_vector_norm_maxval(vec_struct *, int);
+vec_struct *G_vector_copy(const vec_struct *, int);
+
+/* Matrix and vector routines corresponding to ?? */
+
+void G_vector_free(vec_struct *);
+vec_struct *G_vector_sub(vec_struct *, vec_struct *, vec_struct *);
+double G_vector_norm1(vec_struct *);
+int G_matrix_read(FILE *, mat_struct *);
+int G_matrix_stdin(mat_struct *);
+int G_matrix_eigen_sort(vec_struct *, mat_struct *);
+
+#endif /* GRASS_LADEFS_H */

Copied: grass/trunk/include/defs/libtrans.h (from rev 49164, grass/trunk/include/libtrans.h)
===================================================================
--- grass/trunk/include/defs/libtrans.h	                        (rev 0)
+++ grass/trunk/include/defs/libtrans.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,22 @@
+#ifndef GRASS_LIBTRANSDEFS_H
+#define GRASS_LIBTRANSDEFS_H
+
+/* inverse.c */
+int inverse(double[DIM_matrix][DIM_matrix]);
+int isnull(double[DIM_matrix][DIM_matrix]);
+
+/* m_mult.c */
+int m_mult(double[DIM_matrix][DIM_matrix], double *, double *);
+
+/* transform.c */
+int compute_transformation_coef(double *, double *, double *, double *, int *,
+				int);
+int transform_a_into_b(double, double, double *, double *);
+int transform_b_into_a(double, double, double *, double *);
+int residuals_a_predicts_b(double *, double *, double *, double *, int *, int,
+			   double *, double *);
+int residuals_b_predicts_a(double *, double *, double *, double *, int *, int,
+			   double *, double *);
+int print_transform_matrix(void);
+
+#endif /* GRASS_LIBTRANSDEFS_H */

Copied: grass/trunk/include/defs/linkm.h (from rev 49164, grass/trunk/include/linkm.h)
===================================================================
--- grass/trunk/include/defs/linkm.h	                        (rev 0)
+++ grass/trunk/include/defs/linkm.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,26 @@
+#ifndef GRASS_LINKMDEFS_H
+#define GRASS_LINKMDEFS_H
+
+/* destroy.c */
+void link_destroy(struct link_head *, VOID_T *);
+
+/* dispose.c */
+void link_dispose(struct link_head *, VOID_T *);
+
+/* init.c */
+void link_set_chunk_size(int);
+void link_exit_on_error(int);
+struct link_head *link_init(int);
+void link_cleanup(struct link_head *);
+
+/* new.c */
+struct link_head *link_new(struct link_head *);
+
+/* next.c */
+VOID_T *link__get_next(VOID_T *);
+void link__set_next(VOID_T *, VOID_T *);
+
+/* oom.c */
+int link_out_of_memory(void);
+
+#endif

Copied: grass/trunk/include/defs/manage.h (from rev 49164, grass/trunk/include/manage.h)
===================================================================
--- grass/trunk/include/defs/manage.h	                        (rev 0)
+++ grass/trunk/include/defs/manage.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,46 @@
+#ifndef GRASS_MANAGEDEFS_H
+#define GRASS_MANAGEDEFS_H
+
+/* add_elem.c */
+void M__add_element(const char *, const char *);
+
+/* do_copy.c */
+int M_do_copy(int, const char *, const char *, const char *);
+
+/* do_list.c */
+void M_do_list(int, const char *);
+
+/* do_remove.c */
+int M_do_remove(int, const char *);
+
+/* do_rename.c */
+int M_do_rename(int, const char *, const char *);
+
+/* empty.c */
+int M__empty(char *);
+
+/* find.c */
+const char *M_find(int, char *, const char *);
+
+/* get_len.c */
+int M__get_description_len(int);
+
+/* list.c */
+int M_get_element(const char *);
+const struct list *M_get_list(int);
+
+/* read_list.c */
+int M_read_list(int, int *);
+
+/* option.c */
+struct Option* M_define_option(int, const char *, int);
+const char *M_get_options(int);
+const char *M_get_option_desc(int);
+
+/* show_elem.c */
+void M_show_elements(void);
+
+/* sighold.c */
+int M__hold_signals(int);
+
+#endif

Copied: grass/trunk/include/defs/neta.h (from rev 49164, grass/trunk/include/neta.h)
===================================================================
--- grass/trunk/include/defs/neta.h	                        (rev 0)
+++ grass/trunk/include/defs/neta.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,90 @@
+#ifndef GRASS_NETADEFS_H
+#define GRASS_NETADEFS_H
+
+/*bridge.c */
+int NetA_compute_bridges(dglGraph_s * graph, struct ilist *bridge_list);
+int NetA_articulation_points(dglGraph_s * graph,
+			     struct ilist *articulation_list);
+
+/*components.c */
+int NetA_weakly_connected_components(dglGraph_s * graph, int *component);
+int NetA_strongly_connected_components(dglGraph_s * graph, int *component);
+
+/*spanningtree.c */
+int NetA_spanning_tree(dglGraph_s * graph, struct ilist *tree_list);
+
+/*allpairs.c */
+int NetA_allpairs(dglGraph_s * graph, dglInt32_t ** dist);
+
+/*neta_flow.c */
+int NetA_flow(dglGraph_s * graph, struct ilist *source_list,
+	      struct ilist *sink_list, int *flow);
+int NetA_min_cut(dglGraph_s * graph, struct ilist *source_list,
+		 struct ilist *sink_list, int *flow, struct ilist *cut);
+int NetA_split_vertices(dglGraph_s * in, dglGraph_s * out, int *node_costs);
+
+/*utils.c */
+void NetA_add_point_on_node(struct Map_info *In, struct Map_info *Out, int node,
+			    struct line_cats *Cats);
+void NetA_points_to_nodes(struct Map_info *In, struct ilist *point_list);
+int NetA_get_node_costs(struct Map_info *In, int layer, char *column,
+			int *node_costs);
+void NetA_varray_to_nodes(struct Map_info *map, struct varray * varray,
+			  struct ilist *nodes, int *nodes_to_features);
+int NetA_initialise_varray(struct Map_info *In, int layer, int mask_type,
+			   char *where, char *cat, struct varray ** varray);
+/*centrality.c */
+void NetA_degree_centrality(dglGraph_s * graph, double *degree);
+int NetA_eigenvector_centrality(dglGraph_s * graph, int iterations,
+				double error, double *eigenvector);
+int NetA_betweenness_closeness(dglGraph_s * graph, double *betweenness,
+			       double *closeness);
+
+/*path.c */
+int NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst,
+			      dglInt32_t ** prev);
+int NetA_find_path(dglGraph_s * graph, int from, int to, int *edges,
+		   struct ilist *list);
+
+/*timetables.c */
+
+/*Structure containing all information about a timetable.
+ * Everything in indexed from 0.
+ */
+typedef struct
+{
+    int routes;			/*Number of different routes. Two routes are different even if they differ only in time. */
+    int *route_length;		/*Length of each route, i.e., number of stops */
+    int **route_stops;		/*list of stops on each route in order (time increases) */
+    int **route_times;		/*stop arrival times on overy route. Stops are given in the same order as above */
+    int stops;			/*number of stops */
+    int *stop_length;		/*Number of routes stopping at each stop */
+    int **stop_routes;		/*List of routes for each stop. Routes are in increasing order */
+    int **stop_times;		/*arrival times of routes for each stop. Routes are given in the same order as above */
+    int *walk_length;		/*number of stops with "walking connection" for each stop */
+    int **walk_stops;		/*list of stops within walking distance for each stop */
+    int **walk_times;		/*walking times between stops as given above */
+} neta_timetable;
+
+typedef struct
+{
+    int **dst;
+    int **prev_stop;
+    int **prev_route;
+    int **prev_conn;
+    int rows, routes;
+} neta_timetable_result;
+int NetA_init_timetable_from_db(struct Map_info *In, int route_layer,
+				int walk_layer, char *route_id, char *times,
+				char *to_stop, char *walk_length,
+				neta_timetable * timetable, int **route_ids,
+				int **stop_ids);
+int NetA_timetable_shortest_path(neta_timetable * timetable, int from_stop,
+				 int to_stop, int start_time, int min_change,
+				 int max_changes, int walking_change,
+				 neta_timetable_result * result);
+int NetA_timetable_get_route_time(neta_timetable * timetable, int stop,
+				  int route);
+void NetA_timetable_result_release(neta_timetable_result * result);
+
+#endif

Copied: grass/trunk/include/defs/nviz.h (from rev 49164, grass/trunk/include/nviz.h)
===================================================================
--- grass/trunk/include/defs/nviz.h	                        (rev 0)
+++ grass/trunk/include/defs/nviz.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,105 @@
+#ifndef GRASS_NVIZDEFS_H
+#define GRASS_NVIZDEFS_H
+
+/* change_view.c */
+int Nviz_resize_window(int, int);
+int Nviz_update_ranges(nv_data *);
+int Nviz_set_viewpoint_position(double, double);
+int Nviz_set_viewpoint_height(double);
+int Nviz_set_viewpoint_persp(int);
+int Nviz_set_viewpoint_twist(int);
+int Nviz_change_exag(nv_data *, double);
+int Nviz_look_here(double, double);
+void Nviz_get_modelview(double *);
+void Nviz_set_rotation(double, double, double, double);
+void Nviz_unset_rotation(void);
+void Nviz_init_rotation(void);
+void Nviz_flythrough(nv_data *, float *, int *, int);
+
+/* cplanes_obj.c */
+int Nviz_new_cplane(nv_data *, int);
+int Nviz_on_cplane(nv_data *, int);
+int Nviz_off_cplane(nv_data *, int);
+int Nviz_draw_cplane(nv_data *, int, int);
+int Nviz_num_cplanes(nv_data *);
+int Nviz_get_current_cplane(nv_data *);
+int Nviz_set_cplane_rotation(nv_data *, int, float, float, float);
+int Nviz_get_cplane_rotation(nv_data *, int, float *, float *, float *);
+int Nviz_set_cplane_translation(nv_data *, int, float, float, float);
+int Nviz_get_cplane_translation(nv_data *, int, float *, float *, float *);
+int Nviz_set_fence_color(nv_data *, int);
+int Nviz_set_cplane_here(nv_data *, int, float, float);
+
+
+/* draw.c */
+int Nviz_draw_all_surf(nv_data *);
+int Nviz_draw_all_vect();
+int Nviz_draw_all_site();
+int Nviz_draw_all_vol();
+int Nviz_draw_all(nv_data *);
+int Nviz_draw_quick(nv_data *, int);
+int Nviz_load_image(GLubyte *, int, int, int);
+void Nviz_draw_image(int, int, int, int, int);
+void Nviz_set_2D(int, int);
+void Nviz_del_texture(int);
+void Nviz_get_max_texture(int *);
+
+/* exag.c */
+int Nviz_get_exag_height(double *, double *, double *);
+double Nviz_get_exag();
+
+/* lights.c */
+int Nviz_set_light_position(nv_data *, int, double, double, double, double);
+int Nviz_set_light_bright(nv_data *, int, double);
+int Nviz_set_light_color(nv_data *, int, int, int, int);
+int Nviz_set_light_ambient(nv_data *, int, double);
+int Nviz_init_light(nv_data *, int);
+int Nviz_new_light(nv_data *);
+void Nviz_draw_model(nv_data *);
+
+/* map_obj.c */
+int Nviz_new_map_obj(int, const char *, double, nv_data *);
+int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *);
+void Nviz_set_surface_attr_default();
+int Nviz_set_vpoint_attr_default();
+int Nviz_set_volume_attr_default();
+int Nviz_unset_attr(int, int, int);
+
+/* nviz.c */
+void Nviz_init_data(nv_data *);
+void Nviz_destroy_data(nv_data *);
+void Nviz_set_bgcolor(nv_data *, int);
+int Nviz_get_bgcolor(nv_data *);
+int Nviz_color_from_str(const char *);
+struct fringe_data *Nviz_new_fringe(nv_data *, int, unsigned long,
+				    double, int, int, int, int);
+struct fringe_data *Nviz_set_fringe(nv_data *, int, unsigned long,
+				    double, int, int, int, int);
+void Nviz_draw_fringe(nv_data *data);
+int Nviz_draw_arrow(nv_data *);
+int Nviz_set_arrow(nv_data *, int, int, float, unsigned int);
+void Nviz_delete_arrow(nv_data *);
+struct scalebar_data * Nviz_new_scalebar(nv_data *, int, float *, float, unsigned int);
+struct scalebar_data * Nviz_set_scalebar(nv_data *, int , int, int, float, unsigned int);
+void Nviz_draw_scalebar(nv_data *);
+void Nviz_delete_scalebar(nv_data *, int);
+
+/* position.c */
+void Nviz_init_view(nv_data *);
+int Nviz_set_focus_state(int);
+int Nviz_set_focus_map(int, int);
+int Nviz_has_focus(nv_data *);
+int Nviz_set_focus(nv_data *, float, float, float);
+int Nviz_get_focus(nv_data *, float *, float *, float *);
+float Nviz_get_xyrange(nv_data *);
+int Nviz_get_zrange(nv_data *, float *, float *);
+float Nviz_get_longdim(nv_data *);
+
+/* render.c */
+struct render_window *Nviz_new_render_window();
+void Nviz_init_render_window(struct render_window *);
+void Nviz_destroy_render_window(struct render_window *);
+int Nviz_create_render_window(struct render_window *, void *, int, int);
+int Nviz_make_current_render_window(const struct render_window *);
+
+#endif /* GRASS_NVIZDEFS_H */

Added: grass/trunk/include/defs/ogsf.h
===================================================================
--- grass/trunk/include/defs/ogsf.h	                        (rev 0)
+++ grass/trunk/include/defs/ogsf.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,741 @@
+#ifndef GRASS_OGSFDEFS_H
+#define GRASS_OGSFDEFS_H
+
+/* GK2.c */
+int GK_set_interpmode(int);
+void GK_set_tension(float);
+void GK_showtension_start(void);
+void GK_showtension_stop(void);
+void GK_update_tension(void);
+void GK_update_frames(void);
+void GK_set_numsteps(int);
+void GK_clear_keys(void);
+void GK_print_keys(const char *);
+int GK_move_key(float, float, float);
+int GK_delete_key(float, float, int);
+int GK_add_key(float, unsigned long, int, float);
+void GK_do_framestep(int, int);
+void GK_show_path(int);
+void GK_show_vect(int);
+void GK_show_site(int);
+void GK_show_vol(int);
+void GK_show_list(int);
+
+/* GP2.c */
+int GP_site_exists(int);
+int GP_new_site(void);
+int GP_num_sites(void);
+int *GP_get_site_list(int *);
+int GP_delete_site(int);
+int GP_load_site(int, const char *);
+int GP_get_sitename(int, char **);
+int GP_get_style(int, int *, int *, float *, int *);
+int GP_set_style(int, int, int, float, int);
+int GP_set_style_thematic(int, int, const char *, const char *, const char *,
+			  const char *, struct Colors *);
+int GP_unset_style_thematic(int);
+int GP_attmode_color(int, const char *);
+int GP_attmode_none(int);
+int GP_set_zmode(int, int);
+int GP_get_zmode(int, int *);
+void GP_set_trans(int, float, float, float);
+void GP_get_trans(int, float *, float *, float *);
+int GP_select_surf(int, int);
+int GP_unselect_surf(int, int);
+int GP_surf_is_selected(int, int);
+void GP_draw_site(int);
+void GP_alldraw_site(void);
+int GP_Set_ClientData(int, void *);
+void *GP_Get_ClientData(int);
+int GP_str_to_marker(const char *);
+
+/* GS2.c */
+void void_func(void);
+void GS_libinit(void);
+int GS_get_longdim(float *);
+int GS_get_region(float *, float *, float *, float *);
+void GS_set_att_defaults(float *, float *);
+int GS_surf_exists(int);
+int GS_new_surface(void);
+int GS_new_light(void);
+void GS_set_light_reset(int);
+int GS_get_light_reset(void);
+void GS_setlight_position(int, float, float, float, int);
+void GS_setlight_color(int, float, float, float);
+void GS_setlight_ambient(int, float, float, float);
+void GS_lights_off(void);
+void GS_lights_on(void);
+void GS_switchlight(int, int);
+int GS_transp_is_set(void);
+void GS_get_modelposition1(float *);
+void GS_get_modelposition(float *, float *);
+void GS_draw_X(int, float *);
+void GS_set_Narrow(int *, int, float *);
+void GS_draw_line_onsurf(int, float, float, float, float);
+int GS_draw_nline_onsurf(int, float, float, float, float, float *, int);
+void GS_draw_flowline_at_xy(int, float, float);
+void GS_draw_lighting_model1(void);
+void GS_draw_lighting_model(void);
+int GS_update_curmask(int);
+int GS_is_masked(int, float *);
+void GS_unset_SDsurf(void);
+int GS_set_SDsurf(int);
+int GS_set_SDscale(float);
+int GS_get_SDsurf(int *);
+int GS_get_SDscale(float *);
+int GS_update_normals(int);
+int GS_get_att(int, int, int *, float *, char *);
+int GS_get_cat_at_xy(int, int, char *, float, float);
+int GS_get_norm_at_xy(int, float, float, float *);
+int GS_get_val_at_xy(int, int, char *, float, float);
+int GS_unset_att(int, int);
+int GS_set_att_const(int, int, float);
+int GS_set_maskmode(int, int);
+int GS_get_maskmode(int, int *);
+int GS_Set_ClientData(int, void *);
+void *GS_Get_ClientData(int);
+int GS_num_surfs(void);
+int *GS_get_surf_list(int *);
+int GS_delete_surface(int);
+int GS_load_att_map(int, const char *, int);
+void GS_draw_surf(int);
+void GS_draw_wire(int);
+void GS_alldraw_wire(void);
+void GS_alldraw_surf(void);
+void GS_set_exag(int, float);
+void GS_set_global_exag(float);
+float GS_global_exag(void);
+void GS_set_wire_color(int, int);
+int GS_get_wire_color(int, int *);
+int GS_setall_drawmode(int);
+int GS_set_drawmode(int, int);
+int GS_get_drawmode(int, int *);
+void GS_set_nozero(int, int, int);
+int GS_get_nozero(int, int, int *);
+int GS_setall_drawres(int, int, int, int);
+int GS_set_drawres(int, int, int, int, int);
+void GS_get_drawres(int, int *, int *, int *, int *);
+void GS_get_dims(int, int *, int *);
+int GS_get_exag_guess(int, float *);
+void GS_get_zrange_nz(float *, float *);
+void GS_set_trans(int, float, float, float);
+void GS_get_trans(int, float *, float *, float *);
+unsigned int GS_default_draw_color(void);
+unsigned int GS_background_color(void);
+void GS_set_draw(int);
+void GS_ready_draw(void);
+void GS_done_draw(void);
+void GS_set_focus(float *);
+int GS_get_focus(float *);
+void GS_set_focus_center_map(int);
+void GS_moveto(float *);
+void GS_moveto_real(float *);
+void GS_set_focus_real(float *);
+void GS_get_to_real(float *);
+int GS_get_zextents(int, float *, float *, float *);
+int GS_get_zrange(float *, float *, int);
+void GS_get_from(float *);
+void GS_get_from_real(float *);
+void GS_get_to(float *);
+void GS_get_viewdir(float *);
+void GS_set_viewdir(float *);
+void GS_set_fov(int);
+void GS_set_rotation(double, double, double, double);
+void GS_get_rotation_matrix(double *);
+void GS_set_rotation_matrix(double *);
+void GS_init_rotation(void);
+void GS_unset_rotation(void);
+int GS_get_fov(void);
+int GS_get_twist(void);
+void GS_set_twist(int);
+void GS_set_nofocus(void);
+void GS_set_infocus(void);
+void GS_set_viewport(int, int, int, int);
+int GS_look_here(int, int);
+int GS_get_selected_point_on_surface(int, int, int *, float *, float *,
+				     float *);
+void GS_set_cplane_rot(int, float, float, float);
+void GS_set_cplane_trans(int, float, float, float);
+void GS_draw_cplane(int);
+int GS_draw_cplane_fence(int, int, int);
+void GS_alldraw_cplane_fences(void);
+void GS_set_cplane(int);
+void GS_unset_cplane(int);
+void GS_get_scale(float *, float *, float *, int);
+void GS_set_fencecolor(int);
+int GS_get_fencecolor(void);
+int GS_get_distance_alongsurf(int, float, float, float, float, float *, int);
+int GS_save_3dview(const char *, int);
+int GS_load_3dview(const char *, int);
+void GS_init_view(void);
+void GS_clear(int);
+double GS_get_aspect(void);
+int GS_has_transparency(void);
+void GS_zoom_setup(int *, int *, int *, int *, int *, int *);
+int GS_write_zoom(const char *, unsigned int, unsigned int);
+void GS_draw_all_list(void);
+void GS_delete_list(GLuint);
+int GS_draw_legend(const char *, GLuint, int, int *, float *, int *);
+void GS_draw_fringe(int, unsigned long, float, int *);
+void GS_getlight_position(int, float *, float *, float *, int *);
+void GS_getlight_color(int, float *, float *, float *);
+void GS_getlight_ambient(int, float *, float *, float *);
+
+/* GSX.c */
+int GS_check_cancel(void);
+void GS_set_cancel(int);
+void GS_set_cxl_func(void (*)(void));
+void GS_set_swap_func(void (*)(void));
+
+/* GS_util.c */
+double GS_geodistance(double *, double *, const char *);
+float GS_distance(float *, float *);
+float GS_P2distance(float *, float *);
+void GS_v3eq(float *, float *);
+void GS_v3add(float *, float *);
+void GS_v3sub(float *, float *);
+void GS_v3mult(float *, float);
+int GS_v3norm(float *);
+int GS_v2norm(float *);
+int GS_dv3norm(double *);
+int GS_v3normalize(float *, float *);
+int GS_v3dir(float *, float *, float *);
+void GS_v2dir(float *, float *, float *);
+void GS_v3cross(float *, float *, float *);
+void GS_v3mag(float *, float *);
+int GS_coordpair_repeats(float *, float *, int);
+
+/* GV2.c */
+int GV_vect_exists(int);
+int GV_new_vector(void);
+int GV_num_vects(void);
+int *GV_get_vect_list(int *);
+int GV_delete_vector(int);
+int GV_load_vector(int, const char *);
+int GV_get_vectname(int, char **);
+int GV_set_style(int, int, int, int, int);
+int GV_get_style(int, int *, int *, int *, int *);
+int GV_set_style_thematic(int, int, const char *, const char *, struct Colors *);
+int GV_unset_style_thematic(int);
+void GV_set_trans(int, float, float, float);
+int GV_get_trans(int, float *, float *, float *);
+int GV_select_surf(int, int);
+int GV_unselect_surf(int, int);
+int GV_surf_is_selected(int, int);
+void GV_draw_vect(int);
+void GV_alldraw_vect(void);
+void GV_alldraw_fastvect(void);
+void GV_draw_fastvect(int);
+int GV_Set_ClientData(int, void *);
+void *GV_Get_ClientData(int);
+
+/* GVL2.c */
+void GVL_libinit(void);
+int GVL_get_region(float *, float *, float *, float *, float *, float *);
+void *GVL_get_window();
+int GVL_vol_exists(int);
+int GVL_new_vol(void);
+int GVL_num_vols(void);
+int *GVL_get_vol_list(int *);
+int GVL_delete_vol(int);
+int GVL_load_vol(int, const char *);
+int GVL_get_volname(int, char *);
+void GVL_set_trans(int, float, float, float);
+int GVL_get_trans(int, float *, float *, float *);
+void GVL_draw_vol(int);
+void GVL_draw_wire(int);
+void GVL_alldraw_vol(void);
+void GVL_alldraw_wire(void);
+int GVL_Set_ClientData(int, void *);
+void *GVL_Get_ClientData(int);
+void GVL_get_dims(int, int *, int *, int *);
+void GVL_set_focus_center_map(int);
+
+int GVL_isosurf_move_up(int, int);
+int GVL_isosurf_move_down(int, int);
+void GVL_isosurf_get_drawres(int, int *, int *, int *);
+int GVL_isosurf_set_drawres(int, int, int, int);
+int GVL_isosurf_get_drawmode(int, int *);
+int GVL_isosurf_set_drawmode(int, int);
+int GVL_isosurf_add(int);
+int GVL_isosurf_del(int, int);
+int GVL_isosurf_get_att(int, int, int, int *, float *, char *);
+int GVL_isosurf_unset_att(int, int, int);
+int GVL_isosurf_set_att_const(int, int, int, float);
+int GVL_isosurf_set_att_map(int, int, int, const char *);
+int GVL_isosurf_get_flags(int, int, int *);
+int GVL_isosurf_set_flags(int, int, int);
+int GVL_isosurf_num_isosurfs(int);
+int GVL_isosurf_set_maskmode(int, int, int);
+int GVL_isosurf_get_maskmode(int, int, int *);
+
+int GVL_slice_move_up(int, int);
+int GVL_slice_move_down(int, int);
+void GVL_slice_get_drawres(int, int *, int *, int *);
+int GVL_slice_get_transp(int, int, int *);
+int GVL_slice_set_transp(int, int, int);
+int GVL_slice_set_drawres(int, int, int, int);
+int GVL_slice_get_drawmode(int, int *);
+int GVL_slice_set_drawmode(int, int);
+int GVL_slice_add(int);
+int GVL_slice_del(int, int);
+int GVL_slice_num_slices(int);
+int GVL_slice_get_pos(int, int, float *, float *, float *, float *, float *,
+		      float *, int *);
+int GVL_slice_set_pos(int, int, float, float, float, float, float, float,
+		      int);
+
+/* Gp3.c */
+int Gp_set_color(const char *, geopoint *);
+geopoint *Gp_load_sites(const char *, int *, int *);
+int Gp_load_sites_thematic(geosite *, struct Colors *);
+
+/* Gs3.c */
+double Gs_distance(double *, double *);
+int Gs_loadmap_as_float(struct Cell_head *, const char *, float *,
+			struct BM *, int *);
+int Gs_loadmap_as_int(struct Cell_head *, const char *, int *, struct BM *,
+		      int *);
+int Gs_numtype(const char *, int *);
+int Gs_loadmap_as_short(struct Cell_head *, const char *, short *,
+			struct BM *, int *);
+int Gs_loadmap_as_char(struct Cell_head *, const char *, unsigned char *,
+		       struct BM *, int *);
+int Gs_loadmap_as_bitmap(struct Cell_head *, const char *, struct BM *);
+int Gs_build_256lookup(const char *, int *);
+void Gs_pack_colors(const char *, int *, int, int);
+void Gs_pack_colors_float(const char *, float *, int *, int, int);
+int Gs_get_cat_label(const char *, int, int, char *);
+int Gs_save_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
+		   geosurf *);
+int Gs_load_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
+		   geosurf *);
+int Gs_update_attrange(geosurf *, int);
+
+/* Gv3.c */
+geoline *Gv_load_vect(const char *, int *);
+int Gv_load_vect_thematic(geovect *, struct Colors *);
+void sub_Vectmem(int);
+
+/* gk.c */
+Keylist *gk_copy_key(Keylist *);
+unsigned long gk_get_mask_sofar(float, Keylist *);
+int gk_viable_keys_for_mask(unsigned long, Keylist *, Keylist **);
+void gk_follow_frames(Viewnode *, int, Keylist *, int, int, int,
+		      unsigned long);
+void gk_free_key(Keylist *);
+Viewnode *gk_make_framesfromkeys(Keylist *, int, int, int, float);
+double get_key_neighbors(int, double, double, int, Keylist **, Keylist **,
+			 Keylist **, Keylist **, Keylist **, double *,
+			 double *);
+double lin_interp(float, float, float);
+double get_2key_neighbors(int, float, float, int, Keylist **, Keylist **,
+			  Keylist **);
+Viewnode *gk_make_linear_framesfromkeys(Keylist *, int, int, int);
+void correct_twist(Keylist *);
+int gk_draw_path(Viewnode *, int, Keylist *);
+
+/* gp.c */
+geosite *gp_get_site(int);
+geosite *gp_get_prev_site(int);
+int gp_num_sites(void);
+geosite *gp_get_last_site(void);
+geosite *gp_get_new_site(void);
+void gp_update_drapesurfs(void);
+int gp_set_defaults(geosite *);
+void print_site_fields(geosite *);
+int gp_init_site(geosite *);
+void gp_delete_site(int);
+int gp_free_site(geosite *);
+void gp_free_sitemem(geosite *);
+void gp_set_drapesurfs(geosite *, int *, int);
+
+/* gpd.c */
+int gs_point_in_region(geosurf *, float *, float *);
+void gpd_obj(geosurf *, gvstyle *, Point3);
+int gpd_2dsite(geosite *, geosurf *, int);
+int gpd_3dsite(geosite *, float, float, int);
+
+/* gs.c */
+void gs_err(const char *);
+void gs_init(void);
+geosurf *gs_get_surf(int);
+geosurf *gs_get_prev_surface(int);
+int gs_getall_surfaces(geosurf **);
+int gs_num_surfaces(void);
+int gs_att_is_set(geosurf *, IFLAG);
+geosurf *gs_get_last_surface(void);
+geosurf *gs_get_new_surface(void);
+int gs_init_surf(geosurf *, double, double, int, int, double, double);
+int gs_init_normbuff(geosurf *);
+void print_frto(float (*)[4]);
+void print_realto(float *);
+void print_256lookup(int *);
+void print_surf_fields(geosurf *);
+void print_view_fields(geoview *);
+void gs_set_defaults(geosurf *, float *, float *);
+void gs_delete_surf(int);
+int gs_free_surf(geosurf *);
+void gs_free_unshared_buffs(geosurf *);
+int gs_num_datah_reused(int);
+int gs_get_att_type(geosurf *, int);
+int gs_get_att_src(geosurf *, int);
+typbuff *gs_get_att_typbuff(geosurf *, int, int);
+int gs_malloc_att_buff(geosurf *, int, int);
+int gs_malloc_lookup(geosurf *, int);
+int gs_set_att_type(geosurf *, int, int);
+int gs_set_att_src(geosurf *, int, int);
+int gs_set_att_const(geosurf *, int, float);
+void gs_set_maskmode(int);
+int gs_mask_defined(geosurf *);
+int gs_masked(typbuff *, int, int, int);
+int gs_mapcolor(typbuff *, gsurf_att *, int);
+int gs_get_zextents(geosurf *, float *, float *, float *);
+int gs_get_xextents(geosurf *, float *, float *);
+int gs_get_yextents(geosurf *, float *, float *);
+int gs_get_zrange0(float *, float *);
+int gs_get_zrange(float *, float *);
+int gs_get_xrange(float *, float *);
+int gs_get_yrange(float *, float *);
+int gs_get_data_avg_zmax(float *);
+int gs_get_datacenter(float *);
+int gs_setall_norm_needupdate(void);
+int gs_point_is_masked(geosurf *, float *);
+int gs_distance_onsurf(geosurf *, float *, float *, float *, int);
+
+/* gs_bm.c */
+struct BM *gsbm_make_mask(typbuff *, float, int, int);
+void gsbm_zero_mask(struct BM *);
+int gsbm_or_masks(struct BM *, struct BM *);
+int gsbm_ornot_masks(struct BM *, struct BM *);
+int gsbm_and_masks(struct BM *, struct BM *);
+int gsbm_xor_masks(struct BM *, struct BM *);
+int gs_update_curmask(geosurf *);
+void print_bm(struct BM *);
+
+/* gs_norms.c */
+void init_vars(geosurf *);
+int gs_calc_normals(geosurf *);
+int calc_norm(geosurf *, int, int, unsigned int);
+
+/* gs_query.c */
+int gs_los_intersect1(int, float (*)[3], float *);
+int gs_los_intersect(int, float **, float *);
+int RayCvxPolyhedronInt(Point3, Point3, double, Point4 *, int, double *,
+			int *);
+void gs_get_databounds_planes(Point4 *);
+int gs_setlos_enterdata(Point3 *);
+
+/* gsd_cplane.c */
+void gsd_def_cplane(int, float *, float *);
+void gsd_update_cplanes(void);
+void gsd_cplane_on(int);
+void gsd_cplane_off(int);
+void gsd_get_cplanes_state(int *);
+int gsd_get_cplanes(Point4 *);
+void gsd_update_cpnorm(int);
+void gsd_cplane_setrot(int, float, float, float);
+void gsd_cplane_settrans(int, float, float, float);
+void gsd_draw_cplane_fence(geosurf *, geosurf *, int);
+void gsd_draw_cplane(int);
+
+/* gsd_fonts.c */
+GLuint gsd_set_font(const char *);
+int gsd_get_txtwidth(const char *, int);
+int gsd_get_txtheight(int size);
+void do_label_display(GLuint, float *, const char *);
+int get_txtdescender(void);
+int get_txtxoffset(void);
+
+/* gsd_img_ppm.c */
+int GS_write_ppm(const char *);
+int gsd_init_mpeg(const char *);
+int gsd_write_mpegframe(void);
+int gsd_close_mpeg(void);
+
+/* gsd_img_tif.c */
+int GS_write_tif(const char *);
+
+/* gsd_label.c */
+void gs_put_label(const char *, GLuint, int, unsigned long, int *);
+void gsd_remove_curr(void);
+void gsd_remove_all(void);
+void gsd_call_label(void);
+
+/* gsd_objs.c */
+void gsd_box(float *, int, float *);
+void gsd_plus(float *, int, float);
+void gsd_line_onsurf(geosurf *, float *, float *);
+int gsd_nline_onsurf(geosurf *, float *, float *, float *, int);
+void gsd_x(geosurf *, float *, int, float);
+void gsd_diamond(float *, unsigned long, float);
+void gsd_diamond_lines(void);
+void gsd_cube(float *, unsigned long, float);
+void gsd_draw_box(float *, unsigned long, float);
+void gsd_drawsphere(float *, unsigned long, float);
+void gsd_draw_asterisk(float *, unsigned long, float);
+void gsd_draw_gyro(float *, unsigned long, float);
+void gsd_3dcursor(float *);
+void dir_to_slope_aspect(float *, float *, float *, int);
+int gsd_north_arrow(float *, float, GLuint, unsigned long, unsigned long);
+int gsd_arrow(float *, unsigned long, float, float *, float, geosurf *);
+int gsd_arrow_onsurf(float *, float *, unsigned long, int, geosurf *);
+void gsd_3darrow(float *, unsigned long, float, float, float *, float);
+int gsd_scalebar(float *, float, GLuint, unsigned long, unsigned long);
+int gsd_scalebar_v2(float *, float, GLuint, unsigned long, unsigned long);
+void primitive_cone(unsigned long);
+void primitive_cylinder(unsigned long, int);
+
+/* gsd_prim.c */
+void gsd_flush(void);
+void gsd_colormode(int);
+void show_colormode(void);
+void gsd_circ(float, float, float);
+void gsd_disc(float, float, float, float);
+void gsd_sphere(float *, float);
+void gsd_zwritemask(unsigned long);
+void gsd_backface(int);
+void gsd_linewidth(short);
+void gsd_bgnqstrip(void);
+void gsd_endqstrip(void);
+void gsd_bgntmesh(void);
+void gsd_endtmesh(void);
+void gsd_bgntstrip(void);
+void gsd_endtstrip(void);
+void gsd_bgntfan(void);
+void gsd_endtfan(void);
+void gsd_swaptmesh(void);
+void gsd_bgnpolygon(void);
+void gsd_endpolygon(void);
+void gsd_bgnline(void);
+void gsd_endline(void);
+void gsd_shademodel(int);
+int gsd_getshademodel(void);
+void gsd_bothbuffer(void);
+void gsd_frontbuffer(int);
+void gsd_backbuffer(int);
+void gsd_swapbuffers(void);
+void gsd_popmatrix(void);
+void gsd_pushmatrix(void);
+void gsd_scale(float, float, float);
+void gsd_translate(float, float, float);
+void gsd_rot(float, char);
+void gsd_checkwindow(int *, int *, double *, double *);
+int gsd_checkpoint(float *, int *, int *, double *, double *);
+void gsd_litvert_func(float *, unsigned long, float *);
+void gsd_litvert_func2(float *, unsigned long, float *);
+void gsd_vert_func(float *);
+void gsd_color_func(unsigned int);
+void gsd_init_lightmodel(void);
+void gsd_set_material(int, int, float, float, int);
+void gsd_deflight(int, struct lightdefs *);
+void gsd_switchlight(int, int);
+int gsd_getimage(unsigned char **, unsigned int *, unsigned int *);
+void gsd_blend(int);
+void gsd_def_clipplane(int, double *);
+void gsd_set_clipplane(int, int);
+void gsd_finish(void);
+void gsd_viewport(int, int, int, int);
+int gsd_makelist(void);
+void gsd_bgnlist(int, int);
+void gsd_endlist(void);
+void gsd_calllist(int);
+void gsd_deletelist(GLuint, int);
+void gsd_calllists(int);
+void gsd_getwindow(int *, int *, double *, double *);
+int gsd_writeView(unsigned char **, unsigned int, unsigned int);
+
+/* gsd_surf.c */
+int gsd_surf(geosurf *);
+int gsd_surf_map(geosurf *);
+int gsd_surf_const(geosurf *, float);
+int gsd_surf_func(geosurf *, int (*)());
+int gsd_triangulated_wall(int, int, geosurf *, geosurf *, Point3 *, Point3 *,
+			  float *);
+void gsd_setfc(int);
+int gsd_getfc(void);
+int gsd_ortho_wall(int, int, geosurf **, Point3 **, float *);
+int gsd_wall(float *, float *, float *);
+int gsd_norm_arrows(geosurf *);
+
+/* gsd_views.c */
+int gsd_get_los(float (*)[3], short, short);
+void gsd_set_view(geoview *, geodisplay *);
+void gsd_check_focus(geoview *);
+void gsd_get_zup(geoview *, double *);
+int gsd_zup_twist(geoview *);
+void gsd_do_scale(int);
+void gsd_real2model(Point3);
+void gsd_model2real(Point3);
+void gsd_model2surf(geosurf *, Point3);
+void gsd_surf2model(Point3);
+void gsd_surf2real(geosurf *, Point3);
+void gsd_real2surf(geosurf *, Point3);
+
+/* gsd_wire.c */
+int gsd_wire_surf(geosurf *);
+int gsd_wire_surf_map(geosurf *);
+int gsd_coarse_surf_map(geosurf *);
+int gsd_wire_surf_const(geosurf *, float);
+int gsd_wire_surf_func(geosurf *, int (*)());
+int gsd_wire_arrows(geosurf *);
+
+/* gsdiff.c */
+void gsdiff_set_SDscale(float);
+float gsdiff_get_SDscale(void);
+void gsdiff_set_SDref(geosurf *);
+geosurf *gsdiff_get_SDref(void);
+float gsdiff_do_SD(float, int);
+
+/* gsdrape.c */
+int gsdrape_set_surface(geosurf *);
+int seg_intersect_vregion(geosurf *, float *, float *);
+Point3 *gsdrape_get_segments(geosurf *, float *, float *, int *);
+Point3 *gsdrape_get_allsegments(geosurf *, float *, float *, int *);
+void interp_first_last(geosurf *, float *, float *, Point3, Point3);
+int _viewcell_tri_interp(geosurf *, Point3);
+int viewcell_tri_interp(geosurf *, typbuff *, Point3, int);
+int in_vregion(geosurf *, float *);
+int order_intersects(geosurf *, Point3, Point3, int, int, int);
+int get_vert_intersects(geosurf *, float *, float *, float *);
+int get_horz_intersects(geosurf *, float *, float *, float *);
+int get_diag_intersects(geosurf *, float *, float *, float *);
+int segs_intersect(float, float, float, float, float, float, float, float,
+		   float *, float *);
+int Point_on_plane(Point3, Point3, Point3, Point3);
+int XY_intersect_plane(float *, float *);
+int P3toPlane(Point3, Point3, Point3, float *);
+int V3Cross(Point3, Point3, Point3);
+
+/* gsds.c */
+int gsds_findh(const char *, IFLAG *, IFLAG *, int);
+int gsds_newh(const char *);
+typbuff *gsds_get_typbuff(int, IFLAG);
+char *gsds_get_name(int);
+int gsds_free_datah(int);
+int gsds_free_data_buff(int, int);
+int free_data_buffs(dataset *, int);
+int gsds_alloc_typbuff(int, int *, int, int);
+int gsds_get_changed(int);
+int gsds_set_changed(int, IFLAG);
+int gsds_get_type(int);
+
+/* gsget.c */
+int get_mapatt(typbuff *, int, float *);
+
+/* gv.c */
+geovect *gv_get_vect(int);
+geovect *gv_get_prev_vect(int);
+int gv_num_vects(void);
+geovect *gv_get_last_vect(void);
+geovect *gv_get_new_vect(void);
+void gv_update_drapesurfs(void);
+int gv_set_defaults(geovect *);
+int gv_init_vect(geovect *);
+void gv_delete_vect(int);
+int gv_free_vect(geovect *);
+void gv_free_vectmem(geovect *);
+void gv_set_drapesurfs(geovect *, int *, int);
+
+/* gv_quick.c */
+float gv_line_length(geoline *);
+int gln_num_points(geoline *);
+int gv_num_points(geovect *);
+int gv_decimate_lines(geovect *);
+
+/* gvd.c */
+int gs_clip_segment(geosurf *, float *, float *, float *);
+int gvd_vect(geovect *, geosurf *, int);
+void gvd_draw_lineonsurf(geosurf *, float *, float *, int);
+
+/* gvl.c */
+geovol *gvl_get_vol(int);
+geovol *gvl_get_prev_vol(int);
+int gvl_getall_vols(geovol **);
+int gvl_num_vols(void);
+geovol *gvl_get_last_vol(void);
+geovol *gvl_get_new_vol(void);
+int gvl_init_vol(geovol *, double, double, double, int, int, int,
+		 double, double, double);
+void gvl_delete_vol(int);
+int gvl_free_vol(geovol *);
+void gvl_free_volmem(geovol *);
+void print_vol_fields(geovol *);
+int gvl_get_xextents(geovol *, float *, float *);
+int gvl_get_yextents(geovol *, float *, float *);
+int gvl_get_zextents(geovol *, float *, float *);
+int gvl_get_xrange(float *, float *);
+int gvl_get_yrange(float *, float *);
+int gvl_get_zrange(float *, float *);
+
+int gvl_isosurf_init(geovol_isosurf *);
+int gvl_isosurf_freemem(geovol_isosurf *);
+geovol_isosurf *gvl_isosurf_get_isosurf(int, int);
+int gvl_isosurf_get_att_src(geovol_isosurf *, int);
+int gvl_isosurf_set_att_src(geovol_isosurf *, int, int);
+int gvl_isosurf_set_att_const(geovol_isosurf *, int, float);
+int gvl_isosurf_set_att_map(geovol_isosurf *, int, const char *);
+int gvl_isosurf_set_att_changed(geovol_isosurf *, int);
+
+int gvl_slice_init(geovol_slice *);
+geovol_slice *gvl_slice_get_slice(int, int);
+int gvl_slice_freemem(geovol_slice *);
+
+/* trans.c */
+void P_scale(float, float, float);
+void P_transform(int, float (*)[4], float (*)[4]);
+int P_pushmatrix(void);
+int P_popmatrix(void);
+void P_rot(float, char);
+
+/* gvl_file.c */
+geovol_file *gvl_file_get_volfile(int);
+char *gvl_file_get_name(int);
+int gvl_file_get_file_type(geovol_file *);
+int gvl_file_get_data_type(geovol_file *);
+int gvl_file_newh(const char *, IFLAG);
+int gvl_file_free_datah(int);
+int gvl_file_start_read(geovol_file *);
+int gvl_file_end_read(geovol_file *);
+int gvl_file_get_value(geovol_file *, int, int, int, void *);
+int gvl_file_is_null_value(geovol_file *, void *);
+int gvl_file_set_mode(geovol_file *, IFLAG);
+int gvl_file_set_slices_param(geovol_file *, int, int);
+void gvl_file_get_min_max(geovol_file *, double *, double *);
+
+/* Gvl3.c */
+int Gvl_load_colors_data(void **, const char *);
+int Gvl_unload_colors_data(void *);
+int Gvl_get_color_for_value(void *, float *);
+
+/* gvl_calc.c */
+int gvl_isosurf_calc(geovol *);
+int gvl_slices_calc(geovol *);
+void gvl_write_char(int, unsigned char **, unsigned char);
+unsigned char gvl_read_char(int, const unsigned char *);
+void gvl_align_data(int, unsigned char *);
+
+/* gvld.c */
+int gvld_vol(geovol *);
+int gvld_wire_vol(geovol *);
+int gvld_isosurf(geovol *);
+int gvld_wire_isosurf(geovol *);
+int gvld_slices(geovol *);
+int gvld_slice(geovol *, int);
+int gvld_wire_slices(geovol *);
+int gvld_wind3_box(geovol *);
+
+/* from gsd_fringe.c */
+void gsd_display_fringe(geosurf *, unsigned long, float, int[4]);
+void gsd_fringe_horiz_poly(float, geosurf *, int, int);
+void gsd_fringe_horiz_line(float, geosurf *, int, int);
+void gsd_fringe_vert_poly(float, geosurf *, int, int);
+void gsd_fringe_vert_line(float, geosurf *, int, int);
+
+/* from gsd_legend.c */
+GLuint gsd_put_legend(const char *, GLuint, int, int *, float *, int *);
+void gsd_bgn_legend_viewport(GLint, GLint, GLint, GLint);
+void gsd_end_legend_viewport(void);
+int gsd_make_nice_number(float *);
+
+#endif /* GRASS_OGSFDEFS_H */

Copied: grass/trunk/include/defs/ortholib.h (from rev 49164, grass/trunk/include/ortholib.h)
===================================================================
--- grass/trunk/include/defs/ortholib.h	                        (rev 0)
+++ grass/trunk/include/defs/ortholib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,74 @@
+#ifndef GRASS_ORTHODEFS_H
+#define GRASS_ORTHODEFS_H
+
+/* from imagery/libes */
+/* ask_camera.c */
+int I_ask_camera_old(char *, char *);
+int I_ask_camera_new(char *, char *);
+int I_ask_camera_any(char *, char *);
+
+/* ask_initial.c */
+int I_ask_camera_old(char *, char *);
+int I_ask_camera_new(char *, char *);
+int I_ask_camera_any(char *, char *);
+
+/* cam.c */
+FILE *I_fopen_group_camera_new(char *);
+FILE *I_fopen_group_camera_old(char *);
+
+/* camera.c */
+int I_put_group_camera(char *, char *);
+int I_get_group_camera(char *, char *);
+
+/* elev.c */
+int I_put_group_elev(char *, char *, char *, char *, char *, char *, char *);
+int I_get_group_elev(char *, char *, char *, char *, char *, char *, char *);
+
+/* find_camera.c */
+int I_find_camera(char *);
+int I_find_camera_file(char *, char *);
+
+/* find_init.c */
+int I_find_initial(char *);
+
+/* fopen_camera.c */
+FILE *I_fopen_cam_file_new(char *);
+FILE *I_fopen_cam_file_append(char *);
+FILE *I_fopen_cam_file_old(char *);
+int I_georef(double, double, double *, double *, double[3], double[3]);
+
+/* group_elev.c */
+FILE *I_fopen_group_elev_new(char *);
+FILE *I_fopen_group_elev_old(char *);
+int I_find_group_elev_file(char *);
+
+/* init.c */
+FILE *I_fopen_group_init_new(char *);
+FILE *I_fopen_group_init_old(char *);
+
+/* initial.c */
+int I_get_camera(char *);
+int I_put_camera(char *);
+int I_put_group_camera(char *, char *);
+int I_get_group_camera(char *, char *);
+
+/* ls_cameras.c */
+int I_list_cameras(int);
+
+/* ls_elev.c */
+int I_list_elev(int);
+
+/* open_camera.c */
+int I_open_cam_file_new(char *, char *);
+int I_open_cam_file_old(char *, char *);
+
+/* title_camera.c */
+int I_get_cam_title(char *, char *, int);
+int I_put_camera_title(char *, char *);
+
+/* vask_block.c */
+int I_vask_block_new(char **, char *, char *);
+int I_vask_block_old(char **, char *, char *);
+int I_vask_subblock_new(char **, char *, char *, int, char *);
+
+#endif

Copied: grass/trunk/include/defs/raster.h (from rev 49164, grass/trunk/include/rasterdefs.h)
===================================================================
--- grass/trunk/include/defs/raster.h	                        (rev 0)
+++ grass/trunk/include/defs/raster.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,586 @@
+#ifndef GRASS_RASTERDEFS_H
+#define GRASS_RASTERDEFS_H
+
+#include <grass/gis.h>
+
+/* --- ANSI prototypes for the lib/raster functions --- */
+
+/* align_window.c */
+void Rast_align_window(struct Cell_head *, const struct Cell_head *);
+
+/* 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);
+
+void *Rast_allocate_input_buf(RASTER_MAP_TYPE);
+CELL *Rast_allocate_c_input_buf(void);
+FCELL *Rast_allocate_f_input_buf(void);
+DCELL *Rast_allocate_d_input_buf(void);
+char *Rast_allocate_null_input_buf(void);
+
+void *Rast_allocate_output_buf(RASTER_MAP_TYPE);
+CELL *Rast_allocate_c_output_buf(void);
+FCELL *Rast_allocate_f_output_buf(void);
+DCELL *Rast_allocate_d_output_buf(void);
+char *Rast_allocate_null_output_buf(void);
+
+/* 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);
+void Rast_write_cats(const char *, struct Categories *);
+void 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));
+
+/* close.c */
+void Rast_close(int);
+void Rast_unopen(int);
+void Rast__unopen_all(void);
+
+/* 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_out.c */
+void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int);
+
+/* 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 *);
+int Rast__read_colors(const char *, 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 */
+void 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 */
+void Rast_get_cellhd(const char *, const char *, struct Cell_head *);
+
+/* get_row.c */
+void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
+void Rast_get_c_row_nomask(int, CELL *, int);
+void Rast_get_f_row_nomask(int, FCELL *, int);
+void Rast_get_d_row_nomask(int, DCELL *, int);
+void Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
+void Rast_get_c_row(int, CELL *, int);
+void Rast_get_f_row(int, FCELL *, int);
+void Rast_get_d_row(int, DCELL *, int);
+void Rast_get_null_value_row(int, char *, int);
+
+/* get_row_colr.c */
+void 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 *);
+void Rast_write_histogram(const char *, const struct Histogram *);
+void 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(struct History *, FILE *);
+int Rast_read_history(const char *, const char *, struct History *);
+void Rast__write_history(struct History *, FILE *);
+void Rast_write_history(const char *, struct History *);
+void Rast_short_history(const char *, const char *, struct History *);
+int Rast_command_history(struct History *);
+void Rast_append_history(struct History *, const char *);
+void Rast_append_format_history(struct History *, const char *, ...)
+    __attribute__ ((format(printf, 2, 3)));
+const char *Rast_get_history(struct History *, int);
+void Rast_set_history(struct History *, int, const char *);
+void Rast_format_history(struct History *, int, const char *, ...)
+    __attribute__ ((format(printf, 3, 4)));
+void Rast_clear_history(struct History *);
+void Rast_free_history(struct History *);
+int Rast_history_length(struct History *);
+const char *Rast_history_line(struct History *, int);
+
+/* init.c */
+void Rast_init(void);
+void Rast__check_init(void);
+void Rast_init_all(void);
+void Rast__init(void);
+void Rast__error_handler(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);
+DCELL Rast_interp_lanczos(double, double, DCELL *);
+DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL);
+DCELL Rast_interp_bicubic_bspline(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 */
+#define Rast_is_c_null_value(cellVal)	\
+    (*(const CELL *)(cellVal) == (CELL) 0x80000000)
+#define Rast_is_f_null_value(fcellVal)	\
+    (*(const FCELL *)(fcellVal) != *(const FCELL *)(fcellVal))
+#define Rast_is_d_null_value(dcellVal)	\
+    (*(const DCELL *)(dcellVal) != *(const DCELL *)(dcellVal))
+
+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);
+#ifndef Rast_is_c_null_value
+int Rast_is_c_null_value(const CELL *);
+#endif
+#ifndef Rast_is_f_null_value
+int Rast_is_f_null_value(const FCELL *);
+#endif
+#ifndef Rast_is_f_null_value
+int Rast_is_d_null_value(const DCELL *);
+#endif
+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);
+
+/* open.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 *);
+void 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);
+void Rast_set_quant_rules(int, struct Quant *);
+
+/* put_cellhd.c */
+void Rast_put_cellhd(const char *, struct Cell_head *);
+
+/* put_row.c */
+void Rast_put_row(int, const void *, RASTER_MAP_TYPE);
+void Rast_put_c_row(int, const CELL *);
+void Rast_put_f_row(int, const FCELL *);
+void Rast_put_d_row(int, const DCELL *);
+int Rast__open_null_write(int);
+void 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 */
+void Rast_truncate_fp_map(const char *, const char *);
+void Rast_round_fp_map(const char *, const char *);
+void Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
+void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
+				CELL);
+void 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 *);
+void Rast_write_range(const char *, const struct Range *);
+void 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 */
+char *Rast_read_units(const char *, const char *);
+char *Rast_read_vdatum(const char *, const char *);
+void Rast_write_units(const char *, const char *);
+void 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 */
+void Rast__init_window(void);
+void Rast_set_window(struct Cell_head *);
+void Rast_unset_window(void);
+void Rast_set_output_window(struct Cell_head *);
+void Rast_set_input_window(struct Cell_head *);
+
+/* window.c */
+void Rast_get_window(struct Cell_head *);
+void Rast_get_input_window(struct Cell_head *);
+void Rast_get_output_window(struct Cell_head *);
+int Rast_window_rows(void);
+int Rast_window_cols(void);
+int Rast_input_window_rows(void);
+int Rast_input_window_cols(void);
+int Rast_output_window_rows(void);
+int Rast_output_window_cols(void);
+double Rast_northing_to_row(double, const struct Cell_head *);
+double Rast_easting_to_col(double, const struct Cell_head *);
+double Rast_row_to_northing(double, const struct Cell_head *);
+double Rast_col_to_easting(double, const struct Cell_head *);
+
+/* window_map.c */
+void Rast__create_window_mapping(int);
+int Rast_row_repeat_nomask(int, int);
+
+/* zero_cell.c */
+void Rast_zero_buf(void *, RASTER_MAP_TYPE);
+void Rast_zero_input_buf(void *, RASTER_MAP_TYPE);
+void Rast_zero_output_buf(void *, RASTER_MAP_TYPE);
+
+#endif /* GRASS_RASTERDEFS_H */

Copied: grass/trunk/include/defs/raster3d.h (from rev 49164, grass/trunk/include/raster3ddefs.h)
===================================================================
--- grass/trunk/include/defs/raster3d.h	                        (rev 0)
+++ grass/trunk/include/defs/raster3d.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,357 @@
+#ifndef GRASS_RASTER3DDEFS_H
+#define GRASS_RASTER3DDEFS_H
+
+/* cache.c */
+void Rast3d_cache_reset(RASTER3D_cache *);
+void Rast3d_cache_dispose(RASTER3D_cache *);
+void *Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *);
+void Rast3d_cache_set_remove_fun(RASTER3D_cache *, write_fn *, void *);
+void Rast3d_cache_set_load_fun(RASTER3D_cache *, read_fn *, void *);
+void *Rast3d_cache_new_read(int, int, int, read_fn *, void *);
+int Rast3d_cache_lock(RASTER3D_cache *, int);
+void Rast3d_cache_lock_intern(RASTER3D_cache *, int);
+int Rast3d_cache_unlock(RASTER3D_cache *, int);
+int Rast3d_cache_unlock_all(RASTER3D_cache *);
+int Rast3d_cache_lock_all(RASTER3D_cache *);
+void Rast3d_cache_autolock_on(RASTER3D_cache *);
+void Rast3d_cache_autolock_off(RASTER3D_cache *);
+void Rast3d_cache_set_min_unlock(RASTER3D_cache *, int);
+int Rast3d_cache_remove_elt(RASTER3D_cache *, int);
+int Rast3d_cache_flush(RASTER3D_cache *, int);
+int Rast3d_cache_remove_all(RASTER3D_cache *);
+int Rast3d_cache_flush_all(RASTER3D_cache *);
+void *Rast3d_cache_elt_ptr(RASTER3D_cache *, int);
+int Rast3d_cache_load(RASTER3D_cache *, int);
+int Rast3d_cache_get_elt(RASTER3D_cache *, int, void *);
+int Rast3d_cache_put_elt(RASTER3D_cache *, int, const void *);
+
+/* cachehash.c */
+void Rast3d_cache_hash_reset(Rast3d_cache_hash *);
+void Rast3d_cache_hash_dispose(Rast3d_cache_hash *);
+void *Rast3d_cache_hash_new(int);
+void Rast3d_cache_hash_remove_name(Rast3d_cache_hash *, int);
+void Rast3d_cache_hash_load_name(Rast3d_cache_hash *, int, int);
+int Rast3d_cache_hash_name2index(Rast3d_cache_hash *, int);
+
+/* changeprecision.c */
+void Rast3d_change_precision(void *, int, const char *);
+
+/* changetype.c */
+void Rast3d_change_type(void *, const char *);
+
+/* filecompare.c */
+void Rast3d_compare_files(const char *, const char *, const char *, const char *);
+
+/* filename.c */
+void Rast3d_filename(char *, const char *, const char *, const char *);
+
+/* fpcompress.c */
+void Rast3d_fpcompress_print_binary(char *, int);
+void Rast3d_fpcompress_dissect_xdr_double(unsigned char *);
+int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int, int, int);
+int Rast3d_fpcompress_write_xdr_floats(int, char *, int, int, char *, int, int);
+int Rast3d_fpcompress_write_xdr_double(int, char *, int, int, char *, int, int);
+int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int);
+int Rast3d_fpcompress_read_xdr_floats(int, char *, int, int, int, char *);
+int Rast3d_fpcompress_read_xdr_doubles(int, char *, int, int, int, char *);
+
+/* g3dalloc.c */
+void *Rast3d_malloc(int);
+void *Rast3d_realloc(void *, int);
+void Rast3d_free(void *);
+
+/* g3dcache.c */
+int Rast3d_init_cache(RASTER3D_Map *, int);
+int Rast3d_dispose_cache(RASTER3D_Map *);
+int Rast3d_flush_all_tiles(RASTER3D_Map *);
+
+/* g3dcats.c */
+int Rast3d_write_cats(const char *, struct Categories *);
+int Rast3d_read_cats(const char *, const char *, struct Categories *);
+
+/* g3dclose.c */
+int Rast3d_close(RASTER3D_Map *);
+
+/* g3dcolor.c */
+int Rast3d_remove_color(const char *);
+int Rast3d_read_colors(const char *, const char *, struct Colors *);
+int Rast3d_write_colors(const char *, const char *, struct Colors *);
+
+/* g3ddefaults.c */
+void Rast3d_set_compression_mode(int, int, int, int);
+void Rast3d_get_compression_mode(int *, int *, int *, int *);
+void Rast3d_set_cache_size(int);
+int Rast3d_get_cache_size(void);
+void Rast3d_set_cache_limit(int);
+int Rast3d_get_cache_limit(void);
+void Rast3d_set_file_type(int);
+int Rast3d_get_file_type(void);
+void Rast3d_set_tile_dimension(int, int, int);
+void Rast3d_get_tile_dimension(int *, int *, int *);
+void Rast3d_set_error_fun(void (*)(const char *));
+void Rast3d_set_unit(const char *);
+void Rast3d_init_defaults(void);
+
+/* g3ddoubleio.c */
+int Rast3d_write_doubles(int, int, const double *, int);
+int Rast3d_read_doubles(int, int, double *, int);
+
+/* g3derror.c */
+void Rast3d_skip_error(const char *);
+void Rast3d_print_error(const char *);
+void Rast3d_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
+    __attribute__ ((noreturn));
+void Rast3d_fatal_error_noargs(const char *) __attribute__ ((noreturn));
+void Rast3d_error(const char *, ...) __attribute__ ((format(printf, 1, 2)));
+
+/* g3dfpxdr.c */
+int Rast3d_is_xdr_null_num(const void *, int);
+int Rast3d_is_xdr_null_float(const float *);
+int Rast3d_is_xdr_null_double(const double *);
+void Rast3d_set_xdr_null_num(void *, int);
+void Rast3d_set_xdr_null_double(double *);
+void Rast3d_set_xdr_null_float(float *);
+int Rast3d_init_fp_xdr(RASTER3D_Map *, int);
+int Rast3d_init_copy_to_xdr(RASTER3D_Map *, int);
+int Rast3d_copy_to_xdr(const void *, int);
+int Rast3d_init_copy_from_xdr(RASTER3D_Map *, int);
+int Rast3d_copy_from_xdr(int, void *);
+
+/* g3dhistory.c */
+int Rast3d_write_history(const char *, struct History *);
+int Rast3d_read_history(const char *, const char *, struct History *);
+
+/* g3dintio.c */
+int Rast3d_write_ints(int, int, const int *, int);
+int Rast3d_read_ints(int, int, int *, int);
+
+/* g3dkeys.c */
+int Rast3d_key_get_int(struct Key_Value *, const char *, int *);
+int Rast3d_key_get_double(struct Key_Value *, const char *, double *);
+int Rast3d_key_get_string(struct Key_Value *, const char *, char **);
+int Rast3d_key_get_value(struct Key_Value *, const char *, char *, char *, int,
+		    int, int *);
+int Rast3d_key_set_int(struct Key_Value *, const char *, const int *);
+int Rast3d_key_set_double(struct Key_Value *, const char *, const double *);
+int Rast3d_key_set_string(struct Key_Value *, const char *, char *const *);
+int Rast3d_key_set_value(struct Key_Value *, const char *, const char *,
+		    const char *, int, int, const int *);
+/* g3dlong.c */
+int Rast3d_long_encode(long *, unsigned char *, int);
+void Rast3d_long_decode(unsigned char *, long *, int, int);
+
+/* g3dmapset.c */
+void Rast3d_make_mapset_map_directory(const char *);
+
+/* g3dmask.c */
+int Rast3d_mask_close(void);
+int Rast3d_mask_file_exists(void);
+int Rast3d_mask_open_old(void);
+int Rast3d_mask_reopen(int);
+int Rast3d_is_masked(RASTER3D_Map *, int, int, int);
+void Rast3d_mask_num(RASTER3D_Map *, int, int, int, void *, int);
+void Rast3d_mask_float(RASTER3D_Map *, int, int, int, float *);
+void Rast3d_mask_double(RASTER3D_Map *, int, int, int, double *);
+void Rast3d_mask_tile(RASTER3D_Map *, int, void *, int);
+void Rast3d_mask_on(RASTER3D_Map *);
+void Rast3d_mask_off(RASTER3D_Map *);
+int Rast3d_mask_is_on(RASTER3D_Map *);
+int Rast3d_mask_is_off(RASTER3D_Map *);
+const char *Rast3d_mask_file(void);
+int Rast3d_mask_map_exists(void);
+
+/* maskfn.c */
+int Rast3d_mask_d_select(DCELL *, d_Mask *);
+DCELL Rast3d_mask_match_d_interval(DCELL, d_Interval *);
+void Rast3d_parse_vallist(char **, d_Mask **);
+
+/* g3dmisc.c */
+int Rast3d_g3d_type2cell_type(int);
+void Rast3d_copy_float2Double(const float *, int, double *, int, int);
+void Rast3d_copy_double2Float(const double *, int, float *, int, int);
+void Rast3d_copy_values(const void *, int, int, void *, int, int, int);
+int Rast3d_length(int);
+int Rast3d_extern_length(int);
+
+/* g3dnull.c */
+int Rast3d_is_null_value_num(const void *, int);
+void Rast3d_set_null_value(void *, int, int);
+
+/* g3dopen2.c */
+void *Rast3d_open_new_param(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int, int);
+/* g3dopen.c */
+void *Rast3d_open_cell_old_no_header(const char *, const char *);
+void *Rast3d_open_cell_old(const char *, const char *, RASTER3D_Region *, int, int);
+void *Rast3d_open_cell_new(const char *, int, int, RASTER3D_Region *);
+void *Rast3d_open_new_opt_tile_size(const char *, int , RASTER3D_Region * , int , int );
+
+/* g3dparam.c */
+void Rast3d_set_standard3d_input_params(void);
+int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *, int *,
+			    int *, int *, int *, int *, int *);
+void Rast3d_set_window_params(void);
+char *Rast3d_get_window_params(void);
+
+/* g3drange.c */
+void Rast3d_range_update_from_tile(RASTER3D_Map *, const void *, int, int, int, int,
+			      int, int, int, int);
+int Rast3d_read_range(const char *, const char *, struct FPRange *);
+int Rast3d_range_load(RASTER3D_Map *);
+void Rast3d_range_min_max(RASTER3D_Map *, double *, double *);
+int Rast3d_range_write(RASTER3D_Map *);
+int Rast3d_range_init(RASTER3D_Map *);
+
+/* g3dregion.c */
+void Rast3d_get_region_value(RASTER3D_Map *, double, double, double, void *, int);
+void Rast3d_adjust_region(RASTER3D_Region *);
+void Rast3d_region_copy(RASTER3D_Region *, RASTER3D_Region *);
+void Rast3d_incorporate2d_region(struct Cell_head *, RASTER3D_Region *);
+void Rast3d_region_from_to_cell_head(struct Cell_head *, RASTER3D_Region *);
+void Rast3d_adjust_region_res(RASTER3D_Region *);
+void Rast3d_extract2d_region(RASTER3D_Region *, struct Cell_head *);
+void Rast3d_region_to_cell_head(RASTER3D_Region *, struct Cell_head *);
+int Rast3d_read_region_map(const char *, const char *, RASTER3D_Region *);
+int Rast3d_is_valid_location(RASTER3D_Region *, double, double, double);
+void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *, int *, int *);
+void Rast3d_location2coord2(RASTER3D_Region *, double, double, double, int *, int *, int *);
+void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *, double *, double *);
+/* g3dresample.c */
+void Rast3d_nearest_neighbor(RASTER3D_Map *, int, int, int, void *, int);
+void Rast3d_set_resampling_fun(RASTER3D_Map *, void (*)());
+void Rast3d_get_resampling_fun(RASTER3D_Map *, void (**)());
+void Rast3d_get_nearest_neighbor_fun_ptr(void (**)());
+
+/* g3dvolume.c */
+void Rast3d_get_volume_a(void *, double[2][2][2][3], int, int, int, void *, int);
+void Rast3d_get_volume(void *, double, double, double, double, double, double,
+		   double, double, double, double, double, double, int, int,
+		   int, void *, int);
+void Rast3d_get_aligned_volume(void *, double, double, double, double, double,
+			  double, int, int, int, void *, int);
+void Rast3d_make_aligned_volume_file(void *, const char *, double, double, double,
+			       double, double, double, int, int, int);
+/* g3dwindow.c */
+void Rast3d_get_value(RASTER3D_Map *, int, int, int, void *, int);
+float Rast3d_get_float(RASTER3D_Map *, int, int, int);
+double Rast3d_get_double(RASTER3D_Map *, int, int, int);
+void Rast3d_get_window_value(RASTER3D_Map *, double, double, double, void *, int);
+
+
+RASTER3D_Region *Rast3d_window_ptr(void);
+void Rast3d_set_window(RASTER3D_Region *);
+void Rast3d_set_window_map(RASTER3D_Map *, RASTER3D_Region *);
+void Rast3d_get_window(RASTER3D_Region *);
+
+/* g3dwindowio.c */
+void Rast3d_use_window_params(void);
+int Rast3d_read_window(RASTER3D_Region *, const char *);
+
+/* int Rast3d_writeWindow (RASTER3D_Region *, char *); */
+/* getblock.c */
+void Rast3d_get_block_nocache(RASTER3D_Map *, int, int, int, int, int, int, void *,
+			 int);
+void Rast3d_get_block(RASTER3D_Map *, int, int, int, int, int, int, void *, int);
+
+/* header.c */
+int Rast3d_read_header(RASTER3D_Map *, int *, int *, double *, double *, double *,
+		   double *, double *, double *, int *, int *, int *,
+		   double *, double *, double *, int *, int *, int *, int *,
+		   int *, int *, int *, int *, int *, int *, int *, char **);
+int Rast3d_write_header(RASTER3D_Map *, int, int, double, double, double, double,
+		    double, double, int, int, int, double, double, double,
+		    int, int, int, int, int, int, int, int, int, int, int,
+		    char *);
+int Rast3d_cache_size_encode(int, int);
+int Rast3d__compute_cache_size(RASTER3D_Map *, int);
+int Rast3d_fill_header(RASTER3D_Map *, int, int, int, int, int, int, int, int, int,
+		   int, int, int, int, int, int, int, double, double, double,
+		   double, double, double, int, int, int, double, double,
+		   double, char *);
+/* headerinfo.c */
+void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_nof_tiles_map(RASTER3D_Map *, int *, int *, int *);
+void Rast3d_get_region_map(RASTER3D_Map *, double *, double *, double *, double *,
+		      double *, double *);
+void Rast3d_get_window_map(RASTER3D_Map *, double *, double *, double *, double *,
+		      double *, double *);
+void Rast3d_get_tile_dimensions_map(RASTER3D_Map *, int *, int *, int *);
+int Rast3d_tile_type_map(RASTER3D_Map *);
+int Rast3d_file_type_map(RASTER3D_Map *);
+int Rast3d_tile_precision_map(RASTER3D_Map *);
+int Rast3d_tile_use_cache_map(RASTER3D_Map *);
+void Rast3d_print_header(RASTER3D_Map *);
+void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *);
+
+/* index.c */
+int Rast3d_flush_index(RASTER3D_Map *);
+int Rast3d_init_index(RASTER3D_Map *, int);
+
+/* retile.c */
+void Rast3d_retile(void *, const char *, int, int, int);
+
+/* rle.c */
+int Rast3d_rle_count_only(char *, int, int);
+void Rast3d_rle_encode(char *, char *, int, int);
+void Rast3d_rle_decode(char *, char *, int, int, int *, int *);
+
+/* tilealloc.c */
+void *Rast3d_alloc_tiles_type(RASTER3D_Map *, int, int);
+void *Rast3d_alloc_tiles(RASTER3D_Map *, int);
+void Rast3d_free_tiles(void *);
+
+/* tileio.c */
+void *Rast3d_get_tile_ptr(RASTER3D_Map *, int);
+int Rast3d_tile_load(RASTER3D_Map *, int);
+int Rast3d__remove_tile(RASTER3D_Map *, int);
+float Rast3d_get_float_region(RASTER3D_Map *, int, int, int);
+double Rast3d_get_double_region(RASTER3D_Map *, int, int, int);
+void Rast3d_get_value_region(RASTER3D_Map *, int, int, int, void *, int);
+
+/* tilemath.c */
+void Rast3d_compute_optimal_tile_dimension(RASTER3D_Region *, int, int *, int *, int *, int);
+void Rast3d_tile_index2tile(RASTER3D_Map *, int, int *, int *, int *);
+int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int);
+void Rast3d_tile_coord_origin(RASTER3D_Map *, int, int, int, int *, int *, int *);
+void Rast3d_tile_index_origin(RASTER3D_Map *, int, int *, int *, int *);
+void Rast3d_coord2tile_coord(RASTER3D_Map *, int, int, int, int *, int *, int *, int *,
+			 int *, int *);
+void Rast3d_coord2tile_index(RASTER3D_Map *, int, int, int, int *, int *);
+int Rast3d_coord_in_range(RASTER3D_Map *, int, int, int);
+int Rast3d_tile_index_in_range(RASTER3D_Map *, int);
+int Rast3d_tile_in_range(RASTER3D_Map *, int, int, int);
+int Rast3d_compute_clipped_tile_dimensions(RASTER3D_Map *, int, int *, int *, int *,
+				     int *, int *, int *);
+
+/* tilenull.c */
+void Rast3d_set_null_tile_type(RASTER3D_Map *, void *, int);
+void Rast3d_set_null_tile(RASTER3D_Map *, void *);
+
+/* tileread.c */
+int Rast3d_read_tile(RASTER3D_Map *, int, void *, int);
+int Rast3d_read_tile_float(RASTER3D_Map *, int, void *);
+int Rast3d_read_tile_double(RASTER3D_Map *, int, void *);
+int Rast3d_lock_tile(RASTER3D_Map *, int);
+int Rast3d_unlock_tile(RASTER3D_Map *, int);
+int Rast3d_unlock_all(RASTER3D_Map *);
+void Rast3d_autolock_on(RASTER3D_Map *);
+void Rast3d_autolock_off(RASTER3D_Map *);
+void Rast3d_min_unlocked(RASTER3D_Map *, int);
+int Rast3d_begin_cycle(RASTER3D_Map *);
+int Rast3d_end_cycle(RASTER3D_Map *);
+
+/* tilewrite.c */
+int Rast3d_write_tile(RASTER3D_Map *, int, const void *, int);
+int Rast3d_write_tile_float(RASTER3D_Map *, int, const void *);
+int Rast3d_write_tile_double(RASTER3D_Map *, int, const void *);
+int Rast3d_flush_tile(RASTER3D_Map *, int);
+int Rast3d_flush_tile_cube(RASTER3D_Map *, int, int, int, int, int, int);
+int Rast3d_flush_tiles_in_cube(RASTER3D_Map *, int, int, int, int, int, int);
+int Rast3d_put_float(RASTER3D_Map *, int, int, int, float);
+int Rast3d_put_double(RASTER3D_Map *, int, int, int, double);
+int Rast3d_put_value(RASTER3D_Map *, int, int, int, const void *, int);
+
+/* writeascii.c */
+void Rast3d_write_ascii(void *, const char *);
+
+#endif /* RASTER3DDEFS */

Copied: grass/trunk/include/defs/rbtree.h (from rev 49164, grass/trunk/include/rbtree.h)
===================================================================
--- grass/trunk/include/defs/rbtree.h	                        (rev 0)
+++ grass/trunk/include/defs/rbtree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,19 @@
+#ifndef GRASS_RBTREEDEFS_H
+#define GRASS_RBTREEDEFS_H
+
+/* tree functions */
+struct RB_TREE *rbtree_create(rb_compare_fn *, size_t);
+void rbtree_destroy(struct RB_TREE *);
+int rbtree_insert(struct RB_TREE *, void *);
+int rbtree_remove(struct RB_TREE *, const void *);
+void *rbtree_find(struct RB_TREE *, const void *);
+
+/* tree traversal functions */
+int rbtree_init_trav(struct RB_TRAV *, struct RB_TREE *);
+void* rbtree_traverse(struct RB_TRAV *);
+void *rbtree_traverse_start(struct RB_TRAV *, const void *);
+
+/* debug tree from given node downwards */
+int rbtree_debug(struct RB_TREE *, struct RB_NODE *);
+
+#endif

Copied: grass/trunk/include/defs/rowio.h (from rev 49164, grass/trunk/include/rowio.h)
===================================================================
--- grass/trunk/include/defs/rowio.h	                        (rev 0)
+++ grass/trunk/include/defs/rowio.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,13 @@
+#ifndef GRASS_ROWIODEFS_H
+#define GRASS_ROWIODEFS_H
+
+int Rowio_fileno(const ROWIO *);
+void Rowio_forget(ROWIO *, int);
+void *Rowio_get(ROWIO *, int);
+void Rowio_flush(ROWIO *);
+int Rowio_put(ROWIO *, const void *, int);
+void Rowio_release(ROWIO *);
+int Rowio_setup(ROWIO *, int, int, int, int (*)(int, void *, int, int),
+		int (*)(int, const void *, int, int));
+
+#endif

Copied: grass/trunk/include/defs/segment.h (from rev 49164, grass/trunk/include/segment.h)
===================================================================
--- grass/trunk/include/defs/segment.h	                        (rev 0)
+++ grass/trunk/include/defs/segment.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,19 @@
+#ifndef GRASS_SEGMENTDEFS_H
+#define GRASS_SEGMENTDEFS_H
+
+int segment_address(const SEGMENT *, int, int, int *, int *);
+int segment_flush(SEGMENT *);
+int segment_format(int, int, int, int, int, int);
+int segment_format_nofill(int, int, int, int, int, int);
+int segment_get(SEGMENT *, void *, int, int);
+int segment_get_row(const SEGMENT *, void *, int);
+int segment_init(SEGMENT *, int, int);
+int segment_pagein(SEGMENT *, int);
+int segment_pageout(SEGMENT *, int);
+int segment_put(SEGMENT *, const void *, int, int);
+int segment_put_row(const SEGMENT *, const void *, int);
+int segment_release(SEGMENT *);
+int segment_seek(const SEGMENT *, int, int);
+int segment_setup(SEGMENT *);
+
+#endif /* GRASS_SEGMENTDEFS_H */

Copied: grass/trunk/include/defs/site.h (from rev 49164, grass/trunk/include/site.h)
===================================================================
--- grass/trunk/include/defs/site.h	                        (rev 0)
+++ grass/trunk/include/defs/site.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,69 @@
+#ifndef GRASS_SITEDEFS_H
+#define GRASS_SITEDEFS_H
+
+/* Allocate 'num' SITE_XYZ structs. Returns NULL on failure */
+SITE_XYZ *G_alloc_site_xyz(size_t);
+
+/* Free the array of SITE_XYZ struct */
+void G_free_site_xyz(SITE_XYZ *);
+
+/* G_readsites_xyz: Reads a sites file converting to a site struct of xyz
+ * values and the cat value.  The Z value can come from one of the
+ * n-dimensions, a double attribute, or a string attribute converted to a
+ * double with strtod().  The 'size' must not be greater than the number
+ * of elements in the SITE_XYZ array, or bad things will happen. The number 
+ * of records read is returned or EOF on end of file. NOTE: EOF won't be
+ * returned unless no records are read and the EOF bit is set. It's safe
+ * to assume that if the number of records read is less than the size of
+ * the array, that there aren't any more records.
+ */
+int G_readsites_xyz(FILE *,	/* The FILE stream to the sites file               */
+		    int,	/* Attribute type: SITE_COL_DIM, etc...            */
+		    int,	/* The field index (1 based) for the attribute     */
+		    int,	/* Size of the array                               */
+		    struct Cell_head *,	/* Respect region if not NULL */
+		    SITE_XYZ * xyz	/* The site array of size 'size'                   */
+    );
+
+int G_readsites(FILE *, int, int, int, struct Cell_head *, Z **);
+
+/* The same for old and new, format independent */
+Site *G_site_new_struct(RASTER_MAP_TYPE cattype, int ndim, int ns, int nd);
+void G_site_free_struct(Site * s);
+int G_site_in_region(const Site * s, const struct Cell_head *region);
+int G_site_d_cmp(const void *a, const void *b);
+int G_site_c_cmp(const void *a, const void *b);
+int G_site_s_cmp(const void *a, const void *b);
+char *G_site_format(const Site * s, const char *fs, int id);
+
+/* struct site_att * G_sites_get_atts (struct Map_info * ptr, int* cat); */
+int G_sites_get_fields(struct Map_info *ptr, char ***cnames, int **ctypes,
+		       int **ndx);
+void G_sites_free_fields(int ncols, char **cnames, int *ctypes, int *ndx);
+
+/* Old version used by v.in.sites */
+FILE *G_oldsites_open_old(const char *name, const char *mapset);
+int G_oldsite_describe(FILE * p, int *dims, int *cat, int *strs, int *dbls);
+int G_oldsite_get(FILE * p, Site * s);
+int G__oldsite_get(FILE *, Site *, int);
+
+/* New version based on vectors used in old, not updated sites modules */
+int G_site_get(struct Map_info *p, Site * s);
+int G_site_put(struct Map_info *p, const Site * s);
+int G_site_describe(struct Map_info *p, int *dims, int *cat, int *strs,
+		    int *dbls);
+int G_site_get_head(struct Map_info *p, Site_head * head);
+int G_site_put_head(struct Map_info *p, Site_head * head);
+struct Map_info *G_sites_open_old(const char *name, const char *mapset);
+struct Map_info *G_sites_open_new(const char *name);
+void G_sites_close(struct Map_info *);
+const char *G_find_sites(char *name, const char *mapset);
+const char *G_find_sites2(const char *name, const char *mapset);
+int G__site_put(struct Map_info *, Site *, int);
+
+struct Map_info *G_fopen_sites_old(const char *, const char *);
+struct Map_info *G_fopen_sites_new(const char *);
+int G_get_site(struct Map_info *, double *, double *, char **);
+int G_put_site(struct Map_info *, double, double, const char *);
+
+#endif

Copied: grass/trunk/include/defs/sitelib.h (from rev 49164, grass/trunk/include/sitelib.h)
===================================================================
--- grass/trunk/include/defs/sitelib.h	                        (rev 0)
+++ grass/trunk/include/defs/sitelib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,133 @@
+#ifndef GRASS_SITELIBDEFS_H
+#define GRASS_SITELIBDEFS_H
+
+/* announce.c */
+int announce(char *);
+
+/* ask_quad.c */
+int ask_quad(int *);
+
+/* center.c */
+int center(char *, int);
+
+/* chain.c */
+int chain(char *);
+
+/* copy_sites.c */
+int copy_sites(SITE_LIST *, SITE_LIST *, int);
+
+/* copyfile.c */
+int copyfile(char *, char *);
+
+/* count_site.c */
+int count_sites(SITE_LIST *, int);
+
+/* counter.c */
+int counter_reset(char *, int);
+int counter(int);
+
+/* die.c */
+int die(char *);
+
+/* eq_sites.c */
+int equal_sites(SITE_LIST *, SITE_LIST *);
+
+/* execute.c */
+int execute(char *);
+
+/* hitreturn.c */
+int hitreturn(void);
+
+/* maximum.c */
+int maximum(register int *, int);
+
+/* memcopy.c */
+int memcopy(char *, char *, int);
+
+#ifdef MENU
+/* menu_hndlr.c */
+int menu_handler(MENU, char *);
+#endif
+
+/* meta_reprt.c */
+int meta_report(char *, char *, char *, int, int);
+
+/* parse.c */
+int parse(char *, char *[], int, char *);
+
+/* read_sites.c */
+int read_site_list(SITE_LIST *, FILE *);
+int get_site_list(SITE_LIST *, char *);
+
+/* region.c */
+char *format_res(double, char *, int);
+char *format_east(double, char *, int);
+char *format_north(double, char *, int);
+int scan_north(char *, double *);
+int scan_east(char *, double *);
+int scan_res(char *, double *);
+
+#ifdef REPORT
+/* report.c */
+REPORT *report_open(char *);
+REPORT *report_open_ref(char *, REPORT *);
+int report_close(REPORT *);
+int report_read(REPORT *);
+int report_record(REPORT *, char *);
+int report_read_record(REPORT *, char *);
+int report_scan(REPORT *);
+int report_matrix(REPORT *);
+
+/* rprt_finds.c */
+rprt_finds.c:int report_find_layer(REPORT *, int);
+rprt_finds.c:int report_find_cat(REPORT *, int, int);
+rprt_finds.c:int report_find_point(REPORT *, int);
+rprt_finds.c:int report_find_data(REPORT *, int, int);
+
+/* rprt_seeks.c */
+rprt_seeks.c:int report_seek_layers(REPORT *);
+rprt_seeks.c:int report_seek_points(REPORT *);
+rprt_seeks.c:int report_seek_cats(REPORT *);
+rprt_seeks.c:int report_seek_data(REPORT *);
+#endif
+
+/* rpt_screen.c */
+int new_report_screen(void);
+
+/* scan_int.c */
+int scan_int(char *, int *);
+
+/* scn_double.c */
+int scan_double(char *, double *);
+
+/* scopy.c */
+int scopy(char *, char *, int);
+
+/* site.c */
+int add_site(SITE_LIST *, double, double, char *);
+int initialize_site_list(SITE_LIST *);
+int rewind_site_list(SITE_LIST *);
+int next_site(SITE_LIST *, double *, double *, char **);
+int free_site_list(SITE_LIST *);
+
+/* sort_int.c */
+int sort_int(int[], int, int);
+
+/* trace.c */
+int trace(int);
+
+/* ut_to_cell.c */
+float northing_to_row(double, struct Cell_head *);
+float easting_to_col(double, struct Cell_head *);
+
+/* within_wnd.c */
+int within_window(double, double, struct Cell_head *);
+
+/* write_site.c */
+int put_site_list(SITE_LIST *, char *, int, int);
+int write_site_list(SITE_LIST *, FILE *, int, int);
+
+/* yes.c */
+int yes(char *);
+
+#endif

Copied: grass/trunk/include/defs/spawn.h (from rev 49164, grass/trunk/include/spawn.h)
===================================================================
--- grass/trunk/include/defs/spawn.h	                        (rev 0)
+++ grass/trunk/include/defs/spawn.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,9 @@
+#ifndef GRASS_SPAWNDEFS_H
+#define GRASS_SPAWNDEFS_H
+
+extern int G_spawn(const char *command, ...);
+extern int G_vspawn_ex(const char *command, const char **args);
+extern int G_spawn_ex(const char *command, ...);
+extern int G_wait(int i_pid);
+
+#endif

Copied: grass/trunk/include/defs/sqlp.h (from rev 49164, grass/trunk/include/sqlp.h)
===================================================================
--- grass/trunk/include/defs/sqlp.h	                        (rev 0)
+++ grass/trunk/include/defs/sqlp.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,41 @@
+#ifndef GRASS_SQLPDEFS_H
+#define GRASS_SQLPDEFS_H
+
+int my_yyinput(char *buf, int max_size);
+void yyerror(char *s);
+int yyparse();
+int yywrap();
+
+int sqpSaveStr(SQLPVALUE * st, char *c);
+void sqpInitValue(SQLPVALUE * val);
+void sqpCopyValue(SQLPVALUE * from, SQLPVALUE * to);
+
+SQLPSTMT *sqpInitStmt(void);
+int sqpFreeStmt(SQLPSTMT * st);
+int sqpPrintStmt(SQLPSTMT * st);
+int sqpAllocCol(SQLPSTMT * st, int n);
+int sqpAllocVal(SQLPSTMT * st, int n);
+int sqpAllocCom(SQLPSTMT * st, int n);
+int sqpInitParser(SQLPSTMT * st);
+
+
+void sqpCommand(int command);
+void sqpTable(char *table);
+void sqpColumn(char *column);
+void sqpColumnDef(char *column, int type, int width, int decimals);
+void sqpValue(char *strval, int intval, double dblval, int type);
+void sqpAssignment(char *column, char *strval, int intval, double dblval,
+		   SQLPNODE * expr, int type);
+void sqpOrderColumn(char *col, int dir);
+int sqpOperatorCode(char *);
+char *sqpOperatorName(int);
+
+SQLPNODE *sqpNewNode(void);
+
+SQLPNODE *sqpNewExpressionNode(int oper, SQLPNODE * left, SQLPNODE * right);
+SQLPNODE *sqpNewColumnNode(char *name);
+SQLPNODE *sqpNewValueNode(char *strval, int intval, double dblval, int type);
+
+void sqpFreeNode(SQLPNODE *);
+
+#endif

Copied: grass/trunk/include/defs/stats.h (from rev 49164, grass/trunk/include/stats.h)
===================================================================
--- grass/trunk/include/defs/stats.h	                        (rev 0)
+++ grass/trunk/include/defs/stats.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,54 @@
+#ifndef GRASS_STATSDEFS_H
+#define GRASS_STATSDEFS_H
+
+typedef void stat_func(DCELL *, DCELL *, int, const void *);
+typedef void stat_func_w(DCELL *, DCELL(*)[2], int, const void *);
+
+extern stat_func c_ave;
+extern stat_func c_count;
+extern stat_func c_divr;
+extern stat_func c_intr;
+extern stat_func c_max;
+extern stat_func c_maxx;
+extern stat_func c_median;
+extern stat_func c_min;
+extern stat_func c_minx;
+extern stat_func c_mode;
+extern stat_func c_stddev;
+extern stat_func c_sum;
+extern stat_func c_thresh;
+extern stat_func c_var;
+extern stat_func c_range;
+extern stat_func c_reg_m;
+extern stat_func c_reg_c;
+extern stat_func c_reg_r2;
+extern stat_func c_quart1;
+extern stat_func c_quart3;
+extern stat_func c_perc90;
+extern stat_func c_quant;
+extern stat_func c_skew;
+extern stat_func c_kurt;
+
+extern stat_func_w w_ave;
+extern stat_func_w w_count;
+extern stat_func_w w_median;
+extern stat_func_w w_min;
+extern stat_func_w w_max;
+extern stat_func_w w_mode;
+extern stat_func_w w_quart1;
+extern stat_func_w w_quart3;
+extern stat_func_w w_perc90;
+extern stat_func_w w_quant;
+extern stat_func_w w_reg_m;
+extern stat_func_w w_reg_c;
+extern stat_func_w w_reg_r2;
+extern stat_func_w w_stddev;
+extern stat_func_w w_sum;
+extern stat_func_w w_var;
+extern stat_func_w w_skew;
+extern stat_func_w w_kurt;
+
+extern int sort_cell(DCELL *, int);
+extern int sort_cell_w(DCELL(*)[2], int);
+
+#endif

Copied: grass/trunk/include/defs/symbol.h (from rev 49164, grass/trunk/include/symbol.h)
===================================================================
--- grass/trunk/include/defs/symbol.h	                        (rev 0)
+++ grass/trunk/include/defs/symbol.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,7 @@
+#ifndef GRASS_SYMBOLDEFS_H
+#define GRASS_SYMBOLDEFS_H
+
+SYMBOL *S_read(const char *sname);
+void S_stroke(SYMBOL * symb, double size, double rotation, int tolerance);
+
+#endif

Copied: grass/trunk/include/defs/transform.h (from rev 49164, grass/trunk/include/transform.h)
===================================================================
--- grass/trunk/include/defs/transform.h	                        (rev 0)
+++ grass/trunk/include/defs/transform.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,21 @@
+#ifndef GRASS_TRANSFORMDEFS_H
+#define GRASS_TRANSFORMDEFS_H
+
+/* inverse.c */
+int inverse(double[DIM_matrix][DIM_matrix]);
+int isnull(double[DIM_matrix][DIM_matrix]);
+
+/* m_mult.c */
+int m_mult(double[DIM_matrix][DIM_matrix], double *, double *);
+
+/* transform.c */
+int compute_transformation_coef(double *, double *, double *, double *, int *,
+				int);
+int transform_a_into_b(double, double, double *, double *);
+int transform_b_into_a(double, double, double *, double *);
+int residuals_a_predicts_b(double *, double *, double *, double *, int *, int,
+			   double *, double *);
+int residuals_b_predicts_a(double *, double *, double *, double *, int *, int,
+			   double *, double *);
+
+#endif

Copied: grass/trunk/include/defs/vedit.h (from rev 49164, grass/trunk/include/vedit.h)
===================================================================
--- grass/trunk/include/defs/vedit.h	                        (rev 0)
+++ grass/trunk/include/defs/vedit.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,67 @@
+#ifndef GRASS_VEDITDEFS_H
+#define GRASS_VEDITDEFS_H
+
+/* break.c */
+int Vedit_split_lines(struct Map_info *, struct ilist *,
+		      struct line_pnts *, double, struct ilist *);
+int Vedit_connect_lines(struct Map_info *, struct ilist *, double);
+
+/* cats.c */
+int Vedit_modify_cats(struct Map_info *, struct ilist *,
+		      int, int, struct cat_list *);
+
+/* copy.c */
+int Vedit_copy_lines(struct Map_info *, struct Map_info *, struct ilist *);
+
+/* chtype.c */
+int Vedit_chtype_lines(struct Map_info *, struct ilist *);
+
+/* delete.c */
+
+int Vedit_delete_lines(struct Map_info *, struct ilist *);
+
+/* distance.c */
+double Vedit_get_min_distance(struct line_pnts *, struct line_pnts *,
+			      int, int *);
+
+/* flip.c */
+int Vedit_flip_lines(struct Map_info *, struct ilist *);
+
+/* merge.c */
+int Vedit_merge_lines(struct Map_info *, struct ilist *);
+
+/* move.c */
+int Vedit_move_lines(struct Map_info *, struct Map_info **, int,
+		     struct ilist *, double, double, double, int, double);
+
+/* render.c */
+struct robject_list *Vedit_render_map(struct Map_info *, struct bound_box *, int,
+				      double, double, int, int, double);
+
+/* select.c */
+int Vedit_select_by_query(struct Map_info *,
+			  int, int, double, int, struct ilist *);
+
+/* snap.c */
+int Vedit_snap_point(struct Map_info *,
+		     int, double *, double *, double *, double, int);
+int Vedit_snap_line(struct Map_info *, struct Map_info **, int,
+		    int, struct line_pnts *, double, int);
+int Vedit_snap_lines(struct Map_info *, struct Map_info **, int,
+		     struct ilist *, double, int);
+
+/* vertex.c */
+int Vedit_move_vertex(struct Map_info *, struct Map_info **, int,
+		      struct ilist *,
+		      struct line_pnts *, double, double,
+		      double, double, double, int, int);
+int Vedit_add_vertex(struct Map_info *Map, struct ilist *,
+		     struct line_pnts *, double);
+int Vedit_remove_vertex(struct Map_info *, struct ilist *,
+			struct line_pnts *, double);
+
+/* zbulk.c */
+int Vedit_bulk_labeling(struct Map_info *, struct ilist *,
+			double, double, double, double, double, double);
+
+#endif /* GRASS_VEDITDEFS_H */

Modified: grass/trunk/include/display.h
===================================================================
--- grass/trunk/include/display.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/display.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -12,165 +12,6 @@
     M_CLIP,
 };
 
-/* cnversions.c */
-void D_update_conversions(void);
-void D_fit_d_to_u(void);
-void D_fit_u_to_d(void);
-void D_show_conversions(void);
+#include <grass/defs/display.h>
 
-void D_do_conversions(const struct Cell_head *, double, double, double, double);
-
-int D_is_lat_lon(void);
-
-double D_get_d_to_a_xconv(void);
-double D_get_d_to_a_yconv(void);
-double D_get_d_to_u_xconv(void);
-double D_get_d_to_u_yconv(void);
-double D_get_a_to_u_xconv(void);
-double D_get_a_to_u_yconv(void);
-double D_get_a_to_d_xconv(void);
-double D_get_a_to_d_yconv(void);
-double D_get_u_to_d_xconv(void);
-double D_get_u_to_d_yconv(void);
-double D_get_u_to_a_xconv(void);
-double D_get_u_to_a_yconv(void);
-
-double D_get_ns_resolution(void);
-double D_get_ew_resolution(void);
-
-double D_get_u_west(void);
-double D_get_u_east(void);
-double D_get_u_north(void);
-double D_get_u_south(void);
-double D_get_a_west(void);
-double D_get_a_east(void);
-double D_get_a_north(void);
-double D_get_a_south(void);
-double D_get_d_west(void);
-double D_get_d_east(void);
-double D_get_d_north(void);
-double D_get_d_south(void);
-
-void D_set_region(const struct Cell_head *);
-void D_set_src(double, double, double, double);
-void D_get_src(double *, double *, double *, double *);
-void D_set_grid(int, int, int, int);
-void D_get_grid(int *, int *, int *, int *);
-void D_set_dst(double, double, double, double);
-void D_get_dst(double *, double *, double *, double *);
-
-void D_get_u(double [2][2]);
-void D_get_a(int [2][2]);
-void D_get_d(double [2][2]);
-
-double D_d_to_a_row(double);
-double D_d_to_a_col(double);
-double D_d_to_u_row(double);
-double D_d_to_u_col(double);
-double D_a_to_u_row(double);
-double D_a_to_u_col(double);
-double D_a_to_d_row(double);
-double D_a_to_d_col(double);
-double D_u_to_d_row(double);
-double D_u_to_d_col(double);
-double D_u_to_a_row(double);
-double D_u_to_a_col(double);
-
-/* draw2.c */
-
-void D_set_clip(double, double, double, double);
-void D_clip_to_map(void);
-void D_set_clip_mode(int);
-void D_set_reduction(double);
-
-void D_line_width(double);
-void D_get_text_box(const char *, double *, double *, double *, double *);
-
-void D_pos_abs(double, double);
-void D_pos_rel(double, double);
-void D_move_abs(double, double);
-void D_move_rel(double, double);
-void D_cont_abs(double, double);
-void D_cont_rel(double, double);
-void D_line_abs(double, double, double, double);
-void D_line_rel(double, double, double, double);
-void D_polydots_abs(const double *, const double *, int);
-void D_polydots_rel(const double *, const double *, int);
-void D_polyline_abs(const double *, const double *, int);
-void D_polyline_rel(const double *, const double *, int);
-void D_polygon_abs(const double *, const double *, int);
-void D_polygon_rel(const double *, const double *, int);
-void D_box_abs(double, double, double, double);
-void D_box_rel(double, double);
-
-void D_begin(void);
-void D_end(void);
-void D_close(void);
-void D_stroke(void);
-void D_fill(void);
-void D_dots(void);
-
-/* icon.c */
-void D_plot_icon(double, double, int, double, double);
-
-/* raster.c */
-int D_draw_raster(int, const void *, struct Colors *, RASTER_MAP_TYPE);
-int D_draw_d_raster(int, const DCELL *, struct Colors *);
-int D_draw_f_raster(int, const FCELL *, struct Colors *);
-int D_draw_c_raster(int, const CELL *, struct Colors *);
-int D_draw_cell(int, const CELL *, struct Colors *);
-void D_cell_draw_begin(void);
-int D_draw_raster_RGB(int, const void *, const void *, const void *,
-		      struct Colors *, struct Colors *, struct Colors *,
-		      RASTER_MAP_TYPE, RASTER_MAP_TYPE, RASTER_MAP_TYPE);
-void D_cell_draw_end(void);
-
-/* raster2.c */
-int D_set_overlay_mode(int);
-int D_color(CELL, struct Colors *);
-int D_c_color(CELL, struct Colors *);
-int D_d_color(DCELL, struct Colors *);
-int D_f_color(FCELL, struct Colors *);
-int D_color_of_type(const void *, struct Colors *, RASTER_MAP_TYPE);
-
-/* setup.c */
-void D_setup(int);
-void D_setup_unity(int);
-void D_setup2(int, int, double, double, double, double);
-
-/* symbol.c */
-void D_symbol(const SYMBOL *, double, double, const RGBA_Color *,
-	      const RGBA_Color *);
-void D_symbol2(const SYMBOL *, double, double, const RGBA_Color *,
-	       const RGBA_Color *);
-
-/* tran_colr.c */
-int D_translate_color(const char *);
-int D_parse_color(const char *, int);
-int D_use_color(int);
-int D_color_number_to_RGB(int, int *, int *, int *);
-void D_RGB_color(int, int, int);
-
-/* window.c */
-void D_erase(const char *);
-
-/* r_raster.c */
-
-int D_open_driver(void);
-void D_close_driver(void);
-int D_save_command(const char *);
-
-void D_get_window(double *, double *, double *, double *);
-
-void D__erase(void);
-
-void D_text_size(double, double);
-void D_text_rotation(double);
-void D_text(const char *);
-
-void D_font(const char *);
-void D_encoding(const char *);
-void D_font_list(char ***, int *);
-void D_font_info(char ***, int *);
-
 #endif /* GRASS_DISPLAY_H */

Modified: grass/trunk/include/dlg.h
===================================================================
--- grass/trunk/include/dlg.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/dlg.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_DLG_H
+#define GRASS_DLG_H
+
 struct dlg_node
 {
     double x;
@@ -124,23 +127,6 @@
 /* Need a definition for FILE   */
 #include <stdio.h>
 
-int dlg_init(FILE *, struct dlg *);
-int dlg_read(FILE *, struct dlg *);
-int _dlg_read_node(struct dlg_node *, FILE *);
-int _dlg_read_area(struct dlg_area *, FILE *);
-int _dlg_read_line(struct dlg_line *, FILE *);
-int _dlg_write_area(struct dlg_area *, FILE *);
-int dlg_write_header(FILE *, struct dlg *);
-int _dlg_write_line(struct dlg_line *, FILE *);
-int _dlg_write_node(struct dlg_node *, FILE *);
-int dlg_read_whole_area(FILE *, struct dlg *, int, double **, double **,
-			int *, int *);
-int dlg_read_area(FILE *, struct dlg *, int);
-int dlg_read_line(FILE *, struct dlg *, int);
-int dlg_read_node(FILE *, struct dlg *, int);
-int dlg_read_int(FILE *, int, int **);
-int dlg_write_int(FILE *, int, int *);
-int dlg_write_double(FILE *, int, double *);
-int dlg_write_area(FILE *, struct dlg *, int);
-int dlg_write_line(FILE *, struct dlg *, int);
-int dlg_write_node(FILE *, struct dlg *, int);
+#include <grass/defs/dlg.h>
+
+#endif

Modified: grass/trunk/include/fontcap.h
===================================================================
--- grass/trunk/include/fontcap.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/fontcap.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,5 +1,5 @@
-#ifndef _GRASS_FREETYPECAP_H
-#define _GRASS_FREETYPECAP_H
+#ifndef GRASS_FONTCAP_H
+#define GRASS_FONTCAP_H
 
 struct GFONT_CAP
 {

Modified: grass/trunk/include/form.h
===================================================================
--- grass/trunk/include/form.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/form.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_FORM_H
+#define GRASS_FORM_H
+
 #define F_VIEW 1
 #define F_EDIT 2
 
@@ -10,9 +13,6 @@
 #define F_KEY_FNAME "_grass_internal_key_name"
 #define F_ENCODING "_grass_internal_database_encoding"
 
-int F_generate(char *driver, char *database, char *table, char *key,
-	       int keyval, char *frmname, char *frmmapset, int edit_mode,
-	       int format, char **form);
-int F_open(char *title, char *html);
-void F_clear(void);
-void F_close(void);
+#include <grass/defs/form.h>
+
+#endif

Deleted: grass/trunk/include/geom.h
===================================================================
--- grass/trunk/include/geom.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/geom.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,4 +0,0 @@
-#include "geom/optri.h"
-#include "geom/lia.h"
-#include "geom/basic.h"
-#include "geom/sos.h"

Modified: grass/trunk/include/gis.h
===================================================================
--- grass/trunk/include/gis.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gis.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -470,6 +470,6 @@
 
 /* Since there are so many prototypes for the gis library they are stored */
 /* in the file gisdefs.h */
-#include <grass/gisdefs.h>
+#include <grass/defs/gis.h>
 
 #endif /* GRASS_GIS_H */

Deleted: grass/trunk/include/gisdefs.h
===================================================================
--- grass/trunk/include/gisdefs.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gisdefs.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,718 +0,0 @@
-/*
- *****************************************************************************
- *
- * MODULE:      Grass Include Files
- * AUTHOR(S):   Original author unknown - probably CERL
- *              Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
- * PURPOSE:     This file contains the prototypes for all the functions in the
- *              gis library (src/libes/gis).
- * COPYRIGHT:    (C) 2000 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.
- *
- *****************************************************************************/
-
-#ifndef GRASS_GISDEFS_H
-#define GRASS_GISDEFS_H
-
-/*============================= Include Files ==============================*/
-
-/* none */
-
-/*=========================== Constants/Defines ============================*/
-
-/* none (look in gis.h) */
-
-/*=========================== Typedefs/Structures ==========================*/
-
-/* none (look in gis.h) */
-
-/*============================== Prototypes ================================*/
-
-#include <grass/config.h>
-
-#ifdef __GNUC__
-# ifdef __MINGW32__
-#  include <malloc.h>
-# else
-#  include <alloca.h>
-# endif
-# define G__alloca(n) alloca(n)
-# define G__freea(p)
-#else
-# define G__alloca(n) G_malloc(n)
-# define G__freea(p) G_free(p)
-#endif
-
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-
-/* adj_cellhd.c */
-void G_adjust_Cell_head(struct Cell_head *, int, int);
-void G_adjust_Cell_head3(struct Cell_head *, int, int, int);
-
-/* alloc.c */
-#define G_incr_void_ptr(ptr, size) \
-    ((void *)((const unsigned char *)(ptr) + (size)))
-
-void *G__malloc(const char *, int, size_t);
-void *G__calloc(const char *, int, size_t, size_t);
-void *G__realloc(const char *, int, void *, size_t);
-void G_free(void *);
-#ifndef G_incr_void_ptr
-void *G_incr_void_ptr(const void *, size_t);
-#endif
-
-#ifndef CTYPESGEN
-#define G_malloc(n)     G__malloc(__FILE__, __LINE__, (n))
-#define G_calloc(m, n)  G__calloc(__FILE__, __LINE__, (m), (n))
-#define G_realloc(p, n) G__realloc(__FILE__, __LINE__, (p), (n))
-#else
-#define G_malloc(n)     G__malloc("<ctypesgen>", 0, (n))
-#define G_calloc(m, n)  G__calloc("<ctypesgen>", 0, (m), (n))
-#define G_realloc(p, n) G__realloc("<ctypesgen>", 0, (p), (n))
-#endif
-
-/* area.c */
-int G_begin_cell_area_calculations(void);
-double G_area_of_cell_at_row(int);
-int G_begin_polygon_area_calculations(void);
-double G_area_of_polygon(const double *, const double *, int);
-
-/* area_ellipse.c */
-void G_begin_zone_area_on_ellipsoid(double, double, double);
-double G_darea0_on_ellipsoid(double);
-double G_area_for_zone_on_ellipsoid(double, double);
-
-/* area_poly1.c */
-void G_begin_ellipsoid_polygon_area(double, double);
-double G_ellipsoid_polygon_area(const double *, const double *, int);
-
-/* area_poly2.c */
-double G_planimetric_polygon_area(const double *, const double *, int);
-
-/* area_sphere.c */
-void G_begin_zone_area_on_sphere(double, double);
-double G_darea0_on_sphere(double);
-double G_area_for_zone_on_sphere(double, double);
-
-/* ascii_chk.c */
-void G_ascii_check(char *);
-
-
-/* asprintf.c */
-/* Do it better if you know how */
-/* asprintf is not found on MINGW but exists */
-
-/* 
- *  Because configure script in GDAL test is G_asprintf exists in gis lib
- *  the G_asprintf macro is disabled until a stable version of GDAL
- *  with a different function becomes widely used 
- */
-int G_vasprintf(char **, const char *, va_list);
-int G_asprintf(char **, const char *, ...)
-    __attribute__ ((format(printf, 2, 3)));
-
-/* basename.c */
-char *G_basename(char *, const char *);
-
-/* bres_line.c */
-void G_bresenham_line(int, int, int, int, int (*)(int, int));
-
-/* clicker.c */
-void G_clicker(void);
-
-/* color_rules.c */
-char *G_color_rules_options(void);
-char *G_color_rules_descriptions(void);
-void G_list_color_rules(FILE *);
-int G_find_color_rule(const char *);
-
-/* color_str.c */
-int G_num_standard_colors(void);
-
-/* commas.c */
-int G_insert_commas(char *);
-void G_remove_commas(char *);
-
-/* copy_dir.c */
-int G_recursive_copy(const char *, const char *);
-
-/* copy_file.c */
-int G_copy_file(const char *, const char *);
-
-/* counter.c */
-int G_is_initialized(int *);
-void G_initialize_done(int *);
-void G_init_counter(struct Counter *, int);
-int G_counter_next(struct Counter *);
-
-/* date.c */
-const char *G_date(void);
-
-/* datum.c */
-int G_get_datum_by_name(const char *);
-const char *G_datum_name(int);
-const char *G_datum_description(int);
-const char *G_datum_ellipsoid(int);
-int G_get_datumparams_from_projinfo(const struct Key_Value *, char *, char *);
-void G_read_datum_table(void);
-
-
-/* debug.c */
-void G_init_debug(void);
-int G_debug(int, const char *, ...) __attribute__ ((format(printf, 2, 3)));
-
-/* distance.c */
-int G_begin_distance_calculations(void);
-double G_distance(double, double, double, double);
-double G_distance_between_line_segments(double, double, double, double,
-					double, double, double, double);
-double G_distance_point_to_line_segment(double, double, double, double,
-					double, double);
-
-/* done_msg.c */
-void G_done_msg(const char *, ...) __attribute__ ((format(printf, 1, 2)));
-
-/* endian.c */
-int G_is_little_endian(void);
-
-/* env.c */
-void G_init_env(void);
-const char *G_getenv(const char *);
-const char *G_getenv2(const char *, int);
-const char *G__getenv(const char *);
-const char *G__getenv2(const char *, int);
-void G_setenv(const char *, const char *);
-void G_setenv2(const char *, const char *, int);
-void G__setenv(const char *, const char *);
-void G__setenv2(const char *, const char *, int);
-void G_unsetenv(const char *);
-void G_unsetenv2(const char *, int);
-void G__write_env(void);
-const char *G__env_name(int);
-void G__read_env(void);
-void G_set_gisrc_mode(int);
-int G_get_gisrc_mode(void);
-void G__create_alt_env(void);
-void G__switch_env(void);
-
-/* error.c */
-int G_info_format(void);
-void G_message(const char *, ...) __attribute__ ((format(printf, 1, 2)));
-void G_verbose_message(const char *, ...)
-    __attribute__ ((format(printf, 1, 2)));
-void G_important_message(const char *, ...)
-    __attribute__ ((format(printf, 1, 2)));
-void G_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
-    __attribute__ ((noreturn));
-void G_warning(const char *, ...) __attribute__ ((format(printf, 1, 2)));
-int G_suppress_warnings(int);
-int G_sleep_on_error(int);
-void G_set_error_routine(int (*)(const char *, int));
-void G_unset_error_routine(void);
-void G_init_logging(void);
-
-/* file_name.c */
-char *G_file_name(char *, const char *, const char *, const char *);
-char *G_file_name_misc(char *, const char *, const char *, const char *,
-		       const char *);
-
-/* find_file.c */
-const char *G_find_file(const char *, char *, const char *);
-const char *G_find_file2(const char *, const char *, const char *);
-const char *G_find_file_misc(const char *, const char *, char *, const char *);
-const char *G_find_file2_misc(const char *, const char *, const char *,
-			      const char *);
-
-/* find_etc.c */
-char *G_find_etc(const char *);
-
-/* find_rast.c */
-const char *G_find_raster(char *, const char *);
-const char *G_find_raster2(const char *, const char *);
-
-/* find_rast3d.c */
-const char *G_find_raster3d(const char *, const char *);
-
-/* find_vect.c */
-const char *G_find_vector(char *, const char *);
-const char *G_find_vector2(const char *, const char *);
-
-/* flate.c */
-int G_zlib_compress(const unsigned char *, int, unsigned char *, int);
-int G_zlib_expand(const unsigned char *, int, unsigned char *, int);
-int G_zlib_write(int, const unsigned char *, int);
-int G_zlib_read(int, int, unsigned char *, int);
-int G_zlib_write_noCompress(int, const unsigned char *, int);
-
-/* geodesic.c */
-int G_begin_geodesic_equation(double, double, double, double);
-double G_geodesic_lat_from_lon(double);
-
-/* geodist.c */
-void G_begin_geodesic_distance(double, double);
-void G_set_geodesic_distance_lat1(double);
-void G_set_geodesic_distance_lat2(double);
-double G_geodesic_distance_lon_to_lon(double, double);
-double G_geodesic_distance(double, double, double, double);
-
-/* get_ellipse.c */
-int G_get_ellipsoid_parameters(double *, double *);
-int G_get_spheroid_by_name(const char *, double *, double *, double *);
-int G_get_ellipsoid_by_name(const char *, double *, double *);
-const char *G_ellipsoid_name(int);
-const char *G_ellipsoid_description(int);
-int G_read_ellipsoid_table(int);
-
-/* get_projinfo.c */
-struct Key_Value *G_get_projunits(void);
-struct Key_Value *G_get_projinfo(void);
-
-/* get_window.c */
-void G_get_window(struct Cell_head *);
-void G_get_default_window(struct Cell_head *);
-void G__get_window(struct Cell_head *, const char *, const char *,
-		   const char *);
-
-/* getl.c */
-int G_getl(char *, int, FILE *);
-int G_getl2(char *, int, FILE *);
-
-/* gisbase.c */
-const char *G_gisbase(void);
-
-/* gisdbase.c */
-const char *G_gisdbase(void);
-
-/* gisinit.c */
-void G__gisinit(const char *, const char *);
-void G__no_gisinit(const char *);
-void G__check_gisinit(void);
-void G_init_all(void);
-
-/* handler.c */
-void G_add_error_handler(void (*)(void *), void *);
-void G_remove_error_handler(void (*)(void *), void *);
-void G__call_error_handlers(void);
-
-/* home.c */
-const char *G_home(void);
-const char *G__home(void);
-
-/* intersect.c */
-int G_intersect_line_segments(double, double, double, double, double, double,
-			      double, double, double *, double *, double *,
-			      double *);
-
-/* is.c */
-int G_is_gisbase(const char *);
-int G_is_location(const char *);
-int G_is_mapset(const char *);
-
-/* key_value1.c */
-struct Key_Value *G_create_key_value(void);
-void G_set_key_value(const char *, const char *, struct Key_Value *);
-const char *G_find_key_value(const char *, const struct Key_Value *);
-void G_free_key_value(struct Key_Value *);
-
-/* key_value2.c */
-int G_fwrite_key_value(FILE *, const struct Key_Value *);
-struct Key_Value *G_fread_key_value(FILE *);
-
-/* key_value3.c */
-void G_write_key_value_file(const char *, const struct Key_Value *);
-struct Key_Value *G_read_key_value_file(const char *);
-
-/* key_value4.c */
-void G_update_key_value_file(const char *, const char *, const char *);
-int G_lookup_key_value_from_file(const char *, const char *, char[], int);
-
-/* legal_name.c */
-int G_legal_filename(const char *);
-int G_check_input_output_name(const char *, const char *, int);
-
-/* line_dist.c */
-void G_set_distance_to_line_tolerance(double);
-double G_distance2_point_to_line(double, double, double, double, double,
-				 double);
-
-/* list.c */
-void G_list_element(const char *, const char *, const char *,
-		    int (*)(const char *, const char *, const char *));
-char **G_list(int, const char *, const char *, const char *);
-void G_free_list(char **);
-
-/* ll_format.c */
-void G_lat_format(double, char *);
-const char *G_lat_format_string(void);
-void G_lon_format(double, char *);
-const char *G_lon_format_string(void);
-void G_llres_format(double, char *);
-const char *G_llres_format_string(void);
-void G_lat_parts(double, int *, int *, double *, char *);
-void G_lon_parts(double, int *, int *, double *, char *);
-
-/* ll_scan.c */
-int G_lat_scan(const char *, double *);
-int G_lon_scan(const char *, double *);
-int G_llres_scan(const char *, double *);
-
-/* location.c */
-const char *G_location(void);
-char *G_location_path(void);
-char *G__location_path(void);
-
-/* ls.c */
-void G_set_ls_filter(int (*)(const char *, void *), void *);
-void G_set_ls_exclude_filter(int (*)(const char *, void *), void *);
-char **G__ls(const char *, int *);
-void G_ls(const char *, FILE *);
-void G_ls_format(char **, int, int, FILE *);
-
-/* ls_filter.c */
-#ifdef HAVE_REGEX_H
-void *G_ls_regex_filter(const char *, int, int);
-void *G_ls_glob_filter(const char *, int);
-void G_free_ls_filter(void *);
-#endif
-
-/* mach_name.c */
-const char *G__machine_name(void);
-
-/* make_loc.c */
-int G__make_location(const char *, struct Cell_head *, struct Key_Value *,
-		     struct Key_Value *, FILE *);
-int G_make_location(const char *, struct Cell_head *, struct Key_Value *,
-		    struct Key_Value *, FILE *);
-int G_compare_projections(const struct Key_Value *, const struct Key_Value *,
-			  const struct Key_Value *, const struct Key_Value *);
-
-/* make_mapset.c */
-int G__make_mapset(const char *gisdbase_name, const char *location_name,
-		   const char *mapset_name);
-int G_make_mapset(const char *gisdbase_name, const char *location_name,
-		  const char *mapset_name);
-
-/* mapcase.c */
-char *G_tolcase(char *);
-char *G_toucase(char *);
-
-/* mapset.c */
-const char *G_mapset(void);
-const char *G__mapset(void);
-
-/* mapset_msc.c */
-int G__make_mapset_element(const char *);
-int G__make_mapset_element_misc(const char *, const char *);
-int G__mapset_permissions(const char *);
-int G__mapset_permissions2(const char *, const char *, const char *);
-
-/* mapset_nme.c */
-const char *G__mapset_name(int);
-void G_get_list_of_mapsets(void);
-void G__create_alt_search_path(void);
-void G__switch_search_path(void);
-void G_reset_mapsets(void);
-char **G_available_mapsets(void);
-void G_add_mapset_to_search_path(const char *);
-int G_is_mapset_in_search_path(const char *);
-
-/* myname.c */
-char *G_myname(void);
-
-/* named_colr.c */
-int G_color_values(const char *, float *, float *, float *);
-const char *G_color_name(int);
-
-/* nl_to_spaces.c */
-void G_newlines_to_spaces(char *);
-
-/* nme_in_mps.c */
-int G_name_is_fully_qualified(const char *, char *, char *);
-char *G_fully_qualified_name(const char *, const char *);
-int G_unqualified_name(const char *, const char *, char *, char *);
-
-/* open.c */
-int G_open_new(const char *, const char *);
-int G_open_old(const char *, const char *, const char *);
-int G_open_update(const char *, const char *);
-FILE *G_fopen_new(const char *, const char *);
-FILE *G_fopen_old(const char *, const char *, const char *);
-FILE *G_fopen_append(const char *, const char *);
-FILE *G_fopen_modify(const char *, const char *);
-
-/* open_misc.c */
-int G_open_new_misc(const char *, const char *, const char *);
-int G_open_old_misc(const char *, const char *, const char *, const char *);
-int G_open_update_misc(const char *, const char *, const char *);
-FILE *G_fopen_new_misc(const char *, const char *, const char *);
-FILE *G_fopen_old_misc(const char *, const char *, const char *,
-		       const char *);
-FILE *G_fopen_append_misc(const char *, const char *, const char *);
-FILE *G_fopen_modify_misc(const char *, const char *, const char *);
-
-/* overwrite.c */
-int G_check_overwrite(int argc, char **argv);
-
-/* pager.c */
-FILE *G_open_pager(struct Popen *);
-void G_close_pager(struct Popen *);
-FILE *G_open_mail(struct Popen *);
-void G_close_mail(struct Popen *);
-
-/* parser.c */
-void G_disable_interactive(void);
-struct GModule *G_define_module(void);
-struct Flag *G_define_flag(void);
-struct Option *G_define_option(void);
-struct Option *G_define_standard_option(int);
-int G_parser(int, char **);
-void G_usage(void);
-char *G_recreate_command(void);
-void G_add_keyword(const char *);
-void G_set_keywords(const char *);
-int G_get_overwrite();
-
-/* paths.c */
-int G_mkdir(const char *);
-int G_is_dirsep(char);
-int G_is_absolute_path(const char *);
-char *G_convert_dirseps_to_host(char *);
-char *G_convert_dirseps_from_host(char *);
-int G_lstat(const char *, STRUCT_STAT *);
-int G_stat(const char *, STRUCT_STAT *);
-
-/* percent.c */
-void G_percent(long, long, int);
-void G_percent_reset(void);
-void G_progress(long, int);
-void G_set_percent_routine(int (*) (int));
-void G_unset_percent_routine(void);
-
-/* popen.c */
-void G_popen_clear(struct Popen *);
-FILE *G_popen_write(struct Popen *, const char *, const char **);
-FILE *G_popen_read(struct Popen *, const char *, const char **);
-void G_popen_close(struct Popen *);
-
-/* plot.c */
-void G_setup_plot(double, double, double, double, int (*)(int, int),
-		  int (*)(int, int));
-void G_setup_fill(int);
-void G_plot_where_xy(double, double, int *, int *);
-void G_plot_where_en(int, int, double *, double *);
-void G_plot_point(double, double);
-void G_plot_line(double, double, double, double);
-void G_plot_line2(double, double, double, double);
-int G_plot_polygon(const double *, const double *, int);
-int G_plot_area(double *const *, double *const *, int *, int);
-void G_plot_fx(double (*)(double), double, double);
-
-/* pole_in_poly.c */
-int G_pole_in_polygon(const double *, const double *, int);
-
-/* progrm_nme.c */
-const char *G_program_name(void);
-void G_set_program_name(const char *);
-
-/* proj1.c */
-int G_projection(void);
-
-/* proj2.c */
-int G__projection_units(int);
-const char *G__projection_name(int);
-
-/* proj3.c */
-const char *G_database_unit_name(int);
-const char *G_database_projection_name(void);
-const char *G_database_datum_name(void);
-const char *G_database_ellipse_name(void);
-double G_database_units_to_meters_factor(void);
-
-/* put_window.c */
-int G_put_window(const struct Cell_head *);
-int G__put_window(const struct Cell_head *, const char *, const char *);
-
-/* putenv.c */
-void G_putenv(const char *, const char *);
-
-/* radii.c */
-double G_meridional_radius_of_curvature(double, double, double);
-double G_transverse_radius_of_curvature(double, double, double);
-double G_radius_of_conformal_tangent_sphere(double, double, double);
-
-/* rd_cellhd.c */
-void G__read_Cell_head(FILE *, struct Cell_head *, int);
-void G__read_Cell_head_array(char **, struct Cell_head *, int);
-
-/* remove.c */
-int G_remove(const char *, const char *);
-int G_remove_misc(const char *, const char *, const char *);
-
-/* rename.c */
-int G_rename_file(const char *, const char *);
-int G_rename(const char *, const char *, const char *);
-
-/* rhumbline.c */
-int G_begin_rhumbline_equation(double, double, double, double);
-double G_rhumbline_lat_from_lon(double);
-
-/* rotate.c */
-void G_rotate_around_point(double, double, double *, double *, double);
-void G_rotate_around_point_int(int, int, int *, int *, double);
-
-/* seek.c */
-off_t G_ftell(FILE *);
-void G_fseek(FILE *, off_t, int);
-
-/* set_window.c */
-void G_get_set_window(struct Cell_head *);
-void G_set_window(struct Cell_head *);
-void G_unset_window();
-
-/* short_way.c */
-void G_shortest_way(double *, double *);
-
-/* sleep.c */
-void G_sleep(unsigned int);
-
-/* snprintf.c */
-int G_snprintf(char *, size_t, const char *, ...)
-    __attribute__ ((format(printf, 3, 4)));
-
-/* strings.c */
-int G_strcasecmp(const char *, const char *);
-int G_strncasecmp(const char *, const char *, int);
-char *G_store(const char *);
-char *G_strchg(char *, char, char);
-char *G_str_replace(const char *, const char *, const char *);
-void G_strip(char *);
-char *G_chop(char *);
-void G_str_to_upper(char *);
-void G_str_to_lower(char *);
-int G_str_to_sql(char *);
-void G_squeeze(char *);
-char *G_strcasestr(const char *, const char *);
-
-/* tempfile.c */
-void G_init_tempfile(void);
-char *G_tempfile(void);
-char *G__tempfile(int);
-void G__temp_element(char *);
-
-/* timestamp.c */
-void G_init_timestamp(struct TimeStamp *);
-void G_set_timestamp(struct TimeStamp *, const struct DateTime *);
-void G_set_timestamp_range(struct TimeStamp *, const struct DateTime *,
-			   const struct DateTime *);
-int G__read_timestamp(FILE *, struct TimeStamp *);
-int G__write_timestamp(FILE *, const struct TimeStamp *);
-void G_get_timestamps(const struct TimeStamp *, struct DateTime *, struct DateTime *, int *);
-int G_read_raster_timestamp(const char *, const char *, struct TimeStamp *);
-int G_read_vector_timestamp(const char *, const char *, struct TimeStamp *);
-int G_write_raster_timestamp(const char *, const struct TimeStamp *);
-int G_write_vector_timestamp(const char *, const struct TimeStamp *);
-int G_format_timestamp(const struct TimeStamp *, char *);
-int G_scan_timestamp(struct TimeStamp *, const char *);
-int G_remove_raster_timestamp(const char *);
-int G_remove_vector_timestamp(const char *);
-int G_read_grid3_timestamp(const char *, const char *, struct TimeStamp *);
-int G_remove_grid3_timestamp(const char *);
-int G_write_grid3_timestamp(const char *, const struct TimeStamp *);
-
-/* token.c */
-char **G_tokenize(const char *, const char *);
-char **G_tokenize2(const char *, const char *, const char *);
-int G_number_of_tokens(char **);
-void G_free_tokens(char **);
-
-/* trim_dec.c */
-void G_trim_decimal(char *);
-
-/* units.c */
-double G_units_to_meters_factor(int);
-double G_units_to_meters_factor_sq(int);
-const char *G_get_units_name(int, int, int);
-int G_units(const char *);
-
-/* user_config.c */
-#ifndef __MINGW32__
-char *G_rc_path(const char *, const char *);
-#endif
-
-/* verbose.c */
-int G_verbose(void);
-int G_verbose_min(void);
-int G_verbose_std(void);
-int G_verbose_max(void);
-int G_set_verbose(int);
-
-/* view.c */
-void G_3dview_warning(int);
-int G_get_3dview_defaults(struct G_3dview *, struct Cell_head *);
-int G_put_3dview(const char *, const char *, const struct G_3dview *,
-		 const struct Cell_head *);
-int G_get_3dview(const char *, const char *, struct G_3dview *);
-
-/* whoami.c */
-const char *G_whoami(void);
-
-/* wind_2_box.c */
-void G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
-			    int);
-
-/* wind_format.c */
-void G_format_northing(double, char *, int);
-void G_format_easting(double, char *, int);
-void G_format_resolution(double, char *, int);
-
-/* wind_in.c */
-int G_point_in_region(double, double);
-int G_point_in_window(double, double, const struct Cell_head *);
-
-/* wind_limits.c */
-int G_limit_east(double *, int);
-int G_limit_west(double *, int);
-int G_limit_north(double *, int);
-int G_limit_south(double *, int);
-
-/* wind_overlap.c */
-int G_window_overlap(const struct Cell_head *, double, double, double,
-		     double);
-double G_window_percentage_overlap(const struct Cell_head *, double, double,
-				   double, double);
-
-/* wind_scan.c */
-int G_scan_northing(const char *, double *, int);
-int G_scan_easting(const char *, double *, int);
-int G_scan_resolution(const char *, double *, int);
-
-/* window_map.c */
-double G_adjust_east_longitude(double, double);
-double G_adjust_easting(double, const struct Cell_head *);
-void G__init_window(void);
-
-/* worker.c */
-void G_begin_execute(void (*func)(void *), void *, void **, int);
-void G_end_execute(void **);
-void G_init_workers(void);
-void G_finish_workers(void);
-
-/* wr_cellhd.c */
-void G__write_Cell_head(FILE *, const struct Cell_head *, int);
-void G__write_Cell_head3(FILE *, const struct Cell_head *, int);
-
-/* writ_zeros.c */
-void G_write_zeros(int, size_t);
-
-/* zero.c */
-void G_zero(void *, int);
-
-/* zone.c */
-int G_zone(void);
-
-#endif /* GRASS_GISDEFS_H */

Modified: grass/trunk/include/glocale.h
===================================================================
--- grass/trunk/include/glocale.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/glocale.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -3,8 +3,7 @@
 
 #include <grass/config.h>
 
-extern void G_init_locale(void);
-extern char *G_gettext(const char *, const char *);
+#include <grass/defs/glocale.h>
 
 #if defined(HAVE_LIBINTL_H) && defined(USE_NLS)
 #include <libintl.h>

Modified: grass/trunk/include/gmath.h
===================================================================
--- grass/trunk/include/gmath.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gmath.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,8 +20,8 @@
 
  ******************************************************************************/
 
-#ifndef GMATH_H_
-#define GMATH_H_
+#ifndef GRASS_GMATH_H
+#define GRASS_GMATH_H
 
 #include <grass/config.h>
 #if defined(HAVE_LIBLAPACK) && defined(HAVE_LIBBLAS) && defined(HAVE_G2C_H)
@@ -46,80 +46,6 @@
 #define G_MATH_ROWSCALE_EUKLIDNORM_PRECONDITION 3
 #define G_MATH_ROWSCALE_MAXNORM_PRECONDITION 4
 
-/* dalloc.c */
-double *G_alloc_vector(size_t);
-double **G_alloc_matrix(int, int);
-float  *G_alloc_fvector(size_t);
-float  **G_alloc_fmatrix(int, int);
-void G_free_vector(double *);
-void G_free_matrix(double **);
-void G_free_fvector(float *);
-void G_free_fmatrix(float **);
-
-/* ialloc.c */
-int *G_alloc_ivector(size_t);
-int **G_alloc_imatrix(int, int);
-void G_free_ivector(int *);
-void G_free_imatrix(int **);
-
-/* fft.c */
-extern int fft(int, double *[2], int, int, int);
-extern int fft2(int, double (*)[2], int, int, int);
-
-/* gauss.c */
-extern double G_math_rand_gauss(int, double);
-
-/* max_pow2.c */
-extern long G_math_max_pow2 (long n);
-extern long G_math_min_pow2 (long n);
-
-/* rand1.c */
-extern float G_math_rand(int);
-
-/* del2g.c */
-extern int del2g(double *[2], int, double);
-
-/* getg.c */
-extern int getg(double, double *[2], int);
-
-/* eigen_tools.c */
-extern int G_math_egvorder(double *, double **, long);
-
-/* mult.c */
-extern int G_math_complex_mult (double *v1[2], int size1, double *v2[2], int size2, double *v3[2], int size3);
-
-/* lu.c*/
-extern int G_ludcmp(double **, int, int *, double *);
-extern void G_lubksb(double **a, int n, int *indx, double b[]);
-
-/* findzc.c */
-extern int G_math_findzc(double conv[], int size, double zc[], double thresh, int num_orients);
-
-
-/* *************************************************************** */
-/* ***** WRAPPER FOR CCMATH FUNCTIONS USED IN GRASS ************** */
-/* *************************************************************** */
-extern int G_math_solv(double **,double *,int);
-extern int G_math_solvps(double **,double *,int);
-extern void G_math_solvtd(double *,double *,double *,double *,int);
-extern int G_math_solvru(double **,double *,int);
-extern int G_math_minv(double **,int);
-extern int G_math_psinv(double **,int);
-extern int G_math_ruinv(double **,int);
-extern void G_math_eigval(double **,double *,int);
-extern void G_math_eigen(double **,double *,int);
-extern double G_math_evmax(double **,double *,int);
-extern int G_math_svdval(double *,double **,int,int);
-extern int G_math_sv2val(double *,double **,int,int);
-extern int G_math_svduv(double *,double **,double **, int,double **,int);
-extern int G_math_sv2uv(double *,double **,double **,int,double **,int);
-extern int G_math_svdu1v(double *,double **,int,double **,int);
-
-
-/* *************************************************************** */
-/* *************** LINEARE EQUATION SYSTEM PART ****************** */
-/* *************************************************************** */
-
 /*!
  * \brief The row vector of the sparse matrix
  * */
@@ -130,108 +56,6 @@
     unsigned int *index;	/*the index number */
 } G_math_spvector;
 
-/* Sparse matrix and sparse vector functions
- * */
-extern G_math_spvector *G_math_alloc_spvector(int );
-extern G_math_spvector **G_math_alloc_spmatrix(int );
-extern void G_math_free_spmatrix(G_math_spvector ** , int );
-extern void G_math_free_spvector(G_math_spvector * );
-extern int G_math_add_spvector(G_math_spvector **, G_math_spvector * , int );
-extern G_math_spvector **G_math_A_to_Asp(double **, int, double);
-extern double **G_math_Asp_to_A(G_math_spvector **, int);
-extern double **G_math_Asp_to_sband_matrix(G_math_spvector **, int, int);
-extern G_math_spvector **G_math_sband_matrix_to_Asp(double **, int, int, double);
-extern void G_math_print_spmatrix(G_math_spvector **, int);
-extern void G_math_Ax_sparse(G_math_spvector **, double *, double *, int );
+#include <grass/defs/gmath.h>
 
-/*Symmetric band matrix handling */
-extern double **G_math_matrix_to_sband_matrix(double **, int, int);
-extern double **G_math_sband_matrix_to_matrix(double **, int, int);
-extern void G_math_Ax_sband(double ** A, double *x, double *y, int rows, int bandwidth);
-
-/*linear equation solver, most of them are multithreaded wih OpenMP*/
-extern int G_math_solver_gauss(double **, double *, double *, int );
-extern int G_math_solver_lu(double **, double *, double *, int );
-extern int G_math_solver_cholesky(double **, double *, double *, int , int );
-extern void G_math_solver_cholesky_sband(double **, double *, double *, int, int);
-extern int G_math_solver_jacobi(double **, double *, double *, int , int , double , double );
-extern int G_math_solver_gs(double **, double *, double *, int , int , double , double );
-
-extern int G_math_solver_pcg(double **, double *, double *, int , int , double , int );
-extern int G_math_solver_cg(double **, double *, double *, int , int , double );
-extern int G_math_solver_cg_sband(double **, double *, double *, int, int, int, double);
-extern int G_math_solver_bicgstab(double **, double *, double *, int , int , double );
-extern int G_math_solver_sparse_jacobi(G_math_spvector **, double *, double *, int , int , double , double );
-extern int G_math_solver_sparse_gs(G_math_spvector **, double *, double *, int , int , double , double );
-extern int G_math_solver_sparse_pcg(G_math_spvector **, double *, double *, int , int , double , int );
-extern int G_math_solver_sparse_cg(G_math_spvector **, double *, double *, int , int , double );
-extern int G_math_solver_sparse_bicgstab(G_math_spvector **, double *, double *, int , int , double );
-
-/* solver algoithms and helper functions*/
-extern void G_math_gauss_elimination(double **, double *, int );
-extern void G_math_lu_decomposition(double **, double *, int );
-extern int G_math_cholesky_decomposition(double **, int , int );
-extern void G_math_cholesky_sband_decomposition(double **, double **, int, int);
-extern void G_math_backward_substitution(double **, double *, double *, int );
-extern void G_math_forward_substitution(double **, double *, double *, int );
-extern void G_math_cholesky_sband_substitution(double **, double *, double *, int, int);
-
-/*BLAS like level 1,2 and 3 functions*/
-
-/*level 1 vector - vector grass implementation with OpenMP thread support*/
-extern void G_math_d_x_dot_y(double *, double *, double *, int );
-extern void G_math_d_asum_norm(double *, double *, int );
-extern void G_math_d_euclid_norm(double *, double *, int );
-extern void G_math_d_max_norm(double *, double *, int );
-extern void G_math_d_ax_by(double *, double *, double *, double , double , int );
-extern void G_math_d_copy(double *, double *, int );
-
-extern void G_math_f_x_dot_y(float *, float *, float *, int );
-extern void G_math_f_asum_norm(float *, float *, int );
-extern void G_math_f_euclid_norm(float *, float *, int );
-extern void G_math_f_max_norm(float *, float *, int );
-extern void G_math_f_ax_by(float *, float *, float *, float , float , int );
-extern void G_math_f_copy(float *, float *, int );
-
-extern void G_math_i_x_dot_y(int *, int *,  double *, int );
-extern void G_math_i_asum_norm(int *,  double *, int );
-extern void G_math_i_euclid_norm(int *,  double *,int );
-extern void G_math_i_max_norm(int *,  int *, int );
-extern void G_math_i_ax_by(int *, int *, int *, int , int , int );
-extern void G_math_i_copy(int *, int *, int );
-
-/*ATLAS blas level 1 wrapper*/
-extern double G_math_ddot(double *, double *, int );
-extern float G_math_sdot(float *, float *, int );
-extern float G_math_sdsdot(float *, float *, float , int );
-extern double G_math_dnrm2(double *, int );
-extern double G_math_dasum(double *, int );
-extern double G_math_idamax(double *, int );
-extern float  G_math_snrm2(float *, int );
-extern float  G_math_sasum(float *, int );
-extern float  G_math_isamax(float *, int );
-extern void G_math_dscal(double *, double , int );
-extern void G_math_sscal(float *, float , int );
-extern void G_math_dcopy(double *, double *, int );
-extern void G_math_scopy(float *, float *, int );
-extern void G_math_daxpy(double *, double *, double , int );
-extern void G_math_saxpy(float *, float *, float , int );
-
-/*level 2 matrix - vector grass implementation with OpenMP thread support*/
-extern void G_math_d_Ax(double **, double *, double *, int , int );
-extern void G_math_f_Ax(float **, float *, float *, int , int );
-extern void G_math_d_x_dyad_y(double *, double *, double **, int, int );
-extern void G_math_f_x_dyad_y(float *, float *, float **, int, int );
-extern void G_math_d_aAx_by(double **, double *, double *, double , double , double *, int , int );
-extern void G_math_f_aAx_by(float **, float *, float *, float , float , float *, int , int );
-extern int G_math_d_A_T(double **A, int rows);
-extern int G_math_f_A_T(float **A, int rows);
-
-/*level 3 matrix - matrix grass implementation with OpenMP thread support*/
-extern void G_math_d_aA_B(double **, double **, double , double **, int , int );
-extern void G_math_f_aA_B(float **, float **, float , float **, int , int );
-extern void G_math_d_AB(double **, double **, double **, int , int , int );
-extern void G_math_f_AB(float **,  float **,  float **,  int , int , int );
-
-#endif /* GMATH_H_ */
-
+#endif /* GRASS_GMATH_H */

Modified: grass/trunk/include/gprojects.h
===================================================================
--- grass/trunk/include/gprojects.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gprojects.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -14,8 +14,8 @@
  *
  *****************************************************************************/
 
-#ifndef _GPROJECTS_H
-#define _GPROJECTS_H
+#ifndef GRASS_GPROJECTS_H
+#define GRASS_GPROJECTS_H
 
 #include <grass/config.h>
 #include <proj_api.h>
@@ -66,46 +66,6 @@
     double a, es, rf;
 };
 
-/* do_proj.c */
-int pj_do_proj(double *, double *, struct pj_info *, struct pj_info *);
-int pj_do_transform(int, double *, double *, double *,
-		    struct pj_info *, struct pj_info *);
-
-/* get_proj.c */
-int pj_get_kv(struct pj_info *, struct Key_Value *, struct Key_Value *);
-int pj_get_string(struct pj_info *, char *);
-int GPJ_get_equivalent_latlong(struct pj_info *, struct pj_info *);
-const char *set_proj_lib(const char *);
-int pj_print_proj_params(struct pj_info *, struct pj_info *);
-
-/* convert.c */
-#ifdef HAVE_OGR
-char *GPJ_grass_to_wkt(struct Key_Value *, struct Key_Value *, int, int);
-OGRSpatialReferenceH GPJ_grass_to_osr(struct Key_Value *, struct Key_Value *);
-int GPJ_wkt_to_grass(struct Cell_head *, struct Key_Value **,
-		     struct Key_Value **, const char *, int);
-int GPJ_osr_to_grass(struct Cell_head *, struct Key_Value **,
-		     struct Key_Value **, OGRSpatialReferenceH, int);
-const char *GPJ_set_csv_loc(const char *);
-#endif
-
-/* datum.c */
-int GPJ_get_datum_by_name(const char *, struct gpj_datum *);
-int GPJ_get_default_datum_params_by_name(const char *, char **);
-int GPJ_get_datum_params(char **, char **);
-int GPJ__get_datum_params(struct Key_Value *, char **, char **);
-void GPJ_free_datum(struct gpj_datum *);
-struct gpj_datum_transform_list *GPJ_get_datum_transform_by_name(const char *);
-void GPJ_free_datum_transform(struct gpj_datum_transform_list *);
-
-/* ellipse.c */
-int GPJ_get_ellipsoid_by_name(const char *, struct gpj_ellps *);
-int GPJ_get_ellipsoid_params(double *, double *, double *);
-int GPJ__get_ellipsoid_params(struct Key_Value *,
-			      double *, double *, double *);
-void GPJ_free_ellps(struct gpj_ellps *);
-
-
 /* PROJ.4's private datastructures copied from projects.h as removed
    from upstream; pending better solution. see:
    http://trac.osgeo.org/proj/ticket/98 */
@@ -126,8 +86,8 @@
 	double a, b;		/* max-min scale error */
 	int code;		/* info as to analytics, see following */
 };
-
-int pj_factors(LP, void *, double, struct FACTORS *);
 /* end of copy */
 
+#include <grass/defs/gprojects.h>
+
 #endif

Deleted: grass/trunk/include/gstypes.h
===================================================================
--- grass/trunk/include/gstypes.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gstypes.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,398 +0,0 @@
-/*!
-  \file include/gstypes.c
-
-  \brief OGSF header file (structures)
-
-  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 Bill Brown, USACERL (January 1993)
-  \author Thematic mapping enabled by Martin Landa <landa.martin gmail.com) (06/2011)
-
-  (C) 2011 by the GRASS Development Team
-*/
-
-#ifndef _GSTYPES_H
-#define _GSTYPES_H
-
-#include <grass/config.h>
-#include <grass/gsurf.h>
-#include <grass/bitmap.h>
-#if defined(OPENGL_X11) || defined(OPENGL_WINDOWS)
-#include <GL/gl.h>
-#endif
-#ifdef OPENGL_AQUA
-#include <OpenGL/gl.h>
-#endif
-
-/*#define TRACE_FUNCS */
-/*#define DEBUG */
-
-#define X 0
-#define Y 1
-#define Z 2
-#define W 3
-#define FROM 0
-#define TO 1
-
-/* colormodes */
-#define CM_COLOR               0
-#define CM_EMISSION            1
-#define CM_AMBIENT             2
-#define CM_DIFFUSE             3
-#define CM_SPECULAR            4
-#define CM_AD                  5
-#define CM_NULL                6
-
-#define CM_WIRE CM_COLOR
-
-#define NULL_COLOR 0xFFFFFF
-
-/* attribute sizes - NOT YET USED */
-#define GS_CHAR8      char
-#define GS_SHORT16   short
-#define GS_INT32       int
-
-/* attribute ***types*** */
-#define ATTY_NULL       32	/* internal use only */
-#define ATTY_MASK       16	/* can't use this one for numbytes */
-#define ATTY_FLOAT       8	/* can't use this one for numbytes */
-#define ATTY_INT         4
-#define ATTY_SHORT       2
-#define ATTY_CHAR        1
-#define ATTY_ANY        63	/* internal use only */
-#define LEGAL_TYPE(t)    \
-(t==ATTY_MASK || t==ATTY_FLOAT || t==ATTY_INT || t==ATTY_SHORT || t==ATTY_CHAR)
-
-#define MAXDIMS 4
-
-#define FUDGE(gs) ((gs->zmax_nz - gs->zmin_nz)/500.)
-#define DOT3( a, b )    ( (a)[X]*(b)[X] + (a)[Y]*(b)[Y] + (a)[Z]*(b)[Z] )
-
-/* changed flags for datasets */
-#define CF_NOT_CHANGED 0x000000
-#define CF_COLOR_PACKED 0x000001
-#define CF_USR_CHANGED 0x000010
-#define CF_CHARSCALED  0x000100
-
-#define MAX_TF 6
-
-#define MASK_TL 0x10000000
-#define MASK_TR 0x01000000
-#define MASK_BR 0x00100000
-#define MASK_BL 0x00010000
-#define MASK_NPTS 0x00000007
-
-#define OGSF_POINT 1
-#define OGSF_LINE  2
-#define OGSF_POLYGON 3
-
-#define RED_MASK 0x000000FF
-#define GRN_MASK 0x0000FF00
-#define BLU_MASK 0x00FF0000
-
-typedef float Point4[4];
-typedef float Point3[3];
-typedef float Point2[2];
-
-typedef struct
-{
-    float *fb;
-    int *ib;
-    short *sb;
-    unsigned char *cb;
-    struct BM *bm;
-    struct BM *nm;		/* null mask: set = null */
-    float (*tfunc) (float, int);
-    float k;
-} typbuff;
-
-typedef struct
-{				/* use hash table? */
-    int n_elem;			/* if n_elem == 256, index == NULL */
-    char *index;
-    int *value;
-} table256;
-
-typedef struct
-{				/* applied thusly: offset, mult, if(use_lookup) lookup */
-    float offset;
-    float mult;
-    int use_lookup;
-    table256 lookup;
-} transform;
-
-/* move this to dataset file? */
-typedef struct
-{
-    int data_id;
-    int dims[MAXDIMS];
-    int ndims;
-    int numbytes;
-    char *unique_name;
-    typbuff databuff;
-    IFLAG changed;
-    int need_reload;
-} dataset;
-
-/* maybe add transformation matrix? */
-typedef struct
-{
-    IFLAG att_src;		/* NOTSET_ATT, MAP_ATT, CONST_ATT, FUNC_ATT */
-    IFLAG att_type;		/* ATTY_INT, ATTY_SHORT, ATTY_CHAR, or ATTY_FLOAT */
-    int hdata;			/* handle to dataset */
-    int (*user_func) ();
-    float constant;
-    int *lookup;		/* TODO: use transform instead */
-    float min_nz, max_nz, range_nz;
-    float default_null;
-} gsurf_att;
-
-typedef struct g_surf
-{
-    int gsurf_id;
-    int cols, rows;
-    gsurf_att att[MAX_ATTS];	/* mask, topo, color, etc. */
-    IFLAG draw_mode;		/*DM_GOURAUD | DM_FRINGE | DM_POLY, DM_WIRE, DM_WIRE_POLY */
-    long wire_color;		/* 0xBBGGRR or WC_COLOR_ATT */
-    double ox, oy;		/* real world origin (i.e., SW corner) */
-    double xres, yres;
-    float z_exag;
-    float x_trans, y_trans, z_trans;
-    float xmin, xmax, ymin, ymax, zmin, zmax, zminmasked;
-    float xrange, yrange, zrange;
-    float zmin_nz, zmax_nz, zrange_nz;
-    int x_mod, y_mod, x_modw, y_modw;	/*cells per viewcell, per wire viewcell */
-    int nz_topo, nz_color;	/* no zero flags */
-    int mask_needupdate, norm_needupdate;
-    unsigned long *norms;
-    struct BM *curmask;
-    struct g_surf *next;
-    void *clientdata;
-} geosurf;
-
-/* maybe put attribute info here instead of in geovect - allow a single
-   vector file to have multiple attributes ?   Cached lines should
-   usually be stored as 2d, since they may be draped on multiple
-   surfaces & Z will vary depending upon surface. */
-
-/* Struct for vector feature displaying attributes */
-typedef struct g_vect_style
-{
-    int color; 		 /* Line color */
-    int symbol;		 /* Point symbol/line type */
-    float size;		 /* Symbol size. Unset for lines. */
-    int width;		 /* Line width. Also used for lines forming symbols i.e. X */
-    
-    /*TODO:fill;	 Area fill pattern */
-    /*TODO:falpha;	 Area fill transparency */
-    /*TODO:lalpha;	 Line/boundary/point transparency */
-    /*TODO:struct *orientation;  Symbol orientation */
-    struct g_vect_style *next; /* Point to next gvstyle struct if single point has multiple styles.
-				  In such case feature with next style should be shifted. */
-} gvstyle;
-
-/* Struct for vector map (thematic mapping) */
-typedef struct g_vect_style_thematic
-{
-    int active;
-    int layer;
-    
-    char *color_column;  
-    char *symbol_column; 
-    char *size_column;
-    char *width_column;
-} gvstyle_thematic;
-
-/* Line instance */
-typedef struct g_line
-{
-    int type;
-    float norm[3];
-    int dims, npts;
-    Point3 *p3;
-    Point2 *p2;
-    
-    struct line_cats *cats;	/* Store information about all layers/cats for thematic display */
-    gvstyle *style;	/* Line instance look&feel */
-    signed char highlighted; /* >0 Feature is highlighted */
-    
-    struct g_line *next;
-} geoline;
-
-/* Vector map (lines) */
-typedef struct g_vect
-{
-    int gvect_id;
-    int use_mem, n_lines;
-    int drape_surf_id[MAX_SURFS];	/* if you want 'em flat, define the surface */
-    int flat_val;
-    int n_surfs;
-    char *filename;
-    float x_trans, y_trans, z_trans;
-    /* also maybe center & rotate? */
-    geoline *lines;
-    geoline *fastlines;
-    int (*bgn_read) (), (*end_read) (), (*nxt_line) ();
-    struct g_vect *next;
-    void *clientdata;
-  
-    gvstyle_thematic *tstyle;  /* thematic mapping */
-    gvstyle *style;	/* Vector default look&feel */
-    gvstyle *hstyle;	/* IMHO highlight should be per layer basis. */
-} geovect;
-
-/* Point instance */
-typedef struct g_point
-{
-    int dims;
-    Point3 p3;
-    
-    struct line_cats *cats;	/* Store information about all layers/cats for thematic display */
-    gvstyle *style;
-    signed char highlighted;    /* >0 Feature is highlighted */
-
-    struct g_point *next;
-} geopoint;
-
-/* Vector map (points) */
-typedef struct g_site
-{
-    int gsite_id;
-    int drape_surf_id[MAX_SURFS];	/* ditto */
-    int n_surfs, n_sites;
-    int use_z, use_mem;
-    int has_z;		/* set when file loaded */
-
-    char *filename;
-    transform attr_trans;
-    float x_trans, y_trans, z_trans;
-    geopoint *points;
-    int (*bgn_read) (), (*end_read) (), (*nxt_site) ();
-    struct g_site *next;
-    void *clientdata;
-    
-    gvstyle_thematic *tstyle;  /* thematic mapping */
-    gvstyle *style; 	       /* points default look&feel */
-    gvstyle *hstyle;	       /* IMHO highlight should be per layer basis */
-} geosite;
-
-typedef struct
-{
-    int data_id;		/* id */
-    IFLAG file_type;		/* file type */
-    unsigned int count;		/* number of referencies to this file */
-    char *file_name;		/* file name */
-
-    IFLAG data_type;
-    void *map;			/* pointer to volume file descriptor */
-    double min, max;		/* minimum, maximum value in file */
-
-    IFLAG status;		/* current status */
-    IFLAG mode;			/* current read mode */
-
-    void *buff;			/* data buffer */
-} geovol_file;
-
-typedef struct
-{
-    IFLAG att_src;
-
-    int hfile;
-    int (*user_func) ();
-    float constant;
-
-    void *att_data;
-    int changed;
-} geovol_isosurf_att;
-
-typedef struct
-{
-    int inout_mode;
-    geovol_isosurf_att att[MAX_ATTS];
-
-    int data_desc;
-    unsigned char *data;
-} geovol_isosurf;
-
-typedef struct
-{
-    int dir;
-    float x1, x2, y1, y2, z1, z2;
-    unsigned char *data;
-    int changed;
-
-    int mode, transp;
-} geovol_slice;
-
-typedef struct g_vol
-{
-    int gvol_id;
-    struct g_vol *next;
-
-    int hfile;
-    int cols, rows, depths;
-    double ox, oy, oz;
-    double xres, yres, zres;
-    double xmin, xmax, ymin, ymax, zmin, zmax;
-    double xrange, yrange, zrange;
-    float x_trans, y_trans, z_trans;
-
-    int n_isosurfs;
-    geovol_isosurf *isosurf[MAX_ISOSURFS];
-    int isosurf_x_mod, isosurf_y_mod, isosurf_z_mod;
-    IFLAG isosurf_draw_mode;
-
-    int n_slices;
-    geovol_slice *slice[MAX_SLICES];
-    int slice_x_mod, slice_y_mod, slice_z_mod;
-    IFLAG slice_draw_mode;
-
-    void *clientdata;
-} geovol;
-
-struct lightdefs
-{
-    float position[4];		/* X, Y, Z, (1=local/0=inf) */
-    float color[3];		/* R, G, B */
-    float ambient[3];		/* R, G, B */
-    float emission[3];		/* R, G, B */
-    float shine;		/* 0. to 128. */
-};
-
-struct georot
-{
-    int do_rot;			/* do rotation */
-    double rot_angle;		/* rotation angle */
-    double rot_axes[3];		/* rotation axis */
-    GLdouble rotMatrix[16];	/* rotation matrix */
-};
-
-typedef struct
-{
-    int coord_sys;		/* latlon, equal area, etc */
-    int view_proj;		/* perspective, ortho */
-    int infocus;		/* fixed center of view - true or false */
-    float from_to[2][4];
-    struct georot rotate;
-    int twist, fov, incl, look;	/* 10ths of degrees */
-    float real_to[4], vert_exag;	/* a global Z exag */
-    float scale;
-    struct lightdefs lights[MAX_LIGHTS];
-} geoview;
-
-typedef struct
-{				/* need to add elements here for off_screen drawing */
-    float nearclip, farclip, aspect;
-    short left, right, bottom, top;	/* Screen coordinates */
-    int bgcol;
-} geodisplay;
-
-extern void (*Cxl_func) ();
-extern void (*Swap_func) ();
-
-/* Bring all the function prototypes */
-#include "ogsf_proto.h"
-
-#endif /* _GSTYPES_H */

Deleted: grass/trunk/include/gsurf.h
===================================================================
--- grass/trunk/include/gsurf.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/gsurf.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,121 +0,0 @@
-/*!
-   \file include/gsurf.h
-
-   \brief OGSF library - main header
-
-   (C) 1999-2008, 2011 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 Bill Brown USACERL (January 1993)
- */
-
-#ifndef _GSURF_H
-#define _GSURF_H
-
-#define GS_UNIT_SIZE 1000.
-
-#define BETWEEN(x, a, b) (((x) > (a) && (x) < (b)) || ((x) > (b) && (x) < (a)))
-#define GS_NEAR_EQUAL(x, y, ratio) ((x) == (y) || ((x) == 0.0? \
-            GS_BETWEEN((x), (y)+(y)*(ratio), (y)-(y)*(ratio)):\
-            GS_BETWEEN((y), (x)+(x)*(ratio), (x)-(x)*(ratio))))
-
-/* current maximums */
-#define MAX_SURFS      12
-#define MAX_VECTS      50
-#define MAX_SITES      50
-#define MAX_VOLS       12	/* should match MAX_VOL_FILES below ? */
-#define MAX_DSP        12
-#define MAX_ATTS        7
-#define MAX_LIGHTS      3
-#define MAX_CPLANES     6
-#define MAX_ISOSURFS   12
-#define MAX_SLICES     12
-
-/* for gvl_file.c */
-#define MAX_VOL_SLICES         4
-#define MAX_VOL_FILES        100
-
-/* surface display modes */
-#define DM_GOURAUD   0x00000100
-#define DM_FLAT      0x00000200	/* defined for symmetry */
-
-#define DM_FRINGE    0x00000010
-
-#define DM_WIRE      0x00000001
-#define DM_COL_WIRE  0x00000002
-#define DM_POLY      0x00000004
-#define DM_WIRE_POLY 0x00000008
-
-#define DM_GRID_WIRE 0x00000400
-#define DM_GRID_SURF 0x00000800
-
-#define WC_COLOR_ATT 0xFF000000
-
-#define IFLAG unsigned int
-
-/* surface attribute ***descriptors***  */
-#define ATT_NORM      0		/* library use only */
-#define ATT_TOPO      1
-#define ATT_COLOR     2
-#define ATT_MASK      3
-#define ATT_TRANSP    4
-#define ATT_SHINE     5
-#define ATT_EMIT      6
-#define LEGAL_ATT(a) (a >= 0 && a < MAX_ATTS)
-
-/* surface attribute **sources**  */
-#define NOTSET_ATT   0
-#define MAP_ATT      1
-#define CONST_ATT    2
-#define FUNC_ATT     3
-#define LEGAL_SRC(s) (s==NOTSET_ATT||s==MAP_ATT||s==CONST_ATT||s==FUNC_ATT)
-
-/* site markers */
-#define ST_X          1
-#define ST_BOX        2
-#define ST_SPHERE     3
-#define ST_CUBE       4
-#define ST_DIAMOND    5
-#define ST_DEC_TREE   6
-#define ST_CON_TREE   7
-#define ST_ASTER      8
-#define ST_GYRO       9
-#define ST_HISTOGRAM  10
-
-/* Buffer modes */
-#define GSD_FRONT 1
-#define GSD_BACK  2
-#define GSD_BOTH  3
-
-/* fence colormodes */
-#define FC_OFF           0
-#define FC_ABOVE         1
-#define FC_BELOW         2
-#define FC_BLEND         3
-#define FC_GREY          4
-
-/* legend types */
-#define LT_DISCRETE      0x00000100
-#define LT_CONTINUOUS    0x00000200
-
-#define LT_LIST          0x00000010
-/* list automatically discrete */
-
-#define LT_RANGE_LOWSET  0x00000001
-#define LT_RANGE_HISET   0x00000002
-#define LT_RANGE_LOW_HI  0x00000003
-#define LT_INVERTED      0x00000008
-
-#define LT_SHOW_VALS     0x00001000
-#define LT_SHOW_LABELS   0x00002000
-
-/* types of volume files */
-#define VOL_FTYPE_RASTER3D        0
-
-/* types of volume values */
-#define VOL_DTYPE_FLOAT     0
-#define VOL_DTYPE_DOUBLE    1
-
-#endif /* _GSURF_H */

Modified: grass/trunk/include/ibtree.h
===================================================================
--- grass/trunk/include/ibtree.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/ibtree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_IBTREE_H
+#define GRASS_IBTREE_H
+
 typedef struct
 {
     int key;
@@ -16,12 +19,6 @@
     int (*cmp) ();		/* routine to compare keys */
 } IBTREE;
 
-int ibtree_create(IBTREE *, int (*)(), int);
-int ibtree_find(IBTREE *, int, int *);
-int ibtree_free(IBTREE *);
-int ibtree_next(IBTREE *, int *, int *);
-int ibtree_rewind(IBTREE *);
-int Btree_init();
-int Btree_add(int);
-int Btree_report();
-int ibtree_update(IBTREE *, int, int);
+#include <grass/defs/ibtree.h>
+
+#endif

Modified: grass/trunk/include/icon.h
===================================================================
--- grass/trunk/include/icon.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/icon.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,8 +1,8 @@
 #ifndef GRASS_ICON_H
+#define GRASS_ICON_H
 #ifndef _STDIO_H
 #include <stdio.h>
 #endif
-#define GRASS_ICON_H
 
 #define ICON struct _icon
 struct _icon
@@ -14,14 +14,6 @@
     char **map;
 };
 
-char *ask_icon_any(char *, char *, int);
-char *ask_icon_new(char *, char *);
-char *ask_icon_old(char *, char *);
-int get_icon(char *, char *, ICON *);
-int get_default_icon(ICON *);
-int put_icon(char *, ICON *);
-int read_icon(FILE *, ICON *);
-int release_icon(ICON *);
-int scale_icon(ICON *, ICON *, float);
-int write_icon(FILE *, ICON *, int);
+#include <grass/defs/icon.h>
+
 #endif

Deleted: grass/trunk/include/imagedefs.h
===================================================================
--- grass/trunk/include/imagedefs.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/imagedefs.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,118 +0,0 @@
-#ifndef GRASS_IMAGEDEFS_H
-#define GRASS_IMAGEDEFS_H
-
-/* alloc.c */
-void *I_malloc(size_t);
-void *I_realloc(void *, size_t);
-int I_free(void *);
-double **I_alloc_double2(int, int);
-int *I_alloc_int(int);
-int **I_alloc_int2(int, int);
-int I_free_int2(int **);
-int I_free_double2(double **);
-double ***I_alloc_double3(int, int, int);
-int I_free_double3(double ***);
-
-/* eol.c */
-int I_get_to_eol(char *, int, FILE *);
-
-/* find.c */
-int I_find_group(const char *);
-int I_find_group_file(const char *, const char *);
-int I_find_subgroup(const char *, const char *);
-int I_find_subgroup_file(const char *, const char *, const char *);
-
-/* fopen.c */
-FILE *I_fopen_group_file_new(const char *, const char *);
-FILE *I_fopen_group_file_append(const char *, const char *);
-FILE *I_fopen_group_file_old(const char *, const char *);
-FILE *I_fopen_subgroup_file_new(const char *, const char *, const char *);
-FILE *I_fopen_subgroup_file_append(const char *, const char *, const char *);
-FILE *I_fopen_subgroup_file_old(const char *, const char *, const char *);
-
-/* georef.c */
-int I_compute_georef_equations(struct Control_Points *, double[3], double[3],
-			       double[3], double[3]);
-int I_georef(double, double, double *, double *, double[3], double[3]);
-
-/* group.c */
-int I_get_group(char *);
-int I_put_group(const char *);
-int I_get_subgroup(const char *, char *);
-int I_put_subgroup(const char *, const char *);
-int I_get_group_ref(const char *, struct Ref *);
-int I_get_subgroup_ref(const char *, const char *, struct Ref *);
-int I_init_ref_color_nums(struct Ref *);
-int I_put_group_ref(const char *, const struct Ref *);
-int I_put_subgroup_ref(const char *, const char *, const struct Ref *);
-int I_add_file_to_group_ref(const char *, const char *, struct Ref *);
-int I_transfer_group_ref_file(const struct Ref *, int, struct Ref *);
-int I_init_group_ref(struct Ref *);
-int I_free_group_ref(struct Ref *);
-
-/* list_gp.c */
-int I_list_group(const char *, const struct Ref *, FILE *);
-int I_list_group_simple(const struct Ref *, FILE *);
-
-/* list_subgp.c */
-int I_list_subgroup(const char *, const char *, const struct Ref *, FILE *);
-int I_list_subgroup_simple(const struct Ref *, FILE *);
-
-/* loc_info.c */
-char *I_location_info(const char *);
-
-/* points.c */
-int I_new_control_point(struct Control_Points *, double, double, double,
-			double, int);
-int I_get_control_points(const char *, struct Control_Points *);
-int I_put_control_points(const char *, const struct Control_Points *);
-
-/* ref.c */
-FILE *I_fopen_group_ref_new(const char *);
-FILE *I_fopen_group_ref_old(const char *);
-FILE *I_fopen_subgroup_ref_new(const char *, const char *);
-FILE *I_fopen_subgroup_ref_old(const char *, const char *);
-
-/* sig.c */
-int I_init_signatures(struct Signature *, int);
-int I_new_signature(struct Signature *);
-int I_free_signatures(struct Signature *);
-int I_read_one_signature(FILE *, struct Signature *);
-int I_read_signatures(FILE *, struct Signature *);
-int I_write_signatures(FILE *, struct Signature *);
-
-/* sigfile.c */
-FILE *I_fopen_signature_file_new(const char *, const char *, const char *);
-FILE *I_fopen_signature_file_old(const char *, const char *, const char *);
-
-/* sigset.c */
-int I_SigSetNClasses(struct SigSet *);
-struct ClassData *I_AllocClassData(struct SigSet *, struct ClassSig *, int);
-int I_InitSigSet(struct SigSet *);
-int I_SigSetNBands(struct SigSet *, int);
-struct ClassSig *I_NewClassSig(struct SigSet *);
-struct SubSig *I_NewSubSig(struct SigSet *, struct ClassSig *);
-int I_ReadSigSet(FILE *, struct SigSet *);
-int I_SetSigTitle(struct SigSet *, const char *);
-const char *I_GetSigTitle(const struct SigSet *);
-int I_SetClassTitle(struct ClassSig *, const char *);
-const char *I_GetClassTitle(const struct ClassSig *);
-int I_WriteSigSet(FILE *, const struct SigSet *);
-
-/* sigsetfile.c */
-FILE *I_fopen_sigset_file_new(const char *, const char *, const char *);
-FILE *I_fopen_sigset_file_old(const char *, const char *, const char *);
-
-/* target.c */
-int I_get_target(const char *, char *, char *);
-int I_put_target(const char *, const char *, const char *);
-
-/* title.c */
-int I_get_group_title(const char *, char *, int);
-int I_put_group_title(const char *, const char *);
-
-/* var.c */
-double I_variance(double, double, int);
-double I_stddev(double, double, int);
-
-#endif

Modified: grass/trunk/include/imagery.h
===================================================================
--- grass/trunk/include/imagery.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/imagery.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -109,6 +109,6 @@
 #define GROUPFILE "CURGROUP"
 #define SUBGROUPFILE "CURSUBGROUP"
 
-#include <grass/imagedefs.h>
+#include <grass/defs/imagery.h>
 
 #endif

Deleted: grass/trunk/include/keyframe.h
===================================================================
--- grass/trunk/include/keyframe.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/keyframe.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,27 +0,0 @@
-#ifndef _KEYFRAME_H
-#define _KEYFRAME_H
-
-/* these have to be 1 << KF_id_index */
-
-#define KF_FROMX_MASK	0x00000001
-#define KF_FROMY_MASK	0x00000002
-#define KF_FROMZ_MASK	0x00000004
-#define KF_FROM_MASK	0x00000007
-
-#define KF_DIRX_MASK	0x00000008
-#define KF_DIRY_MASK	0x00000010
-#define KF_DIRZ_MASK	0x00000020
-#define KF_DIR_MASK	0x00000038
-
-#define KF_FOV_MASK	0x00000040
-#define KF_TWIST_MASK	0x00000080
-
-#define KF_ALL_MASK	0x000000FF
-
-#define KF_NUMFIELDS 8
-
-#define KF_LINEAR 111
-#define KF_SPLINE 222
-#define KF_LEGAL_MODE(m) (m == KF_LINEAR || m == KF_SPLINE)
-
-#endif /* _KEYFRAME_H */

Deleted: grass/trunk/include/kftypes.h
===================================================================
--- grass/trunk/include/kftypes.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/kftypes.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,36 +0,0 @@
-#ifndef _KFTYPES_H
-#define _KFTYPES_H
-
-#ifndef _KEYFRAME_H
-#include <grass/keyframe.h>
-#endif
-
-#define KF_FROMX 0
-#define KF_FROMY 1
-#define KF_FROMZ 2
-#define KF_DIRX 3
-#define KF_DIRY 4
-#define KF_DIRZ 5
-#define KF_FOV 6
-#define KF_TWIST 7
-
-#define FM_VECT 0x00000001
-#define FM_SITE 0x00000002
-#define FM_PATH 0x00000004
-#define FM_VOL  0x00000008
-#define FM_LABEL 0x00000010
-
-typedef struct view_node
-{
-    float fields[KF_NUMFIELDS];
-} Viewnode;
-
-typedef struct key_node
-{
-    float pos, fields[KF_NUMFIELDS];
-    int look_ahead;
-    unsigned long fieldmask;
-    struct key_node *next, *prior;
-} Keylist;
-
-#endif /* _KFTYPES_H */

Modified: grass/trunk/include/la.h
===================================================================
--- grass/trunk/include/la.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/la.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -13,8 +13,8 @@
  * \date 2000-2007
  */
 
-#ifndef LA_H_
-#define LA_H_
+#ifndef GRASS_LA_H
+#define GRASS_LA_H
 
 /* QUESTION: On some systems there appears to be no default link
    to this. Do we create a symlink to
@@ -143,54 +143,6 @@
 
 typedef mat_struct vec_struct;
 
+#include <grass/defs/la.h>
 
-/* Prototypes */
-
-/* Matrix routines corresponding to BLAS Level III */
-
-mat_struct *G_matrix_init(int, int, int);
-int G_matrix_zero(mat_struct *);
-int G_matrix_set(mat_struct *, int, int, int);
-mat_struct *G_matrix_copy(const mat_struct *);
-mat_struct *G_matrix_add(mat_struct *, mat_struct *);
-mat_struct *G_matrix_subtract(mat_struct *, mat_struct *);
-mat_struct *G_matrix_scale(mat_struct *, const double);
-mat_struct *G__matrix_add(mat_struct *, mat_struct *, const double,
-			  const double);
-mat_struct *G_matrix_product(mat_struct *, mat_struct *);
-mat_struct *G_matrix_transpose(mat_struct *);
-int G_matrix_LU_solve(const mat_struct *, mat_struct **, const mat_struct *,
-		      mat_type);
-mat_struct *G_matrix_inverse(mat_struct *);
-void G_matrix_free(mat_struct *);
-void G_matrix_print(mat_struct *);
-int G_matrix_set_element(mat_struct *, int, int, double);
-double G_matrix_get_element(mat_struct *, int, int);
-
-
-/* Matrix-vector routines corresponding to BLAS Level II */
-
-vec_struct *G_matvect_get_column(mat_struct *, int);
-vec_struct *G_matvect_get_row(mat_struct *, int);
-int G_matvect_extract_vector(mat_struct *, vtype, int);
-int G_matvect_retrieve_matrix(vec_struct *);
-
-
-/* Vector routines corresponding to BLAS Level I */
-
-vec_struct *G_vector_init(int, int, vtype);
-int G_vector_set(vec_struct *, int, int, vtype, int);
-double G_vector_norm_euclid(vec_struct *);
-double G_vector_norm_maxval(vec_struct *, int);
-vec_struct *G_vector_copy(const vec_struct *, int);
-
-/* Matrix and vector routines corresponding to ?? */
-
-void G_vector_free(vec_struct *);
-vec_struct *G_vector_sub(vec_struct *, vec_struct *, vec_struct *);
-double G_vector_norm1(vec_struct *);
-int G_matrix_read(FILE *, mat_struct *);
-int G_matrix_stdin(mat_struct *);
-int G_matrix_eigen_sort(vec_struct *, mat_struct *);
-
-#endif /* LA_H_ */
+#endif /* GRASS_LA_H */

Modified: grass/trunk/include/libtrans.h
===================================================================
--- grass/trunk/include/libtrans.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/libtrans.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,27 +1,11 @@
-#ifndef __LIBTRANS_H__
-#define __LIBTRANS_H__
+#ifndef GRASS_LIBTRANS_H
+#define GRASS_LIBTRANS_H
 
 /* to give the size of the multi-dim array parameter is necessary here,
    because DEC's cc V5.6-079 on Digital UNIX V4.0 (Rev. 878) seems to need it
  */
 #define DIM_matrix 3
 
-/* inverse.c */
-int inverse(double[DIM_matrix][DIM_matrix]);
-int isnull(double[DIM_matrix][DIM_matrix]);
+#include <grass/defs/libtrans.h>
 
-/* m_mult.c */
-int m_mult(double[DIM_matrix][DIM_matrix], double *, double *);
-
-/* transform.c */
-int compute_transformation_coef(double *, double *, double *, double *, int *,
-				int);
-int transform_a_into_b(double, double, double *, double *);
-int transform_b_into_a(double, double, double *, double *);
-int residuals_a_predicts_b(double *, double *, double *, double *, int *, int,
-			   double *, double *);
-int residuals_b_predicts_a(double *, double *, double *, double *, int *, int,
-			   double *, double *);
-int print_transform_matrix(void);
-
-#endif /* __LIBTRANS_H__ */
+#endif /* GRASS_LIBTRANS_H */

Modified: grass/trunk/include/linkm.h
===================================================================
--- grass/trunk/include/linkm.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/linkm.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,26 +20,6 @@
     int exit_flag;		/* exit on error ? */
 };
 
-#endif
+#include <grass/defs/linkm.h>
 
-/* destroy.c */
-void link_destroy(struct link_head *, VOID_T *);
-
-/* dispose.c */
-void link_dispose(struct link_head *, VOID_T *);
-
-/* init.c */
-void link_set_chunk_size(int);
-void link_exit_on_error(int);
-struct link_head *link_init(int);
-void link_cleanup(struct link_head *);
-
-/* new.c */
-struct link_head *link_new(struct link_head *);
-
-/* next.c */
-VOID_T *link__get_next(VOID_T *);
-void link__set_next(VOID_T *, VOID_T *);
-
-/* oom.c */
-int link_out_of_memory(void);
+#endif

Modified: grass/trunk/include/lock.h
===================================================================
--- grass/trunk/include/lock.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/lock.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,2 +1,7 @@
+#ifndef GRASS_LOCK_H
+#define GRASS_LOCK_H
+
 int lock_file(char *, int);
 int unlock_file(char *);
+
+#endif

Modified: grass/trunk/include/manage.h
===================================================================
--- grass/trunk/include/manage.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/manage.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,46 +20,6 @@
 
 #include <grass/gis.h>
 
-/* add_elem.c */
-void M__add_element(const char *, const char *);
+#include <grass/defs/manage.h>
 
-/* do_copy.c */
-int M_do_copy(int, const char *, const char *, const char *);
-
-/* do_list.c */
-void M_do_list(int, const char *);
-
-/* do_remove.c */
-int M_do_remove(int, const char *);
-
-/* do_rename.c */
-int M_do_rename(int, const char *, const char *);
-
-/* empty.c */
-int M__empty(char *);
-
-/* find.c */
-const char *M_find(int, char *, const char *);
-
-/* get_len.c */
-int M__get_description_len(int);
-
-/* list.c */
-int M_get_element(const char *);
-const struct list *M_get_list(int);
-
-/* read_list.c */
-int M_read_list(int, int *);
-
-/* option.c */
-struct Option* M_define_option(int, const char *, int);
-const char *M_get_options(int);
-const char *M_get_option_desc(int);
-
-/* show_elem.c */
-void M_show_elements(void);
-
-/* sighold.c */
-int M__hold_signals(int);
-
 #endif

Modified: grass/trunk/include/neta.h
===================================================================
--- grass/trunk/include/neta.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/neta.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,8 +15,8 @@
  *
  ****************************************************************/
 
-#ifndef _NETA_H_
-#define _NETA_H_
+#ifndef GRASS_NETA_H
+#define GRASS_NETA_H
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -26,89 +26,6 @@
 #include <grass/glocale.h>
 #include <grass/dgl/graph.h>
 
-/*bridge.c */
-int NetA_compute_bridges(dglGraph_s * graph, struct ilist *bridge_list);
-int NetA_articulation_points(dglGraph_s * graph,
-			     struct ilist *articulation_list);
+#include <grass/defs/neta.h>
 
-/*components.c */
-int NetA_weakly_connected_components(dglGraph_s * graph, int *component);
-int NetA_strongly_connected_components(dglGraph_s * graph, int *component);
-
-/*spanningtree.c */
-int NetA_spanning_tree(dglGraph_s * graph, struct ilist *tree_list);
-
-/*allpairs.c */
-int NetA_allpairs(dglGraph_s * graph, dglInt32_t ** dist);
-
-/*neta_flow.c */
-int NetA_flow(dglGraph_s * graph, struct ilist *source_list,
-	      struct ilist *sink_list, int *flow);
-int NetA_min_cut(dglGraph_s * graph, struct ilist *source_list,
-		 struct ilist *sink_list, int *flow, struct ilist *cut);
-int NetA_split_vertices(dglGraph_s * in, dglGraph_s * out, int *node_costs);
-
-/*utils.c */
-void NetA_add_point_on_node(struct Map_info *In, struct Map_info *Out, int node,
-			    struct line_cats *Cats);
-void NetA_points_to_nodes(struct Map_info *In, struct ilist *point_list);
-int NetA_get_node_costs(struct Map_info *In, int layer, char *column,
-			int *node_costs);
-void NetA_varray_to_nodes(struct Map_info *map, struct varray * varray,
-			  struct ilist *nodes, int *nodes_to_features);
-int NetA_initialise_varray(struct Map_info *In, int layer, int mask_type,
-			   char *where, char *cat, struct varray ** varray);
-/*centrality.c */
-void NetA_degree_centrality(dglGraph_s * graph, double *degree);
-int NetA_eigenvector_centrality(dglGraph_s * graph, int iterations,
-				double error, double *eigenvector);
-int NetA_betweenness_closeness(dglGraph_s * graph, double *betweenness,
-			       double *closeness);
-
-/*path.c */
-int NetA_distance_from_points(dglGraph_s * graph, struct ilist *from, int *dst,
-			      dglInt32_t ** prev);
-int NetA_find_path(dglGraph_s * graph, int from, int to, int *edges,
-		   struct ilist *list);
-
-/*timetables.c */
-
-/*Structure containing all information about a timetable.
- * Everything in indexed from 0.
- */
-typedef struct
-{
-    int routes;			/*Number of different routes. Two routes are different even if they differ only in time. */
-    int *route_length;		/*Length of each route, i.e., number of stops */
-    int **route_stops;		/*list of stops on each route in order (time increases) */
-    int **route_times;		/*stop arrival times on overy route. Stops are given in the same order as above */
-    int stops;			/*number of stops */
-    int *stop_length;		/*Number of routes stopping at each stop */
-    int **stop_routes;		/*List of routes for each stop. Routes are in increasing order */
-    int **stop_times;		/*arrival times of routes for each stop. Routes are given in the same order as above */
-    int *walk_length;		/*number of stops with "walking connection" for each stop */
-    int **walk_stops;		/*list of stops within walking distance for each stop */
-    int **walk_times;		/*walking times between stops as given above */
-} neta_timetable;
-
-typedef struct
-{
-    int **dst;
-    int **prev_stop;
-    int **prev_route;
-    int **prev_conn;
-    int rows, routes;
-} neta_timetable_result;
-int NetA_init_timetable_from_db(struct Map_info *In, int route_layer,
-				int walk_layer, char *route_id, char *times,
-				char *to_stop, char *walk_length,
-				neta_timetable * timetable, int **route_ids,
-				int **stop_ids);
-int NetA_timetable_shortest_path(neta_timetable * timetable, int from_stop,
-				 int to_stop, int start_time, int min_change,
-				 int max_changes, int walking_change,
-				 neta_timetable_result * result);
-int NetA_timetable_get_route_time(neta_timetable * timetable, int stop,
-				  int route);
-void NetA_timetable_result_release(neta_timetable_result * result);
 #endif

Modified: grass/trunk/include/nviz.h
===================================================================
--- grass/trunk/include/nviz.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/nviz.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -33,8 +33,7 @@
 #  error Unsupported platform, or confused platform defines...
 #endif
 
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #define MAP_OBJ_UNDEFINED 0
 #define MAP_OBJ_SURF 1
@@ -144,105 +143,6 @@
 #endif
 };
 
-/* change_view.c */
-int Nviz_resize_window(int, int);
-int Nviz_update_ranges(nv_data *);
-int Nviz_set_viewpoint_position(double, double);
-int Nviz_set_viewpoint_height(double);
-int Nviz_set_viewpoint_persp(int);
-int Nviz_set_viewpoint_twist(int);
-int Nviz_change_exag(nv_data *, double);
-int Nviz_look_here(double, double);
-void Nviz_get_modelview(double *);
-void Nviz_set_rotation(double, double, double, double);
-void Nviz_unset_rotation(void);
-void Nviz_init_rotation(void);
-void Nviz_flythrough(nv_data *, float *, int *, int);
+#include <grass/defs/nviz.h>
 
-/* cplanes_obj.c */
-int Nviz_new_cplane(nv_data *, int);
-int Nviz_on_cplane(nv_data *, int);
-int Nviz_off_cplane(nv_data *, int);
-int Nviz_draw_cplane(nv_data *, int, int);
-int Nviz_num_cplanes(nv_data *);
-int Nviz_get_current_cplane(nv_data *);
-int Nviz_set_cplane_rotation(nv_data *, int, float, float, float);
-int Nviz_get_cplane_rotation(nv_data *, int, float *, float *, float *);
-int Nviz_set_cplane_translation(nv_data *, int, float, float, float);
-int Nviz_get_cplane_translation(nv_data *, int, float *, float *, float *);
-int Nviz_set_fence_color(nv_data *, int);
-int Nviz_set_cplane_here(nv_data *, int, float, float);
-
-
-/* draw.c */
-int Nviz_draw_all_surf(nv_data *);
-int Nviz_draw_all_vect();
-int Nviz_draw_all_site();
-int Nviz_draw_all_vol();
-int Nviz_draw_all(nv_data *);
-int Nviz_draw_quick(nv_data *, int);
-int Nviz_load_image(GLubyte *, int, int, int);
-void Nviz_draw_image(int, int, int, int, int);
-void Nviz_set_2D(int, int);
-void Nviz_del_texture(int);
-void Nviz_get_max_texture(int *);
-
-/* exag.c */
-int Nviz_get_exag_height(double *, double *, double *);
-double Nviz_get_exag();
-
-/* lights.c */
-int Nviz_set_light_position(nv_data *, int, double, double, double, double);
-int Nviz_set_light_bright(nv_data *, int, double);
-int Nviz_set_light_color(nv_data *, int, int, int, int);
-int Nviz_set_light_ambient(nv_data *, int, double);
-int Nviz_init_light(nv_data *, int);
-int Nviz_new_light(nv_data *);
-void Nviz_draw_model(nv_data *);
-
-/* map_obj.c */
-int Nviz_new_map_obj(int, const char *, double, nv_data *);
-int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *);
-void Nviz_set_surface_attr_default();
-int Nviz_set_vpoint_attr_default();
-int Nviz_set_volume_attr_default();
-int Nviz_unset_attr(int, int, int);
-
-/* nviz.c */
-void Nviz_init_data(nv_data *);
-void Nviz_destroy_data(nv_data *);
-void Nviz_set_bgcolor(nv_data *, int);
-int Nviz_get_bgcolor(nv_data *);
-int Nviz_color_from_str(const char *);
-struct fringe_data *Nviz_new_fringe(nv_data *, int, unsigned long,
-				    double, int, int, int, int);
-struct fringe_data *Nviz_set_fringe(nv_data *, int, unsigned long,
-				    double, int, int, int, int);
-void Nviz_draw_fringe(nv_data *data);
-int Nviz_draw_arrow(nv_data *);
-int Nviz_set_arrow(nv_data *, int, int, float, unsigned int);
-void Nviz_delete_arrow(nv_data *);
-struct scalebar_data * Nviz_new_scalebar(nv_data *, int, float *, float, unsigned int);
-struct scalebar_data * Nviz_set_scalebar(nv_data *, int , int, int, float, unsigned int);
-void Nviz_draw_scalebar(nv_data *);
-void Nviz_delete_scalebar(nv_data *, int);
-
-/* position.c */
-void Nviz_init_view(nv_data *);
-int Nviz_set_focus_state(int);
-int Nviz_set_focus_map(int, int);
-int Nviz_has_focus(nv_data *);
-int Nviz_set_focus(nv_data *, float, float, float);
-int Nviz_get_focus(nv_data *, float *, float *, float *);
-float Nviz_get_xyrange(nv_data *);
-int Nviz_get_zrange(nv_data *, float *, float *);
-float Nviz_get_longdim(nv_data *);
-
-/* render.c */
-struct render_window *Nviz_new_render_window();
-void Nviz_init_render_window(struct render_window *);
-void Nviz_destroy_render_window(struct render_window *);
-int Nviz_create_render_window(struct render_window *, void *, int, int);
-int Nviz_make_current_render_window(const struct render_window *);
-
 #endif /* GRASS_NVIZ_H */

Copied: grass/trunk/include/ogsf.h (from rev 49182, grass/trunk/include/gstypes.h)
===================================================================
--- grass/trunk/include/ogsf.h	                        (rev 0)
+++ grass/trunk/include/ogsf.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -0,0 +1,555 @@
+/*!
+  \file include/ogsf.c
+
+  \brief OGSF header file (structures)
+
+  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 Bill Brown, USACERL (January 1993)
+  \author Thematic mapping enabled by Martin Landa <landa.martin gmail.com) (06/2011)
+
+  (C) 2011 by the GRASS Development Team
+*/
+
+#ifndef GRASS_OGSF_H
+#define GRASS_OGSF_H
+
+#include <grass/config.h>
+#include <grass/bitmap.h>
+#if defined(OPENGL_X11) || defined(OPENGL_WINDOWS)
+#include <GL/gl.h>
+#endif
+#ifdef OPENGL_AQUA
+#include <OpenGL/gl.h>
+#endif
+
+#include <grass/gis.h>
+
+#define GS_UNIT_SIZE 1000.
+
+#define BETWEEN(x, a, b) (((x) > (a) && (x) < (b)) || ((x) > (b) && (x) < (a)))
+#define GS_NEAR_EQUAL(x, y, ratio) ((x) == (y) || ((x) == 0.0? \
+            GS_BETWEEN((x), (y)+(y)*(ratio), (y)-(y)*(ratio)):\
+            GS_BETWEEN((y), (x)+(x)*(ratio), (x)-(x)*(ratio))))
+
+/* current maximums */
+#define MAX_SURFS      12
+#define MAX_VECTS      50
+#define MAX_SITES      50
+#define MAX_VOLS       12	/* should match MAX_VOL_FILES below ? */
+#define MAX_DSP        12
+#define MAX_ATTS        7
+#define MAX_LIGHTS      3
+#define MAX_CPLANES     6
+#define MAX_ISOSURFS   12
+#define MAX_SLICES     12
+
+/* for gvl_file.c */
+#define MAX_VOL_SLICES         4
+#define MAX_VOL_FILES        100
+
+/* surface display modes */
+#define DM_GOURAUD   0x00000100
+#define DM_FLAT      0x00000200	/* defined for symmetry */
+
+#define DM_FRINGE    0x00000010
+
+#define DM_WIRE      0x00000001
+#define DM_COL_WIRE  0x00000002
+#define DM_POLY      0x00000004
+#define DM_WIRE_POLY 0x00000008
+
+#define DM_GRID_WIRE 0x00000400
+#define DM_GRID_SURF 0x00000800
+
+#define WC_COLOR_ATT 0xFF000000
+
+#define IFLAG unsigned int
+
+/* surface attribute ***descriptors***  */
+#define ATT_NORM      0		/* library use only */
+#define ATT_TOPO      1
+#define ATT_COLOR     2
+#define ATT_MASK      3
+#define ATT_TRANSP    4
+#define ATT_SHINE     5
+#define ATT_EMIT      6
+#define LEGAL_ATT(a) (a >= 0 && a < MAX_ATTS)
+
+/* surface attribute **sources**  */
+#define NOTSET_ATT   0
+#define MAP_ATT      1
+#define CONST_ATT    2
+#define FUNC_ATT     3
+#define LEGAL_SRC(s) (s==NOTSET_ATT||s==MAP_ATT||s==CONST_ATT||s==FUNC_ATT)
+
+/* site markers */
+#define ST_X          1
+#define ST_BOX        2
+#define ST_SPHERE     3
+#define ST_CUBE       4
+#define ST_DIAMOND    5
+#define ST_DEC_TREE   6
+#define ST_CON_TREE   7
+#define ST_ASTER      8
+#define ST_GYRO       9
+#define ST_HISTOGRAM  10
+
+/* Buffer modes */
+#define GSD_FRONT 1
+#define GSD_BACK  2
+#define GSD_BOTH  3
+
+/* fence colormodes */
+#define FC_OFF           0
+#define FC_ABOVE         1
+#define FC_BELOW         2
+#define FC_BLEND         3
+#define FC_GREY          4
+
+/* legend types */
+#define LT_DISCRETE      0x00000100
+#define LT_CONTINUOUS    0x00000200
+
+#define LT_LIST          0x00000010
+/* list automatically discrete */
+
+#define LT_RANGE_LOWSET  0x00000001
+#define LT_RANGE_HISET   0x00000002
+#define LT_RANGE_LOW_HI  0x00000003
+#define LT_INVERTED      0x00000008
+
+#define LT_SHOW_VALS     0x00001000
+#define LT_SHOW_LABELS   0x00002000
+
+/* types of volume files */
+#define VOL_FTYPE_RASTER3D        0
+
+/* types of volume values */
+#define VOL_DTYPE_FLOAT     0
+#define VOL_DTYPE_DOUBLE    1
+
+/*#define TRACE_FUNCS */
+/*#define DEBUG */
+
+#define X 0
+#define Y 1
+#define Z 2
+#define W 3
+#define FROM 0
+#define TO 1
+
+/* colormodes */
+#define CM_COLOR               0
+#define CM_EMISSION            1
+#define CM_AMBIENT             2
+#define CM_DIFFUSE             3
+#define CM_SPECULAR            4
+#define CM_AD                  5
+#define CM_NULL                6
+
+#define CM_WIRE CM_COLOR
+
+#define NULL_COLOR 0xFFFFFF
+
+/* attribute sizes - NOT YET USED */
+#define GS_CHAR8      char
+#define GS_SHORT16   short
+#define GS_INT32       int
+
+/* attribute ***types*** */
+#define ATTY_NULL       32	/* internal use only */
+#define ATTY_MASK       16	/* can't use this one for numbytes */
+#define ATTY_FLOAT       8	/* can't use this one for numbytes */
+#define ATTY_INT         4
+#define ATTY_SHORT       2
+#define ATTY_CHAR        1
+#define ATTY_ANY        63	/* internal use only */
+#define LEGAL_TYPE(t)    \
+(t==ATTY_MASK || t==ATTY_FLOAT || t==ATTY_INT || t==ATTY_SHORT || t==ATTY_CHAR)
+
+#define MAXDIMS 4
+
+#define FUDGE(gs) ((gs->zmax_nz - gs->zmin_nz)/500.)
+#define DOT3( a, b )    ( (a)[X]*(b)[X] + (a)[Y]*(b)[Y] + (a)[Z]*(b)[Z] )
+
+/* changed flags for datasets */
+#define CF_NOT_CHANGED 0x000000
+#define CF_COLOR_PACKED 0x000001
+#define CF_USR_CHANGED 0x000010
+#define CF_CHARSCALED  0x000100
+
+#define MAX_TF 6
+
+#define MASK_TL 0x10000000
+#define MASK_TR 0x01000000
+#define MASK_BR 0x00100000
+#define MASK_BL 0x00010000
+#define MASK_NPTS 0x00000007
+
+#define OGSF_POINT 1
+#define OGSF_LINE  2
+#define OGSF_POLYGON 3
+
+#define RED_MASK 0x000000FF
+#define GRN_MASK 0x0000FF00
+#define BLU_MASK 0x00FF0000
+
+typedef float Point4[4];
+typedef float Point3[3];
+typedef float Point2[2];
+
+typedef struct
+{
+    float *fb;
+    int *ib;
+    short *sb;
+    unsigned char *cb;
+    struct BM *bm;
+    struct BM *nm;		/* null mask: set = null */
+    float (*tfunc) (float, int);
+    float k;
+} typbuff;
+
+typedef struct
+{				/* use hash table? */
+    int n_elem;			/* if n_elem == 256, index == NULL */
+    char *index;
+    int *value;
+} table256;
+
+typedef struct
+{				/* applied thusly: offset, mult, if(use_lookup) lookup */
+    float offset;
+    float mult;
+    int use_lookup;
+    table256 lookup;
+} transform;
+
+/* move this to dataset file? */
+typedef struct
+{
+    int data_id;
+    int dims[MAXDIMS];
+    int ndims;
+    int numbytes;
+    char *unique_name;
+    typbuff databuff;
+    IFLAG changed;
+    int need_reload;
+} dataset;
+
+/* maybe add transformation matrix? */
+typedef struct
+{
+    IFLAG att_src;		/* NOTSET_ATT, MAP_ATT, CONST_ATT, FUNC_ATT */
+    IFLAG att_type;		/* ATTY_INT, ATTY_SHORT, ATTY_CHAR, or ATTY_FLOAT */
+    int hdata;			/* handle to dataset */
+    int (*user_func) ();
+    float constant;
+    int *lookup;		/* TODO: use transform instead */
+    float min_nz, max_nz, range_nz;
+    float default_null;
+} gsurf_att;
+
+typedef struct g_surf
+{
+    int gsurf_id;
+    int cols, rows;
+    gsurf_att att[MAX_ATTS];	/* mask, topo, color, etc. */
+    IFLAG draw_mode;		/*DM_GOURAUD | DM_FRINGE | DM_POLY, DM_WIRE, DM_WIRE_POLY */
+    long wire_color;		/* 0xBBGGRR or WC_COLOR_ATT */
+    double ox, oy;		/* real world origin (i.e., SW corner) */
+    double xres, yres;
+    float z_exag;
+    float x_trans, y_trans, z_trans;
+    float xmin, xmax, ymin, ymax, zmin, zmax, zminmasked;
+    float xrange, yrange, zrange;
+    float zmin_nz, zmax_nz, zrange_nz;
+    int x_mod, y_mod, x_modw, y_modw;	/*cells per viewcell, per wire viewcell */
+    int nz_topo, nz_color;	/* no zero flags */
+    int mask_needupdate, norm_needupdate;
+    unsigned long *norms;
+    struct BM *curmask;
+    struct g_surf *next;
+    void *clientdata;
+} geosurf;
+
+/* maybe put attribute info here instead of in geovect - allow a single
+   vector file to have multiple attributes ?   Cached lines should
+   usually be stored as 2d, since they may be draped on multiple
+   surfaces & Z will vary depending upon surface. */
+
+/* Struct for vector feature displaying attributes */
+typedef struct g_vect_style
+{
+    int color; 		 /* Line color */
+    int symbol;		 /* Point symbol/line type */
+    float size;		 /* Symbol size. Unset for lines. */
+    int width;		 /* Line width. Also used for lines forming symbols i.e. X */
+    
+    /*TODO:fill;	 Area fill pattern */
+    /*TODO:falpha;	 Area fill transparency */
+    /*TODO:lalpha;	 Line/boundary/point transparency */
+    /*TODO:struct *orientation;  Symbol orientation */
+    struct g_vect_style *next; /* Point to next gvstyle struct if single point has multiple styles.
+				  In such case feature with next style should be shifted. */
+} gvstyle;
+
+/* Struct for vector map (thematic mapping) */
+typedef struct g_vect_style_thematic
+{
+    int active;
+    int layer;
+    
+    char *color_column;  
+    char *symbol_column; 
+    char *size_column;
+    char *width_column;
+} gvstyle_thematic;
+
+/* Line instance */
+typedef struct g_line
+{
+    int type;
+    float norm[3];
+    int dims, npts;
+    Point3 *p3;
+    Point2 *p2;
+    
+    struct line_cats *cats;	/* Store information about all layers/cats for thematic display */
+    gvstyle *style;	/* Line instance look&feel */
+    signed char highlighted; /* >0 Feature is highlighted */
+    
+    struct g_line *next;
+} geoline;
+
+/* Vector map (lines) */
+typedef struct g_vect
+{
+    int gvect_id;
+    int use_mem, n_lines;
+    int drape_surf_id[MAX_SURFS];	/* if you want 'em flat, define the surface */
+    int flat_val;
+    int n_surfs;
+    char *filename;
+    float x_trans, y_trans, z_trans;
+    /* also maybe center & rotate? */
+    geoline *lines;
+    geoline *fastlines;
+    int (*bgn_read) (), (*end_read) (), (*nxt_line) ();
+    struct g_vect *next;
+    void *clientdata;
+  
+    gvstyle_thematic *tstyle;  /* thematic mapping */
+    gvstyle *style;	/* Vector default look&feel */
+    gvstyle *hstyle;	/* IMHO highlight should be per layer basis. */
+} geovect;
+
+/* Point instance */
+typedef struct g_point
+{
+    int dims;
+    Point3 p3;
+    
+    struct line_cats *cats;	/* Store information about all layers/cats for thematic display */
+    gvstyle *style;
+    signed char highlighted;    /* >0 Feature is highlighted */
+
+    struct g_point *next;
+} geopoint;
+
+/* Vector map (points) */
+typedef struct g_site
+{
+    int gsite_id;
+    int drape_surf_id[MAX_SURFS];	/* ditto */
+    int n_surfs, n_sites;
+    int use_z, use_mem;
+    int has_z;		/* set when file loaded */
+
+    char *filename;
+    transform attr_trans;
+    float x_trans, y_trans, z_trans;
+    geopoint *points;
+    int (*bgn_read) (), (*end_read) (), (*nxt_site) ();
+    struct g_site *next;
+    void *clientdata;
+    
+    gvstyle_thematic *tstyle;  /* thematic mapping */
+    gvstyle *style; 	       /* points default look&feel */
+    gvstyle *hstyle;	       /* IMHO highlight should be per layer basis */
+} geosite;
+
+typedef struct
+{
+    int data_id;		/* id */
+    IFLAG file_type;		/* file type */
+    unsigned int count;		/* number of referencies to this file */
+    char *file_name;		/* file name */
+
+    IFLAG data_type;
+    void *map;			/* pointer to volume file descriptor */
+    double min, max;		/* minimum, maximum value in file */
+
+    IFLAG status;		/* current status */
+    IFLAG mode;			/* current read mode */
+
+    void *buff;			/* data buffer */
+} geovol_file;
+
+typedef struct
+{
+    IFLAG att_src;
+
+    int hfile;
+    int (*user_func) ();
+    float constant;
+
+    void *att_data;
+    int changed;
+} geovol_isosurf_att;
+
+typedef struct
+{
+    int inout_mode;
+    geovol_isosurf_att att[MAX_ATTS];
+
+    int data_desc;
+    unsigned char *data;
+} geovol_isosurf;
+
+typedef struct
+{
+    int dir;
+    float x1, x2, y1, y2, z1, z2;
+    unsigned char *data;
+    int changed;
+
+    int mode, transp;
+} geovol_slice;
+
+typedef struct g_vol
+{
+    int gvol_id;
+    struct g_vol *next;
+
+    int hfile;
+    int cols, rows, depths;
+    double ox, oy, oz;
+    double xres, yres, zres;
+    double xmin, xmax, ymin, ymax, zmin, zmax;
+    double xrange, yrange, zrange;
+    float x_trans, y_trans, z_trans;
+
+    int n_isosurfs;
+    geovol_isosurf *isosurf[MAX_ISOSURFS];
+    int isosurf_x_mod, isosurf_y_mod, isosurf_z_mod;
+    IFLAG isosurf_draw_mode;
+
+    int n_slices;
+    geovol_slice *slice[MAX_SLICES];
+    int slice_x_mod, slice_y_mod, slice_z_mod;
+    IFLAG slice_draw_mode;
+
+    void *clientdata;
+} geovol;
+
+struct lightdefs
+{
+    float position[4];		/* X, Y, Z, (1=local/0=inf) */
+    float color[3];		/* R, G, B */
+    float ambient[3];		/* R, G, B */
+    float emission[3];		/* R, G, B */
+    float shine;		/* 0. to 128. */
+};
+
+struct georot
+{
+    int do_rot;			/* do rotation */
+    double rot_angle;		/* rotation angle */
+    double rot_axes[3];		/* rotation axis */
+    GLdouble rotMatrix[16];	/* rotation matrix */
+};
+
+typedef struct
+{
+    int coord_sys;		/* latlon, equal area, etc */
+    int view_proj;		/* perspective, ortho */
+    int infocus;		/* fixed center of view - true or false */
+    float from_to[2][4];
+    struct georot rotate;
+    int twist, fov, incl, look;	/* 10ths of degrees */
+    float real_to[4], vert_exag;	/* a global Z exag */
+    float scale;
+    struct lightdefs lights[MAX_LIGHTS];
+} geoview;
+
+typedef struct
+{				/* need to add elements here for off_screen drawing */
+    float nearclip, farclip, aspect;
+    short left, right, bottom, top;	/* Screen coordinates */
+    int bgcol;
+} geodisplay;
+
+extern void (*Cxl_func) ();
+extern void (*Swap_func) ();
+
+/* Key frames */
+/* these have to be 1 << KF_id_index */
+
+#define KF_FROMX_MASK	0x00000001
+#define KF_FROMY_MASK	0x00000002
+#define KF_FROMZ_MASK	0x00000004
+#define KF_FROM_MASK	0x00000007
+
+#define KF_DIRX_MASK	0x00000008
+#define KF_DIRY_MASK	0x00000010
+#define KF_DIRZ_MASK	0x00000020
+#define KF_DIR_MASK	0x00000038
+
+#define KF_FOV_MASK	0x00000040
+#define KF_TWIST_MASK	0x00000080
+
+#define KF_ALL_MASK	0x000000FF
+
+#define KF_NUMFIELDS 8
+
+#define KF_LINEAR 111
+#define KF_SPLINE 222
+#define KF_LEGAL_MODE(m) (m == KF_LINEAR || m == KF_SPLINE)
+
+#define KF_FROMX 0
+#define KF_FROMY 1
+#define KF_FROMZ 2
+#define KF_DIRX 3
+#define KF_DIRY 4
+#define KF_DIRZ 5
+#define KF_FOV 6
+#define KF_TWIST 7
+
+#define FM_VECT 0x00000001
+#define FM_SITE 0x00000002
+#define FM_PATH 0x00000004
+#define FM_VOL  0x00000008
+#define FM_LABEL 0x00000010
+
+typedef struct view_node
+{
+    float fields[KF_NUMFIELDS];
+} Viewnode;
+
+typedef struct key_node
+{
+    float pos, fields[KF_NUMFIELDS];
+    int look_ahead;
+    unsigned long fieldmask;
+    struct key_node *next, *prior;
+} Keylist;
+
+/* Bring all the function prototypes */
+#include <grass/defs/ogsf.h>
+
+#endif /* GRASS_OGSF_H */

Deleted: grass/trunk/include/ogsf_proto.h
===================================================================
--- grass/trunk/include/ogsf_proto.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/ogsf_proto.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,773 +0,0 @@
-/*
- ****************************************************************************
- *
- * MODULE:       GRASS ogsf library
- * AUTHOR(S):    Justin Hickey - Bangkok Thailand - jhickey at hpcc.nectec.or.th
- * PURPOSE:      To list the prototypes for all accessible functions in this
- *               library. The prototypes are listed by the file in which their
- *               function definitions reside.
- * COPYRIGHT:    (C) 2000-2008 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.
- *
- *****************************************************************************/
-
-#ifndef _OGSF_LOCAL_PROTO_H
-#define _OGSF_LOCAL_PROTO_H
-
-/*========================= Required Include Files =========================*/
-
-#include <grass/gis.h>
-#include <grass/gstypes.h>
-#include <grass/kftypes.h>
-
-/*===================== User Visible Constants/Defines =====================*/
-
-/* none */
-
-/*====================== Internal Types and Structures =====================*/
-
-/* none */
-
-/*========================== Function Prototypes ===========================*/
-
-/* GK2.c */
-int GK_set_interpmode(int);
-void GK_set_tension(float);
-void GK_showtension_start(void);
-void GK_showtension_stop(void);
-void GK_update_tension(void);
-void GK_update_frames(void);
-void GK_set_numsteps(int);
-void GK_clear_keys(void);
-void GK_print_keys(const char *);
-int GK_move_key(float, float, float);
-int GK_delete_key(float, float, int);
-int GK_add_key(float, unsigned long, int, float);
-void GK_do_framestep(int, int);
-void GK_show_path(int);
-void GK_show_vect(int);
-void GK_show_site(int);
-void GK_show_vol(int);
-void GK_show_list(int);
-
-/* GP2.c */
-int GP_site_exists(int);
-int GP_new_site(void);
-int GP_num_sites(void);
-int *GP_get_site_list(int *);
-int GP_delete_site(int);
-int GP_load_site(int, const char *);
-int GP_get_sitename(int, char **);
-int GP_get_style(int, int *, int *, float *, int *);
-int GP_set_style(int, int, int, float, int);
-int GP_set_style_thematic(int, int, const char *, const char *, const char *,
-			  const char *, struct Colors *);
-int GP_unset_style_thematic(int);
-int GP_attmode_color(int, const char *);
-int GP_attmode_none(int);
-int GP_set_zmode(int, int);
-int GP_get_zmode(int, int *);
-void GP_set_trans(int, float, float, float);
-void GP_get_trans(int, float *, float *, float *);
-int GP_select_surf(int, int);
-int GP_unselect_surf(int, int);
-int GP_surf_is_selected(int, int);
-void GP_draw_site(int);
-void GP_alldraw_site(void);
-int GP_Set_ClientData(int, void *);
-void *GP_Get_ClientData(int);
-int GP_str_to_marker(const char *);
-
-/* GS2.c */
-void void_func(void);
-void GS_libinit(void);
-int GS_get_longdim(float *);
-int GS_get_region(float *, float *, float *, float *);
-void GS_set_att_defaults(float *, float *);
-int GS_surf_exists(int);
-int GS_new_surface(void);
-int GS_new_light(void);
-void GS_set_light_reset(int);
-int GS_get_light_reset(void);
-void GS_setlight_position(int, float, float, float, int);
-void GS_setlight_color(int, float, float, float);
-void GS_setlight_ambient(int, float, float, float);
-void GS_lights_off(void);
-void GS_lights_on(void);
-void GS_switchlight(int, int);
-int GS_transp_is_set(void);
-void GS_get_modelposition1(float *);
-void GS_get_modelposition(float *, float *);
-void GS_draw_X(int, float *);
-void GS_set_Narrow(int *, int, float *);
-void GS_draw_line_onsurf(int, float, float, float, float);
-int GS_draw_nline_onsurf(int, float, float, float, float, float *, int);
-void GS_draw_flowline_at_xy(int, float, float);
-void GS_draw_lighting_model1(void);
-void GS_draw_lighting_model(void);
-int GS_update_curmask(int);
-int GS_is_masked(int, float *);
-void GS_unset_SDsurf(void);
-int GS_set_SDsurf(int);
-int GS_set_SDscale(float);
-int GS_get_SDsurf(int *);
-int GS_get_SDscale(float *);
-int GS_update_normals(int);
-int GS_get_att(int, int, int *, float *, char *);
-int GS_get_cat_at_xy(int, int, char *, float, float);
-int GS_get_norm_at_xy(int, float, float, float *);
-int GS_get_val_at_xy(int, int, char *, float, float);
-int GS_unset_att(int, int);
-int GS_set_att_const(int, int, float);
-int GS_set_maskmode(int, int);
-int GS_get_maskmode(int, int *);
-int GS_Set_ClientData(int, void *);
-void *GS_Get_ClientData(int);
-int GS_num_surfs(void);
-int *GS_get_surf_list(int *);
-int GS_delete_surface(int);
-int GS_load_att_map(int, const char *, int);
-void GS_draw_surf(int);
-void GS_draw_wire(int);
-void GS_alldraw_wire(void);
-void GS_alldraw_surf(void);
-void GS_set_exag(int, float);
-void GS_set_global_exag(float);
-float GS_global_exag(void);
-void GS_set_wire_color(int, int);
-int GS_get_wire_color(int, int *);
-int GS_setall_drawmode(int);
-int GS_set_drawmode(int, int);
-int GS_get_drawmode(int, int *);
-void GS_set_nozero(int, int, int);
-int GS_get_nozero(int, int, int *);
-int GS_setall_drawres(int, int, int, int);
-int GS_set_drawres(int, int, int, int, int);
-void GS_get_drawres(int, int *, int *, int *, int *);
-void GS_get_dims(int, int *, int *);
-int GS_get_exag_guess(int, float *);
-void GS_get_zrange_nz(float *, float *);
-void GS_set_trans(int, float, float, float);
-void GS_get_trans(int, float *, float *, float *);
-unsigned int GS_default_draw_color(void);
-unsigned int GS_background_color(void);
-void GS_set_draw(int);
-void GS_ready_draw(void);
-void GS_done_draw(void);
-void GS_set_focus(float *);
-int GS_get_focus(float *);
-void GS_set_focus_center_map(int);
-void GS_moveto(float *);
-void GS_moveto_real(float *);
-void GS_set_focus_real(float *);
-void GS_get_to_real(float *);
-int GS_get_zextents(int, float *, float *, float *);
-int GS_get_zrange(float *, float *, int);
-void GS_get_from(float *);
-void GS_get_from_real(float *);
-void GS_get_to(float *);
-void GS_get_viewdir(float *);
-void GS_set_viewdir(float *);
-void GS_set_fov(int);
-void GS_set_rotation(double, double, double, double);
-void GS_get_rotation_matrix(double *);
-void GS_set_rotation_matrix(double *);
-void GS_init_rotation(void);
-void GS_unset_rotation(void);
-int GS_get_fov(void);
-int GS_get_twist(void);
-void GS_set_twist(int);
-void GS_set_nofocus(void);
-void GS_set_infocus(void);
-void GS_set_viewport(int, int, int, int);
-int GS_look_here(int, int);
-int GS_get_selected_point_on_surface(int, int, int *, float *, float *,
-				     float *);
-void GS_set_cplane_rot(int, float, float, float);
-void GS_set_cplane_trans(int, float, float, float);
-void GS_draw_cplane(int);
-int GS_draw_cplane_fence(int, int, int);
-void GS_alldraw_cplane_fences(void);
-void GS_set_cplane(int);
-void GS_unset_cplane(int);
-void GS_get_scale(float *, float *, float *, int);
-void GS_set_fencecolor(int);
-int GS_get_fencecolor(void);
-int GS_get_distance_alongsurf(int, float, float, float, float, float *, int);
-int GS_save_3dview(const char *, int);
-int GS_load_3dview(const char *, int);
-void GS_init_view(void);
-void GS_clear(int);
-double GS_get_aspect(void);
-int GS_has_transparency(void);
-void GS_zoom_setup(int *, int *, int *, int *, int *, int *);
-int GS_write_zoom(const char *, unsigned int, unsigned int);
-void GS_draw_all_list(void);
-void GS_delete_list(GLuint);
-int GS_draw_legend(const char *, GLuint, int, int *, float *, int *);
-void GS_draw_fringe(int, unsigned long, float, int *);
-void GS_getlight_position(int, float *, float *, float *, int *);
-void GS_getlight_color(int, float *, float *, float *);
-void GS_getlight_ambient(int, float *, float *, float *);
-
-/* GSX.c */
-int GS_check_cancel(void);
-void GS_set_cancel(int);
-void GS_set_cxl_func(void (*)(void));
-void GS_set_swap_func(void (*)(void));
-
-/* GS_util.c */
-double GS_geodistance(double *, double *, const char *);
-float GS_distance(float *, float *);
-float GS_P2distance(float *, float *);
-void GS_v3eq(float *, float *);
-void GS_v3add(float *, float *);
-void GS_v3sub(float *, float *);
-void GS_v3mult(float *, float);
-int GS_v3norm(float *);
-int GS_v2norm(float *);
-int GS_dv3norm(double *);
-int GS_v3normalize(float *, float *);
-int GS_v3dir(float *, float *, float *);
-void GS_v2dir(float *, float *, float *);
-void GS_v3cross(float *, float *, float *);
-void GS_v3mag(float *, float *);
-int GS_coordpair_repeats(float *, float *, int);
-
-/* GV2.c */
-int GV_vect_exists(int);
-int GV_new_vector(void);
-int GV_num_vects(void);
-int *GV_get_vect_list(int *);
-int GV_delete_vector(int);
-int GV_load_vector(int, const char *);
-int GV_get_vectname(int, char **);
-int GV_set_style(int, int, int, int, int);
-int GV_get_style(int, int *, int *, int *, int *);
-int GV_set_style_thematic(int, int, const char *, const char *, struct Colors *);
-int GV_unset_style_thematic(int);
-void GV_set_trans(int, float, float, float);
-int GV_get_trans(int, float *, float *, float *);
-int GV_select_surf(int, int);
-int GV_unselect_surf(int, int);
-int GV_surf_is_selected(int, int);
-void GV_draw_vect(int);
-void GV_alldraw_vect(void);
-void GV_alldraw_fastvect(void);
-void GV_draw_fastvect(int);
-int GV_Set_ClientData(int, void *);
-void *GV_Get_ClientData(int);
-
-/* GVL2.c */
-void GVL_libinit(void);
-int GVL_get_region(float *, float *, float *, float *, float *, float *);
-void *GVL_get_window();
-int GVL_vol_exists(int);
-int GVL_new_vol(void);
-int GVL_num_vols(void);
-int *GVL_get_vol_list(int *);
-int GVL_delete_vol(int);
-int GVL_load_vol(int, const char *);
-int GVL_get_volname(int, char *);
-void GVL_set_trans(int, float, float, float);
-int GVL_get_trans(int, float *, float *, float *);
-void GVL_draw_vol(int);
-void GVL_draw_wire(int);
-void GVL_alldraw_vol(void);
-void GVL_alldraw_wire(void);
-int GVL_Set_ClientData(int, void *);
-void *GVL_Get_ClientData(int);
-void GVL_get_dims(int, int *, int *, int *);
-void GVL_set_focus_center_map(int);
-
-int GVL_isosurf_move_up(int, int);
-int GVL_isosurf_move_down(int, int);
-void GVL_isosurf_get_drawres(int, int *, int *, int *);
-int GVL_isosurf_set_drawres(int, int, int, int);
-int GVL_isosurf_get_drawmode(int, int *);
-int GVL_isosurf_set_drawmode(int, int);
-int GVL_isosurf_add(int);
-int GVL_isosurf_del(int, int);
-int GVL_isosurf_get_att(int, int, int, int *, float *, char *);
-int GVL_isosurf_unset_att(int, int, int);
-int GVL_isosurf_set_att_const(int, int, int, float);
-int GVL_isosurf_set_att_map(int, int, int, const char *);
-int GVL_isosurf_get_flags(int, int, int *);
-int GVL_isosurf_set_flags(int, int, int);
-int GVL_isosurf_num_isosurfs(int);
-int GVL_isosurf_set_maskmode(int, int, int);
-int GVL_isosurf_get_maskmode(int, int, int *);
-
-int GVL_slice_move_up(int, int);
-int GVL_slice_move_down(int, int);
-void GVL_slice_get_drawres(int, int *, int *, int *);
-int GVL_slice_get_transp(int, int, int *);
-int GVL_slice_set_transp(int, int, int);
-int GVL_slice_set_drawres(int, int, int, int);
-int GVL_slice_get_drawmode(int, int *);
-int GVL_slice_set_drawmode(int, int);
-int GVL_slice_add(int);
-int GVL_slice_del(int, int);
-int GVL_slice_num_slices(int);
-int GVL_slice_get_pos(int, int, float *, float *, float *, float *, float *,
-		      float *, int *);
-int GVL_slice_set_pos(int, int, float, float, float, float, float, float,
-		      int);
-
-/* Gp3.c */
-int Gp_set_color(const char *, geopoint *);
-geopoint *Gp_load_sites(const char *, int *, int *);
-int Gp_load_sites_thematic(geosite *, struct Colors *);
-
-/* Gs3.c */
-double Gs_distance(double *, double *);
-int Gs_loadmap_as_float(struct Cell_head *, const char *, float *,
-			struct BM *, int *);
-int Gs_loadmap_as_int(struct Cell_head *, const char *, int *, struct BM *,
-		      int *);
-int Gs_numtype(const char *, int *);
-int Gs_loadmap_as_short(struct Cell_head *, const char *, short *,
-			struct BM *, int *);
-int Gs_loadmap_as_char(struct Cell_head *, const char *, unsigned char *,
-		       struct BM *, int *);
-int Gs_loadmap_as_bitmap(struct Cell_head *, const char *, struct BM *);
-int Gs_build_256lookup(const char *, int *);
-void Gs_pack_colors(const char *, int *, int, int);
-void Gs_pack_colors_float(const char *, float *, int *, int, int);
-int Gs_get_cat_label(const char *, int, int, char *);
-int Gs_save_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
-		   geosurf *);
-int Gs_load_3dview(const char *, geoview *, geodisplay *, struct Cell_head *,
-		   geosurf *);
-int Gs_update_attrange(geosurf *, int);
-
-/* Gv3.c */
-geoline *Gv_load_vect(const char *, int *);
-int Gv_load_vect_thematic(geovect *, struct Colors *);
-void sub_Vectmem(int);
-
-/* gk.c */
-Keylist *gk_copy_key(Keylist *);
-unsigned long gk_get_mask_sofar(float, Keylist *);
-int gk_viable_keys_for_mask(unsigned long, Keylist *, Keylist **);
-void gk_follow_frames(Viewnode *, int, Keylist *, int, int, int,
-		      unsigned long);
-void gk_free_key(Keylist *);
-Viewnode *gk_make_framesfromkeys(Keylist *, int, int, int, float);
-double get_key_neighbors(int, double, double, int, Keylist **, Keylist **,
-			 Keylist **, Keylist **, Keylist **, double *,
-			 double *);
-double lin_interp(float, float, float);
-double get_2key_neighbors(int, float, float, int, Keylist **, Keylist **,
-			  Keylist **);
-Viewnode *gk_make_linear_framesfromkeys(Keylist *, int, int, int);
-void correct_twist(Keylist *);
-int gk_draw_path(Viewnode *, int, Keylist *);
-
-/* gp.c */
-geosite *gp_get_site(int);
-geosite *gp_get_prev_site(int);
-int gp_num_sites(void);
-geosite *gp_get_last_site(void);
-geosite *gp_get_new_site(void);
-void gp_update_drapesurfs(void);
-int gp_set_defaults(geosite *);
-void print_site_fields(geosite *);
-int gp_init_site(geosite *);
-void gp_delete_site(int);
-int gp_free_site(geosite *);
-void gp_free_sitemem(geosite *);
-void gp_set_drapesurfs(geosite *, int *, int);
-
-/* gpd.c */
-int gs_point_in_region(geosurf *, float *, float *);
-void gpd_obj(geosurf *, gvstyle *, Point3);
-int gpd_2dsite(geosite *, geosurf *, int);
-int gpd_3dsite(geosite *, float, float, int);
-
-/* gs.c */
-void gs_err(const char *);
-void gs_init(void);
-geosurf *gs_get_surf(int);
-geosurf *gs_get_prev_surface(int);
-int gs_getall_surfaces(geosurf **);
-int gs_num_surfaces(void);
-int gs_att_is_set(geosurf *, IFLAG);
-geosurf *gs_get_last_surface(void);
-geosurf *gs_get_new_surface(void);
-int gs_init_surf(geosurf *, double, double, int, int, double, double);
-int gs_init_normbuff(geosurf *);
-void print_frto(float (*)[4]);
-void print_realto(float *);
-void print_256lookup(int *);
-void print_surf_fields(geosurf *);
-void print_view_fields(geoview *);
-void gs_set_defaults(geosurf *, float *, float *);
-void gs_delete_surf(int);
-int gs_free_surf(geosurf *);
-void gs_free_unshared_buffs(geosurf *);
-int gs_num_datah_reused(int);
-int gs_get_att_type(geosurf *, int);
-int gs_get_att_src(geosurf *, int);
-typbuff *gs_get_att_typbuff(geosurf *, int, int);
-int gs_malloc_att_buff(geosurf *, int, int);
-int gs_malloc_lookup(geosurf *, int);
-int gs_set_att_type(geosurf *, int, int);
-int gs_set_att_src(geosurf *, int, int);
-int gs_set_att_const(geosurf *, int, float);
-void gs_set_maskmode(int);
-int gs_mask_defined(geosurf *);
-int gs_masked(typbuff *, int, int, int);
-int gs_mapcolor(typbuff *, gsurf_att *, int);
-int gs_get_zextents(geosurf *, float *, float *, float *);
-int gs_get_xextents(geosurf *, float *, float *);
-int gs_get_yextents(geosurf *, float *, float *);
-int gs_get_zrange0(float *, float *);
-int gs_get_zrange(float *, float *);
-int gs_get_xrange(float *, float *);
-int gs_get_yrange(float *, float *);
-int gs_get_data_avg_zmax(float *);
-int gs_get_datacenter(float *);
-int gs_setall_norm_needupdate(void);
-int gs_point_is_masked(geosurf *, float *);
-int gs_distance_onsurf(geosurf *, float *, float *, float *, int);
-
-/* gs_bm.c */
-struct BM *gsbm_make_mask(typbuff *, float, int, int);
-void gsbm_zero_mask(struct BM *);
-int gsbm_or_masks(struct BM *, struct BM *);
-int gsbm_ornot_masks(struct BM *, struct BM *);
-int gsbm_and_masks(struct BM *, struct BM *);
-int gsbm_xor_masks(struct BM *, struct BM *);
-int gs_update_curmask(geosurf *);
-void print_bm(struct BM *);
-
-/* gs_norms.c */
-void init_vars(geosurf *);
-int gs_calc_normals(geosurf *);
-int calc_norm(geosurf *, int, int, unsigned int);
-
-/* gs_query.c */
-int gs_los_intersect1(int, float (*)[3], float *);
-int gs_los_intersect(int, float **, float *);
-int RayCvxPolyhedronInt(Point3, Point3, double, Point4 *, int, double *,
-			int *);
-void gs_get_databounds_planes(Point4 *);
-int gs_setlos_enterdata(Point3 *);
-
-/* gsd_cplane.c */
-void gsd_def_cplane(int, float *, float *);
-void gsd_update_cplanes(void);
-void gsd_cplane_on(int);
-void gsd_cplane_off(int);
-void gsd_get_cplanes_state(int *);
-int gsd_get_cplanes(Point4 *);
-void gsd_update_cpnorm(int);
-void gsd_cplane_setrot(int, float, float, float);
-void gsd_cplane_settrans(int, float, float, float);
-void gsd_draw_cplane_fence(geosurf *, geosurf *, int);
-void gsd_draw_cplane(int);
-
-/* gsd_fonts.c */
-GLuint gsd_set_font(const char *);
-int gsd_get_txtwidth(const char *, int);
-int gsd_get_txtheight(int size);
-void do_label_display(GLuint, float *, const char *);
-int get_txtdescender(void);
-int get_txtxoffset(void);
-
-/* gsd_img_ppm.c */
-int GS_write_ppm(const char *);
-int gsd_init_mpeg(const char *);
-int gsd_write_mpegframe(void);
-int gsd_close_mpeg(void);
-
-/* gsd_img_tif.c */
-int GS_write_tif(const char *);
-
-/* gsd_label.c */
-void gs_put_label(const char *, GLuint, int, unsigned long, int *);
-void gsd_remove_curr(void);
-void gsd_remove_all(void);
-void gsd_call_label(void);
-
-/* gsd_objs.c */
-void gsd_box(float *, int, float *);
-void gsd_plus(float *, int, float);
-void gsd_line_onsurf(geosurf *, float *, float *);
-int gsd_nline_onsurf(geosurf *, float *, float *, float *, int);
-void gsd_x(geosurf *, float *, int, float);
-void gsd_diamond(float *, unsigned long, float);
-void gsd_diamond_lines(void);
-void gsd_cube(float *, unsigned long, float);
-void gsd_draw_box(float *, unsigned long, float);
-void gsd_drawsphere(float *, unsigned long, float);
-void gsd_draw_asterisk(float *, unsigned long, float);
-void gsd_draw_gyro(float *, unsigned long, float);
-void gsd_3dcursor(float *);
-void dir_to_slope_aspect(float *, float *, float *, int);
-int gsd_north_arrow(float *, float, GLuint, unsigned long, unsigned long);
-int gsd_arrow(float *, unsigned long, float, float *, float, geosurf *);
-int gsd_arrow_onsurf(float *, float *, unsigned long, int, geosurf *);
-void gsd_3darrow(float *, unsigned long, float, float, float *, float);
-int gsd_scalebar(float *, float, GLuint, unsigned long, unsigned long);
-int gsd_scalebar_v2(float *, float, GLuint, unsigned long, unsigned long);
-void primitive_cone(unsigned long);
-void primitive_cylinder(unsigned long, int);
-
-/* gsd_prim.c */
-void gsd_flush(void);
-void gsd_colormode(int);
-void show_colormode(void);
-void gsd_circ(float, float, float);
-void gsd_disc(float, float, float, float);
-void gsd_sphere(float *, float);
-void gsd_zwritemask(unsigned long);
-void gsd_backface(int);
-void gsd_linewidth(short);
-void gsd_bgnqstrip(void);
-void gsd_endqstrip(void);
-void gsd_bgntmesh(void);
-void gsd_endtmesh(void);
-void gsd_bgntstrip(void);
-void gsd_endtstrip(void);
-void gsd_bgntfan(void);
-void gsd_endtfan(void);
-void gsd_swaptmesh(void);
-void gsd_bgnpolygon(void);
-void gsd_endpolygon(void);
-void gsd_bgnline(void);
-void gsd_endline(void);
-void gsd_shademodel(int);
-int gsd_getshademodel(void);
-void gsd_bothbuffer(void);
-void gsd_frontbuffer(int);
-void gsd_backbuffer(int);
-void gsd_swapbuffers(void);
-void gsd_popmatrix(void);
-void gsd_pushmatrix(void);
-void gsd_scale(float, float, float);
-void gsd_translate(float, float, float);
-void gsd_rot(float, char);
-void gsd_checkwindow(int *, int *, double *, double *);
-int gsd_checkpoint(float *, int *, int *, double *, double *);
-void gsd_litvert_func(float *, unsigned long, float *);
-void gsd_litvert_func2(float *, unsigned long, float *);
-void gsd_vert_func(float *);
-void gsd_color_func(unsigned int);
-void gsd_init_lightmodel(void);
-void gsd_set_material(int, int, float, float, int);
-void gsd_deflight(int, struct lightdefs *);
-void gsd_switchlight(int, int);
-int gsd_getimage(unsigned char **, unsigned int *, unsigned int *);
-void gsd_blend(int);
-void gsd_def_clipplane(int, double *);
-void gsd_set_clipplane(int, int);
-void gsd_finish(void);
-void gsd_viewport(int, int, int, int);
-int gsd_makelist(void);
-void gsd_bgnlist(int, int);
-void gsd_endlist(void);
-void gsd_calllist(int);
-void gsd_deletelist(GLuint, int);
-void gsd_calllists(int);
-void gsd_getwindow(int *, int *, double *, double *);
-int gsd_writeView(unsigned char **, unsigned int, unsigned int);
-
-/* gsd_surf.c */
-int gsd_surf(geosurf *);
-int gsd_surf_map(geosurf *);
-int gsd_surf_const(geosurf *, float);
-int gsd_surf_func(geosurf *, int (*)());
-int gsd_triangulated_wall(int, int, geosurf *, geosurf *, Point3 *, Point3 *,
-			  float *);
-void gsd_setfc(int);
-int gsd_getfc(void);
-int gsd_ortho_wall(int, int, geosurf **, Point3 **, float *);
-int gsd_wall(float *, float *, float *);
-int gsd_norm_arrows(geosurf *);
-
-/* gsd_views.c */
-int gsd_get_los(float (*)[3], short, short);
-void gsd_set_view(geoview *, geodisplay *);
-void gsd_check_focus(geoview *);
-void gsd_get_zup(geoview *, double *);
-int gsd_zup_twist(geoview *);
-void gsd_do_scale(int);
-void gsd_real2model(Point3);
-void gsd_model2real(Point3);
-void gsd_model2surf(geosurf *, Point3);
-void gsd_surf2model(Point3);
-void gsd_surf2real(geosurf *, Point3);
-void gsd_real2surf(geosurf *, Point3);
-
-/* gsd_wire.c */
-int gsd_wire_surf(geosurf *);
-int gsd_wire_surf_map(geosurf *);
-int gsd_coarse_surf_map(geosurf *);
-int gsd_wire_surf_const(geosurf *, float);
-int gsd_wire_surf_func(geosurf *, int (*)());
-int gsd_wire_arrows(geosurf *);
-
-/* gsdiff.c */
-void gsdiff_set_SDscale(float);
-float gsdiff_get_SDscale(void);
-void gsdiff_set_SDref(geosurf *);
-geosurf *gsdiff_get_SDref(void);
-float gsdiff_do_SD(float, int);
-
-/* gsdrape.c */
-int gsdrape_set_surface(geosurf *);
-int seg_intersect_vregion(geosurf *, float *, float *);
-Point3 *gsdrape_get_segments(geosurf *, float *, float *, int *);
-Point3 *gsdrape_get_allsegments(geosurf *, float *, float *, int *);
-void interp_first_last(geosurf *, float *, float *, Point3, Point3);
-int _viewcell_tri_interp(geosurf *, Point3);
-int viewcell_tri_interp(geosurf *, typbuff *, Point3, int);
-int in_vregion(geosurf *, float *);
-int order_intersects(geosurf *, Point3, Point3, int, int, int);
-int get_vert_intersects(geosurf *, float *, float *, float *);
-int get_horz_intersects(geosurf *, float *, float *, float *);
-int get_diag_intersects(geosurf *, float *, float *, float *);
-int segs_intersect(float, float, float, float, float, float, float, float,
-		   float *, float *);
-int Point_on_plane(Point3, Point3, Point3, Point3);
-int XY_intersect_plane(float *, float *);
-int P3toPlane(Point3, Point3, Point3, float *);
-int V3Cross(Point3, Point3, Point3);
-
-/* gsds.c */
-int gsds_findh(const char *, IFLAG *, IFLAG *, int);
-int gsds_newh(const char *);
-typbuff *gsds_get_typbuff(int, IFLAG);
-char *gsds_get_name(int);
-int gsds_free_datah(int);
-int gsds_free_data_buff(int, int);
-int free_data_buffs(dataset *, int);
-int gsds_alloc_typbuff(int, int *, int, int);
-int gsds_get_changed(int);
-int gsds_set_changed(int, IFLAG);
-int gsds_get_type(int);
-
-/* gsget.c */
-int get_mapatt(typbuff *, int, float *);
-
-/* gv.c */
-geovect *gv_get_vect(int);
-geovect *gv_get_prev_vect(int);
-int gv_num_vects(void);
-geovect *gv_get_last_vect(void);
-geovect *gv_get_new_vect(void);
-void gv_update_drapesurfs(void);
-int gv_set_defaults(geovect *);
-int gv_init_vect(geovect *);
-void gv_delete_vect(int);
-int gv_free_vect(geovect *);
-void gv_free_vectmem(geovect *);
-void gv_set_drapesurfs(geovect *, int *, int);
-
-/* gv_quick.c */
-float gv_line_length(geoline *);
-int gln_num_points(geoline *);
-int gv_num_points(geovect *);
-int gv_decimate_lines(geovect *);
-
-/* gvd.c */
-int gs_clip_segment(geosurf *, float *, float *, float *);
-int gvd_vect(geovect *, geosurf *, int);
-void gvd_draw_lineonsurf(geosurf *, float *, float *, int);
-
-/* gvl.c */
-geovol *gvl_get_vol(int);
-geovol *gvl_get_prev_vol(int);
-int gvl_getall_vols(geovol **);
-int gvl_num_vols(void);
-geovol *gvl_get_last_vol(void);
-geovol *gvl_get_new_vol(void);
-int gvl_init_vol(geovol *, double, double, double, int, int, int,
-		 double, double, double);
-void gvl_delete_vol(int);
-int gvl_free_vol(geovol *);
-void gvl_free_volmem(geovol *);
-void print_vol_fields(geovol *);
-int gvl_get_xextents(geovol *, float *, float *);
-int gvl_get_yextents(geovol *, float *, float *);
-int gvl_get_zextents(geovol *, float *, float *);
-int gvl_get_xrange(float *, float *);
-int gvl_get_yrange(float *, float *);
-int gvl_get_zrange(float *, float *);
-
-int gvl_isosurf_init(geovol_isosurf *);
-int gvl_isosurf_freemem(geovol_isosurf *);
-geovol_isosurf *gvl_isosurf_get_isosurf(int, int);
-int gvl_isosurf_get_att_src(geovol_isosurf *, int);
-int gvl_isosurf_set_att_src(geovol_isosurf *, int, int);
-int gvl_isosurf_set_att_const(geovol_isosurf *, int, float);
-int gvl_isosurf_set_att_map(geovol_isosurf *, int, const char *);
-int gvl_isosurf_set_att_changed(geovol_isosurf *, int);
-
-int gvl_slice_init(geovol_slice *);
-geovol_slice *gvl_slice_get_slice(int, int);
-int gvl_slice_freemem(geovol_slice *);
-
-/* trans.c */
-void P_scale(float, float, float);
-void P_transform(int, float (*)[4], float (*)[4]);
-int P_pushmatrix(void);
-int P_popmatrix(void);
-void P_rot(float, char);
-
-/* gvl_file.c */
-geovol_file *gvl_file_get_volfile(int);
-char *gvl_file_get_name(int);
-int gvl_file_get_file_type(geovol_file *);
-int gvl_file_get_data_type(geovol_file *);
-int gvl_file_newh(const char *, IFLAG);
-int gvl_file_free_datah(int);
-int gvl_file_start_read(geovol_file *);
-int gvl_file_end_read(geovol_file *);
-int gvl_file_get_value(geovol_file *, int, int, int, void *);
-int gvl_file_is_null_value(geovol_file *, void *);
-int gvl_file_set_mode(geovol_file *, IFLAG);
-int gvl_file_set_slices_param(geovol_file *, int, int);
-void gvl_file_get_min_max(geovol_file *, double *, double *);
-
-/* Gvl3.c */
-int Gvl_load_colors_data(void **, const char *);
-int Gvl_unload_colors_data(void *);
-int Gvl_get_color_for_value(void *, float *);
-
-/* gvl_calc.c */
-int gvl_isosurf_calc(geovol *);
-int gvl_slices_calc(geovol *);
-void gvl_write_char(int, unsigned char **, unsigned char);
-unsigned char gvl_read_char(int, const unsigned char *);
-void gvl_align_data(int, unsigned char *);
-
-/* gvld.c */
-int gvld_vol(geovol *);
-int gvld_wire_vol(geovol *);
-int gvld_isosurf(geovol *);
-int gvld_wire_isosurf(geovol *);
-int gvld_slices(geovol *);
-int gvld_slice(geovol *, int);
-int gvld_wire_slices(geovol *);
-int gvld_wind3_box(geovol *);
-
-/* from gsd_fringe.c */
-void gsd_display_fringe(geosurf *, unsigned long, float, int[4]);
-void gsd_fringe_horiz_poly(float, geosurf *, int, int);
-void gsd_fringe_horiz_line(float, geosurf *, int, int);
-void gsd_fringe_vert_poly(float, geosurf *, int, int);
-void gsd_fringe_vert_line(float, geosurf *, int, int);
-
-/* from gsd_legend.c */
-GLuint gsd_put_legend(const char *, GLuint, int, int *, float *, int *);
-void gsd_bgn_legend_viewport(GLint, GLint, GLint, GLint);
-void gsd_end_legend_viewport(void);
-int gsd_make_nice_number(float *);
-
-#endif /* _OGSF_LOCAL_PROTO_H */

Modified: grass/trunk/include/ortholib.h
===================================================================
--- grass/trunk/include/ortholib.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/ortholib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,69 +1,6 @@
-/* from imagery/libes */
-/* ask_camera.c */
-int I_ask_camera_old(char *, char *);
-int I_ask_camera_new(char *, char *);
-int I_ask_camera_any(char *, char *);
+#ifndef GRASS_ORTHO_H
+#define GRASS_ORTHO_H
 
-/* ask_initial.c */
-int I_ask_camera_old(char *, char *);
-int I_ask_camera_new(char *, char *);
-int I_ask_camera_any(char *, char *);
+#include <grass/defs/ortholib.h>
 
-/* cam.c */
-FILE *I_fopen_group_camera_new(char *);
-FILE *I_fopen_group_camera_old(char *);
-
-/* camera.c */
-int I_put_group_camera(char *, char *);
-int I_get_group_camera(char *, char *);
-
-/* elev.c */
-int I_put_group_elev(char *, char *, char *, char *, char *, char *, char *);
-int I_get_group_elev(char *, char *, char *, char *, char *, char *, char *);
-
-/* find_camera.c */
-int I_find_camera(char *);
-int I_find_camera_file(char *, char *);
-
-/* find_init.c */
-int I_find_initial(char *);
-
-/* fopen_camera.c */
-FILE *I_fopen_cam_file_new(char *);
-FILE *I_fopen_cam_file_append(char *);
-FILE *I_fopen_cam_file_old(char *);
-int I_georef(double, double, double *, double *, double[3], double[3]);
-
-/* group_elev.c */
-FILE *I_fopen_group_elev_new(char *);
-FILE *I_fopen_group_elev_old(char *);
-int I_find_group_elev_file(char *);
-
-/* init.c */
-FILE *I_fopen_group_init_new(char *);
-FILE *I_fopen_group_init_old(char *);
-
-/* initial.c */
-int I_get_camera(char *);
-int I_put_camera(char *);
-int I_put_group_camera(char *, char *);
-int I_get_group_camera(char *, char *);
-
-/* ls_cameras.c */
-int I_list_cameras(int);
-
-/* ls_elev.c */
-int I_list_elev(int);
-
-/* open_camera.c */
-int I_open_cam_file_new(char *, char *);
-int I_open_cam_file_old(char *, char *);
-
-/* title_camera.c */
-int I_get_cam_title(char *, char *, int);
-int I_put_camera_title(char *, char *);
-
-/* vask_block.c */
-int I_vask_block_new(char **, char *, char *);
-int I_vask_block_old(char **, char *, char *);
-int I_vask_subblock_new(char **, char *, char *, int, char *);
+#endif

Modified: grass/trunk/include/raster.h
===================================================================
--- grass/trunk/include/raster.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/raster.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -235,6 +235,6 @@
 #define RGBA_COLOR_NONE         0
 
 /*** prototypes ***/
-#include <grass/rasterdefs.h>
+#include <grass/defs/raster.h>
 
 #endif /* GRASS_RASTER_H */

Modified: grass/trunk/include/raster3d.h
===================================================================
--- grass/trunk/include/raster3d.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/raster3d.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -257,6 +257,6 @@
 
 /*============================== Prototypes ================================*/
 
-#include <grass/raster3ddefs.h>
+#include <grass/defs/raster3d.h>
 
 #endif /* #ifndef GRASS_RASTER3D_H */

Deleted: grass/trunk/include/raster3ddefs.h
===================================================================
--- grass/trunk/include/raster3ddefs.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/raster3ddefs.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,357 +0,0 @@
-#ifndef GRASS_RASTER3DDEFS_H
-#define GRASS_RASTER3DDEFS_H
-
-/* cache.c */
-void Rast3d_cache_reset(RASTER3D_cache *);
-void Rast3d_cache_dispose(RASTER3D_cache *);
-void *Rast3d_cache_new(int, int, int, write_fn *, void *, read_fn *, void *);
-void Rast3d_cache_set_remove_fun(RASTER3D_cache *, write_fn *, void *);
-void Rast3d_cache_set_load_fun(RASTER3D_cache *, read_fn *, void *);
-void *Rast3d_cache_new_read(int, int, int, read_fn *, void *);
-int Rast3d_cache_lock(RASTER3D_cache *, int);
-void Rast3d_cache_lock_intern(RASTER3D_cache *, int);
-int Rast3d_cache_unlock(RASTER3D_cache *, int);
-int Rast3d_cache_unlock_all(RASTER3D_cache *);
-int Rast3d_cache_lock_all(RASTER3D_cache *);
-void Rast3d_cache_autolock_on(RASTER3D_cache *);
-void Rast3d_cache_autolock_off(RASTER3D_cache *);
-void Rast3d_cache_set_min_unlock(RASTER3D_cache *, int);
-int Rast3d_cache_remove_elt(RASTER3D_cache *, int);
-int Rast3d_cache_flush(RASTER3D_cache *, int);
-int Rast3d_cache_remove_all(RASTER3D_cache *);
-int Rast3d_cache_flush_all(RASTER3D_cache *);
-void *Rast3d_cache_elt_ptr(RASTER3D_cache *, int);
-int Rast3d_cache_load(RASTER3D_cache *, int);
-int Rast3d_cache_get_elt(RASTER3D_cache *, int, void *);
-int Rast3d_cache_put_elt(RASTER3D_cache *, int, const void *);
-
-/* cachehash.c */
-void Rast3d_cache_hash_reset(Rast3d_cache_hash *);
-void Rast3d_cache_hash_dispose(Rast3d_cache_hash *);
-void *Rast3d_cache_hash_new(int);
-void Rast3d_cache_hash_remove_name(Rast3d_cache_hash *, int);
-void Rast3d_cache_hash_load_name(Rast3d_cache_hash *, int, int);
-int Rast3d_cache_hash_name2index(Rast3d_cache_hash *, int);
-
-/* changeprecision.c */
-void Rast3d_change_precision(void *, int, const char *);
-
-/* changetype.c */
-void Rast3d_change_type(void *, const char *);
-
-/* filecompare.c */
-void Rast3d_compare_files(const char *, const char *, const char *, const char *);
-
-/* filename.c */
-void Rast3d_filename(char *, const char *, const char *, const char *);
-
-/* fpcompress.c */
-void Rast3d_fpcompress_print_binary(char *, int);
-void Rast3d_fpcompress_dissect_xdr_double(unsigned char *);
-int Rast3d_fpcompress_write_xdr_nums(int, char *, int, int, char *, int, int, int);
-int Rast3d_fpcompress_write_xdr_floats(int, char *, int, int, char *, int, int);
-int Rast3d_fpcompress_write_xdr_double(int, char *, int, int, char *, int, int);
-int Rast3d_fpcompress_read_xdr_nums(int, char *, int, int, int, char *, int);
-int Rast3d_fpcompress_read_xdr_floats(int, char *, int, int, int, char *);
-int Rast3d_fpcompress_read_xdr_doubles(int, char *, int, int, int, char *);
-
-/* g3dalloc.c */
-void *Rast3d_malloc(int);
-void *Rast3d_realloc(void *, int);
-void Rast3d_free(void *);
-
-/* g3dcache.c */
-int Rast3d_init_cache(RASTER3D_Map *, int);
-int Rast3d_dispose_cache(RASTER3D_Map *);
-int Rast3d_flush_all_tiles(RASTER3D_Map *);
-
-/* g3dcats.c */
-int Rast3d_write_cats(const char *, struct Categories *);
-int Rast3d_read_cats(const char *, const char *, struct Categories *);
-
-/* g3dclose.c */
-int Rast3d_close(RASTER3D_Map *);
-
-/* g3dcolor.c */
-int Rast3d_remove_color(const char *);
-int Rast3d_read_colors(const char *, const char *, struct Colors *);
-int Rast3d_write_colors(const char *, const char *, struct Colors *);
-
-/* g3ddefaults.c */
-void Rast3d_set_compression_mode(int, int, int, int);
-void Rast3d_get_compression_mode(int *, int *, int *, int *);
-void Rast3d_set_cache_size(int);
-int Rast3d_get_cache_size(void);
-void Rast3d_set_cache_limit(int);
-int Rast3d_get_cache_limit(void);
-void Rast3d_set_file_type(int);
-int Rast3d_get_file_type(void);
-void Rast3d_set_tile_dimension(int, int, int);
-void Rast3d_get_tile_dimension(int *, int *, int *);
-void Rast3d_set_error_fun(void (*)(const char *));
-void Rast3d_set_unit(const char *);
-void Rast3d_init_defaults(void);
-
-/* g3ddoubleio.c */
-int Rast3d_write_doubles(int, int, const double *, int);
-int Rast3d_read_doubles(int, int, double *, int);
-
-/* g3derror.c */
-void Rast3d_skip_error(const char *);
-void Rast3d_print_error(const char *);
-void Rast3d_fatal_error(const char *, ...) __attribute__ ((format(printf, 1, 2)))
-    __attribute__ ((noreturn));
-void Rast3d_fatal_error_noargs(const char *) __attribute__ ((noreturn));
-void Rast3d_error(const char *, ...) __attribute__ ((format(printf, 1, 2)));
-
-/* g3dfpxdr.c */
-int Rast3d_is_xdr_null_num(const void *, int);
-int Rast3d_is_xdr_null_float(const float *);
-int Rast3d_is_xdr_null_double(const double *);
-void Rast3d_set_xdr_null_num(void *, int);
-void Rast3d_set_xdr_null_double(double *);
-void Rast3d_set_xdr_null_float(float *);
-int Rast3d_init_fp_xdr(RASTER3D_Map *, int);
-int Rast3d_init_copy_to_xdr(RASTER3D_Map *, int);
-int Rast3d_copy_to_xdr(const void *, int);
-int Rast3d_init_copy_from_xdr(RASTER3D_Map *, int);
-int Rast3d_copy_from_xdr(int, void *);
-
-/* g3dhistory.c */
-int Rast3d_write_history(const char *, struct History *);
-int Rast3d_read_history(const char *, const char *, struct History *);
-
-/* g3dintio.c */
-int Rast3d_write_ints(int, int, const int *, int);
-int Rast3d_read_ints(int, int, int *, int);
-
-/* g3dkeys.c */
-int Rast3d_key_get_int(struct Key_Value *, const char *, int *);
-int Rast3d_key_get_double(struct Key_Value *, const char *, double *);
-int Rast3d_key_get_string(struct Key_Value *, const char *, char **);
-int Rast3d_key_get_value(struct Key_Value *, const char *, char *, char *, int,
-		    int, int *);
-int Rast3d_key_set_int(struct Key_Value *, const char *, const int *);
-int Rast3d_key_set_double(struct Key_Value *, const char *, const double *);
-int Rast3d_key_set_string(struct Key_Value *, const char *, char *const *);
-int Rast3d_key_set_value(struct Key_Value *, const char *, const char *,
-		    const char *, int, int, const int *);
-/* g3dlong.c */
-int Rast3d_long_encode(long *, unsigned char *, int);
-void Rast3d_long_decode(unsigned char *, long *, int, int);
-
-/* g3dmapset.c */
-void Rast3d_make_mapset_map_directory(const char *);
-
-/* g3dmask.c */
-int Rast3d_mask_close(void);
-int Rast3d_mask_file_exists(void);
-int Rast3d_mask_open_old(void);
-int Rast3d_mask_reopen(int);
-int Rast3d_is_masked(RASTER3D_Map *, int, int, int);
-void Rast3d_mask_num(RASTER3D_Map *, int, int, int, void *, int);
-void Rast3d_mask_float(RASTER3D_Map *, int, int, int, float *);
-void Rast3d_mask_double(RASTER3D_Map *, int, int, int, double *);
-void Rast3d_mask_tile(RASTER3D_Map *, int, void *, int);
-void Rast3d_mask_on(RASTER3D_Map *);
-void Rast3d_mask_off(RASTER3D_Map *);
-int Rast3d_mask_is_on(RASTER3D_Map *);
-int Rast3d_mask_is_off(RASTER3D_Map *);
-const char *Rast3d_mask_file(void);
-int Rast3d_mask_map_exists(void);
-
-/* maskfn.c */
-int Rast3d_mask_d_select(DCELL *, d_Mask *);
-DCELL Rast3d_mask_match_d_interval(DCELL, d_Interval *);
-void Rast3d_parse_vallist(char **, d_Mask **);
-
-/* g3dmisc.c */
-int Rast3d_g3d_type2cell_type(int);
-void Rast3d_copy_float2Double(const float *, int, double *, int, int);
-void Rast3d_copy_double2Float(const double *, int, float *, int, int);
-void Rast3d_copy_values(const void *, int, int, void *, int, int, int);
-int Rast3d_length(int);
-int Rast3d_extern_length(int);
-
-/* g3dnull.c */
-int Rast3d_is_null_value_num(const void *, int);
-void Rast3d_set_null_value(void *, int, int);
-
-/* g3dopen2.c */
-void *Rast3d_open_new_param(const char *, int , int, RASTER3D_Region *, int, int, int, int, int, int, int);
-/* g3dopen.c */
-void *Rast3d_open_cell_old_no_header(const char *, const char *);
-void *Rast3d_open_cell_old(const char *, const char *, RASTER3D_Region *, int, int);
-void *Rast3d_open_cell_new(const char *, int, int, RASTER3D_Region *);
-void *Rast3d_open_new_opt_tile_size(const char *, int , RASTER3D_Region * , int , int );
-
-/* g3dparam.c */
-void Rast3d_set_standard3d_input_params(void);
-int Rast3d_get_standard3d_params(int *, int *, int *, int *, int *, int *, int *,
-			    int *, int *, int *, int *, int *);
-void Rast3d_set_window_params(void);
-char *Rast3d_get_window_params(void);
-
-/* g3drange.c */
-void Rast3d_range_update_from_tile(RASTER3D_Map *, const void *, int, int, int, int,
-			      int, int, int, int);
-int Rast3d_read_range(const char *, const char *, struct FPRange *);
-int Rast3d_range_load(RASTER3D_Map *);
-void Rast3d_range_min_max(RASTER3D_Map *, double *, double *);
-int Rast3d_range_write(RASTER3D_Map *);
-int Rast3d_range_init(RASTER3D_Map *);
-
-/* g3dregion.c */
-void Rast3d_get_region_value(RASTER3D_Map *, double, double, double, void *, int);
-void Rast3d_adjust_region(RASTER3D_Region *);
-void Rast3d_region_copy(RASTER3D_Region *, RASTER3D_Region *);
-void Rast3d_incorporate2d_region(struct Cell_head *, RASTER3D_Region *);
-void Rast3d_region_from_to_cell_head(struct Cell_head *, RASTER3D_Region *);
-void Rast3d_adjust_region_res(RASTER3D_Region *);
-void Rast3d_extract2d_region(RASTER3D_Region *, struct Cell_head *);
-void Rast3d_region_to_cell_head(RASTER3D_Region *, struct Cell_head *);
-int Rast3d_read_region_map(const char *, const char *, RASTER3D_Region *);
-int Rast3d_is_valid_location(RASTER3D_Region *, double, double, double);
-void Rast3d_location2coord(RASTER3D_Region *, double, double, double, int *, int *, int *);
-void Rast3d_location2coord2(RASTER3D_Region *, double, double, double, int *, int *, int *);
-void Rast3d_coord2location(RASTER3D_Region *, double, double, double, double *, double *, double *);
-/* g3dresample.c */
-void Rast3d_nearest_neighbor(RASTER3D_Map *, int, int, int, void *, int);
-void Rast3d_set_resampling_fun(RASTER3D_Map *, void (*)());
-void Rast3d_get_resampling_fun(RASTER3D_Map *, void (**)());
-void Rast3d_get_nearest_neighbor_fun_ptr(void (**)());
-
-/* g3dvolume.c */
-void Rast3d_get_volume_a(void *, double[2][2][2][3], int, int, int, void *, int);
-void Rast3d_get_volume(void *, double, double, double, double, double, double,
-		   double, double, double, double, double, double, int, int,
-		   int, void *, int);
-void Rast3d_get_aligned_volume(void *, double, double, double, double, double,
-			  double, int, int, int, void *, int);
-void Rast3d_make_aligned_volume_file(void *, const char *, double, double, double,
-			       double, double, double, int, int, int);
-/* g3dwindow.c */
-void Rast3d_get_value(RASTER3D_Map *, int, int, int, void *, int);
-float Rast3d_get_float(RASTER3D_Map *, int, int, int);
-double Rast3d_get_double(RASTER3D_Map *, int, int, int);
-void Rast3d_get_window_value(RASTER3D_Map *, double, double, double, void *, int);
-
-
-RASTER3D_Region *Rast3d_window_ptr(void);
-void Rast3d_set_window(RASTER3D_Region *);
-void Rast3d_set_window_map(RASTER3D_Map *, RASTER3D_Region *);
-void Rast3d_get_window(RASTER3D_Region *);
-
-/* g3dwindowio.c */
-void Rast3d_use_window_params(void);
-int Rast3d_read_window(RASTER3D_Region *, const char *);
-
-/* int Rast3d_writeWindow (RASTER3D_Region *, char *); */
-/* getblock.c */
-void Rast3d_get_block_nocache(RASTER3D_Map *, int, int, int, int, int, int, void *,
-			 int);
-void Rast3d_get_block(RASTER3D_Map *, int, int, int, int, int, int, void *, int);
-
-/* header.c */
-int Rast3d_read_header(RASTER3D_Map *, int *, int *, double *, double *, double *,
-		   double *, double *, double *, int *, int *, int *,
-		   double *, double *, double *, int *, int *, int *, int *,
-		   int *, int *, int *, int *, int *, int *, int *, char **);
-int Rast3d_write_header(RASTER3D_Map *, int, int, double, double, double, double,
-		    double, double, int, int, int, double, double, double,
-		    int, int, int, int, int, int, int, int, int, int, int,
-		    char *);
-int Rast3d_cache_size_encode(int, int);
-int Rast3d__compute_cache_size(RASTER3D_Map *, int);
-int Rast3d_fill_header(RASTER3D_Map *, int, int, int, int, int, int, int, int, int,
-		   int, int, int, int, int, int, int, double, double, double,
-		   double, double, double, int, int, int, double, double,
-		   double, char *);
-/* headerinfo.c */
-void Rast3d_get_coords_map(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_get_coords_map_window(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_get_nof_tiles_map(RASTER3D_Map *, int *, int *, int *);
-void Rast3d_get_region_map(RASTER3D_Map *, double *, double *, double *, double *,
-		      double *, double *);
-void Rast3d_get_window_map(RASTER3D_Map *, double *, double *, double *, double *,
-		      double *, double *);
-void Rast3d_get_tile_dimensions_map(RASTER3D_Map *, int *, int *, int *);
-int Rast3d_tile_type_map(RASTER3D_Map *);
-int Rast3d_file_type_map(RASTER3D_Map *);
-int Rast3d_tile_precision_map(RASTER3D_Map *);
-int Rast3d_tile_use_cache_map(RASTER3D_Map *);
-void Rast3d_print_header(RASTER3D_Map *);
-void Rast3d_get_region_struct_map(RASTER3D_Map *, RASTER3D_Region *);
-
-/* index.c */
-int Rast3d_flush_index(RASTER3D_Map *);
-int Rast3d_init_index(RASTER3D_Map *, int);
-
-/* retile.c */
-void Rast3d_retile(void *, const char *, int, int, int);
-
-/* rle.c */
-int Rast3d_rle_count_only(char *, int, int);
-void Rast3d_rle_encode(char *, char *, int, int);
-void Rast3d_rle_decode(char *, char *, int, int, int *, int *);
-
-/* tilealloc.c */
-void *Rast3d_alloc_tiles_type(RASTER3D_Map *, int, int);
-void *Rast3d_alloc_tiles(RASTER3D_Map *, int);
-void Rast3d_free_tiles(void *);
-
-/* tileio.c */
-void *Rast3d_get_tile_ptr(RASTER3D_Map *, int);
-int Rast3d_tile_load(RASTER3D_Map *, int);
-int Rast3d__remove_tile(RASTER3D_Map *, int);
-float Rast3d_get_float_region(RASTER3D_Map *, int, int, int);
-double Rast3d_get_double_region(RASTER3D_Map *, int, int, int);
-void Rast3d_get_value_region(RASTER3D_Map *, int, int, int, void *, int);
-
-/* tilemath.c */
-void Rast3d_compute_optimal_tile_dimension(RASTER3D_Region *, int, int *, int *, int *, int);
-void Rast3d_tile_index2tile(RASTER3D_Map *, int, int *, int *, int *);
-int Rast3d_tile2tile_index(RASTER3D_Map *, int, int, int);
-void Rast3d_tile_coord_origin(RASTER3D_Map *, int, int, int, int *, int *, int *);
-void Rast3d_tile_index_origin(RASTER3D_Map *, int, int *, int *, int *);
-void Rast3d_coord2tile_coord(RASTER3D_Map *, int, int, int, int *, int *, int *, int *,
-			 int *, int *);
-void Rast3d_coord2tile_index(RASTER3D_Map *, int, int, int, int *, int *);
-int Rast3d_coord_in_range(RASTER3D_Map *, int, int, int);
-int Rast3d_tile_index_in_range(RASTER3D_Map *, int);
-int Rast3d_tile_in_range(RASTER3D_Map *, int, int, int);
-int Rast3d_compute_clipped_tile_dimensions(RASTER3D_Map *, int, int *, int *, int *,
-				     int *, int *, int *);
-
-/* tilenull.c */
-void Rast3d_set_null_tile_type(RASTER3D_Map *, void *, int);
-void Rast3d_set_null_tile(RASTER3D_Map *, void *);
-
-/* tileread.c */
-int Rast3d_read_tile(RASTER3D_Map *, int, void *, int);
-int Rast3d_read_tile_float(RASTER3D_Map *, int, void *);
-int Rast3d_read_tile_double(RASTER3D_Map *, int, void *);
-int Rast3d_lock_tile(RASTER3D_Map *, int);
-int Rast3d_unlock_tile(RASTER3D_Map *, int);
-int Rast3d_unlock_all(RASTER3D_Map *);
-void Rast3d_autolock_on(RASTER3D_Map *);
-void Rast3d_autolock_off(RASTER3D_Map *);
-void Rast3d_min_unlocked(RASTER3D_Map *, int);
-int Rast3d_begin_cycle(RASTER3D_Map *);
-int Rast3d_end_cycle(RASTER3D_Map *);
-
-/* tilewrite.c */
-int Rast3d_write_tile(RASTER3D_Map *, int, const void *, int);
-int Rast3d_write_tile_float(RASTER3D_Map *, int, const void *);
-int Rast3d_write_tile_double(RASTER3D_Map *, int, const void *);
-int Rast3d_flush_tile(RASTER3D_Map *, int);
-int Rast3d_flush_tile_cube(RASTER3D_Map *, int, int, int, int, int, int);
-int Rast3d_flush_tiles_in_cube(RASTER3D_Map *, int, int, int, int, int, int);
-int Rast3d_put_float(RASTER3D_Map *, int, int, int, float);
-int Rast3d_put_double(RASTER3D_Map *, int, int, int, double);
-int Rast3d_put_value(RASTER3D_Map *, int, int, int, const void *, int);
-
-/* writeascii.c */
-void Rast3d_write_ascii(void *, const char *);
-
-#endif /* RASTER3DDEFS */

Deleted: grass/trunk/include/rasterdefs.h
===================================================================
--- grass/trunk/include/rasterdefs.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/rasterdefs.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,586 +0,0 @@
-#ifndef GRASS_RASTERDEFS_H
-#define GRASS_RASTERDEFS_H
-
-#include <grass/gis.h>
-
-/* --- ANSI prototypes for the lib/raster functions --- */
-
-/* align_window.c */
-void Rast_align_window(struct Cell_head *, const struct Cell_head *);
-
-/* 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);
-
-void *Rast_allocate_input_buf(RASTER_MAP_TYPE);
-CELL *Rast_allocate_c_input_buf(void);
-FCELL *Rast_allocate_f_input_buf(void);
-DCELL *Rast_allocate_d_input_buf(void);
-char *Rast_allocate_null_input_buf(void);
-
-void *Rast_allocate_output_buf(RASTER_MAP_TYPE);
-CELL *Rast_allocate_c_output_buf(void);
-FCELL *Rast_allocate_f_output_buf(void);
-DCELL *Rast_allocate_d_output_buf(void);
-char *Rast_allocate_null_output_buf(void);
-
-/* 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);
-void Rast_write_cats(const char *, struct Categories *);
-void 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));
-
-/* close.c */
-void Rast_close(int);
-void Rast_unopen(int);
-void Rast__unopen_all(void);
-
-/* 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_out.c */
-void Rast_print_colors(struct Colors *, DCELL, DCELL, FILE *, int);
-
-/* 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 *);
-int Rast__read_colors(const char *, 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 */
-void 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 */
-void Rast_get_cellhd(const char *, const char *, struct Cell_head *);
-
-/* get_row.c */
-void Rast_get_row_nomask(int, void *, int, RASTER_MAP_TYPE);
-void Rast_get_c_row_nomask(int, CELL *, int);
-void Rast_get_f_row_nomask(int, FCELL *, int);
-void Rast_get_d_row_nomask(int, DCELL *, int);
-void Rast_get_row(int, void *, int, RASTER_MAP_TYPE);
-void Rast_get_c_row(int, CELL *, int);
-void Rast_get_f_row(int, FCELL *, int);
-void Rast_get_d_row(int, DCELL *, int);
-void Rast_get_null_value_row(int, char *, int);
-
-/* get_row_colr.c */
-void 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 *);
-void Rast_write_histogram(const char *, const struct Histogram *);
-void 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(struct History *, FILE *);
-int Rast_read_history(const char *, const char *, struct History *);
-void Rast__write_history(struct History *, FILE *);
-void Rast_write_history(const char *, struct History *);
-void Rast_short_history(const char *, const char *, struct History *);
-int Rast_command_history(struct History *);
-void Rast_append_history(struct History *, const char *);
-void Rast_append_format_history(struct History *, const char *, ...)
-    __attribute__ ((format(printf, 2, 3)));
-const char *Rast_get_history(struct History *, int);
-void Rast_set_history(struct History *, int, const char *);
-void Rast_format_history(struct History *, int, const char *, ...)
-    __attribute__ ((format(printf, 3, 4)));
-void Rast_clear_history(struct History *);
-void Rast_free_history(struct History *);
-int Rast_history_length(struct History *);
-const char *Rast_history_line(struct History *, int);
-
-/* init.c */
-void Rast_init(void);
-void Rast__check_init(void);
-void Rast_init_all(void);
-void Rast__init(void);
-void Rast__error_handler(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);
-DCELL Rast_interp_lanczos(double, double, DCELL *);
-DCELL Rast_interp_cubic_bspline(double, DCELL, DCELL, DCELL, DCELL);
-DCELL Rast_interp_bicubic_bspline(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 */
-#define Rast_is_c_null_value(cellVal)	\
-    (*(const CELL *)(cellVal) == (CELL) 0x80000000)
-#define Rast_is_f_null_value(fcellVal)	\
-    (*(const FCELL *)(fcellVal) != *(const FCELL *)(fcellVal))
-#define Rast_is_d_null_value(dcellVal)	\
-    (*(const DCELL *)(dcellVal) != *(const DCELL *)(dcellVal))
-
-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);
-#ifndef Rast_is_c_null_value
-int Rast_is_c_null_value(const CELL *);
-#endif
-#ifndef Rast_is_f_null_value
-int Rast_is_f_null_value(const FCELL *);
-#endif
-#ifndef Rast_is_f_null_value
-int Rast_is_d_null_value(const DCELL *);
-#endif
-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);
-
-/* open.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 *);
-void 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);
-void Rast_set_quant_rules(int, struct Quant *);
-
-/* put_cellhd.c */
-void Rast_put_cellhd(const char *, struct Cell_head *);
-
-/* put_row.c */
-void Rast_put_row(int, const void *, RASTER_MAP_TYPE);
-void Rast_put_c_row(int, const CELL *);
-void Rast_put_f_row(int, const FCELL *);
-void Rast_put_d_row(int, const DCELL *);
-int Rast__open_null_write(int);
-void 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 */
-void Rast_truncate_fp_map(const char *, const char *);
-void Rast_round_fp_map(const char *, const char *);
-void Rast_quantize_fp_map(const char *, const char *, CELL, CELL);
-void Rast_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
-				CELL);
-void 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 *);
-void Rast_write_range(const char *, const struct Range *);
-void 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 */
-char *Rast_read_units(const char *, const char *);
-char *Rast_read_vdatum(const char *, const char *);
-void Rast_write_units(const char *, const char *);
-void 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 */
-void Rast__init_window(void);
-void Rast_set_window(struct Cell_head *);
-void Rast_unset_window(void);
-void Rast_set_output_window(struct Cell_head *);
-void Rast_set_input_window(struct Cell_head *);
-
-/* window.c */
-void Rast_get_window(struct Cell_head *);
-void Rast_get_input_window(struct Cell_head *);
-void Rast_get_output_window(struct Cell_head *);
-int Rast_window_rows(void);
-int Rast_window_cols(void);
-int Rast_input_window_rows(void);
-int Rast_input_window_cols(void);
-int Rast_output_window_rows(void);
-int Rast_output_window_cols(void);
-double Rast_northing_to_row(double, const struct Cell_head *);
-double Rast_easting_to_col(double, const struct Cell_head *);
-double Rast_row_to_northing(double, const struct Cell_head *);
-double Rast_col_to_easting(double, const struct Cell_head *);
-
-/* window_map.c */
-void Rast__create_window_mapping(int);
-int Rast_row_repeat_nomask(int, int);
-
-/* zero_cell.c */
-void Rast_zero_buf(void *, RASTER_MAP_TYPE);
-void Rast_zero_input_buf(void *, RASTER_MAP_TYPE);
-void Rast_zero_output_buf(void *, RASTER_MAP_TYPE);
-
-#endif /* GRASS_RASTERDEFS_H */

Modified: grass/trunk/include/rbtree.h
===================================================================
--- grass/trunk/include/rbtree.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/rbtree.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -60,6 +60,9 @@
  * 
  *************************************************************/
 
+#ifndef GRASS_RBTREE_H
+#define GRASS_RBTREE_H
+
 #include <stddef.h>
 
 /* maximum RB Tree height */
@@ -96,17 +99,6 @@
     int first;                      /* little helper flag */
 };
 
-/* tree functions */
-struct RB_TREE *rbtree_create(rb_compare_fn *, size_t);
-void rbtree_destroy(struct RB_TREE *);
-int rbtree_insert(struct RB_TREE *, void *);
-int rbtree_remove(struct RB_TREE *, const void *);
-void *rbtree_find(struct RB_TREE *, const void *);
+#include <grass/defs/rbtree.h>
 
-/* tree traversal functions */
-int rbtree_init_trav(struct RB_TRAV *, struct RB_TREE *);
-void* rbtree_traverse(struct RB_TRAV *);
-void *rbtree_traverse_start(struct RB_TRAV *, const void *);
-
-/* debug tree from given node downwards */
-int rbtree_debug(struct RB_TREE *, struct RB_NODE *);
+#endif

Deleted: grass/trunk/include/readsites.h
===================================================================
--- grass/trunk/include/readsites.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/readsites.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <math.h>
-#include <grass/gis.h>
-#include <grass/site.h>
-
-/*---------------------typedefs*/
-
-struct zstruct
-{
-    double x, y, z;
-};
-typedef struct zstruct Z;
-
-/*--------------------functions */
-int G_readsites(FILE *, int, int, int, struct Cell_head *, Z **);

Modified: grass/trunk/include/rowio.h
===================================================================
--- grass/trunk/include/rowio.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/rowio.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,13 +20,6 @@
     } *rcb;
 } ROWIO;
 
-int Rowio_fileno(const ROWIO *);
-void Rowio_forget(ROWIO *, int);
-void *Rowio_get(ROWIO *, int);
-void Rowio_flush(ROWIO *);
-int Rowio_put(ROWIO *, const void *, int);
-void Rowio_release(ROWIO *);
-int Rowio_setup(ROWIO *, int, int, int, int (*)(int, void *, int, int),
-		int (*)(int, const void *, int, int));
+#include <grass/defs/rowio.h>
 
 #endif

Deleted: grass/trunk/include/search.h
===================================================================
--- grass/trunk/include/search.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/search.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +0,0 @@
-#ifndef _SEARCH_H
-#define _SEARCH_H
-#endif

Modified: grass/trunk/include/segment.h
===================================================================
--- grass/trunk/include/segment.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/segment.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -57,19 +57,6 @@
     int offset;			/* offset of data past header */
 } SEGMENT;
 
-int segment_address(const SEGMENT *, int, int, int *, int *);
-int segment_flush(SEGMENT *);
-int segment_format(int, int, int, int, int, int);
-int segment_format_nofill(int, int, int, int, int, int);
-int segment_get(SEGMENT *, void *, int, int);
-int segment_get_row(const SEGMENT *, void *, int);
-int segment_init(SEGMENT *, int, int);
-int segment_pagein(SEGMENT *, int);
-int segment_pageout(SEGMENT *, int);
-int segment_put(SEGMENT *, const void *, int, int);
-int segment_put_row(const SEGMENT *, const void *, int);
-int segment_release(SEGMENT *);
-int segment_seek(const SEGMENT *, int, int);
-int segment_setup(SEGMENT *);
+#include <grass/defs/segment.h>
 
 #endif /* GRASS_SEGMENT_H */

Modified: grass/trunk/include/site.h
===================================================================
--- grass/trunk/include/site.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/site.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,11 +1,8 @@
-/*-
- * 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.
- */
+#ifndef GRASS_SITE_H
+#define GRASS_SITE_H
 
 #include <grass/raster.h>
+#include <grass/vector.h>
 
 #define MAX_SITE_STRING 1024
 #define MAX_SITE_LEN 4096
@@ -76,30 +73,12 @@
 } SITE_XYZ;
 
 
-/* Allocate 'num' SITE_XYZ structs. Returns NULL on failure */
-SITE_XYZ *G_alloc_site_xyz(size_t);
+struct zstruct
+{
+    double x, y, z;
+};
+typedef struct zstruct Z;
 
+#include <grass/defs/site.h>
 
-/* Free the array of SITE_XYZ struct */
-void G_free_site_xyz(SITE_XYZ *);
-
-
-/* G_readsites_xyz: Reads a sites file converting to a site struct of xyz
- * values and the cat value.  The Z value can come from one of the
- * n-dimensions, a double attribute, or a string attribute converted to a
- * double with strtod().  The 'size' must not be greater than the number
- * of elements in the SITE_XYZ array, or bad things will happen. The number 
- * of records read is returned or EOF on end of file. NOTE: EOF won't be
- * returned unless no records are read and the EOF bit is set. It's safe
- * to assume that if the number of records read is less than the size of
- * the array, that there aren't any more records.
- */
-int G_readsites_xyz(FILE *,	/* The FILE stream to the sites file               */
-		    int,	/* Attribute type: SITE_COL_DIM, etc...            */
-		    int,	/* The field index (1 based) for the attribute     */
-		    int,	/* Size of the array                               */
-		    struct Cell_head *,	/* Respect region if not NULL */
-		    SITE_XYZ * xyz	/* The site array of size 'size'                   */
-    );
-
-#include <grass/P_site.h>
+#endif

Modified: grass/trunk/include/sitelib.h
===================================================================
--- grass/trunk/include/sitelib.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/sitelib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,136 +1,11 @@
 #ifndef GRASS_SITELIB_H
 #define GRASS_SITELIB_H
+
 /* From src/sites/Lib */
 #ifndef GRASS_SITE_H
 #include <grass/site.h>
 #endif
-/* announce.c */
-int announce(char *);
 
-/* ask_quad.c */
-int ask_quad(int *);
+#include <grass/defs/sitelib.h>
 
-/* center.c */
-int center(char *, int);
-
-/* chain.c */
-int chain(char *);
-
-/* copy_sites.c */
-int copy_sites(SITE_LIST *, SITE_LIST *, int);
-
-/* copyfile.c */
-int copyfile(char *, char *);
-
-/* count_site.c */
-int count_sites(SITE_LIST *, int);
-
-/* counter.c */
-int counter_reset(char *, int);
-int counter(int);
-
-/* die.c */
-int die(char *);
-
-/* eq_sites.c */
-int equal_sites(SITE_LIST *, SITE_LIST *);
-
-/* execute.c */
-int execute(char *);
-
-/* hitreturn.c */
-int hitreturn(void);
-
-/* maximum.c */
-int maximum(register int *, int);
-
-/* memcopy.c */
-int memcopy(char *, char *, int);
-
-#ifdef MENU
-/* menu_hndlr.c */
-int menu_handler(MENU, char *);
 #endif
-
-/* meta_reprt.c */
-int meta_report(char *, char *, char *, int, int);
-
-/* parse.c */
-int parse(char *, char *[], int, char *);
-
-/* read_sites.c */
-int read_site_list(SITE_LIST *, FILE *);
-int get_site_list(SITE_LIST *, char *);
-
-/* region.c */
-char *format_res(double, char *, int);
-char *format_east(double, char *, int);
-char *format_north(double, char *, int);
-int scan_north(char *, double *);
-int scan_east(char *, double *);
-int scan_res(char *, double *);
-
-#ifdef REPORT
-/* report.c */
-REPORT *report_open(char *);
-REPORT *report_open_ref(char *, REPORT *);
-int report_close(REPORT *);
-int report_read(REPORT *);
-int report_record(REPORT *, char *);
-int report_read_record(REPORT *, char *);
-int report_scan(REPORT *);
-int report_matrix(REPORT *);
-
-/* rprt_finds.c */
-rprt_finds.c:int report_find_layer(REPORT *, int);
-rprt_finds.c:int report_find_cat(REPORT *, int, int);
-rprt_finds.c:int report_find_point(REPORT *, int);
-rprt_finds.c:int report_find_data(REPORT *, int, int);
-
-/* rprt_seeks.c */
-rprt_seeks.c:int report_seek_layers(REPORT *);
-rprt_seeks.c:int report_seek_points(REPORT *);
-rprt_seeks.c:int report_seek_cats(REPORT *);
-rprt_seeks.c:int report_seek_data(REPORT *);
-#endif
-
-/* rpt_screen.c */
-int new_report_screen(void);
-
-/* scan_int.c */
-int scan_int(char *, int *);
-
-/* scn_double.c */
-int scan_double(char *, double *);
-
-/* scopy.c */
-int scopy(char *, char *, int);
-
-/* site.c */
-int add_site(SITE_LIST *, double, double, char *);
-int initialize_site_list(SITE_LIST *);
-int rewind_site_list(SITE_LIST *);
-int next_site(SITE_LIST *, double *, double *, char **);
-int free_site_list(SITE_LIST *);
-
-/* sort_int.c */
-int sort_int(int[], int, int);
-
-/* trace.c */
-int trace(int);
-
-/* ut_to_cell.c */
-float northing_to_row(double, struct Cell_head *);
-float easting_to_col(double, struct Cell_head *);
-
-/* within_wnd.c */
-int within_window(double, double, struct Cell_head *);
-
-/* write_site.c */
-int put_site_list(SITE_LIST *, char *, int, int);
-int write_site_list(SITE_LIST *, FILE *, int, int);
-
-/* yes.c */
-int yes(char *);
-
-#endif

Modified: grass/trunk/include/spawn.h
===================================================================
--- grass/trunk/include/spawn.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/spawn.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,4 +1,3 @@
-
 #ifndef GRASS_SPAWN_H
 #define GRASS_SPAWN_H
 
@@ -41,9 +40,6 @@
     SST_CHILD,
 };
 
-extern int G_spawn(const char *command, ...);
-extern int G_vspawn_ex(const char *command, const char **args);
-extern int G_spawn_ex(const char *command, ...);
-extern int G_wait(int i_pid);
+#include <grass/defs/spawn.h>
 
 #endif

Modified: grass/trunk/include/sqlp.h
===================================================================
--- grass/trunk/include/sqlp.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/sqlp.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_SQLP_H
+#define GRASS_SQLP_H
+
 /* SQL Parser */
 
 /* KEYWORD OPS */
@@ -104,41 +107,8 @@
     int orderDir;		/* direction of ordering (ASC or DESC) */
 } SQLPSTMT;
 
-int my_yyinput(char *buf, int max_size);
-void yyerror(char *s);
-int yyparse();
-int yywrap();
+#include <grass/defs/sqlp.h>
 
-int sqpSaveStr(SQLPVALUE * st, char *c);
-void sqpInitValue(SQLPVALUE * val);
-void sqpCopyValue(SQLPVALUE * from, SQLPVALUE * to);
-
-SQLPSTMT *sqpInitStmt(void);
-int sqpFreeStmt(SQLPSTMT * st);
-int sqpPrintStmt(SQLPSTMT * st);
-int sqpAllocCol(SQLPSTMT * st, int n);
-int sqpAllocVal(SQLPSTMT * st, int n);
-int sqpAllocCom(SQLPSTMT * st, int n);
-int sqpInitParser(SQLPSTMT * st);
-
-
-void sqpCommand(int command);
-void sqpTable(char *table);
-void sqpColumn(char *column);
-void sqpColumnDef(char *column, int type, int width, int decimals);
-void sqpValue(char *strval, int intval, double dblval, int type);
-void sqpAssignment(char *column, char *strval, int intval, double dblval,
-		   SQLPNODE * expr, int type);
-void sqpOrderColumn(char *col, int dir);
-int sqpOperatorCode(char *);
-char *sqpOperatorName(int);
-
-SQLPNODE *sqpNewNode(void);
-
-SQLPNODE *sqpNewExpressionNode(int oper, SQLPNODE * left, SQLPNODE * right);
-SQLPNODE *sqpNewColumnNode(char *name);
-SQLPNODE *sqpNewValueNode(char *strval, int intval, double dblval, int type);
-
-void sqpFreeNode(SQLPNODE *);
-
 extern SQLPSTMT *sqlpStmt;
+
+#endif

Modified: grass/trunk/include/stats.h
===================================================================
--- grass/trunk/include/stats.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/stats.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,58 +1,9 @@
-
 #ifndef GRASS_STATS_H
 #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 *);
+#include <grass/defs/stats.h>
 
-extern stat_func c_ave;
-extern stat_func c_count;
-extern stat_func c_divr;
-extern stat_func c_intr;
-extern stat_func c_max;
-extern stat_func c_maxx;
-extern stat_func c_median;
-extern stat_func c_min;
-extern stat_func c_minx;
-extern stat_func c_mode;
-extern stat_func c_stddev;
-extern stat_func c_sum;
-extern stat_func c_thresh;
-extern stat_func c_var;
-extern stat_func c_range;
-extern stat_func c_reg_m;
-extern stat_func c_reg_c;
-extern stat_func c_reg_r2;
-extern stat_func c_quart1;
-extern stat_func c_quart3;
-extern stat_func c_perc90;
-extern stat_func c_quant;
-extern stat_func c_skew;
-extern stat_func c_kurt;
-
-extern stat_func_w w_ave;
-extern stat_func_w w_count;
-extern stat_func_w w_median;
-extern stat_func_w w_min;
-extern stat_func_w w_max;
-extern stat_func_w w_mode;
-extern stat_func_w w_quart1;
-extern stat_func_w w_quart3;
-extern stat_func_w w_perc90;
-extern stat_func_w w_quant;
-extern stat_func_w w_reg_m;
-extern stat_func_w w_reg_c;
-extern stat_func_w w_reg_r2;
-extern stat_func_w w_stddev;
-extern stat_func_w w_sum;
-extern stat_func_w w_var;
-extern stat_func_w w_skew;
-extern stat_func_w w_kurt;
-
-extern int sort_cell(DCELL *, int);
-extern int sort_cell_w(DCELL(*)[2], int);
-
 #endif

Modified: grass/trunk/include/symbol.h
===================================================================
--- grass/trunk/include/symbol.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/symbol.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,5 +1,5 @@
-#ifndef GRASS_SYMB_H
-#define GRASS_SYMB_H
+#ifndef GRASS_SYMBOL_H
+#define GRASS_SYMBOL_H
 
 /* definitions and structures */
 
@@ -71,8 +71,6 @@
     SYMBPART **part;		/* objects ( parts ) */
 } SYMBOL;
 
-/* prototypes */
-SYMBOL *S_read(const char *sname);
-void S_stroke(SYMBOL * symb, double size, double rotation, int tolerance);
+#include <grass/defs/symbol.h>
 
 #endif

Modified: grass/trunk/include/transform.h
===================================================================
--- grass/trunk/include/transform.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/transform.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_TRANSFORM_H
+#define GRASS_TRANSFORM_H
+
 /* This is the definition file for the libtrans functions.
    These are the tools that move data from one coordinate system into
    another.
@@ -7,19 +10,6 @@
  */
 #define DIM_matrix 3
 
-/* inverse.c */
-int inverse(double[DIM_matrix][DIM_matrix]);
-int isnull(double[DIM_matrix][DIM_matrix]);
+#include <grass/defs/transform.h>
 
-/* m_mult.c */
-int m_mult(double[DIM_matrix][DIM_matrix], double *, double *);
-
-/* transform.c */
-int compute_transformation_coef(double *, double *, double *, double *, int *,
-				int);
-int transform_a_into_b(double, double, double *, double *);
-int transform_b_into_a(double, double, double *, double *);
-int residuals_a_predicts_b(double *, double *, double *, double *, int *, int,
-			   double *, double *);
-int residuals_b_predicts_a(double *, double *, double *, double *, int *, int,
-			   double *, double *);
+#endif

Modified: grass/trunk/include/vbuildlib.h
===================================================================
--- grass/trunk/include/vbuildlib.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/vbuildlib.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,3 +1,6 @@
+#ifndef GRASS_VBUILDLIB_H
+#define GRASS_VBUILDLIB_H
+
 /* Prototypes from src/mapdev/v.build */
 /* area.c */
 int build_all_areas(struct Map_info *, struct Map_info *);
@@ -56,3 +59,5 @@
 int write_areas_asc(struct Map_info *, FILE *, FILE *, struct Plus_head *);
 int write_atts_asc(struct Map_info *, FILE *, FILE *, struct Plus_head *);
 int write_isles_asc(struct Map_info *, FILE *, FILE *, struct Plus_head *);
+
+#endif

Modified: grass/trunk/include/vector.h
===================================================================
--- grass/trunk/include/vector.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/vector.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,5 +1,5 @@
-#ifndef GRASS_VECT_H
-#define GRASS_VECT_H
+#ifndef GRASS_VECTOR_H
+#define GRASS_VECTOR_H
 #include <grass/gis.h>
 #include <grass/vect/digit.h>
 
@@ -11,540 +11,6 @@
 #endif
 #endif
 
-/* --- ANSI prototypes for the lib/vector/Vlib functions --- */
+#include <grass/defs/vector.h>
 
-/*
- * "Public" functions, for use in modules
- */
-/* Points (line) */
-struct line_pnts *Vect_new_line_struct(void);
-int Vect_append_point(struct line_pnts *, double, double, double);
-int Vect_append_points(struct line_pnts *, const struct line_pnts *, int);
-int Vect_line_insert_point(struct line_pnts *, int, double, double, double);
-int Vect_line_delete_point(struct line_pnts *, int);
-int Vect_line_get_point(const struct line_pnts *, int ,
-			double *, double *, double *);
-int Vect_get_num_line_points(const struct line_pnts *);
-int Vect_line_prune(struct line_pnts *);
-int Vect_line_prune_thresh(struct line_pnts *, double);
-void Vect_line_reverse(struct line_pnts *);
-int Vect_copy_xyz_to_pnts(struct line_pnts *, const double *, const double *, const double *,
-			  int);
-int Vect_copy_pnts_to_xyz(const struct line_pnts *, double *, double *, double *,
-			  int *);
-void Vect_reset_line(struct line_pnts *);
-void Vect_destroy_line_struct(struct line_pnts *);
-int Vect_point_on_line(const struct line_pnts *, double, double *, double *,
-		       double *, double *, double *);
-int Vect_line_segment(const struct line_pnts *, double, double, struct line_pnts *);
-double Vect_line_length(const struct line_pnts *);
-double Vect_area_perimeter(const struct line_pnts *);
-double Vect_line_geodesic_length(const struct line_pnts *);
-int Vect_line_distance(const struct line_pnts *, double, double, double, int,
-		       double *, double *, double *, double *, double *,
-		       double *);
-void Vect_line_box(const struct line_pnts *, struct bound_box *);
-void Vect_line_parallel(struct line_pnts *, double, double, int,
-			struct line_pnts *);
-void Vect_line_parallel2(struct line_pnts *, double, double,
-			 double, int, int, double,
-			 struct line_pnts *);
-void Vect_line_buffer(const struct line_pnts *, double, double, struct line_pnts *);
-void Vect_line_buffer2(const struct line_pnts *, double, double,
-		       double, int, int, double,
-		       struct line_pnts **,
-		       struct line_pnts ***, int *);
-void Vect_area_buffer2(const struct Map_info *, int, double, double,
-		       double, int, int, double,
-		       struct line_pnts **,
-		       struct line_pnts ***, int *);
-void Vect_point_buffer2(double, double, double, double,
-			double, int, double,
-			struct line_pnts **);
-
-
-/* Categories */
-struct line_cats *Vect_new_cats_struct(void);
-int Vect_cat_set(struct line_cats *, int, int);
-int Vect_cat_get(const struct line_cats *, int, int *);
-int Vect_cat_del(struct line_cats *, int);
-int Vect_field_cat_del(struct line_cats *, int, int);
-int Vect_field_cat_get(const struct line_cats *, int, struct ilist *);
-int Vect_cat_in_array(int, const int *, int);
-int Vect_reset_cats(struct line_cats *);
-void Vect_destroy_cats_struct(struct line_cats *);
-int Vect_get_area_cats(const struct Map_info *, int, struct line_cats *);
-int Vect_get_area_cat(const struct Map_info *, int, int);
-int Vect_get_line_cat(const struct Map_info *, int, int);
-
-/* List of categories */
-struct cat_list *Vect_new_cat_list(void);
-int Vect_str_to_cat_list(const char *, struct cat_list *);
-int Vect_array_to_cat_list(const int *, int, struct cat_list *);
-int Vect_cat_in_cat_list(int, const struct cat_list *);
-void Vect_destroy_cat_list(struct cat_list *);
-
-/* Vector array */
-struct varray *Vect_new_varray(int);
-int Vect_set_varray_from_cat_string(const struct Map_info *, int, const char *, int,
-				    int, struct varray *);
-int Vect_set_varray_from_cat_list(const struct Map_info *, int, struct cat_list *,
-				  int, int, struct varray *);
-int Vect_set_varray_from_db(const struct Map_info *, int, const char *, int, int,
-			    struct varray *);
-
-/* DB connection - field info */
-struct dblinks *Vect_new_dblinks_struct(void);
-void Vect_reset_dblinks(struct dblinks *);
-int Vect_add_dblink(struct dblinks *, int, const char *,
-		    const char *, const char *, const char *, const char *);
-int Vect_check_dblink(const struct dblinks *, int, const char *);
-int Vect_map_add_dblink(struct Map_info *, int, const char *,
-			const char *, const char *, const char *,
-			const char *);
-int Vect_map_del_dblink(struct Map_info *, int);
-void Vect_copy_map_dblinks(const struct Map_info *, struct Map_info *, int);
-int Vect_map_check_dblink(const struct Map_info *, int, const char *);
-int Vect_read_dblinks(struct Map_info *);
-int Vect_write_dblinks(struct Map_info *);
-struct field_info *Vect_default_field_info(struct Map_info *, int,
-					   const char *, int);
-struct field_info *Vect_get_dblink(const struct Map_info *, int);
-struct field_info *Vect_get_field(const struct Map_info *, int);
-struct field_info *Vect_get_field_by_name(const struct Map_info *, const char *);
-struct field_info *Vect_get_field2(const struct Map_info *, const char *);
-int Vect_get_field_number(const struct Map_info *, const char *);
-void Vect_set_db_updated(struct Map_info *);
-const char *Vect_get_column_names(const struct Map_info *, int);
-const char *Vect_get_column_types(const struct Map_info *, int);
-const char *Vect_get_column_names_types(const struct Map_info *, int);
-
-/* List of FID (feature ID) (integers) */
-struct ilist *Vect_new_list(void);
-int Vect_list_append(struct ilist *, int);
-int Vect_list_append_list(struct ilist *, const struct ilist *);
-int Vect_list_delete(struct ilist *, int);
-int Vect_list_delete_list(struct ilist *, const struct ilist *);
-int Vect_val_in_list(const struct ilist *, int);
-int Vect_reset_list(struct ilist *);
-void Vect_destroy_list(struct ilist *);
-
-/* List of bounding boxes with ids */
-struct boxlist *Vect_new_boxlist(int);
-int Vect_boxlist_append(struct boxlist *, int, struct bound_box);
-int Vect_boxlist_append_list(struct boxlist *, const struct boxlist *);
-int Vect_boxlist_delete(struct boxlist *, int);
-int Vect_boxlist_delete_boxlist(struct boxlist *, const struct boxlist *);
-int Vect_val_in_boxlist(const struct boxlist *, int);
-int Vect_reset_boxlist(struct boxlist *);
-void Vect_destroy_boxlist(struct boxlist *);
-
-/* Bounding box (MBR) */
-int Vect_point_in_box(double, double, double, const struct bound_box *);
-int Vect_box_overlap(const struct bound_box *, const struct bound_box *);
-int Vect_box_copy(struct bound_box *, const struct bound_box *);
-int Vect_box_extend(struct bound_box *, const struct bound_box *);
-int Vect_box_clip(double *, double *, double *, double *, const struct bound_box *);
-int Vect_region_box(const struct Cell_head *, struct bound_box *);
-
-/* Category index */
-int Vect_cidx_get_num_fields(const struct Map_info *);
-int Vect_cidx_get_field_number(const struct Map_info *, int);
-int Vect_cidx_get_field_index(const struct Map_info *, int);
-int Vect_cidx_get_num_unique_cats_by_index(const struct Map_info *, int);
-int Vect_cidx_get_num_cats_by_index(const struct Map_info *, int);
-int Vect_cidx_get_num_types_by_index(const struct Map_info *, int);
-int Vect_cidx_get_type_count_by_index(const struct Map_info *, int, int, int *,
-				      int *);
-int Vect_cidx_get_type_count(const struct Map_info *, int, int);
-int Vect_cidx_get_cat_by_index(const struct Map_info *, int, int, int *, int *,
-			       int *);
-int Vect_cidx_find_next(const struct Map_info *, int, int, int, int, int *, int *);
-void Vect_cidx_find_all(const struct Map_info *, int, int, int, struct ilist *);
-int Vect_cidx_dump(const struct Map_info *, FILE *);
-int Vect_cidx_save(struct Map_info *);
-int Vect_cidx_open(struct Map_info *, int);
-
-
-/* Set/get map header info */
-int Vect_read_header(struct Map_info *);
-int Vect_write_header(const struct Map_info *);
-const char *Vect_get_name(const struct Map_info *);
-const char *Vect_get_mapset(const struct Map_info *);
-const char *Vect_get_full_name(const struct Map_info *);
-const char *Vect_get_ogr_dsn_name(const struct Map_info *);
-const char *Vect_get_ogr_layer_name(const struct Map_info *);
-const char *Vect_get_ogr_format_info(const struct Map_info *);
-const char *Vect_get_ogr_geometry_type(const struct Map_info *);
-int Vect_is_3d(const struct Map_info *);
-int Vect_set_organization(struct Map_info *, const char *);
-const char *Vect_get_organization(const struct Map_info *);
-int Vect_set_date(struct Map_info *, const char *);
-const char *Vect_get_date(const struct Map_info *);
-int Vect_set_person(struct Map_info *, const char *);
-const char *Vect_get_person(const struct Map_info *);
-int Vect_set_map_name(struct Map_info *, const char *);
-const char *Vect_get_map_name(const struct Map_info *);
-int Vect_set_map_date(struct Map_info *, const char *);
-const char *Vect_get_map_date(const struct Map_info *);
-int Vect_set_comment(struct Map_info *, const char *);
-const char *Vect_get_comment(const struct Map_info *);
-int Vect_set_scale(struct Map_info *, int);
-int Vect_get_scale(const struct Map_info *);
-int Vect_set_zone(struct Map_info *, int);
-int Vect_get_zone(const struct Map_info *);
-int Vect_get_proj(const struct Map_info *);
-int Vect_set_proj(struct Map_info *, int);
-const char *Vect_get_proj_name(const struct Map_info *);
-int Vect_set_thresh(struct Map_info *, double);
-double Vect_get_thresh(const struct Map_info *);
-int Vect_get_constraint_box(const struct Map_info *, struct bound_box *);
-
-
-/* Get map level 2 informations */
-int Vect_level(const struct Map_info *);
-int Vect_get_line_type(const struct Map_info *, int);
-plus_t Vect_get_num_nodes(const struct Map_info *);
-plus_t Vect_get_num_primitives(const struct Map_info *, int);
-plus_t Vect_get_num_lines(const struct Map_info *);
-plus_t Vect_get_num_areas(const struct Map_info *);
-plus_t Vect_get_num_faces(const struct Map_info *);
-plus_t Vect_get_num_kernels(const struct Map_info *);
-plus_t Vect_get_num_volumes(const struct Map_info *);
-plus_t Vect_get_num_islands(const struct Map_info *);
-plus_t Vect_get_num_holes(const struct Map_info *);
-int Vect_get_line_box(const struct Map_info *, int, struct bound_box *);
-int Vect_get_area_box(const struct Map_info *, int, struct bound_box *);
-int Vect_get_isle_box(const struct Map_info *, int, struct bound_box *);
-int Vect_get_map_box(const struct Map_info *, struct bound_box *);
-int V__map_overlap(struct Map_info *, double, double, double, double);
-void Vect_set_release_support(struct Map_info *);
-void Vect_set_category_index_update(struct Map_info *);
-
-/* Set/get fatal error behaviour */
-int Vect_set_fatal_error(int);
-int Vect_get_fatal_error();
-
-/* Open/close/rewind/set_constraints for map */
-int Vect_check_input_output_name(const char *, const char *, int);
-int Vect_legal_filename(const char *);
-int Vect_set_open_level(int);
-int Vect_open_old(struct Map_info *, const char *, const char *);
-int Vect_open_old2(struct Map_info *, const char *, const char *, const char *);
-int Vect_open_old_head(struct Map_info *, const char *, const char *);
-int Vect_open_old_head2(struct Map_info *, const char *, const char *, const char *);
-int Vect_open_new(struct Map_info *, const char *, int);
-int Vect_open_update(struct Map_info *, const char *, const char *);
-int Vect_open_update2(struct Map_info *, const char *, const char *, const char *);
-int Vect_open_update_head(struct Map_info *, const char *, const char *);
-int Vect_copy_head_data(const struct Map_info *, struct Map_info *);
-int Vect_build(struct Map_info *);
-int Vect_get_built(const struct Map_info *);
-int Vect_build_partial(struct Map_info *, int);
-int Vect_set_constraint_region(struct Map_info *, double, double, double,
-			       double, double, double);
-int Vect_set_constraint_type(struct Map_info *, int);
-int Vect_remove_constraints(struct Map_info *);
-int Vect_rewind(struct Map_info *);
-int Vect_close(struct Map_info *);
-
-/* Read/write lines, nodes, areas */
-/* Level 1 and 2 */
-int Vect_read_next_line(const struct Map_info *, struct line_pnts *,
-			struct line_cats *);
-off_t Vect_write_line(struct Map_info *, int, const struct line_pnts *,
-		      const struct line_cats *);
-
-int Vect_get_num_dblinks(const struct Map_info *);
-
-/* Level 2 only */
-int Vect_read_line(const struct Map_info *, struct line_pnts *, struct line_cats *,
-		   int);
-off_t Vect_rewrite_line(struct Map_info *, int, int, const struct line_pnts *,
-		      const struct line_cats *);
-int Vect_delete_line(struct Map_info *, int);
-int Vect_restore_line(struct Map_info *, int, off_t);
-
-int Vect_line_alive(const struct Map_info *, int);
-int Vect_node_alive(const struct Map_info *, int);
-int Vect_area_alive(const struct Map_info *, int);
-int Vect_isle_alive(const struct Map_info *, int);
-int Vect_get_line_nodes(const struct Map_info *, int, int *, int *);
-int Vect_get_line_areas(const struct Map_info *, int, int *, int *);
-off_t Vect_get_line_offset(const struct Map_info *, int);
-
-int Vect_get_node_coor(const struct Map_info *, int, double *, double *, double *);
-int Vect_get_node_n_lines(const struct Map_info *, int);
-int Vect_get_node_line(const struct Map_info *, int, int);
-float Vect_get_node_line_angle(const struct Map_info *, int, int);
-
-int Vect_get_area_points(const struct Map_info *, int, struct line_pnts *);
-int Vect_get_area_centroid(const struct Map_info *, int);
-int Vect_get_area_num_isles(const struct Map_info *, int);
-int Vect_get_area_isle(const struct Map_info *, int, int);
-double Vect_get_area_area(const struct Map_info *, int);
-int Vect_get_area_boundaries(const struct Map_info *, int, struct ilist *);
-
-int Vect_get_isle_points(const struct Map_info *, int, struct line_pnts *);
-int Vect_get_isle_area(const struct Map_info *, int);
-int Vect_get_isle_boundaries(const struct Map_info *, int, struct ilist *);
-
-int Vect_get_centroid_area(const struct Map_info *, int);
-
-/* Level 2 update only */
-int Vect_get_num_updated_lines(const struct Map_info *);
-int Vect_get_updated_line(const struct Map_info *, int);
-int Vect_get_num_updated_nodes(const struct Map_info *);
-int Vect_get_updated_node(const struct Map_info *, int);
-
-/* History */
-int Vect_hist_command(struct Map_info *);
-int Vect_hist_write(struct Map_info *, const char *);
-int Vect_hist_copy(const struct Map_info *, struct Map_info *);
-void Vect_hist_rewind(struct Map_info *);
-char *Vect_hist_read(char *, int, const struct Map_info *);
-
-/* Selecting features */
-int Vect_select_lines_by_box(struct Map_info *, const struct bound_box *,
-			 int, struct boxlist *);
-int Vect_select_areas_by_box(struct Map_info *, const struct bound_box *, struct boxlist *);
-int Vect_select_isles_by_box(struct Map_info *, const struct bound_box *, struct boxlist *);
-int Vect_select_nodes_by_box(struct Map_info *, const struct bound_box *, struct ilist *);
-int Vect_find_node(struct Map_info *, double, double, double, double, int);
-int Vect_find_line(struct Map_info *, double, double, double, int, double,
-		   int, int);
-int Vect_find_line_list(struct Map_info *, double, double, double, int,
-			double, int, const struct ilist *, struct ilist *);
-int Vect_find_area(struct Map_info *, double, double);
-int Vect_find_island(struct Map_info *, double, double);
-int Vect_select_lines_by_polygon(struct Map_info *, struct line_pnts *, int,
-				 struct line_pnts **, int, struct ilist *);
-int Vect_select_areas_by_polygon(struct Map_info *, struct line_pnts *, int,
-				 struct line_pnts **, struct ilist *);
-
-/* Analysis */
-int Vect_tin_get_z(struct Map_info *, double, double, double *, double *,
-		   double *);
-
-/* int Vect_point_in_islands (struct Map_info *, int, double, double); */
-int Vect_find_poly_centroid(const struct line_pnts *, double *, double *);
-int Vect__intersect_line_with_poly(const struct line_pnts *, double,
-				   struct line_pnts *);
-int Vect_get_point_in_area(const struct Map_info *, int, double *, double *);
-int Vect_get_point_in_poly(const struct line_pnts *, double *, double *);
-int Vect_get_point_in_poly_isl(const struct line_pnts *, const struct line_pnts **, int,
-			       double *, double *);
-int Vect_point_in_area(double, double, const struct Map_info *, int, struct bound_box);
-int Vect_point_in_area_outer_ring(double, double, const struct Map_info *, int, struct bound_box);
-int Vect_point_in_island(double, double, const struct Map_info *, int, struct bound_box);
-int Vect_point_in_poly(double, double, const struct line_pnts *);
-
-/* Cleaning */
-void Vect_break_lines(struct Map_info *, int, struct Map_info *);
-int Vect_break_lines_list(struct Map_info *, struct ilist *, struct ilist *,
-			  int, struct Map_info *);
-int Vect_merge_lines(struct Map_info *, int, int *, struct Map_info *);
-void Vect_break_polygons(struct Map_info *, int, struct Map_info *);
-void Vect_remove_duplicates(struct Map_info *, int, struct Map_info *);
-int Vect_line_check_duplicate(const struct line_pnts *,
-			      const struct line_pnts *, int);
-void Vect_snap_lines(struct Map_info *, int, double, struct Map_info *);
-void Vect_snap_lines_list(struct Map_info *, const struct ilist *, double,
-			  struct Map_info *);
-void Vect_remove_dangles(struct Map_info *, int, double, struct Map_info *);
-void Vect_chtype_dangles(struct Map_info *, double, struct Map_info *);
-void Vect_select_dangles(struct Map_info *, int, double, struct ilist *);
-void Vect_remove_bridges(struct Map_info *, struct Map_info *);
-void Vect_chtype_bridges(struct Map_info *, struct Map_info *);
-int Vect_remove_small_areas(struct Map_info *, double, struct Map_info *,
-			    double *);
-int Vect_clean_small_angles_at_nodes(struct Map_info *, int,
-				     struct Map_info *);
-
-/* Overlay */
-int Vect_overlay_str_to_operator(const char *);
-int Vect_overlay(struct Map_info *, int, struct ilist *, struct ilist *,
-		 struct Map_info *, int, struct ilist *, struct ilist *,
-		 int, struct Map_info *);
-int Vect_overlay_and(struct Map_info *, int, struct ilist *,
-		     struct ilist *, struct Map_info *, int,
-		     struct ilist *, struct ilist *, struct Map_info *);
-
-/* Graph */
-void Vect_graph_init(dglGraph_s *, int);
-void Vect_graph_build(dglGraph_s *);
-void Vect_graph_add_edge(dglGraph_s *, int, int, double, int);
-void Vect_graph_set_node_costs(dglGraph_s *, int, double);
-int Vect_graph_shortest_path(dglGraph_s *, int, int, struct ilist *, double *);
-
-/* Network (graph) */
-int Vect_net_build_graph(struct Map_info *, int, int, int, const char *,
-			 const char *, const char *, int, int);
-int Vect_net_shortest_path(struct Map_info *, int, int, struct ilist *,
-			   double *);
-int Vect_net_get_line_cost(const struct Map_info *, int, int, double *);
-int Vect_net_get_node_cost(const struct Map_info *, int, double *);
-int Vect_net_nearest_nodes(struct Map_info *, double, double, double, int,
-			   double, int *, int *, int *, double *, double *,
-			   struct line_pnts *, struct line_pnts *, double *);
-int Vect_net_shortest_path_coor(struct Map_info *, double, double, double,
-				double, double, double, double, double,
-				double *, struct line_pnts *, struct ilist *,
-				struct line_pnts *, struct line_pnts *,
-				double *, double *);
-int Vect_net_shortest_path_coor2(struct Map_info *, double, double, double,
-				double, double, double, double, double,
-				double *, struct line_pnts *, struct ilist *, struct ilist *,
-				struct line_pnts *, struct line_pnts *,
-				double *, double *);
-
-/* Miscellaneous */
-int Vect_topo_dump(const struct Map_info *, FILE *);
-double Vect_points_distance(double, double, double, double, double, double,
-			    int);
-int Vect_option_to_types(const struct Option *);
-int Vect_copy_map_lines(struct Map_info *, struct Map_info *);
-int Vect_copy_map_lines_field(struct Map_info *, int, struct Map_info *);
-int Vect_copy(const char *, const char *, const char *);
-int Vect_rename(const char *, const char *);
-int Vect_copy_table(const struct Map_info *, struct Map_info *, int, int,
-		    const char *, int);
-int Vect_copy_table_by_cats(const struct Map_info *, struct Map_info *, int, int,
-			    const char *, int, int *, int);
-int Vect_copy_tables(const struct Map_info *, struct Map_info *, int);
-int Vect_delete(const char *);
-int Vect_segment_intersection(double, double, double, double, double, double,
-			      double, double, double, double, double, double,
-			      double *, double *, double *, double *,
-			      double *, double *, int);
-int Vect_line_intersection(struct line_pnts *, struct line_pnts *,
-			   struct line_pnts ***, struct line_pnts ***, int *,
-			   int *, int);
-int Vect_line_check_intersection(struct line_pnts *, struct line_pnts *, int);
-int Vect_line_get_intersections(struct line_pnts *, struct line_pnts *,
-				struct line_pnts *, int);
-char *Vect_subst_var(const char *, const struct Map_info *);
-
-/* Custom spatial index */
-void Vect_spatial_index_init(struct spatial_index *, int);
-void Vect_spatial_index_destroy(struct spatial_index *);
-void Vect_spatial_index_add_item(struct spatial_index *, int, const struct bound_box *);
-void Vect_spatial_index_del_item(struct spatial_index *, int, const struct bound_box *);
-int Vect_spatial_index_select(const struct spatial_index *, const struct bound_box *, struct ilist *);
-
-/* GRASS ASCII vector format */
-int Vect_read_ascii(FILE *, struct Map_info *);
-int Vect_read_ascii_head(FILE *, struct Map_info *);
-int Vect_write_ascii(FILE *, FILE *, struct Map_info *, int,
-		     int, int, char *, int, int,
-		     int, const struct cat_list *, const char*,
-		     const char **, int);
-void Vect_write_ascii_head(FILE *, struct Map_info *);
-
-/* Simple Features */
-int Vect_sfa_get_line_type(const struct line_pnts *, int, int);
-int Vect_sfa_check_line_type(const struct line_pnts *, int, int, int);
-int Vect_sfa_line_dimension(int);
-char *Vect_sfa_line_geometry_type(const struct line_pnts *, int);
-int Vect_sfa_line_astext(const struct line_pnts *, int, int, int, FILE *);
-int Vect_sfa_is_line_simple(const struct line_pnts *, int, int);
-int Vect_sfa_is_line_closed(const struct line_pnts *, int, int);
-
-/*
- * Internal functions, MUST NOT be used in modules
- */
-int Vect_print_header(const struct Map_info *);
-void Vect__init_head(struct Map_info *);
-
-/* Open/close/rewind map */
-int Vect_coor_info(const struct Map_info *, struct Coor_info *);
-const char *Vect_maptype_info(const struct Map_info *);
-int Vect_maptype(const struct Map_info *);
-int Vect_open_topo(struct Map_info *, int);
-int Vect_save_topo(struct Map_info *);
-int Vect_open_sidx(struct Map_info *, int);
-int Vect_save_sidx(struct Map_info *);
-int Vect_sidx_dump(struct Map_info *, FILE *);
-int Vect_build_sidx_from_topo(struct Map_info *);
-int Vect_build_sidx(struct Map_info *);
-
-int Vect__write_head(const struct Map_info *);
-int Vect__read_head(struct Map_info *);
-int V1_open_old_nat(struct Map_info *, int);
-int V1_open_old_ogr(struct Map_info *, int);
-int V2_open_old_ogr(struct Map_info *);
-int V1_open_new_nat(struct Map_info *, const char *, int);
-int V1_open_new_ogr(struct Map_info *, const char *, int);
-int V2_open_new_ogr(struct Map_info *, int);
-int V1_rewind_nat(struct Map_info *);
-int V1_rewind_ogr(struct Map_info *);
-int V2_rewind_nat(struct Map_info *);
-int V2_rewind_ogr(struct Map_info *);
-int V1_close_nat(struct Map_info *);
-int V1_close_ogr(struct Map_info *);
-int V2_close_ogr(struct Map_info *);
-
-/* Read/write lines */
-int V1_read_line_nat(struct Map_info *, struct line_pnts *,
-		     struct line_cats *, off_t);
-int V1_read_line_ogr(struct Map_info *, struct line_pnts *,
-		     struct line_cats *, off_t);
-int V1_read_next_line_nat(struct Map_info *, struct line_pnts *,
-			  struct line_cats *);
-int V1_read_next_line_ogr(struct Map_info *, struct line_pnts *,
-			  struct line_cats *);
-int V2_read_line_nat(struct Map_info *, struct line_pnts *,
-		     struct line_cats *, int);
-int V2_read_line_ogr(struct Map_info *, struct line_pnts *,
-		     struct line_cats *, int);
-int V2_read_next_line_nat(struct Map_info *, struct line_pnts *,
-			  struct line_cats *);
-int V2_read_next_line_ogr(struct Map_info *, struct line_pnts *,
-			  struct line_cats *);
-int V1_delete_line_nat(struct Map_info *, off_t);
-int V2_delete_line_nat(struct Map_info *, off_t);
-int V1_delete_line_ogr(struct Map_info *, off_t);
-int V2_delete_line_ogr(struct Map_info *, off_t);
-int V1_restore_line_nat(struct Map_info *, off_t);
-int V2_restore_line_nat(struct Map_info *, int, off_t);
-off_t V1_write_line_nat(struct Map_info *, int, const struct line_pnts *,
-			const struct line_cats *);
-off_t V2_write_line_nat(struct Map_info *, int, const struct line_pnts *,
-			const struct line_cats *);
-off_t V1_write_line_ogr(struct Map_info *, int, const struct line_pnts *,
-			const struct line_cats *);
-off_t V2_write_line_ogr(struct Map_info *, int, const struct line_pnts *,
-			const struct line_cats *);
-off_t V1_rewrite_line_nat(struct Map_info *, int, int, off_t,
-			  const struct line_pnts *, const struct line_cats *);
-off_t V2_rewrite_line_nat(struct Map_info *, int, int, off_t,
-			  const struct line_pnts *, const struct line_cats *);
-off_t V1_rewrite_line_ogr(struct Map_info *, int, int, off_t,
-			  const struct line_pnts *, const struct line_cats *);
-off_t V2_rewrite_line_ogr(struct Map_info *, int, int, off_t,
-			  const struct line_pnts *, const struct line_cats *);
-
-    /* Build topology */
-int Vect_build_nat(struct Map_info *, int);
-int Vect_build_ogr(struct Map_info *, int);
-int Vect_build_line_area(struct Map_info *, int, int);
-int Vect_isle_find_area(struct Map_info *, int);
-int Vect_attach_isle(struct Map_info *, int);
-int Vect_attach_isles(struct Map_info *, const struct bound_box *);
-int Vect_attach_centroids(struct Map_info *, const struct bound_box *);
-
-    /* GEOS support */
-#ifdef HAVE_GEOS
-GEOSGeometry *Vect_read_line_geos(struct Map_info *, int, int*);
-GEOSGeometry *Vect_line_to_geos(struct Map_info *, const struct line_pnts*, int);
-GEOSGeometry *Vect_read_area_geos(struct Map_info *, int);
-GEOSCoordSequence *Vect_get_area_points_geos(struct Map_info *, int);
-GEOSCoordSequence *Vect_get_isle_points_geos(struct Map_info *, int);
-#endif
-
-    /* Raster color tables */
-int Vect_read_colors(const char *, const char *, struct Colors *);
-int Vect_remove_colors(const char *, const char *);
-void Vect_write_colors(const char *, const char *, struct Colors *);
-
-#endif /* GRASS_VECT_H */
+#endif /* GRASS_VECTOR_H */

Modified: grass/trunk/include/vedit.h
===================================================================
--- grass/trunk/include/vedit.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/include/vedit.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -61,67 +61,6 @@
     struct robject **item;
 };
 
-/* break.c */
-int Vedit_split_lines(struct Map_info *, struct ilist *,
-		      struct line_pnts *, double, struct ilist *);
-int Vedit_connect_lines(struct Map_info *, struct ilist *, double);
+#include <grass/defs/vedit.h>
 
-/* cats.c */
-int Vedit_modify_cats(struct Map_info *, struct ilist *,
-		      int, int, struct cat_list *);
-
-/* copy.c */
-int Vedit_copy_lines(struct Map_info *, struct Map_info *, struct ilist *);
-
-/* chtype.c */
-int Vedit_chtype_lines(struct Map_info *, struct ilist *);
-
-/* delete.c */
-
-int Vedit_delete_lines(struct Map_info *, struct ilist *);
-
-/* distance.c */
-double Vedit_get_min_distance(struct line_pnts *, struct line_pnts *,
-			      int, int *);
-
-/* flip.c */
-int Vedit_flip_lines(struct Map_info *, struct ilist *);
-
-/* merge.c */
-int Vedit_merge_lines(struct Map_info *, struct ilist *);
-
-/* move.c */
-int Vedit_move_lines(struct Map_info *, struct Map_info **, int,
-		     struct ilist *, double, double, double, int, double);
-
-/* render.c */
-struct robject_list *Vedit_render_map(struct Map_info *, struct bound_box *, int,
-				      double, double, int, int, double);
-
-/* select.c */
-int Vedit_select_by_query(struct Map_info *,
-			  int, int, double, int, struct ilist *);
-
-/* snap.c */
-int Vedit_snap_point(struct Map_info *,
-		     int, double *, double *, double *, double, int);
-int Vedit_snap_line(struct Map_info *, struct Map_info **, int,
-		    int, struct line_pnts *, double, int);
-int Vedit_snap_lines(struct Map_info *, struct Map_info **, int,
-		     struct ilist *, double, int);
-
-/* vertex.c */
-int Vedit_move_vertex(struct Map_info *, struct Map_info **, int,
-		      struct ilist *,
-		      struct line_pnts *, double, double,
-		      double, double, double, int, int);
-int Vedit_add_vertex(struct Map_info *Map, struct ilist *,
-		     struct line_pnts *, double);
-int Vedit_remove_vertex(struct Map_info *, struct ilist *,
-			struct line_pnts *, double);
-
-/* zbulk.c */
-int Vedit_bulk_labeling(struct Map_info *, struct ilist *,
-			double, double, double, double, double, double);
-
 #endif /* GRASS_VEDIT_H */

Modified: grass/trunk/lib/btree/free.c
===================================================================
--- grass/trunk/lib/btree/free.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/btree/free.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,6 +1,7 @@
-#include <grass/btree.h>
 #include <stdlib.h>
 
+#include <grass/btree.h>
+
 int btree_free(BTREE * B)
 {
     void *data, *key;

Modified: grass/trunk/lib/gmath/blas_level_1.c
===================================================================
--- grass/trunk/lib/gmath/blas_level_1.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/gmath/blas_level_1.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,8 +21,9 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
+
+#include <grass/gis.h>
 #include <grass/gmath.h>
-#include <grass/gis.h>
 
 /* **************************************************************** */
 /* *************** D O U B L E ************************************ */

Modified: grass/trunk/lib/gmath/blas_level_2.c
===================================================================
--- grass/trunk/lib/gmath/blas_level_2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/gmath/blas_level_2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -23,7 +23,6 @@
 #include <stdlib.h>
 #include <grass/gmath.h>
 #include <grass/gis.h>
-#include <grass/gisdefs.h>
 
 #define EPSILON 0.00000000000000001
 

Modified: grass/trunk/lib/ogsf/GK2.c
===================================================================
--- grass/trunk/lib/ogsf/GK2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GK2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,11 +20,8 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
-#include <grass/keyframe.h>
-#include <grass/kftypes.h>
+#include <grass/ogsf.h>
 
-
 static int _add_key(Keylist *, int, float);
 static void _remove_key(Keylist *);
 

Modified: grass/trunk/lib/ogsf/GP2.c
===================================================================
--- grass/trunk/lib/ogsf/GP2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GP2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -17,7 +17,7 @@
 #include <string.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #include "gsget.h"

Modified: grass/trunk/lib/ogsf/GS2.c
===================================================================
--- grass/trunk/lib/ogsf/GS2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GS2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -44,7 +44,7 @@
 
 #include <grass/gis.h>
 #include <grass/raster.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #include "gsget.h"
@@ -3350,7 +3350,6 @@
  */
 void GS_init_view(void)
 {
-    int i;
     static int first = 1;
 
     G_debug(3, "GS_init_view");

Modified: grass/trunk/lib/ogsf/GSX.c
===================================================================
--- grass/trunk/lib/ogsf/GSX.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GSX.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,7 @@
    \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  */
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 void (*Cxl_func) ();
 void (*Swap_func) ();

Modified: grass/trunk/lib/ogsf/GS_util.c
===================================================================
--- grass/trunk/lib/ogsf/GS_util.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GS_util.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,7 +21,7 @@
 #include <string.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
    \brief Calculate distance between 2 coordinates

Modified: grass/trunk/lib/ogsf/GV2.c
===================================================================
--- grass/trunk/lib/ogsf/GV2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GV2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -17,7 +17,7 @@
 #include <string.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 

Modified: grass/trunk/lib/ogsf/GVL2.c
===================================================================
--- grass/trunk/lib/ogsf/GVL2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/GVL2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <string.h>
 #include <grass/gis.h>
 #include <grass/raster3d.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 #include "gsget.h"
 

Modified: grass/trunk/lib/ogsf/Gp3.c
===================================================================
--- grass/trunk/lib/ogsf/Gp3.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/Gp3.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -23,7 +23,7 @@
 #include <grass/vector.h>
 #include <grass/dbmi.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
    \brief Load to points to memory

Modified: grass/trunk/lib/ogsf/Gs3.c
===================================================================
--- grass/trunk/lib/ogsf/Gs3.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/Gs3.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -24,8 +24,7 @@
 #include <grass/glocale.h>
 #include <grass/bitmap.h>
 
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 /* for geoview & geodisplay in 3dview stuff */
 #include "gsget.h"
 /* for update_attrange - might be able to move this func now */

Modified: grass/trunk/lib/ogsf/Gv3.c
===================================================================
--- grass/trunk/lib/ogsf/Gv3.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/Gv3.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -23,7 +23,7 @@
 #include <grass/vector.h>
 #include <grass/dbmi.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*
    #define TRAK_MEM

Modified: grass/trunk/lib/ogsf/Gvl3.c
===================================================================
--- grass/trunk/lib/ogsf/Gvl3.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/Gvl3.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/raster3d.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 /*!

Modified: grass/trunk/lib/ogsf/gk.c
===================================================================
--- grass/trunk/lib/ogsf/gk.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gk.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,9 +21,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
-#include <grass/keyframe.h>
-#include <grass/kftypes.h>
+#include <grass/ogsf.h>
 
 static float spl3(float, double, double, double, double, double, double,
 		  double);

Modified: grass/trunk/lib/ogsf/gp.c
===================================================================
--- grass/trunk/lib/ogsf/gp.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gp.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,7 +15,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #define FIRST_SITE_ID 21720
 

Modified: grass/trunk/lib/ogsf/gpd.c
===================================================================
--- grass/trunk/lib/ogsf/gpd.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gpd.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,7 +15,7 @@
 #include <stdlib.h>
 #include <math.h>
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rowcol.h"
 

Modified: grass/trunk/lib/ogsf/gs.c
===================================================================
--- grass/trunk/lib/ogsf/gs.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gs.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #include "gsget.h"

Modified: grass/trunk/lib/ogsf/gs_bm.c
===================================================================
--- grass/trunk/lib/ogsf/gs_bm.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gs_bm.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -18,7 +18,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 

Modified: grass/trunk/lib/ogsf/gs_norms.c
===================================================================
--- grass/trunk/lib/ogsf/gs_norms.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gs_norms.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <math.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 #include "rowcol.h"

Modified: grass/trunk/lib/ogsf/gs_query.c
===================================================================
--- grass/trunk/lib/ogsf/gs_query.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gs_query.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <math.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
    \brief Values needed for Ray-Convex Polyhedron Intersection Test below

Modified: grass/trunk/lib/ogsf/gsd_cplane.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_cplane.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_cplane.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,7 @@
    \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  */
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include "rowcol.h"
 
 static void init_cplane(void);

Modified: grass/trunk/lib/ogsf/gsd_fonts.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_fonts.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_fonts.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,8 +21,7 @@
 #include <string.h>
 #include <assert.h>
 
-#include <grass/gstypes.h>
-#include <grass/ogsf_proto.h>
+#include <grass/ogsf.h>
 
 #include "rgbpack.h"
 

Modified: grass/trunk/lib/ogsf/gsd_fringe.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_fringe.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_fringe.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -18,7 +18,7 @@
    \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  */
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 #include "rowcol.h"

Modified: grass/trunk/lib/ogsf/gsd_img_mpeg.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_img_mpeg.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_img_mpeg.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -21,8 +21,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/ogsf_proto.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /* FFMPEG stuff */
 #ifdef HAVE_FFMPEG

Modified: grass/trunk/lib/ogsf/gsd_img_ppm.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_img_ppm.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_img_ppm.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -28,8 +28,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/ogsf_proto.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
    \brief Save current GL screen to ppm file

Modified: grass/trunk/lib/ogsf/gsd_img_tif.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_img_tif.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_img_tif.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -31,7 +31,7 @@
 #include <sys/types.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #include <tiffio.h>

Modified: grass/trunk/lib/ogsf/gsd_label.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_label.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_label.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -18,7 +18,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rgbpack.h"
 

Modified: grass/trunk/lib/ogsf/gsd_legend.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_legend.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_legend.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -34,7 +34,7 @@
 #include <grass/gis.h>
 #include <grass/raster.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rgbpack.h"
 

Modified: grass/trunk/lib/ogsf/gsd_objs.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_objs.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_objs.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,8 +20,7 @@
 #include <string.h>
 
 #include <grass/gis.h>
-#include <grass/ogsf_proto.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 #include "math.h"

Modified: grass/trunk/lib/ogsf/gsd_prim.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_prim.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_prim.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -30,7 +30,7 @@
 #endif
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #define USE_GL_NORMALIZE

Modified: grass/trunk/lib/ogsf/gsd_surf.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_surf.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_surf.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,7 +20,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 #include "rowcol.h"

Modified: grass/trunk/lib/ogsf/gsd_views.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_views.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_views.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -26,7 +26,7 @@
 #include <OpenGL/glu.h>
 #endif
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include "math.h"
 
 /*!

Modified: grass/trunk/lib/ogsf/gsd_wire.c
===================================================================
--- grass/trunk/lib/ogsf/gsd_wire.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsd_wire.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -17,7 +17,7 @@
  */
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 #include "rowcol.h"

Modified: grass/trunk/lib/ogsf/gsdiff.c
===================================================================
--- grass/trunk/lib/ogsf/gsdiff.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsdiff.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -27,7 +27,7 @@
    \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  */
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include "gsget.h"
 
 static geosurf *Refsurf = NULL;

Modified: grass/trunk/lib/ogsf/gsdrape.c
===================================================================
--- grass/trunk/lib/ogsf/gsdrape.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsdrape.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -49,7 +49,7 @@
 
 #include <stdlib.h>
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include <grass/glocale.h>
 
 #include "gsget.h"

Modified: grass/trunk/lib/ogsf/gsds.c
===================================================================
--- grass/trunk/lib/ogsf/gsds.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsds.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -58,7 +58,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #define LUCKY 33
 #define BLOC 20

Modified: grass/trunk/lib/ogsf/gsget.c
===================================================================
--- grass/trunk/lib/ogsf/gsget.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsget.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,7 @@
    \author Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)
  */
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
    \brief Get map attributes

Modified: grass/trunk/lib/ogsf/gsget.h
===================================================================
--- grass/trunk/lib/ogsf/gsget.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gsget.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -1,7 +1,7 @@
 #ifndef _GSGET_H
 #define _GSGET_H
 
-#include <grass/gsurf.h>
+#include <grass/ogsf.h>
 
 #define GET_MAPATT1(buff, offset, att) att=(buff->ib? (float)buff->ib[offset]: \
 				      buff->sb? (float)buff->sb[offset]: \

Modified: grass/trunk/lib/ogsf/gv.c
===================================================================
--- grass/trunk/lib/ogsf/gv.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gv.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -15,7 +15,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 #include "gsget.h"
 
 #define FIRST_VECT_ID 20656

Modified: grass/trunk/lib/ogsf/gv_quick.c
===================================================================
--- grass/trunk/lib/ogsf/gv_quick.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gv_quick.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -23,7 +23,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rowcol.h"
 

Modified: grass/trunk/lib/ogsf/gvd.c
===================================================================
--- grass/trunk/lib/ogsf/gvd.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvd.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,7 +16,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rowcol.h"
 

Modified: grass/trunk/lib/ogsf/gvl.c
===================================================================
--- grass/trunk/lib/ogsf/gvl.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvl.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,7 +20,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "gsget.h"
 

Modified: grass/trunk/lib/ogsf/gvl_calc.c
===================================================================
--- grass/trunk/lib/ogsf/gvl_calc.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvl_calc.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <math.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "rgbpack.h"
 #include "mc33_table.h"

Modified: grass/trunk/lib/ogsf/gvl_calc2.c
===================================================================
--- grass/trunk/lib/ogsf/gvl_calc2.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvl_calc2.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -22,7 +22,7 @@
 #include <float.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "mc33_table.h"
 

Modified: grass/trunk/lib/ogsf/gvl_file.c
===================================================================
--- grass/trunk/lib/ogsf/gvl_file.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvl_file.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,8 +20,7 @@
 #include <stdlib.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
-#include <grass/gsurf.h>
+#include <grass/ogsf.h>
 #include <grass/raster3d.h>
 #include <grass/glocale.h>
 

Modified: grass/trunk/lib/ogsf/gvld.c
===================================================================
--- grass/trunk/lib/ogsf/gvld.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/gvld.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -19,7 +19,7 @@
 #include <math.h>
 
 #include <grass/gis.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #include "mc33_table.h"
 

Modified: grass/trunk/lib/ogsf/trans.c
===================================================================
--- grass/trunk/lib/ogsf/trans.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/ogsf/trans.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -32,7 +32,7 @@
 
 #include <grass/gis.h>
 #include <grass/glocale.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 #define MAX_STACK 20
 

Modified: grass/trunk/lib/python/ctypes/Makefile
===================================================================
--- grass/trunk/lib/python/ctypes/Makefile	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/lib/python/ctypes/Makefile	2011-11-11 17:44:36 UTC (rev 49183)
@@ -30,23 +30,23 @@
 ogsf_LIBS       = $(OGSFLIB)
 nviz_LIBS       = $(NVIZLIB)
 
-date_HDRS       = datetime.h P_datetime.h
-gis_HDRS        = gis.h gisdefs.h
-raster_HDRS     = raster.h rasterdefs.h
-gmath_HDRS      = gmath.h
-proj_HDRS       = gprojects.h
-imagery_HDRS    = imagery.h imagedefs.h
-vector_HDRS     = vector.h vect/dig_structs.h vect/dig_defines.h
-display_HDRS    = display.h
-stats_HDRS      = stats.h
-dbmi_HDRS       = dbmi.h dbmidefs.h
-raster3d_HDRS   = raster3d.h
-arraystats_HDRS = arraystats.h
-cluster_HDRS    = cluster.h
-trans_HDRS      = transform.h
-vedit_HDRS      = vedit.h
-ogsf_HDRS       = ogsf_proto.h gstypes.h gsurf.h kftypes.h keyframe.h
-nviz_HDRS       = nviz.h
+date_HDRS       = datetime.h defs/datetime.h
+gis_HDRS        = gis.h defs/gis.h
+raster_HDRS     = raster.h defs/raster.h
+gmath_HDRS      = gmath.h defs/gmath.h
+proj_HDRS       = gprojects.h defs/gprojects.h
+imagery_HDRS    = imagery.h defs/imagery.h
+vector_HDRS     = vector.h defs/vector.h vect/dig_structs.h vect/dig_defines.h
+display_HDRS    = display.h defs/display.h
+stats_HDRS      = stats.h defs/stats.h
+dbmi_HDRS       = dbmi.h defs/dbmi.h
+raster3d_HDRS   = raster3d.h defs/raster3d.h
+arraystats_HDRS = arraystats.h defs/arraystats.h
+cluster_HDRS    = cluster.h defs/cluster.h
+trans_HDRS      = transform.h defs/transform.h
+vedit_HDRS      = vedit.h defs/vedit.h
+ogsf_HDRS       = ogsf.h defs/ogsf.h
+nviz_HDRS       = nviz.h defs/nviz.h
 
 proj_INC        = $(PROJINC)
 vector_INC      = $(VECT_INC) $(VECT_CFLAGS)

Modified: grass/trunk/misc/m.nviz.image/write_img.c
===================================================================
--- grass/trunk/misc/m.nviz.image/write_img.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/misc/m.nviz.image/write_img.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -16,8 +16,7 @@
 
 #include "local_proto.h"
 
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /*!
   \brief Save current GL screen to an ppm file.

Modified: grass/trunk/ps/ps.map/local_proto.h
===================================================================
--- grass/trunk/ps/ps.map/local_proto.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/ps/ps.map/local_proto.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -11,7 +11,7 @@
 int box_draw(double, double, double, double);
 
 /* catval.c */
-#if defined GRASS_VECT_H && defined GRASS_DBMI_H
+#if defined GRASS_VECTOR_H && defined GRASS_DBMI_H
 int load_catval_array_rgb(struct Map_info *, int, dbCatValArray *);
 int load_catval_array_rot(struct Map_info *, int, dbCatValArray *);
 int load_catval_array_size(struct Map_info *, int, dbCatValArray *);
@@ -174,7 +174,7 @@
 /* ps_vlegend.c */
 int PS_vlegend(void);
 
-#ifdef GRASS_VECT_H
+#ifdef GRASS_VECTOR_H
 /* ps_vpoints.c */
 int PS_vpoints_plot(struct Map_info *, int, int);
 
@@ -282,7 +282,7 @@
 /* symbol.c */
 int symbol_draw(char *, double, double, double, double, double);
 
-#ifdef GRASS_SYMB_H
+#ifdef GRASS_SYMBOL_H
 #ifdef PS_COLOR_H
 int symbol_save(SYMBOL *, PSCOLOR *, PSCOLOR *, char *);
 #endif

Modified: grass/trunk/visualization/nviz/src/anim_support.c
===================================================================
--- grass/trunk/visualization/nviz/src/anim_support.c	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/visualization/nviz/src/anim_support.c	2011-11-11 17:44:36 UTC (rev 49183)
@@ -5,7 +5,6 @@
  */
 
 /* gsf includes */
-#include <grass/keyframe.h>
 
 /* Nvision includes */
 #include "interface.h"

Modified: grass/trunk/visualization/nviz/src/interface.h
===================================================================
--- grass/trunk/visualization/nviz/src/interface.h	2011-11-11 14:19:42 UTC (rev 49182)
+++ grass/trunk/visualization/nviz/src/interface.h	2011-11-11 17:44:36 UTC (rev 49183)
@@ -20,8 +20,7 @@
 #endif
 
 #include <grass/gis.h>
-#include <grass/gsurf.h>
-#include <grass/gstypes.h>
+#include <grass/ogsf.h>
 
 /* extern int *GV_get_vect_list(int *);
    extern int *GS_get_surf_list(int *);



More information about the grass-commit mailing list