bu.h File Reference

Header file for the BRL-CAD Utility Library, LIBBU. More...

#include "common.h"
#include "tcl.h"
#include <setjmp.h>

Include dependency graph for bu.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  bu_list
struct  bu_bitv
 Bit vector data structure. More...
struct  bu_hist
 histogram support More...
struct  bu_ptbl
 Support for generalized "pointer tables". More...
struct  bu_mapped_file
 Structure for opening a mapped file. Each file is opened and mapped only once (per application, as tagged by the string in "appl" field). Subsequent opens require an exact match on both strings. More...
struct  bu_hook_list
struct  bu_attribute_value_pair
struct  bu_attribute_value_set
struct  bu_vls
struct  bu_mro
struct  bu_structparse
struct  bu_external
struct  bu_color
struct  bu_rb_list
struct  bu_rb_tree
struct  bu_rb_package
struct  bu_rb_node
struct  bu_observer
struct  bu_cmdtab
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
struct  bu_hash_entry
struct  bu_hash_tbl
struct  bu_hash_record
#define BU_PTBL_MAGIC   0x7074626c
#define BU_CK_PTBL(_p)   BU_CKMAG(_p, BU_PTBL_MAGIC, "bu_ptbl")
#define BU_PTBL_INIT   0
 initialize table pointer struct & get storage
#define BU_PTBL_INS   1
 insert an item (long *) into a table
#define BU_PTBL_LOC   2
 locate a (long *) in an existing table
#define BU_PTBL_FREE   3
 deallocate buffer associated with a table
#define BU_PTBL_RST   4
 empty a table, but keep storage on hand
#define BU_PTBL_CAT   5
 catenate one table onto another
#define BU_PTBL_RM   6
 remove all occurrences of an item from a table
#define BU_PTBL_INS_UNIQUE   7
 insert item into table, if not present
#define BU_PTBL_ZERO   8
 replace all occurrences of an item by 0
#define BU_PTBL_BASEADDR(ptbl)   ((ptbl)->buffer)
#define BU_PTBL_LASTADDR(ptbl)   ((ptbl)->buffer + (ptbl)->end - 1)
#define BU_PTBL_END(ptbl)   ((ptbl)->end)
#define BU_PTBL_LEN(p)   ((p)->end)
#define BU_PTBL_GET(ptbl, i)   ((ptbl)->buffer[(i)])
#define BU_PTBL_SET(ptbl, i, val)   ((ptbl)->buffer[(i)] = (long*)(val))
#define BU_PTBL_TEST(ptbl)   ((ptbl)->l.magic == BU_PTBL_MAGIC)
#define BU_PTBL_CLEAR_I(_ptbl, _i)   ((_ptbl)->buffer[(_i)] = (long *)0)
#define BU_PTBL_FOR(ip, cast, ptbl)   ip = cast BU_PTBL_LASTADDR(ptbl); ip >= cast BU_PTBL_BASEADDR(ptbl); ip--
#define BU_MAPPED_FILE_MAGIC   0x4d617066
#define BU_CK_MAPPED_FILE(_p)   BU_CKMAG(_p, BU_MAPPED_FILE_MAGIC, "bu_mapped_file")

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_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_FLSTR   __FILE__ ":" bu_cpp_xstr(__LINE__)
#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 SIZEOF_NETWORK_SHORT   2
#define SIZEOF_NETWORK_LONG   4
#define SIZEOF_NETWORK_FLOAT   4
#define SIZEOF_NETWORK_DOUBLE   8
#define CV_CHANNEL_MASK   0x00ff
#define CV_HOST_MASK   0x0100
#define CV_SIGNED_MASK   0x0200
#define CV_TYPE_MASK   0x1c00
#define CV_CONVERT_MASK   0x6000
#define CV_TYPE_SHIFT   10
#define CV_CONVERT_SHIFT   13
#define CV_8   0x0400
#define CV_16   0x0800
#define CV_32   0x0c00
#define CV_64   0x1000
#define CV_D   0x1400
#define CV_CLIP   0x0000
#define CV_NORMAL   0x2000
#define CV_LIT   0x4000
#define IND_NOTSET   0
#define IND_BIG   1
#define IND_LITTLE   2
#define IND_ILL   3
#define IND_CRAY   4
#define BU_LIST_HEAD_MAGIC   0x01016580
#define BU_LIST_NULL   ((struct bu_list *)0)
#define BU_LIST_CLOSE(hp)
#define BU_LIST_INSERT(old, new)
#define BU_LIST_APPEND(old, new)
#define BU_LIST_DEQUEUE(cur)
#define BU_LIST_DQ(cur)
#define BU_LIST_DQ_T(cur, type)
#define BU_LIST_DEQUEUE_T(cur, type)
#define BU_LIST_PUSH(hp, p)   BU_LIST_APPEND(hp, (struct bu_list *)(p))
#define BU_LIST_POP(structure, hp, p)
#define BU_LIST_POP_T(hp, type)   (type *)bu_list_pop( hp )
#define BU_LIST_INSERT_LIST(dest_hp, src_hp)
#define BU_LIST_APPEND_LIST(dest_hp, src_hp)
#define BU_LIST_IS_EMPTY(hp)   ((hp)->forw == (hp))
#define BU_LIST_NON_EMPTY(hp)   ((hp)->forw != (hp))
#define BU_LIST_NON_EMPTY_P(p, structure, hp)   (((p)=(struct structure *)((hp)->forw)) != (struct structure *)(hp))
#define BU_LIST_IS_CLEAR(hp)
#define BU_LIST_UNINITIALIZED(hp)   ((hp)->forw == BU_LIST_NULL)
#define BU_LIST_IS_INITIALIZED(hp)   ((hp)->forw != BU_LIST_NULL)
#define BU_LIST_INIT(hp)
#define BU_LIST_MAGIC_SET(hp, val)   {(hp)->magic = (val);}
#define BU_LIST_MAGIC_OK(hp, val)   ((hp)->magic == (val))
#define BU_LIST_MAGIC_WRONG(hp, val)   ((hp)->magic != (val))
#define BU_LIST_LAST(structure, hp)   ((struct structure *)((hp)->back))
#define BU_LIST_BACK(structure, hp)   ((struct structure *)((hp)->back))
#define BU_LIST_PREV(structure, hp)   ((struct structure *)((hp)->back))
#define BU_LIST_FIRST(structure, hp)   ((struct structure *)((hp)->forw))
#define BU_LIST_FORW(structure, hp)   ((struct structure *)((hp)->forw))
#define BU_LIST_NEXT(structure, hp)   ((struct structure *)((hp)->forw))
#define BU_LIST_IS_HEAD(p, hp)   (((struct bu_list *)(p)) == (hp))
#define BU_LIST_NOT_HEAD(p, hp)   (((struct bu_list *)(p)) != (hp))
#define BU_CK_LIST_HEAD(_p)   BU_CKMAG( (_p), BU_LIST_HEAD_MAGIC, "bu_list")
#define BU_LIST_PREV_IS_HEAD(p, hp)   (((struct bu_list *)(p))->back == (hp))
#define BU_LIST_PREV_NOT_HEAD(p, hp)   (((struct bu_list *)(p))->back != (hp))
#define BU_LIST_NEXT_IS_HEAD(p, hp)   (((struct bu_list *)(p))->forw == (hp))
#define BU_LIST_NEXT_NOT_HEAD(p, hp)   (((struct bu_list *)(p))->forw != (hp))
#define BU_LIST_EACH(hp, p, type)
#define BU_LIST_REVEACH(hp, p, type)
#define BU_LIST_TAIL(hp, start, p, type)
#define BU_LIST_FOR(p, structure, hp)
#define BU_LIST_FOR_BACKWARDS(p, structure, hp)
#define BU_LIST_FOR_CIRC(p, structure, hp)
#define BU_LIST_FOR2(p1, p2, structure, hp1, hp2)
#define BU_LIST_WHILE(p, structure, hp)   (((p)=(struct structure *)((hp)->forw)) != (struct structure *)(hp))
#define BU_LIST_FIRST_MAGIC(hp)   ((hp)->forw->magic)
#define BU_LIST_LAST_MAGIC(hp)   ((hp)->back->magic)
#define BU_LIST_PNEXT(structure, p)   ((struct structure *)(((struct bu_list *)(p))->forw))
#define BU_LIST_PLAST(structure, p)   ((struct structure *)(((struct bu_list *)(p))->back))
#define BU_LIST_PNEXT_PNEXT(structure, p)   ((struct structure *)(((struct bu_list *)(p))->forw->forw))
#define BU_LIST_PNEXT_PLAST(structure, p)   ((struct structure *)(((struct bu_list *)(p))->forw->back))
#define BU_LIST_PLAST_PNEXT(structure, p)   ((struct structure *)(((struct bu_list *)(p))->back->forw))
#define BU_LIST_PLAST_PLAST(structure, p)   ((struct structure *)(((struct bu_list *)(p))->back->back))
#define BU_LIST_PNEXT_CIRC(structure, p)
#define BU_LIST_PPREV_CIRC(structure, p)
#define BU_LIST_MAIN_PTR(_type, _ptr2, _name2)   ((struct _type *)(((char *)(_ptr2)) - offsetof(struct _type, _name2.magic)))
#define BU_BITV_MAGIC   0x62697476
#define BU_CK_BITV(_vp)   BU_CKMAG(_vp, BU_BITV_MAGIC, "bu_bitv")
#define BU_BITS2BYTES(_nb)   (BU_BITS2WORDS(_nb)*sizeof(bitv_t))
#define BU_BITS2WORDS(_nb)   (((_nb)+BITV_MASK)>>BITV_SHIFT)
#define BU_WORDS2BITS(_nw)   ((_nw)*sizeof(bitv_t)*8)
#define BU_BITTEST(_bv, bit)   (((_bv)->bits[(bit)>>BITV_SHIFT] & (((bitv_t)1)<<((bit)&BITV_MASK)))!=0)
#define BU_BITSET(_bv, bit)   ((_bv)->bits[(bit)>>BITV_SHIFT] |= (((bitv_t)1)<<((bit)&BITV_MASK)))
#define BU_BITCLR(_bv, bit)   ((_bv)->bits[(bit)>>BITV_SHIFT] &= ~(((bitv_t)1)<<((bit)&BITV_MASK)))
#define BU_BITV_ZEROALL(_bv)   { memset( (char *)((_bv)->bits), 0, BU_BITS2BYTES( (_bv)->nbits ) ); }
#define BU_BITV_BITNUM_CHECK(_bv, _bit)
#define BU_BITV_NBITS_CHECK(_bv, _nbits)
#define BU_BITV_LOOP_START(_bv)
#define BU_BITV_LOOP_INDEX   ((_wd << BITV_SHIFT) | _b)
#define BU_BITV_LOOP_END
#define BU_HIST_MAGIC   0x48697374
#define BU_CK_HIST(_p)   BU_CKMAG(_p, BU_HIST_MAGIC, "struct bu_hist")
#define BU_HIST_TALLY(_hp, _val)
#define BU_HIST_TALLY_MULTIPLE(_hp, _val, _count)
#define BUHOOK_NULL   0
#define BUHOOK_LIST_MAGIC   0x90d5dead
#define BUHOOK_LIST_NULL   ((struct bu_hook_list *) 0)
#define BU_AVS_MAGIC   0x41765321
#define BU_CK_AVS(_avp)   BU_CKMAG(_avp, BU_AVS_MAGIC, "bu_attribute_value_set")
#define BU_AVS_FOR(_pp, _avp)   (_pp) = &(_avp)->avp[(_avp)->count-1]; (_pp) >= (_avp)->avp; (_pp)--
#define AVS_IS_FREEABLE(_avsp, _p)
#define BU_VLS_MAGIC   0x89333bbb
#define BU_CK_VLS(_vp)   BU_CKMAG(_vp, BU_VLS_MAGIC, "bu_vls")
#define BU_VLS_IS_INITIALIZED(_vp)   ((_vp) && ((_vp)->vls_magic == BU_VLS_MAGIC))
#define BU_SEM_SYSCALL   0
#define BU_SEM_LISTS   1
#define BU_SEM_BN_NOISE   2
#define BU_SEM_MAPPEDFILE   3
#define BU_SEM_LAST   (BU_SEM_MAPPEDFILE+1)
#define BU_SETJUMP   setjmp((bu_setjmp_valid=1,bu_jmpbuf))
#define BU_UNSETJUMP   (bu_setjmp_valid=0)
#define BU_MRO_MAGIC   0x4D524F4F
#define BU_CK_MRO(_vp)   BU_CKMAG(_vp, BU_MRO_MAGIC, "bu_mro")
#define BU_MRO_INVALIDATE(_p)
#define BU_MRO_GETDOUBLE(_p)
#define BU_MRO_GETLONG(_p)
#define BU_MRO_GETSTRING(_p)   bu_vls_addr( &_p->string_rep )
#define BU_MRO_STRLEN(_p)   bu_vls_strlen( &_p->string_rep )
#define BU_DEBUG_OFF   0
#define BU_DEBUG_COREDUMP   0x00000001
#define BU_DEBUG_MEM_CHECK   0x00000002
#define BU_DEBUG_MEM_LOG   0x00000004
#define BU_DEBUG_DB   0x00000008
#define BU_DEBUG_PARALLEL   0x00000010
#define BU_DEBUG_MEM_QCHECK   0x00000020
#define BU_DEBUG_MATH   0x00000100
#define BU_DEBUG_PTBL   0x00000200
#define BU_DEBUG_AVS   0x00000400
#define BU_DEBUG_MAPPED_FILE   0x00000800
#define BU_DEBUG_TABDATA   0x00010000
#define BU_DEBUG_FORMAT   "\020\\025TABDATA\\015?\\014MAPPED_FILE\013AVS\012PTBL\011MATH\010?\7?\6MEM_QCHECK\5PARALLEL\\4?\3MEM_LOG\2MEM_CHECK\1COREDUMP"
#define bu_offsetofarray(_t, _m)   (int)( (((_t *)0)->_m))
#define bu_offsetof(_t, _m)   (int)(&(((_t *)0)->_m))
#define bu_byteoffset(_i)   ((int)(((char *)&(_i))-((char *)0)))
#define BU_STRUCTPARSE_FUNC_NULL   ((void (*)())0)
#define BU_EXTERNAL_MAGIC   0x768dbbd0
#define BU_INIT_EXTERNAL(_p)
#define BU_CK_EXTERNAL(_p)   BU_CKMAG(_p, BU_EXTERNAL_MAGIC, "bu_external")
#define HUE   0
#define SAT   1
#define VAL   2
#define ACHROMATIC   -1.0
#define BU_COLOR_MAGIC   0x6275636c
#define BU_COLOR_NULL   ((struct bu_color *) 0)
#define BU_CK_COLOR(_bp)   BU_CKMAG(_bp, BU_COLOR_MAGIC, "bu_color")
#define rbl_magic   l.magic
#define rbl_node   rbl_u.rbl_n
#define rbl_package   rbl_u.rbl_p
#define BU_RB_LIST_NULL   ((struct bu_rb_list *) 0)
#define BU_RB_TREE_NULL   ((bu_rb_tree *) 0)
#define BU_RB_TREE_MAGIC   0x72627472
#define BU_RB_DEBUG_INSERT   0x00000001
 Insertion process.
#define BU_RB_DEBUG_UNIQ   0x00000002
 Uniqueness of inserts.
#define BU_RB_DEBUG_ROTATE   0x00000004
 Rotation process.
#define BU_RB_DEBUG_OS   0x00000008
 Order-statistic operations.
#define BU_RB_DEBUG_DELETE   0x00000010
 Deletion process.
#define BU_RB_PKG_NULL   ((struct bu_rb_package *) 0)
#define BU_RB_NODE_NULL   ((struct bu_rb_node *) 0)
#define SENSE_MIN   0
#define SENSE_MAX   1
#define bu_rb_min(t, o)   bu_rb_extreme((t), (o), SENSE_MIN)
#define bu_rb_max(t, o)   bu_rb_extreme((t), (o), SENSE_MAX)
#define bu_rb_pred(t, o)   bu_rb_neighbor((t), (o), SENSE_MIN)
#define bu_rb_succ(t, o)   bu_rb_neighbor((t), (o), SENSE_MAX)
#define PREORDER   0
#define INORDER   1
#define POSTORDER   2
#define BU_OBSERVER_NULL   ((struct bu_observer *)0)
#define bu_made_it()
#define bu_strdup(s)   bu_strdupm(s, "bu_srtdup " BU_FLSTR)
#define bu_rb_delete1(t)   bu_rb_delete((t), 0)
#define bu_rb_curr1(t)   bu_rb_curr((t), 0)
#define BU_RB_RETAIN_DATA   ((void (*)()) 0)
#define bu_rb_free1(t, f)
#define bu_rb_is_uniq1(t)   bu_rb_is_uniq((t), 0)
#define bu_rb_uniq_off1(t)   bu_rb_uniq_off((t), 0)
#define bu_rb_uniq_on1(t)   bu_rb_uniq_on((t), 0)
#define bu_rb_rank1(t)   bu_rb_rank1((t), 0)
#define bu_rb_select1(t, k)   bu_rb_select((t), 0, (k))
#define bu_rb_search1(t, d)   bu_rb_search((t), 0, (d))
#define bu_rb_walk1(t, v, d)   bu_rb_walk((t), 0, (v), (d))
#define BU_GLONGLONG(_cp)
#define BU_GLONG(_cp)
#define BU_GSHORT(_cp)
#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
#define BU_HASH_TBL_MAGIC   0x48415348
#define BU_HASH_RECORD_MAGIC   0x68617368
#define BU_HASH_ENTRY_MAGIC   0x48454E54
#define BU_CK_HASH_TBL(_hp)   BU_CKMAG( _hp, BU_HASH_TBL_MAGIC, "bu_hash_tbl" )
#define BU_CK_HASH_RECORD(_rp)   BU_CKMAG( _rp, BU_HASH_RECORD_MAGIC, "bu_hash_record" )
#define BU_CK_HASH_ENTRY(_ep)   BU_CKMAG( _ep, BU_HASH_ENTRY_MAGIC, "bu_hash_entry" )

Typedefs

typedef bu_list bu_list_t
typedef int bu_hook_t BU_ARGS ((genptr_t, genptr_t))

Functions

int bu_cv_itemlen (int cookie)
int bu_cv_cookie (char *in)
int bu_cv_optimize (int cookie)
int bu_cv_w_cookie (genptr_t out, int outcookie, size_t size, genptr_t in, int incookie, int count)
 convert with cookie
int bu_cv_ntohss (signed short *, size_t, genptr_t, int)
int bu_cv_ntohus (unsigned short *, size_t, genptr_t, int)
int bu_cv_ntohsl (signed long int *, size_t, genptr_t, int)
int bu_cv_ntohul (unsigned long int *, size_t, genptr_t, int)
int bu_cv_htonss (genptr_t, size_t, signed short *, int)
int bu_cv_htonus (genptr_t, size_t, unsigned short *, int)
int bu_cv_htonsl (genptr_t, size_t, long *, int)
int bu_cv_htonul (genptr_t, size_t, unsigned long *, int)
bu_listbu_list_new ()
bu_listbu_list_pop (struct bu_list *hp)
void bu_avs_init (struct bu_attribute_value_set *avsp, int len, const char *str)
 initialize avs with storage for len entries
void bu_avs_init_empty (struct bu_attribute_value_set *avsp)
 initialize an empty avs
bu_attribute_value_setbu_avs_new (int len, const char *str)
 Allocate storage for a new attribute/value set, with at least 'len' slots pre-allocated.
int bu_avs_add (struct bu_attribute_value_set *avp, const char *attribute, const char *value)
int bu_avs_add_vls (struct bu_attribute_value_set *avp, const char *attribute, const struct bu_vls *value_vls)
void bu_avs_merge (struct bu_attribute_value_set *dest, const struct bu_attribute_value_set *src)
 Take all the attributes from 'src' and merge them into 'dest'.
const char * bu_avs_get (const struct bu_attribute_value_set *avp, const char *attribute)
int bu_avs_remove (struct bu_attribute_value_set *avsp, const char *attribute)
 Remove the given attribute from the set.
void bu_avs_free (struct bu_attribute_value_set *avp)
void bu_avs_print (const struct bu_attribute_value_set *avp, const char *title)
void bu_avs_add_nonunique (struct bu_attribute_value_set *avsp, char *attribute, char *value)
 Add a name/value pair even if the name already exists in this AVS.
void bu_badmagic (const long *ptr, unsigned long magic, const char *str, const char *file, int line)
bu_bitvbu_bitv_new (unsigned int nbits)
 Allocate storage for a new bit vector of at least 'nbits' in length. For efficiency, the bit vector itself is not initialized.
void bu_bitv_clear (struct bu_bitv *bv)
 Set all the bits in the bit vector to zero.
void bu_bitv_or (struct bu_bitv *ov, const struct bu_bitv *iv)
void bu_bitv_and (struct bu_bitv *ov, const struct bu_bitv *iv)
void bu_bitv_vls (struct bu_vls *v, const struct bu_bitv *bv)
void bu_pr_bitv (const char *str, const struct bu_bitv *bv)
void bu_bitv_to_hex (struct bu_vls *v, const struct bu_bitv *bv)
bu_bitvbu_hex_to_bitv (const char *str)
 Convert a string of HEX digits (as produces by bu_bitv_to_hex) into a bit vector.
bu_bitvbu_bitv_dup (const struct bu_bitv *bv)
void bu_bitv_free (struct bu_bitv *bv)
 Release all internal storage for this bit vector.
void bu_bomb (const char *str)
 Abort the program with a message.
char * bu_fgets (char *s, int size, FILE *stream)
void bu_rgb_to_hsv (unsigned char *rgb, fastf_t *hsv)
int bu_hsv_to_rgb (fastf_t *hsv, unsigned char *rgb)
int bu_str_to_rgb (char *str, unsigned char *rgb)
void bu_color_of_rgb_chars (struct bu_color *cp, unsigned char *rgb)
int bu_color_to_rgb_chars (struct bu_color *cp, unsigned char *rgb)
int bu_color_of_rgb_floats (struct bu_color *cp, fastf_t *rgb)
int bu_color_to_rgb_floats (struct bu_color *cp, fastf_t *rgb)
int bu_color_of_hsv_floats (struct bu_color *cp, fastf_t *hsv)
int bu_color_to_hsv_floats (struct bu_color *cp, fastf_t *hsv)
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.
int bu_getopt (int nargc, char *const nargv[], const char *ostr)
void bu_hist_free (struct bu_hist *histp)
void bu_hist_init (struct bu_hist *histp, fastf_t min, fastf_t max, unsigned int nbins)
void bu_hist_range (struct bu_hist *hp, fastf_t low, fastf_t high)
void bu_hist_pr (const struct bu_hist *histp, const char *title)
void htond (unsigned char *out, const unsigned char *in, int count)
void ntohd (unsigned char *out, const unsigned char *in, int count)
void htonf (unsigned char *out, const unsigned char *in, int count)
void ntohf (unsigned char *out, const unsigned char *in, int count)
int bu_is_parallel ()
void bu_kill_parallel ()
void bu_setlinebuf (FILE *fp)
int bu_list_len (const struct bu_list *hd)
void bu_list_reverse (struct bu_list *hd)
void bu_list_free (struct bu_list *hd)
void bu_list_parallel_append (struct bu_list *headp, struct bu_list *itemp)
bu_listbu_list_parallel_dequeue (struct bu_list *headp)
void bu_ck_list (const struct bu_list *hd, const char *str)
void bu_ck_list_magic (const struct bu_list *hd, const char *str, const long magic)
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 ()
const char * bu_identify_magic (long magic)
genptr_t bu_malloc (unsigned int cnt, const char *str)
void bu_free (genptr_t ptr, const char *str)
genptr_t bu_realloc (genptr_t ptr, unsigned int cnt, const char *str)
genptr_t bu_calloc (unsigned int nelem, unsigned int elsize, const char *str)
void bu_prmem (const char *str)
char * bu_strdupm (const char *cp, const char *label)
char * bu_dirname (const char *cp)
int bu_malloc_len_roundup (int nbytes)
void bu_ck_malloc_ptr (genptr_t ptr, const char *str)
int bu_mem_barriercheck ()
bu_mapped_filebu_open_mapped_file (const char *name, const char *appl)
void bu_close_mapped_file (struct bu_mapped_file *mp)
void bu_pr_mapped_file (const char *title, const struct bu_mapped_file *mp)
void bu_free_mapped_files (int verbose)
bu_mapped_filebu_open_mapped_file_with_path (char *const *path, const char *name, const char *appl)
void bu_nice_set (int newnice)
int bu_cpulimit_get ()
void bu_cpulimit_set (int sec)
int bu_avail_cpus ()
fastf_t bu_get_load_average ()
int bu_get_public_cpus ()
int bu_set_realtime ()
void bu_parallel (void(*func)(), int ncpu, genptr_t arg)
int bu_struct_export (struct bu_external *ext, const genptr_t base, const struct bu_structparse *imp)
int bu_struct_import (genptr_t base, const struct bu_structparse *imp, const struct bu_external *ext)
int bu_struct_put (FILE *fp, const struct bu_external *ext)
int bu_struct_get (struct bu_external *ext, FILE *fp)
void bu_struct_wrap_buf (struct bu_external *ext, genptr_t buf)
int bu_struct_parse (const struct bu_vls *in_vls, const struct bu_structparse *desc, const char *base)
void bu_struct_print (const char *title, const struct bu_structparse *parsetab, const char *base)
void bu_vls_struct_print (struct bu_vls *vls, const struct bu_structparse *sdp, const char *base)
void bu_vls_struct_print2 (struct bu_vls *vls, const char *title, const struct bu_structparse *sdp, const char *base)
void bu_vls_struct_item (struct bu_vls *vp, const struct bu_structparse *sdp, const char *base, int sep_char)
int bu_vls_struct_item_named (struct bu_vls *vp, const struct bu_structparse *sdp, const char *name, const char *base, int sep_char)
void bu_parse_mm (const struct bu_structparse *sdp, const char *name, char *base, const char *value)
int bu_key_eq_to_key_val (char *in, char **next, struct bu_vls *vls)
int bu_shader_to_tcl_list (char *in, struct bu_vls *vls)
int bu_key_val_to_key_eq (char *in)
int bu_shader_to_key_eq (char *in, struct bu_vls *vls)
int bu_fwrite_external (FILE *fp, const struct bu_external *ep)
void bu_hexdump_external (FILE *fp, const struct bu_external *ep, const char *str)
void bu_free_external (struct bu_external *ep)
void bu_copy_external (struct bu_external *op, const struct bu_external *ip)
char * bu_next_token (char *str)
void bu_vls_printb (struct bu_vls *vls, const char *s, unsigned long v, const char *bits)
void bu_printb (const char *s, unsigned long v, const char *bits)
void bu_ptbl_init (struct bu_ptbl *b, int len, const char *str)
void bu_ptbl_reset (struct bu_ptbl *b)
int bu_ptbl_ins (struct bu_ptbl *b, long *p)
int bu_ptbl_locate (const struct bu_ptbl *b, const long *p)
void bu_ptbl_zero (struct bu_ptbl *b, const long *p)
int bu_ptbl_ins_unique (struct bu_ptbl *b, long *p)
int bu_ptbl_rm (struct bu_ptbl *b, const long *p)
void bu_ptbl_cat (struct bu_ptbl *dest, const struct bu_ptbl *src)
void bu_ptbl_cat_uniq (struct bu_ptbl *dest, const struct bu_ptbl *src)
void bu_ptbl_free (struct bu_ptbl *b)
int bu_ptbl (struct bu_ptbl *b, int func, long *p)
void bu_pr_ptbl (const char *title, const struct bu_ptbl *tbl, int verbose)
void bu_ptbl_trunc (struct bu_ptbl *tbl, int end)
bu_rb_treebu_rb_create (char *description, int nm_orders, int(**order_funcs)())
bu_rb_treebu_rb_create1 (char *description, int(*order_func)())
void bu_rb_delete (bu_rb_tree *tree, int order)
void bu_rb_diagnose_tree (bu_rb_tree *tree, int order, int trav_type)
void bu_rb_summarize_tree (bu_rb_tree *tree)
void * bu_rb_curr (bu_rb_tree *tree, int order)
void * bu_rb_extreme (bu_rb_tree *tree, int order, int sense)
void * bu_rb_neighbor (bu_rb_tree *tree, int order, int sense)
void bu_rb_free (bu_rb_tree *tree, void(*free_data)())
int bu_rb_insert (bu_rb_tree *tree, void *data)
int bu_rb_is_uniq (bu_rb_tree *tree, int order)
void bu_rb_set_uniqv (bu_rb_tree *tree, bitv_t vec)
void bu_rb_uniq_all_off (bu_rb_tree *tree)
void bu_rb_uniq_all_on (bu_rb_tree *tree)
int bu_rb_uniq_off (bu_rb_tree *tree, int order)
int bu_rb_uniq_on (bu_rb_tree *tree, int order)
int bu_rb_rank (bu_rb_tree *tree, int order)
void * bu_rb_select (bu_rb_tree *tree, int order, int k)
void * bu_rb_search (bu_rb_tree *tree, int order, void *data)
void bu_rb_walk (bu_rb_tree *tree, int order, void(*visit)(), int trav_type)
void bu_semaphore_init (unsigned int nsemaphores)
void bu_semaphore_acquire (unsigned int i)
void bu_semaphore_release (unsigned int i)
void bu_vls_init (struct bu_vls *vp)
void bu_vls_init_if_uninit (struct bu_vls *vp)
bu_vlsbu_vls_vlsinit ()
char * bu_vls_addr (const struct bu_vls *vp)
char * bu_vls_strdup (const struct bu_vls *vp)
char * bu_vls_strgrab (struct bu_vls *vp)
void bu_vls_extend (struct bu_vls *vp, unsigned int extra)
void bu_vls_setlen (struct bu_vls *vp, int newlen)
int bu_vls_strlen (const struct bu_vls *vp)
void bu_vls_trunc (struct bu_vls *vp, int len)
void bu_vls_trunc2 (struct bu_vls *vp, int len)
void bu_vls_nibble (struct bu_vls *vp, int len)
void bu_vls_free (struct bu_vls *vp)
void bu_vls_vlsfree (struct bu_vls *vp)
void bu_vls_strcpy (struct bu_vls *vp, const char *s)
void bu_vls_strncpy (struct bu_vls *vp, const char *s, long n)
void bu_vls_strcat (struct bu_vls *vp, const char *s)
void bu_vls_strncat (struct bu_vls *vp, const char *s, long n)
void bu_vls_vlscat (struct bu_vls *dest, const struct bu_vls *src)
void bu_vls_vlscatzap (struct bu_vls *dest, struct bu_vls *src)
void bu_vls_from_argv (struct bu_vls *vp, int argc, const char *argv[])
int bu_argv_from_string (char **argv, int lim, char *lp)
void bu_vls_fwrite (FILE *fp, const struct bu_vls *vp)
void bu_vls_write (int fd, const struct bu_vls *vp)
int bu_vls_read (struct bu_vls *vp, int fd)
int bu_vls_gets (struct bu_vls *vp, FILE *fp)
void bu_vls_putc (struct bu_vls *vp, int c)
void bu_vls_trimspace (struct bu_vls *vp)
void bu_vls_printf (struct bu_vls *vls, char *fmt,...)
void bu_vls_sprintf (struct bu_vls *vls, char *fmt,...)
void bu_vls_spaces (struct bu_vls *vp, int cnt)
int bu_vls_print_positions_used (const struct bu_vls *vp)
void bu_vls_detab (struct bu_vls *vp)
void bu_vls_prepend (struct bu_vls *vp, char *str)
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)
unsigned short bu_gshort (const unsigned char *msgp)
unsigned long bu_glong (const unsigned char *msgp)
unsigned char * bu_pshort (register unsigned char *msgp, register int s)
unsigned char * bu_plong (register unsigned char *msgp, register unsigned long l)
bu_vlsbu_association (const char *fname, const char *value, int field_sep)
void bu_observer_notify ()
void bu_observer_free (struct bu_observer *)
void bu_badmagic_tcl (Tcl_Interp *interp, const long *ptr, unsigned long magic, const char *str, const char *file, int line)
void bu_structparse_get_terse_form (Tcl_Interp *interp, const struct bu_structparse *sp)
int bu_structparse_argv (Tcl_Interp *interp, int argc, char **argv, const struct bu_structparse *desc, char *base)
int bu_tcl_mem_barriercheck (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_ck_malloc_ptr (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_malloc_len_roundup (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_prmem (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_printb (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_get_value_by_keyword (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_get_all_keyword_values (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_rgb_to_hsv (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_hsv_to_rgb (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_key_eq_to_key_val (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_shader_to_key_val (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_key_val_to_key_eq (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_shader_to_key_eq (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_brlcad_root (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_brlcad_data (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_brlcad_path (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
int bu_tcl_units_conversion (ClientData clientData, Tcl_Interp *interp, int argc, char **argv)
void bu_tcl_setup (Tcl_Interp *interp)
int Bu_Init (Tcl_Interp *interp)
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)
unsigned long bu_hash (unsigned char *str, int len)
bu_hash_tblbu_create_hash_tbl (unsigned long tbl_size)
 Create an empty hash table The input is the number of desired hash bins. This number will be rounded up to the nearest power of two.
bu_hash_entrybu_find_hash_entry (struct bu_hash_tbl *hsh_tbl, unsigned char *key, int key_len, struct bu_hash_entry **prev, unsigned long *index)
 Find the hash table entry corresponding to the provided key.
void bu_set_hash_value (struct bu_hash_entry *hsh_entry, unsigned char *value)
 Set the value for a hash table entry.
unsigned char * bu_get_hash_value (struct bu_hash_entry *hsh_entry)
unsigned char * bu_get_hash_key (struct bu_hash_entry *hsh_entry)
bu_hash_entrybu_hash_add_entry (struct bu_hash_tbl *hsh_tbl, unsigned char *key, int key_len, int *new_entry)
void bu_hash_tbl_pr (struct bu_hash_tbl *hsh_tbl, char *str)
 Print the specified hash table to stderr. (Note that the keys and values are printed as pointers).
void bu_hash_tbl_free (struct bu_hash_tbl *hsh_tbl)
 Free all the memory associated with the specified hash table. Note that the keys are freed (they are copies), but the "values" are not freed. (The values are merely pointers).
bu_hash_entrybu_hash_tbl_first (struct bu_hash_tbl *hsh_tbl, struct bu_hash_record *rec)
 get the "first" entry in a hash table
bu_hash_entrybu_hash_tbl_next (struct bu_hash_record *rec)

Variables

bu_hook_list bu_log_hook_list
bu_hook_list bu_bomb_hook_list
int bu_setjmp_valid
 !0 = bu_jmpbuf is valid
jmp_buf bu_jmpbuf
 for BU_SETJMP()
int bu_debug
int bu_opterr
int bu_optind
int bu_optopt
char * bu_optarg
long bu_n_malloc
long bu_n_free
long bu_n_realloc
const char bu_version []
bu_cmdtab bu_observer_cmds []


Detailed Description

Header file for the BRL-CAD Utility Library, LIBBU.

This library provides several layers of low-level utility routines, providing features that make coding much easier. Parallel processing support: threads, sempahores, parallel-malloc. Consolodated logging support: bu_log(), bu_bomb().

The intention is that these routines are general extensions to the data types offered by the C language itself, and to the basic C runtime support provided by the system LIBC.

All of the data types provided by this library are defined in bu.h; none of the routines in this library will depend on data types defined in other BRL-CAD header files, such as vmath.h. Look for those routines in LIBBN.

@authorMichael John Muuss

Source
The U. S. Army Research Laboratory
Aberdeen Proving Ground, Maryland 21005-5068 USA
Proper include Sequencing -
        #include "common.h"
        #include <stdio.h>
        #include "machine.h"    /_* For fastf_t definition on this machine *_/
        #include "rtlist.h"     /_* OPTIONAL, auto-included by bu.h *_/
        #include "bu.h"

Libraries Used -
-lm -lc
Header
/cvsroot/brlcad/brlcad/include/bu.h,v 14.38 2006/09/18 05:24:07 lbutler Exp

Definition in file bu.h.


Define Documentation

#define BU_PTBL_MAGIC   0x7074626c
 

Definition at line 1002 of file bu.h.

Referenced by bu_identify_magic(), bu_ptbl_init(), and rt_shootray().

#define BU_CK_PTBL _p   )     BU_CKMAG(_p, BU_PTBL_MAGIC, "bu_ptbl")
 

Definition at line 1003 of file bu.h.

Referenced by bu_pr_ptbl(), bu_ptbl(), bu_ptbl_cat(), bu_ptbl_cat_uniq(), bu_ptbl_free(), bu_ptbl_ins(), bu_ptbl_ins_unique(), bu_ptbl_locate(), bu_ptbl_reset(), bu_ptbl_rm(), bu_ptbl_trunc(), bu_ptbl_zero(), classify_sketch_loops(), db_get_directory(), nmg_break_edge_at_verts(), nmg_ck_vu_ptbl(), nmg_complex_vertex_solve(), nmg_face_rs_init(), nmg_fcut_face_2d(), nmg_find_isect_faces(), nmg_follow_free_edges_to_vertex(), nmg_isect_2colinear_edge2p(), nmg_isect_eu_eu(), nmg_isect_eu_fu(), nmg_isect_eu_verts(), nmg_isect_fu_jra(), nmg_isect_line2_edge2p(), nmg_isect_line2_face2pNEW(), nmg_isect_two_ptbls(), nmg_make_faces_at_vert(), nmg_onon_fix(), nmg_pr_ptbl(), nmg_radial_build_list(), nmg_radial_check_parity(), nmg_unlist_v(), rt_bool_partition_eligible(), rt_boolfinal(), rt_clean_resource(), rt_cut_one_axis(), rt_default_logoverlap(), rt_default_multioverlap(), rt_free_rti(), rt_shootray(), rt_shootray_bundle(), rt_silent_logoverlap(), and rt_submodel_free().

#define BU_PTBL_INIT   0
 

initialize table pointer struct & get storage

Definition at line 1005 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_INS   1
 

insert an item (long *) into a table

Definition at line 1006 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_LOC   2
 

locate a (long *) in an existing table

Definition at line 1007 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_FREE   3
 

deallocate buffer associated with a table

Definition at line 1008 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_RST   4
 

empty a table, but keep storage on hand

Definition at line 1009 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_CAT   5
 

catenate one table onto another

Definition at line 1010 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_RM   6
 

remove all occurrences of an item from a table

Definition at line 1011 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_INS_UNIQUE   7
 

insert item into table, if not present

Definition at line 1012 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_ZERO   8
 

replace all occurrences of an item by 0

Definition at line 1013 of file bu.h.

Referenced by bu_ptbl().

#define BU_PTBL_BASEADDR ptbl   )     ((ptbl)->buffer)
 

Definition at line 1017 of file bu.h.

Referenced by bu_pr_ptbl(), nmg_break_eg_on_v(), nmg_dup_shell(), nmg_find_eg_on_line(), nmg_isect_line2_face2pNEW(), nmg_isect_two_ptbls(), nmg_model_break_e_on_v(), nmg_pr_ptbl(), nmg_radial_check_parity(), nmg_radial_join_eu_NEW(), nmg_s_radial_check(), and nmg_s_radial_harmonize().

#define BU_PTBL_LASTADDR ptbl   )     ((ptbl)->buffer + (ptbl)->end - 1)
 

Definition at line 1018 of file bu.h.

Referenced by bu_pr_ptbl(), nmg_break_eg_on_v(), nmg_find_eg_on_line(), nmg_isect_line2_face2pNEW(), nmg_isect_two_ptbls(), nmg_model_break_e_on_v(), nmg_pr_ptbl(), nmg_radial_check_parity(), nmg_radial_join_eu_NEW(), nmg_s_radial_check(), and nmg_s_radial_harmonize().

#define BU_PTBL_END ptbl   )     ((ptbl)->end)
 

Definition at line 1019 of file bu.h.

Referenced by Eplot(), fix_halfs(), isect_2D_loop_ray(), nmg_break_all_es_on_v(), nmg_break_edge_at_verts(), nmg_break_edges(), nmg_calc_face_plane(), nmg_check_radial_angles(), nmg_ck_geometry(), nmg_ck_vu_ptbl(), nmg_classify_s_vs_s(), nmg_close_shell(), nmg_complex_vertex_solve(), nmg_cut_lu_into_coplanar_and_non(), nmg_decompose_shell(), nmg_dup_shell(), nmg_edge_collapse(), nmg_enlist_one_vu(), nmg_enlist_vu(), nmg_extrude_shell(), nmg_face_rs_init(), nmg_faces_can_be_intersected(), nmg_find_isect_faces(), nmg_find_outer_and_void_shells(), nmg_find_zero_length_edges(), nmg_fix_overlapping_loops(), nmg_hollow_shell(), nmg_intersect_loops_self(), nmg_isect_eu_fu(), nmg_isect_eu_verts(), nmg_isect_fu_jra(), nmg_isect_line2_face2pNEW(), nmg_isect_shell_self(), nmg_isect_two_generic_faces(), nmg_kill_anti_loops(), nmg_kill_cracks_at_vertex(), nmg_loop_split_at_touching_jaunt(), nmg_make_faces_at_vert(), nmg_make_faces_within_tol(), nmg_mark_edges_real(), nmg_mirror_model(), nmg_mk_model_from_region(), nmg_model_edge_fuse(), nmg_model_edge_g_fuse(), nmg_model_face_fuse(), nmg_move_edge_thru_pt(), nmg_onon_fix(), nmg_open_shells_connect(), nmg_pop_eu(), nmg_ptbl_vfuse(), nmg_region_both_vfuse(), nmg_region_v_unique(), nmg_simple_vertex_solve(), nmg_split_loops_handler(), nmg_unlist_v(), rt_extrude_tess(), rt_rebuild_overlaps(), rt_submodel_shot(), rt_unprep(), and shoot_and_plot().

#define BU_PTBL_LEN  )     ((p)->end)
 

Definition at line 1020 of file bu.h.

Referenced by nmg_bot(), nmg_model_break_e_on_v(), rt_comb_import5(), rt_default_logoverlap(), rt_default_multioverlap(), rt_get_region_seglist_for_partition(), rt_nmg_tclget(), rt_reprep(), and rt_submodel_prep().

#define BU_PTBL_GET ptbl,
 )     ((ptbl)->buffer[(i)])
 

Definition at line 1021 of file bu.h.

Referenced by classify_sketch_loops(), db_walk_dispatcher(), db_walk_tree(), Eplot(), fix_halfs(), isect_2D_loop_ray(), nmg_bot(), nmg_break_all_es_on_v(), nmg_break_edge_at_verts(), nmg_break_edges(), nmg_calc_face_plane(), nmg_check_radial_angles(), nmg_ck_geometry(), nmg_ck_vu_ptbl(), nmg_classify_s_vs_s(), nmg_close_shell(), nmg_complex_vertex_solve(), nmg_cut_lu_into_coplanar_and_non(), nmg_decompose_shell(), nmg_edge_collapse(), nmg_extrude_shell(), nmg_face_rs_init(), nmg_faces_can_be_intersected(), nmg_find_isect_faces(), nmg_find_outer_and_void_shells(), nmg_find_zero_length_edges(), nmg_fix_overlapping_loops(), nmg_hollow_shell(), nmg_intersect_loops_self(), nmg_isect_eu_fu(), nmg_isect_eu_verts(), nmg_isect_fu_jra(), nmg_isect_line2_face2pNEW(), nmg_isect_shell_self(), nmg_isect_two_generic_faces(), nmg_kill_anti_loops(), nmg_kill_cracks_at_vertex(), nmg_loop_split_at_touching_jaunt(), nmg_make_faces_at_vert(), nmg_make_faces_within_tol(), nmg_mark_edges_real(), nmg_mirror_model(), nmg_mk_model_from_region(), nmg_model_edge_fuse(), nmg_model_edge_g_fuse(), nmg_model_face_fuse(), nmg_onon_fix(), nmg_open_shells_connect(), nmg_pop_eu(), nmg_ptbl_vfuse(), nmg_region_both_vfuse(), nmg_region_v_unique(), nmg_simple_vertex_solve(), nmg_split_loops_handler(), nmg_to_arb(), nmg_unlist_v(), rt_cell_n_on_ray(), rt_comb_import5(), rt_cut_optimize_parallel(), rt_default_logoverlap(), rt_default_multioverlap(), rt_extrude_tess(), rt_init_resource(), rt_nmg_tclget(), rt_plot_solid(), rt_prep_parallel(), rt_rebuild_overlaps(), rt_reprep(), rt_shootray(), rt_shootray_bundle(), rt_submodel_a_hit(), rt_submodel_shot(), rt_unprep(), shoot_and_plot(), and wdb_rt_gettrees_cmd().

#define BU_PTBL_SET ptbl,
i,
val   )     ((ptbl)->buffer[(i)] = (long*)(val))
 

Definition at line 1022 of file bu.h.

Referenced by rt_init_resource(), rt_submodel_prep(), and rt_submodel_shot().

#define BU_PTBL_TEST ptbl   )     ((ptbl)->l.magic == BU_PTBL_MAGIC)
 

Definition at line 1023 of file bu.h.

#define BU_PTBL_CLEAR_I _ptbl,
_i   )     ((_ptbl)->buffer[(_i)] = (long *)0)
 

Definition at line 1024 of file bu.h.

Referenced by rt_rebuild_overlaps().

#define BU_PTBL_FOR ip,
cast,
ptbl   )     ip = cast BU_PTBL_LASTADDR(ptbl); ip >= cast BU_PTBL_BASEADDR(ptbl); ip--
 

A handy way to visit all the elements of the table is:

struct edgeuse **eup; for( eup = (struct edgeuse **)BU_PTBL_LASTADDR(&eutab); eup >= (struct edgeuse **)BU_PTBL_BASEADDR(&eutab); eup-- ) { NMG_CK_EDGEUSE(*eup); } or for( BU_PTBL_FOR( eup, (struct edgeuse **), &eutab ) ) { NMG_CK_EDGEUSE(*eup); }

Definition at line 1039 of file bu.h.

Referenced by bu_ptbl_cat_uniq(), rt_bool_partition_eligible(), rt_booleval(), rt_clean_resource(), rt_cut_clean(), rt_fastgen_vol_vol_overlap(), rt_free_rti(), rt_get_region_seglist_for_partition(), rt_pr_pt_vls(), rt_pr_tree_val(), rt_submodel_free(), rt_submodel_prep(), and rt_tree_max_raynum().

#define BU_MAPPED_FILE_MAGIC   0x4d617066
 

Definition at line 1083 of file bu.h.

Referenced by bu_identify_magic(), and bu_open_mapped_file().

#define BU_CK_MAPPED_FILE _p   )     BU_CKMAG(_p, BU_MAPPED_FILE_MAGIC, "bu_mapped_file")
 

Definition at line 1084 of file bu.h.

Referenced by bu_close_mapped_file(), bu_free_mapped_files(), bu_open_mapped_file(), bu_pr_mapped_file(), db5_scan(), rt_dsp_free(), rt_dsp_ifree(), rt_dsp_norm(), rt_dsp_plot(), rt_dsp_prep(), rt_dsp_shot(), rt_ebm_free(), rt_ebm_ifree(), and rt_hf_ifree().

#define BUHOOK_NULL   0
 

Definition at line 1098 of file bu.h.

Referenced by bu_hook_list_init().

#define BUHOOK_LIST_MAGIC   0x90d5dead
 

Definition at line 1099 of file bu.h.

Referenced by bu_add_hook(), and bu_log_add_hook().

#define BUHOOK_LIST_NULL   ((struct bu_hook_list *) 0)
 

Definition at line 1100 of file bu.h.

#define HUE   0
 

Definition at line 1449 of file bu.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define SAT   1
 

Definition at line 1450 of file bu.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define VAL   2
 

Definition at line 1451 of file bu.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define ACHROMATIC   -1.0
 

Definition at line 1452 of file bu.h.

Referenced by bu_hsv_to_rgb(), and bu_rgb_to_hsv().

#define BU_COLOR_MAGIC   0x6275636c
 

Definition at line 1459 of file bu.h.

Referenced by bu_identify_magic().

#define BU_COLOR_NULL   ((struct bu_color *) 0)
 

Definition at line 1460 of file bu.h.

#define BU_CK_COLOR _bp   )     BU_CKMAG(_bp, BU_COLOR_MAGIC, "bu_color")
 

Definition at line 1461 of file bu.h.


Typedef Documentation

HIDDEN int rt_projZmax_comp BU_ARGS
 

Definition at line 1090 of file bu.h.


Variable Documentation

const char bu_version[]
 

Definition at line 1 of file vers.c.

Referenced by bu_tcl_setup().


Generated on Mon Sep 18 01:24:59 2006 for BRL-CAD by  doxygen 1.4.6