debug.c File Reference

GIS Library - Debug functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <grass/gis.h>
#include <grass/glocale.h>
#include "G.h"
Include dependency graph for debug.c:

Go to the source code of this file.

Functions

int G_debug (int level, const char *msg,...)
 Print debugging message.
int G_dump (int fd)
 Dumps status of various GIS parameters.

Detailed Description

GIS Library - Debug functions.

(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:
GRASS GIS Development Team
Date:
1999-2008

Definition in file debug.c.


Function Documentation

int G_debug ( int  level,
const char *  msg,
  ... 
)

Print debugging message.

Print debugging message if environment variable GRASS_DEBUG_LEVEL is set to level equal or greater

Levels: (recommended levels)

  • 1 - message is printed once or twice per module
  • 2 - less interesting once-per-module messages,
  • 2 - library functions likely to be used once in a module
  • 3 - library functions likely to be called a few times in a module (<=10),
  • 3 - database opening and closing logistics
  • 4 - each row (raster) or line (vector) or database/column (DB),
  • 4 - each column/cat (DB)
  • 5 - each cell (raster) or point (vector) or cat/attribute (DB)
Parameters:
[in] level level
[in] msg message
Returns:
0 on error
1 on success

Definition at line 51 of file debug.c.

References G__getenv(), and G_warning().

Referenced by G__create_window_mapping(), G__read_Cell_head(), G__read_Cell_head_array(), G_adjust_Cell_head(), G_adjust_Cell_head3(), G_available_mapsets(), G_get_raster_cat(), G_plot_icon(), G_read_color_rule(), G_recreate_command(), G_spawn(), and G_str_to_color().

int G_dump ( int  fd  ) 
Generated on Tue Apr 6 13:27:45 2010 for GRASS Programmer's Manual by  doxygen 1.6.3