File I/O
[libbu (utility functions)]

Collaboration diagram for File I/O:


Files

file  association.c
file  bomb.c
file  brlcad_path.c
 A support routine to provide the executable code with the path to where the BRL-CAD programs and libraries are installed.
file  bu_fgets.c
 fgets replacement function that also handles CR as an EOL marker
file  fopen_uniq.c
 Routine to open a unique filename.
file  hook.c
 BRL-CAD support library's hook utility.
file  lex.c
file  linebuf.c
 A portable way of doing setlinebuf().
file  log.c
 parallel safe version of fprintf for logging
file  mread.c
 multiple-read to fill a buffer
file  stat.c
file  units.c
file  whereis.c
file  which.c

Data Structures

struct  bu_lex_t_int
struct  bu_lex_t_dbl
struct  bu_lex_t_key
struct  bu_lex_t_id
union  bu_lex_token
struct  bu_lex_key

Defines

#define BU_LEX_ANY   0
#define BU_LEX_INT   1
#define BU_LEX_DOUBLE   2
#define BU_LEX_SYMBOL   3
#define BU_LEX_KEYWORD   4
#define BU_LEX_IDENT   5
#define BU_LEX_NUMBER   6
#define BU_LEX_NEED_MORE   0

Functions

void bu_bomb (const char *str)
 Abort the program with a message.
char * bu_fgets (char *s, int size, FILE *stream)
bu_file * bu_fopen (char *fname, char *type)
int bu_fclose (struct bu_file *bfp)
int bu_fgetc (struct bu_file *bfp)
void bu_printfile (struct bu_file *bfp)
int bu_file_exists (const char *path)
const char * bu_getprogname (void)
void bu_setprogname (const char *path)
char * bu_brlcad_path (const char *rhs, int fail_quietly)
char * bu_brlcad_root (const char *rhs, int fail_quietly)
 Locate where the BRL-CAD applications and libraries are installed.
char * bu_brlcad_data (const char *rhs, int fail_quietly)
 Locate where the BRL-CAD data resources are installed.
FILE * bu_fopen_uniq (const char *outfmt, const char *namefmt, int n)
 Open a file for output. Assures that the file did not previously exist.
void bu_setlinebuf (FILE *fp)
void bu_hook_list_init (struct bu_hook_list *hlp)
void bu_add_hook (struct bu_hook_list *hlp, bu_hook_t func, genptr_t clientdata)
void bu_delete_hook (struct bu_hook_list *hlp, bu_hook_t func, genptr_t clientdata)
void bu_call_hook (struct bu_hook_list *hlp, genptr_t buf)
void bu_log_indent_delta (int delta)
void bu_log_indent_vls (struct bu_vls *v)
void bu_log_add_hook (bu_hook_t func, genptr_t clientdata)
void bu_log_delete_hook (bu_hook_t func, genptr_t clientdata)
void bu_putchar (int c)
void bu_log ()
void bu_flog ()
double bu_units_conversion (const char *str)
const char * bu_units_string (const double mm)
double bu_mm_value (const char *s)
void bu_mm_cvt (register const struct bu_structparse *sdp, register const char *name, char *base, const char *value)
bu_vlsbu_association (const char *fname, const char *value, int field_sep)
int bu_lex (union bu_lex_token *token, struct bu_vls *rtstr, struct bu_lex_key *keywords, struct bu_lex_key *symbols)
long int bu_mread (int fd, void *bufp, long int n)
void bu_mro_init_with_string (struct bu_mro *mrop, const char *string)
void bu_mro_set (struct bu_mro *mrop, const char *string)
void bu_mro_init (struct bu_mro *mrop)
void bu_mro_free (struct bu_mro *mrop)
void port_setlinebuf (FILE *fp)
HIDDEN void bu_log_call_hooks (genptr_t buf)
HIDDEN void bu_log_do_indent_level (struct bu_vls *new, register char *old)
void bu_log (char *fmt, a, b, c, d, e, f, g, h, i, j)
void bu_flog (FILE *fp, char *fmt, a, b, c, d, e, f, g, h, i, j)
int bu_whereis (char *argv[], int lim, const char *cmd)
int bu_which (char *argv[], int lim, const char *cmd)

Variables

bu_hook_list bu_bomb_hook_list
int bu_setjmp_valid = 0
 !0 = bu_jmpbuf is valid
jmp_buf bu_jmpbuf
 for BU_SETJMP()
bu_hook_list bu_log_hook_list

Define Documentation

#define BU_LEX_ANY   0
 

Definition at line 2635 of file bu.h.

#define BU_LEX_INT   1
 

Definition at line 2640 of file bu.h.

Referenced by bu_lex().

#define BU_LEX_DOUBLE   2
 

Definition at line 2645 of file bu.h.

#define BU_LEX_SYMBOL   3
 

Definition at line 2650 of file bu.h.

#define BU_LEX_KEYWORD   4
 

Definition at line 2651 of file bu.h.

#define BU_LEX_IDENT   5
 

Definition at line 2656 of file bu.h.

#define BU_LEX_NUMBER   6
 

Definition at line 2657 of file bu.h.

#define BU_LEX_NEED_MORE   0
 

Definition at line 2669 of file bu.h.

Referenced by bu_lex().


Function Documentation

void bu_bomb const char *  str  ) 
 

Abort the program with a message.

B U _ B O M B

Only produce a core-dump when that debugging bit is set. Note that this function is meant to be a last resort graceful abort. It should not attempt to allocate anything on the stack or heap.

Definition at line 93 of file bomb.c.

References bu_bomb_hook_list, bu_call_hook(), bu_debug, BU_DEBUG_COREDUMP, bu_is_parallel(), bu_jmpbuf, bu_kill_parallel(), BU_LIST_NON_EMPTY, bu_setjmp_valid, and bu_hook_list::l.

Referenced by _rb_walk(), Add_vert(), Add_vert_and_norm(), bn_2line3_colinear(), bn_angle_measure(), bn_catch_FPE(), bn_ck_table(), bn_distsq_line3_line3(), bn_isect_line2_lseg2(), bn_isect_lseg3_lseg3(), bn_mat_ck(), bn_mat_inv(), bn_tabdata_add(), bn_tabdata_blend2(), bn_tabdata_blend3(), bn_tabdata_copy(), bn_tabdata_freq_shift(), bn_tabdata_incr_mul2_scale(), bn_tabdata_incr_mul3_scale(), bn_tabdata_join1(), bn_tabdata_join2(), bn_tabdata_mul(), bn_tabdata_mul3(), bn_tabdata_scale(), bn_table_delete_sample_pts(), bn_table_lin_interp(), bn_table_make_uniform(), bn_table_merge2(), bn_table_read(), bu_avail_cpus(), bu_badmagic(), bu_bitv_and(), bu_bitv_or(), bu_ck_list(), bu_ck_list_magic(), bu_ck_malloc_ptr(), bu_flog(), bu_fopen_uniq(), bu_hsv_to_rgb(), bu_lex(), bu_log(), bu_mem_barriercheck(), bu_memdebug_check(), bu_parallel(), bu_prmem(), bu_ptbl(), bu_rb_delete(), bu_rb_extreme(), bu_rb_neighbor(), bu_realloc(), bu_struct_get(), bu_struct_wrap_buf(), bu_vls_addr(), bu_vls_fwrite(), bu_vls_init(), bu_vls_init_if_uninit(), bu_vls_printf(), bu_vls_read(), bu_vls_write(), bu_whereis(), bu_which(), build_etree(), db5_decode_length(), db5_decode_signed(), db5_encode_length(), db5_export_object3(), db_apply_state_from_one_member(), db_ck_left_heavy_tree(), db_ck_v4gift_tree(), db_delete(), db_find_named_leaf(), db_find_named_leafs_parent(), db_flatten_tree(), db_functree_subtree(), db_put_external(), db_read(), db_shader_mat(), db_tcl_tree_describe(), db_traverse_subtree(), db_tree_counter(), db_tree_del_lhs(), db_tree_del_rhs(), db_tree_describe(), db_tree_flatten_describe(), db_tree_funcleaf(), db_tree_mul_dbleaf(), db_walk_subtree(), db_zapper(), dsp_val(), find_spec_wgt(), get_solidbitv(), isect_line2_ellipse(), nmg_cut_loop(), nmg_evaluate_boolean(), nmg_pl_isect(), nmg_uv_in_lu(), ntohd(), ntohf(), rt_arb_std_type(), rt_ars_class(), rt_ars_free(), rt_binunif_export5(), rt_binunif_import5(), rt_bomb(), rt_bot_condense(), rt_ck_vlist(), rt_cline_norm(), rt_cnurb_par_edge(), rt_comb_export4(), rt_comb_export5(), rt_comb_v5_serialize(), rt_dsp_norm(), rt_dsp_shot(), rt_dspline_n(), rt_extrude_norm(), rt_get_region_seglist_for_partition(), rt_init_resource(), rt_memget_nosplit(), rt_nul_make(), rt_plot_cell(), rt_pr_cut_info(), rt_sketch_export(), rt_sketch_export5(), rt_submodel_wireframe_leaf(), and rt_tree_max_raynum().

Here is the call graph for this function:

char * bu_fgets char *  s,
int  size,
FILE *  stream
 

B U _ F G E T S

Reads in at most one less than size characters from stream and stores them into the buffer pointed to by s. Reading stops after an EOF, CR, LF, or a CR/LF combination. If a LF or CR is read, it is stored into the buffer. If a CR/LF is read, just a CR is stored into the buffer. A '\0' is stored after the last character in the buffer. Returns s on success, and NULL on error or when end of file occurs while no characters have been read.

Definition at line 65 of file bu_fgets.c.

References NULL.

struct bu_file * bu_fopen char *  fname,
char *  type
 

int bu_fclose struct bu_file *  bfp  ) 
 

int bu_fgetc struct bu_file *  bfp  ) 
 

void bu_printfile struct bu_file *  bfp  ) 
 

int bu_file_exists const char *  path  ) 
 

B U _ F I L E _ E X I S T S

Returns:
1 The given filename exists.

0 The given filename does not exist.

Definition at line 60 of file stat.c.

References bu_debug, and NULL.

Referenced by bu_which().

const char * bu_getprogname void   ) 
 

b u _ g e t p r o g n a m e

get the name of the running application if they ran bu_setprogname() first or if we know what it's supposed to be anyways.

Definition at line 122 of file brlcad_path.c.

References NULL.

Referenced by bu_brlcad_root().

void bu_setprogname const char *  progname  ) 
 

b u _ s e t p r o g n a m e

Set the name of the running application. This isn't necessary on modern systems that support getprogname() and call setprogname() before main() for you, but necessary otherwise for portability.

Definition at line 135 of file brlcad_path.c.

References void().

Here is the call graph for this function:

char * bu_brlcad_path const char *  rhs,
int  fail_quietly
 

B U _ B R L C A D _ P A T H

Deprecated:
Do not use. Locate where the BRL-CAD programs and libraries are located, contatenate on the rest of the string provided by the caller, and return a pointer to a STATIC buffer with the full path. It is the caller's responsibility to call bu_strdup() or make other provisions to save the returned string, before calling again. bu_bomb() if unable to find the base path.

Definition at line 573 of file brlcad_path.c.

References bu_brlcad_root(), and bu_log().

Referenced by bu_tcl_brlcad_path().

Here is the call graph for this function:

char * bu_brlcad_root const char *  rhs,
int  fail_quietly
 

Locate where the BRL-CAD applications and libraries are installed.

B U _ B R L C A D _ R O O T

The BRL-CAD root is searched for in the following order of precedence by testing for the rhs existence if provided or the directory existence otherwise:

BRLCAD_ROOT environment variable if set BRLCAD_ROOT compile-time path run-time path identification /usr/brlcad static path current directory

Returns:
A STATIC buffer is returned. It is the caller's responsibility to call bu_strdup() or make other provisions to save the returned string, before calling again.

Definition at line 320 of file brlcad_path.c.

References BRLCAD_ROOT, bu_debug, BU_DIR_SEPARATOR, bu_getprogname(), bu_log(), bu_vls_addr(), bu_vls_init(), bu_vls_strcat(), getenv(), and NULL.

Referenced by bu_brlcad_data(), bu_brlcad_path(), and bu_tcl_brlcad_root().

Here is the call graph for this function:

char * bu_brlcad_data const char *  rhs,
int  fail_quietly
 

Locate where the BRL-CAD data resources are installed.

B U _ B R L C A D _ D A T A

The BRL-CAD data resources are searched for in the following order of precedence by testing for the existence of rhs if provided or the directory existence otherwise:

BRLCAD_DATA environment variable if set BRLCAD_DATA compile-time path bu_brlcad_root/share/brlcad/VERSION path bu_brlcad_root path current directory

A STATIC buffer is returned. It is the caller's responsibility to call bu_strdup() or make other provisions to save the returned string, before calling again.

Definition at line 446 of file brlcad_path.c.

References BRLCAD_DATA, BRLCAD_VERSION, bu_brlcad_root(), bu_debug, bu_log(), bu_vls_addr(), bu_vls_init(), bu_vls_strcat(), getenv(), and NULL.

Referenced by bu_tcl_brlcad_data(), and vfont_get().

Here is the call graph for this function:

FILE * bu_fopen_uniq const char *  outfmt,
const char *  namefmt,
int  n
 

Open a file for output. Assures that the file did not previously exist.

B U _ F O P E N _ U N I Q

Typical Usages:

        static int n = 0;
        FILE *fp;

        fp = bu_fopen_uniq("writing to %s for results", "output%d.pl", n++);
        ...
        fclose(fp);


        fp = bu_fopen_uniq((char *)NULL, "output%d.pl", n++);
        ...
        fclose(fp);

Definition at line 79 of file fopen_uniq.c.

References bu_bomb(), BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), fp, MAXPATHLEN, and NULL.

Referenced by rt_dsp_norm().

Here is the call graph for this function:

void bu_setlinebuf FILE *  fp  ) 
 

Definition at line 67 of file linebuf.c.

References NULL, perror(), and void().

Referenced by bu_log(), and port_setlinebuf().

Here is the call graph for this function:

void bu_hook_list_init struct bu_hook_list hlp  ) 
 

Definition at line 56 of file hook.c.

References BU_LIST_INIT, BUHOOK_NULL, bu_hook_list::clientdata, GENPTR_NULL, bu_hook_list::hookfunc, and bu_hook_list::l.

Referenced by Bu_Init().

void bu_add_hook struct bu_hook_list hlp,
bu_hook_t  func,
genptr_t  clientdata
 

Definition at line 64 of file hook.c.

References BU_GETSTRUCT, BU_LIST_APPEND, BUHOOK_LIST_MAGIC, bu_hook_list::clientdata, bu_hook_list::hookfunc, bu_hook_list::l, and bu_list::magic.

Referenced by bu_log_add_hook().

void bu_delete_hook struct bu_hook_list hlp,
bu_hook_t  func,
genptr_t  clientdata
 

Definition at line 76 of file hook.c.

References bu_free(), BU_LIST_DEQUEUE, BU_LIST_FOR, BU_LIST_PLAST, bu_hook_list::clientdata, bu_hook_list::hookfunc, and bu_hook_list::l.

Referenced by bu_log_delete_hook().

Here is the call graph for this function:

void bu_call_hook struct bu_hook_list hlp,
genptr_t  buf
 

Definition at line 91 of file hook.c.

References BU_LIST_FOR, bu_hook_list::clientdata, bu_hook_list::hookfunc, and bu_hook_list::l.

Referenced by bu_bomb(), bu_flog(), bu_log(), bu_log_call_hooks(), and bu_putchar().

void bu_log_indent_delta int  delta  ) 
 

B U _ L O G _ I N D E N T _ D E L T A

Change indentation level by indicated number of characters. Call with a large negative number to cancel all indentation.

Definition at line 83 of file log.c.

Referenced by bu_matprint(), bu_vls_matprint(), rt_cell_n_on_ray(), rt_pr_partitions(), rt_pr_pt_vls(), rt_shootray(), rt_shootray_bundle(), and rt_submodel_print().

void bu_log_indent_vls struct bu_vls v  ) 
 

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

For multi-line vls generators, honor logindent level like bu_log() does, and prefix the proper number of spaces. Should be called at the front of each new line.

Definition at line 97 of file log.c.

References bu_vls_spaces().

Referenced by bu_vls_matprint(), rt_pr_hit_vls(), rt_pr_hitarray_vls(), rt_pr_partitions(), rt_pr_pt_vls(), and rt_pr_seg_vls().

Here is the call graph for this function:

void bu_log_add_hook bu_hook_t  func,
genptr_t  clientdata
 

B U _ L O G _ A D D _ H O O K

Adds a hook to the list of bu_log hooks. The top (newest) one of these will be called with its associated client data and a string to be processed. Typcially, these hook functions will display the output (possibly in an X window) or record it.

XXX The hook functions are all non-PARALLEL.

Definition at line 130 of file log.c.

References bu_add_hook(), BU_GETSTRUCT, BU_LIST_APPEND, bu_log_hook_list, BUHOOK_LIST_MAGIC, bu_hook_list::clientdata, bu_hook_list::hookfunc, bu_hook_list::l, and bu_list::magic.

Here is the call graph for this function:

void bu_log_delete_hook bu_hook_t  func,
genptr_t  clientdata
 

B U _ L O G _ D E L E T E _ H O O K

Removes the hook matching the function and clientdata parameters from the hook list. Note that it is not necessarily the active (top) hook.

Definition at line 157 of file log.c.

References bu_delete_hook(), bu_free(), BU_LIST_DEQUEUE, BU_LIST_FOR, BU_LIST_PLAST, bu_log_hook_list, bu_hook_list::clientdata, bu_hook_list::hookfunc, and bu_hook_list::l.

Here is the call graph for this function:

void bu_putchar int  c  ) 
 

B U _ P U T C H A R

Log a single character with no flushing.

Definition at line 233 of file log.c.

References bu_call_hook(), BU_LIST_IS_EMPTY, bu_log_call_hooks(), bu_log_hook_list, and bu_hook_list::l.

Here is the call graph for this function:

void bu_log  ) 
 

Referenced by _rb_rot_left(), _rb_rot_right(), _rb_walk(), Add_bot_face(), anim_dirn2mat(), bend_pipe_shot(), bn_2line3_colinear(), bn_between(), bn_ck_table(), bn_cx_div(), bn_dist_line3_pt3(), bn_dist_pt2_along_line2(), bn_dist_pt2_lseg2(), bn_dist_pt3_lseg3(), bn_distsq_line3_pt3(), bn_distsq_pt3_lseg3(), bn_hlf_class(), bn_htov_move(), bn_isect_line2_line2(), bn_isect_line2_lseg2(), bn_isect_line_lseg(), bn_isect_lseg2_lseg2(), bn_isect_lseg3_lseg3(), bn_isect_planes(), bn_isect_pt2_lseg2(), bn_mat_ck(), bn_mat_fromto(), bn_mat_inv(), bn_mat_lookat(), bn_mat_print(), bn_mk_plane_3pts(), bn_poly_cubic_roots(), bn_poly_quadratic_roots(), bn_pr_roots(), bn_pr_tabdata(), bn_pr_table(), bn_print_table_and_tabdata(), bn_read_table_and_tabdata(), bn_tabdata_add(), bn_tabdata_area1(), bn_tabdata_area2(), bn_tabdata_binary_read(), bn_tabdata_blend2(), bn_tabdata_blend3(), bn_tabdata_constval(), bn_tabdata_copy(), bn_tabdata_dup(), bn_tabdata_free(), bn_tabdata_freq_shift(), bn_tabdata_get_constval(), bn_tabdata_incr_mul2_scale(), bn_tabdata_incr_mul3_scale(), bn_tabdata_join1(), bn_tabdata_join2(), bn_tabdata_malloc_array(), bn_tabdata_mk_linear_filter(), bn_tabdata_mul(), bn_tabdata_mul3(), bn_tabdata_mul_area1(), bn_tabdata_mul_area2(), bn_tabdata_resample_avg(), bn_tabdata_resample_max(), bn_tabdata_scale(), bn_tabdata_to_tcl(), bn_table_delete_sample_pts(), bn_table_find_x(), bn_table_free(), bn_table_lin_interp(), bn_table_make_uniform(), bn_table_merge2(), bn_table_read(), bn_table_scale(), bn_table_write(), bu_association(), bu_avs_init(), bu_avs_new(), bu_avs_print(), bu_brlcad_data(), bu_brlcad_path(), bu_brlcad_root(), bu_ck_list(), bu_ck_list_magic(), bu_close_mapped_file(), bu_cpulimit_set(), bu_free_mapped_files(), bu_fwrite_external(), bu_hex_to_bitv(), bu_hsv_to_rgb(), bu_key_val_to_vls(), bu_list_elem(), bu_matprint(), bu_nice_set(), bu_open_mapped_file(), bu_parallel(), bu_pr_bitv(), bu_pr_mapped_file(), bu_pr_ptbl(), bu_printb(), bu_ptbl(), bu_ptbl_cat(), bu_ptbl_cat_uniq(), bu_ptbl_free(), bu_ptbl_init(), bu_ptbl_ins(), bu_ptbl_ins_unique(), bu_ptbl_reset(), bu_ptbl_rm(), bu_rb_delete(), bu_rb_diagnose_tree(), bu_rb_extreme(), bu_rb_insert(), bu_rb_neighbor(), bu_rb_select(), bu_rb_set_uniqv(), bu_rb_summarize_tree(), bu_shader_to_key_eq(), bu_str_to_rgb(), bu_struct_get(), bu_struct_parse(), bu_struct_print(), bu_struct_wrap_buf(), bu_structparse(), bu_structparse_argv(), bu_structprint(), bu_vls_addr(), bu_vls_init(), bu_vls_item_print_core(), bu_vls_printf(), bu_vls_struct_item(), bu_vls_struct_print(), bu_vls_structprint(), bu_whereis(), bu_which(), classify_seg(), curve_to_vlist(), db5_crack_disk_header(), db5_diradd(), db5_diradd_handler(), db5_fwrite_ident(), db5_get_raw_internal_fp(), db5_get_raw_internal_ptr(), db5_import_attributes(), db5_realloc(), db5_replace_attributes(), db5_scan(), db5_update_attributes(), db5_update_ident(), db_add_anim(), db_alloc(), db_apply_anims(), db_apply_state_from_comb(), db_apply_state_from_memb(), db_apply_state_from_one_member(), db_argv_to_path(), db_ck_left_heavy_tree(), db_ck_tree(), db_ck_v4gift_tree(), db_close(), db_count_subtree_regions(), db_count_tree_nodes(), db_create(), db_delete(), db_delrec(), db_diradd(), db_dirbuild(), db_do_anim(), db_dump(), db_dup_subtree(), db_find_named_leaf(), db_find_named_leafs_parent(), db_flatten_tree(), db_follow_path(), db_free_tree(), db_functree(), db_functree_subtree(), db_fwrite_external(), db_fwrite_ident(), db_get(), db_get_external(), db_get_version(), db_getmrec(), db_is_tree_all_unions(), db_lookup(), db_lookup_by_attr(), db_mkgift_tree(), db_open(), db_parse_1anim(), db_pr_combined_tree_state(), db_pr_dir(), db_pr_full_path(), db_pr_tree_state(), db_preorder_traverse(), db_put(), db_put_external(), db_put_external5(), db_read(), db_recurse(), db_recurse_subtree(), db_region_mat(), db_scan(), db_shader_mat(), db_string_to_path(), db_tally_subtree_regions(), db_tcl_tree_describe(), db_traverse_subtree(), db_tree_counter(), db_tree_del_dbleaf(), db_tree_describe(), db_tree_funcleaf(), db_tree_mul_dbleaf(), db_tree_nleaves(), db_update_ident(), db_walk_dispatcher(), db_walk_subtree(), db_walk_tree(), db_wrap_v5_external(), db_write(), db_write_anim(), db_zapper(), dgo_E_cmd(), dgo_eraseobjpath(), do_grid(), do_quad(), do_tri(), dsp_pos(), dsp_val(), eval_etree(), eval_op(), get_seg_midpoint(), init_heap(), isect_line2_ellipse(), isect_ray_lseg(), isect_ray_planar_face(), isect_ray_snurb_face(), linear_pipe_shot(), main(), make_near_list(), nmg_2edgeuse_g_coincident(), nmg_2face_plot(), nmg_2lu_identical(), nmg_add_loop_to_face(), nmg_assess_eu(), nmg_assess_vu(), nmg_boolean(), nmg_booltree_evaluate(), nmg_booltree_leaf_tess(), nmg_booltree_leaf_tnurb(), nmg_bot(), nmg_break_all_es_on_v(), nmg_break_eg_on_v(), nmg_break_eu_on_v(), nmg_break_long_edges(), nmg_calc_face_plane(), nmg_cface(), nmg_check_radial(), nmg_check_radial_angles(), nmg_ck_closed_surf(), nmg_ck_eg_verts(), nmg_ck_face_worthless_edges(), nmg_ck_fu_verts(), nmg_ck_hitmiss_list(), nmg_ck_lu_orientation(), nmg_ck_lueu(), nmg_ck_vert_on_fus(), nmg_ck_vu_ptbl(), nmg_class_lu_fu(), nmg_class_pt_euvu(), nmg_class_pt_fu_except(), nmg_class_pt_lu_except(), nmg_class_pt_s(), nmg_class_ray_vs_shell(), nmg_class_shells(), nmg_classify_lu_lu(), nmg_classify_pt_loop(), nmg_close_shell(), nmg_cmface(), nmg_cnurb_is_linear(), nmg_cnurb_is_on_crv(), nmg_cnurb_lseg_coincident(), nmg_cnurb_to_vlist(), nmg_common_v_2eg(), nmg_complex_vertex_solve(), nmg_crackshells(), nmg_cut_loop(), nmg_cut_lu_into_coplanar_and_non(), nmg_dangling_face(), nmg_decompose_shell(), nmg_demote_eu(), nmg_demote_lu(), nmg_do_radial_join(), nmg_does_fu_use_eg(), nmg_dup_face(), nmg_dup_loop(), nmg_dup_shell(), nmg_e2break(), nmg_ebreak(), nmg_ebreaker(), nmg_edge_collapse(), nmg_edge_g(), nmg_edge_g_cnurb(), nmg_edge_g_cnurb_plinear(), nmg_edge_geom_isect_line(), nmg_eins(), nmg_enlist_one_vu(), nmg_enlist_vu(), nmg_esplit(), nmg_eu_radial_check(), nmg_eu_to_vlist(), nmg_euprint(), nmg_eusplit(), nmg_eval_action(), nmg_eval_linear_trim_to_tol(), nmg_eval_trim_curve(), nmg_eval_trim_to_tol(), nmg_evaluate_boolean(), nmg_extrude_cleanup(), nmg_extrude_face(), nmg_extrude_shell(), nmg_face_bb(), nmg_face_coincident_vu_sort(), nmg_face_combineX(), nmg_face_cutjoin(), nmg_face_g(), nmg_face_g_snurb(), nmg_face_lu_plot(), nmg_face_new_g(), nmg_face_next_vu_interval(), nmg_face_plot(), nmg_face_rs_init(), nmg_face_state_transition(), nmg_faceuse_area(), nmg_fcut_face(), nmg_find_e(), nmg_find_edge_between_2fu(), nmg_find_eg_between_2fg(), nmg_find_eu_in_face(), nmg_find_eu_leftvec(), nmg_find_first_last_use_of_v_in_fu(), nmg_find_fu_of_lu(), nmg_find_fu_of_vu(), nmg_find_isect_faces(), nmg_find_model(), nmg_find_radial_eu(), nmg_find_top_face(), nmg_find_top_face_in_dir(), nmg_find_zero_length_edges(), nmg_findeu(), nmg_fix_decomposed_shell_normals(), nmg_fix_normals(), nmg_fix_overlapping_loops(), nmg_flatten_face(), nmg_follow_free_edges_to_vertex(), nmg_fu_planeeqn(), nmg_fu_touchingloops(), nmg_gluefaces(), nmg_hollow_shell(), nmg_in_vert(), nmg_index_of_struct(), nmg_insert_vu_if_on_edge(), nmg_invert_shell(), nmg_is_crack_outie(), nmg_isect2d_prep(), nmg_isect_2colinear_edge2p(), nmg_isect_construct_nice_ray(), nmg_isect_edge2p_edge2p(), nmg_isect_eu_eu(), nmg_isect_eu_fu(), nmg_isect_face3p_shell_int(), nmg_isect_fu_jra(), nmg_isect_line2_edge2p(), nmg_isect_line2_face2pNEW(), nmg_isect_line2_vertex2(), nmg_isect_ray_model(), nmg_isect_shell_self(), nmg_isect_two_generic_faces(), nmg_isect_vert2p_face2p(), nmg_je(), nmg_jeg(), nmg_jf(), nmg_jfg(), nmg_jl(), nmg_join_2loops(), nmg_join_2singvu_loops(), nmg_join_singvu_loop(), nmg_join_touchingloops(), nmg_js(), nmg_jv(), nmg_k0eu(), nmg_keu(), nmg_kfu(), nmg_kill_accordions(), nmg_kill_cracks(), nmg_kill_cracks_at_vertex(), nmg_kill_non_common_cracks(), nmg_kill_snakes(), nmg_kill_zero_length_edgeuses(), nmg_klu(), nmg_km(), nmg_kr(), nmg_ks(), nmg_kvu(), nmg_loop_g(), nmg_loop_is_a_crack(), nmg_loop_is_ccw(), nmg_loop_split_at_touching_jaunt(), nmg_lu_reorient(), nmg_m_reindex(), nmg_make_dualvu(), nmg_make_faces_at_vert(), nmg_make_faces_within_tol(), nmg_manifolds(), nmg_me(), nmg_meonvu(), nmg_mesh_faces(), nmg_mesh_two_faces(), nmg_mf(), nmg_mk_model_from_region(), nmg_mk_new_face_from_loop(), nmg_ml(), nmg_mlv(), nmg_mm(), nmg_mmr(), nmg_model_break_e_on_v(), nmg_model_fuse(), nmg_model_vertex_fuse(), nmg_move_edge_thru_pt(), nmg_move_lu_between_fus(), nmg_moveltof(), nmg_movevu(), nmg_mrsv(), nmg_msv(), nmg_mv_eu_between_shells(), nmg_mv_fu_between_shells(), nmg_mv_lu_between_shells(), nmg_mv_shell_to_region(), nmg_mv_vu_between_shells(), nmg_onon_fix(), nmg_open_shells_connect(), nmg_pick_best_edge_g(), nmg_pl_2fu(), nmg_pl_comb_fu(), nmg_pl_hitmiss_list(), nmg_pl_isect(), nmg_pl_lu_around_eu(), nmg_plot_lu_around_eu(), nmg_plot_lu_ray(), nmg_plot_ray_face(), nmg_polytonmg(), nmg_pr_class_status(), nmg_pr_e(), nmg_pr_eg(), nmg_pr_eu(), nmg_pr_eu_briefly(), nmg_pr_eu_endpoints(), nmg_pr_f(), nmg_pr_fg(), nmg_pr_fu(), nmg_pr_fu_around_eu(), nmg_pr_fu_around_eu_vecs(), nmg_pr_fu_briefly(), nmg_pr_fus_in_fg(), nmg_pr_l(), nmg_pr_lg(), nmg_pr_lu(), nmg_pr_lu_briefly(), nmg_pr_m(), nmg_pr_one_eu_vecs(), nmg_pr_orient(), nmg_pr_ptbl(), nmg_pr_ptbl_vert_list(), nmg_pr_r(), nmg_pr_radial(), nmg_pr_radial_list(), nmg_pr_s(), nmg_pr_s_briefly(), nmg_pr_sa(), nmg_pr_struct_counts(), nmg_pr_v(), nmg_pr_vg(), nmg_pr_vu(), nmg_pr_vu_briefly(), nmg_pr_vu_stuff(), nmg_pr_vua(), nmg_propagate_normals(), nmg_purge_unwanted_intersection_points(), nmg_r_radial_check(), nmg_radial_build_list(), nmg_radial_check_parity(), nmg_radial_find_an_original(), nmg_radial_implement_decisions(), nmg_radial_join_eu(), nmg_radial_join_eu_NEW(), nmg_radial_mark_cracks(), nmg_radial_mark_flips(), nmg_radial_verify_monotone(), nmg_radial_verify_pointers(), nmg_ray_segs(), nmg_reclassify_lu_eu(), nmg_region_a(), nmg_region_v_unique(), nmg_repair_v_near_v(), nmg_reverse_face(), nmg_reverse_face_and_radials(), nmg_reverse_radials(), nmg_rm_redundancies(), nmg_rt_print_hitlist(), nmg_rt_print_hitmiss(), nmg_s_join_touchingloops(), nmg_s_radial_check(), nmg_s_radial_harmonize(), nmg_s_split_touchingloops(), nmg_sanitize_s_lv(), nmg_search_v_eg(), nmg_select_collapse(), nmg_set_lu_orientation(), nmg_shell_a(), nmg_shell_coplanar_face_merge(), nmg_shell_manifolds(), nmg_show_broken_classifier_stuff(), nmg_simple_vertex_solve(), nmg_simplify_face(), nmg_simplify_loop(), nmg_simplify_shell(), nmg_snurb_fu_eval(), nmg_snurb_fu_get_norm(), nmg_snurb_fu_get_norm_at_vu(), nmg_snurb_is_planar(), nmg_split_linear_trim(), nmg_split_loops_handler(), nmg_split_loops_into_faces(), nmg_split_touchingloops(), nmg_split_trim(), nmg_stash_model_to_file(), nmg_to_poly(), nmg_triangulate_fu(), nmg_triangulate_model(), nmg_two_face_fuse(), nmg_unbreak_edge(), nmg_unbreak_handler(), nmg_unbreak_region_edges(), nmg_unbreak_shell_edge_unsafe(), nmg_unglueedge(), nmg_use_edge_g(), nmg_uv_in_lu(), nmg_vedge(), nmg_veg(), nmg_vertex_g(), nmg_vertex_gv(), nmg_vertexuse_a_cnurb(), nmg_vertexuse_nv(), nmg_veu(), nmg_vface(), nmg_vfg(), nmg_vfu(), nmg_visit(), nmg_vlu(), nmg_vregion(), nmg_vshell(), nmg_vu_angle_measure(), nmg_vvu(), nmg_wedge_class(), pick_eu(), port_setlinebuf(), project_pt(), promote_ints(), rt_advance_to_next_cell(), rt_arb_add_pt(), rt_arb_calc_points(), rt_arb_class(), rt_arb_import(), rt_arb_print(), rt_arb_shot(), rt_arb_uv(), rt_arbn_import(), rt_arbn_norm(), rt_arbn_shot(), rt_arc2d_to_cnurb(), rt_ars_import(), rt_ars_prep(), rt_ars_print(), rt_ars_rd_curve(), rt_ars_shot(), rt_ars_tess(), rt_ars_uv(), rt_bend_pipe_prep(), rt_bin_expm_export5(), rt_bin_expm_import5(), rt_bin_mime_import5(), rt_bin_unif_export5(), rt_bin_unif_import5(), rt_binexpm_import5(), rt_binmime_import5(), rt_binunif_describe(), rt_binunif_dump(), rt_binunif_export5(), rt_binunif_import5(), rt_booleval(), rt_boolfinal(), rt_boolweave(), rt_bot_condense(), rt_bot_export(), rt_bot_import(), rt_bound_tree(), rt_cell_n_on_ray(), rt_ck_overlap(), rt_ck_vlist(), rt_cline_import(), rt_cline_norm(), rt_cline_print(), rt_cnurb_par_edge(), rt_comb_export4(), rt_comb_import4(), rt_comb_v5_serialize(), rt_copy_sketch(), rt_ct_box(), rt_ct_measure(), rt_ct_old_assess(), rt_ct_optim(), rt_curve_free(), rt_cut_extend(), rt_cut_it(), rt_db_cvt_to_external5(), rt_db_external5_to_internal5(), rt_db_get_internal(), rt_db_lookup_internal(), rt_db_put_internal(), rt_db_put_internal5(), rt_DB_rpp(), rt_default_logoverlap(), rt_del_regtree(), rt_dist_line3_line3(), rt_dist_pt3_line3(), rt_dsp_class(), rt_dsp_curve(), rt_dsp_describe(), rt_dsp_export(), rt_dsp_export5(), rt_dsp_free(), rt_dsp_ifree(), rt_dsp_import(), rt_dsp_import5(), rt_dsp_norm(), rt_dsp_plot(), rt_dsp_prep(), rt_dsp_print(), rt_dsp_shot(), rt_dsp_tess(), rt_dsp_uv(), rt_dsp_vshot(), rt_dspline_matrix(), rt_ebm_dda(), rt_ebm_import(), rt_ebm_import5(), rt_ebm_norm(), rt_ebm_print(), rt_ebm_shot(), rt_ehy_export(), rt_ehy_export5(), rt_ehy_import(), rt_ehy_import5(), rt_ehy_norm(), rt_ell_import(), rt_ell_prep(), rt_ell_tess(), rt_ell_tnurb(), rt_epa_export(), rt_epa_export5(), rt_epa_import(), rt_epa_import5(), rt_epa_norm(), rt_eto_export(), rt_eto_export5(), rt_eto_import(), rt_eto_import5(), rt_eto_plot(), rt_eto_prep(), rt_eto_print(), rt_eto_shot(), rt_eto_tess(), rt_extrude_import(), rt_extrude_import5(), rt_extrude_plot(), rt_extrude_prep(), rt_extrude_tess(), rt_extrude_xform(), rt_fastgen_plate_vol_overlap(), rt_fastgen_vol_vol_overlap(), rt_fdiff(), rt_find_identical_solid(), rt_find_paths(), rt_fr_cut(), rt_fwrite_internal(), rt_generic_xform(), rt_get_bitv(), rt_gettree_leaf(), rt_gettrees_muves(), rt_grp_import(), rt_grp_import5(), rt_grp_print(), rt_hf_export5(), rt_hf_import(), rt_hf_import5(), rt_hf_prep(), rt_hf_print(), rt_hf_to_dsp(), rt_hlf_class(), rt_hlf_import(), rt_hlf_import5(), rt_hlf_norm(), rt_hlf_print(), rt_hlf_uv(), rt_hlf_xform(), rt_htbl_free(), rt_htbl_init(), rt_htbl_reset(), rt_id_solid(), rt_init_resource(), rt_insert_color(), rt_join_cnurbs(), rt_memfree(), rt_memprint(), rt_metaball_curve(), rt_metaball_free(), rt_metaball_print(), rt_metaball_tess(), rt_metaball_tnurb(), rt_metaball_uv(), rt_mk_binunif(), rt_nmg_edisk(), rt_nmg_ialloc(), rt_nmg_idisk(), rt_nmg_import(), rt_nmg_import5(), rt_nmg_import_fastf(), rt_nmg_import_internal(), rt_nmg_magic_to_kind(), rt_nmg_reindex(), rt_nmg_shot(), rt_nugrid_cut(), rt_nurb_c_bound(), rt_nurb_c_check(), rt_nurb_c_print(), rt_nurb_import(), rt_nurb_intersect(), rt_nurb_kvmult(), rt_nurb_pr_kv(), rt_nurb_pr_mesh(), rt_nurb_print(), rt_nurb_print_pt_type(), rt_nurb_project_srf(), rt_nurb_s_bound(), rt_nurb_s_check(), rt_nurb_s_eval(), rt_nurb_s_print(), rt_nurb_shot(), rt_optim_tree(), rt_part_import(), rt_part_import5(), rt_part_prep(), rt_part_print(), rt_pg_export(), rt_pg_export5(), rt_pg_import(), rt_pg_import5(), rt_pg_print(), rt_pg_shot(), rt_pg_to_bot(), rt_pgface(), rt_pipe_ck(), rt_pipe_hitsort(), rt_pipe_import(), rt_pipe_norm(), rt_pipe_shot(), rt_pipept_print(), rt_plot_cell(), rt_plot_solid(), rt_pr_cut(), rt_pr_cut_info(), rt_pr_hit(), rt_pr_library_version(), rt_pr_mater(), rt_pr_partitions(), rt_pr_pt(), rt_pr_region(), rt_pr_seg(), rt_pr_soltab(), rt_pr_tol(), rt_pr_tree(), rt_pr_tree_val(), rt_pr_tree_vls(), rt_pr_uvcoord(), rt_prep_parallel(), rt_rec_curve(), rt_rec_norm(), rt_rec_shot(), rt_region_color_map(), rt_regionfix(), rt_retrieve_binunif(), rt_rhc_export(), rt_rhc_export5(), rt_rhc_import(), rt_rhc_import5(), rt_rhc_norm(), rt_rhc_plot(), rt_rhc_tess(), rt_rpc_export(), rt_rpc_export5(), rt_rpc_import(), rt_rpc_import5(), rt_rpc_norm(), rt_rpc_plot(), rt_rpc_tess(), rt_seg_planeclip(), rt_shoot_many_rays_worker(), rt_shootray(), rt_shootray_bundle(), rt_sketch_export(), rt_sketch_export5(), rt_sketch_ifree(), rt_sketch_import(), rt_sketch_import5(), rt_sketch_plot(), rt_smooth_bot(), rt_solid_bitfinder(), rt_spect_black_body(), rt_spect_black_body_fast(), rt_spect_black_body_points(), rt_spect_make_CIE_XYZ(), rt_sph_prep(), rt_sph_print(), rt_split_cmd(), rt_submodel_a_hit(), rt_submodel_curve(), rt_submodel_export(), rt_submodel_export5(), rt_submodel_import(), rt_submodel_import5(), rt_submodel_norm(), rt_submodel_plot(), rt_submodel_prep(), rt_submodel_print(), rt_submodel_wireframe_leaf(), rt_superell_curve(), rt_superell_import(), rt_superell_prep(), rt_superell_shot(), rt_superell_tess(), rt_superell_tnurb(), rt_superell_uv(), rt_tgc_import(), rt_tgc_norm(), rt_tgc_prep(), rt_tgc_print(), rt_tgc_shot(), rt_tgc_tess(), rt_tor_export(), rt_tor_import(), rt_tor_import5(), rt_tor_prep(), rt_tor_print(), rt_tor_shot(), rt_tree_elim_nops(), rt_tree_kill_dead_solid_refs(), rt_uv_in_trim(), rt_vlist_solid(), rt_vlist_to_uplot(), rt_vol_import(), rt_vol_import5(), rt_vol_norm(), rt_vol_print(), rt_vol_shot(), rt_weave0seg(), rt_xxx_import(), seg_to_vlist(), shoot_and_plot(), show_seg(), spm_dump(), spm_px_load(), spm_px_save(), spm_save(), tesselate_pipe_bend(), tesselate_pipe_end(), tesselate_pipe_linear(), tesselate_pipe_start(), wdb_dbopen(), wdb_export(), wdb_export_external(), wdb_getspace(), wdb_importFg4Section_cmd(), wdb_move_all_cmd(), and wdb_put_internal().

void bu_flog  ) 
 

Referenced by anim_mat_print(), and anim_mat_printf().

double bu_units_conversion const char *  str  ) 
 

B U _ U N I T S _ C O N V E R S I O N

Given a string representation of a unit of distance (eg, "feet"), return the multiplier which will convert that unit into millimeters.

Returns - 0.0 error >0.0 success

Definition at line 113 of file units.c.

Referenced by bu_tcl_units_conversion(), and vo_units_cmd().

const char* bu_units_string const double  mm  ) 
 

Referenced by db_fwrite_ident(), db_update_ident(), vo_units_cmd(), wdb_do_list(), and wdb_units_cmd().

double bu_mm_value const char *  s  ) 
 

B U _ M M _ V A L U E

Given a string of the form "25cm" or "5.2ft" returns the corresponding distance in mm.

Returns - -1 on error >0 on success

Definition at line 201 of file units.c.

References ptr.

Referenced by bu_mm_cvt(), bu_parse_mm(), and wdb_units_cmd().

void bu_mm_cvt register const struct bu_structparse sdp,
register const char *  name,
char *  base,
const char *  value
 

B U _ M M _ C V T

Used primarily as a hooked function for bu_structparse tables to allow input of floating point values in other units.

Definition at line 237 of file units.c.

References bu_mm_value().

Here is the call graph for this function:

struct bu_vls* bu_association const char *  fname,
const char *  value,
int  field_sep
 

B U _ A S S O C I A T I O N

Look up the association for a specified value

This function reads the specified file, searches for the first line of the form

                    <value><field_sep>...

and returns the rest of the line beyond the field separator.

Definition at line 68 of file association.c.

References bu_log(), bu_malloc(), bu_vls_addr(), bu_vls_gets(), bu_vls_init(), bu_vls_strcpy(), bu_vls_trunc(), buffer, fp, and NULL.

Here is the call graph for this function:

int bu_lex union bu_lex_token token,
struct bu_vls rtstr,
struct bu_lex_key keywords,
struct bu_lex_key symbols
 

B U _ L E X

Definition at line 170 of file lex.c.

References bu_bomb(), bu_free(), BU_LEX_INT, BU_LEX_NEED_MORE, bu_lex_token::t_int, bu_lex_token::type, and bu_lex_t_int::value.

Here is the call graph for this function:

long int bu_mread int  fd,
void *  bufp,
long int  n
 

"Multiple try" read. Read multiple times until quantity is obtained or an error occurs. This is useful for pipes.

Definition at line 60 of file mread.c.

void bu_mro_init_with_string struct bu_mro mrop,
const char *  string
 

Definition at line 104 of file mro.c.

References BU_MRO_INVALIDATE, BU_MRO_MAGIC, bu_vls_init(), bu_vls_strcpy(), bu_mro::magic, and bu_mro::string_rep.

Referenced by rt_gettree_region_end().

Here is the call graph for this function:

void bu_mro_set struct bu_mro mrop,
const char *  string
 

Definition at line 90 of file mro.c.

References BU_CK_MRO, BU_MRO_INVALIDATE, bu_vls_strcpy(), bu_vls_trunc(), and bu_mro::string_rep.

Here is the call graph for this function:

void bu_mro_init struct bu_mro mrop  ) 
 

Definition at line 65 of file mro.c.

References BU_MRO_INVALIDATE, BU_MRO_MAGIC, bu_vls_init(), bu_mro::magic, and bu_mro::string_rep.

Referenced by rt_load_attrs().

Here is the call graph for this function:

void bu_mro_free struct bu_mro mrop  ) 
 

Definition at line 77 of file mro.c.

References BU_CK_MRO, BU_MRO_INVALIDATE, bu_vls_free(), and bu_mro::string_rep.

Referenced by rt_clean(), rt_del_regtree(), and rt_load_attrs().

Here is the call graph for this function:

void port_setlinebuf FILE *  fp  ) 
 

deprecated call for compatibility

Definition at line 57 of file linebuf.c.

References bu_log(), and bu_setlinebuf().

Here is the call graph for this function:

HIDDEN void bu_log_call_hooks genptr_t  buf  ) 
 

Definition at line 177 of file log.c.

References bu_call_hook(), BU_LIST_FIRST, bu_log_hook_list, bu_hook_list::clientdata, bu_hook_list::hookfunc, and bu_hook_list::l.

Referenced by bu_flog(), bu_log(), and bu_putchar().

Here is the call graph for this function:

HIDDEN void bu_log_do_indent_level struct bu_vls new,
register char *  old
 

B U _ L O G _ D O _ I N D E N T _ L E V E L

This subroutine is used to append bu_log_indent_cur_level spaces into a printf() format specifier string, after each newline character is encountered. It exists primarily for bu_shootray() to affect the indentation level of all messages at that recursion level, even if the calls to bu_log come from non-librt routines.

Definition at line 211 of file log.c.

References bu_vls_putc().

Referenced by bu_flog(), and bu_log().

Here is the call graph for this function:

void bu_log char *  fmt,
,
,
,
d  ,
,
,
,
,
,
 

B U _ L O G

Log a library event in the Standard way.

Definition at line 275 of file log.c.

References bu_bomb(), bu_call_hook(), BU_LIST_IS_EMPTY, bu_log_call_hooks(), bu_log_do_indent_level(), bu_log_hook_list, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_setlinebuf(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), bu_vls_strlen(), bu_hook_list::l, and void().

Here is the call graph for this function:

void bu_flog FILE *  fp,
char *  fmt,
,
,
,
d  ,
,
,
,
,
,
 

B U _ F L O G

Log a library event in the Standard way, to a specified file.

Definition at line 391 of file log.c.

References bu_bomb(), bu_call_hook(), BU_LIST_IS_EMPTY, bu_log_call_hooks(), bu_log_do_indent_level(), bu_log_hook_list, BU_SEM_SYSCALL, bu_semaphore_acquire(), bu_semaphore_release(), bu_vls_addr(), bu_vls_free(), bu_vls_init(), bu_vls_printf(), bu_vls_strlen(), and bu_hook_list::l.

Here is the call graph for this function:

int bu_whereis char *  argv[],
int  lim,
const char *  cmd
 

b u _ w h e r e i s

Sets argv array of path matches to the given executable cmd name returning up to lim number of occurances found. the system environment path is obtained via a sysctl call for the ``user.cs_path'' string. In the absense of sysctl, getenv will be used for the user PATH instead.

It is the callers responsibility to allocate sufficient memory to the argv array itself (lim elements), memory for the array contents will be automatically allocated as needed. It is the callers responsibility to free the array contents with bu_free_array() as well as the argv array itself.

Definition at line 71 of file whereis.c.

References bu_bomb(), bu_calloc(), bu_log(), BU_PATH_SEPARATOR, getenv(), NULL, and perror().

Here is the call graph for this function:

int bu_which char *  argv[],
int  lim,
const char *  cmd
 

b u _ w h i c h

Sets argv array of path matches to the given executable cmd name returning up to lim number of occurances found. the user path is obtained getenv(PATH) or in its absense, via the sysctl ``user.cs_path'' string.

It is the callers responsibility to allocate sufficient memory to the argv array itself (lim elements), memory for the array contents will be automatically allocated as needed. It is the callers responsibility to free the array contents with bu_free_array() as well as the argv array itself.

Definition at line 70 of file which.c.

References bu_bomb(), bu_calloc(), bu_file_exists(), bu_log(), bu_malloc(), BU_PATH_SEPARATOR, getenv(), NULL, and perror().

Here is the call graph for this function:


Variable Documentation

struct bu_hook_list bu_bomb_hook_list
 

Initial value:

Definition at line 63 of file bomb.c.

Referenced by bu_bomb(), and Bu_Init().

int bu_setjmp_valid = 0
 

!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().

struct bu_hook_list bu_log_hook_list
 

Initial value:

Definition at line 103 of file log.c.

Referenced by bu_flog(), Bu_Init(), bu_log(), bu_log_add_hook(), bu_log_call_hooks(), bu_log_delete_hook(), and bu_putchar().


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