GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
globals.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include "at_exit_funcs.h"
#include "error.h"
#include "tools.h"
#include "reg_deps.h"
#include "reg_entries.h"
#include "reg_html.h"
#include "actions.h"
Include dependency graph for globals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EXTERN   extern
 
#define PROGVERSION   1.03
 
#define MAXSTR   2048 /* maximum length of strings this program handles */
 
#define NONE   0
 
#define HELP   1
 
#define VERSION   2
 
#define INSTALL   3
 
#define BIN_INSTALL   4
 
#define QUERY   5
 
#define CLEAN   6
 
#define LICENSE   7
 
#define TEST_INSTALL   8
 
#define DETAILS   9
 
#define UNINSTALL   10
 
#define RESTORE   11
 
#define LIST   12
 
#define ERR_INVOCATION   -1
 
#define ERR_NO_ACCESS_EXT   -2
 
#define ERR_CONFIGURE_EXT   -3
 
#define ERR_COMPILE_EXT   -4
 
#define ERR_INSTALL_EXT   -5
 
#define ERR_INVALID_EXT   -6
 
#define ERR_UNPACK_EXT   -7
 
#define ERR_RM_TMPDIR   -8
 
#define ERR_MISSING_CMD   -9
 
#define ERR_NO_LICENSE   -10
 
#define ERR_VERSION   -11
 
#define ERR_MISSING_BINS   -12
 
#define ERR_UNINSTALL_EXT   -13
 
#define ERR_SU   -14
 
#define ERR_REGISTER_EXT   -15
 
#define ERR_EXISTS_EXT   -16
 
#define ERR_CHECK_DEPS   -17
 
#define ERR_MISSING_DEPS   -18
 
#define ERR_DEREGISTER_EXT   -19
 
#define ERR_DOWNLOAD   -20
 
#define ERR_REGISTER_ENTRIES_GISMAN   -21
 
#define ERR_DEREGISTER_ENTRIES_GISMAN   -22
 
#define ERR_DUMP_PLAIN_TXT   -23
 
#define ERR_REGISTER_HTML   -24
 
#define ERR_DEREGISTER_HTML   -25
 
#define ERR_RESTORE   -26
 
#define ERR_MISSING_CFG   -27
 
#define ERR_DUMP_HTML   -28
 
#define ERR_LIST   -29
 
#define ERR_TMPFILE   -30
 
#define ERR_RM_TMPFILE   -31
 
#define ERR_REGISTER_ENTRIES_GISMAN2   -32
 
#define ERR_DEREGISTER_ENTRIES_GISMAN2   -33
 
#define TYPE_UNKNOWN   0
 
#define TAR_GZIP   1
 
#define TAR_BZIP2   2
 
#define ZIP   3
 
#define TAR   4
 
#define TOKEN_SUBMENU   0
 
#define TOKEN_ENTRY   1
 
#define TOKEN_COMMAND   2
 
#define TOKEN_SEPARATOR   3
 

Variables

EXTERN char GINSTALL_DST [MAXSTR]
 
EXTERN char GINSTALL_INC [MAXSTR]
 
EXTERN char GINSTALL_LIB [MAXSTR]
 
EXTERN char UNINSTALL_BASE [MAXSTR]
 
EXTERN char GEM_EXT_NAME [MAXSTR]
 
EXTERN char GEM_EXT_VERSION [MAXSTR]
 
EXTERN char GEM_EXT_DESCR [MAXSTR]
 
EXTERN char GEM_EXT_INFO [MAXSTR]
 
EXTERN char GEM_EXT_DEPS [MAXSTR]
 
EXTERN char GEM_EXT_BUGS [MAXSTR]
 
EXTERN char GEM_EXT_AUTHORS [MAXSTR]
 
EXTERN char GEM_GRASS_DIR [MAXSTR]
 
EXTERN char GEM_ACTION [MAXSTR]
 
EXTERN char INSTALL_BASE [MAXSTR]
 
EXTERN char INSTALL_TYPE [MAXSTR]
 
EXTERN char GEM_FORCE [MAXSTR]
 
EXTERN char GEM_VERBOSE [MAXSTR]
 
EXTERN char GEM_GUI [MAXSTR]
 
EXTERN char GEM_C_OPTS [MAXSTR]
 
EXTERN char EXT_BASE [MAXSTR]
 
EXTERN int VERBOSE
 
EXTERN char TMPDIR [MAXSTR]
 
EXTERN char TMPDB [MAXSTR]
 
EXTERN char TMP_GISMAN [MAXSTR]
 
EXTERN char TMP_DESCR [MAXSTR]
 
EXTERN char TMP_INFO [MAXSTR]
 
EXTERN char TMP_DEPS [MAXSTR]
 
EXTERN char TMP_BUGS [MAXSTR]
 
EXTERN char TMP_AUTHORS [MAXSTR]
 
EXTERN char TMP_NULL [MAXSTR]
 
EXTERN char TMP_HTML [MAXSTR]
 
EXTERN int TMPCLEAN
 
EXTERN int TMPDBCLEAN
 
EXTERN int FORCE
 
EXTERN int UPGRADE
 
EXTERN int SKIP_CFG
 
EXTERN char GISMAN_CMD [MAXSTR]
 
EXTERN char GISMAN2_CMD [MAXSTR]
 
EXTERN char HTML_CMD [MAXSTR]
 
EXTERN char QGIS_CMD [MAXSTR]
 
EXTERN char UNINSTALL_CMD [MAXSTR]
 
EXTERN char CONFIG_OPTS [MAXSTR]
 
EXTERN char CONFIG_CMD [MAXSTR]
 
EXTERN char MAKE_CMD [MAXSTR]
 
EXTERN char CWD [MAXSTR]
 
EXTERN int ERROR
 
EXTERN int WARNINGS
 

Macro Definition Documentation

#define BIN_INSTALL   4

Definition at line 66 of file globals.h.

Referenced by main(), and run_post().

#define CLEAN   6

Definition at line 68 of file globals.h.

Referenced by main(), and run_post().

#define DETAILS   9

Definition at line 71 of file globals.h.

Referenced by main(), and run_post().

#define ERR_CHECK_DEPS   -17

Definition at line 93 of file globals.h.

Referenced by check_dependencies(), and depstr().

#define ERR_COMPILE_EXT   -4

Definition at line 80 of file globals.h.

Referenced by source_install(), and test_install().

#define ERR_CONFIGURE_EXT   -3

Definition at line 79 of file globals.h.

Referenced by source_install(), and test_install().

#define ERR_DEREGISTER_ENTRIES_GISMAN   -22

Definition at line 98 of file globals.h.

Referenced by deregister_entries_gisman().

#define ERR_DEREGISTER_ENTRIES_GISMAN2   -33

Definition at line 109 of file globals.h.

Referenced by deregister_entries_gisman2().

#define ERR_DEREGISTER_EXT   -19

Definition at line 95 of file globals.h.

Referenced by deregister_extension().

#define ERR_DEREGISTER_HTML   -25

Definition at line 101 of file globals.h.

#define ERR_DOWNLOAD   -20

Definition at line 96 of file globals.h.

Referenced by wget_extension().

#define ERR_DUMP_HTML   -28

Definition at line 104 of file globals.h.

#define ERR_DUMP_PLAIN_TXT   -23

Definition at line 99 of file globals.h.

Referenced by dump_html(), and dump_plain().

#define ERR_EXISTS_EXT   -16

Definition at line 92 of file globals.h.

Referenced by register_extension().

#define ERR_INSTALL_EXT   -5

Definition at line 81 of file globals.h.

Referenced by bin_install(), source_install(), su(), and test_install().

#define ERR_INVALID_EXT   -6

Definition at line 82 of file globals.h.

Referenced by check_extension(), and get_package_name().

#define ERR_INVOCATION   -1

Definition at line 77 of file globals.h.

Referenced by main().

#define ERR_LIST   -29

Definition at line 105 of file globals.h.

Referenced by list_extensions().

#define ERR_MISSING_BINS   -12

Definition at line 88 of file globals.h.

Referenced by main().

#define ERR_MISSING_CFG   -27

Definition at line 103 of file globals.h.

Referenced by source_install(), and test_install().

#define ERR_MISSING_CMD   -9

Definition at line 85 of file globals.h.

Referenced by source_clean(), source_install(), su(), and test_install().

#define ERR_MISSING_DEPS   -18

Definition at line 94 of file globals.h.

Referenced by check_dependencies().

#define ERR_NO_ACCESS_EXT   -2
#define ERR_NO_LICENSE   -10

Definition at line 86 of file globals.h.

#define ERR_REGISTER_ENTRIES_GISMAN   -21
#define ERR_REGISTER_ENTRIES_GISMAN2   -32

Definition at line 108 of file globals.h.

Referenced by register_entries_gisman2().

#define ERR_REGISTER_EXT   -15

Definition at line 91 of file globals.h.

Referenced by register_extension().

#define ERR_REGISTER_HTML   -24

Definition at line 100 of file globals.h.

Referenced by deregister_html(), register_html(), and restore_html().

#define ERR_RESTORE   -26

Definition at line 102 of file globals.h.

Referenced by restore().

#define ERR_RM_TMPDIR   -8

Definition at line 84 of file globals.h.

#define ERR_RM_TMPFILE   -31

Definition at line 107 of file globals.h.

#define ERR_SU   -14

Definition at line 90 of file globals.h.

#define ERR_TMPFILE   -30

Definition at line 106 of file globals.h.

Referenced by main().

#define ERR_UNINSTALL_EXT   -13

Definition at line 89 of file globals.h.

#define ERR_UNPACK_EXT   -7

Definition at line 83 of file globals.h.

Referenced by main(), and unpack_extension().

#define ERR_VERSION   -11

Definition at line 87 of file globals.h.

Referenced by main().

#define EXTERN   extern

Definition at line 36 of file globals.h.

#define HELP   1

Definition at line 63 of file globals.h.

Referenced by main().

#define INSTALL   3

Definition at line 65 of file globals.h.

Referenced by main(), and run_post().

#define LICENSE   7

Definition at line 69 of file globals.h.

Referenced by main(), and run_post().

#define LIST   12

Definition at line 74 of file globals.h.

Referenced by G_extend_histogram().

#define NONE   0

Definition at line 62 of file globals.h.

#define PROGVERSION   1.03

Definition at line 57 of file globals.h.

Referenced by show_version().

#define QUERY   5

Definition at line 67 of file globals.h.

Referenced by main(), and run_post().

#define RESTORE   11

Definition at line 73 of file globals.h.

Referenced by main().

#define TAR   4

Definition at line 115 of file globals.h.

Referenced by unpack_extension().

#define TAR_BZIP2   2

Definition at line 113 of file globals.h.

Referenced by unpack_extension().

#define TAR_GZIP   1

Definition at line 112 of file globals.h.

Referenced by unpack_extension().

#define TEST_INSTALL   8

Definition at line 70 of file globals.h.

Referenced by main().

#define TOKEN_COMMAND   2

Definition at line 119 of file globals.h.

#define TOKEN_ENTRY   1

Definition at line 118 of file globals.h.

#define TOKEN_SEPARATOR   3

Definition at line 120 of file globals.h.

#define TOKEN_SUBMENU   0

Definition at line 117 of file globals.h.

#define TYPE_UNKNOWN   0

Definition at line 111 of file globals.h.

Referenced by unpack_extension().

#define UNINSTALL   10

Definition at line 72 of file globals.h.

Referenced by main().

#define VERSION   2

Definition at line 64 of file globals.h.

Referenced by main().

#define ZIP   3

Definition at line 114 of file globals.h.

Referenced by unpack_extension().

Variable Documentation

EXTERN char CONFIG_CMD[MAXSTR]

Definition at line 171 of file globals.h.

Referenced by main(), source_install(), and test_install().

EXTERN char CONFIG_OPTS[MAXSTR]

Definition at line 170 of file globals.h.

Referenced by get_configure_options(), main(), source_install(), and test_install().

EXTERN char CWD[MAXSTR]

Definition at line 175 of file globals.h.

Referenced by exit_db(), exit_tmp(), and main().

EXTERN int ERROR

Definition at line 178 of file globals.h.

Referenced by exit_msg(), main(), and print_error().

EXTERN char EXT_BASE[MAXSTR]

Definition at line 143 of file globals.h.

Referenced by run_post().

EXTERN char GEM_ACTION[MAXSTR]

Definition at line 136 of file globals.h.

Referenced by run_post().

EXTERN char GEM_C_OPTS[MAXSTR]

Definition at line 142 of file globals.h.

Referenced by main().

EXTERN char GEM_EXT_AUTHORS[MAXSTR]

Definition at line 134 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_BUGS[MAXSTR]

Definition at line 133 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_DEPS[MAXSTR]

Definition at line 132 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_DESCR[MAXSTR]

Definition at line 130 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_INFO[MAXSTR]

Definition at line 131 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_NAME[MAXSTR]

Definition at line 128 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_EXT_VERSION[MAXSTR]

Definition at line 129 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_FORCE[MAXSTR]

Definition at line 139 of file globals.h.

Referenced by run_post().

EXTERN char GEM_GRASS_DIR[MAXSTR]

Definition at line 135 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GEM_GUI[MAXSTR]

Definition at line 141 of file globals.h.

Referenced by run_post().

EXTERN char GEM_VERBOSE[MAXSTR]

Definition at line 140 of file globals.h.

Referenced by run_post().

EXTERN char GINSTALL_DST[MAXSTR]

Definition at line 124 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GINSTALL_INC[MAXSTR]

Definition at line 125 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GINSTALL_LIB[MAXSTR]

Definition at line 126 of file globals.h.

Referenced by bin_install(), source_install(), and test_install().

EXTERN char GISMAN2_CMD[MAXSTR]

Definition at line 166 of file globals.h.

Referenced by bin_install(), main(), register_entries_gisman2(), and source_install().

EXTERN char HTML_CMD[MAXSTR]
EXTERN char INSTALL_BASE[MAXSTR]

Definition at line 137 of file globals.h.

Referenced by run_post().

EXTERN char INSTALL_TYPE[MAXSTR]

Definition at line 138 of file globals.h.

Referenced by run_post().

EXTERN char MAKE_CMD[MAXSTR]

Definition at line 172 of file globals.h.

Referenced by bin_install(), main(), source_clean(), source_install(), and test_install().

EXTERN char QGIS_CMD[MAXSTR]

Definition at line 168 of file globals.h.

Referenced by main().

EXTERN int SKIP_CFG

Definition at line 163 of file globals.h.

Referenced by main(), source_install(), and test_install().

EXTERN char TMP_AUTHORS[MAXSTR]

Definition at line 155 of file globals.h.

Referenced by bin_install(), exit_db(), main(), source_install(), and test_install().

EXTERN char TMP_BUGS[MAXSTR]

Definition at line 154 of file globals.h.

Referenced by bin_install(), exit_db(), main(), source_install(), and test_install().

EXTERN char TMP_DEPS[MAXSTR]

Definition at line 153 of file globals.h.

Referenced by bin_install(), exit_db(), main(), source_install(), and test_install().

EXTERN char TMP_DESCR[MAXSTR]

Definition at line 151 of file globals.h.

Referenced by bin_install(), exit_db(), main(), source_install(), and test_install().

EXTERN char TMP_HTML[MAXSTR]

Definition at line 158 of file globals.h.

Referenced by deregister_html(), exit_db(), main(), register_html(), restore(), and restore_html().

EXTERN char TMP_INFO[MAXSTR]

Definition at line 152 of file globals.h.

Referenced by bin_install(), exit_db(), main(), source_install(), and test_install().

EXTERN int TMPCLEAN

Definition at line 159 of file globals.h.

Referenced by exit_tmp(), and main().

EXTERN int TMPDBCLEAN

Definition at line 160 of file globals.h.

Referenced by exit_db(), and main().

EXTERN char TMPDIR[MAXSTR]

Definition at line 148 of file globals.h.

Referenced by exit_tmp(), main(), and unpack_extension().

EXTERN char UNINSTALL_BASE[MAXSTR]

Definition at line 127 of file globals.h.

Referenced by uninstall().

EXTERN char UNINSTALL_CMD[MAXSTR]

Definition at line 169 of file globals.h.

Referenced by bin_install(), main(), source_install(), and uninstall().

EXTERN int UPGRADE

Definition at line 162 of file globals.h.

Referenced by main(), and new_ext_html().

EXTERN int WARNINGS

Definition at line 179 of file globals.h.

Referenced by exit_msg(), main(), and print_warning().