GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
verbose.c File Reference

GIS Library - Functions to check for GRASS_VERBOSE environment variable. More...

#include <stdlib.h>
#include <grass/config.h>
Include dependency graph for verbose.c:

Go to the source code of this file.

Macros

#define MAXLEVEL   3
 
#define STDLEVEL   2
 
#define MINLEVEL   0
 

Functions

int G_verbose (void)
 Get current verbosity level. More...
 
int G_verbose_max (void)
 Get max verbosity level. More...
 
int G_verbose_std (void)
 Get standard verbosity level. More...
 
int G_verbose_min (void)
 Get min verbosity level. More...
 
int G_set_verbose (int level)
 Set verbosity level. More...
 

Detailed Description

GIS Library - Functions to check for GRASS_VERBOSE environment variable.

see also:

(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
Jachym Cepicky - jachym.cepicky at gmail.com
Date
2006-2008

Definition in file verbose.c.

Macro Definition Documentation

#define MAXLEVEL   3

Definition at line 25 of file verbose.c.

Referenced by G_set_verbose(), and G_verbose_max().

#define MINLEVEL   0

Definition at line 27 of file verbose.c.

Referenced by G_set_verbose(), and G_verbose_min().

#define STDLEVEL   2

Definition at line 26 of file verbose.c.

Referenced by G_verbose(), and G_verbose_std().

Function Documentation

int G_set_verbose ( int  level)

Set verbosity level.

Parameters
level,:new verbosity level
Returns
0 - failed (verbosity level untouched)
1 - success

Definition at line 106 of file verbose.c.

References MAXLEVEL, and MINLEVEL.

int G_verbose ( void  )

Get current verbosity level.

Currently, there are 4 levels of verbosity.

Returns
0 - module should print nothing but errors and warnings (G_fatal_error, G_warning). Triggered by "--q" or "--quiet".
1 - module will print progress information (G_percent)
2 - module will print all messages (G_message)
3 - module will be very verbose. Triggered by "--v" or "--verbose".

Definition at line 45 of file verbose.c.

References getenv(), and STDLEVEL.

Referenced by G_clicker(), G_important_message(), G_message(), G_percent2(), G_verbose_message(), and Vect_build_nat().

int G_verbose_max ( void  )

Get max verbosity level.

Returns
max verbosity level

Definition at line 68 of file verbose.c.

References MAXLEVEL.

Referenced by G_parser().

int G_verbose_min ( void  )

Get min verbosity level.

Returns
min verbosity level

Definition at line 92 of file verbose.c.

References MINLEVEL.

Referenced by G_important_message(), G_parser(), and Vect_build_nat().

int G_verbose_std ( void  )

Get standard verbosity level.

Returns
standard verbosity level

Definition at line 80 of file verbose.c.

References STDLEVEL.

Referenced by G_message(), and G_verbose_message().