Loading...
Searching...
No Matches
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 dependency graph for debug.c:

Go to the source code of this file.

## Functions

void | G_init_debug (void)
| Initiate debugging.
int | G_debug (int level, const char *msg,...)
| Print debugging message.

## Detailed Description

GIS Library - Debug functions.

(C) 2001-2012 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 Development Team

Definition in file debug.c.

## Function Documentation

## G_debug()

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 66 of file debug.c.

References G_init_debug(), G_warning(), and NULL.

Referenced by add_coor(), AS_eqdrt(), c_thresh(), Cairo_begin_raster(), Cairo_Bitmap(), Cairo_Box(), Cairo_Color(), Cairo_end_raster(), Cairo_Erase(), Cairo_Graph_close(), Cairo_Graph_set(), Cairo_Line_width(), Cairo_raster(), cairo_read_image(), Cairo_Set_window(), cairo_write_image(), check_create_import_opts(), free_data_buffs(), G__read_Cell_head(), G__read_Cell_head_array(), G__temp_element(), G__temp_element_basedir(), G_compare_projections(), G_find_raster(), G_find_raster2(), G_find_vector(), G_find_vector2(), G_fopen_append(), G_fopen_modify(), G_fopen_new(), G_fopen_old(), G_get_available_mapsets(), G_get_projepsg(), G_get_projsrid(), G_get_projwkt(), G_has_vector_timestamp(), G_math_add_spvector(), G_math_alloc_spmatrix(), G_math_alloc_spvector(), G_math_cholesky_sband_decomposition(), G_option_to_separator(), G_read_vector_timestamp(), G_set_program_name(), G_str_to_color(), G_tempfile_pid(), G_tempfile_pid_basedir(), G_write_vector_timestamp(), get_key_data(), get_pj_area(), get_pj_object(), GK_add_key(), gk_follow_frames(), GP_delete_site(), gp_delete_site(), GP_draw_site(), gp_free_site(), gp_get_last_site(), gp_get_new_site(), gp_get_prev_site(), gp_get_site(), GP_get_sitename(), GP_get_style(), GP_get_trans(), GP_get_zmode(), gp_init_site(), GP_load_site(), Gp_load_sites(), GP_new_site(), gp_num_sites(), GP_select_surf(), gp_set_defaults(), GP_set_style(), GP_set_style_thematic(), GP_set_trans(), GP_set_zmode(), GP_site_exists(), GP_surf_is_selected(), GP_unselect_surf(), GP_unset_style_thematic(), GPJ__get_datum_params(), GPJ_grass_to_osr(), GPJ_init_transform(), GPJ_osr_to_grass(), GPJ_transform(), Gs_build_256lookup(), gs_calc_normals(), GS_clear(), GS_default_draw_color(), gs_delete_surf(), GS_delete_surface(), GS_done_draw(), GS_draw_flowline_at_xy(), GS_draw_fringe(), GS_draw_surf(), GS_draw_wire(), gs_free_surf(), gs_free_unshared_buffs(), GS_get_aspect(), gs_get_att_src(), gs_get_att_typbuff(), gs_get_att_type(), GS_get_distance_alongsurf(), GS_get_drawres(), GS_get_exag_guess(), GS_get_focus(), GS_get_from(), gs_get_last_surface(), GS_get_longdim(), GS_get_modelposition1(), gs_get_new_surface(), GS_get_nozero(), gs_get_prev_surface(), GS_get_selected_point_on_surface(), gs_get_surf(), GS_get_to(), GS_get_trans(), GS_get_zextents(), GS_get_zrange(), GS_get_zrange_nz(), gs_getall_surfaces(), GS_global_exag(), gs_init_surf(), GS_init_view(), GS_libinit(), GS_load_att_map(), Gs_loadmap_as_bitmap(), Gs_loadmap_as_char(), Gs_loadmap_as_float(), Gs_loadmap_as_int(), Gs_loadmap_as_short(), gs_los_intersect(), gs_los_intersect1(), gs_malloc_att_buff(), gs_malloc_lookup(), GS_moveto(), GS_new_surface(), gs_num_datah_reused(), gs_num_surfaces(), Gs_numtype(), GS_ready_draw(), gs_set_att_const(), GS_set_att_defaults(), gs_set_att_src(), gs_set_att_type(), gs_set_defaults(), GS_set_drawmode(), GS_set_drawres(), GS_set_exag(), GS_set_focus(), GS_set_focus_center_map(), GS_set_global_exag(), GS_set_infocus(), GS_set_nofocus(), GS_set_nozero(), GS_set_trans(), GS_set_viewport(), GS_set_wire_color(), GS_surf_exists(), Gs_update_attrange(), gs_update_curmask(), gsd_3darrow(), gsd_arrow_onsurf(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_surf(), gsd_surf_const(), gsd_surf_map_old(), gsd_wire_arrows(), gsd_wire_surf(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsds_alloc_typbuff(), gsds_free_datah(), gv_decimate_lines(), gv_delete_vect(), GV_delete_vector(), gv_free_vect(), gv_get_last_vect(), gv_get_new_vect(), gv_get_prev_vect(), gv_get_vect(), gv_init_vect(), Gv_load_vect(), GV_new_vector(), gv_num_vects(), gv_set_defaults(), GV_set_trans(), GV_unset_style_thematic(), GV_vect_exists(), gvd_vect(), gvl_align_data(), GVL_delete_vol(), gvl_delete_vol(), GVL_draw_wire(), gvl_file_free_datah(), gvl_free_vol(), GVL_get_dims(), gvl_get_last_vol(), gvl_get_new_vol(), gvl_get_prev_vol(), gvl_get_vol(), gvl_getall_vols(), gvl_init_vol(), GVL_isosurf_add(), GVL_isosurf_del(), gvl_isosurf_freemem(), GVL_isosurf_get_att(), gvl_isosurf_get_att_src(), GVL_isosurf_get_drawres(), GVL_isosurf_get_flags(), gvl_isosurf_get_isosurf(), gvl_isosurf_init(), GVL_isosurf_move_down(), GVL_isosurf_move_up(), GVL_isosurf_num_isosurfs(), gvl_isosurf_set_att_changed(), GVL_isosurf_set_att_const(), gvl_isosurf_set_att_const(), GVL_isosurf_set_att_map(), gvl_isosurf_set_att_map(), gvl_isosurf_set_att_src(), GVL_isosurf_set_drawmode(), GVL_isosurf_set_drawres(), GVL_isosurf_set_flags(), GVL_isosurf_set_maskmode(), GVL_isosurf_unset_att(), GVL_load_vol(), GVL_new_vol(), gvl_num_vols(), GVL_set_draw_wire(), GVL_set_focus_center_map(), GVL_set_trans(), GVL_slice_add(), GVL_slice_del(), gvl_slice_freemem(), GVL_slice_get_drawres(), GVL_slice_get_transp(), gvl_slice_init(), GVL_slice_move_down(), GVL_slice_move_up(), GVL_slice_num_slices(), GVL_slice_set_drawmode(), GVL_slice_set_drawres(), GVL_slice_set_transp(), gvl_slices_calc(), GVL_vol_exists(), gvl_write_char(), gvld_isosurf(), gvld_slices(), gvld_vol(), gvld_wind3_box(), gvld_wire_slices(), gvld_wire_vol(), I_cluster_assign(), I_cluster_exec_allocate(), I_cluster_means(), I_cluster_sum2(), IL_interp_segments_2d(), IL_interp_segments_2d_parallel(), IL_matrix_create_alloc(), IL_vector_input_data_2d(), IL_write_point_2d(), kdtree_optimize(), kdtree_traverse(), M_do_copy(), N_alloc_array_2d(), N_alloc_array_3d(), N_alloc_gradient_field_2d(), N_alloc_gradient_field_3d(), N_alloc_les_param(), N_assemble_les_2d_param(), N_assemble_les_3d_param(), N_calc_array_2d_stats(), N_calc_array_3d_stats(), N_calc_gradient_field_2d_stats(), N_calc_gradient_field_3d_stats(), N_calc_solute_transport_disptensor_2d(), N_calc_solute_transport_disptensor_3d(), N_calc_solute_transport_transmission_2d(), N_callback_gwflow_2d(), N_callback_gwflow_3d(), N_callback_solute_transport_2d(), N_callback_solute_transport_3d(), N_callback_template_3d(), N_compute_gradient_field_2d(), N_compute_gradient_field_3d(), N_convert_array_2d_null_to_zero(), N_convert_array_3d_null_to_zero(), N_copy_array_2d(), N_copy_array_3d(), N_copy_gradient_2d(), N_copy_gradient_3d(), N_copy_gradient_field_2d(), N_copy_gradient_field_3d(), N_copy_gradient_neighbours_2d(), N_copy_gradient_neighbours_3d(), N_copy_gradient_neighbours_x(), N_copy_gradient_neighbours_y(), N_copy_gradient_neighbours_z(), N_create_27star(), N_create_5star(), N_create_7star(), N_create_9star(), N_create_gradient_2d(), N_create_gradient_3d(), N_create_gradient_neighbours_2d(), N_create_gradient_neighbours_3d(), N_create_gradient_neighbours_x(), N_create_gradient_neighbours_y(), N_create_gradient_neighbours_z(), N_free_array_2d(), N_free_array_3d(), N_free_les(), N_get_geom_data_area_of_cell(), N_get_gradient_2d(), N_get_gradient_3d(), N_get_gradient_neighbours_2d(), N_init_geom_data_2d(), N_init_geom_data_3d(), N_is_array_2d_value_null(), N_is_array_3d_value_null(), N_les_integrate_dirichlet_2d(), N_les_integrate_dirichlet_3d(), N_math_array_2d(), N_math_array_3d(), N_norm_array_2d(), N_norm_array_3d(), N_put_array_2d_value(), N_put_array_2d_value_null(), N_put_array_3d_value(), N_put_array_3d_value_null(), Nviz_change_exag(), Nviz_get_exag(), Nviz_get_exag_height(), Nviz_get_viewpoint_height(), Nviz_get_viewpoint_position(), Nviz_init_light(), Nviz_look_here(), Nviz_resize_window(), Nviz_set_light_ambient(), Nviz_set_light_bright(), Nviz_set_light_color(), Nviz_set_light_position(), Nviz_set_rotation(), Nviz_set_viewpoint_height(), Nviz_set_viewpoint_persp(), Nviz_set_viewpoint_position(), Nviz_set_viewpoint_twist(), order_intersects(), P_Create_Aux2_Table(), P_Create_Aux4_Table(), PNG_Graph_set(), print_vol_fields(), rbtree_remove(), rbtree_traverse(), rbtree_traverse_backwd(), read_coor(), recreate_command(), S_read(), S_stroke(), seg_pagein(), seg_setup(), stroke_chain(), and sub_Vectmem().

## G_init_debug()

void G_init_debug | ( | void |  | ) |

Initiate debugging.

Definition at line 27 of file debug.c.

References G_getenv_nofatal(), G_initialize_done(), G_is_initialized(), and NULL.

Referenced by G_debug(), and G_init_all().