GRASS Programmer's Manual
6.4.2(2012)
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
globals.h
Go to the documentation of this file.
1
2
/***************************************************************************
3
* globals.h
4
*
5
* Mon Apr 18 15:04:11 2005
6
* Copyright 2005 Benjamin Ducke
7
****************************************************************************/
8
9
/*
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU Library General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
*/
24
25
26
#ifndef _GLOBALS_H
27
#define _GLOBALS_H
28
29
/* put a
30
#define LOCAL
31
into main.c ! */
32
33
#ifdef LOCAL
34
#define EXTERN
35
#else
36
#define EXTERN extern
37
#endif
38
39
#include <stdlib.h>
40
#include <stdio.h>
41
#include <errno.h>
42
#include <string.h>
43
#include <sys/types.h>
44
#include <sys/stat.h>
45
#include <unistd.h>
46
#include <dirent.h>
47
48
#include "
at_exit_funcs.h
"
49
#include "
error.h
"
50
#include "
tools.h
"
51
#include "
reg_deps.h
"
52
#include "
reg_entries.h
"
53
#include "
reg_html.h
"
54
#include "
actions.h
"
55
56
57
#define PROGVERSION 1.03
58
59
#define MAXSTR 2048
/* maximum length of strings this program handles */
60
61
/* possible actions */
62
#define NONE 0
63
#define HELP 1
64
#define VERSION 2
65
#define INSTALL 3
66
#define BIN_INSTALL 4
67
#define QUERY 5
68
#define CLEAN 6
69
#define LICENSE 7
70
#define TEST_INSTALL 8
71
#define DETAILS 9
72
#define UNINSTALL 10
73
#define RESTORE 11
74
#define LIST 12
75
76
/* error codes */
77
#define ERR_INVOCATION -1
78
#define ERR_NO_ACCESS_EXT -2
79
#define ERR_CONFIGURE_EXT -3
80
#define ERR_COMPILE_EXT -4
81
#define ERR_INSTALL_EXT -5
82
#define ERR_INVALID_EXT -6
83
#define ERR_UNPACK_EXT -7
84
#define ERR_RM_TMPDIR -8
85
#define ERR_MISSING_CMD -9
86
#define ERR_NO_LICENSE -10
87
#define ERR_VERSION -11
88
#define ERR_MISSING_BINS -12
89
#define ERR_UNINSTALL_EXT -13
90
#define ERR_SU -14
91
#define ERR_REGISTER_EXT -15
92
#define ERR_EXISTS_EXT -16
93
#define ERR_CHECK_DEPS -17
94
#define ERR_MISSING_DEPS -18
95
#define ERR_DEREGISTER_EXT -19
96
#define ERR_DOWNLOAD -20
97
#define ERR_REGISTER_ENTRIES_GISMAN -21
98
#define ERR_DEREGISTER_ENTRIES_GISMAN -22
99
#define ERR_DUMP_PLAIN_TXT -23
100
#define ERR_REGISTER_HTML -24
101
#define ERR_DEREGISTER_HTML -25
102
#define ERR_RESTORE -26
103
#define ERR_MISSING_CFG -27
104
#define ERR_DUMP_HTML -28
105
#define ERR_LIST -29
106
#define ERR_TMPFILE -30
107
#define ERR_RM_TMPFILE -31
108
#define ERR_REGISTER_ENTRIES_GISMAN2 -32
109
#define ERR_DEREGISTER_ENTRIES_GISMAN2 -33
110
111
#define TYPE_UNKNOWN 0
112
#define TAR_GZIP 1
113
#define TAR_BZIP2 2
114
#define ZIP 3
115
#define TAR 4
116
117
#define TOKEN_SUBMENU 0
118
#define TOKEN_ENTRY 1
119
#define TOKEN_COMMAND 2
120
#define TOKEN_SEPARATOR 3
121
122
123
/* ENVIRONMENT VARIABLES */
124
EXTERN
char
GINSTALL_DST
[
MAXSTR
];
125
EXTERN
char
GINSTALL_INC
[
MAXSTR
];
126
EXTERN
char
GINSTALL_LIB
[
MAXSTR
];
127
EXTERN
char
UNINSTALL_BASE
[
MAXSTR
];
128
EXTERN
char
GEM_EXT_NAME
[
MAXSTR
];
129
EXTERN
char
GEM_EXT_VERSION
[
MAXSTR
];
130
EXTERN
char
GEM_EXT_DESCR
[
MAXSTR
];
131
EXTERN
char
GEM_EXT_INFO
[
MAXSTR
];
132
EXTERN
char
GEM_EXT_DEPS
[
MAXSTR
];
133
EXTERN
char
GEM_EXT_BUGS
[
MAXSTR
];
134
EXTERN
char
GEM_EXT_AUTHORS
[
MAXSTR
];
135
EXTERN
char
GEM_GRASS_DIR
[
MAXSTR
];
136
EXTERN
char
GEM_ACTION
[
MAXSTR
];
137
EXTERN
char
INSTALL_BASE
[
MAXSTR
];
138
EXTERN
char
INSTALL_TYPE
[
MAXSTR
];
139
EXTERN
char
GEM_FORCE
[
MAXSTR
];
140
EXTERN
char
GEM_VERBOSE
[
MAXSTR
];
141
EXTERN
char
GEM_GUI
[
MAXSTR
];
142
EXTERN
char
GEM_C_OPTS
[
MAXSTR
];
143
EXTERN
char
EXT_BASE
[
MAXSTR
];
144
145
146
/* GLOBAL VARIABLES */
147
EXTERN
int
VERBOSE
;
148
EXTERN
char
TMPDIR
[
MAXSTR
];
149
EXTERN
char
TMPDB
[
MAXSTR
];
150
EXTERN
char
TMP_GISMAN
[
MAXSTR
];
151
EXTERN
char
TMP_DESCR
[
MAXSTR
];
152
EXTERN
char
TMP_INFO
[
MAXSTR
];
153
EXTERN
char
TMP_DEPS
[
MAXSTR
];
154
EXTERN
char
TMP_BUGS
[
MAXSTR
];
155
EXTERN
char
TMP_AUTHORS
[
MAXSTR
];
156
EXTERN
char
TMP_NULL
[
MAXSTR
];
/* pipe all output that should be hidden to this file */
157
158
EXTERN
char
TMP_HTML
[
MAXSTR
];
159
EXTERN
int
TMPCLEAN
;
160
EXTERN
int
TMPDBCLEAN
;
161
EXTERN
int
FORCE
;
162
EXTERN
int
UPGRADE
;
163
EXTERN
int
SKIP_CFG
;
164
165
EXTERN
char
GISMAN_CMD
[
MAXSTR
];
166
EXTERN
char
GISMAN2_CMD
[
MAXSTR
];
167
EXTERN
char
HTML_CMD
[
MAXSTR
];
168
EXTERN
char
QGIS_CMD
[
MAXSTR
];
169
EXTERN
char
UNINSTALL_CMD
[
MAXSTR
];
170
EXTERN
char
CONFIG_OPTS
[
MAXSTR
];
171
EXTERN
char
CONFIG_CMD
[
MAXSTR
];
172
EXTERN
char
MAKE_CMD
[
MAXSTR
];
173
174
/* stores current working directory */
175
EXTERN
char
CWD
[
MAXSTR
];
176
177
/* this are used to generate a summary message on exit */
178
EXTERN
int
ERROR
;
/* error code: set to < 0 on abnormal program exit */
179
EXTERN
int
WARNINGS
;
/* number of warnings issued during program run */
180
181
182
183
#endif
/* _GLOBALS_H */
gem
globals.h
Generated on Sun Sep 9 2012 18:55:32 for GRASS Programmer's Manual by
1.8.1.2