BRL-CAD
Variable-length Strings
Collaboration diagram for Variable-length Strings:

Files

file  vls.c
 Variable Length Strings.
 
file  vls_vprintf.c
 Variable Length Strings.
 
file  encode.c
 Routines to encode/decode strings into bu_vls structures.
 

Data Structures

struct  bu_vls
 

Macros

#define BU_VLS_NULL   ((struct bu_vls *)0)
 
#define BU_CK_VLS(_vp)   BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
 
#define BU_VLS_INIT(_vp)
 
#define BU_VLS_INIT_ZERO   { BU_VLS_MAGIC, NULL, 0, 0, 0 }
 
#define BU_VLS_IS_INITIALIZED(_vp)   (((struct bu_vls *)(_vp) != BU_VLS_NULL) && ((_vp)->vls_magic == BU_VLS_MAGIC))
 

Typedefs

typedef struct bu_vls bu_vls_t
 

Functions

void bu_vls_init (struct bu_vls *vp)
 
DEPRECATED void bu_vls_init_if_uninit (struct bu_vls *vp)
 
struct bu_vlsbu_vls_vlsinit (void)
 
char * bu_vls_addr (const struct bu_vls *vp)
 
const char * bu_vls_cstr (const struct bu_vls *vp)
 
void bu_vls_extend (struct bu_vls *vp, size_t extra)
 
void bu_vls_setlen (struct bu_vls *vp, size_t newlen)
 
size_t bu_vls_strlen (const struct bu_vls *vp)
 
void bu_vls_trunc (struct bu_vls *vp, int len)
 
void bu_vls_nibble (struct bu_vls *vp, off_t len)
 
void bu_vls_free (struct bu_vls *vp)
 
void bu_vls_vlsfree (struct bu_vls *vp)
 
char * bu_vls_strdup (const struct bu_vls *vp)
 
char * bu_vls_strgrab (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, size_t n)
 
void bu_vls_strcat (struct bu_vls *vp, const char *s)
 
void bu_vls_strncat (struct bu_vls *vp, const char *s, size_t 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)
 
int bu_vls_strcmp (struct bu_vls *s1, struct bu_vls *s2)
 
int bu_vls_strncmp (struct bu_vls *s1, struct bu_vls *s2, size_t n)
 
void bu_vls_from_argv (struct bu_vls *vp, int argc, const char *argv[])
 
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, const char *fmt,...) _BU_ATTR_PRINTF23
 
void bu_vls_sprintf (struct bu_vls *vls, const char *fmt,...) _BU_ATTR_PRINTF23
 
void bu_vls_spaces (struct bu_vls *vp, size_t cnt)
 
size_t 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_substr (struct bu_vls *dest, const struct bu_vls *src, size_t begin, size_t nchars)
 
void bu_vls_vprintf (struct bu_vls *vls, const char *fmt, va_list ap)
 
const char * bu_vls_encode (struct bu_vls *vp, const char *str)
 
const char * bu_vls_decode (struct bu_vls *vp, const char *str)
 

Detailed Description

Macro Definition Documentation

#define BU_VLS_NULL   ((struct bu_vls *)0)

Definition at line 64 of file vls.h.

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

assert the integrity of a bu_vls struct.

Definition at line 69 of file vls.h.

Referenced by air_setup(), bbd_setup(), bn_tabdata_to_tcl(), brdf_setup(), bu_avs_add_vls(), bu_bitv_to_binary(), bu_bitv_to_hex(), bu_bitv_vls(), bu_key_eq_to_key_val(), bu_shader_to_key_eq(), bu_shader_to_list(), bu_struct_parse(), bu_utctime(), bu_vls_addr(), bu_vls_decode(), bu_vls_detab(), bu_vls_encode(), 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_strcmp(), bu_vls_strcpy(), bu_vls_strdup(), bu_vls_strgrab(), bu_vls_strlen(), bu_vls_strncat(), bu_vls_strncmp(), bu_vls_strncpy(), bu_vls_struct_print(), bu_vls_substr(), bu_vls_trimspace(), bu_vls_trunc(), bu_vls_vlscat(), bu_vls_vlscatzap(), bu_vls_vprintf(), bu_vls_write(), cglass_setup(), cloud_setup(), cmirror_setup(), cook_setup(), db5_export_color_table(), db_fullpath_to_vls(), db_path_to_vls(), db_tree_describe(), db_tree_flatten_describe(), dsp_print_v4(), dsp_print_v5(), envmap_setup(), ext_setup(), fbm_setup(), fire_setup(), flat_setup(), gauss_setup(), glass_setup(), grass_setup(), lex_getone(), light_setup(), mirror_setup(), nmg_vls_struct_counts(), noise_setup(), osl_parse(), osl_setup(), phong_setup(), points_setup(), prj_setup(), rt_brep_describe(), rt_dsp_adjust(), rt_dsp_bbox(), rt_dsp_export4(), rt_dsp_norm(), rt_dsp_prep(), rt_dsp_print(), rt_dsp_shot(), rt_get_timer(), rt_hf_describe(), rt_obj_adjust(), rt_obj_describe(), rt_obj_get(), rt_pr_fallback_angle(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_pt_vls(), rt_pr_seg_vls(), rt_sketch_form(), rt_sketch_get(), rt_vlist_export(), rt_vlist_import(), rt_vls_color_map(), rtrans_setup(), scloud_setup(), setup(), sh_stk_setup(), spm_setup(), tcl_setup(), temp_setup(), tglass_setup(), tmirror_setup(), toon_setup(), toyota_setup(), tthrm_setup(), txt_setup(), wood_setup(), and xxx_setup().

#define BU_VLS_INIT (   _vp)
Value:
{ \
(_vp)->vls_magic = BU_VLS_MAGIC; \
(_vp)->vls_str = NULL; \
(_vp)->vls_offset = (_vp)->vls_len = (_vp)->vls_max = 0; \
}
#define BU_VLS_MAGIC
Definition: magic.h:65

initializes a bu_vls struct without allocating any memory.

Definition at line 74 of file vls.h.

Referenced by Cho_Init(), Dmo_Init(), mk_constraint(), rt_dsp_import5(), rt_revolve_make(), and rt_submodel_import5().

#define BU_VLS_INIT_ZERO   { BU_VLS_MAGIC, NULL, 0, 0, 0 }

macro suitable for declaration statement initialization of a bu_vls struct. does not allocate memory.

Definition at line 84 of file vls.h.

Referenced by _ged_bot_dump(), _ged_build_dpp(), _ged_editit(), _ged_find_matrix(), _ged_print_node(), _ged_run_rt(), _ged_run_rtwizard(), _path_scrub(), _rt_gettree_leaf(), analyze_arbn(), analyze_ars(), arb_edit(), arb_extrude(), arb_mirror_face_axis(), bn_math_cmd(), bn_pr_poly(), bn_table_read(), bot2vrml(), brep_command(), brep_to_nmg(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_brlcad_data(), bu_brlcad_root(), bu_cmdhist_add(), bu_cmdhist_history(), bu_exit(), bu_flog(), bu_hexstr_to_binstr(), bu_log(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_pr_vlb(), bu_printb(), bu_str_escape(), bu_str_true(), bu_struct_parse(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_vls_decode(), bu_vls_detab(), bu_vls_struct_print(), bu_vls_vprintf(), bu_vsscanf(), build_comb(), cap_ground(), cap_squared_ground(), cho_open_tcl(), comb_lift_region(), constraint_set(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_sync_attr_to_comb(), db5_sync_comb_to_attr(), db5_update_ident(), db_apply_state_from_comb(), db_create_inmem(), db_diradd(), db_diradd5(), db_do_anim(), db_open(), dm_bestXType_tcl(), dm_draw_scale(), Dm_Init(), dm_validXType_tcl(), dmo_bg_tcl(), dmo_bounds_tcl(), dmo_clearBufferAfter_tcl(), dmo_configure_tcl(), dmo_debug_tcl(), dmo_depthMask_tcl(), dmo_drawCenterDot_cmd(), dmo_drawDataAxes_tcl(), dmo_drawLine_tcl(), dmo_drawModelAxes_tcl(), dmo_drawPoint_tcl(), dmo_drawScale_cmd(), dmo_drawSList_tcl(), dmo_drawString_tcl(), dmo_drawViewAxes_tcl(), dmo_drawVList_tcl(), dmo_fg_tcl(), dmo_get_aspect_tcl(), dmo_getDrawLabelsHook_cmd(), dmo_light_tcl(), dmo_lineStyle_tcl(), dmo_lineWidth_tcl(), dmo_loadmat_tcl(), dmo_logfile_tcl(), dmo_observer_tcl(), dmo_open_tcl(), dmo_perspective_tcl(), dmo_setDrawLabelsHook_cmd(), dmo_size_tcl(), dmo_transparency_tcl(), dmo_zbuffer_tcl(), dmo_zclip_tcl(), edarb_facedef(), ext_setup(), f_attr(), f_depth(), f_objparam(), face_set_key(), fb_cmd_common_file_size(), fbo_getcursor_tcl(), fbo_getheight_tcl(), fbo_getsize_tcl(), fbo_getwidth_tcl(), fbo_listen_tcl(), fbo_open_tcl(), fbo_pixel_tcl(), fbs_open(), find_create(), find_reference(), ged_annotate(), ged_attr(), ged_bot_fuse(), ged_bot_split(), ged_coil(), ged_color(), ged_copymat(), ged_dbot_dump(), ged_decompose(), ged_draw_guts(), ged_eac(), ged_erase(), ged_exists(), ged_gdiff(), ged_getmat(), ged_glob(), ged_human(), ged_inside_internal(), ged_keep(), ged_make_name(), ged_make_pnts(), ged_mater(), ged_move(), ged_nirt(), ged_plot(), ged_prefix(), ged_preview(), ged_ps(), ged_red(), ged_remove(), ged_rtwizard(), ged_search(), ged_shells(), ged_tables(), ged_tire(), ged_title(), ged_vnirt(), get_diff_components(), GetMaterial(), go_draw_faceplate(), main(), make_coil(), make_hole(), make_hole_in_prepped_regions(), make_shape(), mk_comb(), mlib_setup(), move_all_func(), nmg_2_vrml(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_plot_fu(), nmg_plot_open_edges(), nmg_pr_struct_counts(), osl_parse(), parse_floating(), parse_list_elem(), plot_loadMatrix(), print_loopuse_tree(), print_path_with_bools(), print_subbrep_object(), prj_setup(), ps_loadMatrix(), redraw_edited_path(), rr_render(), rt_bot_export4(), rt_bot_export5(), rt_comb_export4(), rt_comb_export5(), rt_constraint_export5(), rt_default_logoverlap(), rt_dsp_describe(), rt_dsp_export4(), rt_dsp_import4(), rt_dsp_norm(), rt_dsp_print(), rt_ebm_describe(), rt_ebm_export4(), rt_ebm_export5(), rt_ebm_import4(), rt_ebm_import5(), rt_generic_get(), rt_hf_export4(), rt_hf_import4(), rt_metaball_tess(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_read_timer(), rt_regionfix(), rt_submodel_export4(), rt_submodel_export5(), rt_submodel_import4(), rt_submodel_import5(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_vol_describe(), rt_vol_export4(), rt_vol_export5(), rt_vol_import4(), rt_vol_import5(), sh_stk_dosetup(), show_help(), str2mm(), str2type(), subbrep_to_csg_conic(), subbrep_to_csg_cylinder(), summary_reports(), tables_new(), tcl_bu_get_value_by_keyword(), tcl_bu_hsv_to_rgb(), tcl_bu_rgb_to_hsv(), tcl_bu_units_conversion(), tclcad_auto_path(), test_encode(), test_vls(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_data_scale_mode(), to_edit_redraw(), to_idle_mode(), to_init_default_bindings(), to_more_args_func(), to_mouse_append_pt_common(), to_mouse_brep_selection_append(), to_mouse_brep_selection_translate(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_data_scale(), to_mouse_find_arb_edge(), to_mouse_find_bot_edge(), to_mouse_find_botpt(), to_mouse_find_metaballpt(), to_mouse_find_pipept(), to_mouse_joint_select(), to_mouse_joint_selection_translate(), to_mouse_move_arb_edge(), to_mouse_move_arb_face(), to_mouse_move_botpt(), to_mouse_move_botpts(), to_mouse_move_pt_common(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_poly_circ(), to_mouse_poly_cont(), to_mouse_poly_ell(), to_mouse_poly_rect(), to_mouse_protate(), to_mouse_pscale(), to_mouse_ptranslate(), to_mouse_rect(), to_mouse_rot(), to_mouse_rotate_arb_face(), to_mouse_scale(), to_mouse_trans(), to_move_arb_edge_mode(), to_move_arb_face_mode(), to_move_botpt_mode(), to_move_botpts_mode(), to_move_metaballpt_mode(), to_move_pipept_mode(), to_new_view(), to_orotate_mode(), to_oscale_mode(), to_otranslate_mode(), to_poly_circ_mode(), to_poly_cont_build(), to_poly_ell_mode(), to_poly_rect_mode(), to_protate_mode(), to_pscale_mode(), to_ptranslate_mode(), to_rect_mode(), to_rotate_arb_face_mode(), to_rotate_mode(), to_rt_end_callback_internal(), to_scale_mode(), to_translate_mode(), to_view_func_common(), to_vslew(), and write_comb().

#define BU_VLS_IS_INITIALIZED (   _vp)    (((struct bu_vls *)(_vp) != BU_VLS_NULL) && ((_vp)->vls_magic == BU_VLS_MAGIC))

returns truthfully whether a bu_vls struct has been initialized. is not reliable unless the struct has been allocated with BU_ALLOC(), bu_calloc(), or a previous call to bu_vls_init() or BU_VLS_INIT() has been made.

Definition at line 92 of file vls.h.

Referenced by rt_dsp_describe(), rt_dsp_export4(), rt_dsp_ifree(), rt_dsp_import4(), rt_dsp_print(), rt_revolve_ifree(), and temp_close_files().

Typedef Documentation

typedef struct bu_vls bu_vls_t

Definition at line 63 of file vls.h.

Function Documentation

void bu_vls_init ( struct bu_vls vp)

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

Definition at line 56 of file vls.c.

References bu_bomb(), bu_log(), BU_VLS_MAGIC, UNLIKELY, bu_vls::vls_len, bu_vls::vls_magic, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by bbd_setup(), bu_units_strings_vls(), bu_vls_init_if_uninit(), bu_vls_vlsinit(), build_comb(), cho_open(), cmdhist_record(), comb_flatten(), comb_lift_region(), comb_wrap(), db5_standardize_attribute(), db_parse_1anim(), dl_addToDisplay(), dm_get(), dm_list_types(), dmo_open_tcl(), fbo_open_tcl(), ged_brep(), ged_cc(), ged_clone(), ged_coil(), ged_concat(), ged_init(), ged_rmap(), ged_which(), main(), mk_dsp(), mk_submodel(), observer_attach(), plot_chull(), plot_obr(), plot_open(), ps_open(), qray_init(), rt_comb_make(), rt_dsp_import5(), rt_dsp_make(), rt_hf_to_dsp(), rt_joint_import5(), rt_revolve_import5(), rt_revolve_xform(), subbrep_object_init(), temp_add_to_list(), to_bot_edge_split(), to_bot_face_split(), to_mouse_oscale(), to_new_view(), to_open_tcl(), to_prim_label(), txt_setup(), vo_ae2dir_cmd(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_dir2ae_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_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(), and wdb_init().

Here is the call graph for this function:

DEPRECATED void bu_vls_init_if_uninit ( struct bu_vls vp)

DEPRECATED: use if (!vls) bu_vls_init(vls)

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

Definition at line 77 of file vls.c.

References bu_bomb(), bu_log(), bu_vls_init(), BU_VLS_MAGIC, UNLIKELY, and bu_vls::vls_magic.

Here is the call graph for this function:

struct bu_vls* bu_vls_vlsinit ( void  )

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 91 of file vls.c.

References BU_ALLOC, and bu_vls_init().

Referenced by create_boxes(), dump_bitv(), ged_lc(), and ged_putmat().

Here is the call graph for this function:

char* bu_vls_addr ( const struct bu_vls vp)

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 111 of file vls.c.

References bu_bomb(), BU_CK_VLS, bu_log(), bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by _dl_eraseAllNamesFromDisplay(), _dl_eraseAllPathsFromDisplay(), _ged_bot_dump(), _ged_build_dpp(), _ged_editit(), _ged_find_matrix(), _ged_run_rt(), _ged_run_rtwizard(), _ged_search_characterize_path(), _path_scrub(), _rt_gettree_leaf(), air_setup(), analyze_arbn(), analyze_ars(), bn_math_cmd(), bn_pr_poly(), bn_table_read(), bot2vrml(), brep_command(), brep_to_nmg(), bu_avs_add_vls(), bu_brlcad_data(), bu_brlcad_root(), bu_cmdhist_history(), bu_exit(), bu_flog(), bu_log(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_pr_vlb(), bu_printb(), bu_str_true(), bu_struct_parse(), bu_struct_print(), bu_structparse_argv(), bu_vls_cstr(), bu_vls_decode(), bu_vls_detab(), bu_vls_encode(), bu_vls_print_positions_used(), bu_vls_strdup(), bu_vls_strgrab(), bu_vls_struct_print(), bu_vls_struct_print2(), bu_vls_trimspace(), bu_vls_vprintf(), bu_vsscanf(), build_comb(), cap_ground(), cap_squared_ground(), cho_cmd(), cho_open(), cho_open_tcl(), cmdhist_record(), comb_flatten(), comb_lift_region(), comb_wrap(), constraint_set(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_standardize_attribute(), db5_sync_attr_to_comb(), db5_sync_comb_to_attr(), db5_update_ident(), db_apply_state_from_comb(), db_comb_describe(), db_create_inmem(), db_diradd(), db_diradd5(), db_dircheck(), db_open(), db_update_nref(), dl_addToDisplay(), dl_erasePathFromDisplay(), dm_bestXType_tcl(), dm_draw_scale(), Dm_Init(), dm_list_tcl(), dm_list_types(), dm_validXType_tcl(), dmo_bg_tcl(), dmo_bounds_tcl(), dmo_clearBufferAfter_tcl(), dmo_configure_tcl(), dmo_debug_tcl(), dmo_depthMask_tcl(), dmo_drawCenterDot_cmd(), dmo_drawDataAxes_tcl(), dmo_drawLine_tcl(), dmo_drawModelAxes_tcl(), dmo_drawPoint_tcl(), dmo_drawScale_cmd(), dmo_drawSList_tcl(), dmo_drawString_tcl(), dmo_drawViewAxes_tcl(), dmo_drawVList_tcl(), dmo_fg_tcl(), dmo_get_aspect_tcl(), dmo_getDrawLabelsHook_cmd(), dmo_light_tcl(), dmo_lineStyle_tcl(), dmo_lineWidth_tcl(), dmo_loadmat_tcl(), dmo_logfile_tcl(), dmo_observer_tcl(), dmo_open_tcl(), dmo_perspective_tcl(), dmo_setDrawLabelsHook_cmd(), dmo_size_tcl(), dmo_transparency_tcl(), dmo_zbuffer_tcl(), dmo_zclip_tcl(), dsp_get_data(), dsp_print_v4(), dsp_print_v5(), edarb_facedef(), ext_setup(), f_attr(), f_depth(), f_objparam(), face_set_key(), fb_cmd_common_file_size(), fbo_close_tcl(), fbo_getcursor_tcl(), fbo_getheight_tcl(), fbo_getsize_tcl(), fbo_getwidth_tcl(), fbo_listen_tcl(), fbo_open_tcl(), fbo_pixel_tcl(), fbs_open(), find_create(), ged_annotate(), ged_attr(), ged_bot_fuse(), ged_bot_split(), ged_brep(), ged_build_tops(), ged_clone(), ged_color(), ged_concat(), ged_copymat(), ged_dbot_dump(), ged_decompose(), ged_draw_guts(), ged_dup(), ged_eac(), ged_erase(), ged_exists(), ged_gdiff(), ged_get_comb(), ged_getmat(), ged_glob(), ged_human(), ged_inside_internal(), ged_keep(), ged_ls(), ged_make(), ged_make_name(), ged_make_pnts(), ged_mater(), ged_move(), ged_nirt(), ged_plot(), ged_prefix(), ged_preview(), ged_ps(), ged_putmat(), ged_qray(), ged_red(), ged_redraw(), ged_remove(), ged_rmap(), ged_rtwizard(), ged_saveview(), ged_search(), ged_shader(), ged_shells(), ged_tables(), ged_tire(), ged_title(), ged_tree(), ged_units(), ged_vnirt(), ged_which(), ged_which_shader(), ged_who(), ged_wmater(), get_diff_components(), get_file_data(), get_obj_data(), go_draw_faceplate(), go_draw_other(), highest_order_face(), img_load_datasource(), lex_getone(), main(), make_coil(), make_hole(), make_hole_in_prepped_regions(), make_shape(), mk_comb(), mk_unique_brlcad_name(), mlib_setup(), move_all_func(), new_image(), nmg_2_vrml(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_plot_fu(), nmg_plot_open_edges(), nmg_pr_struct_counts(), node_write(), noise_setup(), observer_attach(), observer_detach(), observer_show(), osl_parse(), parse_floating(), plot_chull(), plot_loadMatrix(), plot_obr(), plot_open(), print_loopuse_tree(), print_path_with_bools(), print_subbrep_object(), prj_setup(), ps_loadMatrix(), ps_open(), redraw_edited_path(), rr_render(), rt_bot_export4(), rt_bot_export5(), rt_comb_export4(), rt_comb_get(), rt_constraint_export5(), rt_default_logoverlap(), rt_dsp_bbox(), rt_dsp_export4(), rt_dsp_export5(), rt_dsp_import4(), rt_dsp_norm(), rt_dsp_plot(), rt_dsp_prep(), rt_dsp_print(), rt_dsp_tess(), rt_ebm_export4(), rt_ebm_export5(), rt_generic_get(), rt_hf_export4(), rt_hf_import4(), rt_joint_describe(), rt_joint_export5(), rt_joint_prep(), rt_metaball_tess(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_read_timer(), rt_regionfix(), rt_revolve_export5(), rt_revolve_prep(), rt_submodel_describe(), rt_submodel_export4(), rt_submodel_export5(), rt_submodel_plot(), rt_submodel_prep(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_vlist_export(), rt_vol_export4(), rt_vol_export5(), setup(), sh_stk_dosetup(), sh_stk_setup(), show_help(), str2mm(), str2type(), subbrep_make_brep(), subbrep_split(), subbrep_to_csg_conic(), subbrep_to_csg_cylinder(), summary_reports(), tables_new(), tcl_bu_get_value_by_keyword(), tcl_bu_hsv_to_rgb(), tcl_bu_rgb_to_hsv(), tcl_bu_units_conversion(), tcl_render(), tclcad_auto_path(), temp_close_files(), test_encode(), test_vls(), to_autoview(), to_autoview_func(), to_autoview_view(), to_bg(), to_bot_edge_split(), to_bot_face_split(), to_bounds(), to_cmd(), to_configure(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_data_arrows(), to_data_axes(), to_data_labels(), to_data_lines(), to_data_move(), to_data_move_object_mode(), to_data_move_point_mode(), to_data_pick(), to_data_polygons(), to_data_scale(), to_data_scale_mode(), to_data_vZ(), to_delete_view(), to_dm_func(), to_edit_motion_delta_callback(), to_edit_redraw(), to_faceplate(), to_fontsize(), to_get_prev_mouse(), to_handle_refresh(), to_hide_view(), to_idle_mode(), to_init_default_bindings(), to_init_view_bindings(), to_is_viewable(), to_light(), to_list_views(), to_listen(), to_model_axes(), to_more_args_callback(), to_more_args_func(), to_mouse_append_pt_common(), to_mouse_brep_selection_append(), to_mouse_brep_selection_translate(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_data_scale(), to_mouse_find_arb_edge(), to_mouse_find_bot_edge(), to_mouse_find_botpt(), to_mouse_find_metaballpt(), to_mouse_find_pipept(), to_mouse_joint_select(), to_mouse_joint_selection_translate(), to_mouse_move_arb_edge(), to_mouse_move_arb_face(), to_mouse_move_botpt(), to_mouse_move_botpts(), to_mouse_move_pt_common(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_poly_circ(), to_mouse_poly_cont(), to_mouse_poly_ell(), to_mouse_poly_rect(), to_mouse_protate(), to_mouse_pscale(), to_mouse_ptranslate(), to_mouse_rect(), to_mouse_rot(), to_mouse_rotate_arb_face(), to_mouse_scale(), to_mouse_trans(), to_move_arb_edge_mode(), to_move_arb_face_mode(), to_move_botpt_mode(), to_move_botpts_mode(), to_move_metaballpt_mode(), to_move_pipept_mode(), to_new_view(), to_open_tcl(), to_orotate_mode(), to_oscale_mode(), to_otranslate_mode(), to_paint_rect_area(), to_poly_circ_mode(), to_poly_cont_build(), to_poly_cont_build_end(), to_poly_ell_mode(), to_poly_rect_mode(), to_protate_mode(), to_pscale_mode(), to_ptranslate_mode(), to_rect_mode(), to_rotate_arb_face_mode(), to_rotate_mode(), to_rt_end_callback(), to_rt_end_callback_internal(), to_scale_mode(), to_screen2model(), to_screen2view(), to_set_coord(), to_set_fb_mode(), to_snap_view(), to_translate_mode(), to_transparency(), to_view2screen(), to_view_axes(), to_view_callback(), to_view_func_common(), to_view_win_size(), to_vmake(), to_vslew(), to_zbuffer(), to_zclip(), tree_list_needspace(), tthrm_setup(), txt_load_datasource(), txt_render(), txt_setup(), vo_ae2dir_cmd(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_dir2ae_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_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(), and write_comb().

Here is the call graph for this function:

const char* bu_vls_cstr ( const struct bu_vls vp)

Return a pointer to the null-terminated string in the vls array. If no storage has been allocated yet, give back a valid string. (At the moment this function is a mnemonically-named convenience function which returns a call to bu_vls_addr.)

Definition at line 103 of file vls.c.

References bu_vls_addr().

Referenced by bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_hexstr_to_binstr(), bu_vls_substr(), dump_bitv(), find_reference(), redraw_edited_path(), rt_joint_process_selection(), and to_mouse_joint_selection_translate().

Here is the call graph for this function:

void bu_vls_extend ( struct bu_vls vp,
size_t  extra 
)

Ensure that the provided VLS has at least 'extra' characters of space available. Additional space is allocated in minimum step sized amounts and may allocate more than requested.

Definition at line 136 of file vls.c.

References BU_CK_VLS, bu_malloc(), bu_realloc(), bu_vls_message, bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by bn_pr_poly(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_bitv_to_binary(), bu_bitv_to_hex(), bu_hexstr_to_binstr(), bu_vls_detab(), bu_vls_prepend(), bu_vls_putc(), bu_vls_read(), bu_vls_setlen(), bu_vls_spaces(), bu_vls_strcat(), bu_vls_strcmp(), bu_vls_strcpy(), bu_vls_strncat(), bu_vls_strncmp(), bu_vls_strncpy(), bu_vls_struct_print(), bu_vls_substr(), bu_vls_vlscat(), bu_vls_vprintf(), parse_vls_print_floating(), random_hex_or_binary_string(), and rt_default_logoverlap().

Here is the call graph for this function:

void bu_vls_setlen ( struct bu_vls vp,
size_t  newlen 
)

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 176 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:

size_t bu_vls_strlen ( const struct bu_vls vp)

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

Definition at line 189 of file vls.c.

References BU_CK_VLS, and bu_vls::vls_len.

Referenced by _ged_editit(), _ged_find_matrix(), _ged_search_characterize_path(), bmp_render(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_flog(), bu_hexstr_to_binstr(), bu_log(), bu_observer_notify(), bu_shader_to_key_eq(), bu_shader_to_list(), bu_vls_decode(), bu_vls_detab(), bu_vls_encode(), bu_vls_gets(), bu_vls_strdup(), bu_vls_trimspace(), bu_vls_vprintf(), bu_vsscanf(), build_comb(), bwtxt_render(), db5_sync_attr_to_comb(), db5_sync_comb_to_attr(), db_apply_state_from_comb(), db_comb_describe(), db_update_nref(), f_depth(), fb_cmd_common_file_size(), find_create(), ged_concat(), ged_decompose(), ged_dup(), ged_exists(), ged_make_pnts(), ged_mater(), ged_nirt(), ged_red(), ged_tire(), ged_wmater(), make_hole(), make_hole_in_prepped_regions(), mk_unique_brlcad_name(), prj_setup(), rt_bot_export4(), rt_bot_export5(), rt_comb_export4(), rt_comb_export5(), rt_comb_get(), rt_constraint_export5(), rt_dsp_export5(), rt_ebm_export5(), rt_joint_export5(), rt_joint_import5(), rt_read_timer(), rt_revolve_export5(), rt_submodel_export5(), rt_submodel_import4(), rt_submodel_import5(), rt_submodel_plot(), rt_submodel_prep(), rt_vol_export5(), test_encode(), test_vls(), to_autoview_view(), to_copy(), to_idle_mode(), to_more_args_func(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_rot(), to_mouse_scale(), to_mouse_trans(), to_rt_end_callback_internal(), to_view_func_common(), to_vslew(), tree_list_needspace(), txt_render(), and txt_setup().

void bu_vls_trunc ( struct bu_vls vp,
int  len 
)

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 198 of file vls.c.

References BU_CK_VLS, bu_vls::vls_len, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by _ged_append_pipept_common(), _ged_find_matrix(), brep_command(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_bitv_to_binary(), bu_cmdhist_history(), bu_hexstr_to_binstr(), bu_observer_notify(), bu_shader_to_list(), bu_structparse_argv(), bu_units_strings_vls(), bu_vls_nibble(), bu_vls_sprintf(), bu_vls_substr(), bu_vls_trimspace(), bu_vls_vlscatzap(), bu_vls_vprintf(), bu_vsscanf(), build_comb(), cap_ground(), comb_flatten(), db5_sync_attr_to_comb(), dm_list_types(), ged_3ptarb(), ged_adc(), ged_add_metaballpt(), ged_adjust(), ged_ae2dir(), ged_aet(), ged_analyze(), ged_annotate(), ged_arb(), ged_arced(), ged_arot_args(), ged_attr(), ged_autoview(), ged_bb(), ged_bev(), ged_blast(), ged_bo(), ged_bot(), ged_bot_condense(), ged_bot_decimate(), ged_bot_dump(), ged_bot_edge_split(), ged_bot_face_fuse(), ged_bot_face_sort(), ged_bot_face_split(), ged_bot_flip(), ged_bot_fuse(), ged_bot_merge(), ged_bot_smooth(), ged_bot_split(), ged_bot_sync(), ged_bot_vertex_fuse(), ged_brep(), ged_cat(), ged_cc(), ged_center(), ged_clone(), ged_coil(), ged_color(), ged_comb(), ged_comb_color(), ged_comb_std(), ged_combmem(), ged_concat(), ged_constraint(), ged_copy(), ged_copyeval(), ged_copymat(), ged_cpi(), ged_dbcopy(), ged_dbip(), ged_dbot_dump(), ged_debugbu(), ged_debugdir(), ged_debuglib(), ged_debugmem(), ged_debugnmg(), ged_decompose(), ged_delay(), ged_delete_metaballpt(), ged_delete_pipept(), ged_dir2ae(), ged_draw_guts(), ged_dump(), ged_dup(), ged_E(), ged_eac(), ged_echo(), ged_edarb(), ged_edcodes(), ged_edcolor(), ged_edcomb(), ged_edit(), ged_edmater(), ged_erase(), ged_exists(), ged_expand(), ged_eye(), ged_eye_pos(), ged_facetize(), ged_fb2pix(), ged_fbclear(), ged_find(), ged_find_arb_edge_nearest_pt(), ged_find_bot_edge_nearest_pt(), ged_find_botpt_nearest_pt(), ged_find_metaballpt_nearest_pt(), ged_find_pipept_nearest_pt(), ged_form(), ged_fracture(), ged_gdiff(), ged_get(), ged_get_autoview(), ged_get_bot_edges(), ged_get_comb(), ged_get_eyemodel(), ged_get_type(), ged_getmat(), ged_glob(), ged_gqa(), ged_graph(), ged_grid(), ged_grid2model_lu(), ged_grid2view_lu(), ged_group(), ged_hide(), ged_how(), ged_illum(), ged_importFg4Section(), ged_in(), ged_inside(), ged_inside_internal(), ged_instance(), ged_isize(), ged_item(), ged_joint(), ged_joint2(), ged_keep(), ged_keypoint(), ged_kill(), ged_killall(), ged_killrefs(), ged_killtree(), ged_label(), ged_lc(), ged_list(), ged_loadview(), ged_lod(), ged_log(), ged_lookat(), ged_ls(), ged_lt(), ged_m2v_point(), ged_make(), ged_make_name(), ged_make_pnts(), ged_match(), ged_mater(), ged_memprint(), ged_mirror(), ged_model2grid_lu(), ged_model2view(), ged_model2view_lu(), ged_move(), ged_move_all(), ged_move_arb_edge(), ged_move_arb_face(), ged_move_botpt(), ged_move_botpts(), ged_move_metaballpt(), ged_move_pipept(), ged_mrot(), ged_nirt(), ged_nmg_collapse(), ged_nmg_simplify(), ged_ocenter(), ged_orient(), ged_orotate(), ged_oscale(), ged_otranslate(), ged_overlay(), ged_pathlist(), ged_perspective(), ged_pix2fb(), ged_plot(), ged_pmat(), ged_pmodel2view(), ged_png(), ged_polybinout(), ged_pov(), ged_prcolor(), ged_prefix(), ged_preview(), ged_protate(), ged_ps(), ged_pscale(), ged_pset(), ged_ptranslate(), ged_pull(), ged_push(), ged_put(), ged_put_comb(), ged_putmat(), ged_qray(), ged_quat(), ged_qvrot(), ged_rcodes(), ged_rect(), ged_red(), ged_redraw(), ged_regdef(), ged_region(), ged_remove(), ged_reopen(), ged_report(), ged_rfarb(), ged_rmap(), ged_rmat(), ged_rmater(), ged_rot_args(), ged_rot_point(), ged_rotate_about(), ged_rotate_arb_face(), ged_rrt(), ged_rselect(), ged_rt(), ged_rtabort(), ged_rtcheck(), ged_rtwizard(), ged_savekey(), ged_saveview(), ged_scale_args(), ged_screen_grab(), ged_search(), ged_select(), ged_set_output_script(), ged_set_transparency(), ged_set_uplotOutputMode(), ged_setview(), ged_shaded_mode(), ged_shader(), ged_shells(), ged_showmats(), ged_size(), ged_slew(), ged_solids_on_ray(), ged_sphgroup(), ged_summary(), ged_sync(), ged_tables(), ged_tire(), ged_title(), ged_tol(), ged_tops(), ged_tra_args(), ged_track(), ged_tree(), ged_unhide(), ged_units(), ged_v2m_point(), ged_version(), ged_view2grid_lu(), ged_view2model(), ged_view2model_lu(), ged_view2model_vec(), ged_view_func(), ged_viewdir(), ged_vnirt(), ged_voxelize(), ged_vrot(), ged_wcodes(), ged_whatid(), ged_which(), ged_which_shader(), ged_who(), ged_wmater(), ged_xpush(), ged_ypr(), ged_zap(), ged_zoom(), get_diff_components(), main(), make_coil(), make_hole(), make_hole_in_prepped_regions(), mk_unique_brlcad_name(), mlib_setup(), random_hex_or_binary_string(), rt_comb_adjust(), rt_comb_export5(), rt_dsp_import4(), rt_ebm_describe(), rt_generic_get(), rt_regionfix(), rt_vol_describe(), tcl_bu_get_value_by_keyword(), to_autoview(), to_base2local(), to_bg(), to_bot_edge_split(), to_bot_face_split(), to_bounds(), to_configure(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_data_arrows(), to_data_axes(), to_data_labels(), to_data_lines(), to_data_move(), to_data_move_object_mode(), to_data_move_point_mode(), to_data_pick(), to_data_polygons(), to_data_scale(), to_data_scale_mode(), to_data_vZ(), to_delete_view(), to_dlist_on(), to_dm_func(), to_edit_motion_delta_callback(), to_faceplate(), to_fontsize(), to_get_prev_mouse(), to_handle_expose(), to_hide_view(), to_idle_mode(), to_init_view_bindings(), to_light(), to_list_views(), to_listen(), to_local2base(), to_model_axes(), to_more_args_callback(), to_more_args_func(), to_mouse_append_pt_common(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_find_arb_edge(), to_mouse_find_bot_edge(), to_mouse_find_botpt(), to_mouse_find_metaballpt(), to_mouse_find_pipept(), to_mouse_move_arb_edge(), to_mouse_move_arb_face(), to_mouse_move_botpt(), to_mouse_move_botpts(), to_mouse_move_pt_common(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_poly_circ(), to_mouse_poly_cont(), to_mouse_poly_ell(), to_mouse_poly_rect(), to_mouse_protate(), to_mouse_pscale(), to_mouse_ptranslate(), to_mouse_rect(), to_mouse_rot(), to_mouse_rotate_arb_face(), to_mouse_trans(), to_move_arb_edge_mode(), to_move_arb_face_mode(), to_move_botpt_mode(), to_move_botpts_mode(), to_move_metaballpt_mode(), to_move_pipept_mode(), to_new_view(), to_orotate_mode(), to_oscale_mode(), to_otranslate_mode(), to_paint_rect_area(), to_poly_circ_mode(), to_poly_cont_build(), to_poly_cont_build_end(), to_poly_ell_mode(), to_poly_rect_mode(), to_prim_label(), to_protate_mode(), to_pscale_mode(), to_ptranslate_mode(), to_rect_mode(), to_redraw(), to_refresh(), to_refresh_on(), to_rotate_arb_face_mode(), to_rotate_mode(), to_rt_end_callback(), to_rt_gettrees(), to_scale_mode(), to_screen2model(), to_screen2view(), to_set_coord(), to_set_fb_mode(), to_snap_view(), to_translate_mode(), to_transparency(), to_view2screen(), to_view_axes(), to_view_callback(), to_view_func_common(), to_view_win_size(), to_vmake(), to_vslew(), to_zbuffer(), to_zclip(), and write_comb().

void bu_vls_nibble ( struct bu_vls vp,
off_t  len 
)

"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 217 of file vls.c.

References BU_CK_VLS, bu_vls_trunc(), bu_vls::vls_len, and bu_vls::vls_offset.

Referenced by _ged_search_characterize_path(), brep_command(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_hexstr_to_binstr(), bu_vls_trimspace(), and get_token().

Here is the call graph for this function:

void bu_vls_free ( struct bu_vls vp)

Releases the memory used for the string buffer.

Definition at line 248 of file vls.c.

References BU_CK_VLS, bu_free(), bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by _dl_eraseFirstSubpath(), _dl_freeDisplayListItem(), _ged_bot_dump(), _ged_build_dpp(), _ged_editit(), _ged_find_matrix(), _ged_print_node(), _ged_run_rt(), _ged_run_rtwizard(), _path_scrub(), _rt_gettree_leaf(), analyze_arbn(), analyze_ars(), arb_edit(), arb_extrude(), arb_mirror_face_axis(), bn_math_cmd(), bn_pr_poly(), bn_table_read(), bot2vrml(), brep_command(), brep_to_nmg(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_brlcad_data(), bu_brlcad_root(), bu_cmdhist_add(), bu_exit(), bu_flog(), bu_hexstr_to_binstr(), bu_log(), bu_observer_free(), bu_observer_notify(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_pr_vlb(), bu_printb(), bu_str_true(), bu_struct_parse(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_vls_decode(), bu_vls_detab(), bu_vls_strgrab(), bu_vls_struct_print(), bu_vls_vlsfree(), bu_vls_vprintf(), build_comb(), cap_ground(), cap_squared_ground(), cho_deleteProc(), cho_open_tcl(), comb_flatten(), comb_lift_region(), comb_wrap(), constraint_set(), db5_diradd(), db5_fwrite_ident(), db5_put_color_table(), db5_standardize_attribute(), db5_sync_attr_to_comb(), db5_sync_comb_to_attr(), db5_update_ident(), db_apply_state_from_comb(), db_create_inmem(), db_diradd(), db_diradd5(), db_free_1anim(), db_open(), dl_erasePathFromDisplay(), dl_zap(), dm_bestXType_tcl(), dm_draw_scale(), Dm_Init(), dm_list_tcl(), dm_put(), dm_validXType_tcl(), dmo_bg_tcl(), dmo_bounds_tcl(), dmo_clearBufferAfter_tcl(), dmo_configure_tcl(), dmo_debug_tcl(), dmo_deleteProc(), dmo_depthMask_tcl(), dmo_drawCenterDot_cmd(), dmo_drawDataAxes_tcl(), dmo_drawLine_tcl(), dmo_drawModelAxes_tcl(), dmo_drawPoint_tcl(), dmo_drawScale_cmd(), dmo_drawSList_tcl(), dmo_drawString_tcl(), dmo_drawViewAxes_tcl(), dmo_drawVList_tcl(), dmo_fg_tcl(), dmo_get_aspect_tcl(), dmo_getDrawLabelsHook_cmd(), dmo_light_tcl(), dmo_lineStyle_tcl(), dmo_lineWidth_tcl(), dmo_loadmat_tcl(), dmo_logfile_tcl(), dmo_observer_tcl(), dmo_open_tcl(), dmo_perspective_tcl(), dmo_setDrawLabelsHook_cmd(), dmo_size_tcl(), dmo_transparency_tcl(), dmo_zbuffer_tcl(), dmo_zclip_tcl(), dump_bitv(), edarb_facedef(), ext_setup(), f_attr(), f_depth(), f_objparam(), face_set_key(), fb_cmd_common_file_size(), fbo_deleteProc(), fbo_getcursor_tcl(), fbo_getheight_tcl(), fbo_getsize_tcl(), fbo_getwidth_tcl(), fbo_listen_tcl(), fbo_open_tcl(), fbo_pixel_tcl(), fbs_open(), find_create(), find_reference(), ged_annotate(), ged_attr(), ged_bot_fuse(), ged_bot_split(), ged_brep(), ged_clone(), ged_coil(), ged_color(), ged_concat(), ged_copymat(), ged_dbot_dump(), ged_decompose(), ged_draw_guts(), ged_eac(), ged_erase(), ged_exists(), ged_free(), ged_getmat(), ged_glob(), ged_human(), ged_inside_internal(), ged_keep(), ged_make_name(), ged_make_pnts(), ged_mater(), ged_move(), ged_nirt(), ged_plot(), ged_prefix(), ged_preview(), ged_ps(), ged_red(), ged_remove(), ged_rmap(), ged_rmater(), ged_rtwizard(), ged_search(), ged_shader(), ged_shells(), ged_tables(), ged_tire(), ged_title(), ged_units(), ged_vnirt(), ged_which(), get_diff_components(), get_token(), GetMaterial(), go_draw_faceplate(), main(), make_coil(), make_hole(), make_hole_in_prepped_regions(), make_shape(), mk_comb(), mlib_setup(), move_all_func(), nmg_2_vrml(), nmg_plot_fu(), nmg_plot_open_edges(), nmg_pr_struct_counts(), observer_detach(), osl_parse(), parse_floating(), parse_list_elem(), plot_chull(), plot_close(), plot_loadMatrix(), plot_obr(), print_loopuse_tree(), print_subbrep_object(), prj_setup(), ps_close(), ps_loadMatrix(), qray_free(), redraw_edited_path(), rr_render(), rt_bot_export4(), rt_bot_export5(), rt_comb_export4(), rt_comb_export5(), rt_comb_import4(), rt_constraint_export5(), rt_constraint_ifree(), rt_default_logoverlap(), rt_dsp_describe(), rt_dsp_export4(), rt_dsp_ifree(), rt_dsp_import4(), rt_dsp_norm(), rt_dsp_print(), rt_ebm_describe(), rt_ebm_export4(), rt_ebm_export5(), rt_ebm_import4(), rt_ebm_import5(), rt_generic_get(), rt_hf_export4(), rt_hf_import4(), rt_pr_hit(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_regionfix(), rt_revolve_ifree(), rt_submodel_export4(), rt_submodel_export5(), rt_submodel_ifree(), rt_submodel_import4(), rt_submodel_import5(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_vol_describe(), rt_vol_export4(), rt_vol_export5(), rt_vol_import4(), rt_vol_import5(), sh_stk_dosetup(), show_help(), str2mm(), str2type(), subbrep_object_free(), subbrep_to_csg_conic(), subbrep_to_csg_cylinder(), summary_reports(), tables_new(), tcl_bu_get_value_by_keyword(), tcl_bu_hsv_to_rgb(), tcl_bu_rgb_to_hsv(), tcl_bu_units_conversion(), tclcad_auto_path(), temp_close_files(), test_encode(), test_vls(), to_bot_edge_split(), to_bot_face_split(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_data_scale_mode(), to_deleteProc(), to_deleteViewProc(), to_edit_redraw(), to_idle_mode(), to_init_default_bindings(), to_more_args_func(), to_mouse_append_pt_common(), to_mouse_brep_selection_append(), to_mouse_brep_selection_translate(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_data_scale(), to_mouse_find_arb_edge(), to_mouse_find_bot_edge(), to_mouse_find_botpt(), to_mouse_find_metaballpt(), to_mouse_find_pipept(), to_mouse_joint_select(), to_mouse_joint_selection_translate(), to_mouse_move_arb_edge(), to_mouse_move_arb_face(), to_mouse_move_botpt(), to_mouse_move_botpts(), to_mouse_move_pt_common(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_poly_circ(), to_mouse_poly_cont(), to_mouse_poly_ell(), to_mouse_poly_rect(), to_mouse_protate(), to_mouse_pscale(), to_mouse_ptranslate(), to_mouse_rect(), to_mouse_rot(), to_mouse_rotate_arb_face(), to_mouse_scale(), to_mouse_trans(), to_move_arb_edge_mode(), to_move_arb_face_mode(), to_move_botpt_mode(), to_move_botpts_mode(), to_move_metaballpt_mode(), to_move_pipept_mode(), to_new_view(), to_orotate_mode(), to_oscale_mode(), to_otranslate_mode(), to_poly_circ_mode(), to_poly_cont_build(), to_poly_ell_mode(), to_poly_rect_mode(), to_prim_label(), to_protate_mode(), to_pscale_mode(), to_ptranslate_mode(), to_rect_mode(), to_rotate_arb_face_mode(), to_rotate_mode(), to_scale_mode(), to_translate_mode(), to_view_func_common(), to_vslew(), txt_free(), vo_ae2dir_cmd(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_dir2ae_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_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_close(), and write_comb().

Here is the call graph for this function:

void bu_vls_vlsfree ( struct bu_vls vp)

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

Definition at line 263 of file vls.c.

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

Referenced by ged_putmat(), and prj_free().

Here is the call graph for this function:

char* bu_vls_strdup ( const struct bu_vls vp)

Return a dynamic copy of a vls. Memory for the string being returned is acquired using bu_malloc() implying the caller must bu_free() the returned string.

Definition at line 274 of file vls.c.

References BU_CK_VLS, bu_malloc(), bu_strdup_message, bu_strlcpy, bu_vls_addr(), and bu_vls_strlen().

Referenced by bu_vls_strgrab(), db_apply_state_from_comb(), db_do_anim(), envmap_setup(), parse_list_elem(), rt_submodel_prep(), and to_edit_redraw().

Here is the call graph for this function:

char* bu_vls_strgrab ( struct bu_vls vp)

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 avoids a potentially long buffer copy.

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

Definition at line 290 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_free(), bu_vls_strdup(), bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by bu_str_escape(), create_boxes(), and db_do_anim().

Here is the call graph for this function:

void bu_vls_strcpy ( struct bu_vls vp,
const char *  s 
)
void bu_vls_strncpy ( struct bu_vls vp,
const char *  s,
size_t  n 
)

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

Definition at line 339 of file vls.c.

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

Referenced by _ged_find_matrix(), bu_vls_vprintf(), build_comb(), db5_standardize_attribute(), db_diradd(), ext_setup(), ged_getmat(), ged_nirt(), ged_preview(), mlib_setup(), parse_floating(), parse_list_elem(), prj_setup(), rt_dsp_import5(), rt_submodel_import5(), rt_vlist_import(), rt_vol_import5(), string_to_name_and_val(), and to_copy().

Here is the call graph for this function:

void bu_vls_strcat ( struct bu_vls vp,
const char *  s 
)

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

Definition at line 368 of file vls.c.

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

Referenced by _ged_bot_dump(), _ged_do_list(), bn_pr_poly(), bn_tabdata_to_tcl(), brep_facecdt_plot(), brep_surface_bezier_info(), brep_surface_info(), bu_bitv_to_binary(), bu_bitv_vls(), bu_brlcad_data(), bu_brlcad_root(), bu_key_eq_to_key_val(), bu_open_mapped_file_with_path(), bu_pr_bitv(), bu_pr_vlb(), bu_shader_to_key_eq(), bu_shader_to_list(), bu_vls_encode(), bu_vls_from_argv(), bu_vls_printb(), bu_vls_vprintf(), bu_vsscanf(), create_boxes(), curve_to_tcl_list(), db_comb_describe(), db_dircheck(), db_fullpath_to_vls(), db_path_to_vls(), db_regexp_match_all(), db_tree_describe(), db_tree_flatten_describe(), find_path(), ged_attr(), ged_cc(), ged_copymat(), ged_decompose(), ged_draw_guts(), ged_eac(), ged_erase(), ged_glob(), ged_keep(), ged_make_name(), ged_make_pnts(), ged_match(), ged_mater(), ged_nirt(), ged_plot(), ged_prefix(), ged_putmat(), ged_tables(), make_hole(), make_hole_in_prepped_regions(), mk_comb(), mk_dsp(), mk_unique_brlcad_name(), parse_key_val_to_vls(), plot_open(), rr_render(), rt_arb_describe(), rt_arbn_describe(), rt_ars_describe(), rt_binunif_describe(), rt_binunif_get(), rt_bot_describe(), rt_bot_get(), rt_brep_describe(), rt_cline_describe(), rt_cline_get(), rt_comb_adjust(), rt_comb_import5(), rt_ebm_describe(), rt_ehy_describe(), rt_ell_describe(), rt_epa_describe(), rt_eto_describe(), rt_extrude_describe(), rt_extrude_get(), rt_get_timer(), rt_grp_describe(), rt_hf_describe(), rt_hf_import4(), rt_hf_to_dsp(), rt_hlf_describe(), rt_hrt_describe(), rt_hyp_describe(), rt_joint_describe(), rt_metaball_describe(), rt_nmg_get(), rt_nurb_describe(), rt_nurb_get(), rt_part_describe(), rt_pipe_describe(), rt_pipe_get(), rt_pnts_describe(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_partitions(), rt_pr_pt_vls(), rt_pr_tree_vls(), rt_regionfix(), rt_revolve_describe(), rt_rhc_describe(), rt_rpc_describe(), rt_sketch_describe(), rt_sketch_get(), 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(), sh_stk_dosetup(), str2mm(), tcl_bu_get_value_by_keyword(), tree_list_append(), and tree_list_sublist_begin().

Here is the call graph for this function:

void bu_vls_strncat ( struct bu_vls vp,
const char *  s,
size_t  n 
)

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

Definition at line 390 of file vls.c.

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

Referenced by bu_key_eq_to_key_val(), bu_shader_to_list(), bu_vls_vprintf(), ged_decompose(), show_help(), and tclcad_auto_path().

Here is the call graph for this function:

void bu_vls_vlscat ( struct bu_vls dest,
const struct bu_vls src 
)

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 415 of file vls.c.

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

Referenced by bu_cmdhist_history(), bu_struct_parse(), bu_vls_struct_item(), bu_vls_struct_print(), bu_vls_vlscatzap(), bu_vls_vprintf(), cmdhist_record(), db_do_anim(), ged_glob(), osl_parse(), rt_dsp_describe(), rt_ebm_describe(), rt_revolve_describe(), rt_revolve_xform(), and rt_vol_describe().

Here is the call graph for this function:

void bu_vls_vlscatzap ( struct bu_vls dest,
struct bu_vls src 
)

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 433 of file vls.c.

References BU_CK_VLS, bu_vls_trunc(), bu_vls_vlscat(), UNLIKELY, and bu_vls::vls_len.

Referenced by bu_binstr_to_hexstr(), bu_hexstr_to_binstr(), bu_vls_decode(), bu_vls_detab(), ged_log(), and mk_comb().

Here is the call graph for this function:

int bu_vls_strcmp ( struct bu_vls s1,
struct bu_vls s2 
)

Lexicographically compare two vls strings. Returns an integer greater than, equal to, or less than 0, according as the string s1 is greater than, equal to, or less than the string s2.

Definition at line 482 of file vls.c.

References BU_CK_VLS, bu_strcmp(), bu_vls_extend(), bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Referenced by dm_share_dlist().

Here is the call graph for this function:

int bu_vls_strncmp ( struct bu_vls s1,
struct bu_vls s2,
size_t  n 
)

Lexicographically compare two vls strings up to n characters. Returns an integer greater than, equal to, or less than 0, according as the string s1 is greater than, equal to, or less than the string s2.

Definition at line 505 of file vls.c.

References BU_CK_VLS, bu_strncmp(), bu_vls_extend(), UNLIKELY, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

Here is the call graph for this function:

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

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

Definition at line 532 of file vls.c.

References BU_CK_VLS, and bu_vls_strcat().

Referenced by constraint_set(), db_parse_1anim(), ged_annotate(), ged_putmat(), ged_shader(), and ged_title().

Here is the call graph for this function:

void bu_vls_fwrite ( FILE *  fp,
const struct bu_vls vp 
)

Write the VLS to the provided file pointer.

Definition at line 544 of file vls.c.

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

Referenced by bu_cmdhist_history(), ged_lc(), ged_tables(), and tables_new().

Here is the call graph for this function:

void bu_vls_write ( int  fd,
const struct bu_vls vp 
)

Write the VLS to the provided file descriptor.

Definition at line 565 of file vls.c.

References bu_bomb(), BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), UNLIKELY, 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 
)

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 586 of file vls.c.

References BU_CK_VLS, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_extend(), UNLIKELY, 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 
)

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 read or added to the vls

Definition at line 621 of file vls.c.

References BU_CK_VLS, bu_fgets(), bu_vls_printf(), and bu_vls_strlen().

Referenced by bn_table_read(), get_token(), main(), rt_hf_import4(), and to_more_args_func().

Here is the call graph for this function:

void bu_vls_trimspace ( struct bu_vls vp)

Remove leading and trailing white space from a vls string.

Definition at line 678 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_nibble(), bu_vls_strlen(), bu_vls_trunc(), and bu_vls::vls_len.

Referenced by bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_hexstr_to_binstr(), bu_str_true(), build_comb(), db5_sync_attr_to_comb(), ged_make_pnts(), ged_match(), ged_mater(), ged_nirt(), rt_comb_adjust(), str2mm(), and str2type().

Here is the call graph for this function:

void bu_vls_printf ( struct bu_vls vls,
const char *  fmt,
  ... 
)

Format a string into a vls using standard variable arguments.

s continues to be a regular null-terminated 'C' string (char *). V is a libbu variable-length string (struct bu_vls *).

Other format specifiers should behave identical to printf().

This routine appends to the given vls similar to how vprintf appends to stdout (see bu_vls_sprintf for overwriting the vls). The implementation ends up calling bu_vls_vprintf().

Definition at line 694 of file vls.c.

References BU_CK_VLS, and bu_vls_vprintf().

Referenced by _ged_append_pipept_common(), _ged_build_dpp(), _ged_combadd2(), _ged_do_list(), _ged_drawtrees(), _ged_find_matrix(), _ged_get_obj_bounds2(), _ged_get_solid_keypoint(), _ged_print_node(), _ged_rotate_eto(), _ged_rotate_extrude(), _ged_rotate_hyp(), _ged_rotate_tgc(), _ged_rt_output_handler(), _ged_run_rt(), _ged_run_rtwizard(), _ged_scale_ehy(), _ged_scale_ell(), _ged_scale_epa(), _ged_scale_eto(), _ged_scale_extrude(), _ged_scale_hyp(), _ged_scale_metaball(), _ged_scale_part(), _ged_scale_pipe(), _ged_scale_rhc(), _ged_scale_rpc(), _ged_scale_superell(), _ged_scale_tgc(), _ged_scale_tor(), _ged_search_characterize_path(), _ged_select_botpts(), _ged_set_metaball(), _ged_translate_extrude(), _ged_translate_tgc(), _ged_vls_col_pr4v(), _ged_vls_print_matrix(), _ged_wait_status(), adc_usage(), add_operand(), add_operator(), add_solid(), analyze_arb8(), analyze_do(), analyze_general(), analyze_sketch(), analyze_superell(), annotate_help(), attr_pretty_print(), attr_print(), bn_encode_hvect(), bn_encode_mat(), bn_encode_quat(), bn_encode_vect(), bn_mat_print_vls(), bn_math_cmd(), bn_pr_poly(), bn_tabdata_to_tcl(), bot_check_vertex_indices(), brep_curve_info(), brep_edge3d_plot(), brep_edge_info(), brep_face_info(), brep_facecdt_plot(), brep_facetrim_plot(), brep_info(), brep_isosurface_plot(), brep_loop_info(), brep_loop_plot(), brep_surface_bezier_info(), brep_surface_cv_plot(), brep_surface_info(), brep_surface_knot_plot(), brep_surface_normal_plot(), brep_surface_plot(), brep_surface_uv_plot(), brep_surfaceleafs_plot(), brep_trim_bezier_info(), brep_trim_direction_plot(), brep_trim_info(), brep_trim_plot(), brep_trimleafs_plot(), bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_bitv_to_hex(), bu_bitv_vls(), bu_cmdhist_history(), bu_hexstr_to_binstr(), bu_observer_notify(), bu_pr_vlb(), bu_structparse_argv(), bu_structparse_get_terse_form(), bu_units_strings_vls(), bu_vls_gets(), bu_vls_printb(), bu_vls_struct_item(), bu_vls_struct_print(), bu_vls_struct_print2(), build_comb(), cap_ground(), check_syntax(), cho_open_tcl(), color_putrec(), color_shader_clear(), color_zaprec(), comb_flatten(), comb_lift_region(), comb_tree_clear(), comb_wrap(), combmem_get(), combmem_set_empty(), combmem_vls_print_member_info(), constraint_eval(), constraint_get(), constraint_help(), constraint_set(), constraint_show(), constraint_usage(), curve_to_tcl_list(), db5_fwrite_ident(), db5_update_ident(), db_comb_describe(), db_create_inmem(), db_open(), db_tree_describe(), db_tree_flatten_describe(), db_tree_parse(), dl_addToDisplay(), dl_how(), dl_print_schain(), dl_select(), dl_select_partial(), dm_bestXType_tcl(), dm_draw_scale(), dm_list_types(), dm_processOptions(), dm_validXType_tcl(), dmo_bg_tcl(), dmo_bounds_tcl(), dmo_clearBufferAfter_tcl(), dmo_configure_tcl(), dmo_debug_tcl(), dmo_depthMask_tcl(), dmo_drawCenterDot_cmd(), dmo_drawDataAxes_tcl(), dmo_drawLine_tcl(), dmo_drawModelAxes_tcl(), dmo_drawPoint_tcl(), dmo_drawScale_cmd(), dmo_drawSList_tcl(), dmo_drawString_tcl(), dmo_drawViewAxes_tcl(), dmo_drawVList_tcl(), dmo_fg_tcl(), dmo_get_aspect_tcl(), dmo_getDrawLabelsHook_cmd(), dmo_light_tcl(), dmo_lineStyle_tcl(), dmo_lineWidth_tcl(), dmo_loadmat_tcl(), dmo_logfile_tcl(), dmo_observer_tcl(), dmo_open_tcl(), dmo_parseAxesArgs(), dmo_parseDataAxesArgs(), dmo_parseModelAxesArgs(), dmo_perspective_tcl(), dmo_setDrawLabelsHook_cmd(), dmo_size_tcl(), dmo_transparency_tcl(), dmo_zbuffer_tcl(), dmo_zclip_tcl(), dsp_print_v4(), dsp_print_v5(), dump_bitv(), edarb_facedef(), edarb_mirface(), edcodes_collect_regnames(), edit_arg_expand_meta(), edit_arg_to_apparent_coord(), edit_str_to_arg(), edit_translate(), edit_translate_add_cl_args(), Eplot(), face_set_key(), fb_cmd_common_file_size(), fb_write_fp(), fbo_getcursor_tcl(), fbo_getheight_tcl(), fbo_getsize_tcl(), fbo_getwidth_tcl(), fbo_listen_tcl(), fbo_open_tcl(), fbo_pixel_tcl(), fbs_open(), find_cmd_line_obj(), find_ref(), find_reference(), findjoint(), fix_halfs(), ged_3ptarb(), ged_adc(), ged_add_metaballpt(), ged_adjust(), ged_ae2dir(), ged_aet(), ged_analyze(), ged_arb(), ged_arced(), ged_arot_args(), ged_attr(), ged_autoview(), ged_bb(), ged_bev(), ged_blast(), ged_bo(), ged_bot(), ged_bot_condense(), ged_bot_decimate(), ged_bot_dump(), ged_bot_edge_split(), ged_bot_face_fuse(), ged_bot_face_sort(), ged_bot_face_split(), ged_bot_flip(), ged_bot_fuse(), ged_bot_merge(), ged_bot_smooth(), ged_bot_split(), ged_bot_sync(), ged_bot_vertex_fuse(), ged_brep(), ged_build_tops(), ged_cat(), ged_cc(), ged_center(), ged_clone(), ged_cm_anim(), ged_coil(), ged_color(), ged_comb(), ged_comb_color(), ged_comb_std(), ged_combmem(), ged_concat(), ged_constraint(), ged_copy(), ged_copyeval(), ged_copymat(), ged_cpi(), ged_dbcopy(), ged_dbip(), ged_dbot_dump(), ged_debugbu(), ged_debugdir(), ged_debuglib(), ged_debugmem(), ged_debugnmg(), ged_decompose(), ged_delay(), ged_delete_metaballpt(), ged_delete_pipept(), ged_dir2ae(), ged_draw_guts(), ged_dump(), ged_dup(), ged_E(), ged_eac(), ged_echo(), ged_edarb(), ged_edcodes(), ged_edcolor(), ged_edcomb(), ged_edit(), ged_editit(), ged_edmater(), ged_erase(), ged_exists(), ged_expand(), ged_eye(), ged_eye_pos(), ged_facetize(), ged_fb2pix(), ged_fbclear(), ged_find(), ged_find_arb_edge_nearest_pt(), ged_find_bot_edge_nearest_pt(), ged_find_botpt_nearest_pt(), ged_find_metaballpt_nearest_pt(), ged_find_pipept_nearest_pt(), ged_form(), ged_fracture(), ged_gdiff(), ged_get(), ged_get_autoview(), ged_get_bot_edges(), ged_get_comb(), ged_get_eyemodel(), ged_get_obj_bounds(), ged_get_type(), ged_getmat(), ged_glob(), ged_gqa(), ged_graph(), ged_grid(), ged_grid2model_lu(), ged_grid2view_lu(), ged_group(), ged_hide(), ged_how(), ged_illum(), ged_importFg4Section(), ged_in(), ged_inside(), ged_inside_internal(), ged_instance(), ged_isize(), ged_item(), ged_joint2(), ged_keep(), ged_keypoint(), ged_kill(), ged_killall(), ged_killrefs(), ged_killtree(), ged_label(), ged_lc(), ged_list(), ged_loadframe(), ged_loadview(), ged_lod(), ged_log(), ged_lookat(), ged_ls(), ged_lt(), ged_m2v_point(), ged_make(), ged_make_name(), ged_make_pnts(), ged_match(), ged_mater(), ged_memprint(), ged_mirror(), ged_model2grid_lu(), ged_model2view(), ged_model2view_lu(), ged_move(), ged_move_all(), ged_move_arb_edge(), ged_move_arb_face(), ged_move_botpt(), ged_move_botpts(), ged_move_metaballpt(), ged_move_pipept(), ged_mrot(), ged_nirt(), ged_nmg_collapse(), ged_nmg_fix_normals(), ged_nmg_simplify(), ged_ocenter(), ged_orient(), ged_orotate(), ged_oscale(), ged_otranslate(), ged_overlay(), ged_pathlist(), ged_pathsum(), ged_perspective(), ged_pix2fb(), ged_plot(), ged_pmat(), ged_pmodel2view(), ged_png(), ged_polybinout(), ged_pov(), ged_prcolor(), ged_prefix(), ged_preview(), ged_protate(), ged_ps(), ged_pscale(), ged_pset(), ged_ptranslate(), ged_pull(), ged_push(), ged_put(), ged_put_comb(), ged_putmat(), ged_qray(), ged_quat(), ged_qvrot(), ged_rcodes(), ged_rect(), ged_red(), ged_redraw(), ged_regdef(), ged_region(), ged_remove(), ged_reopen(), ged_report(), ged_rfarb(), ged_rmap(), ged_rmat(), ged_rmater(), ged_rot_args(), ged_rot_point(), ged_rotate_about(), ged_rotate_arb_face(), ged_rselect(), ged_rt(), ged_rtabort(), ged_rtwizard(), ged_savekey(), ged_saveview(), ged_scale(), ged_scale_args(), ged_screen_grab(), ged_search(), ged_select(), ged_set_output_script(), ged_set_transparency(), ged_set_uplotOutputMode(), ged_setview(), ged_shaded_mode(), ged_shader(), ged_shells(), ged_showmats(), ged_size(), ged_slew(), ged_solids_on_ray(), ged_sphgroup(), ged_summary(), ged_sync(), ged_tables(), ged_tire(), ged_title(), ged_tol(), ged_tra_args(), ged_trace(), ged_track(), ged_track2(), ged_tree(), ged_unhide(), ged_units(), ged_v2m_point(), ged_version(), ged_view2grid_lu(), ged_view2model(), ged_view2model_lu(), ged_view2model_vec(), ged_view_func(), ged_viewdir(), ged_vnirt(), ged_voxelize(), ged_vrot(), ged_wcodes(), ged_whatid(), ged_which(), ged_which_shader(), ged_who(), ged_wmater(), ged_xpush(), ged_ypr(), ged_zap(), ged_zoom(), get_densities_from_database(), get_densities_from_file(), get_token(), GetMaterial(), go_draw_faceplate(), grid_usage(), grid_vls_print(), helpcomm(), hit(), info_usage(), joint_selection(), killtree_callback(), list_report(), main(), make_coil(), make_hole(), make_hole_in_prepped_regions(), move_all_file(), move_all_func(), nmg_ck_v_in_2fus(), nmg_face_state_transition(), nmg_vls_struct_counts(), node_write(), options_prep(), overlap(), parse_densities_buffer(), parse_vls_dmatprint(), parse_vls_matprint(), path_validate_recurse(), plane_worker(), plot_chull(), plot_loadMatrix(), plot_obr(), plot_open(), plot_usage(), print_edges_table(), print_faces_table(), print_subbrep_object(), print_volume_table(), ps_loadMatrix(), ps_open(), read_units_double(), ReadArgs(), redraw_edited_path(), region_flag_clear(), region_flag_set(), report_import_error_location(), rt_arb_calc_planes(), rt_arb_edit(), rt_arb_move_edge(), rt_arbn_adjust(), rt_arbn_get(), rt_ars_adjust(), rt_ars_get(), rt_binunif_adjust(), rt_binunif_get(), rt_bot_adjust(), rt_bot_form(), rt_bot_get(), rt_brep_adjust(), rt_brep_get(), rt_cline_adjust(), rt_cline_form(), rt_cline_get(), rt_comb_adjust(), rt_comb_export5(), rt_comb_form(), rt_comb_get(), rt_comb_import4(), rt_default_logoverlap(), rt_dsp_get(), rt_dsp_norm(), rt_dsp_print(), rt_ebm_adjust(), rt_ebm_describe(), rt_ebm_form(), rt_ebm_get(), rt_extrude_adjust(), rt_extrude_form(), rt_extrude_get(), rt_generic_adjust(), rt_generic_form(), rt_generic_get(), rt_get_timer(), rt_hf_describe(), rt_metaball_adjust(), rt_metaball_get(), rt_nmg_adjust(), rt_nmg_describe(), rt_nmg_get(), rt_nurb_adjust(), rt_nurb_describe(), rt_nurb_get(), rt_pipe_adjust(), rt_pipe_get(), rt_pr_fallback_angle(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_pt_vls(), rt_pr_seg_vls(), rt_pr_tree_vls(), rt_sketch_adjust(), rt_sketch_form(), rt_sketch_get(), rt_submodel_describe(), rt_tcl_pr_cutter(), rt_tcl_pr_hit(), rt_tor_describe(), rt_vls_color_map(), rt_vol_describe(), str2mm(), str2type(), summary_reports(), tables_new(), tcl_bu_hsv_to_rgb(), tcl_bu_rgb_to_hsv(), tcl_bu_units_conversion(), tclcad_auto_path(), terminate_check(), to_autoview(), to_axes(), to_base2local(), to_bg(), to_bot_edge_split(), to_bot_face_split(), to_bounds(), to_configure(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_data_arrows(), to_data_axes(), to_data_labels(), to_data_lines(), to_data_move(), to_data_move_object_mode(), to_data_move_point_mode(), to_data_pick(), to_data_polygons(), to_data_scale(), to_data_scale_mode(), to_data_vZ(), to_delete_view(), to_dlist_on(), to_dm_func(), to_edit_motion_delta_callback(), to_edit_redraw(), to_extract_contours_av(), to_extract_polygons_av(), to_faceplate(), to_fontsize(), to_get_prev_mouse(), to_handle_expose(), to_handle_refresh(), to_hide_view(), to_idle_mode(), to_init_default_bindings(), to_init_view_bindings(), to_light(), to_list_views(), to_listen(), to_local2base(), to_model_axes(), to_more_args_callback(), to_more_args_func(), to_mouse_append_pt_common(), to_mouse_brep_selection_append(), to_mouse_brep_selection_translate(), to_mouse_constrain_rot(), to_mouse_constrain_trans(), to_mouse_find_arb_edge(), to_mouse_find_bot_edge(), to_mouse_find_botpt(), to_mouse_find_metaballpt(), to_mouse_find_pipept(), to_mouse_joint_select(), to_mouse_joint_selection_translate(), to_mouse_move_arb_edge(), to_mouse_move_arb_face(), to_mouse_move_botpt(), to_mouse_move_botpts(), to_mouse_move_pt_common(), to_mouse_orotate(), to_mouse_oscale(), to_mouse_otranslate(), to_mouse_poly_circ(), to_mouse_poly_cont(), to_mouse_poly_ell(), to_mouse_poly_rect(), to_mouse_protate(), to_mouse_pscale(), to_mouse_ptranslate(), to_mouse_rect(), to_mouse_rot(), to_mouse_rotate_arb_face(), to_mouse_trans(), to_move_arb_edge_mode(), to_move_arb_face_mode(), to_move_botpt_mode(), to_move_botpts_mode(), to_move_metaballpt_mode(), to_move_pipept_mode(), to_new_view(), to_orotate_mode(), to_oscale_mode(), to_otranslate_mode(), to_paint_rect_area(), to_poly_circ_mode(), to_poly_cont_build(), to_poly_cont_build_end(), to_poly_ell_mode(), to_poly_rect_mode(), to_prim_label(), to_protate_mode(), to_pscale_mode(), to_ptranslate_mode(), to_rect_mode(), to_redraw(), to_refresh(), to_refresh_all(), to_refresh_on(), to_rotate_arb_face_mode(), to_rotate_mode(), to_rt_end_callback(), to_rt_end_callback_internal(), to_rt_gettrees(), to_rt_gettrees_application(), to_scale_mode(), to_screen2model(), to_screen2view(), to_set_coord(), to_set_fb_mode(), to_snap_view(), to_translate_mode(), to_transparency(), to_view2screen(), to_view_axes(), to_view_callback(), to_view_func_common(), to_view_win_size(), to_vmake(), to_vslew(), to_zbuffer(), to_zclip(), translate_command(), usage(), vdraw_delete(), vdraw_insert(), view_reports(), vo_ae2dir_cmd(), vo_aet_cmd(), vo_arot_cmd(), vo_base2local_cmd(), vo_center_cmd(), vo_coord_cmd(), vo_dir2ae_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_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(), wcodes_printcodes(), wdb_import_from_path2(), and write_comb().

Here is the call graph for this function:

void bu_vls_sprintf ( struct bu_vls vls,
const char *  fmt,
  ... 
)

Format a string into a vls, setting the vls to the given print specifier expansion. This routine truncates any existing vls contents beforehand (i.e. it doesn't append, see bu_vls_vprintf for appending to the vls).

s continues to be a regular 'C' string, null terminated. V is a pointer to a (struct bu_vls *) string.

Definition at line 707 of file vls.c.

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

Referenced by _ged_editit(), _ged_find_matrix(), _ged_search_characterize_path(), _path_scrub(), analyze_arbn(), analyze_ars(), brep_to_nmg(), bu_utctime(), bu_vsscanf(), build_comb(), cap_squared_ground(), comb_flatten(), comb_lift_region(), comb_wrap(), db5_sync_attr_to_comb(), db5_sync_comb_to_attr(), find_subbreps(), ged_bot_fuse(), ged_brep(), ged_gdiff(), ged_preview(), ged_red(), ged_search(), ged_simulate(), ged_tire(), main(), make_shape(), nmg_plot_fu(), nmg_plot_open_edges(), plot_logfile(), print_loopuse_tree(), print_path_with_bools(), ps_logfile(), ReadArgs(), rt_brep_get(), subbrep_split(), subbrep_to_csg_conic(), subbrep_to_csg_cylinder(), and tclcad_auto_path().

Here is the call graph for this function:

void bu_vls_spaces ( struct bu_vls vp,
size_t  cnt 
)

Efficiently append 'cnt' spaces to the current vls.

Definition at line 721 of file vls.c.

References BU_CK_VLS, bu_vls_extend(), memset(), UNLIKELY, bu_vls::vls_len, bu_vls::vls_max, bu_vls::vls_offset, and bu_vls::vls_str.

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

Here is the call graph for this function:

size_t bu_vls_print_positions_used ( const struct bu_vls vp)

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 736 of file vls.c.

References BU_CK_VLS, and bu_vls_addr().

Here is the call graph for this function:

void bu_vls_detab ( struct bu_vls vp)

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 762 of file vls.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_extend(), bu_vls_free(), BU_VLS_INIT_ZERO, 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 
)

Add a string to the beginning of the vls.

Definition at line 796 of file vls.c.

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

Referenced by bu_binary_to_bitv2(), bu_binstr_to_hexstr(), bu_hexstr_to_binstr(), and random_hex_or_binary_string().

Here is the call graph for this function:

void bu_vls_substr ( struct bu_vls dest,
const struct bu_vls src,
size_t  begin,
size_t  nchars 
)

Copy a substring from a source vls into a destination vls

where:

begin - the index (0-based) of the beginning character position in the source vls nchars - the number of characters to copy

Definition at line 447 of file vls.c.

References BU_CK_VLS, bu_vls_cstr(), bu_vls_extend(), bu_vls_putc(), bu_vls_trunc(), UNLIKELY, and bu_vls::vls_len.

Here is the call graph for this function:

void bu_vls_vprintf ( struct bu_vls vls,
const char *  fmt,
va_list  ap 
)

Format a string into a vls using a varargs list.

s continues to be a regular null-terminated 'C' string (char *). V is a libbu variable-length string (struct bu_vls *).

Other format specifiers should behave identical to printf().

This routine appends to the given vls similar to how vprintf appends to stdout (see bu_vls_sprintf for overwriting the vls).

Definition at line 380 of file vls_vprintf.c.

References bu_bomb(), BU_CK_VLS, bu_sscanf(), bu_vls_addr(), bu_vls_extend(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_putc(), bu_vls_strcat(), bu_vls_strcpy(), bu_vls_strlen(), bu_vls_strncat(), bu_vls_strncpy(), bu_vls_trunc(), bu_vls_vlscat(), vprintf_flags::fieldlen, vprintf_flags::flags, format_part_status(), handle_format_part(), handle_obsolete_format_char(), vprintf_flags::have_digit, vprintf_flags::have_dot, vprintf_flags::left_justify, pd(), vprintf_flags::precision, PTRDIFFT, st, UNLIKELY, VP_LENGTH_MOD, VP_OBSOLETE, VP_UNKNOWN, and VP_VALID.

Referenced by bu_exit(), bu_flog(), bu_log(), bu_vls_printf(), bu_vls_sprintf(), and test_vls().

Here is the call graph for this function:

const char* bu_vls_encode ( struct bu_vls vp,
const char *  str 
)

given an input string, wrap the string in double quotes if there is a space and append it to the provided bu_vls. escape any existing double quotes.

TODO: consider a specifiable quote character and octal encoding instead of double quote wrapping. perhaps specifiable encode type: BU_ENCODE_QUOTE BU_ENCODE_OCTAL BU_ENCODE_XML

More thoughts on encode/decode - the nature of "quoting" is going to vary depending on the usage context and the language. For some applications, HEX or BASE64 may be appropriate. For others (like the problems with arbitrary strings in Tcl which initially motivated these functions) such wholesale encoding is not needed and it is just a subset of characters that must be escaped or otherwise identified.

Given the large set of possible scenarios, it definitely makes sense to allow an encoding specifiying variable, and probably other optional variables (which may be NULL, depending on the encoding type) specifying active characters (that need quoting) and an escape character (or characters? does it take more than one in some scenarios? perhaps start and end of escape strings would be the most general?)

This probably makes sense as its own header given that is is really a feature on top of vls rather than something integral to vls itself - it would be workable (maybe even practical, if the final length of the encoded data can be pre-determined) to just work with char arrays: see bu_str_escape()

the behavior of this routine is subject to change but should remain a reversible operation when used in conjunction with bu_vls_decode().

returns a pointer to the encoded string (i.e., the substring held within the bu_vls)

Definition at line 34 of file encode.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_putc(), bu_vls_strcat(), bu_vls_strlen(), strchr(), and UNLIKELY.

Referenced by test_encode().

Here is the call graph for this function:

const char* bu_vls_decode ( struct bu_vls vp,
const char *  str 
)

given an encoded input string, unwrap the string from any surrounding double quotes and unescape any embedded double quotes.

the behavior of this routine is subject to change but should remain the reverse operation of bu_vls_encode().

returns a pointer to the decoded string (i.e., the substring held within the bu_vls)

Definition at line 79 of file encode.c.

References BU_CK_VLS, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_putc(), bu_vls_strlen(), bu_vls_vlscatzap(), and UNLIKELY.

Referenced by test_encode().

Here is the call graph for this function: