~ubuntu-branches/ubuntu/precise/grass/precise

« back to all changes in this revision

Viewing changes to swig/perl/gis.h

  • Committer: Bazaar Package Importer
  • Author(s): Francesco Paolo Lovergine
  • Date: 2011-04-13 17:08:41 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110413170841-ss1t9bic0d0uq0gz
Tags: 6.4.1-1
* New upstream version.
* Now build-dep on libjpeg-dev and current libreadline6-dev.
* Removed patch swig: obsolete.
* Policy bumped to 3.9.2, without changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 *****************************************************************************
3
 
 *
4
 
 * MODULE:      Grass Include Files
5
 
 * AUTHOR(S):   Original author unknown - probably CERL
6
 
 *              Justin Hickey - Thailand - jhickey@hpcc.nectec.or.th
7
 
 * PURPOSE:     This file contains definitions of variables and data types
8
 
 *              for use with most, if not all, Grass programs. This file is
9
 
 *              usually included in every Grass program.
10
 
 * COPYRIGHT:    (C) 2000 by the GRASS Development Team
11
 
 *
12
 
 *               This program is free software under the GNU General Public
13
 
 *              License (>=v2). Read the file COPYING that comes with GRASS
14
 
 *              for details.
15
 
 *
16
 
 *****************************************************************************/
17
 
 
18
 
#ifndef GRASS_GIS_H
19
 
#define GRASS_GIS_H
20
 
 
21
 
/*============================= Include Files ==============================*/
22
 
 
23
 
/* System include files */
24
 
#include <stdio.h>
25
 
#include <stdarg.h>
26
 
 
27
 
/* Grass and local include files */
28
 
#include <grass/config.h>
29
 
#include <grass/datetime.h>
30
 
 
31
 
/*=========================== Constants/Defines ============================*/
32
 
 
33
 
#if !defined __GNUC__ || __GNUC__ < 2
34
 
#undef __attribute__
35
 
#define __attribute__(x)
36
 
#endif
37
 
 
38
 
static const char *GRASS_copyright __attribute__ ((unused))
39
 
    = "GRASS GNU GPL licensed Software";
40
 
 
41
 
/* Define TRUE and FALSE for boolean comparisons */
42
 
#ifndef TRUE
43
 
#define TRUE 1
44
 
#endif
45
 
 
46
 
#ifndef FALSE
47
 
#define FALSE 0
48
 
#endif
49
 
 
50
 
#define MAXEDLINES  50
51
 
#define RECORD_LEN  80
52
 
#define NEWLINE     '\n'
53
 
#define RECLASS_TABLE 1
54
 
#define RECLASS_RULES 2
55
 
#define RECLASS_SCALE 3
56
 
 
57
 
#define METERS    1
58
 
#define FEET      2
59
 
#define DEGREES   3
60
 
 
61
 
#define CELL_TYPE 0
62
 
#define FCELL_TYPE 1
63
 
#define DCELL_TYPE 2
64
 
 
65
 
#define PROJECTION_XY  0
66
 
#define PROJECTION_UTM 1
67
 
#define PROJECTION_SP  2
68
 
#define PROJECTION_LL  3
69
 
#define PROJECTION_OTHER  99
70
 
 
71
 
#define PROJECTION_FILE "PROJ_INFO"
72
 
#define UNIT_FILE "PROJ_UNITS"
73
 
 
74
 
/* define PI and friends */
75
 
#undef M_PI
76
 
#define M_PI    3.14159265358979323846  /* pi */
77
 
 
78
 
#undef M_PI_2
79
 
#define M_PI_2  1.57079632679489661923  /* pi/2 */
80
 
 
81
 
#undef M_PI_4
82
 
#define M_PI_4  0.78539816339744830962  /* pi/4 */
83
 
 
84
 
/* epsilon (IEEE: 2.220446e-16) */
85
 
#define GRASS_EPSILON 1.0e-15
86
 
 
87
 
/* Location of envariment variables */
88
 
#define G_VAR_GISRC    0
89
 
#define G_VAR_MAPSET   1
90
 
 
91
 
/* Where to find/store variables */
92
 
#define G_GISRC_MODE_FILE     0 /* files */
93
 
#define G_GISRC_MODE_MEMORY   1 /* memory only */
94
 
 
95
 
/* for G_parser() */
96
 
#define TYPE_INTEGER  1
97
 
#define TYPE_DOUBLE   2
98
 
#define TYPE_STRING   3
99
 
#define YES           1
100
 
#define NO            0
101
 
#define GISPROMPT_COLOR "color,grass,color"
102
 
 
103
 
/* File/directory name lengths */
104
 
#define GNAME_MAX 256
105
 
#define GMAPSET_MAX 256
106
 
 
107
 
#define GPATH_MAX 4096
108
 
 
109
 
/* Macros for type size independent integers                    */
110
 
/* Use these for portability to ensure integers are truly 32bit */
111
 
/* and are handled in a uniform manner                          */
112
 
 
113
 
/* Convert integer to 4 bytes - little endian */
114
 
#define serialize_int32_le(buf, x) do { \
115
 
    (buf)[0] = ((x) >>  0) & 0xFF; \
116
 
    (buf)[1] = ((x) >>  8) & 0xFF; \
117
 
    (buf)[2] = ((x) >> 16) & 0xFF; \
118
 
    (buf)[3] = ((x) >> 24) & 0xFF; \
119
 
} while(0)
120
 
 
121
 
/* Convert 4 bytes to an integer - little endian */
122
 
#define deserialize_int32_le(buf) (((buf)[0] <<  0) | \
123
 
                                   ((buf)[1] <<  8) | \
124
 
                                   ((buf)[2] << 16) | \
125
 
                                   ((buf)[3] << 24))
126
 
 
127
 
/* Convert integer to 4 bytes - big endian */
128
 
#define serialize_int32_be(buf, x) do { \
129
 
    (buf)[0] = ((x) >> 24) & 0xFF; \
130
 
    (buf)[1] = ((x) >> 16) & 0xFF; \
131
 
    (buf)[2] = ((x) >>  8) & 0xFF; \
132
 
    (buf)[3] = ((x) >>  0) & 0xFF; \
133
 
} while(0)
134
 
 
135
 
/* Convert 4 bytes to an integer - big endian */
136
 
#define deserialize_int32_be(buf) (((buf)[0] << 24) | \
137
 
                                   ((buf)[1] << 16) | \
138
 
                                   ((buf)[2] <<  8) | \
139
 
                                   ((buf)[3] <<  0))
140
 
 
141
 
/* Cross-platform Directory Separator Character and null device stuff */
142
 
#define GRASS_DIRSEP '/'
143
 
#ifdef __MINGW32__
144
 
#  define HOST_DIRSEP '\\'
145
 
#  define G_DEV_NULL 'NUL:'
146
 
#else
147
 
#  define HOST_DIRSEP '/'
148
 
#  define G_DEV_NULL '/dev/null'
149
 
#endif
150
 
 
151
 
 /**/ typedef enum
152
 
{
153
 
    G_OPT_WHERE,                /* SQL where conditions */
154
 
    G_OPT_COLUMN,               /* one attr column */
155
 
    G_OPT_COLUMNS,              /* one or more attr columns */
156
 
 
157
 
    G_OPT_I_GROUP,              /* old input imagery group */
158
 
    G_OPT_R_INPUT,              /* old input raster map */
159
 
    G_OPT_R_INPUTS,             /* old input raster maps */
160
 
    G_OPT_R_OUTPUT,             /* new output raster map */
161
 
    G_OPT_R_MAP,                /* old input raster map */
162
 
    G_OPT_R_MAPS,               /* old input rasters map */
163
 
    G_OPT_R_BASE,               /* old input base raster map */
164
 
    G_OPT_R_COVER,              /* old input cover raster map */
165
 
    G_OPT_R_ELEV,               /* old input elevation raster map */
166
 
    G_OPT_R_ELEVS,              /* old input elevation raster maps */
167
 
 
168
 
    G_OPT_R3_INPUT,             /* old input raster3d map */
169
 
    G_OPT_R3_INPUTS,            /* old input raster3d maps */
170
 
    G_OPT_R3_OUTPUT,            /* new output raster3d map */
171
 
 
172
 
    G_OPT_V_INPUT,              /* old input vector map */
173
 
    G_OPT_V_INPUTS,             /* old input vector maps */
174
 
    G_OPT_V_OUTPUT,             /* new output vector map */
175
 
    G_OPT_V_MAP,                /* old input vector map */
176
 
    G_OPT_V_TYPE,               /* primitive type */
177
 
    G_OPT_V_FIELD,              /* field number */
178
 
    G_OPT_V_CAT,                /* one category */
179
 
    G_OPT_V_CATS,               /* more categories */
180
 
 
181
 
    G_OPT_F_INPUT,              /* old input file */
182
 
    G_OPT_F_OUTPUT,             /* new output file */
183
 
    G_OPT_F_SEP,                /* data field separator */
184
 
 
185
 
    G_OPT_C_FG,                 /* foreground color */
186
 
    G_OPT_C_BG                  /* background color */
187
 
} STD_OPT;
188
 
 
189
 
/* Message format */
190
 
#define G_INFO_FORMAT_STANDARD 0        /* GRASS_MESSAGE_FORMAT=standard or not defined */
191
 
#define G_INFO_FORMAT_GUI      1        /* GRASS_MESSAGE_FORMAT=gui */
192
 
#define G_INFO_FORMAT_SILENT   2        /* GRASS_MESSAGE_FORMAT=silent */
193
 
 
194
 
/* Icon types */
195
 
#define G_ICON_CROSS  0
196
 
#define G_ICON_BOX    1
197
 
#define G_ICON_ARROW  2
198
 
 
199
 
/* default colors */
200
 
#define DEFAULT_FG_COLOR "black"
201
 
#define DEFAULT_BG_COLOR "white"
202
 
 
203
 
/* for G_get_raster_sample(), INTERP_TYPE */
204
 
#define UNKNOWN   0
205
 
#define NEAREST   1             /* nearest neighbor interpolation  */
206
 
#define BILINEAR  2             /* bilinear interpolation          */
207
 
#define CUBIC     3             /* cubic interpolation             */
208
 
 
209
 
/* for raster maps */
210
 
#define GR_FATAL_EXIT    0
211
 
#define GR_FATAL_PRINT   1
212
 
#define GR_FATAL_RETURN  2
213
 
 
214
 
/* Element types */
215
 
enum
216
 
{                               /* Dir */
217
 
    G_ELEMENT_RASTER = 1,       /* cell */
218
 
    G_ELEMENT_VECTOR = 2,       /* vector */
219
 
    G_ELEMENT_GROUP = 3,        /* group */
220
 
    G_ELEMENT_REGION = 4        /* window */
221
 
};
222
 
 
223
 
/*=========================== Typedefs/Structures ==========================*/
224
 
 
225
 
typedef int CELL;
226
 
typedef double DCELL;
227
 
typedef float FCELL;
228
 
extern CELL CELL_NODATA;
229
 
 
230
 
typedef int RASTER_MAP_TYPE;
231
 
 
232
 
/* for G_get_raster_sample() */
233
 
typedef int INTERP_TYPE;
234
 
 
235
 
struct Cell_head
236
 
{
237
 
    int format;                 /* max numer of bytes per cell minus 1          */
238
 
    int compressed;             /* 0 = uncompressed, 1 = compressed, -1 pre 3.0 */
239
 
    int rows;                   /* number of rows in the data 2D                */
240
 
    int rows3;                  /* number of rows in the data 3D                */
241
 
    int cols;                   /* number of columns in the data 2D             */
242
 
    int cols3;                  /* number of columns in the data 3D             */
243
 
    int depths;                 /* number of depths in data                     */
244
 
    int proj;                   /* Projection (see #defines above)              */
245
 
    int zone;                   /* Projection zone                              */
246
 
    double ew_res;              /* East to West cell size 2D                    */
247
 
    double ew_res3;             /* East to West cell size 3D                    */
248
 
    double ns_res;              /* North to South cell size 2D                  */
249
 
    double ns_res3;             /* North to South cell size 3D                  */
250
 
    double tb_res;              /* Top to Bottom cell size                      */
251
 
    double north;               /* coordinates of layer                         */
252
 
    double south;
253
 
    double east;
254
 
    double west;
255
 
    double top;
256
 
    double bottom;
257
 
};
258
 
 
259
 
struct _Color_Rule_
260
 
{
261
 
    struct
262
 
    {
263
 
        DCELL value;
264
 
        unsigned char red;
265
 
        unsigned char grn;
266
 
        unsigned char blu;
267
 
    } low, high;
268
 
 
269
 
    struct _Color_Rule_ *next;
270
 
    struct _Color_Rule_ *prev;
271
 
};
272
 
 
273
 
struct _Color_Info_
274
 
{
275
 
    struct _Color_Rule_ *rules;
276
 
    int n_rules;
277
 
 
278
 
    struct
279
 
    {
280
 
        unsigned char *red;
281
 
        unsigned char *grn;
282
 
        unsigned char *blu;
283
 
        unsigned char *set;
284
 
        int nalloc;
285
 
        int active;
286
 
    } lookup;
287
 
 
288
 
    struct
289
 
    {
290
 
        DCELL *vals;
291
 
        /* pointers to color rules corresponding to the intervals btwn vals */
292
 
        struct _Color_Rule_ **rules;
293
 
        int nalloc;
294
 
        int active;
295
 
    } fp_lookup;
296
 
 
297
 
    DCELL min, max;
298
 
};
299
 
 
300
 
struct Colors
301
 
{
302
 
    int version;                /* set by read_colors: -1=old,1=new */
303
 
    DCELL shift;
304
 
    int invert;
305
 
    int is_float;               /* defined on floating point raster data? */
306
 
    int null_set;               /* the colors for null are set? */
307
 
    unsigned char null_red;
308
 
    unsigned char null_grn;
309
 
    unsigned char null_blu;
310
 
    int undef_set;              /* the colors for cells not in range are set? */
311
 
    unsigned char undef_red;
312
 
    unsigned char undef_grn;
313
 
    unsigned char undef_blu;
314
 
    struct _Color_Info_ fixed;
315
 
    struct _Color_Info_ modular;
316
 
    DCELL cmin;
317
 
    DCELL cmax;
318
 
};
319
 
 
320
 
 
321
 
typedef struct
322
 
{
323
 
    unsigned char r, g, b, a;   /* red, green, blue, and alpha */
324
 
} RGBA_Color;
325
 
 
326
 
typedef RGBA_Color RGB_Color;
327
 
 
328
 
/* RGBA_Color alpha presets */
329
 
#define RGBA_COLOR_OPAQUE     255
330
 
#define RGBA_COLOR_TRANSPARENT  0
331
 
#define RGBA_COLOR_NONE         0
332
 
 
333
 
 
334
 
struct Reclass
335
 
{
336
 
    char *name;                 /* name of raster map being reclassed    */
337
 
    char *mapset;               /* mapset in which "name" is found      */
338
 
    int type;                   /* type of reclass                      */
339
 
    int num;                    /* size of reclass table                */
340
 
    CELL min;                   /* table min                            */
341
 
    CELL max;                   /* table max                            */
342
 
    CELL *table;                /* reclass table                        */
343
 
};
344
 
 
345
 
struct FPReclass_table
346
 
{
347
 
    DCELL dLow;                 /* domain low */
348
 
    DCELL dHigh;                /* domain high */
349
 
    DCELL rLow;                 /* range low */
350
 
    DCELL rHigh;                /* range high */
351
 
};
352
 
 
353
 
/* reclass structure from double to double used by r.recode to reclass */
354
 
/* between types: int to double, float to int,... */
355
 
struct FPReclass
356
 
{
357
 
    int defaultDRuleSet;        /* 1 if default domain rule set */
358
 
    int defaultRRuleSet;        /* 1 if default range rule set */
359
 
    int infiniteLeftSet;        /* 1 if negative infinite interval rule exists */
360
 
    int infiniteRightSet;       /* 1 if positive infinite interval rule exists */
361
 
    int rRangeSet;              /* 1 if range range (i.e. interval) is set */
362
 
    int maxNofRules;
363
 
    int nofRules;
364
 
    DCELL defaultDMin;          /* default domain minimum value */
365
 
    DCELL defaultDMax;          /* default domain maximum value */
366
 
    DCELL defaultRMin;          /* default range minimum value */
367
 
    DCELL defaultRMax;          /* default range maximum value */
368
 
    DCELL infiniteDLeft;        /* neg infinite rule */
369
 
    DCELL infiniteDRight;       /* neg infinite rule */
370
 
    DCELL infiniteRLeft;        /* pos infinite rule */
371
 
    DCELL infiniteRRight;       /* pos infinite rule */
372
 
    DCELL dMin;                 /* minimum domain values in rules */
373
 
    DCELL dMax;                 /* maximum domain values in rules */
374
 
    DCELL rMin;                 /* minimum range values in rules */
375
 
    DCELL rMax;                 /* maximum range values in rules */
376
 
    struct FPReclass_table *table;
377
 
};
378
 
 
379
 
struct Quant_table
380
 
{
381
 
    DCELL dLow;
382
 
    DCELL dHigh;
383
 
    CELL cLow;
384
 
    CELL cHigh;
385
 
};
386
 
 
387
 
struct Quant
388
 
{
389
 
    int truncate_only;
390
 
    int round_only;
391
 
    int defaultDRuleSet;
392
 
    int defaultCRuleSet;
393
 
    int infiniteLeftSet;
394
 
    int infiniteRightSet;
395
 
    int cRangeSet;
396
 
    int maxNofRules;
397
 
    int nofRules;
398
 
    DCELL defaultDMin;
399
 
    DCELL defaultDMax;
400
 
    CELL defaultCMin;
401
 
    CELL defaultCMax;
402
 
    DCELL infiniteDLeft;
403
 
    DCELL infiniteDRight;
404
 
    CELL infiniteCLeft;
405
 
    CELL infiniteCRight;
406
 
    DCELL dMin;
407
 
    DCELL dMax;
408
 
    CELL cMin;
409
 
    CELL cMax;
410
 
    struct Quant_table *table;
411
 
 
412
 
    struct
413
 
    {
414
 
        DCELL *vals;
415
 
 
416
 
        /* pointers to quant rules corresponding to the intervals btwn vals */
417
 
        struct Quant_table **rules;
418
 
        int nalloc;
419
 
        int active;
420
 
        DCELL inf_dmin;
421
 
        DCELL inf_dmax;
422
 
        CELL inf_min;
423
 
        CELL inf_max;
424
 
        /* all values smaller than inf_dmin become inf_min */
425
 
        /* all values larger than inf_dmax become inf_max */
426
 
        /* inf_min and/or inf_max can be NULL if there are no inf rules */
427
 
    } fp_lookup;
428
 
};
429
 
 
430
 
struct Categories
431
 
{
432
 
    CELL ncats;                 /* total number of categories              */
433
 
    CELL num;                   /* the highest cell values. Only exists    
434
 
                                   for backwards compatibility = (CELL)
435
 
                                   max_fp_values in quant rules          */
436
 
    char *title;                /* name of data layer                      */
437
 
    char *fmt;                  /* printf-like format to generate labels   */
438
 
    float m1;                   /* Multiplication coefficient 1            */
439
 
    float a1;                   /* Addition coefficient 1                  */
440
 
    float m2;                   /* Multiplication coefficient 2            */
441
 
    float a2;                   /* Addition coefficient 2                  */
442
 
    struct Quant q;             /* rules mapping cell values to index in
443
 
                                   list of labels                        */
444
 
    char **labels;              /* array of labels of size num             */
445
 
    int *marks;                 /* was the value with this label was used? */
446
 
    int nalloc;
447
 
    int last_marked_rule;
448
 
    /* NOTE: to get a rule corresponfing to cats.labels[i], use */
449
 
    /* G_get_ith_c/f/d_raster_cat (pcats, i, val1, val2) */
450
 
    /* it calls */
451
 
    /* G_quant_get_ith_rule(&cats->q, i, val1, val2, &index, &index); */
452
 
    /* and idex ==i, because rule is added at the same time as a */
453
 
    /* label, and quant rules are never reordered. Olga apr,95 */
454
 
};
455
 
 
456
 
struct History
457
 
{
458
 
    char mapid[RECORD_LEN];
459
 
    char title[RECORD_LEN];
460
 
    char mapset[RECORD_LEN];
461
 
    char creator[RECORD_LEN];
462
 
    char maptype[RECORD_LEN];
463
 
    char datsrc_1[RECORD_LEN];
464
 
    char datsrc_2[RECORD_LEN];
465
 
    char keywrd[RECORD_LEN];
466
 
    int edlinecnt;
467
 
    char edhist[MAXEDLINES][RECORD_LEN];
468
 
};
469
 
 
470
 
struct Cell_stats
471
 
{
472
 
    struct Cell_stats_node
473
 
    {
474
 
        int idx;
475
 
        long *count;
476
 
        int left;
477
 
        int right;
478
 
    } *node;                    /* tree of values */
479
 
 
480
 
    int tlen;                   /* allocated tree size */
481
 
    int N;                      /* number of actual nodes in tree */
482
 
    int curp;
483
 
    long null_data_count;
484
 
    int curoffset;
485
 
};
486
 
 
487
 
struct Histogram
488
 
{
489
 
    int num;
490
 
 
491
 
    struct Histogram_list
492
 
    {
493
 
        CELL cat;
494
 
        long count;
495
 
    } *list;
496
 
};
497
 
 
498
 
struct Range
499
 
{
500
 
    CELL min;
501
 
    CELL max;
502
 
    int first_time;             /* whether or not range was updated */
503
 
};
504
 
 
505
 
struct FPRange
506
 
{
507
 
    DCELL min;
508
 
    DCELL max;
509
 
    int first_time;             /* whether or not range was updated */
510
 
};
511
 
 
512
 
/*
513
 
 ** Structure for I/O of 3dview files  (view.c)
514
 
 */
515
 
struct G_3dview
516
 
{
517
 
    char pgm_id[40];            /* user-provided identifier */
518
 
    float from_to[2][3];        /* eye position & lookat position */
519
 
    float fov;                  /* field of view */
520
 
    float twist;                /* right_hand rotation about from_to */
521
 
    float exag;                 /* terrain elevation exageration */
522
 
    int mesh_freq;              /* cells per grid line */
523
 
    int poly_freq;              /* cells per polygon */
524
 
    int display_type;           /* 1 for mesh, 2 for poly, 3 for both */
525
 
    int lightson;               /* boolean */
526
 
    int dozero;                 /* boolean */
527
 
    int colorgrid;              /* boolean */
528
 
    int shading;                /* boolean */
529
 
    int fringe;                 /* boolean */
530
 
    int surfonly;               /* boolean */
531
 
    int doavg;                  /* boolean */
532
 
    char grid_col[40];          /* colors */
533
 
    char bg_col[40];            /* colors */
534
 
    char other_col[40];         /* colors */
535
 
    float lightpos[4];          /* east, north, height, 1.0 for local 0.0 infin */
536
 
    float lightcol[3];          /* values between 0.0 to 1.0 for red, grn, blu */
537
 
    float ambient;
538
 
    float shine;
539
 
    struct Cell_head vwin;
540
 
};
541
 
 
542
 
struct Key_Value
543
 
{
544
 
    int nitems;
545
 
    int nalloc;
546
 
    char **key;
547
 
    char **value;
548
 
};
549
 
 
550
 
struct Option                   /* Structure that stores option info */
551
 
{
552
 
    char *key;                  /* Key word used on command line    */
553
 
    int type;                   /* Option type                      */
554
 
    int required;               /* REQUIRED or OPTIONAL             */
555
 
    int multiple;               /* Multiple entries OK              */
556
 
    char *options;              /* Approved values or range or NULL */
557
 
    char **opts;                /* NULL or NULL terminated array of parsed options */
558
 
    char *key_desc;             /* one word describing the key      */
559
 
    char *label;                /* Optional short label, used in GUI as item label */
560
 
    char *description;          /* String describing option         */
561
 
    char *descriptions;         /* ';' separated pairs of option and option descriptions */
562
 
    /* For example: (with ->options = "break,rmdupl")
563
 
     * "break;break lines on intersections;"
564
 
     * "rmdupl;remove duplicates"
565
 
     */
566
 
    char **descs;               /* parsed descriptions, array of either NULL or string */
567
 
    /* in the same order as options */
568
 
    char *answer;               /* Option answer                    */
569
 
    char *def;                  /* Where original answer gets saved */
570
 
    char **answers;             /* Option answers (for multiple=YES) */
571
 
    struct Option *next_opt;    /* Pointer to next option struct    */
572
 
    char *gisprompt;            /* Interactive prompt guidance      */
573
 
    char *guisection;           /* GUI Layout guidance: ';' delimited heirarchical tree position */
574
 
    int (*checker) ();          /* Routine to check answer or NULL  */
575
 
    int count;
576
 
};
577
 
 
578
 
struct Flag                     /* Structure that stores flag info  */
579
 
{
580
 
    char key;                   /* Key char used on command line    */
581
 
    char answer;                /* Stores flag state: 0/1           */
582
 
    char *label;                /* Optional short label, used in GUI as item label */
583
 
    char *description;          /* String describing flag meaning   */
584
 
    char *guisection;           /* GUI Layout guidance: ';' delimited heirarchical tree position */
585
 
    struct Flag *next_flag;     /* Pointer to next flag struct      */
586
 
};
587
 
 
588
 
struct GModule                  /* Structure that stores module info  */
589
 
{
590
 
    char *label;                /* Optional short description for GUI */
591
 
    char *description;          /* String describing module */
592
 
    char *keywords;             /* Keywords describing module */
593
 
    /* further items are possible: author(s), version */
594
 
    int overwrite;              /* overwrite old files */
595
 
    int verbose;                /* print all informations about progress and so on */
596
 
};
597
 
 
598
 
struct TimeStamp
599
 
{
600
 
    DateTime dt[2];             /* two datetimes */
601
 
    int count;
602
 
};
603
 
 
604
 
/*============================== Prototypes ================================*/
605
 
 
606
 
/* Since there are so many prototypes for the gis library they are stored */
607
 
/* in the file gisdefs.h */
608
 
#include <grass/gisdefs.h>
609
 
 
610
 
#endif /* GRASS_GIS_H */