GRASS Programmer's Manual  6.5.svn(2014)-r66266
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dcolor.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <grass/gis.h>
#include "G3d_intern.h"
Include dependency graph for g3dcolor.c:

Go to the source code of this file.

Functions

int G3d_removeColor (const char *name)
 
 G_init_colors (colors)
 
 if (G__name_is_fully_qualified(name, xname, xmapset))
 
 sprintf (buf,"%s/%s/%s", G3D_DIRECTORY, G3D_COLOR2_DIRECTORY, mapset)
 
 if (read_colors(buf, name, G_mapset(), colors) >=0) return 1
 
 G_mark_colors_as_fp (colors)
 
 sprintf (buf,"%s/%s", G3D_DIRECTORY, name)
 
 sprintf (buf2,"%s", G3D_COLOR_ELEMENT)
 
 switch (read_colors(buf, buf2, mapset, colors))
 
 G_warning ("color support for [%s] in mapset [%s] %s", name, mapset, err)
 
 sprintf (element,"%s/%s/%s", G3D_DIRECTORY, G3D_COLOR2_DIRECTORY, mapset)
 
 if (strcmp(mapset, G_mapset())==0)
 
 fclose (fd)
 

Variables

 int
 
const char * err
 
char xname [GNAME_MAX]
 
char xmapset [GMAPSET_MAX]
 
struct FPRange drange
 
DCELL dmin
 
DCELL dmax
 
 return
 
FILE * fd
 
int stat = G__write_colors(fd, colors)
 
 else
 

Function Documentation

fclose ( fd  )
int G3d_removeColor ( const char *  name)

Definition at line 20 of file g3dcolor.c.

References buf, buf2, G__name_is_fully_qualified(), G_mapset(), G_remove(), sprintf(), xmapset, and xname.

G_mark_colors_as_fp ( colors  )

Referenced by G_read_colors().

G_warning ( "color support for in mapset %s"  [%s][%s],
name  ,
mapset  ,
err   
)

Definition at line 57 of file g3dcolor.c.

References xname.

if ( read_colors(buf, name, G_mapset(), colors) >=  0)
if ( strcmp(mapset, G_mapset())  = = 0)

Definition at line 384 of file g3dcolor.c.

References G__name_is_fully_qualified(), G_fopen_new(), G_remove(), and sprintf().

sprintf ( buf  ,
"%s/%s/%s"  ,
G3D_DIRECTORY  ,
G3D_COLOR2_DIRECTORY  ,
mapset   
)
sprintf ( buf  ,
"%s/%s"  ,
G3D_DIRECTORY  ,
name   
)
sprintf ( buf2  ,
"%s"  ,
G3D_COLOR_ELEMENT   
)
sprintf ( element  ,
"%s/%s/%s"  ,
G3D_DIRECTORY  ,
G3D_COLOR2_DIRECTORY  ,
mapset   
)
switch ( read_colors(buf, buf2, mapset, colors)  )

Variable Documentation

struct FPRange drange

Definition at line 52 of file g3dcolor.c.

Referenced by switch().

else
Initial value:
{
if (!(fd = G_fopen_new(element, name)))
return -1
FILE * fd
Definition: g3dcolor.c:368
string name
Definition: render.py:1314
FILE * G_fopen_new(const char *element, const char *name)
Open a new database file.
Definition: gis/open.c:197

Definition at line 399 of file g3dcolor.c.

FILE* fd

Definition at line 368 of file g3dcolor.c.

Referenced by db_read_dbmscap(), dump_html(), G3d_readHistory(), G3d_writeCats(), G3d_writeHistory(), G__check_format(), G__create_window_mapping(), G__get_window(), G__open_cell_old(), G__open_null_write(), G__put_null_value_row(), G__put_window(), G__quant_export(), G__quant_import(), G__random_d_initialize_0(), G__random_f_initialize_0(), G__raster_misc_read_line(), G__raster_misc_write_line(), G__read_cats(), G__read_row_ptrs(), G__write_cats(), G__write_data(), G__write_data_compressed(), G__write_fp_format(), G__write_row_ptrs(), G_close_cell(), G_debug(), G_dump(), G_fopen_append(), G_fopen_append_misc(), G_fopen_modify(), G_fopen_modify_misc(), G_fopen_new(), G_fopen_new_misc(), G_fopen_old(), G_fopen_old_misc(), G_get_cell_title(), G_get_cellhd(), G_get_dig_title(), G_get_null_value_row(), G_get_raster_map_type(), G_get_raster_row_colors(), G_get_reclass(), G_is_reclass(), G_is_reclassed_to(), G_myname(), G_open_cell_old(), G_open_update(), G_open_update_misc(), G_put_cellhd(), G_put_map_row(), G_put_map_row_random(), G_put_reclass(), G_read_fp_range(), G_read_histogram(), G_read_history(), G_read_key_value_file(), G_read_range(), G_recursive_copy(), G_row_repeat_nomask(), G_set_quant_rules(), G_unopen_cell(), G_write_colors(), G_write_fp_range(), G_write_histogram(), G_write_histogram_cs(), G_write_history(), G_write_key_value_file(), G_write_range(), GPJ_get_datum_transform_by_name(), Gs_get_cat_label(), I_fopen_group_file_append(), I_fopen_group_file_new(), I_fopen_group_file_old(), I_fopen_signature_file_new(), I_fopen_signature_file_old(), I_fopen_sigset_file_new(), I_fopen_sigset_file_old(), I_fopen_subgroup_file_append(), I_fopen_subgroup_file_new(), I_fopen_subgroup_file_old(), I_fopen_subgroup_ref_old(), I_get_control_points(), I_get_group(), I_get_group_title(), I_get_subgroup(), I_get_target(), I_put_control_points(), I_put_group(), I_put_group_title(), I_put_subgroup(), I_put_target(), main(), make_mapset(), printfile(), read_datum_table(), read_ellipsoid_table(), read_file(), rowio_setup(), segment_init(), unpack_extension(), Vect_read_dblinks(), Vect_write_dblinks(), and write_file().

int
Initial value:
{
char buf[512], buf2[200]
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
Definition: g3drange.c:62
char buf2[200]
Definition: g3dcats.c:89

Definition at line 48 of file g3dcolor.c.

Referenced by btree_update(), c_quant(), D_get_a(), D_get_d(), D_popup(), db_select_int(), dfread_header(), dfread_header_old(), dfwrite_header(), dig__fread_port_I(), dig__fwrite_port_I(), dig_fread(), drawchar(), free_data_buffs(), G3d_flushAllTiles(), G3d_getVolumeA(), G__interpolate_color_rule(), G__lookup_colors(), G__read_row_ptrs(), G_get_color(), G_get_default_color(), G_get_null_value_color(), G_get_raster_color(), G_get_raster_sample_bilinear(), G_get_raster_sample_cubic(), G_get_raster_sample_nearest(), G_is_little_endian(), G_list_element(), G_make_histogram_log_colors(), G_parse_color_rule(), G_quant_get_cell_value(), G_rotate_around_point_int(), G_set_d_raster_cat(), G_standard_color_rgb(), G_str_to_color(), get_char_vects(), Gp_set_color(), gpd_obj_site_attr(), GS_getlight_position(), Gs_load_3dview(), gs_malloc_lookup(), gsd_coarse_surf_map(), gsd_get_nice_range(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_put_legend(), gsd_set_material(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsds_alloc_typbuff(), gvld_slice(), I_compute_georef_equations(), I_new_control_point(), IL_grid_calc_2d(), IL_resample_interp_segments_2d(), IL_vector_input_data_2d(), N_les_integrate_dirichlet_3d(), Nviz_color_from_str(), Nviz_set_viewpoint_persp(), PS_scaled_raster(), quad_compare(), quad_divide_data(), royston(), rtree_write_branch(), segment_setup(), SHPWriteObject(), slice_calc(), unfl(), V1_read_next_line_ogr(), V2_read_line_ogr(), Vect_array_to_cat_list(), Vect_build_ogr(), Vect_line_reverse(), Vect_new_varray(), Vect_point_buffer2(), and Vect_str_to_cat_list().

return

Definition at line 97 of file g3dcolor.c.

return stat = G__write_colors(fd, colors)

Definition at line 369 of file g3dcolor.c.

Referenced by bin_install(), binaries_exist(), can_make_location(), clean_dir(), D_get_cell_list(), D_get_cell_name(), D_get_cur_wind(), D_get_dig_list(), D_get_dig_name(), D_get_erase_color(), D_get_list(), D_get_screen_window(), D_new_window(), D_reset_screen_window(), D_set_cur_wind(), D_show_window(), D_timestamp(), datetime_change_timezone(), datetime_check_day(), datetime_get_day(), datetime_get_fracsec(), datetime_get_hour(), datetime_get_minute(), datetime_get_month(), datetime_get_second(), datetime_get_timezone(), datetime_get_year(), datetime_set_day(), datetime_set_fracsec(), datetime_set_hour(), datetime_set_minute(), datetime_set_month(), datetime_set_second(), datetime_set_timezone(), datetime_set_year(), db__recv_char(), db__recv_double(), db__recv_double_array(), db__recv_float(), db__recv_float_array(), db__recv_int(), db__recv_int_array(), db__recv_procnum(), db__recv_short(), db__recv_short_array(), db__recv_string(), db__recv_string_array(), db__send_char(), db__send_double(), db__send_double_array(), db__send_float(), db__send_float_array(), db__send_int(), db__send_int_array(), db__send_short(), db__send_short_array(), db__send_string(), db__send_string_array(), db_append_string(), db_d_add_column(), db_d_begin_transaction(), db_d_bind_update(), db_d_close_cursor(), db_d_close_database(), db_d_commit_transaction(), db_d_create_database(), db_d_create_index(), db_d_create_table(), db_d_delete(), db_d_delete_database(), db_d_describe_table(), db_d_drop_column(), db_d_drop_index(), db_d_drop_table(), db_d_execute_immediate(), db_d_fetch(), db_d_find_database(), db_d_grant_on_table(), db_d_insert(), db_d_list_databases(), db_d_list_indexes(), db_d_list_tables(), db_d_open_database(), db_d_open_insert_cursor(), db_d_open_select_cursor(), db_d_open_update_cursor(), db_d_update(), db_driver(), db_find_database(), db_isdir(), db_set_handle(), db_start_driver(), dig_file_load(), G__mapset_permissions(), G__mapset_permissions2(), G__tempfile(), G__write_fp_format(), G_available_mapsets(), G_get_cell_title(), G_get_dig_title(), G_get_ellipsoid_parameters(), G_get_projinfo(), G_get_projunits(), G_get_reclass(), G_lookup_key_value_from_file(), G_lstat(), G_recursive_copy(), G_remove_colors(), G_stat(), G_update_key_value_file(), G_write_colors(), I_get_control_points(), I_get_group(), I_get_subgroup(), ident_win(), list_binaries(), main(), mapset_permissions(), N_les_integrate_dirichlet_2d(), N_les_integrate_dirichlet_3d(), read_file(), source_install(), test_install(), uninstall(), V1_open_new_nat(), Vect__open_old(), Vect_cidx_open(), Vect_close(), Vect_coor_info(), Vect_copy(), and Vect_open_topo().

char xmapset[512]

Definition at line 51 of file g3dcolor.c.

char xname[512]

Definition at line 51 of file g3dcolor.c.