GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
verbose.c
Go to the documentation of this file.
1
22
#include <stdlib.h>
23
#include <grass/config.h>
24
25
#define MAXLEVEL 3
26
#define STDLEVEL 2
27
#define MINLEVEL 0
28
29
30
static
int
verbose = -1;
/* current verbosity level */
31
32
45
int
G_verbose
(
void
)
46
{
47
char
*verstr;
/* string for GRASS_VERBOSE content */
48
49
/* verbose not defined -> get it from env. */
50
if
(verbose < 0) {
51
52
if
((verstr =
getenv
(
"GRASS_VERBOSE"
))) {
53
if
((verbose = atoi(verstr))) ;
54
}
55
else
56
verbose =
STDLEVEL
;
57
}
58
return
verbose;
59
}
60
61
68
int
G_verbose_max
(
void
)
69
{
70
return
MAXLEVEL
;
71
}
72
73
80
int
G_verbose_std
(
void
)
81
{
82
return
STDLEVEL
;
83
}
84
85
92
int
G_verbose_min
(
void
)
93
{
94
return
MINLEVEL
;
95
}
96
106
int
G_set_verbose
(
int
level)
107
{
108
if
(level >=
MINLEVEL
&& level <=
MAXLEVEL
) {
109
verbose = level;
110
return
1;
111
}
112
113
return
0;
114
}
lib
gis
verbose.c
Generated on Thu Sep 26 2013 09:48:07 for GRASS Programmer's Manual by
1.8.4