|
@@ -2,9 +2,11 @@
|
|
* \file lib/gis/verbose.c
|
|
* \file lib/gis/verbose.c
|
|
*
|
|
*
|
|
* \brief GIS Library - Subroutines to manage verbosity level
|
|
* \brief GIS Library - Subroutines to manage verbosity level
|
|
- * (GRASS_VERBOSE environment variable)
|
|
|
|
*
|
|
*
|
|
- * See also:
|
|
|
|
|
|
+ * Note that verbosity can be controlled by GRASS_VERBOSE environment
|
|
|
|
+ * variable.
|
|
|
|
+ *
|
|
|
|
+ * See relevant subroutines:
|
|
* - G_percent()
|
|
* - G_percent()
|
|
* - G_important_message()
|
|
* - G_important_message()
|
|
* - G_message()
|
|
* - G_message()
|
|
@@ -12,7 +14,7 @@
|
|
* - G_warning()
|
|
* - G_warning()
|
|
* - G_fatal_error()
|
|
* - G_fatal_error()
|
|
*
|
|
*
|
|
- * (C) 2001-2008, 2012 by the GRASS Development Team
|
|
|
|
|
|
+ * (C) 2001-2008, 2012-2013 by the GRASS Development Team
|
|
*
|
|
*
|
|
* This program is free software under the GNU General Public License
|
|
* This program is free software under the GNU General Public License
|
|
* (>=v2). Read the file COPYING that comes with GRASS for details.
|
|
* (>=v2). Read the file COPYING that comes with GRASS for details.
|
|
@@ -24,9 +26,12 @@
|
|
#include <grass/config.h>
|
|
#include <grass/config.h>
|
|
#include <grass/gis.h>
|
|
#include <grass/gis.h>
|
|
|
|
|
|
-#define MAXLEVEL 3 /* verbose */
|
|
|
|
|
|
+/*! \brief Maximum verbosity level */
|
|
|
|
+#define MAXLEVEL 3
|
|
|
|
+/*! \brief Standard verbosity level */
|
|
#define STDLEVEL 2
|
|
#define STDLEVEL 2
|
|
-#define MINLEVEL 0 /* quiet */
|
|
|
|
|
|
+/*! \brief Minumum verbosity level (quiet) */
|
|
|
|
+#define MINLEVEL 0
|
|
|
|
|
|
static struct state {
|
|
static struct state {
|
|
int initialized;
|
|
int initialized;
|
|
@@ -42,10 +47,10 @@ static struct state *st = &state;
|
|
*
|
|
*
|
|
* \return -1 - nothing will be printed (also errors and warnings will be also discarded)
|
|
* \return -1 - nothing will be printed (also errors and warnings will be also discarded)
|
|
* \return 0 - nothing will be printed except of errors and warnings
|
|
* \return 0 - nothing will be printed except of errors and warnings
|
|
- * (G_fatal_error(), G_warning()). Triggered by "--q" or "--quiet".
|
|
|
|
|
|
+ * (G_fatal_error(), G_warning()). Triggered by <tt>--q</tt> or <tt>--quiet</tt> flag..
|
|
* \return 1 - only progress information (G_percent()) and important messages (G_important_message()) will be printed
|
|
* \return 1 - only progress information (G_percent()) and important messages (G_important_message()) will be printed
|
|
* \return 2 - all messages (G_message() and G_important_message()) will be printed
|
|
* \return 2 - all messages (G_message() and G_important_message()) will be printed
|
|
- * \return 3 - also verbose messages (G_verbose_message()) will be printed. Triggered by "--v" or "--verbose".
|
|
|
|
|
|
+ * \return 3 - also verbose messages (G_verbose_message()) will be printed. Triggered by <tt>--v</tt> or <tt>--verbose</tt> flag.
|
|
*/
|
|
*/
|
|
int G_verbose(void)
|
|
int G_verbose(void)
|
|
{
|
|
{
|
|
@@ -98,10 +103,10 @@ int G_verbose_min(void)
|
|
*
|
|
*
|
|
* - -1 - nothing will be printed (also errors and warnings will be also discarded)
|
|
* - -1 - nothing will be printed (also errors and warnings will be also discarded)
|
|
* - 0 - nothing will be printed except of errors and warnings
|
|
* - 0 - nothing will be printed except of errors and warnings
|
|
- * (G_fatal_error(), G_warning()). Triggered by "--q" or "--quiet".
|
|
|
|
|
|
+ * (G_fatal_error(), G_warning()). Triggered by <tt>--q</tt> or <tt>--quiet</tt> flag.
|
|
* - 1 - only progress information (G_percent()) and important messages (G_important_message()) will be printed
|
|
* - 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
|
|
* - 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".
|
|
|
|
|
|
+ * - 3 - also verbose messages (G_verbose_message()) will be printed. Triggered by <tt>--v</tt> or <tt>--verbose</tt> flag.
|
|
*
|
|
*
|
|
* \param level new verbosity level (-1,0,1,2,3)
|
|
* \param level new verbosity level (-1,0,1,2,3)
|
|
*
|
|
*
|