Variable Length Strings
[libbu (utility functions)]

Collaboration diagram for Variable Length Strings:


Files

file  vls.c
 The variable length string package.

Data Structures

struct  bu_vls

Defines

#define BU_VLS_MAGIC   0x89333bbb
#define BU_CK_VLS(_vp)   BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
#define BU_VLS_IS_INITIALIZED(_vp)   ((_vp) && ((_vp)->vls_magic == BU_VLS_MAGIC))
#define BU_SEM_SYSCALL   0
#define BU_SEM_LISTS   1
#define BU_SEM_BN_NOISE   2
#define BU_SEM_MAPPEDFILE   3
#define BU_SEM_LAST   (BU_SEM_MAPPEDFILE+1)
#define BU_SETJUMP   setjmp((bu_setjmp_valid=1,bu_jmpbuf))
#define BU_UNSETJUMP   (bu_setjmp_valid=0)

Functions

void bu_vls_init (struct bu_vls *vp)
void bu_vls_init_if_uninit (struct bu_vls *vp)
bu_vlsbu_vls_vlsinit ()
char * bu_vls_addr (const struct bu_vls *vp)
char * bu_vls_strdup (const struct bu_vls *vp)
char * bu_vls_strgrab (struct bu_vls *vp)
void bu_vls_extend (struct bu_vls *vp, unsigned int extra)
void bu_vls_setlen (struct bu_vls *vp, int newlen)
int bu_vls_strlen (const struct bu_vls *vp)
void bu_vls_trunc (struct bu_vls *vp, int len)
void bu_vls_trunc2 (struct bu_vls *vp, int len)
void bu_vls_nibble (struct bu_vls *vp, int len)
void bu_vls_free (struct bu_vls *vp)
void bu_vls_vlsfree (struct bu_vls *vp)
void bu_vls_strcpy (struct bu_vls *vp, const char *s)
void bu_vls_strncpy (struct bu_vls *vp, const char *s, long n)
void bu_vls_strcat (struct bu_vls *vp, const char *s)
void bu_vls_strncat (struct bu_vls *vp, const char *s, long n)
void bu_vls_vlscat (struct bu_vls *dest, const struct bu_vls *src)
void bu_vls_vlscatzap (struct bu_vls *dest, struct bu_vls *src)
void bu_vls_from_argv (struct bu_vls *vp, int argc, const char *argv[])
int bu_argv_from_string (char **argv, int lim, char *lp)
void bu_vls_fwrite (FILE *fp, const struct bu_vls *vp)
void bu_vls_write (int fd, const struct bu_vls *vp)
int bu_vls_read (struct bu_vls *vp, int fd)
int bu_vls_gets (struct bu_vls *vp, FILE *fp)
void bu_vls_putc (struct bu_vls *vp, int c)
void bu_vls_trimspace (struct bu_vls *vp)
void bu_vls_printf (struct bu_vls *vls, char *fmt,...)
void bu_vls_sprintf (struct bu_vls *vls, char *fmt,...)
void bu_vls_spaces (struct bu_vls *vp, int cnt)
int bu_vls_print_positions_used (const struct bu_vls *vp)
void bu_vls_detab (struct bu_vls *vp)
void bu_vls_prepend (struct bu_vls *vp, char *str)
void bu_vls_init (register struct bu_vls *vp)
void bu_vls_init_if_uninit (register struct bu_vls *vp)
char * bu_vls_addr (register const struct bu_vls *vp)
void bu_vls_extend (register struct bu_vls *vp, unsigned int extra)
int bu_vls_strlen (register const struct bu_vls *vp)
void bu_vls_trunc (register struct bu_vls *vp, int len)
void bu_vls_trunc2 (register struct bu_vls *vp, int len)
void bu_vls_nibble (register struct bu_vls *vp, int len)
void bu_vls_free (register struct bu_vls *vp)
void bu_vls_vlsfree (register struct bu_vls *vp)
char * bu_vls_strdup (register const struct bu_vls *vp)
char * bu_vls_strgrab (register struct bu_vls *vp)
void bu_vls_strcpy (register struct bu_vls *vp, const char *s)
void bu_vls_strncpy (register struct bu_vls *vp, const char *s, long int n)
void bu_vls_strcat (register struct bu_vls *vp, const char *s)
void bu_vls_strncat (register struct bu_vls *vp, const char *s, long int n)
void bu_vls_vlscat (register struct bu_vls *dest, register const struct bu_vls *src)
void bu_vls_vlscatzap (register struct bu_vls *dest, register struct bu_vls *src)
void bu_vls_from_argv (register struct bu_vls *vp, int argc, const char *argv[])
int bu_argv_from_string (char **argv, int lim, register char *lp)
int bu_vls_gets (register struct bu_vls *vp, register FILE *fp)
void bu_vls_putc (register struct bu_vls *vp, int c)
void bu_vls_printf (struct bu_vls *vls, char *fmt, a, b, c, d, e, f, g, h, i, j)
void bu_vls_sprintf (struct bu_vls *vls, char *fmt, a, b, c, d, e, f, g, h, i, j)
void bu_vls_spaces (register struct bu_vls *vp, int cnt)

Variables

int bu_setjmp_valid
 !0 = bu_jmpbuf is valid
jmp_buf bu_jmpbuf
 for BU_SETJMP()
const char bu_vls_message [] = "bu_vls_str"
const char bu_strdup_message []

Define Documentation

#define BU_VLS_MAGIC   0x89333bbb
 

Definition at line 1179 of file bu.h.

Referenced by bu_identify_magic(), bu_vls_init(), bu_vls_init_if_uninit(), and bu_vls_vlsfree().

#define BU_CK_VLS _vp   )     BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
 

Definition at line 1180 of file bu.h.

Referenced by bn_tabdata_to_tcl(), bu_avs_add_vls(), bu_bitv_to_hex(), bu_bitv_vls(), bu_key_eq_to_key_val(), bu_shader_to_key_eq(), bu_shader_to_tcl_list(), bu_struct_parse(), bu_structparse(), bu_vls_addr(), bu_vls_detab(), bu_vls_extend(), bu_vls_free(), bu_vls_from_argv(), bu_vls_fwrite(), bu_vls_gets(), bu_vls_nibble(), bu_vls_print_positions_used(), bu_vls_printf(), bu_vls_putc(), bu_vls_read(), bu_vls_setlen(), bu_vls_spaces(), bu_vls_sprintf(), bu_vls_strcat(), bu_vls_strcpy(), bu_vls_strgrab(), bu_vls_strlen(), bu_vls_strncat(), bu_vls_strncpy(), bu_vls_struct_print(), bu_vls_structprint(), bu_vls_trimspace(), bu_vls_trunc(), bu_vls_trunc2(), bu_vls_vlscat(), bu_vls_vlscatzap(), bu_vls_write(), db5_export_color_table(), db_path_to_vls(), db_tree_describe(), db_tree_flatten_describe(), nmg_vls_struct_counts(), rt_dsp_export(), rt_dsp_norm(), rt_dsp_prep(), rt_dsp_print(), rt_dsp_shot(), rt_dsp_tcladjust(), rt_get_timer(), rt_hf_describe(), rt_pr_fallback_angle(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_pt_vls(), rt_pr_seg_vls(), rt_vlist_export(), and rt_vlist_import().

#define BU_VLS_IS_INITIALIZED _vp   )     ((_vp) && ((_vp)->vls_magic == BU_VLS_MAGIC))
 

Definition at line 1181 of file bu.h.

Referenced by rt_dsp_describe(), rt_dsp_export(), rt_dsp_ifree(), rt_dsp_import(), and rt_dsp_print().

#define BU_SEM_SYSCALL   0
 

Definition at line 1187 of file bu.h.

Referenced by bn_print_table_and_tabdata(), bn_read_table_and_tabdata(), bn_tabdata_binary_read(), bn_table_read(), bn_table_write(), bu_flog(), bu_fopen_uniq(), bu_free(), bu_free_mapped_files(), bu_log(), bu_mem_barriercheck(), bu_memdebug_add(), bu_memdebug_check(), bu_open_mapped_file(), bu_realloc(), bu_strdupm(), bu_struct_get(), bu_vls_fwrite(), bu_vls_gets(), bu_vls_read(), bu_vls_write(), db_read(), db_sync(), db_write(), rt_dsp_norm(), rt_hf_import(), rt_prealloc(), rt_vol_import(), rt_vol_import5(), spm_load(), spm_px_load(), spm_px_save(), and spm_save().

#define BU_SEM_LISTS   1
 

Definition at line 1188 of file bu.h.

Referenced by bu_list_parallel_append(), bu_list_parallel_dequeue(), and db_close().

#define BU_SEM_BN_NOISE   2
 

Definition at line 1189 of file bu.h.

Referenced by bn_noise_init().

#define BU_SEM_MAPPEDFILE   3
 

Definition at line 1190 of file bu.h.

Referenced by bu_close_mapped_file(), bu_free_mapped_files(), and bu_open_mapped_file().

#define BU_SEM_LAST   (BU_SEM_MAPPEDFILE+1)
 

Definition at line 1191 of file bu.h.

#define BU_SETJUMP   setjmp((bu_setjmp_valid=1,bu_jmpbuf))
 

Definition at line 1199 of file bu.h.

Referenced by wdb_facetize_cmd().

#define BU_UNSETJUMP   (bu_setjmp_valid=0)
 

Definition at line 1200 of file bu.h.

Referenced by wdb_facetize_cmd().


Function Documentation

void bu_vls_init struct bu_vls vp  ) 
 

Referenced by bn_math_cmd(), bn_pr_poly(), bn_table_read(), bu_association(), bu_brlcad_data(), bu_brlcad_root(), bu_cmdhist_add(), bu_cmdhist_curr(), bu_cmdhist_history(), bu_cmdhist_next(), bu_cmdhist_prev(), bu_flog(), bu_get_all_keyword_values(), bu_get_value_by_keyword(), bu_log(), bu_mro_init(), bu_mro_init_with_string(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_printb(), bu_struct_parse(), bu_structparse(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_structprint(), bu_tcl_hsv_to_rgb(), bu_tcl_key_eq_to_key_val(), bu_tcl_printb(), bu_tcl_rgb_to_hsv(), bu_tcl_shader_to_key_eq(), bu_tcl_shader_to_key_val(), bu_tcl_units_conversion(), bu_vls_detab(), bu_vls_init_if_uninit(), bu_vls_struct_print(), bu_vls_structprint(), bu_vls_vlsinit(), cho_open_tcl(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_update_ident(), db_apply_state_from_comb(), db_create_inmem(), db_diradd(), db_diradd5(), db_do_anim(), db_parse_1anim(), db_tcl_tree_describe(), dgo_autoview_cmd(), dgo_build_dpp(), dgo_draw_cmd(), dgo_E_cmd(), dgo_erase_all_cmd(), dgo_erase_cmd(), dgo_eraseobjpath(), dgo_get_autoview_cmd(), dgo_get_eyemodel_cmd(), dgo_how_cmd(), dgo_init_qray(), dgo_nirt_cmd(), dgo_observer_cmd(), dgo_open_cmd(), dgo_overlay_cmd(), dgo_pr_wait_status(), dgo_qray_cmd(), dgo_report_cmd(), dgo_rt_cmd(), dgo_set_outputHandler_cmd(), dgo_set_transparency_cmd(), dgo_set_uplotOutputMode_cmd(), dgo_shaded_mode_cmd(), dgo_vnirt_cmd(), dgo_who_cmd(), main(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_pr_struct_counts(), rt_arb_calc_planes(), rt_arbn_tclget(), rt_ars_tclget(), rt_binunif_tclget(), rt_bot_export(), rt_bot_export5(), rt_bot_tclget(), rt_cline_tclget(), rt_comb_export4(), rt_comb_export5(), rt_comb_import5(), rt_comb_make(), rt_default_logoverlap(), rt_dsp_describe(), rt_dsp_export(), rt_dsp_import(), rt_dsp_import5(), rt_dsp_make(), rt_dsp_print(), rt_dsp_tclget(), rt_ebm_describe(), rt_ebm_export(), rt_ebm_export5(), rt_ebm_import(), rt_ebm_import5(), rt_ebm_tclget(), rt_extrude_tclget(), rt_hf_export(), rt_hf_import(), rt_hf_to_dsp(), rt_nmg_tclget(), rt_nurb_tclget(), rt_parsetab_tclget(), rt_pipe_tclget(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_read_timer(), rt_regionfix(), rt_sketch_tclget(), rt_submodel_export(), rt_submodel_export5(), rt_submodel_import(), rt_submodel_import5(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_tcl_rt_prep(), rt_vol_describe(), rt_vol_export(), rt_vol_export5(), rt_vol_import(), rt_vol_import5(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_eye_cmd(), vo_eye_pos_cmd(), vo_invSize_cmd(), vo_keypoint_cmd(), vo_local2base_cmd(), vo_lookat_cmd(), vo_m2vPoint_cmd(), vo_model2view_cmd(), vo_mrot_cmd(), vo_mrotPoint_cmd(), vo_observer_cmd(), vo_open_cmd(), vo_orientation_cmd(), vo_perspective_cmd(), vo_pmat_cmd(), vo_pmodel2view_cmd(), vo_pov_cmd(), vo_rmat_cmd(), vo_rot(), vo_rot_cmd(), vo_rotate_about_cmd(), vo_sca_cmd(), vo_setview_cmd(), vo_size_cmd(), vo_slew_cmd(), vo_tra_cmd(), vo_units_cmd(), vo_v2mPoint_cmd(), vo_view2model_cmd(), vo_viewDir_cmd(), vo_vrot_cmd(), vo_zoom_cmd(), wdb_adjust_cmd(), wdb_attr_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_bot_face_sort_cmd(), wdb_cat_cmd(), wdb_color_cmd(), wdb_comb_cmd(), wdb_comb_std_cmd(), wdb_combadd(), wdb_concat_cmd(), wdb_copy_cmd(), wdb_copyeval_cmd(), wdb_dbip_cmd(), wdb_dbopen(), wdb_dir_check(), wdb_dir_check5(), wdb_dump_cmd(), wdb_dup_cmd(), wdb_expand_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_form_cmd(), wdb_get_cmd(), wdb_get_type_cmd(), wdb_group_cmd(), wdb_hide_cmd(), wdb_importFg4Section_cmd(), wdb_init_obj(), wdb_instance_cmd(), wdb_keep_cmd(), wdb_kill_cmd(), wdb_killall_cmd(), wdb_killtree_cmd(), wdb_list_cmd(), wdb_ls_cmd(), wdb_lt_cmd(), wdb_make_bb_cmd(), wdb_make_name_cmd(), wdb_match_cmd(), wdb_move_all_cmd(), wdb_move_arb_edge_cmd(), wdb_move_arb_face_cmd(), wdb_move_cmd(), wdb_nmg_collapse_cmd(), wdb_nmg_simplify_cmd(), wdb_observer_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), wdb_otranslate_cmd(), wdb_pathlist_cmd(), wdb_pathsum_cmd(), wdb_prcolor_cmd(), wdb_push_cmd(), wdb_put_cmd(), wdb_region_cmd(), wdb_remove_cmd(), wdb_reopen_cmd(), wdb_rmap_cmd(), wdb_rotate_arb_face_cmd(), wdb_rt_gettrees_cmd(), wdb_shells_cmd(), wdb_showmats_cmd(), wdb_smooth_bot_cmd(), wdb_summary_cmd(), wdb_title_cmd(), wdb_tol_cmd(), wdb_track_cmd(), wdb_tree_cmd(), wdb_unhide_cmd(), wdb_units_cmd(), wdb_version_cmd(), wdb_whatid_cmd(), wdb_which_cmd(), and wdb_xpush_cmd().

void bu_vls_init_if_uninit struct bu_vls vp  ) 
 

Referenced by bu_structparse_argv().

struct bu_vls * bu_vls_vlsinit void   ) 
 

B U _ V L S _ V L S I N I T

Allocate storage for a struct bu_vls, call bu_vls_init on it, and return the result. Allows for creation of dynamically allocated vls strings.

Definition at line 129 of file vls.c.

References bu_malloc(), and bu_vls_init().

Here is the call graph for this function:

char* bu_vls_addr const struct bu_vls vp  ) 
 

Referenced by bn_math_cmd(), bn_table_read(), bu_association(), bu_avs_add_vls(), bu_brlcad_data(), bu_brlcad_root(), bu_cmdhist_add(), bu_cmdhist_curr(), bu_cmdhist_history(), bu_cmdhist_next(), bu_cmdhist_prev(), bu_flog(), bu_get_all_keyword_values(), bu_get_value_by_keyword(), bu_log(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_printb(), bu_struct_parse(), bu_structparse(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_tcl_hsv_to_rgb(), bu_tcl_key_eq_to_key_val(), bu_tcl_printb(), bu_tcl_rgb_to_hsv(), bu_tcl_shader_to_key_eq(), bu_tcl_shader_to_key_val(), bu_tcl_units_conversion(), bu_vls_detab(), bu_vls_print_positions_used(), bu_vls_strdup(), bu_vls_strgrab(), bu_vls_trimspace(), cho_open_tcl(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_update_ident(), db_apply_state_from_comb(), db_comb_describe(), db_create_inmem(), db_diradd(), db_diradd5(), db_dircheck(), db_tcl_tree_describe(), dgo_autoview_cmd(), dgo_build_dpp(), dgo_draw_cmd(), dgo_E_cmd(), dgo_erase_all_cmd(), dgo_erase_cmd(), dgo_eraseobjpath(), dgo_get_autoview_cmd(), dgo_get_eyemodel_cmd(), dgo_how_cmd(), dgo_nirt_cmd(), dgo_notify(), dgo_observer_cmd(), dgo_overlay_cmd(), dgo_pr_wait_status(), dgo_qray_cmd(), dgo_report_cmd(), dgo_rt_cmd(), dgo_set_outputHandler_cmd(), dgo_set_transparency_cmd(), dgo_set_uplotOutputMode_cmd(), dgo_shaded_mode_cmd(), dgo_vnirt_cmd(), dgo_who_cmd(), main(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_pr_struct_counts(), rt_arb_calc_planes(), rt_cline_tclget(), rt_comb_export4(), rt_comb_tclget(), rt_dsp_export(), rt_dsp_export5(), rt_dsp_import(), rt_dsp_print(), rt_dsp_tclget(), rt_ebm_export(), rt_ebm_export5(), rt_extrude_tclget(), rt_hf_export(), rt_hf_import(), rt_parsetab_tclget(), rt_pipe_tclget(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_read_timer(), rt_regionfix(), rt_submodel_describe(), rt_submodel_export(), rt_submodel_export5(), rt_submodel_import(), rt_submodel_import5(), rt_submodel_plot(), rt_submodel_prep(), rt_tcl_pr_hit(), rt_tcl_rt_prep(), rt_vlist_export(), rt_vol_export(), rt_vol_export5(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_eye_cmd(), vo_eye_pos_cmd(), vo_invSize_cmd(), vo_keypoint_cmd(), vo_local2base_cmd(), vo_lookat_cmd(), vo_m2vPoint_cmd(), vo_model2view_cmd(), vo_mrot_cmd(), vo_mrotPoint_cmd(), vo_observer_cmd(), vo_orientation_cmd(), vo_perspective_cmd(), vo_pmat_cmd(), vo_pmodel2view_cmd(), vo_pov_cmd(), vo_rmat_cmd(), vo_rot(), vo_rot_cmd(), vo_rotate_about_cmd(), vo_sca_cmd(), vo_setview_cmd(), vo_size_cmd(), vo_slew_cmd(), vo_tra_cmd(), vo_units_cmd(), vo_update(), vo_v2mPoint_cmd(), vo_view2model_cmd(), vo_viewDir_cmd(), vo_vrot_cmd(), vo_zoom_cmd(), wdb_adjust_cmd(), wdb_attr_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_bot_face_sort_cmd(), wdb_cat_cmd(), wdb_color_cmd(), wdb_comb_cmd(), wdb_comb_std_cmd(), wdb_combadd(), wdb_concat_cmd(), wdb_copy_cmd(), wdb_copyeval_cmd(), wdb_dbip_cmd(), wdb_dir_check(), wdb_dir_check5(), wdb_dump_cmd(), wdb_dup_cmd(), wdb_expand_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_form_cmd(), wdb_get_cmd(), wdb_get_type_cmd(), wdb_group_cmd(), wdb_hide_cmd(), wdb_importFg4Section_cmd(), wdb_instance_cmd(), wdb_keep_cmd(), wdb_kill_cmd(), wdb_killall_cmd(), wdb_killtree_cmd(), wdb_list_cmd(), wdb_ls_cmd(), wdb_lt_cmd(), wdb_make_bb_cmd(), wdb_make_name_cmd(), wdb_move_all_cmd(), wdb_move_arb_edge_cmd(), wdb_move_arb_face_cmd(), wdb_move_cmd(), wdb_nmg_collapse_cmd(), wdb_nmg_simplify_cmd(), wdb_node_write(), wdb_observer_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), wdb_otranslate_cmd(), wdb_pathlist_cmd(), wdb_pathsum_cmd(), wdb_prcolor_cmd(), wdb_push_cmd(), wdb_put_cmd(), wdb_region_cmd(), wdb_remove_cmd(), wdb_reopen_cmd(), wdb_rmap_cmd(), wdb_rotate_arb_face_cmd(), wdb_rt_gettrees_cmd(), wdb_shells_cmd(), wdb_showmats_cmd(), wdb_smooth_bot_cmd(), wdb_summary_cmd(), wdb_title_cmd(), wdb_tol_cmd(), wdb_track_cmd(), wdb_tree_cmd(), wdb_unhide_cmd(), wdb_units_cmd(), wdb_version_cmd(), wdb_whatid_cmd(), wdb_which_cmd(), and wdb_xpush_cmd().

char* bu_vls_strdup const struct bu_vls vp  ) 
 

Referenced by bu_vls_strgrab(), db_apply_state_from_comb(), db_do_anim(), and rt_submodel_prep().

char* bu_vls_strgrab struct bu_vls vp  ) 
 

Referenced by db_do_anim().

void bu_vls_extend struct bu_vls vp,
unsigned int  extra
 

Referenced by bn_pr_poly(), bu_bitv_to_hex(), bu_vls_detab(), bu_vls_gets(), bu_vls_prepend(), bu_vls_print_double(), bu_vls_putc(), bu_vls_read(), bu_vls_setlen(), bu_vls_spaces(), bu_vls_strcat(), bu_vls_strcpy(), bu_vls_strncat(), bu_vls_strncpy(), bu_vls_vlscat(), and rt_default_logoverlap().

void bu_vls_setlen struct bu_vls vp,
int  newlen
 

B U _ V L S _ S E T L E N

Ensure that the vls has a length of at least 'newlen', and make that the current length. Useful for subroutines that are planning on mucking with the data array themselves. Not advisable, but occasionally useful. Does not change the offset from the front of the buffer, if any. Does not initialize the value of any of the new bytes.

Definition at line 207 of file vls.c.

References BU_CK_VLS, bu_vls_extend(), and bu_vls::vls_len.

Referenced by rt_vlist_export().

Here is the call graph for this function:

int bu_vls_strlen const struct bu_vls vp  ) 
 

Referenced by bu_flog(), bu_log(), bu_observer_notify(), bu_shader_to_key_eq(), bu_shader_to_tcl_list(), bu_vls_detab(), bu_vls_gets(), bu_vls_strdup(), bu_vls_trimspace(), db_apply_state_from_comb(), db_comb_describe(), dgo_nirt_cmd(), rt_bot_export(), rt_bot_export5(), rt_comb_export4(), rt_comb_export5(), rt_comb_tclget(), rt_dsp_export5(), rt_ebm_export5(), rt_read_timer(), rt_submodel_export5(), rt_submodel_import(), rt_submodel_import5(), rt_submodel_plot(), rt_submodel_prep(), rt_vol_export5(), wdb_concat_cmd(), and wdb_dup_cmd().

void bu_vls_trunc struct bu_vls vp,
int  len
 

Referenced by bu_association(), bu_cmdhist_history(), bu_get_all_keyword_values(), bu_get_value_by_keyword(), bu_mro_set(), bu_observer_notify(), bu_shader_to_tcl_list(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_tcl_key_eq_to_key_val(), bu_vls_nibble(), bu_vls_sprintf(), bu_vls_trimspace(), bu_vls_vlscatzap(), dgo_eraseobjpath(), dgo_nirt_cmd(), dgo_qray_cmd(), rt_comb_export5(), rt_dsp_import(), rt_dsp_tclget(), rt_parsetab_tclget(), rt_regionfix(), wdb_cat_cmd(), wdb_concat_cmd(), wdb_dir_check(), wdb_dir_check5(), wdb_dup_cmd(), and wdb_shells_cmd().

void bu_vls_trunc2 struct bu_vls vp,
int  len
 

Referenced by rt_ebm_describe(), and rt_vol_describe().

void bu_vls_nibble struct bu_vls vp,
int  len
 

Referenced by bu_vls_trimspace().

void bu_vls_free struct bu_vls vp  ) 
 

Referenced by bn_math_cmd(), bn_table_read(), bu_cmdhist_add(), bu_cmdhist_curr(), bu_cmdhist_history(), bu_cmdhist_next(), bu_cmdhist_prev(), bu_flog(), bu_get_all_keyword_values(), bu_get_value_by_keyword(), bu_log(), bu_mro_free(), bu_observer_free(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_printb(), bu_struct_parse(), bu_structparse(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_tcl_hsv_to_rgb(), bu_tcl_key_eq_to_key_val(), bu_tcl_printb(), bu_tcl_rgb_to_hsv(), bu_tcl_shader_to_key_eq(), bu_tcl_shader_to_key_val(), bu_tcl_units_conversion(), bu_vls_detab(), bu_vls_strgrab(), bu_vls_struct_print(), bu_vls_structprint(), bu_vls_vlsfree(), cho_open_tcl(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_update_ident(), db_apply_state_from_comb(), db_create_inmem(), db_diradd(), db_diradd5(), db_free_1anim(), db_tcl_tree_describe(), dgo_autoview_cmd(), dgo_build_dpp(), dgo_deleteProc(), dgo_draw_cmd(), dgo_E_cmd(), dgo_erase_all_cmd(), dgo_erase_cmd(), dgo_free_qray(), dgo_get_autoview_cmd(), dgo_get_eyemodel_cmd(), dgo_how_cmd(), dgo_nirt_cmd(), dgo_observer_cmd(), dgo_overlay_cmd(), dgo_pr_wait_status(), dgo_qray_cmd(), dgo_report_cmd(), dgo_rt_cmd(), dgo_set_outputHandler_cmd(), dgo_set_transparency_cmd(), dgo_set_uplotOutputMode_cmd(), dgo_shaded_mode_cmd(), dgo_vnirt_cmd(), dgo_who_cmd(), main(), nmg_pr_struct_counts(), rt_cline_tclget(), rt_comb_export4(), rt_comb_export5(), rt_comb_ifree(), rt_dsp_describe(), rt_dsp_export(), rt_dsp_ifree(), rt_dsp_import(), rt_dsp_print(), rt_dsp_tclget(), rt_ebm_export(), rt_ebm_export5(), rt_ebm_import(), rt_ebm_import5(), rt_extrude_tclget(), rt_hf_export(), rt_hf_import(), rt_nmg_tclget(), rt_parsetab_tclget(), rt_pipe_tclget(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_regionfix(), rt_sketch_tclget(), rt_submodel_export(), rt_submodel_export5(), rt_submodel_import(), rt_submodel_import5(), rt_tcl_pr_hit(), rt_tcl_rt_prep(), rt_vol_export(), rt_vol_export5(), rt_vol_import(), rt_vol_import5(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_eye_cmd(), vo_eye_pos_cmd(), vo_invSize_cmd(), vo_keypoint_cmd(), vo_local2base_cmd(), vo_lookat_cmd(), vo_m2vPoint_cmd(), vo_model2view_cmd(), vo_mrot_cmd(), vo_mrotPoint_cmd(), vo_observer_cmd(), vo_orientation_cmd(), vo_perspective_cmd(), vo_pmat_cmd(), vo_pmodel2view_cmd(), vo_pov_cmd(), vo_rmat_cmd(), vo_rot(), vo_rot_cmd(), vo_rotate_about_cmd(), vo_sca_cmd(), vo_setview_cmd(), vo_size_cmd(), vo_slew_cmd(), vo_tra_cmd(), vo_units_cmd(), vo_v2mPoint_cmd(), vo_view2model_cmd(), vo_viewDir_cmd(), vo_vrot_cmd(), vo_zoom_cmd(), wdb_adjust_cmd(), wdb_attr_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_bot_face_sort_cmd(), wdb_cat_cmd(), wdb_close(), wdb_color_cmd(), wdb_comb_cmd(), wdb_comb_std_cmd(), wdb_combadd(), wdb_concat_cmd(), wdb_copy_cmd(), wdb_copyeval_cmd(), wdb_dbip_cmd(), wdb_deleteProc(), wdb_dir_check(), wdb_dump_cmd(), wdb_dup_cmd(), wdb_expand_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_form_cmd(), wdb_get_cmd(), wdb_get_type_cmd(), wdb_group_cmd(), wdb_hide_cmd(), wdb_importFg4Section_cmd(), wdb_instance_cmd(), wdb_keep_cmd(), wdb_kill_cmd(), wdb_killall_cmd(), wdb_killtree_cmd(), wdb_list_cmd(), wdb_ls_cmd(), wdb_lt_cmd(), wdb_make_bb_cmd(), wdb_make_name_cmd(), wdb_move_all_cmd(), wdb_move_arb_edge_cmd(), wdb_move_arb_face_cmd(), wdb_move_cmd(), wdb_nmg_collapse_cmd(), wdb_nmg_simplify_cmd(), wdb_observer_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), wdb_otranslate_cmd(), wdb_pathlist_cmd(), wdb_pathsum_cmd(), wdb_prcolor_cmd(), wdb_push_cmd(), wdb_put_cmd(), wdb_region_cmd(), wdb_remove_cmd(), wdb_reopen_cmd(), wdb_rmap_cmd(), wdb_rotate_arb_face_cmd(), wdb_rt_gettrees_cmd(), wdb_shells_cmd(), wdb_showmats_cmd(), wdb_smooth_bot_cmd(), wdb_summary_cmd(), wdb_title_cmd(), wdb_tol_cmd(), wdb_track_cmd(), wdb_tree_cmd(), wdb_unhide_cmd(), wdb_units_cmd(), wdb_version_cmd(), wdb_whatid_cmd(), wdb_which_cmd(), and wdb_xpush_cmd().

void bu_vls_vlsfree struct bu_vls vp  ) 
 

void bu_vls_strcpy struct bu_vls vp,
const char *  s
 

Referenced by bu_association(), bu_cmdhist_add(), bu_get_all_keyword_values(), bu_mro_init_with_string(), bu_mro_set(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_structparse_argv(), db5_diradd(), db_diradd(), db_diradd5(), db_dircheck(), db_do_anim(), dgo_init_qray(), dgo_open_cmd(), dgo_qray_cmd(), rt_arbn_tclget(), rt_ars_tclget(), rt_binunif_tclget(), rt_bot_tclget(), rt_cline_tclget(), rt_dsp_import(), rt_dsp_make(), rt_ebm_import(), rt_ebm_import5(), rt_ebm_tclget(), rt_extrude_tclget(), rt_hf_import(), rt_nmg_tclget(), rt_nurb_tclget(), rt_regionfix(), rt_sketch_tclget(), rt_submodel_import(), rt_vol_import(), vo_open_cmd(), wdb_concat_cmd(), wdb_dup_cmd(), and wdb_init_obj().

void bu_vls_strncpy struct bu_vls vp,
const char *  s,
long  n
 

Referenced by db_diradd(), rt_dsp_import5(), rt_submodel_import5(), rt_vlist_import(), rt_vol_import5(), wdb_dir_check(), and wdb_dir_check5().

void bu_vls_strcat struct bu_vls vp,
const char *  s
 

Referenced by bn_pr_poly(), bn_tabdata_to_tcl(), bu_bitv_vls(), bu_brlcad_data(), bu_brlcad_root(), bu_get_all_keyword_values(), bu_get_value_by_keyword(), bu_key_eq_to_key_val(), bu_key_val_to_vls(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_shader_to_key_eq(), bu_shader_to_tcl_list(), bu_vls_from_argv(), bu_vls_printb(), bu_vls_printf(), db_comb_describe(), db_dircheck(), db_path_to_vls(), db_regexp_match_all(), db_tree_describe(), db_tree_flatten_describe(), rt_arb_describe(), rt_arbn_describe(), rt_ars_describe(), rt_binunif_describe(), rt_binunif_tclget(), rt_bot_describe(), rt_bot_tclget(), rt_cline_describe(), rt_cline_tclget(), rt_ebm_describe(), rt_ehy_describe(), rt_ell_describe(), rt_epa_describe(), rt_eto_describe(), rt_extrude_describe(), rt_extrude_tclget(), rt_get_timer(), rt_grp_describe(), rt_hf_describe(), rt_hf_import(), rt_hf_to_dsp(), rt_hlf_describe(), rt_metaball_describe(), rt_nmg_tclget(), rt_nurb_describe(), rt_part_describe(), rt_pg_describe(), rt_pipe_describe(), rt_pipe_tclget(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_partitions(), rt_pr_pt_vls(), rt_pr_tree_vls(), rt_regionfix(), rt_rhc_describe(), rt_rpc_describe(), rt_sketch_describe(), rt_sketch_tclget(), rt_submodel_describe(), rt_superell_describe(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_tgc_describe(), rt_tor_describe(), rt_vls_pipept(), rt_vol_describe(), rt_xxx_describe(), wdb_dir_check(), wdb_dir_check5(), wdb_do_list(), and wdb_match_cmd().

void bu_vls_strncat struct bu_vls vp,
const char *  s,
long  n
 

Referenced by bu_key_eq_to_key_val(), and bu_shader_to_tcl_list().

void bu_vls_vlscat struct bu_vls dest,
const struct bu_vls src
 

Referenced by bu_cmdhist_history(), bu_struct_parse(), bu_structparse(), bu_vls_item_print_core(), bu_vls_struct_item(), bu_vls_struct_print(), bu_vls_structprint(), bu_vls_vlscatzap(), db_do_anim(), rt_dsp_describe(), rt_ebm_describe(), rt_vol_describe(), wdb_dir_check(), and wdb_dir_check5().

void bu_vls_vlscatzap struct bu_vls dest,
struct bu_vls src
 

Referenced by bu_vls_detab().

void bu_vls_from_argv struct bu_vls vp,
int  argc,
const char *  argv[]
 

Referenced by db_parse_1anim(), and wdb_title_cmd().

int bu_argv_from_string char **  argv,
int  lim,
char *  lp
 

void bu_vls_fwrite FILE *  fp,
const struct bu_vls vp
 

B U _ V L S _ F W R I T E

Definition at line 567 of file vls.c.

References bu_bomb(), BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), perror(), status, bu_vls::vls_len, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by bu_cmdhist_history().

Here is the call graph for this function:

void bu_vls_write int  fd,
const struct bu_vls vp
 

B U _ V L S _ W R I T E

Definition at line 588 of file vls.c.

References bu_bomb(), BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), perror(), status, bu_vls::vls_len, bu_vls::vls_offset, and bu_vls::vls_str.

Here is the call graph for this function:

int bu_vls_read struct bu_vls vp,
int  fd
 

B U _ V L S _ R E A D

Read the remainder of a UNIX file onto the end of a vls.

Returns - nread number of characters read 0 if EOF encountered immediately -1 read error

Definition at line 622 of file vls.c.

References bu_bomb(), BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_extend(), bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Here is the call graph for this function:

int bu_vls_gets struct bu_vls vp,
FILE *  fp
 

Referenced by bn_table_read(), bu_association(), and rt_hf_import().

void bu_vls_putc struct bu_vls vp,
int  c
 

Referenced by bn_encode_mat(), bu_cmdhist_add(), bu_key_eq_to_key_val(), bu_key_val_to_vls(), bu_log_do_indent_level(), bu_open_mapped_file_with_path(), bu_shader_to_key_eq(), bu_shader_to_tcl_list(), bu_vls_detab(), bu_vls_gets(), db_do_anim(), db_path_to_vls(), rt_default_logoverlap(), rt_tcl_pr_cutter(), wdb_do_list(), wdb_vls_col_eol(), wdb_vls_col_item(), and wdb_vls_col_pr4v().

void bu_vls_trimspace struct bu_vls vp  ) 
 

B U _ V L S _ T R I M S P A C E

Remove leading and trailing white space from a vls string.

Definition at line 719 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_nibble(), bu_vls_strlen(), and bu_vls_trunc().

Here is the call graph for this function:

void bu_vls_printf struct bu_vls vls,
char *  fmt,
  ...
 

Referenced by bn_encode_hvect(), bn_encode_mat(), bn_encode_quat(), bn_encode_vect(), bn_math_cmd(), bn_tabdata_to_tcl(), bu_bitv_to_hex(), bu_bitv_vls(), bu_cmdhist_add(), bu_cmdhist_curr(), bu_cmdhist_history(), bu_cmdhist_next(), bu_cmdhist_prev(), bu_flog(), bu_log(), bu_observer_notify(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_tcl_hsv_to_rgb(), bu_tcl_rgb_to_hsv(), bu_tcl_units_conversion(), bu_vls_item_print_core(), bu_vls_matprint(), bu_vls_printb(), bu_vls_sprintf(), bu_vls_struct_item(), bu_vls_struct_print2(), cho_open_tcl(), curve_to_tcl_list(), db5_export_color_table(), db5_fwrite_ident(), db5_update_ident(), db_comb_describe(), db_create_inmem(), db_tree_describe(), db_tree_flatten_describe(), dgo_autoview_cmd(), dgo_build_dpp(), dgo_draw_cmd(), dgo_E_cmd(), dgo_erase_all_cmd(), dgo_erase_cmd(), dgo_eraseobjpath(), dgo_get_autoview_cmd(), dgo_get_eyemodel_cmd(), dgo_how_cmd(), dgo_nirt_cmd(), dgo_observer_cmd(), dgo_overlay_cmd(), dgo_pr_wait_status(), dgo_qray_cmd(), dgo_report_cmd(), dgo_rt_cmd(), dgo_set_outputHandler_cmd(), dgo_set_transparency_cmd(), dgo_set_uplotOutputMode_cmd(), dgo_shaded_mode_cmd(), dgo_vnirt_cmd(), dgo_who_cmd(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_vls_struct_counts(), rt_arb_calc_planes(), rt_arbn_tclget(), rt_ars_tclget(), rt_binunif_tclget(), rt_bot_tclget(), rt_cline_tclget(), rt_comb_export5(), rt_default_logoverlap(), rt_dsp_print(), rt_dsp_tclget(), rt_ebm_describe(), rt_ebm_tclget(), rt_extrude_tclget(), rt_get_timer(), rt_hf_describe(), rt_nmg_describe(), rt_nmg_tclget(), rt_nurb_describe(), rt_nurb_tclget(), rt_parsetab_tclget(), rt_pipe_tclget(), rt_pr_fallback_angle(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_pt_vls(), rt_pr_seg_vls(), rt_sketch_tclget(), rt_submodel_describe(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_tcl_rt_prep(), rt_tor_describe(), rt_vol_describe(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_eye_cmd(), vo_eye_pos_cmd(), vo_invSize_cmd(), vo_keypoint_cmd(), vo_local2base_cmd(), vo_lookat_cmd(), vo_m2vPoint_cmd(), vo_model2view_cmd(), vo_mrot_cmd(), vo_mrotPoint_cmd(), vo_observer_cmd(), vo_orientation_cmd(), vo_perspective_cmd(), vo_pmat_cmd(), vo_pmodel2view_cmd(), vo_pov_cmd(), vo_rmat_cmd(), vo_rot(), vo_rot_cmd(), vo_rotate_about_cmd(), vo_sca_cmd(), vo_setview_cmd(), vo_size_cmd(), vo_slew_cmd(), vo_tra_cmd(), vo_units_cmd(), vo_v2mPoint_cmd(), vo_view2model_cmd(), vo_viewDir_cmd(), vo_vrot_cmd(), vo_zoom_cmd(), wdb_adjust_cmd(), wdb_attr_cmd(), wdb_binary_cmd(), wdb_bot_decimate_cmd(), wdb_bot_face_sort_cmd(), wdb_cat_cmd(), wdb_color_cmd(), wdb_comb_cmd(), wdb_comb_std_cmd(), wdb_combadd(), wdb_concat_cmd(), wdb_copy_cmd(), wdb_copyeval_cmd(), wdb_dbip_cmd(), wdb_do_list(), wdb_dump_cmd(), wdb_dup_cmd(), wdb_expand_cmd(), wdb_facetize_cmd(), wdb_find_cmd(), wdb_form_cmd(), wdb_get_cmd(), wdb_get_type_cmd(), wdb_group_cmd(), wdb_hide_cmd(), wdb_importFg4Section_cmd(), wdb_instance_cmd(), wdb_keep_cmd(), wdb_kill_cmd(), wdb_killall_cmd(), wdb_killtree_cmd(), wdb_list_cmd(), wdb_ls_cmd(), wdb_lt_cmd(), wdb_make_bb_cmd(), wdb_make_name_cmd(), wdb_move_all_cmd(), wdb_move_arb_edge_cmd(), wdb_move_arb_face_cmd(), wdb_move_cmd(), wdb_nmg_collapse_cmd(), wdb_nmg_simplify_cmd(), wdb_observer_cmd(), wdb_ocenter_cmd(), wdb_orotate_cmd(), wdb_oscale_cmd(), wdb_otranslate_cmd(), wdb_pathlist_cmd(), wdb_pathsum_cmd(), wdb_prcolor_cmd(), wdb_push_cmd(), wdb_put_cmd(), wdb_region_cmd(), wdb_remove_cmd(), wdb_reopen_cmd(), wdb_rmap_cmd(), wdb_rotate_arb_face_cmd(), wdb_rt_gettrees_cmd(), wdb_shells_cmd(), wdb_showmats_cmd(), wdb_smooth_bot_cmd(), wdb_summary_cmd(), wdb_title_cmd(), wdb_tol_cmd(), wdb_track_cmd(), wdb_tree_cmd(), wdb_unhide_cmd(), wdb_units_cmd(), wdb_version_cmd(), wdb_vls_col_pr4v(), wdb_whatid_cmd(), wdb_which_cmd(), and wdb_xpush_cmd().

void bu_vls_sprintf struct bu_vls vls,
char *  fmt,
  ...
 

void bu_vls_spaces struct bu_vls vp,
int  cnt
 

Referenced by bu_log_indent_vls(), bu_vls_detab(), db_tree_describe(), and db_tree_flatten_describe().

int bu_vls_print_positions_used const struct bu_vls vp  ) 
 

B U _ V L S _ P R I N T _ P O S I T I O N S _ U S E D

Returns number of printed spaces used on final output line of a potentially multi-line vls. Useful for making decisions on when to line-wrap. Accounts for normal UNIX tab-expansion: 1 2 3 4 1234567890123456789012345678901234567890 x x x x

0-7 --> 8, 8-15 --> 16, 16-23 --> 24, etc.

Definition at line 1118 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), NULL, and start.

Here is the call graph for this function:

void bu_vls_detab struct bu_vls vp  ) 
 

B U _ V L S _ D E T A B

Given a vls, return a version of that string which has had all "tab" characters converted to the appropriate number of spaces according to the UNIX tab convention.

Definition at line 1147 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_extend(), bu_vls_free(), bu_vls_init(), bu_vls_putc(), bu_vls_spaces(), bu_vls_strlen(), and bu_vls_vlscatzap().

Here is the call graph for this function:

void bu_vls_prepend struct bu_vls vp,
char *  str
 

B U _ V L S _ P R E P E N D

Add a string to the begining of the vls.

Definition at line 1184 of file vls.c.

References bu_vls_extend(), bu_vls::vls_len, bu_vls::vls_offset, and bu_vls::vls_str.

Here is the call graph for this function:

void bu_vls_init register struct bu_vls vp  ) 
 

B U _ V L S _ I N I T

No storage should be allocated at this point, and bu_vls_addr() must be able to live with that.

Definition at line 84 of file vls.c.

References bu_bomb(), bu_log(), BU_VLS_MAGIC, and NULL.

Here is the call graph for this function:

void bu_vls_init_if_uninit register struct bu_vls vp  ) 
 

B U _ V L S _ I N I T _ I F _ U N I N I T

If a VLS is unitialized, initialize it. If it is already initialized, leave it alone, caller wants to append to it.

Definition at line 112 of file vls.c.

References bu_bomb(), bu_vls_init(), BU_VLS_MAGIC, and NULL.

Here is the call graph for this function:

char* bu_vls_addr register const struct bu_vls vp  ) 
 

B U _ V L S _ A D D R

Return a pointer to the null-terminated string in the vls array. If no storage has been allocated yet, give back a valid string.

Definition at line 146 of file vls.c.

References bu_bomb(), BU_CK_VLS, bu_log(), and NULL.

Here is the call graph for this function:

void bu_vls_extend register struct bu_vls vp,
unsigned int  extra
 

B U _ V L S _ E X T E N D

Definition at line 176 of file vls.c.

References BU_CK_VLS, bu_malloc(), and bu_realloc().

Here is the call graph for this function:

int bu_vls_strlen register const struct bu_vls vp  ) 
 

B U _ V L S _ S T R L E N

Return length of the string, in bytes, not including the null terminator.

Definition at line 221 of file vls.c.

References BU_CK_VLS.

void bu_vls_trunc register struct bu_vls vp,
int  len
 

B U _ V L S _ T R U N C

Truncate string to at most 'len' characters. If 'len' is negative, trim off that many from the end. If 'len' is zero, don't release storage -- user is probably just going to refill it again, e.g. with bu_vls_gets().

Definition at line 237 of file vls.c.

References BU_CK_VLS.

void bu_vls_trunc2 register struct bu_vls vp,
int  len
 

B U _ V L S _ T R U N C 2

Son of bu_vls_trunc. Same as bu_vls_trunc except that it doesn't take negative len.

Definition at line 254 of file vls.c.

References BU_CK_VLS.

void bu_vls_nibble register struct bu_vls vp,
int  len
 

B U _ V L S _ N I B B L E

"Nibble" 'len' characters off the front of the string. Changes the length and offset; no data is copied. 'len' may be positive or negative. If negative, characters are un-nibbled.

Definition at line 273 of file vls.c.

References BU_CK_VLS, and bu_vls_trunc().

Here is the call graph for this function:

void bu_vls_free register struct bu_vls vp  ) 
 

B U _ V L S _ F R E E

Releases the memory used for the string buffer.

Definition at line 291 of file vls.c.

References BU_CK_VLS, and bu_free().

Here is the call graph for this function:

void bu_vls_vlsfree register struct bu_vls vp  ) 
 

B U _ V L S _ V L S F R E E

Releases the memory used for the string buffer and the memory for the vls structure

Definition at line 309 of file vls.c.

References bu_free(), bu_vls_free(), and BU_VLS_MAGIC.

Here is the call graph for this function:

char* bu_vls_strdup register const struct bu_vls vp  ) 
 

B U _ V L S _ S T R D U P

Make an "ordinary" string copy of a vls string. Storage for the regular string is acquired using malloc. The source string is not affected.

Definition at line 325 of file vls.c.

References bu_malloc(), bu_vls_addr(), and bu_vls_strlen().

Here is the call graph for this function:

char* bu_vls_strgrab register struct bu_vls vp  ) 
 

B U _ V L S _ S T R G R A B

Like bu_vls_strdup(), but destructively grab the string from the source argument 'vp'. This is more efficient than bu_vls_strdup() for those instances where the source argument 'vp' is no longer needed by the caller, as it avoides a potentially long buffer copy.

The source string is destroyed, as if bu_vls_free() had been called.

Definition at line 348 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_free(), and bu_vls_strdup().

Here is the call graph for this function:

void bu_vls_strcpy register struct bu_vls vp,
const char *  s
 

B U _ V L S _ S T R C P Y

Empty the vls string, and copy in a regular string.

Definition at line 371 of file vls.c.

References bcopy, BU_CK_VLS, bu_vls_extend(), and NULL.

Here is the call graph for this function:

void bu_vls_strncpy register struct bu_vls vp,
const char *  s,
long int  n
 

B U _ V L S _ S T R N C P Y

Empty the vls string, and copy in a regular string, up to N bytes long.

Definition at line 396 of file vls.c.

References bcopy, BU_CK_VLS, bu_vls_extend(), and NULL.

Here is the call graph for this function:

void bu_vls_strcat register struct bu_vls vp,
const char *  s
 

B U _ V L S _ S T R C A T

Concatenate a new string onto the end of the existing vls string.

Definition at line 421 of file vls.c.

References bcopy, BU_CK_VLS, bu_vls_extend(), and NULL.

Here is the call graph for this function:

void bu_vls_strncat register struct bu_vls vp,
const char *  s,
long int  n
 

B U _ V L S _ S T R N C A T

Concatenate a new string onto the end of the existing vls string.

Definition at line 440 of file vls.c.

References bcopy, BU_CK_VLS, bu_vls_extend(), and NULL.

Here is the call graph for this function:

void bu_vls_vlscat register struct bu_vls dest,
register const struct bu_vls src
 

B U _ V L S _ V L S C A T

Concatenate a new vls string onto the end of an existing vls string. The storage of the source string is not affected.

Definition at line 463 of file vls.c.

References bcopy, BU_CK_VLS, and bu_vls_extend().

Here is the call graph for this function:

void bu_vls_vlscatzap register struct bu_vls dest,
register struct bu_vls src
 

V L S _ V L S C A T Z A P

Concatenate a new vls string onto the end of an existing vls string. The storage of the source string is released (zapped).

Definition at line 484 of file vls.c.

References BU_CK_VLS, bu_vls_trunc(), and bu_vls_vlscat().

Here is the call graph for this function:

void bu_vls_from_argv register struct bu_vls vp,
int  argc,
const char *  argv[]
 

B U _ V L S _ F R O M _ A R G V

Given and argc & argv pair, convert them into a vls string of space- separated words.

Definition at line 500 of file vls.c.

References BU_CK_VLS, and bu_vls_strcat().

Here is the call graph for this function:

int bu_argv_from_string char **  argv,
int  lim,
register char *  lp
 

B U _ A R G V _ F R O M _ S T R I N G

Build argv[] array from input buffer, by splitting whitespace separated "words" into null terminated strings. The input buffer is altered by this process. The argv[] array points into the input buffer. The input buffer should not be freed until argv has been freed or passes out of scope.

'lim' indicates the number of elements in the argv[] array.

Returns - 0 no words in input nwords number of words of input, now in argv[]

Built from rt_split_cmd(), but without the shell escape support.

Definition at line 528 of file vls.c.

int bu_vls_gets register struct bu_vls vp,
register FILE *  fp
 

B U _ V L S _ G E T S

Append a newline-terminated string from the file pointed to by "fp" to the end of the vls pointed to by "vp". The newline from the file is read, but not stored into the vls.

The most common error is to forget to bu_vls_trunc(vp,0) before reading the next line into the vls.

Returns - >=0 the length of the resulting vls -1 on EOF where no characters were added to the vls.

Definition at line 673 of file vls.c.

References BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_extend(), bu_vls_putc(), and bu_vls_strlen().

Here is the call graph for this function:

void bu_vls_putc register struct bu_vls vp,
int  c
 

B U _ V L S _ P U T C

Append the given character to the vls.

Definition at line 704 of file vls.c.

References BU_CK_VLS, and bu_vls_extend().

Here is the call graph for this function:

void bu_vls_printf struct bu_vls vls,
char *  fmt,
,
,
,
d  ,
,
,
,
,
,
 

Definition at line 1013 of file vls.c.

References bu_bomb(), BU_CK_VLS, bu_log(), and bu_vls_strcat().

Here is the call graph for this function:

void bu_vls_sprintf struct bu_vls vls,
char *  fmt,
,
,
,
d  ,
,
,
,
,
,
 

Definition at line 1079 of file vls.c.

References BU_CK_VLS, bu_vls_printf(), and bu_vls_trunc().

Here is the call graph for this function:

void bu_vls_spaces register struct bu_vls vp,
int  cnt
 

B U _ V L S _ S P A C E S

Efficiently append 'cnt' spaces to the current vls.

Definition at line 1094 of file vls.c.

References BU_CK_VLS, and bu_vls_extend().

Here is the call graph for this function:


Variable Documentation

int bu_setjmp_valid
 

!0 = bu_jmpbuf is valid

Definition at line 80 of file bomb.c.

Referenced by bu_bomb().

jmp_buf bu_jmpbuf
 

for BU_SETJMP()

Definition at line 81 of file bomb.c.

Referenced by bu_bomb().

const char bu_vls_message[] = "bu_vls_str"
 

Definition at line 74 of file vls.c.

Referenced by bu_prmem().

const char bu_strdup_message[]
 

Definition at line 113 of file malloc.c.

Referenced by bu_prmem().


Generated on Mon Sep 18 01:25:22 2006 for BRL-CAD by  doxygen 1.4.6