[GRASS-SVN] r33128 - in grass/trunk: include lib/driver lib/gis
swig/perl
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Aug 27 16:10:03 EDT 2008
Author: glynn
Date: 2008-08-27 16:10:02 -0400 (Wed, 27 Aug 2008)
New Revision: 33128
Removed:
grass/trunk/lib/gis/dig_title.c
grass/trunk/lib/gis/fork.c
grass/trunk/lib/gis/gishelp.c
grass/trunk/lib/gis/unctrl.c
grass/trunk/swig/perl/gis.h
grass/trunk/swig/perl/gisdefs.h
Modified:
grass/trunk/include/gisdefs.h
grass/trunk/lib/driver/Color.c
grass/trunk/lib/driver/driver.h
grass/trunk/lib/gis/cats.c
grass/trunk/lib/gis/closecell.c
grass/trunk/lib/gis/env.c
grass/trunk/lib/gis/list.c
Log:
Remove unused functions
Declare functions "static" where appropriate
Modified: grass/trunk/include/gisdefs.h
===================================================================
--- grass/trunk/include/gisdefs.h 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/include/gisdefs.h 2008-08-27 20:10:02 UTC (rev 33128)
@@ -111,8 +111,6 @@
int G_read_raster_cats(const char *, const char *, struct Categories *);
int G_read_vector_cats(const char *, const char *, struct Categories *);
CELL G_number_of_cats(const char *, const char *);
-CELL G__read_cats(const char *, const char *, const char *,
- struct Categories *, int);
char *G_get_cats_title(const struct Categories *);
char *G_get_raster_cats_title(const struct Categories *);
char *G_get_cat(CELL, struct Categories *);
@@ -143,7 +141,6 @@
int G_write_cats(const char *, struct Categories *);
int G_write_raster_cats(const char *, struct Categories *);
int G_write_vector_cats(const char *, struct Categories *);
-int G__write_cats(const char *, const char *, struct Categories *);
char *G_get_ith_d_raster_cat(const struct Categories *, int, DCELL *,
DCELL *);
char *G_get_ith_f_raster_cat(const struct Categories *, int, void *, void *);
@@ -192,7 +189,6 @@
/* closecell.c */
int G_close_cell(int);
int G_unopen_cell(int);
-int G__write_fp_format(int);
/* color_compat.c */
int G_make_ryg_colors(struct Colors *, CELL, CELL);
@@ -425,8 +421,6 @@
int G__read_env(void);
void G_set_gisrc_mode(int);
int G_get_gisrc_mode(void);
-int G__set_gisrc_file(const char *);
-char *G__get_gisrc_file(void);
int G__create_alt_env(void);
int G__switch_env(void);
@@ -475,9 +469,6 @@
int G_zlib_read(int, int, unsigned char *, int);
int G_zlib_write_noCompress(int, const unsigned char *, int);
-/* fork.c */
-int G_fork(void);
-
/* format.c */
int G__check_format(int);
int G__read_row_ptrs(int);
@@ -586,9 +577,6 @@
/* gisdbase.c */
char *G_gisdbase(void);
-/* gishelp.c */
-int G_gishelp(const char *, const char *);
-
/* gisinit.c */
int G__gisinit(const char *, const char *);
int G__no_gisinit(const char *);
@@ -690,7 +678,6 @@
double);
/* list.c */
-int G_set_list_hit_return(int);
int 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 *);
@@ -1150,9 +1137,6 @@
/* trim_dec.c */
int G_trim_decimal(char *);
-/* unctrl.c */
-char *G_unctrl(int);
-
/* verbose.c */
int G_verbose(void);
int G_verbose_min(void);
Modified: grass/trunk/lib/driver/Color.c
===================================================================
--- grass/trunk/lib/driver/Color.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/driver/Color.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -2,14 +2,14 @@
#include "driver.h"
#include "driverlib.h"
-int DRV_lookup_color(int r, int g, int b)
+static int lookup_color(int r, int g, int b)
{
if (driver->lookup_color)
return (*driver->lookup_color) (r, g, b);
return 0;
}
-void DRV_color(int number)
+static void color(int number)
{
if (driver->color)
(*driver->color) (number);
@@ -18,7 +18,7 @@
void COM_Color_RGB(unsigned char r, unsigned char g, unsigned char b)
{
- DRV_color(DRV_lookup_color(r, g, b));
+ color(lookup_color(r, g, b));
}
void COM_Standard_color(int number)
Modified: grass/trunk/lib/driver/driver.h
===================================================================
--- grass/trunk/lib/driver/driver.h 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/driver/driver.h 2008-08-27 20:10:02 UTC (rev 33128)
@@ -134,10 +134,6 @@
/* Driver Operations */
-/* Color.c */
-extern int DRV_lookup_color(int, int, int);
-extern void DRV_color(int);
-
/* Draw.c */
extern void DRV_draw_bitmap(int, int, int, const unsigned char *);
extern void DRV_draw_line(double, double, double, double);
Modified: grass/trunk/lib/gis/cats.c
===================================================================
--- grass/trunk/lib/gis/cats.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/cats.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -329,6 +329,10 @@
static int get_fmt(char **, char *, int *);
static int cmp(const void *, const void *);
+static int write_cats(const char *element, const char *name, struct Categories *cats);
+static CELL read_cats(const char *element,
+ const char *name,
+ const char *mapset, struct Categories * pcats, int full);
/*!
* \brief read raster category file
@@ -367,7 +371,7 @@
{
char *type;
- switch (G__read_cats("cats", name, mapset, pcats, 1)) {
+ switch (read_cats("cats", name, mapset, pcats, 1)) {
case -2:
type = "missing";
break;
@@ -403,7 +407,7 @@
{
char *type;
- switch (G__read_cats("dig_cats", name, mapset, pcats, 1)) {
+ switch (read_cats("dig_cats", name, mapset, pcats, 1)) {
case -2:
type = "missing";
break;
@@ -433,9 +437,9 @@
return max;
}
-CELL G__read_cats(const char *element,
- const char *name,
- const char *mapset, struct Categories * pcats, int full)
+static CELL read_cats(const char *element,
+ const char *name,
+ const char *mapset, struct Categories * pcats, int full)
{
FILE *fd;
char buff[1024];
@@ -1180,7 +1184,7 @@
int G_write_cats(const char *name, struct Categories *cats)
{
- return G__write_cats("cats", name, cats);
+ return write_cats("cats", name, cats);
}
@@ -1196,7 +1200,7 @@
int G_write_raster_cats(const char *name, struct Categories *cats)
{
- return G__write_cats("cats", name, cats);
+ return write_cats("cats", name, cats);
}
@@ -1216,10 +1220,10 @@
int G_write_vector_cats(const char *name, struct Categories *cats)
{
- return G__write_cats("dig_cats", name, cats);
+ return write_cats("dig_cats", name, cats);
}
-int G__write_cats(const char *element, const char *name, struct Categories *cats)
+static int write_cats(const char *element, const char *name, struct Categories *cats)
{
FILE *fd;
int i, fp_map;
@@ -1227,7 +1231,6 @@
DCELL val1, val2;
char str1[100], str2[100];
- /* DEBUG fprintf(stderr,"G__write_cats(*element = '%s', name = '%s', cats = %p\n",element,name,cats); */
if (!(fd = G_fopen_new(element, name)))
return -1;
@@ -1247,7 +1250,6 @@
fp_map = 0;
else
fp_map = G_raster_map_is_fp(name, G_mapset());
- /* DEBUG fprintf(stderr,"G__write_cats(): fp_map = %d\n",fp_map); */
if (!fp_map)
G_sort_cats(cats);
@@ -1272,7 +1274,6 @@
}
}
fclose(fd);
- /* DEBUG fprintf(stderr,"G__write_cats(): done\n"); */
return (1);
}
Modified: grass/trunk/lib/gis/closecell.c
===================================================================
--- grass/trunk/lib/gis/closecell.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/closecell.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -43,6 +43,7 @@
static int close_new(int, int);
static char CELL_DIR[100];
+static int write_fp_format(int fd);
/*!
* \brief close a raster map
@@ -248,7 +249,7 @@
if (fcb->map_type != CELL_TYPE) { /* floating point map */
int cell_fd;
- if (G__write_fp_format(fd) != 0) {
+ if (write_fp_format(fd) != 0) {
G_warning(_("Error writing floating point format file for map %s"),
fcb->name);
stat = -1;
@@ -397,7 +398,7 @@
}
/* returns 0 on success, 1 on failure */
-int G__write_fp_format(int fd)
+static int write_fp_format(int fd)
{
struct fileinfo *fcb = &G__.fileinfo[fd];
struct Key_Value *format_kv;
Deleted: grass/trunk/lib/gis/dig_title.c
===================================================================
--- grass/trunk/lib/gis/dig_title.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/dig_title.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,36 +0,0 @@
-
-/**************************************************************
- * char *G_get_cell_title (name, mapset)
- * char *name name of map file
- * char *mapset mapset containing name
- *
- * returns pointer to string containing cell title. (from cats file)
- *************************************************************/
-
-#include <stdio.h>
-#include <grass/gis.h>
-
-char *G_get_dig_title(const char *name, const char *mapset)
-{
- FILE *fd;
- int stat = -1;
- char title[100];
-
- fd = G_fopen_old("dig_cats", name, mapset);
- if (fd) {
- stat = 1;
- if (!fgets(title, sizeof title, fd)) /* skip number of cats */
- stat = -1;
- else if (!G_getl(title, sizeof title, fd)) /* read title */
- stat = -1;
-
- fclose(fd);
- }
-
- if (stat < 0)
- *title = 0;
- else
- G_strip(title);
-
- return G_store(title);
-}
Modified: grass/trunk/lib/gis/env.c
===================================================================
--- grass/trunk/lib/gis/env.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/env.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -500,34 +500,6 @@
}
/**
- \brief Sets filename for gisrc
-
- \param name filename
-
- \return 0
-*/
-int G__set_gisrc_file(const char *name)
-{
- gisrc = NULL;
- if (name && *name)
- gisrc = G_store(name);
-
- return 0;
-}
-
-/**
- \brief Get gisrc filename
-
- \param
-
- \return char pointer to filename
-*/
-char *G__get_gisrc_file(void)
-{
- return gisrc;
-}
-
-/**
\brief Set up alternative environment variables
\param
Deleted: grass/trunk/lib/gis/fork.c
===================================================================
--- grass/trunk/lib/gis/fork.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/fork.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,43 +0,0 @@
-#include <grass/config.h>
-
-#include <unistd.h>
-#include <grass/gis.h>
-
-/*************************************************************
- * G_fork()
- *
- * Issue a system fork() call and protect the child from all
- * signals (which it does by changing the process group for the child)
- *
- * returns:
- * -1 fork failed.
- * 0 child
- * >0 parent
- ************************************************************/
-
-int G_fork(void)
-{
-#ifdef __MINGW32__
- return -1;
-#else /* __MINGW32__ */
- int pid;
-
- pid = fork();
-
- /*
- * change the process group for the child (pid == 0)
- * note: we use the BSD calling sequence, since
- * it will work ok for ATT call which has no arguments
- */
- if (pid == 0)
-#ifdef SETPGRP_VOID
- setpgrp();
-#else
- setpgrp(0, getpid());
-#endif
-
- return pid;
-
-#endif /* __MINGW32__ */
-
-}
Deleted: grass/trunk/lib/gis/gishelp.c
===================================================================
--- grass/trunk/lib/gis/gishelp.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/gishelp.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,53 +0,0 @@
-/*
- ****************************************************************************
- *
- * MODULE: GRASS 5 gis library, gishelp.c
- * AUTHOR(S): unknown
- * PURPOSE: Print help information
- * 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.
- *
- *****************************************************************************/
-
-/*
- **********************************************************************
- *
- * G_gishelp(helpfile, request)
- * char *helpfile help directory where "request" is found
- * char *request help file desired
- *
- * Prints a helpfile to the screen. Helpfiles are stored in directories
- * associated with different GRID programs. A given file will be
- * found in $GISBASE/txt/"helpfile"/"request".
- *
- **********************************************************************/
-
-#include <grass/gis.h>
-#include <grass/glocale.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <grass/spawn.h>
-#define GEN_HELP "gen_help"
-
-int G_gishelp(const char *helpfile, const char *request)
-{
- char file[1024];
-
- if (request == NULL)
- request = GEN_HELP;
-
- sprintf(file, "%s/txt/%s/%s", G_getenv("GISBASE"), helpfile, request);
-
- if (!access(file, 04)) {
- fprintf(stderr, _("one moment...\n"));
- G_spawn(getenv("GRASS_PAGER"), getenv("GRASS_PAGER"), file, NULL);
- }
- else {
- fprintf(stderr, _("No help available for command [%s]\n"), request);
- }
-
- return 0;
-}
Modified: grass/trunk/lib/gis/list.c
===================================================================
--- grass/trunk/lib/gis/list.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/list.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -24,17 +24,10 @@
#include <grass/glocale.h>
static int broken_pipe;
-static int hit_return = 0;
static int list_element(FILE *, const char *, const char *, const char *,
int (*)(const char *, const char *, const char *));
static void sigpipe_catch(int);
-int G_set_list_hit_return(int flag)
-{
- hit_return = flag;
- return 0;
-}
-
/**
\brief General purpose list function.
@@ -130,10 +123,6 @@
#ifdef SIGPIPE
signal(SIGPIPE, sigpipe);
#endif
- if (hit_return && isatty(1)) {
- fprintf(stderr, _("hit RETURN to continue -->"));
- while (getchar() != '\n') ;
- }
return 0;
}
Deleted: grass/trunk/lib/gis/unctrl.c
===================================================================
--- grass/trunk/lib/gis/unctrl.c 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/lib/gis/unctrl.c 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,48 +0,0 @@
-
-/**
- * \file unctrl.c
- *
- * \brief GIS Library - Handles control characters.
- *
- * (C) 2001-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.
- *
- * \author GRASS GIS Development Team
- *
- * \date 1999-2006
- */
-
-#include <stdio.h>
-#include <grass/gis.h>
-
-
-/**
- * \brief Printable version of control character.
- *
- * This routine returns a pointer to a string which contains an
- * English-like representation for the character <b>c</b>. This is useful for
- * nonprinting characters, such as control characters. Control characters are
- * represented by ctrl-C, e.g., control A is represented by ctrl-A. 0177 is
- * represented by DEL/RUB. Normal characters remain unchanged.
- *
- * \param[in] int c
- * \return char * pointer to string containing English-like representation for character <b>c</b>
- */
-
-char *G_unctrl(int c)
-{
- static char buf[20];
-
- if (c < ' ')
- sprintf(buf, "ctrl-%c", c | 0100);
- else if (c < 0177)
- sprintf(buf, "%c", c);
- else if (c == 0177)
- sprintf(buf, "DEL/RUB");
- else
- sprintf(buf, "Mctrl-%c", (c & 77) | 0100);
-
- return buf;
-}
Deleted: grass/trunk/swig/perl/gis.h
===================================================================
--- grass/trunk/swig/perl/gis.h 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/swig/perl/gis.h 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,610 +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 definitions of variables and data types
- * for use with most, if not all, Grass programs. This file is
- * usually included in every Grass program.
- * 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_GIS_H
-#define GRASS_GIS_H
-
-/*============================= Include Files ==============================*/
-
-/* System include files */
-#include <stdio.h>
-#include <stdarg.h>
-
-/* Grass and local include files */
-#include <grass/config.h>
-#include <grass/datetime.h>
-
-/*=========================== Constants/Defines ============================*/
-
-#if !defined __GNUC__ || __GNUC__ < 2
-#undef __attribute__
-#define __attribute__(x)
-#endif
-
-static const char *GRASS_copyright __attribute__ ((unused))
- = "GRASS GNU GPL licensed Software";
-
-/* Define TRUE and FALSE for boolean comparisons */
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#define MAXEDLINES 50
-#define RECORD_LEN 80
-#define NEWLINE '\n'
-#define RECLASS_TABLE 1
-#define RECLASS_RULES 2
-#define RECLASS_SCALE 3
-
-#define METERS 1
-#define FEET 2
-#define DEGREES 3
-
-#define CELL_TYPE 0
-#define FCELL_TYPE 1
-#define DCELL_TYPE 2
-
-#define PROJECTION_XY 0
-#define PROJECTION_UTM 1
-#define PROJECTION_SP 2
-#define PROJECTION_LL 3
-#define PROJECTION_OTHER 99
-
-#define PROJECTION_FILE "PROJ_INFO"
-#define UNIT_FILE "PROJ_UNITS"
-
-/* define PI and friends */
-#undef M_PI
-#define M_PI 3.14159265358979323846 /* pi */
-
-#undef M_PI_2
-#define M_PI_2 1.57079632679489661923 /* pi/2 */
-
-#undef M_PI_4
-#define M_PI_4 0.78539816339744830962 /* pi/4 */
-
-/* epsilon (IEEE: 2.220446e-16) */
-#define GRASS_EPSILON 1.0e-15
-
-/* Location of envariment variables */
-#define G_VAR_GISRC 0
-#define G_VAR_MAPSET 1
-
-/* Where to find/store variables */
-#define G_GISRC_MODE_FILE 0 /* files */
-#define G_GISRC_MODE_MEMORY 1 /* memory only */
-
-/* for G_parser() */
-#define TYPE_INTEGER 1
-#define TYPE_DOUBLE 2
-#define TYPE_STRING 3
-#define YES 1
-#define NO 0
-#define GISPROMPT_COLOR "color,grass,color"
-
-/* File/directory name lengths */
-#define GNAME_MAX 256
-#define GMAPSET_MAX 256
-
-#define GPATH_MAX 4096
-
-/* Macros for type size independent integers */
-/* Use these for portability to ensure integers are truly 32bit */
-/* and are handled in a uniform manner */
-
-/* Convert integer to 4 bytes - little endian */
-#define serialize_int32_le(buf, x) do { \
- (buf)[0] = ((x) >> 0) & 0xFF; \
- (buf)[1] = ((x) >> 8) & 0xFF; \
- (buf)[2] = ((x) >> 16) & 0xFF; \
- (buf)[3] = ((x) >> 24) & 0xFF; \
-} while(0)
-
-/* Convert 4 bytes to an integer - little endian */
-#define deserialize_int32_le(buf) (((buf)[0] << 0) | \
- ((buf)[1] << 8) | \
- ((buf)[2] << 16) | \
- ((buf)[3] << 24))
-
-/* Convert integer to 4 bytes - big endian */
-#define serialize_int32_be(buf, x) do { \
- (buf)[0] = ((x) >> 24) & 0xFF; \
- (buf)[1] = ((x) >> 16) & 0xFF; \
- (buf)[2] = ((x) >> 8) & 0xFF; \
- (buf)[3] = ((x) >> 0) & 0xFF; \
-} while(0)
-
-/* Convert 4 bytes to an integer - big endian */
-#define deserialize_int32_be(buf) (((buf)[0] << 24) | \
- ((buf)[1] << 16) | \
- ((buf)[2] << 8) | \
- ((buf)[3] << 0))
-
-/* Cross-platform Directory Separator Character and null device stuff */
-#define GRASS_DIRSEP '/'
-#ifdef __MINGW32__
-# define HOST_DIRSEP '\\'
-# define G_DEV_NULL 'NUL:'
-#else
-# define HOST_DIRSEP '/'
-# define G_DEV_NULL '/dev/null'
-#endif
-
- /**/ typedef enum
-{
- G_OPT_DB_WHERE, /* SQL where conditions */
- G_OPT_DB_COLUMN, /* one attr column */
- G_OPT_DB_COLUMNS, /* one or more attr columns */
-
- G_OPT_I_GROUP, /* old input imagery group */
- G_OPT_R_INPUT, /* old input raster map */
- G_OPT_R_INPUTS, /* old input raster maps */
- G_OPT_R_OUTPUT, /* new output raster map */
- G_OPT_R_MAP, /* old input raster map */
- G_OPT_R_MAPS, /* old input rasters map */
- G_OPT_R_BASE, /* old input base raster map */
- G_OPT_R_COVER, /* old input cover raster map */
- G_OPT_R_ELEV, /* old input elevation raster map */
- G_OPT_R_ELEVS, /* old input elevation raster maps */
-
- G_OPT_R3_INPUT, /* old input raster3d map */
- G_OPT_R3_INPUTS, /* old input raster3d maps */
- G_OPT_R3_OUTPUT, /* new output raster3d map */
-
- G_OPT_V_INPUT, /* old input vector map */
- G_OPT_V_INPUTS, /* old input vector maps */
- G_OPT_V_OUTPUT, /* new output vector map */
- G_OPT_V_MAP, /* old input vector map */
- G_OPT_V_TYPE, /* primitive type */
- G_OPT_V_FIELD, /* field number */
- G_OPT_V_CAT, /* one category */
- G_OPT_V_CATS, /* more categories */
-
- G_OPT_F_INPUT, /* old input file */
- G_OPT_F_OUTPUT, /* new output file */
- G_OPT_F_SEP, /* data field separator */
-
- G_OPT_C_FG, /* foreground color */
- G_OPT_C_BG /* background color */
-} STD_OPT;
-
-/* Message format */
-#define G_INFO_FORMAT_STANDARD 0 /* GRASS_MESSAGE_FORMAT=standard or not defined */
-#define G_INFO_FORMAT_GUI 1 /* GRASS_MESSAGE_FORMAT=gui */
-#define G_INFO_FORMAT_SILENT 2 /* GRASS_MESSAGE_FORMAT=silent */
-
-/* Icon types */
-#define G_ICON_CROSS 0
-#define G_ICON_BOX 1
-#define G_ICON_ARROW 2
-
-/* default colors */
-#define DEFAULT_FG_COLOR "black"
-#define DEFAULT_BG_COLOR "white"
-
-/* for G_get_raster_sample(), INTERP_TYPE */
-#define UNKNOWN 0
-#define NEAREST 1 /* nearest neighbor interpolation */
-#define BILINEAR 2 /* bilinear interpolation */
-#define CUBIC 3 /* cubic interpolation */
-
-/* for raster maps */
-#define GR_FATAL_EXIT 0
-#define GR_FATAL_PRINT 1
-#define GR_FATAL_RETURN 2
-
-/* Element types */
-enum
-{ /* Dir */
- G_ELEMENT_RASTER = 1, /* cell */
- G_ELEMENT_VECTOR = 2, /* vector */
- G_ELEMENT_GROUP = 3, /* group */
- G_ELEMENT_REGION = 4 /* window */
-};
-
-/*=========================== Typedefs/Structures ==========================*/
-
-typedef int CELL;
-typedef double DCELL;
-typedef float FCELL;
-extern CELL CELL_NODATA;
-
-typedef int RASTER_MAP_TYPE;
-
-/* for G_get_raster_sample() */
-typedef int INTERP_TYPE;
-
-struct Cell_head
-{
- int format; /* max numer of bytes per cell minus 1 */
- int compressed; /* 0 = uncompressed, 1 = compressed, -1 pre 3.0 */
- int rows; /* number of rows in the data 2D */
- int rows3; /* number of rows in the data 3D */
- int cols; /* number of columns in the data 2D */
- int cols3; /* number of columns in the data 3D */
- int depths; /* number of depths in data */
- int proj; /* Projection (see #defines above) */
- int zone; /* Projection zone */
- double ew_res; /* East to West cell size 2D */
- double ew_res3; /* East to West cell size 3D */
- double ns_res; /* North to South cell size 2D */
- double ns_res3; /* North to South cell size 3D */
- double tb_res; /* Top to Bottom cell size */
- double north; /* coordinates of layer */
- double south;
- double east;
- double west;
- double top;
- double bottom;
-};
-
-struct _Color_Rule_
-{
- struct
- {
- DCELL value;
- unsigned char red;
- unsigned char grn;
- unsigned char blu;
- } low, high;
-
- struct _Color_Rule_ *next;
- struct _Color_Rule_ *prev;
-};
-
-struct _Color_Info_
-{
- struct _Color_Rule_ *rules;
- int n_rules;
-
- struct
- {
- unsigned char *red;
- unsigned char *grn;
- unsigned char *blu;
- unsigned char *set;
- int nalloc;
- int active;
- } lookup;
-
- struct
- {
- DCELL *vals;
- /* pointers to color rules corresponding to the intervals btwn vals */
- struct _Color_Rule_ **rules;
- int nalloc;
- int active;
- } fp_lookup;
-
- DCELL min, max;
-};
-
-struct Colors
-{
- int version; /* set by read_colors: -1=old,1=new */
- DCELL shift;
- int invert;
- int is_float; /* defined on floating point raster data? */
- int null_set; /* the colors for null are set? */
- unsigned char null_red;
- unsigned char null_grn;
- unsigned char null_blu;
- int undef_set; /* the colors for cells not in range are set? */
- unsigned char undef_red;
- unsigned char undef_grn;
- unsigned char undef_blu;
- struct _Color_Info_ fixed;
- struct _Color_Info_ modular;
- DCELL cmin;
- DCELL cmax;
-};
-
-
-typedef struct
-{
- unsigned char r, g, b, a; /* red, green, blue, and alpha */
-} RGBA_Color;
-
-typedef RGBA_Color RGB_Color;
-
-/* RGBA_Color alpha presets */
-#define RGBA_COLOR_OPAQUE 255
-#define RGBA_COLOR_TRANSPARENT 0
-#define RGBA_COLOR_NONE 0
-
-
-struct Reclass
-{
- char *name; /* name of raster map being reclassed */
- char *mapset; /* mapset in which "name" is found */
- int type; /* type of reclass */
- int num; /* size of reclass table */
- CELL min; /* table min */
- CELL max; /* table max */
- CELL *table; /* reclass table */
-};
-
-struct FPReclass_table
-{
- DCELL dLow; /* domain low */
- DCELL dHigh; /* domain high */
- DCELL rLow; /* range low */
- DCELL rHigh; /* range high */
-};
-
-/* reclass structure from double to double used by r.recode to reclass */
-/* between types: int to double, float to int,... */
-struct FPReclass
-{
- int defaultDRuleSet; /* 1 if default domain rule set */
- int defaultRRuleSet; /* 1 if default range rule set */
- int infiniteLeftSet; /* 1 if negative infinite interval rule exists */
- int infiniteRightSet; /* 1 if positive infinite interval rule exists */
- int rRangeSet; /* 1 if range range (i.e. interval) is set */
- int maxNofRules;
- int nofRules;
- DCELL defaultDMin; /* default domain minimum value */
- DCELL defaultDMax; /* default domain maximum value */
- DCELL defaultRMin; /* default range minimum value */
- DCELL defaultRMax; /* default range maximum value */
- DCELL infiniteDLeft; /* neg infinite rule */
- DCELL infiniteDRight; /* neg infinite rule */
- DCELL infiniteRLeft; /* pos infinite rule */
- DCELL infiniteRRight; /* pos infinite rule */
- DCELL dMin; /* minimum domain values in rules */
- DCELL dMax; /* maximum domain values in rules */
- DCELL rMin; /* minimum range values in rules */
- DCELL rMax; /* maximum range values in rules */
- struct FPReclass_table *table;
-};
-
-struct Quant_table
-{
- DCELL dLow;
- DCELL dHigh;
- CELL cLow;
- CELL cHigh;
-};
-
-struct Quant
-{
- int truncate_only;
- int round_only;
- int defaultDRuleSet;
- int defaultCRuleSet;
- int infiniteLeftSet;
- int infiniteRightSet;
- int cRangeSet;
- int maxNofRules;
- int nofRules;
- DCELL defaultDMin;
- DCELL defaultDMax;
- CELL defaultCMin;
- CELL defaultCMax;
- DCELL infiniteDLeft;
- DCELL infiniteDRight;
- CELL infiniteCLeft;
- CELL infiniteCRight;
- DCELL dMin;
- DCELL dMax;
- CELL cMin;
- CELL cMax;
- struct Quant_table *table;
-
- struct
- {
- DCELL *vals;
-
- /* pointers to quant rules corresponding to the intervals btwn vals */
- struct Quant_table **rules;
- int nalloc;
- int active;
- DCELL inf_dmin;
- DCELL inf_dmax;
- CELL inf_min;
- CELL inf_max;
- /* all values smaller than inf_dmin become inf_min */
- /* all values larger than inf_dmax become inf_max */
- /* inf_min and/or inf_max can be NULL if there are no inf rules */
- } fp_lookup;
-};
-
-struct Categories
-{
- CELL ncats; /* total number of categories */
- CELL num; /* the highest cell values. Only exists
- for backwards compatibility = (CELL)
- max_fp_values in quant rules */
- char *title; /* name of data layer */
- char *fmt; /* printf-like format to generate labels */
- float m1; /* Multiplication coefficient 1 */
- float a1; /* Addition coefficient 1 */
- float m2; /* Multiplication coefficient 2 */
- float a2; /* Addition coefficient 2 */
- struct Quant q; /* rules mapping cell values to index in
- list of labels */
- char **labels; /* array of labels of size num */
- int *marks; /* was the value with this label was used? */
- int nalloc;
- int last_marked_rule;
- /* NOTE: to get a rule corresponfing to cats.labels[i], use */
- /* G_get_ith_c/f/d_raster_cat (pcats, i, val1, val2) */
- /* it calls */
- /* G_quant_get_ith_rule(&cats->q, i, val1, val2, &index, &index); */
- /* and idex ==i, because rule is added at the same time as a */
- /* label, and quant rules are never reordered. Olga apr,95 */
-};
-
-struct History
-{
- char mapid[RECORD_LEN];
- char title[RECORD_LEN];
- char mapset[RECORD_LEN];
- char creator[RECORD_LEN];
- char maptype[RECORD_LEN];
- char datsrc_1[RECORD_LEN];
- char datsrc_2[RECORD_LEN];
- char keywrd[RECORD_LEN];
- int edlinecnt;
- char edhist[MAXEDLINES][RECORD_LEN];
-};
-
-struct Cell_stats
-{
- struct Cell_stats_node
- {
- int idx;
- long *count;
- int left;
- int right;
- } *node; /* tree of values */
-
- int tlen; /* allocated tree size */
- int N; /* number of actual nodes in tree */
- int curp;
- long null_data_count;
- int curoffset;
-};
-
-struct Histogram
-{
- int num;
-
- struct Histogram_list
- {
- CELL cat;
- long count;
- } *list;
-};
-
-struct Range
-{
- CELL min;
- CELL max;
- int first_time; /* whether or not range was updated */
-};
-
-struct FPRange
-{
- DCELL min;
- DCELL max;
- int first_time; /* whether or not range was updated */
-};
-
-/*
- ** Structure for I/O of 3dview files (view.c)
- */
-struct G_3dview
-{
- char pgm_id[40]; /* user-provided identifier */
- float from_to[2][3]; /* eye position & lookat position */
- float fov; /* field of view */
- float twist; /* right_hand rotation about from_to */
- float exag; /* terrain elevation exageration */
- int mesh_freq; /* cells per grid line */
- int poly_freq; /* cells per polygon */
- int display_type; /* 1 for mesh, 2 for poly, 3 for both */
- int lightson; /* boolean */
- int dozero; /* boolean */
- int colorgrid; /* boolean */
- int shading; /* boolean */
- int fringe; /* boolean */
- int surfonly; /* boolean */
- int doavg; /* boolean */
- char grid_col[40]; /* colors */
- char bg_col[40]; /* colors */
- char other_col[40]; /* colors */
- float lightpos[4]; /* east, north, height, 1.0 for local 0.0 infin */
- float lightcol[3]; /* values between 0.0 to 1.0 for red, grn, blu */
- float ambient;
- float shine;
- struct Cell_head vwin;
-};
-
-struct Key_Value
-{
- int nitems;
- int nalloc;
- char **key;
- char **value;
-};
-
-struct Option /* Structure that stores option info */
-{
- char *key; /* Key word used on command line */
- int type; /* Option type */
- int required; /* REQUIRED or OPTIONAL */
- int multiple; /* Multiple entries OK */
- char *options; /* Approved values or range or NULL */
- char **opts; /* NULL or NULL terminated array of parsed options */
- char *key_desc; /* one word describing the key */
- char *label; /* Optional short label, used in GUI as item label */
- char *description; /* String describing option */
- char *descriptions; /* ';' separated pairs of option and option descriptions */
- /* For example: (with ->options = "break,rmdupl")
- * "break;break lines on intersections;"
- * "rmdupl;remove duplicates"
- */
- char **descs; /* parsed descriptions, array of either NULL or string */
- /* in the same order as options */
- char *answer; /* Option answer */
- char *def; /* Where original answer gets saved */
- char **answers; /* Option answers (for multiple=YES) */
- struct Option *next_opt; /* Pointer to next option struct */
- char *gisprompt; /* Interactive prompt guidance */
- char *guisection; /* GUI Layout guidance: ';' delimited heirarchical tree position */
- int (*checker) (); /* Routine to check answer or NULL */
- int count;
-};
-
-struct Flag /* Structure that stores flag info */
-{
- char key; /* Key char used on command line */
- char answer; /* Stores flag state: 0/1 */
- char *label; /* Optional short label, used in GUI as item label */
- char *description; /* String describing flag meaning */
- char *guisection; /* GUI Layout guidance: ';' delimited heirarchical tree position */
- struct Flag *next_flag; /* Pointer to next flag struct */
-};
-
-struct GModule /* Structure that stores module info */
-{
- char *label; /* Optional short description for GUI */
- char *description; /* String describing module */
- char *keywords; /* Keywords describing module */
- /* further items are possible: author(s), version */
- int overwrite; /* overwrite old files */
- int verbose; /* print all informations about progress and so on */
-};
-
-struct TimeStamp
-{
- DateTime dt[2]; /* two datetimes */
- int count;
-};
-
-/*============================== Prototypes ================================*/
-
-/* Since there are so many prototypes for the gis library they are stored */
-/* in the file gisdefs.h */
-#include <grass/gisdefs.h>
-
-#endif /* GRASS_GIS_H */
Deleted: grass/trunk/swig/perl/gisdefs.h
===================================================================
--- grass/trunk/swig/perl/gisdefs.h 2008-08-27 20:08:49 UTC (rev 33127)
+++ grass/trunk/swig/perl/gisdefs.h 2008-08-27 20:10:02 UTC (rev 33128)
@@ -1,1276 +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 ================================*/
-
-/* adj_cellhd.c */
-char *G_adjust_Cell_head(struct Cell_head *, int, int);
-char *G_adjust_Cell_head3(struct Cell_head *, int, int, int);
-
-/* align_window.c */
-char *G_align_window(struct Cell_head *, const struct Cell_head *);
-
-/* alloc.c */
-void *G_malloc(size_t);
-void *G_calloc(size_t, size_t);
-void *G_realloc(void *, size_t);
-void G_free(void *);
-
-/* alloc_cell.c */
-int G_raster_size(RASTER_MAP_TYPE);
-CELL *G_allocate_cell_buf(void);
-void *G_allocate_raster_buf(RASTER_MAP_TYPE);
-CELL *G_allocate_c_raster_buf(void);
-FCELL *G_allocate_f_raster_buf(void);
-DCELL *G_allocate_d_raster_buf(void);
-char *G_allocate_null_buf(void);
-unsigned char *G__allocate_null_bits(int);
-int G__null_bitstream_size(int);
-
-/* 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 */
-int 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 */
-int 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 */
-int 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 */
-int G_ascii_check(char *);
-
-/* ask.c */
-char *G_ask_new(const char *, char *, char *, char *);
-char *G_ask_new_ext(const char *, char *, char *, char *, char *, int (*)());
-char *G_ask_old(const char *, char *, char *, char *);
-char *G_ask_old_ext(const char *, char *, char *, char *, char *, int (*)());
-char *G_ask_any(const char *, char *, char *, char *, int);
-char *G_ask_any_ext(const char *, char *, char *, char *, int, char *,
- int (*)());
-char *G_ask_in_mapset(const char *, char *, char *, char *);
-char *G_ask_in_mapset_ext(const char *, char *, char *, char *, char *,
- int (*)());
-char *G_ask_new_file(const char *, char *, char *, char *);
-char *G_ask_old_file(const char *, char *, char *, char *);
-int G_set_ask_return_msg(const char *);
-char *G_get_ask_return_msg(void);
-
-/* ask_cell.c */
-char *G_ask_cell_new(const char *, char *);
-char *G_ask_cell_old(const char *, char *);
-char *G_ask_cell_in_mapset(const char *, char *);
-char *G_ask_cell_any(const char *, char *);
-
-/* ask_vctrs.c */
-char *G_ask_vector_new(const char *, char *);
-char *G_ask_vector_old(const char *, char *);
-char *G_ask_vector_any(const char *, char *);
-char *G_ask_vector_in_mapset(const char *, 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
- */
-
-/* commented - need to better understand how to SWIG this: */
-/* int G_vasprintf(char **, const char *, va_list); */
-/* int G_asprintf(char **, const char *, ...); */
-
-/* auto_mask.c */
-int G__check_for_auto_masking(void);
-int G_suppress_masking(void);
-int G_unsuppress_masking(void);
-
-/* basename.c */
-char *G_basename(char *, const char *);
-
-/* bres_line.c */
-int G_bresenham_line(int, int, int, int, int (*)(int, int));
-
-/* cats.c */
-int G_read_cats(const char *, const char *, struct Categories *);
-int G_read_raster_cats(const char *, const char *, struct Categories *);
-int G_read_vector_cats(const char *, const char *, struct Categories *);
-CELL G_number_of_cats(const char *, const char *);
-CELL G__read_cats(const char *, const char *, const char *,
- struct Categories *, int);
-char *G_get_cats_title(const struct Categories *);
-char *G_get_raster_cats_title(const struct Categories *);
-char *G_get_cat(CELL, struct Categories *);
-char *G_get_c_raster_cat(CELL *, struct Categories *);
-char *G_get_f_raster_cat(FCELL *, struct Categories *);
-char *G_get_d_raster_cat(DCELL *, struct Categories *);
-char *G_get_raster_cat(void *, struct Categories *, RASTER_MAP_TYPE);
-int G_unmark_raster_cats(struct Categories *);
-int G_mark_c_raster_cats(CELL *, int, struct Categories *);
-int G_mark_f_raster_cats(FCELL *, int, struct Categories *);
-int G_mark_d_raster_cats(DCELL *, int, struct Categories *);
-int G_mark_raster_cats(void *, int, struct Categories *, RASTER_MAP_TYPE);
-int G_rewind_raster_cats(struct Categories *);
-char *G_get_next_marked_d_raster_cat(struct Categories *, DCELL *, DCELL *,
- long *);
-char *G_get_next_marked_c_raster_cat(struct Categories *, CELL *, CELL *,
- long *);
-char *G_get_next_marked_f_raster_cat(struct Categories *, FCELL *, FCELL *,
- long *);
-char *G_get_next_marked_raster_cat(struct Categories *, void *, void *,
- long *, RASTER_MAP_TYPE);
-int G_set_cat(CELL, char *, struct Categories *);
-int G_set_c_raster_cat(CELL *, CELL *, char *, struct Categories *);
-int G_set_f_raster_cat(FCELL *, FCELL *, char *, struct Categories *);
-int G_set_d_raster_cat(DCELL *, DCELL *, char *, struct Categories *);
-int G_set_raster_cat(void *, void *, char *, struct Categories *,
- RASTER_MAP_TYPE);
-int G_write_cats(char *, struct Categories *);
-int G_write_raster_cats(char *, struct Categories *);
-int G_write_vector_cats(char *, struct Categories *);
-int G__write_cats(char *, char *, struct Categories *);
-char *G_get_ith_d_raster_cat(const struct Categories *, int, DCELL *,
- DCELL *);
-char *G_get_ith_f_raster_cat(const struct Categories *, int, void *, void *);
-char *G_get_ith_c_raster_cat(const struct Categories *, int, void *, void *);
-char *G_get_ith_raster_cat(const struct Categories *, int, void *, void *,
- RASTER_MAP_TYPE);
-int G_init_cats(CELL, const char *, struct Categories *);
-int G_init_raster_cats(const char *, struct Categories *);
-int G_set_cats_title(const char *, struct Categories *);
-int G_set_raster_cats_title(const char *, struct Categories *);
-int G_set_cats_fmt(const char *, double, double, double, double,
- struct Categories *);
-int G_set_raster_cats_fmt(const char *, double, double, double, double,
- struct Categories *);
-int G_free_cats(struct Categories *);
-int G_free_raster_cats(struct Categories *);
-int G_copy_raster_cats(struct Categories *, const struct Categories *);
-int G_number_of_raster_cats(struct Categories *);
-int G_sort_cats(struct Categories *);
-
-/* cell_stats.c */
-int G_init_cell_stats(struct Cell_stats *);
-int G_update_cell_stats(const CELL *, int, struct Cell_stats *);
-int G_find_cell_stat(CELL, long *, const struct Cell_stats *);
-int G_rewind_cell_stats(struct Cell_stats *);
-int G_next_cell_stat(CELL *, long *, struct Cell_stats *);
-int G_get_stats_for_null_value(long *, const struct Cell_stats *);
-int G_free_cell_stats(struct Cell_stats *);
-
-/* cell_title.c */
-char *G_get_cell_title(const char *, const char *);
-
-/* cellstats_eq.c */
-int G_cell_stats_histo_eq(struct Cell_stats *, CELL, CELL, CELL, CELL, int,
- void (*)(CELL, CELL, CELL));
-
-/* chop.c */
-char *G_chop(char *);
-
-/* clear_scrn.c */
-int G_clear_screen(void);
-
-/* clicker.c */
-int G_clicker(void);
-
-/* closecell.c */
-int G_close_cell(int);
-int G_unopen_cell(int);
-int G__write_fp_format(int);
-
-/* color_compat.c */
-int G_make_ryg_colors(struct Colors *, CELL, CELL);
-int G_make_ryg_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_aspect_colors(struct Colors *, CELL, CELL);
-int G_make_aspect_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_byr_colors(struct Colors *, CELL, CELL);
-int G_make_byr_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_byg_colors(struct Colors *, CELL, CELL);
-int G_make_byg_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_grey_scale_colors(struct Colors *, CELL, CELL);
-int G_make_grey_scale_fp_colors(struct Colors *, double, double);
-int G_make_gyr_colors(struct Colors *, CELL, CELL);
-int G_make_gyr_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_rainbow_colors(struct Colors *, CELL, CELL);
-int G_make_rainbow_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_ramp_colors(struct Colors *, CELL, CELL);
-int G_make_ramp_fp_colors(struct Colors *, DCELL, DCELL);
-int G_make_wave_colors(struct Colors *, CELL, CELL);
-int G_make_wave_fp_colors(struct Colors *, DCELL, DCELL);
-
-/* color_free.c */
-int G_free_colors(struct Colors *);
-int G__color_free_rules(struct _Color_Info_ *);
-int G__color_free_lookup(struct _Color_Info_ *);
-int G__color_free_fp_lookup(struct _Color_Info_ *);
-int G__color_reset(struct Colors *);
-
-/* color_get.c */
-int G_get_color(CELL, int *, int *, int *, struct Colors *);
-int G_get_raster_color(const void *, int *, int *, int *, struct Colors *,
- RASTER_MAP_TYPE);
-int G_get_c_raster_color(const CELL *, int *, int *, int *, struct Colors *);
-int G_get_f_raster_color(const FCELL *, int *, int *, int *, struct Colors *);
-int G_get_d_raster_color(const DCELL *, int *, int *, int *, struct Colors *);
-int G_get_null_value_color(int *, int *, int *, const struct Colors *);
-int G_get_default_color(int *, int *, int *, const struct Colors *);
-
-/* color_hist.c */
-int G_make_histogram_eq_colors(struct Colors *, struct Cell_stats *);
-int G_make_histogram_log_colors(struct Colors *, struct Cell_stats *, int,
- int);
-
-/* color_init.c */
-int G_init_colors(struct Colors *);
-
-/* color_insrt.c */
-int G__insert_color_into_lookup(CELL, int, int, int, struct _Color_Info_ *);
-
-/* color_invrt.c */
-int G_invert_colors(struct Colors *);
-
-/* color_look.c */
-int G_lookup_colors(const CELL *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int, struct Colors *);
-int G_lookup_c_raster_colors(const CELL *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int,
- struct Colors *);
-int G_lookup_raster_colors(const void *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int,
- struct Colors *, RASTER_MAP_TYPE);
-int G_lookup_f_raster_colors(const FCELL *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int,
- struct Colors *);
-int G_lookup_d_raster_colors(const DCELL *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int,
- struct Colors *);
-int G__lookup_colors(const void *, unsigned char *, unsigned char *,
- unsigned char *, unsigned char *, int, struct Colors *,
- int, int, RASTER_MAP_TYPE);
-int G__interpolate_color_rule(DCELL, unsigned char *, unsigned char *,
- unsigned char *, const struct _Color_Rule_ *);
-
-/* color_org.c */
-int G__organize_colors(struct Colors *);
-
-/* color_rand.c */
-int G_make_random_colors(struct Colors *, CELL, CELL);
-
-/* color_range.c */
-int G_set_color_range(CELL, CELL, struct Colors *);
-int G_set_d_color_range(DCELL, DCELL, struct Colors *);
-int G_get_color_range(CELL *, CELL *, const struct Colors *);
-int G_get_d_color_range(DCELL *, DCELL *, const struct Colors *);
-
-/* color_read.c */
-int G_read_colors(const char *, const char *, struct Colors *);
-int G_mark_colors_as_fp(struct Colors *);
-
-/* color_remove.c */
-int G_remove_colors(const char *, const char *);
-
-/* color_rule.c */
-int G_add_d_raster_color_rule(const DCELL *, int, int, int, const DCELL *,
- int, int, int, struct Colors *);
-int G_add_f_raster_color_rule(const FCELL *, int, int, int, const FCELL *,
- int, int, int, struct Colors *);
-int G_add_c_raster_color_rule(const CELL *, int, int, int, const CELL *, int,
- int, int, struct Colors *);
-int G_add_raster_color_rule(const void *, int, int, int, const void *, int,
- int, int, struct Colors *, RASTER_MAP_TYPE);
-int G_add_color_rule(const CELL, int, int, int, const CELL, int, int, int,
- struct Colors *);
-int G_add_modular_d_raster_color_rule(const DCELL *, int, int, int,
- const DCELL *, int, int, int,
- struct Colors *);
-int G_add_modular_f_raster_color_rule(const FCELL *, int, int, int,
- const FCELL *, int, int, int,
- struct Colors *);
-int G_add_modular_c_raster_color_rule(const CELL *, int, int, int,
- const CELL *, int, int, int,
- struct Colors *);
-int G_add_modular_raster_color_rule(const void *, int, int, int, const void *,
- int, int, int, struct Colors *,
- RASTER_MAP_TYPE);
-int G_add_modular_color_rule(CELL, int, int, int, CELL, int, int, int,
- struct Colors *);
-
-/* color_rule_get.c */
-int G_colors_count(const struct Colors *);
-int G_get_f_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 G_parse_color_rule(DCELL, DCELL, const char *, DCELL *, int *, int *,
- int *, int *, int *, int *);
-const char *G_parse_color_rule_error(int);
-int G_read_color_rule(void *, DCELL, DCELL, DCELL *, int *, int *, int *,
- int *, int *, int *);
-int G_read_color_rules(struct Colors *, DCELL, DCELL, read_rule_fn *, void *);
-int G_load_colors(struct Colors *, const char *, CELL, CELL);
-int G_load_fp_colors(struct Colors *, const char *, DCELL, DCELL);
-int G_make_colors(struct Colors *, const char *, CELL, CELL);
-int G_make_fp_colors(struct Colors *, const char *, DCELL, DCELL);
-
-/* color_set.c */
-int G_set_color(CELL, int, int, int, struct Colors *);
-int G_set_d_color(DCELL, int, int, int, struct Colors *);
-int G_set_null_value_color(int, int, int, struct Colors *);
-int G_set_default_color(int, int, int, struct Colors *);
-
-/* color_shift.c */
-int G_shift_colors(int, struct Colors *);
-int G_shift_d_colors(DCELL, struct Colors *);
-
-/* color_str.c */
-int G_str_to_color(const char *, int *, int *, int *);
-
-/* color_write.c */
-int G_write_colors(const char *, const char *, struct Colors *);
-int G__write_colors(FILE *, struct Colors *);
-
-/* color_xform.c */
-int G_histogram_eq_colors(struct Colors *, struct Colors *,
- struct Cell_stats *);
-int G_log_colors(struct Colors *, struct Colors *, int);
-
-/* commas.c */
-int G_insert_commas(char *);
-int G_remove_commas(char *);
-
-/* copy.c */
-int G_copy(void *, const void *, int);
-
-/* copy_file.c */
-int G_copy_file(const char *infile, const char *outfile);
-
-/* 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);
-int G_free_vector(double *);
-int G_free_matrix(double **);
-int G_free_fmatrix(float **);
-
-/* date.c */
-char *G_date(void);
-
-/* datum.c */
-int G_get_datum_by_name(const char *);
-char *G_datum_name(int);
-char *G_datum_description(int);
-char *G_datum_ellipsoid(int);
-int G_get_datumparams_from_projinfo(const struct Key_Value *projinfo,
- char *datumname, char *params);
-
-/* debug.c */
-int G_debug(int, const char *, ...);
-
-/* 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 */
-int G_done_msg(const char *, ...);
-
-/* eigen_tools.c */
-int G_tqli(double[], double[], int, double **);
-void G_tred2(double **, int, double[], double[]);
-
-/* endian.c */
-int G_is_little_endian(void);
-
-/* env.c */
-char *G_getenv(const char *);
-char *G_getenv2(const char *, int);
-char *G__getenv(const char *);
-char *G__getenv2(const char *, int);
-int G_setenv(const char *, const char *);
-int G_setenv2(const char *, const char *, int);
-int G__setenv(const char *, const char *);
-int G__setenv2(const char *, const char *, int);
-int G_unsetenv(const char *);
-int G_unsetenv2(const char *, int);
-int G__write_env(void);
-char *G__env_name(int);
-int G__read_env(void);
-void G_set_gisrc_mode(int);
-int G_get_gisrc_mode(void);
-int G__set_gisrc_file(const char *);
-char *G__get_gisrc_file(void);
-int G__create_alt_env(void);
-int G__switch_env(void);
-
-/* error.c */
-int G_info_format(void);
-void G_message(const char *, ...);
-void G_verbose_message(const char *, ...);
-void G_important_message(const char *, ...);
-int G_fatal_error(const char *, ...);
-int G_warning(const char *, ...);
-int G_suppress_warnings(int);
-int G_sleep_on_error(int);
-int G_set_error_routine(int (*)(const char *, int));
-int G_unset_error_routine(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_cell.c */
-char *G_find_cell(char *, const char *);
-char *G_find_cell2(const char *, const char *);
-
-/* find_file.c */
-char *G_find_file(const char *, char *, const char *);
-char *G_find_file2(const char *, const char *, const char *);
-char *G_find_file_misc(const char *, const char *, char *, const char *);
-char *G_find_file2_misc(const char *, const char *, const char *,
- const char *);
-
-/* find_etc.c */
-char *G_find_etc(const char *);
-
-/* find_vect.c */
-char *G_find_vector(char *, const char *);
-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);
-
-/* fork.c */
-int G_fork(void);
-
-/* format.c */
-int G__check_format(int);
-int G__read_row_ptrs(int);
-int G__write_row_ptrs(int);
-
-/* fpreclass.c */
-void G_fpreclass_clear(struct FPReclass *);
-void G_fpreclass_reset(struct FPReclass *);
-int G_fpreclass_init(struct FPReclass *);
-void G_fpreclass_set_domain(struct FPReclass *, DCELL, DCELL);
-void G_fpreclass_set_range(struct FPReclass *, DCELL, DCELL);
-int G_fpreclass_get_limits(const struct FPReclass *, DCELL *, DCELL *,
- DCELL *, DCELL *);
-int G_fpreclass_nof_rules(const struct FPReclass *);
-void G_fpreclass_get_ith_rule(const struct FPReclass *, int, DCELL *, DCELL *,
- DCELL *, DCELL *);
-void G_fpreclass_set_neg_infinite_rule(struct FPReclass *, DCELL, DCELL);
-int G_fpreclass_get_neg_infinite_rule(const struct FPReclass *, DCELL *,
- DCELL *);
-void G_fpreclass_set_pos_infinite_rule(struct FPReclass *, DCELL, DCELL);
-int G_fpreclass_get_pos_infinite_rule(const struct FPReclass *, DCELL *,
- DCELL *);
-void G_fpreclass_add_rule(struct FPReclass *, DCELL, DCELL, DCELL, DCELL);
-void G_fpreclass_reverse_rule_order(struct FPReclass *);
-DCELL G_fpreclass_get_cell_value(const struct FPReclass *, DCELL);
-void G_fpreclass_perform_di(const struct FPReclass *, const DCELL *, CELL *,
- int);
-void G_fpreclass_perform_df(const struct FPReclass *, const DCELL *, FCELL *,
- int);
-void G_fpreclass_perform_dd(const struct FPReclass *, const DCELL *, DCELL *,
- int);
-void G_fpreclass_perform_fi(const struct FPReclass *, const FCELL *, CELL *,
- int);
-void G_fpreclass_perform_ff(const struct FPReclass *, const FCELL *, FCELL *,
- int);
-void G_fpreclass_perform_fd(const struct FPReclass *, const FCELL *, DCELL *,
- int);
-void G_fpreclass_perform_ii(const struct FPReclass *, const CELL *, CELL *,
- int);
-void G_fpreclass_perform_if(const struct FPReclass *, const CELL *, FCELL *,
- int);
-void G_fpreclass_perform_id(const struct FPReclass *, const CELL *, DCELL *,
- int);
-
-/* geodesic.c */
-int G_begin_geodesic_equation(double, double, double, double);
-double G_geodesic_lat_from_lon(double);
-
-/* geodist.c */
-int G_begin_geodesic_distance(double, double);
-int G_set_geodesic_distance_lat1(double);
-int G_set_geodesic_distance_lat2(double);
-double G_geodesic_distance_lon_to_lon(double, double);
-double G_geodesic_distance(double, double, double, double);
-
-/* get_cellhd.c */
-int G_get_cellhd(const char *, const char *, struct Cell_head *);
-
-/* get_datum_name.c */
-int G_ask_datum_name(char *, char *);
-
-/* get_ell_name.c */
-int G_ask_ellipse_name(char *);
-
-/* 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 *);
-char *G_ellipsoid_name(int);
-char *G_ellipsoid_description(int);
-
-/* get_projinfo.c */
-struct Key_Value *G_get_projunits(void);
-struct Key_Value *G_get_projinfo(void);
-
-/* get_projname.c */
-int G_ask_proj_name(char *, char *);
-
-/* get_row.c */
-int G_get_map_row_nomask(int, CELL *, int);
-int G_get_raster_row_nomask(int, void *, int, RASTER_MAP_TYPE);
-int G_get_c_raster_row_nomask(int, CELL *, int);
-int G_get_f_raster_row_nomask(int, FCELL *, int);
-int G_get_d_raster_row_nomask(int, DCELL *, int);
-int G_get_map_row(int, CELL *, int);
-int G_get_raster_row(int, void *, int, RASTER_MAP_TYPE);
-int G_get_c_raster_row(int, CELL *, int);
-int G_get_f_raster_row(int, FCELL *, int);
-int G_get_d_raster_row(int, DCELL *, int);
-int G_get_null_value_row(int, char *, int);
-
-/* get_row_colr.c */
-int G_get_raster_row_colors(int, int, struct Colors *,
- unsigned char *, unsigned char *, unsigned char *,
- unsigned char *);
-
-/* get_window.c */
-int G_get_window(struct Cell_head *);
-int G_get_default_window(struct Cell_head *);
-char *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 *);
-
-/* gets.c */
-int G_gets(char *);
-
-/* gisbase.c */
-char *G_gisbase(void);
-
-/* gisdbase.c */
-char *G_gisdbase(void);
-
-/* gishelp.c */
-int G_gishelp(const char *, const char *);
-
-/* gisinit.c */
-int G_gisinit(const char *);
-int G_no_gisinit(void);
-int G__check_gisinit(void);
-
-/* histo_eq.c */
-int G_histogram_eq(const struct Histogram *, unsigned char **, CELL *,
- CELL *);
-
-/* histogram.c */
-int G_init_histogram(struct Histogram *);
-int G_read_histogram(const char *, const char *, struct Histogram *);
-int G_write_histogram(const char *, const struct Histogram *);
-int G_write_histogram_cs(const char *, struct Cell_stats *);
-int G_make_histogram_cs(struct Cell_stats *, struct Histogram *);
-int G_get_histogram_num(const struct Histogram *);
-CELL G_get_histogram_cat(int, const struct Histogram *);
-long G_get_histogram_count(int, const struct Histogram *);
-int G_free_histogram(struct Histogram *);
-int G_sort_histogram(struct Histogram *);
-int G_sort_histogram_by_count(struct Histogram *);
-int G_remove_histogram(const char *);
-int G_add_histogram(CELL, long, struct Histogram *);
-int G_set_histogram(CELL, long, struct Histogram *);
-int G_extend_histogram(CELL, long, struct Histogram *);
-int G_zero_histogram(struct Histogram *);
-
-/* history.c */
-int G_read_history(const char *, const char *, struct History *);
-int G_write_history(const char *, struct History *);
-int G_short_history(const char *, const char *, struct History *);
-int G_command_history(struct History *);
-
-/* home.c */
-char *G_home(void);
-char *G__home(void);
-
-/* ialloc.c */
-int *G_alloc_ivector(size_t);
-int **G_alloc_imatrix(int, int);
-int G_free_ivector(int *);
-int G_free_imatrix(int **);
-
-/* index.c */
-char *G_index(const char *, int);
-char *G_rindex(const char *, int);
-
-/* init_map.c */
-int G__random_d_initialize_0(int, int, int);
-int G__random_f_initialize_0(int, int, int);
-
-/* interp.c */
-DCELL G_interp_linear(double, DCELL, DCELL);
-DCELL G_interp_bilinear(double, double, DCELL, DCELL, DCELL, DCELL);
-DCELL G_interp_cubic(double, DCELL, DCELL, DCELL, DCELL);
-DCELL G_interp_bicubic(double, double,
- DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
- DCELL, DCELL, DCELL, DCELL, DCELL, DCELL, DCELL,
- DCELL);
-
-/* intersect.c */
-int G_intersect_line_segments(double, double, double, double, double, double,
- double, double, double *, double *, double *,
- double *);
-
-/* intr_char.c */
-char G_intr_char(void);
-
-/* 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);
-int G_set_key_value(const char *, const char *, struct Key_Value *);
-char *G_find_key_value(const char *, const struct Key_Value *);
-int 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 */
-int G_write_key_value_file(const char *, const struct Key_Value *, int *);
-struct Key_Value *G_read_key_value_file(const char *, int *);
-
-/* key_value4.c */
-int 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 */
-int G_set_distance_to_line_tolerance(double);
-double G_distance2_point_to_line(double, double, double, double, double,
- double);
-
-/* list.c */
-int G_set_list_hit_return(int);
-int 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 */
-int G_lat_format(double, char *);
-char *G_lat_format_string(void);
-int G_lon_format(double, char *);
-char *G_lon_format_string(void);
-int G_llres_format(double, char *);
-char *G_llres_format_string(void);
-int G_lat_parts(double, int *, int *, double *, char *);
-int 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 */
-char *G_location_path(void);
-char *G_location(void);
-char *G__location_path(void);
-
-/* ls.c */
-char **G__ls(const char *, int *);
-void G_ls(const char *, FILE *);
-void G_ls_format(const char **, int, int, FILE *);
-
-/* lu.c */
-int G_ludcmp(double **, int, int *, double *);
-void G_lubksb(double **, int, int *, double[]);
-
-/* lzw.c */
-unsigned char *lzw_decode(unsigned char *, unsigned int);
-int lzw_expand(int (*)(), int (*)());
-int G_lzw_nof_read_bytes(void);
-int G_lzw_max_used_bits(void);
-void G_lzw_set_bits(int);
-int G_lzw_compress(unsigned char *, unsigned char *, int);
-int G_lzw_expand(unsigned char *, unsigned char *, int);
-int G_lzw_compress_count_only_array(unsigned char *, int);
-int G_lzw_compress_count_only_file(int);
-int G_lzw_write(int, unsigned char *, int);
-int G_lzw_write_noCompress(int, unsigned char *, int);
-int G_lzw_test_status(int);
-int G_lzw_read2(int, unsigned char *, int, int);
-int G_lzw_read(int, unsigned char *, int);
-int G_lzw_transfer_compress(int, int, int);
-int G_lzw_transfer_expand(int, int, int);
-
-/* mach_name.c */
-char *G__machine_name(void);
-
-/* make_colr.c */
-int G_ask_colors(const char *, const char *, struct Colors *);
-
-/* 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 */
-char *G_mapset(void);
-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 */
-char *G__mapset_name(int);
-int G__create_alt_search_path(void);
-int G__switch_search_path(void);
-int G_reset_mapsets(void);
-char **G_available_mapsets(void);
-void G_add_mapset_to_search_path(const char *mapset);
-
-/* mask_info.c */
-char *G_mask_info(void);
-int G__mask_info(char *, char *);
-
-/* maskfd.c */
-int G_maskfd(void);
-
-/* 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_in_mapset(const char *, char *, char *);
-int G__name_is_fully_qualified(const char *, char *, char *);
-char *G_fully_qualified_name(const char *, const char *);
-
-/* null_val.c */
-void G__init_null_patterns(void);
-void G__set_null_value(void *, int, int, RASTER_MAP_TYPE);
-void G_set_null_value(void *, int, RASTER_MAP_TYPE);
-void G_set_c_null_value(CELL *, int);
-void G_set_f_null_value(FCELL *, int);
-void G_set_d_null_value(DCELL *, int);
-int G_is_null_value(const void *, RASTER_MAP_TYPE);
-int G_is_c_null_value(const CELL *);
-int G_is_f_null_value(const FCELL *);
-int G_is_d_null_value(const DCELL *);
-int G_insert_null_values(void *, char *, int, RASTER_MAP_TYPE);
-int G_insert_c_null_values(CELL *, char *, int);
-int G_insert_f_null_values(FCELL *, char *, int);
-int G_insert_d_null_values(DCELL *, char *, int);
-int G__check_null_bit(const unsigned char *, int, int);
-int G__set_flags_from_01_random(const char *, unsigned char *, int, int, int);
-int G__convert_01_flags(const char *, unsigned char *, int);
-int G__convert_flags_01(char *, const unsigned char *, int);
-int G__init_null_bits(unsigned char *, int);
-
-/* 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 *);
-
-/* opencell.c */
-int G_open_cell_old(const char *, const char *);
-int G__open_cell_old(const char *, const char *);
-int G_open_cell_new(const char *);
-int G_open_cell_new_random(const char *);
-int G_open_cell_new_uncompressed(const char *);
-int G_want_histogram(int);
-int G_set_cell_format(int);
-int G_cellvalue_format(CELL);
-int G_open_fp_cell_new(const char *);
-int G_open_fp_cell_new_uncompressed(const char *);
-int G__reallocate_work_buf(int);
-int G__reallocate_null_buf(void);
-int G__reallocate_mask_buf(void);
-int G__reallocate_temp_buf(void);
-int G_set_fp_type(RASTER_MAP_TYPE);
-int G_raster_map_is_fp(const char *, const char *);
-RASTER_MAP_TYPE G_raster_map_type(const char *, const char *);
-RASTER_MAP_TYPE G_raster_map_type2(const char *, const char *);
-RASTER_MAP_TYPE G__check_fp_type(const char *, const char *);
-RASTER_MAP_TYPE G_get_raster_map_type(int);
-int G_open_raster_new(const char *, RASTER_MAP_TYPE);
-int G_open_raster_new_uncompressed(const char *, RASTER_MAP_TYPE);
-int G_set_quant_rules(int, struct Quant *);
-
-/* parser.c */
-int 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 **);
-int G_usage(void);
-char *G_recreate_command(void);
-
-/* 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 *);
-struct stat;
-int G_lstat(const char *, struct stat *);
-int G_stat(const char *, struct stat *);
-
-/* percent.c */
-int G_percent(long, long, int);
-int G_percent2(long, long, int, FILE *);
-int G_percent_reset(void);
-
-/* plot.c */
-int G_setup_plot(double, double, double, double, int (*)(int, int),
- int (*)(int, int));
-int G_setup_fill(int);
-int G_plot_where_xy(double, double, int *, int *);
-int G_plot_where_en(int, int, double *, double *);
-int G_plot_point(double, double);
-int G_plot_line(double, double, double, double);
-int 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);
-int G_plot_fx(double (*)(double), double, double);
-int G_plot_icon(double, double, int, double, double);
-
-/* pole_in_poly.c */
-int G_pole_in_polygon(const double *, const double *, int);
-
-/* popen.c */
-FILE *G_popen(const char *, const char *);
-int G_pclose(FILE *);
-
-/* progrm_nme.c */
-const char *G_program_name(void);
-int G_set_program_name(const char *);
-
-/* proj1.c */
-int G_projection(void);
-
-/* proj2.c */
-int G__projection_units(int);
-char *G__unit_name(int, int);
-char *G__projection_name(int);
-
-/* proj3.c */
-char *G_database_unit_name(int);
-char *G_database_projection_name(void);
-double G_database_units_to_meters_factor(void);
-char *G_database_datum_name(void);
-char *G_database_ellipse_name(void);
-
-/* put_cellhd.c */
-int G_put_cellhd(const char *, struct Cell_head *);
-
-/* put_row.c */
-int G_zeros_r_nulls(int);
-int G_put_map_row(int, const CELL *);
-int G_put_map_row_random(int, const CELL *, int, int, int);
-int G__put_null_value_row(int, const char *);
-int G_put_raster_row(int, const void *, RASTER_MAP_TYPE);
-int G_put_c_raster_row(int, const CELL *);
-int G_put_f_raster_row(int, const FCELL *);
-int G_put_d_raster_row(int, const DCELL *);
-int G__write_data(int, int, int);
-int G__write_data_compressed(int, int, int);
-int G__open_null_write(int);
-int G__write_null_bits(int, const unsigned char *, int, int, int);
-
-/* put_title.c */
-int G_put_cell_title(const char *, const char *);
-
-/* put_window.c */
-int G_put_window(const struct Cell_head *);
-int G__put_window(const struct Cell_head *, char *, char *);
-
-/* putenv.c */
-void G_putenv(const char *, const char *);
-
-/* quant.c */
-void G_quant_clear(struct Quant *);
-void G_quant_free(struct Quant *);
-int G__quant_organize_fp_lookup(struct Quant *);
-int G_quant_init(struct Quant *);
-int G_quant_is_truncate(const struct Quant *);
-int G_quant_is_round(const struct Quant *);
-int G_quant_truncate(struct Quant *);
-int G_quant_round(struct Quant *);
-int G_quant_get_limits(const struct Quant *, DCELL *, DCELL *, CELL *,
- CELL *);
-int G_quant_nof_rules(const struct Quant *);
-void G_quant_get_ith_rule(const struct Quant *, int, DCELL *, DCELL *, CELL *,
- CELL *);
-void G_quant_set_neg_infinite_rule(struct Quant *, DCELL, CELL);
-int G_quant_get_neg_infinite_rule(const struct Quant *, DCELL *, CELL *);
-void G_quant_set_pos_infinite_rule(struct Quant *, DCELL, CELL);
-int G_quant_get_pos_infinite_rule(const struct Quant *, DCELL *, CELL *);
-void G_quant_add_rule(struct Quant *, DCELL, DCELL, CELL, CELL);
-void G_quant_reverse_rule_order(struct Quant *);
-CELL G_quant_get_cell_value(struct Quant *, DCELL);
-void G_quant_perform_d(struct Quant *, const DCELL *, CELL *, int);
-void G_quant_perform_f(struct Quant *, const FCELL *, CELL *, int);
-struct Quant_table *G__quant_get_rule_for_d_raster_val(const struct Quant *,
- DCELL);
-
-/* quant_io.c */
-int G__quant_import(const char *, const char *, struct Quant *);
-int G__quant_export(const char *, const char *, const struct Quant *);
-
-/* quant_rw.c */
-int G_truncate_fp_map(const char *, const char *);
-int G_round_fp_map(const char *, const char *);
-int G_quantize_fp_map(const char *, const char *, CELL, CELL);
-int G_quantize_fp_map_range(const char *, const char *, DCELL, DCELL, CELL,
- CELL);
-int G_write_quant(const char *, const char *, const struct Quant *);
-int G_read_quant(const char *, const char *, struct Quant *);
-
-/* 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);
-
-/* range.c */
-int G__remove_fp_range(const char *);
-int G_construct_default_range(struct Range *);
-int G_read_fp_range(const char *, const char *, struct FPRange *);
-int G_read_range(const char *, const char *, struct Range *);
-int G_write_range(const char *, const struct Range *);
-int G_write_fp_range(const char *, const struct FPRange *);
-int G_update_range(CELL, struct Range *);
-int G_update_fp_range(DCELL, struct FPRange *);
-int G_row_update_range(const CELL *, int, struct Range *);
-int G__row_update_range(const CELL *, int, struct Range *, int);
-int G_row_update_fp_range(const void *, int, struct FPRange *,
- RASTER_MAP_TYPE);
-int G_init_range(struct Range *);
-int G_get_range_min_max(const struct Range *, CELL *, CELL *);
-int G_init_fp_range(struct FPRange *);
-int G_get_fp_range_min_max(const struct FPRange *, DCELL *, DCELL *);
-
-/* raster.c */
-void *G_incr_void_ptr(const void *, int);
-int G_raster_cmp(const void *, const void *, RASTER_MAP_TYPE);
-int G_raster_cpy(void *, const void *, int, RASTER_MAP_TYPE);
-int G_set_raster_value_c(void *, CELL, RASTER_MAP_TYPE);
-int G_set_raster_value_f(void *, FCELL, RASTER_MAP_TYPE);
-int G_set_raster_value_d(void *, DCELL, RASTER_MAP_TYPE);
-CELL G_get_raster_value_c(const void *, RASTER_MAP_TYPE);
-FCELL G_get_raster_value_f(const void *, RASTER_MAP_TYPE);
-DCELL G_get_raster_value_d(const void *, RASTER_MAP_TYPE);
-
-/* raster_metadata.c */
-int G_read_raster_units(const char *, const char *, char *);
-int G_read_raster_vdatum(const char *, const char *, char *);
-int G_write_raster_units(const char *, const char *);
-int G_write_raster_vdatum(const char *, const char *);
-int G__raster_misc_read_line(const char *, const char *, const char *,
- char *);
-int G__raster_misc_write_line(const char *, const char *, const char *);
-
-/* rd_cellhd.c */
-char *G__read_Cell_head(FILE *, struct Cell_head *, int);
-char *G__read_Cell_head_array(char **, struct Cell_head *, int);
-
-/* reclass.c */
-int G_is_reclass(const char *, const char *, char *, char *);
-int G_is_reclassed_to(const char *, const char *, int *, char ***);
-int G_get_reclass(const char *, const char *, struct Reclass *);
-int G_free_reclass(struct Reclass *);
-int G_put_reclass(const char *, const struct Reclass *);
-
-/* remove.c */
-int G_remove(const char *, const char *);
-int G_remove_misc(const char *, const char *, const char *);
-
-/* rename.c */
-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);
-
-/* sample.c */
-double G_get_raster_sample(int, const struct Cell_head *, struct Categories *,
- double, double, int, INTERP_TYPE);
-
-/* set_window.c */
-int G_get_set_window(struct Cell_head *);
-int G_set_window(struct Cell_head *);
-
-/* short_way.c */
-int G_shortest_way(double *, double *);
-
-/* sleep.c */
-void G_sleep(unsigned int);
-
-/* snprintf.c */
-int G_snprintf(char *, size_t, const char *, ...);
-
-/* squeeze.c */
-char *G_squeeze(char *);
-
-/* store.c */
-char *G_store(const char *);
-
-/* strings.c */
-char *G_strcpy(char *, const char *);
-char *G_chrcpy(char *, const char *, int);
-char *G_strncpy(char *, const char *, int);
-char *G_strcat(char *, const char *);
-char *G_chrcat(char *, const char *, int);
-char *G_strmov(char *, const char *);
-char *G_chrmov(char *, const char *, int);
-int G_strcasecmp(const char *, const char *);
-char *G_strstr(const char *, const char *);
-char *G_strdup(const char *);
-char *G_strchg(char *, char, char);
-char *G_str_replace(char *, const char *, const char *);
-void G_str_to_upper(char *);
-void G_str_to_lower(char *);
-int G_str_to_sql(char *);
-int G_strip(char *);
-
-/* svd.c */
-int G_svdcmp(double **, int, int, double *, double **);
-int G_svbksb(double **, double[], double **, int, int, double[], double[]);
-int G_svelim(double *, int);
-
-/* system.c */
-int G_system(const char *);
-
-/* tempfile.c */
-char *G_tempfile(void);
-char *G__tempfile(int);
-int G__temp_element(char *);
-
-/* timestamp.c */
-void G_init_timestamp(struct TimeStamp *);
-void G_set_timestamp(struct TimeStamp *, const DateTime *);
-void G_set_timestamp_range(struct TimeStamp *, const DateTime *,
- const DateTime *);
-int G__read_timestamp(FILE *, struct TimeStamp *);
-int G__write_timestamp(FILE *, const struct TimeStamp *);
-int G_get_timestamps(const struct TimeStamp *, DateTime *, 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 *, 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 *);
-int G_number_of_tokens(char **);
-int G_free_tokens(char **);
-
-/* trim_dec.c */
-int G_trim_decimal(char *);
-
-/* unctrl.c */
-char *G_unctrl(int);
-
-/* unix_socks.c */
-char *G_sock_get_fname(const char *);
-int G_sock_exists(const char *);
-int G_sock_bind(const char *);
-int G_sock_listen(int, unsigned int);
-int G_sock_accept(int);
-int G_sock_connect(const char *);
-
-/* 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 */
-int 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 */
-char *G_whoami(void);
-
-/* wind_2_box.c */
-int G_adjust_window_to_box(const struct Cell_head *, struct Cell_head *, int,
- int);
-
-/* wind_format.c */
-int G_format_northing(double, char *, int);
-int G_format_easting(double, char *, int);
-int 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 */
-int G__create_window_mapping(int);
-double G_northing_to_row(double, const struct Cell_head *);
-double G_adjust_east_longitude(double, double);
-double G_adjust_easting(double, const struct Cell_head *);
-double G_easting_to_col(double, const struct Cell_head *);
-double G_row_to_northing(double, const struct Cell_head *);
-double G_col_to_easting(double, const struct Cell_head *);
-int G_window_rows(void);
-int G_window_cols(void);
-int G__init_window(void);
-int G_row_repeat_nomask(int, int);
-
-/* wr_cellhd.c */
-int G__write_Cell_head(FILE *, const struct Cell_head *, int);
-int G__write_Cell_head3(FILE *, const struct Cell_head *, int);
-
-/* writ_zeros.c */
-int G_write_zeros(int, size_t);
-
-/* yes.c */
-int G_yes(const char *, int);
-
-/* zero.c */
-int G_zero(void *, int);
-
-/* zero_cell.c */
-int G_zero_cell_buf(CELL *);
-int G_zero_raster_buf(void *, RASTER_MAP_TYPE);
-
-/* zone.c */
-int G_zone(void);
-
-#endif /* GRASS_GISDEFS_H */
More information about the grass-commit
mailing list