GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gis/debug.c File Reference
#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 gis/debug.c:

Go to the source code of this file.

Functions

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

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]levellevel
[in]msgmessage
Returns
0 on error
1 on success

Definition at line 51 of file gis/debug.c.

References fclose(), fd, G__getenv(), G_warning(), getenv(), and NULL.

Referenced by add_coor(), add_ipoint(), c_thresh(), Cairo_begin_scaled_raster(), Cairo_Box_abs(), Cairo_Client_Close(), Cairo_color(), Cairo_draw_bitmap(), Cairo_draw_line(), Cairo_draw_point(), Cairo_end_scaled_raster(), Cairo_Erase(), Cairo_Graph_close(), Cairo_Graph_set(), Cairo_Line_width(), Cairo_lookup_color(), Cairo_Polygon_abs(), Cairo_Polyline_abs(), Cairo_scaled_raster(), Cairo_Set_window(), D_symbol(), D_symbol2(), db__copy_table(), db__driver_begin_transaction(), db__driver_commit_transaction(), db_CatValArray_get_value_double(), db_close_database_shutdown_driver(), db_delete_table(), db_driver(), db_get_column(), db_get_login(), db_read_dbmscap(), db_select_CatValArray(), db_select_int(), db_set_default_connection(), db_set_login(), db_start_driver(), db_start_driver_open_database(), db_table_exists(), db_table_to_sql(), dig__read_head(), dig__write_head(), dig_add_area(), dig_add_isle(), dig_add_node(), dig_alloc_isles(), dig_angle_next_line(), dig_area_add_isle(), dig_area_alloc_isle(), dig_area_del_isle(), dig_build_area_with_line(), dig_cidx_add_cat(), dig_cidx_add_cat_sorted(), dig_cidx_del_cat(), dig_cidx_free(), dig_cidx_init(), dig_cidx_sort(), dig_del_area(), dig_del_isle(), dig_del_line(), dig_file_load(), dig_find_node(), dig_free_plus(), dig_free_plus_areas(), dig_free_plus_isles(), dig_free_plus_lines(), dig_free_plus_nodes(), dig_in_area_bbox(), dig_init_plus(), dig_isle_alloc_line(), dig_line_add_updated(), dig_line_degenerate(), dig_line_get_area(), dig_load_plus(), dig_node_add_line(), dig_node_add_updated(), dig_node_alloc_line(), dig_node_angle_check(), dig_node_line_angle(), dig_Rd_P_area(), dig_Rd_P_isle(), dig_Rd_P_line(), dig_Rd_P_node(), dig_Rd_Plus_head(), dig_Rd_spindx_head(), dig_read_cidx(), dig_read_cidx_head(), dig_read_frmt_ascii(), dig_read_spidx(), dig_select_areas(), dig_select_isles(), dig_select_lines(), dig_select_nodes(), dig_spidx_add_area(), dig_spidx_add_isle(), dig_spidx_add_line(), dig_spidx_add_node(), dig_spidx_del_area(), dig_spidx_del_isle(), dig_spidx_del_line(), dig_spidx_del_node(), dig_spidx_init(), dig_Wr_P_line(), dig_Wr_P_node(), dig_Wr_Plus_head(), dig_Wr_spindx_head(), dig_write_cidx_head(), dig_write_frmt_ascii(), eqdrt(), F_clear(), F_close(), F_generate(), F_open(), find_all_intersections(), free_data_buffs(), 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_math_add_spvector(), G_math_alloc_spmatrix(), G_math_alloc_spvector(), G_math_pivot_create(), G_plot_icon(), G_read_color_rule(), G_recreate_command(), G_site_describe(), G_site_get(), G_site_put(), G_sites_get_fields(), G_sites_open_new(), G_sites_open_old(), G_str_to_color(), get_key_data(), 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_trans(), gp_init_site(), Gp_load_sites(), GP_new_site(), gp_num_sites(), gp_set_defaults(), GP_set_trans(), GP_site_exists(), 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_close_mpeg(), 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_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_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(), IL_check_at_points_2d(), IL_interp_segments_2d(), IL_vector_input_data_2d(), main(), 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(), pg_addedge(), pg_create(), print_vol_fields(), read_coor(), read_file(), read_image(), rtree_read_branch(), rtree_read_node(), S_read(), S_stroke(), segment_intersection_2d(), segment_intersection_2d_tol(), segment_pagein(), set_value(), sort_intersection_list(), stroke_chain(), submit(), V1_close_nat(), V1_delete_line_nat(), V1_open_new_nat(), V1_open_old_nat(), V1_open_old_ogr(), V1_read_next_line_nat(), V1_read_next_line_ogr(), V1_restore_line_nat(), V1_rewind_ogr(), V2_close_ogr(), V2_delete_line_nat(), V2_open_old_ogr(), V2_read_line_nat(), V2_read_line_ogr(), V2_read_next_line_nat(), V2_restore_line_nat(), V2_rewind_ogr(), V2_write_line_nat(), Vect__open_old(), Vect__read_head(), Vect_add_dblink(), Vect_area_buffer2(), Vect_array_to_cat_list(), Vect_attach_centroids(), Vect_attach_isle(), Vect_attach_isles(), Vect_break_lines_list(), Vect_break_polygons(), Vect_build_line_area(), Vect_build_nat(), Vect_build_ogr(), Vect_build_partial(), Vect_build_sidx_from_topo(), Vect_check_dblink(), Vect_cidx_dump(), Vect_cidx_find_next(), Vect_cidx_get_field_index(), Vect_cidx_get_type_count(), Vect_cidx_open(), Vect_cidx_save(), Vect_clean_small_angles_at_nodes(), Vect_close(), Vect_coor_info(), Vect_copy(), Vect_copy_table_by_cats(), Vect_copy_tables(), Vect_default_field_info(), Vect_delete(), Vect_delete_line(), Vect_find_area(), Vect_find_island(), Vect_find_line_list(), Vect_find_node(), Vect_get_area_area(), Vect_get_area_boundaries(), Vect_get_area_centroid(), Vect_get_area_isle(), Vect_get_area_num_isles(), Vect_get_area_points(), Vect_get_area_points_geos(), Vect_get_column_names(), Vect_get_column_names_types(), Vect_get_column_types(), Vect_get_dblink(), Vect_get_field(), Vect_get_isle_area(), Vect_get_isle_boundaries(), Vect_get_isle_points(), Vect_get_isle_points_geos(), Vect_get_line_cat(), Vect_get_point_in_area(), Vect_get_point_in_poly(), Vect_get_point_in_poly_isl(), Vect_get_thresh(), Vect_graph_add_edge(), Vect_graph_build(), Vect_graph_init(), Vect_graph_set_node_costs(), Vect_graph_shortest_path(), Vect_hist_command(), Vect_hist_copy(), Vect_hist_read(), Vect_hist_rewind(), Vect_hist_write(), Vect_isle_find_area(), Vect_line_buffer(), Vect_line_buffer2(), Vect_line_intersection(), Vect_line_parallel(), Vect_line_parallel2(), Vect_line_segment(), Vect_line_to_geos(), Vect_map_del_dblink(), Vect_merge_lines(), Vect_net_build_graph(), Vect_net_get_line_cost(), Vect_net_get_node_cost(), Vect_net_nearest_nodes(), Vect_net_shortest_path(), Vect_net_shortest_path_coor2(), Vect_open_new(), Vect_open_spatial_index(), Vect_open_topo(), Vect_overlay_and(), Vect_point_buffer2(), Vect_point_in_area_outer_ring(), Vect_point_in_island(), Vect_point_in_poly(), Vect_point_on_line(), Vect_read_area_geos(), Vect_read_dblinks(), Vect_read_line(), Vect_read_line_geos(), Vect_read_next_line(), Vect_remove_duplicates(), Vect_remove_small_areas(), Vect_rename(), Vect_restore_line(), Vect_rewind(), Vect_rewrite_line(), Vect_save_spatial_index(), Vect_save_topo(), Vect_segment_intersection(), Vect_select_areas_by_box(), Vect_select_areas_by_polygon(), Vect_select_isles_by_box(), Vect_select_lines_by_box(), Vect_select_lines_by_polygon(), Vect_select_nodes_by_box(), Vect_set_thresh(), Vect_set_varray_from_cat_list(), Vect_set_varray_from_cat_string(), Vect_set_varray_from_db(), Vect_snap_line(), Vect_snap_lines(), Vect_snap_lines_list(), Vect_spatial_index_add_item(), Vect_spatial_index_del_item(), Vect_spatial_index_destroy(), Vect_spatial_index_init(), Vect_spatial_index_select(), Vect_str_to_cat_list(), Vect_subst_var(), Vect_tin_get_z(), Vect_write_dblinks(), Vect_write_line(), Vedit_add_vertex(), Vedit_chtype_lines(), Vedit_connect_lines(), Vedit_copy_lines(), Vedit_delete_lines(), Vedit_flip_lines(), Vedit_get_min_distance(), Vedit_merge_lines(), Vedit_move_lines(), Vedit_move_vertex(), Vedit_remove_vertex(), Vedit_render_map(), Vedit_select_by_query(), Vedit_snap_line(), Vedit_snap_point(), Vedit_split_lines(), write_file(), and write_image().