GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r73120
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
verbose.c File Reference

GIS Library - Subroutines to manage verbosity level. More...

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

Go to the source code of this file.

Macros

#define MAXLEVEL   3
 Maximum verbosity level. More...
 
#define STDLEVEL   2
 Standard verbosity level. More...
 
#define MINLEVEL   0
 Minimum verbosity level (quiet) More...
 

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 - Subroutines to manage verbosity level.

Note that verbosity can be controlled by GRASS_VERBOSE environment variable.

See relevant subroutines:

(C) 2001-2008, 2012-2013 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

Definition in file verbose.c.

Macro Definition Documentation

#define MAXLEVEL   3

Maximum verbosity level.

Definition at line 30 of file verbose.c.

Referenced by G_set_verbose(), G_verbose_max(), RTreeCreateTree(), RTreeDestroyTree(), RTreeInsertRectF(), and RTreeInsertRectM().

#define MINLEVEL   0

Minimum verbosity level (quiet)

Definition at line 34 of file verbose.c.

Referenced by G_set_verbose(), and G_verbose_min().

#define STDLEVEL   2

Standard verbosity level.

Definition at line 32 of file verbose.c.

Referenced by G_verbose(), and G_verbose_std().

Function Documentation

int G_set_verbose ( int  level)

Set verbosity level.

Parameters
levelnew verbosity level (-1,0,1,2,3)
Returns
0 on invalid verbosity level (verbosity level untouched)
1 on success

Definition at line 116 of file verbose.c.

References G_initialize_done(), G_is_initialized(), MAXLEVEL, and MINLEVEL.

Referenced by Vect__open_old().

int G_verbose ( void  )

Get current verbosity level.

Currently, there are 5 levels of verbosity (see return codes)

Returns
-1 - nothing will be printed (also errors and warnings will be also discarded)
0 - nothing will be printed except of errors and warnings (G_fatal_error(), G_warning()). Triggered by –q or –quiet flag..
1 - only progress information (G_percent()) and important messages (G_important_message()) will be printed
2 - all messages (G_message() and G_important_message()) will be printed
3 - also verbose messages (G_verbose_message()) will be printed. Triggered by –v or –verbose flag.

Definition at line 55 of file verbose.c.

References G_initialize_done(), G_is_initialized(), getenv(), and STDLEVEL.

Referenced by G_clicker(), G_fatal_error(), G_important_message(), G_init_all(), G_message(), G_parser(), G_percent(), G_progress(), G_verbose_message(), G_warning(), and Vect__open_old().

int G_verbose_max ( void  )

Get max verbosity level.

Returns
max verbosity level

Definition at line 76 of file verbose.c.

References MAXLEVEL.

Referenced by G_parser(), and recreate_command().

int G_verbose_min ( void  )

Get min verbosity level.

Returns
min verbosity level

Definition at line 96 of file verbose.c.

References MINLEVEL.

Referenced by G_important_message(), and G_parser().

int G_verbose_std ( void  )

Get standard verbosity level.

Returns
standard verbosity level

Definition at line 86 of file verbose.c.

References STDLEVEL.

Referenced by G_message(), G_parser(), G_verbose_message(), and recreate_command().