Collaboration diagram for libbu (utility functions):
![]() |
Files | |
file | bu.h |
Header file for the BRL-CAD Utility Library, LIBBU. | |
file | cmd.h |
Command history data structures. | |
Modules | |
Attribute/Value Sets | |
Bit Vectors | |
Color | |
Debugging | |
Endian Support | |
getopt | |
Hashing | |
Histogram Support | |
Linked Lists | |
Mapped Files | |
Memory | |
Magic Numbers | |
Multiply Represented Objects | |
Parallel processing, semaphores | |
Pointer Tables | |
File I/O | |
RedBlack trees | |
Structure Parse/Print/read/write | |
Tcl | |
Variable Length Strings | |
vector fonts | |
Data Conversion | |
Data Structures | |
struct | bu_cmdhist |
struct | bu_cmdhist_obj |
Defines | |
#define | BU_H_VERSION "@(#)$Header: /cvsroot/brlcad/brlcad/include/bu.h,v 14.38 2006/09/18 05:24:07 lbutler Exp $ (BRL)" |
#define | BU_DIR_SEPARATOR '/' |
#define | MAXPATHLEN 1024 |
#define | BU_PATH_SEPARATOR ':' |
#define | BU_FLSTR __FILE__ ":" bu_cpp_xstr(__LINE__) |
#define | bu_cpp_str(s) # s |
#define | bu_cpp_xstr(s) bu_cpp_str(s) |
#define | bu_cpp_glue(a, b) a ## b |
#define | bu_cpp_xglue(a, b) bu_cpp_glue(a, b) |
#define | BU_QFLSTR bu_cpp_xstr(__FILE__ line __LINE__) |
#define | BU_EXTERN(type_and_name, args) extern type_and_name() |
#define | BU_ARGS(args) () |
#define | BU_FORTRAN(lc, uc) lc |
#define | BU_GETSTRUCT(_p, _str) _p = (struct _str *)bu_calloc(1,sizeof(struct _str), "_str (getstruct)" ) |
#define | BU_GETUNION(_p, _unn) _p = (union _unn *)bu_calloc(1,sizeof(union _unn), "_unn (getunion)" ) |
#define | BU_GETTYPE(_p, _type) _p = (_type *)bu_calloc(1,sizeof(_type), "_type (getstruct)") |
#define | BU_CKMAG(_ptr, _magic, _str) |
#define | BU_CKMAG_TCL(_interp, _ptr, _magic, _str) |
#define | BU_ASSERT(_equation) |
#define | BU_ASSERT_PTR(_lhs, _relation, _rhs) |
#define | BU_ASSERT_LONG(_lhs, _relation, _rhs) |
#define | BU_ASSERT_DOUBLE(_lhs, _relation, _rhs) |
#define | MAXARGS 9000 |
#define | CMD_NULL (int (*)())NULL |
#define | CMDHIST_NULL (struct bu_cmdhist *)NULL |
#define | CMDHIST_OBJ_NULL (struct bu_cmdhist_obj *)NULL |
Functions | |
int | bu_cmd () |
void | bu_register_cmds () |
int | bu_cmdhist_history () |
int | bu_cmdhist_add () |
int | bu_cmdhist_curr () |
int | bu_cmdhist_next () |
int | bu_cmdhist_prev () |
int | cho_open_tcl () |
|
|
|
define BU_DIR_SEPARATOR to the directory separator character Definition at line 102 of file bu.h. Referenced by bu_brlcad_root(). |
|
Maximum length of a filesystem path. Typically defined in a system file but if it isn't set, we create it. Definition at line 112 of file bu.h. Referenced by bu_fopen_uniq(). |
|
set to the path list separator character Definition at line 124 of file bu.h. Referenced by bu_whereis(), and bu_which(). |
|
Macro for getting a concatenated string of the current file and line number. Produces something of the form: "filename.c"":""1234" Definition at line 139 of file bu.h. Referenced by db_get_directory(), rt_memclose(), and rt_memfree(). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
B U _ F O R T R A N This macro is used to take the 'C' function name, and convert it at compile time to the FORTRAN calling convention used for this particular system. Both lower-case and upper-case alternatives have to be provided because there is no way to get the C preprocessor to change the case of a token. |
|
|
Allocate storage for a union Definition at line 202 of file bu.h. Referenced by add_solid(), build_etree(), and rt_cut_it(). |
|
B U _ G E T T Y P E Acquire storage for a given TYPE, eg, BU_GETTYPE(ptr, typename); Equivalent to BU_GETSTRUCT, except without the 'struct' Useful for typedef'ed objects. |
|
Value: if( !(_ptr) || ( ((long)(_ptr)) & (sizeof(long)-1) ) || \ *((unsigned long *)(_ptr)) != (unsigned long)(_magic) ) { \ bu_badmagic( (long *)(_ptr), (unsigned long)_magic, _str, __FILE__, __LINE__ ); \ } Definition at line 235 of file bu.h. Referenced by _rb_neighbor(), _rb_rot_left(), _rb_rot_right(), _rb_walk(), bu_rb_curr(), bu_rb_delete(), bu_rb_diagnose_tree(), bu_rb_extreme(), bu_rb_free(), bu_rb_free_node(), bu_rb_free_package(), bu_rb_insert(), bu_rb_is_uniq(), bu_rb_neighbor(), bu_rb_rank(), bu_rb_search(), bu_rb_select(), bu_rb_set_uniqv(), bu_rb_summarize_tree(), bu_rb_walk(), bu_semaphore_acquire(), and bu_semaphore_release(). |
|
Value: if( !(_ptr) || ( ((long)(_ptr)) & (sizeof(long)-1) ) || \ *((long *)(_ptr)) != (_magic) ) { \ bu_badmagic_tcl( (_interp), (long *)(_ptr), (unsigned long)_magic, _str, __FILE__, __LINE__ ); \ return TCL_ERROR; \ } |
|
Value: if( !(_equation) ) { \ bu_log("BU_ASSERT( _equation ) failed, file %s, line %d\n", \ __FILE__, __LINE__ ); \ bu_bomb("assertion failure\n"); \ } Quick and easy macros to generate an informative error message and abort execution if the specified condition does not hold true. Definition at line 276 of file bu.h. Referenced by bn_tabdata_mk_linear_filter(), bu_realloc(), rt_binunif_make(), rt_ct_piececount(), rt_cut_extend(), rt_dsp_make(), rt_ebm_make(), rt_generic_make(), rt_submodel_export(), and rt_submodel_export5(). |
|
Value: if( !((_lhs) _relation (_rhs)) ) { \ bu_log("BU_ASSERT_PTR( _lhs _relation _rhs ) failed, lhs=x%lx, rhs=x%lx, file %s, line %d\n", \ (long)(_lhs), (long)(_rhs),\ __FILE__, __LINE__ ); \ bu_bomb("BU_ASSERT_PTR failure\n"); \ } Definition at line 297 of file bu.h. Referenced by bu_open_mapped_file_with_path(), db5_export_object3(), db5_import_attributes(), db_ck_tree(), db_get_directory(), db_tree_flatten_describe(), rt_cell_n_on_ray(), rt_comb_export5(), rt_init_resource(), rt_prep_parallel(), rt_shootray(), rt_shootray_bundle(), and wdb_rt_gettrees_cmd(). |
|
|
Value: if( !((_lhs) _relation (_rhs)) ) { \ bu_log("BU_ASSERT_DOUBLE( _lhs _relation _rhs ) failed, lhs=%lf, rhs=%lf, file %s, line %d\n", \ (long)(_lhs), (long)(_rhs),\ __FILE__, __LINE__ ); \ bu_bomb("BU_ASSERT_DOUBLE failure\n"); \ } Example: BU_ASSERT_LONG( j+7, <, 42 ); Definition at line 343 of file bu.h. Referenced by rt_submodel_a_hit(). |
|
Definition at line 38 of file cmd.h. Referenced by dgo_rt_cmd(), dgo_rtcheck_cmd(), dgo_vnirt_cmd(), wdb_cat_cmd(), wdb_comb_cmd(), wdb_expand_cmd(), wdb_find_cmd(), wdb_group_cmd(), wdb_keep_cmd(), wdb_kill_cmd(), wdb_killall_cmd(), wdb_killtree_cmd(), wdb_list_cmd(), wdb_ls_cmd(), wdb_make_bb_cmd(), wdb_pathsum_cmd(), wdb_push_cmd(), wdb_region_cmd(), wdb_remove_cmd(), wdb_title_cmd(), wdb_tree_cmd(), and wdb_which_cmd(). |
|
|
|
|
|
Definition at line 41 of file cmd.h. Referenced by cho_open_tcl(). |
|
Referenced by cho_hist(), dgo_cmd(), dgo_observer_cmd(), dgo_vdraw_cmd(), vo_observer_cmd(), and wdb_observer_cmd(). |
|
Referenced by bu_tcl_setup(). |
|
|
|
|
|
|
|
|
|
|
|
Referenced by Cho_Init(). |