BRL-CAD
Collaboration diagram for Linked Lists:

Files

file  list.c
 Support routines for doubly-linked lists.
 

Data Structures

struct  bu_list
 

Macros

#define BU_LIST_NULL   ((struct bu_list *)0)
 
#define BU_LIST_MAGIC_SET(_l, _magic)   {(_l)->magic = (_magic);}
 
#define BU_LIST_MAGIC_EQUAL(_l, _magic)   ((_l)->magic == (_magic))
 
#define BU_CK_LIST_HEAD(_p)   BU_CKMAG((_p), BU_LIST_HEAD_MAGIC, "bu_list")
 
#define BU_LIST_INIT(_hp)
 
#define BU_LIST_INIT_MAGIC(_hp, _magic)
 
#define BU_LIST_INIT_ZERO   { 0, BU_LIST_NULL, BU_LIST_NULL }
 
#define BU_LIST_IS_INITIALIZED(_hp)   (((struct bu_list *)(_hp) != BU_LIST_NULL) && LIKELY((_hp)->forw != BU_LIST_NULL))
 
#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_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)) == (struct bu_list *)(hp))
 
#define BU_LIST_NOT_HEAD(p, hp)   (!BU_LIST_IS_HEAD(p, hp))
 
#define BU_LIST_PREV_IS_HEAD(p, hp)   (((struct bu_list *)(p))->back == (struct bu_list *)(hp))
 
#define BU_LIST_PREV_NOT_HEAD(p, hp)   (!BU_LIST_PREV_IS_HEAD(p, hp))
 
#define BU_LIST_NEXT_IS_HEAD(p, hp)   (((struct bu_list *)(p))->forw == (struct bu_list *)(hp))
 
#define BU_LIST_NEXT_NOT_HEAD(p, hp)   (!BU_LIST_NEXT_IS_HEAD(p, 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)) - (bu_offsetof(struct _type, _name2) + bu_offsetof(struct bu_list, magic))))
 

Typedefs

typedef struct bu_list bu_list_t
 

Functions

struct bu_listbu_list_new (void)
 
struct bu_listbu_list_pop (struct bu_list *hp)
 
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)
 
struct 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 uint32_t magic)
 

Detailed Description

Macro Definition Documentation

#define BU_LIST_NULL   ((struct bu_list *)0)
#define BU_LIST_MAGIC_SET (   _l,
  _magic 
)    {(_l)->magic = (_magic);}
#define BU_LIST_MAGIC_EQUAL (   _l,
  _magic 
)    ((_l)->magic == (_magic))

macro for testing whether a list node's magic number is equal to a specific magic number

Definition at line 135 of file list.h.

Referenced by bu_ck_malloc_ptr(), bu_free(), bu_prmem(), bu_realloc(), isect_ray_edgeuse(), isect_ray_faceuse(), isect_ray_vertexuse(), ray_hit_vertex(), ray_miss_vertex(), rt_clean(), and rt_shootray().

#define BU_CK_LIST_HEAD (   _p)    BU_CKMAG((_p), BU_LIST_HEAD_MAGIC, "bu_list")

there is no reliable way to assert the integrity of an arbitrary bu_list struct since the magic can be anything, therefore there is no BU_CK_LIST(). we can, however, check for a valid head node.

Definition at line 142 of file list.h.

Referenced by add_operand(), add_operator(), append_inter(), append_lparen(), append_rparen(), append_subtr(), append_union(), bu_list_reverse(), check_hitstate(), curve_to_vlist(), draw_pipe_arc(), free_tokens(), gauss_render(), light_hit(), make_near_list(), nmg_cnurb_is_on_crv(), nmg_cnurb_to_vlist(), nmg_do_radial_flips(), nmg_do_radial_join(), nmg_eu_to_vlist(), nmg_find_radial_eu(), nmg_insure_radial_list_is_increasing(), nmg_lu_to_vlist(), nmg_m_to_vlist(), nmg_pr_radial_list(), nmg_r_to_vlist(), nmg_radial_build_list(), nmg_radial_check_parity(), nmg_radial_exchange_marked(), nmg_radial_find_an_original(), nmg_radial_implement_decisions(), nmg_radial_mark_cracks(), nmg_radial_mark_flips(), nmg_radial_merge_lists(), nmg_radial_sorted_list_insert(), nmg_radial_verify_monotone(), nmg_radial_verify_pointers(), nmg_s_to_vlist(), nmg_snurb_fu_to_vlist(), nmg_snurb_to_vlist(), nmg_vu_to_vlist(), plot_bbnode(), rt_arb_plot(), rt_arbn_plot(), rt_ars_plot(), rt_bot_adaptive_plot(), rt_bot_plot(), rt_bot_plot_poly(), rt_brep_adaptive_plot(), rt_brep_plot(), rt_brep_plot_poly(), rt_cline_plot(), rt_dsp_plot(), rt_ebm_plate(), rt_ebm_plot(), rt_ehy_adaptive_plot(), rt_ehy_plot(), rt_ell_adaptive_plot(), rt_ell_plot(), rt_epa_adaptive_plot(), rt_epa_plot(), rt_eto_adaptive_plot(), rt_eto_plot(), rt_extrude_plot(), rt_grp_plot(), rt_hf_plot(), rt_hlf_plot(), rt_hrt_plot(), rt_hyp_plot(), rt_join_cnurbs(), rt_joint_plot(), rt_metaball_plot(), rt_metaball_plot_sph(), rt_nmg_plot(), rt_nurb_plot(), rt_obj_plot(), rt_part_plot(), rt_pg_plot(), rt_pg_plot_poly(), rt_pipe_adaptive_plot(), rt_pipe_plot(), rt_pnts_plot(), rt_revolve_plot(), rt_rhc_adaptive_plot(), rt_rhc_plot(), rt_rpc_adaptive_plot(), rt_rpc_plot(), rt_sketch_plot(), rt_submodel_plot(), rt_superell_plot(), rt_tgc_adaptive_plot(), rt_tgc_plot(), rt_tor_adaptive_plot(), rt_tor_plot(), rt_vol_plate(), rt_vol_plot(), rt_xxx_plot(), and seg_to_vlist().

#define BU_LIST_INIT (   _hp)
Value:
{ \
(_hp)->forw = (_hp)->back = (_hp); \
(_hp)->magic = BU_LIST_HEAD_MAGIC; /* used by circ. macros */ }
oldeumate l2 magic
Definition: nmg_mod.c:3843
#define BU_LIST_HEAD_MAGIC
Definition: magic.h:56

initializes a bu_list struct as a circular list without allocating any memory. call BU_LIST_MAGIC_SET() to change the list type.

Definition at line 148 of file list.h.

Referenced by _db_search_full_paths(), _ged_run_rt(), _ged_run_rtwizard(), alloc(), append_solid_to_display_list(), attach_face_g_plane(), bbd_setup(), bezier_subdivide(), bn_vlblock_init(), bn_vlist_cleanup(), bu_hook_list_init(), bu_list_new(), bu_list_reverse(), bu_open_mapped_file(), bu_rb_create(), build_etree(), Cho_Init(), cho_open(), classify_seg(), db5_diradd(), db_diradd(), db_diradd5(), dl_addToDisplay(), Dmo_Init(), dmo_open_tcl(), do_region_end(), Eplot(), eval_etree(), eval_op(), Fbo_Init(), gauss_setup(), gcv_fastgen4_read(), gcv_region_end(), gcv_region_end_mc(), gcv_stl_read(), ged_coil(), ged_comb_std(), ged_dbot_dump(), ged_E(), ged_human(), ged_import_polygon(), ged_init(), ged_make(), ged_make_pnts(), ged_nirt(), ged_rmap(), ged_tire(), ged_track2(), ged_voxelize(), ged_which(), Go_Init(), insert_above(), insert_node(), invent_solid(), isect_ray_snurb_face(), light_cleanup(), light_init(), light_maker(), light_setup(), main(), make_coil(), make_nmg_vertex(), mesh_leaf(), mk_comb1(), mk_metaball(), mk_pipe(), mk_pipe_init(), mk_region1(), nmg_build_loopuse_tree(), nmg_class_pt_fu_except(), nmg_class_pt_lu_except(), nmg_class_ray_vs_shell(), nmg_edge_g(), nmg_edge_g_cnurb(), nmg_edge_g_cnurb_plinear(), nmg_face_g(), nmg_face_g_snurb(), nmg_face_new_g(), nmg_flatten_face(), nmg_kvu(), nmg_me(), nmg_meonvu(), nmg_mf(), nmg_ml(), nmg_mlv(), nmg_mm(), nmg_mmr(), nmg_mrsv(), nmg_msv(), nmg_radial_join_eu_NEW(), nmg_region_end(), nmg_s_radial_harmonize(), obj_vlist(), pipe_scale_radius(), prj_setup(), rt_alloc_seg_block(), rt_arc2d_to_cnurb(), rt_bot_patches(), rt_bot_split(), rt_bot_sync(), rt_clean_resource_basic(), rt_cline_shot(), rt_cline_to_pipe(), rt_clip_cnurb(), rt_dsp_shot(), rt_ebm_shot(), rt_ebm_tess(), rt_extrude_tess(), rt_htbl_init(), Rt_Init(), rt_init_resource(), rt_metaball_adjust(), rt_metaball_import5(), rt_metaball_prep(), rt_new_rti(), rt_nmg_ialloc(), rt_nmg_shot(), rt_nurb_bbox(), rt_nurb_bezier(), rt_nurb_intersect(), rt_nurb_prep(), rt_pipe_adjust(), rt_pipe_centroid(), rt_pipe_import4(), rt_pipe_import5(), rt_pipe_prep(), rt_pipe_surf_area(), rt_pipe_volume(), rt_plot_solid(), rt_pnts_import5(), rt_process_casec(), rt_shootray(), rt_shootray_bundle(), rt_vlblock_find(), rt_vshootray(), seg_to_vlist(), shoot_and_plot(), temp_add_to_list(), to_open_tcl(), Vo_Init(), vo_open_cmd(), and vshot_stub().

#define BU_LIST_INIT_MAGIC (   _hp,
  _magic 
)
Value:
{ \
BU_LIST_MAGIC_SET((_hp), (_magic)); \
}
#define BU_LIST_MAGIC_SET(_l, _magic)
Definition: list.h:129
#define BU_LIST_INIT(_hp)
Definition: list.h:148

initializes a bu_list struct node with a particular non-head node magic number without allocating any memory.

Definition at line 156 of file list.h.

Referenced by bu_bitv_new(), bu_ptbl_init(), light_maker(), light_setup(), and wdb_init().

#define BU_LIST_INIT_ZERO   { 0, BU_LIST_NULL, BU_LIST_NULL }

macro suitable for declaration statement zero-initialization of a bu_list struct, but not suitably for validation with BU_CK_LIST_HEAD() as the list pointers are NULL. does not allocate memory.

Definition at line 167 of file list.h.

Referenced by zoom_cmd().

#define BU_LIST_IS_INITIALIZED (   _hp)    (((struct bu_list *)(_hp) != BU_LIST_NULL) && LIKELY((_hp)->forw != BU_LIST_NULL))

returns truthfully whether a bu_list has been initialized via BU_LIST_INIT(). lists initialized with BU_LIST_INIT_ZERO or zero-allocated will not return true as their forward/backward pointers reference nothing.

Definition at line 175 of file list.h.

Referenced by bn_vlblock_init(), bn_vlist_cleanup(), bu_open_mapped_file(), ged_E(), light_cleanup(), light_init(), light_maker(), light_setup(), nmg_class_ray_vs_shell(), rt_alloc_seg_block(), rt_cell_n_on_ray(), rt_clean_resource_basic(), rt_clean_resource_complete(), rt_cut_clean(), rt_extrude_tess(), rt_free_rti(), Rt_Init(), rt_init_resource(), rt_shootray(), and rt_shootray_bundle().

#define BU_LIST_INSERT (   old,
  new 
)
Value:
{ \
BU_ASSERT((void *)(old) != (void *)NULL); \
BU_ASSERT((void *)(new) != (void *)NULL); \
(new)->back = (old)->back; \
(old)->back = (new); \
(new)->forw = (old); \
BU_ASSERT((void *)((new)->back) != (void *)NULL); \
(new)->back->forw = (new); }
ustring back
#define BU_ASSERT(_equation)
Definition: defines.h:216

Insert "new" item in front of "old" item. Often, "old" is the head. To put the new item at the tail of the list, insert before the head, e.g. * BU_LIST_INSERT(&(head.l), &((p)->l));

Definition at line 183 of file list.h.

Referenced by _ged_add_metaballpt(), _ged_add_pipept(), _ged_delete_pipept(), _ged_ins_pipept(), _rt_find_identical_solid(), _rt_gettree_region_end(), add_operand(), add_seg(), add_unique_pair(), append_inter(), append_lparen(), append_rparen(), append_subtr(), append_union(), bu_list_parallel_append(), cmdhist_record(), colinear_edge_ray(), dl_addToDisplay(), do_intersect(), do_subtract(), eval_op(), ged_import_polygon(), ged_make(), ged_rmap(), ged_which(), headsolid_split(), hit_ins(), isect_ray_faceuse(), isect_ray_lseg(), isect_ray_planar_face(), light_maker(), light_setup(), main(), mk_add_pipe_pt(), mk_addmember(), nmg_bsegs(), nmg_clone_model(), nmg_cut_loop(), nmg_edge_g(), nmg_edge_g_cnurb(), nmg_edge_g_cnurb_plinear(), nmg_eval_linear_trim_to_tol(), nmg_eval_trim_to_tol(), nmg_fix_overlapping_loops(), nmg_jfg(), nmg_jl(), nmg_join_2loops(), nmg_jv(), nmg_mk_model_from_region(), nmg_mk_new_face_from_loop(), nmg_ml(), nmg_mlv(), nmg_move_lu_between_fus(), nmg_radial_sorted_list_insert(), nmg_split_linear_trim(), nmg_split_lu_at_vu(), nmg_split_trim(), nmg_use_edge_g(), promote_ints(), ray_miss_vertex(), ReadArgs(), rt_alloc_seg_block(), rt_arb_shot(), rt_arbn_shot(), rt_arc2d_to_cnurb(), rt_ars_shot(), rt_bend_pipe_prep(), rt_boolweave(), rt_brep_shot(), rt_cline_shot(), rt_clip_cnurb(), rt_ebm_dda(), rt_ehy_shot(), rt_ell_shot(), rt_epa_shot(), rt_eto_shot(), rt_extrude_shot(), rt_hf_shot(), rt_hrt_shot(), rt_hyp_shot(), rt_linear_pipe_prep(), rt_metaball_add_point(), rt_metaball_import5(), rt_metaball_prep(), rt_metaball_shot(), rt_nurb_shot(), rt_part_shot(), rt_pg_shot(), rt_pipe_adjust(), rt_pipe_import5(), rt_pipe_shot(), rt_rec_shot(), rt_revolve_shot(), rt_rhc_shot(), rt_rpc_shot(), rt_seg_planeclip(), rt_shootray(), rt_shootray_bundle(), rt_sph_shot(), rt_submodel_a_hit(), rt_superell_shot(), rt_tgc_shot(), rt_tor_shot(), rt_vol_shot(), rt_xxx_shot(), shoot_and_plot(), state2(), state3(), state4(), state5and6(), to_edit_redraw(), to_new_view(), vdraw_insert(), and XGLUE().

#define BU_LIST_APPEND (   old,
  new 
)
Value:
{ \
BU_ASSERT((void *)(old) != (void *)NULL); \
BU_ASSERT((void *)(new) != (void *)NULL); \
(new)->forw = (old)->forw; \
(new)->back = (old); \
(old)->forw = (new); \
BU_ASSERT((void *)((old)->forw) != (void *)NULL); \
(new)->forw->back = (new); }
ustring back
#define BU_ASSERT(_equation)
Definition: defines.h:216

Append "new" item after "old" item. Often, "old" is the head. To put the new item at the head of the list, append after the head, e.g. * BU_LIST_APPEND(&(head.l), &((p)->l));

Definition at line 197 of file list.h.

Referenced by _ged_add_metaballpt(), _ged_add_pipept(), _ged_delete_pipept(), _ged_ins_pipept(), _ged_run_rt(), _ged_run_rtwizard(), alloc(), append_solid_to_display_list(), bezier_subdivide(), bu_hook_add(), bu_hook_restore_all(), bu_hook_save_all(), bu_list_reverse(), bu_open_mapped_file(), bu_realloc(), cho_open(), cut_unimonotone(), dl_add_path(), dmo_open_tcl(), Eplot(), eval_op(), fbo_open_tcl(), ged_coil(), ged_import_polygon(), ged_nirt(), ged_shells(), insert_above(), insert_node(), invent_solid(), make_near_list(), mesh_leaf(), new_image(), nmg_cut_loop(), nmg_demote_lu(), nmg_do_radial_flips(), nmg_face_g(), nmg_face_g_snurb(), nmg_face_new_g(), nmg_fix_overlapping_loops(), nmg_jl(), nmg_join_2loops(), nmg_me(), nmg_meonvu(), nmg_merge_regions(), nmg_mf(), nmg_ml(), nmg_mmr(), nmg_moveltof(), nmg_movevu(), nmg_mrsv(), nmg_msv(), nmg_mv_fu_between_shells(), nmg_mv_lu_between_shells(), nmg_mv_shell_to_region(), nmg_radial_build_list(), nmg_radial_sorted_list_insert(), nmg_split_lu_at_vu(), nurb_c_to_bezier(), observer_attach(), pipe_scale_radius(), promote_ints(), rt_bot_patches(), rt_bot_split(), rt_bot_split_func(), rt_bot_sync(), rt_bot_sync_func(), rt_cline_to_pipe(), rt_clip_cnurb(), rt_find_backing_dist(), rt_gen_conic(), rt_gen_elliptical_grid(), rt_gen_frustum(), rt_gen_rect(), rt_nurb_bezier(), rt_nurb_c_split(), rt_nurb_c_xsplit(), rt_nurb_intersect(), rt_nurb_s_split(), rt_nurb_s_xsplit(), rt_pipe_import4(), rt_rebuild_overlaps(), rt_shootray(), rt_shootray_bundle(), to_open_tcl(), and vo_open_cmd().

#define BU_LIST_DEQUEUE (   cur)
Value:
{ \
BU_ASSERT((void *)(cur) != (void *)NULL); \
if (LIKELY((cur)->forw != NULL)) (cur)->forw->back = (cur)->back; \
if (LIKELY((cur)->back != NULL)) (cur)->back->forw = (cur)->forw; \
(cur)->forw = (cur)->back = BU_LIST_NULL; /* sanity */ }
ustring back
#define LIKELY(expression)
Definition: common.h:261
#define BU_ASSERT(_equation)
Definition: defines.h:216
if(share_geom)
Definition: nmg_mod.c:3829
#define BU_LIST_NULL
Definition: list.h:124

Dequeue "cur" item from anywhere in doubly-linked list

Definition at line 209 of file list.h.

Referenced by _db_free_full_path_list(), _dl_eraseFirstSubpath(), _dl_freeDisplayListItem(), _ged_add_pipept(), _ged_delete_metaballpt(), _ged_delete_pipept(), _ged_ins_pipept(), _ged_rt_output_handler(), append_solid_to_display_list(), bezier_subdivide(), bn_vlist_cleanup(), bu_free(), bu_free_mapped_files(), bu_hook_delete(), bu_hook_delete_all(), bu_hook_restore_all(), bu_hook_save_all(), bu_list_dequeue_next(), bu_list_free(), bu_list_parallel_dequeue(), bu_list_reverse(), bu_observer_free(), bu_realloc(), cho_deleteProc(), classify_seg(), cut_unimonotone(), dl_erasePathFromDisplay(), dl_zap(), dmo_deleteProc(), do_inter(), do_paren(), do_union_subtr(), eliminate_overlaps(), eraseAllSubpathsFromSolidList(), eval_bool(), eval_op(), fbo_deleteProc(), free_tokens(), gauss_free(), gcv_plugin_free(), ged_free(), ged_gqa(), ged_import_polygon(), ged_rmap(), ged_shells(), ged_which(), headsolid_split(), insert_above(), insert_node(), isect_ray_snurb_face(), light_free(), make_near_list(), mk_freemembers(), mk_pipe_free(), nmg_class_pt_fu_except(), nmg_class_pt_lu_except(), nmg_class_ray_vs_shell(), nmg_cut_loop(), nmg_demote_lu(), nmg_do_radial_flips(), nmg_edge_g(), nmg_edge_g_cnurb(), nmg_edge_g_cnurb_plinear(), nmg_face_new_g(), nmg_fix_overlapping_loops(), nmg_jfg(), nmg_jl(), nmg_join_2loops(), nmg_jv(), nmg_keu(), nmg_kfu(), nmg_klu(), nmg_kr(), nmg_ks(), nmg_kvu(), nmg_merge_regions(), nmg_mf(), nmg_mk_model_from_region(), nmg_mk_new_face_from_loop(), nmg_ml(), nmg_move_lu_between_fus(), nmg_moveltof(), nmg_movevu(), nmg_mv_fu_between_shells(), nmg_mv_lu_between_shells(), nmg_mv_shell_to_region(), nmg_radial_build_list(), nmg_radial_join_eu_NEW(), nmg_radial_merge_lists(), nmg_s_radial_harmonize(), nmg_split_lu_at_vu(), nmg_triangulate_fu(), nmg_use_edge_g(), nurb_c_to_bezier(), observer_detach(), pipe_elements_free(), pipe_scale_radius(), prj_free(), promote_ints(), ray_hit_edge(), ray_hit_vertex(), rb_free_node(), rb_free_package(), rt_boolweave(), rt_bot_list_free(), rt_bot_patches(), rt_bot_split(), rt_bot_split_func(), rt_bot_sync(), rt_bot_sync_func(), rt_clean(), rt_clean_resource_basic(), rt_clip_cnurb(), rt_del_regtree(), rt_ebm_tess(), rt_free_soltab(), rt_get_solidbitv(), rt_join_cnurbs(), rt_metaball_ifree(), rt_nurb_bbox(), rt_nurb_bezier(), rt_nurb_free(), rt_nurb_intersect(), rt_pipe_brep(), rt_pipe_ifree(), rt_pnts_ifree(), rt_process_casec(), rt_rebuild_overlaps(), rt_seg_planeclip(), rt_shootray(), rt_shootray_bundle(), rt_shootrays(), rt_unprep(), rt_vshootray(), seg_to_vlist(), shoot_and_plot(), temp_close_files(), to_deleteProc(), to_deleteViewProc(), to_edit_redraw(), vshot_stub(), and wdb_close().

#define BU_LIST_DQ (   cur)
Value:
{\
BU_ASSERT((void *)(cur) != (void *)NULL); \
if (LIKELY((cur)->forw != NULL)) (cur)->forw->back = (cur)->back; \
if (LIKELY((cur)->back != NULL)) (cur)->back->forw = (cur)->forw; }
ustring back
#define LIKELY(expression)
Definition: common.h:261
#define BU_ASSERT(_equation)
Definition: defines.h:216
if(share_geom)
Definition: nmg_mod.c:3829

Dequeue "cur" but do not fix its links

Definition at line 218 of file list.h.

#define BU_LIST_DQ_T (   cur,
  type 
)
Value:
(\
(cur)->forw->back = (cur)->back, \
(cur)->back->forw = (cur)->forw, \
(type *)(cur))
ustring back

Definition at line 223 of file list.h.

#define BU_LIST_DEQUEUE_T (   cur,
  type 
)
Value:
(\
(cur)->forw->back = (cur)->back, \
(cur)->back->forw = (cur)->forw, \
(cur)->forw = (cur)->back = BU_LIST_NULL, \
(type *)(cur))
ustring back
#define BU_LIST_NULL
Definition: list.h:124

This version of BU_LIST_DEQUEUE uses the comma operator in order to return a typecast version of the dequeued pointer

Definition at line 232 of file list.h.

#define BU_LIST_PUSH (   hp,
 
)    BU_LIST_APPEND(hp, (struct bu_list *)(p))

The Stack Discipline

BU_LIST_PUSH places p at the tail of hp. BU_LIST_POP sets p to last element in hp's list (else NULL) and, if p is non-null, dequeues it.

Definition at line 246 of file list.h.

Referenced by _db_search_full_paths(), attach_face_g_plane(), bu_rb_insert(), db_full_path_list_add(), gcv_plugin_register(), ged_make(), ged_make_pnts(), rt_pnts_import5(), and temp_add_to_list().

#define BU_LIST_POP (   structure,
  hp,
 
)
Value:
{ \
(p) = ((struct structure *)((hp)->forw)); \
BU_LIST_DEQUEUE((struct bu_list *)(p)); \
} else { \
(p) = (struct structure *) 0; \
} \
}
Definition: list.h:118
#define BU_LIST_NON_EMPTY(hp)
Definition: list.h:296
if(share_geom)
Definition: nmg_mod.c:3829
#define BU_LIST_DEQUEUE(cur)
Definition: list.h:209

Definition at line 249 of file list.h.

Referenced by bu_list_pop().

#define BU_LIST_POP_T (   hp,
  type 
)    (type *)bu_list_pop(hp)

Definition at line 259 of file list.h.

#define BU_LIST_INSERT_LIST (   dest_hp,
  src_hp 
)
Value:
if (LIKELY(BU_LIST_NON_EMPTY(src_hp))) { \
struct bu_list *_first = (src_hp)->forw; \
struct bu_list *_last = (src_hp)->back; \
(dest_hp)->forw->back = _last; \
_last->forw = (dest_hp)->forw; \
(dest_hp)->forw = _first; \
_first->back = (dest_hp); \
(src_hp)->forw = (src_hp)->back = (src_hp); \
}
ustring back
Definition: list.h:118
#define LIKELY(expression)
Definition: common.h:261
#define BU_LIST_NON_EMPTY(hp)
Definition: list.h:296

"Bulk transfer" all elements from the list headed by src_hd onto the list headed by dest_hd, without examining every element in the list. src_hd is left with a valid but empty list.

BU_LIST_INSERT_LIST places src_hd elements at head of dest_hd list, BU_LIST_APPEND_LIST places src_hd elements at end of dest_hd list.

Definition at line 270 of file list.h.

Referenced by bu_list_reverse(), eval_etree(), and eval_op().

#define BU_LIST_APPEND_LIST (   dest_hp,
  src_hp 
)
Value:
if (LIKELY(BU_LIST_NON_EMPTY(src_hp))) {\
struct bu_list *_first = (src_hp)->forw; \
struct bu_list *_last = (src_hp)->back; \
_first->back = (dest_hp)->back; \
(dest_hp)->back->forw = _first; \
(dest_hp)->back = _last; \
_last->forw = (dest_hp); \
(src_hp)->forw = (src_hp)->back = (src_hp); \
}
ustring back
Definition: list.h:118
#define LIKELY(expression)
Definition: common.h:261
#define BU_LIST_NON_EMPTY(hp)
Definition: list.h:296

Definition at line 281 of file list.h.

Referenced by bezier_subdivide(), mk_pipe(), nmg_merge_models(), and rt_dsp_shot().

#define BU_LIST_NON_EMPTY_P (   p,
  structure,
  hp 
)    (((p)=(struct structure *)((hp)->forw)) != (struct structure *)(hp))

Definition at line 297 of file list.h.

#define BU_LIST_IS_CLEAR (   hp)
Value:
((hp)->magic == 0 && \
(hp)->forw == BU_LIST_NULL && \
(hp)->back == BU_LIST_NULL)
ustring back
oldeumate l2 magic
Definition: nmg_mod.c:3843
#define BU_LIST_NULL
Definition: list.h:124

Definition at line 299 of file list.h.

#define BU_LIST_BACK (   structure,
  hp 
)    ((struct structure *)((hp)->back))

Definition at line 308 of file list.h.

Referenced by bend_pipe_shot().

#define BU_LIST_FIRST (   structure,
  hp 
)    ((struct structure *)((hp)->forw))

Definition at line 312 of file list.h.

Referenced by _dl_freeDisplayListItem(), _ged_append_pipept_common(), _ged_get_solid_keypoint(), _ged_ins_pipept(), add_solid(), brep_to_nmg(), bu_free_mapped_files(), bu_list_parallel_dequeue(), bu_observer_free(), check_hitstate(), cut_unimonotone(), dl_erasePathFromDisplay(), dl_zap(), do_region_end(), eliminate_overlaps(), Eplot(), eval_op(), evaluate(), fix_halfs(), gcv_region_end(), gcv_region_end_mc(), ged_bot_fuse(), ged_coil(), ged_decompose(), ged_facetize(), ged_fracture(), ged_import_polygon(), ged_make(), ged_nmg_simplify(), ged_shells(), get_first_shell(), isect_ray_loopuse(), isect_ray_snurb_face(), make_coil(), make_faceuse_from_face(), make_model_from_face(), make_near_list(), nmg_add_loop_to_face(), nmg_booltree_evaluate(), nmg_cface(), nmg_ck_closed_surf(), nmg_ck_fu_verts(), nmg_ck_lu(), nmg_ck_lueu(), nmg_class_lu_fu(), nmg_class_shells(), nmg_classify_lu_lu(), nmg_classify_pt_loop_new(), nmg_classify_s_vs_s(), nmg_close_shell(), nmg_cmface(), nmg_cut_loop(), nmg_cut_lu_into_coplanar_and_non(), nmg_decompose_shell(), nmg_demote_lu(), nmg_do_bool(), nmg_do_radial_flips(), nmg_dup_loop(), nmg_edge_collapse(), nmg_edge_g_fuse(), nmg_enlist_vu(), nmg_eval_shell(), nmg_extrude_cleanup(), nmg_extrude_shell(), nmg_face_rs_init(), nmg_find_max_index(), nmg_find_model(), nmg_find_pt_in_lu(), nmg_find_pt_in_shell(), nmg_find_shell(), nmg_find_vertex_in_lu(), nmg_fix_normals(), nmg_fix_overlapping_loops(), nmg_flatten_face(), nmg_fu_planeeqn(), nmg_get_edge_lines(), nmg_get_max_edge_inters(), nmg_hollow_shell(), nmg_is_vertex_in_looplist(), nmg_isect_line2_face2pNEW(), nmg_isect_shell_self(), nmg_isect_vert2p_face2p(), nmg_jeg(), nmg_jfg(), nmg_js(), nmg_jv(), nmg_keu_zl(), nmg_kfu(), nmg_kill_accordions(), nmg_kill_anti_loops(), nmg_kill_cracks(), nmg_kill_cracks_at_vertex(), nmg_kill_non_common_cracks(), nmg_kill_snakes(), nmg_kill_wire_edges(), nmg_kill_zero_length_edgeuses(), nmg_klu(), nmg_km(), nmg_kr(), nmg_ks(), nmg_loop_g(), nmg_loop_plane_area(), nmg_loop_plane_area2(), nmg_lu_is_convex(), nmg_lu_to_vlist(), nmg_m_reindex(), nmg_m_set_high_bit(), nmg_m_struct_count(), nmg_make_connect_faces(), nmg_make_dualvu(), nmg_meonvu(), nmg_merge_regions(), nmg_ml(), nmg_move_edge_thru_pt(), nmg_moveltof(), nmg_polytonmg(), nmg_reclassify_lu_eu(), nmg_region_end(), nmg_remove_short_eus_inter(), nmg_rm_redundancies(), nmg_sanitize_fu(), nmg_sanitize_s_lv(), nmg_simplify_loop(), nmg_simplify_shell_edges(), nmg_split_loops_handler(), nmg_split_lu_at_vu(), nmg_tabulate_face_g_verts(), nmg_to_arb(), nmg_to_poly(), nmg_to_tgc(), nmg_translate_face(), nmg_tri_kill_accordions(), nmg_triangulate_fu(), nmg_triangulate_rm_degen_loopuse(), nmg_triangulate_rm_holes(), nmg_triangulate_shell(), nmg_visit_loopuse(), nmg_vlist_to_wire_edges(), nmg_vlu(), pipe_elements_calculate(), pipe_scale_radius(), print_loopuse_tree(), promote_ints(), rt_arb_tess(), rt_arb_tnurb(), rt_arbn_tess(), rt_ars_prep(), rt_ars_tess(), rt_boolweave(), rt_bot_tess(), rt_cline_tess(), rt_dsp_tess(), rt_ebm_tess(), rt_ehy_tess(), rt_ell_tess(), rt_ell_tnurb(), rt_epa_tess(), rt_eto_tess(), rt_extrude_tess(), rt_hyp_tess(), rt_join_cnurbs(), rt_metaball_tess(), rt_new_rti(), rt_nmg_adjust(), rt_nmg_centroid(), rt_nmg_get(), rt_nmg_tess(), rt_part_tess(), rt_pg_tess(), rt_pipe_brep(), rt_pipe_ck(), rt_pipe_norm(), rt_pipe_shot(), rt_pipe_surf_area(), rt_pipe_tess(), rt_rhc_tess(), rt_rpc_tess(), rt_shootray(), rt_shootray_bundle(), rt_tgc_tess(), rt_tgc_tnurb(), rt_tor_tess(), rt_vls_pipept(), rt_vol_tess(), rt_vshootray(), seg_to_vlist(), stash_shell(), tesselate_pipe_bend(), tesselate_pipe_end(), tesselate_pipe_linear(), tesselate_pipe_start(), test_nmg_mmr(), test_nmg_msv(), unprep_leaf(), and vshot_stub().

#define BU_LIST_FORW (   structure,
  hp 
)    ((struct structure *)((hp)->forw))

Definition at line 314 of file list.h.

#define BU_LIST_IS_HEAD (   p,
  hp 
)    (((struct bu_list *)(p)) == (struct bu_list *)(hp))

Boolean test to see if current list element is the head

Definition at line 322 of file list.h.

Referenced by bu_cmdhist_next(), check_hitstate(), eliminate_overlaps(), ged_which(), nmg_classify_pt_loop_new(), nmg_fix_overlapping_loops(), nmg_triangulate_rm_degen_loopuse(), pipe_elements_calculate(), promote_ints(), rt_pipe_brep(), rt_pipe_tess(), to_autoview(), to_bg(), to_bounds(), to_configure(), to_constrain_rmode(), to_constrain_tmode(), 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_faceplate(), to_fontsize(), to_get_prev_mouse(), to_handle_refresh(), to_hide_view(), to_idle_mode(), to_init_view_bindings(), to_light(), to_listen(), to_model_axes(), 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_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_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 vdraw_insert().

#define BU_LIST_NOT_HEAD (   p,
  hp 
)    (!BU_LIST_IS_HEAD(p, hp))

Definition at line 324 of file list.h.

Referenced by _dl_eraseAllNamesFromDisplay(), _dl_eraseAllPathsFromDisplay(), _dl_eraseFirstSubpath(), bu_cmdhist_curr(), bu_cmdhist_history(), bu_cmdhist_prev(), bu_free_mapped_files(), bu_list_parallel_dequeue(), bu_observer_free(), check_hitstate(), cho_deleteProc(), dl_addToDisplay(), dl_bitwise_and_fullpath(), dl_bounding_sph(), dl_color_soltab(), dl_erasePathFromDisplay(), dl_how(), dl_plot(), dl_png(), dl_polybinout(), dl_print_schain(), dl_select(), dl_select_partial(), dl_set_flag(), dl_set_iflag(), dl_set_transparency(), dl_set_wflag(), dl_write_animate(), dm_draw_display_list(), do_region_end(), eliminate_overlaps(), eraseAllSubpathsFromSolidList(), eval_op(), fix_halfs(), gcv_region_end(), gcv_region_end_mc(), ged_decompose(), ged_free(), ged_illum(), ged_osgLoadScene(), ged_saveview(), go_draw_dlist(), headsolid_splitGDL(), hit_ins(), make_near_list(), nmg_break_crossed_loops(), nmg_class_shells(), nmg_classify_lu_lu(), nmg_decompose_shell(), nmg_do_radial_flips(), nmg_edge_collapse(), nmg_eval_shell(), nmg_extrude_cleanup(), nmg_extrude_shell(), nmg_find_pt_in_shell(), nmg_fix_overlapping_loops(), nmg_js(), nmg_jv(), nmg_keu_zl(), 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_radial_mark_cracks(), nmg_region_end(), nmg_remove_short_eus_inter(), nmg_rm_redundancies(), nmg_sanitize_fu(), nmg_sanitize_s_lv(), nmg_shell_a(), nmg_shell_coplanar_face_merge(), nmg_simplify_loop(), nmg_simplify_shell_edges(), nmg_split_loops_handler(), nmg_tri_kill_accordions(), nmg_triangulate_fu(), nmg_triangulate_shell(), promote_ints(), rt_ebm_tess(), rt_join_cnurbs(), rt_nmg_tess(), rt_pipe_ck(), rt_vls_pipept(), to_edit_redraw(), and vdraw_delete().

#define BU_LIST_PREV_IS_HEAD (   p,
  hp 
)    (((struct bu_list *)(p))->back == (struct bu_list *)(hp))

Boolean test to see if previous list element is the head

Definition at line 330 of file list.h.

#define BU_LIST_PREV_NOT_HEAD (   p,
  hp 
)    (!BU_LIST_PREV_IS_HEAD(p, hp))

Definition at line 332 of file list.h.

#define BU_LIST_NEXT_IS_HEAD (   p,
  hp 
)    (((struct bu_list *)(p))->forw == (struct bu_list *)(hp))

Boolean test to see if the next list element is the head

Definition at line 338 of file list.h.

Referenced by nmg_shell_coplanar_face_merge(), and rt_pipe_brep().

#define BU_LIST_NEXT_NOT_HEAD (   p,
  hp 
)    (!BU_LIST_NEXT_IS_HEAD(p, hp))

Definition at line 340 of file list.h.

Referenced by nmg_to_arb(), nmg_to_tgc(), and rt_nmg_tess().

#define BU_LIST_EACH (   hp,
  p,
  type 
)
Value:
for ((p)=(type *)BU_LIST_FIRST(bu_list, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PNEXT(bu_list, p)) \
Definition: list.h:118
#define BU_LIST_PNEXT(structure, p)
Definition: list.h:422
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324
#define BU_LIST_FIRST(structure, hp)
Definition: list.h:312

Definition at line 343 of file list.h.

Referenced by bu_prmem().

#define BU_LIST_REVEACH (   hp,
  p,
  type 
)
Value:
for ((p)=(type *)BU_LIST_LAST(bu_list, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PREV(bu_list, ((struct bu_list *)(p)))) \
Definition: list.h:118
#define BU_LIST_LAST(structure, hp)
Definition: list.h:306
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324
#define BU_LIST_PREV(structure, hp)
Definition: list.h:310

Definition at line 348 of file list.h.

#define BU_LIST_TAIL (   hp,
  start,
  p,
  type 
)
Value:
for ((p)=(type *)start; \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=(type *)BU_LIST_PNEXT(bu_list, (p)))
Definition: list.h:118
#define BU_LIST_PNEXT(structure, p)
Definition: list.h:422
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324

Definition at line 353 of file list.h.

#define BU_LIST_FOR (   p,
  structure,
  hp 
)
Value:
(p)=BU_LIST_FIRST(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PNEXT(structure, p)
#define BU_LIST_PNEXT(structure, p)
Definition: list.h:422
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324
#define BU_LIST_FIRST(structure, hp)
Definition: list.h:312

Intended as innards for a for loop to visit all nodes on list, e.g.:

for (BU_LIST_FOR(p, structure, hp)) { work_on(p); }

Definition at line 365 of file list.h.

Referenced by _db_search_full_paths(), _ged_append_pipept_common(), _ged_get_metaball_i_pt(), _ged_get_metaball_pt_i(), _ged_get_pipe_i_seg(), _ged_get_pipe_seg_i(), _osgLoadSolid(), _rt_find_identical_solid(), _rt_getregion(), add_seg(), add_unique_pair(), add_vlist_to_geom(), allocate_per_region_data(), bbd_render(), bbd_setup(), bn_vlist_cmd_cnt(), bu_cmdhist_history(), BU_FORTRAN(), bu_hook_call(), bu_hook_delete(), bu_list_len(), bu_observer_notify(), bu_open_mapped_file(), build_topo_list(), check_syntax(), cho_open(), cho_open_tcl(), cut_unimonotone(), db_search_unique_objects(), dl_botdump(), dl_plot(), dl_polybinout(), dl_print_schain(), dl_redraw(), dl_select(), dl_select_partial(), dmo_open_tcl(), do_inter(), do_paren(), do_union_subtr(), EmitPhotonsRandom(), Eplot(), eval_op(), fbo_open_tcl(), find_metaballpt_nearest_pt(), find_pipept_nearest_pt(), findjoint(), fix_halfs(), gauss_render(), gcv_converter_find(), ged_add_metaballpt(), ged_bot_fuse(), ged_bot_split(), ged_build_tops(), ged_count_tops(), ged_decompose(), ged_E(), ged_fracture(), ged_get_obj_bounds(), ged_gqa(), ged_import_polygon(), ged_move(), ged_move_metaballpt(), ged_move_pipept(), ged_nmg_fix_normals(), ged_nmg_simplify(), ged_redraw(), ged_rmap(), ged_rtabort(), ged_shells(), ged_which(), ged_who(), guess_class_from_hitlist_max(), guess_class_from_hitlist_min(), hit_ins(), insert_node(), isect_ray_loopuse(), isect_ray_planar_face(), isect_ray_snurb_face(), light_cleanup(), light_hit(), light_init(), light_obs(), list_report(), make_coil(), make_near_list(), mesh_leaf(), mk_tree_gift(), mk_tree_pure(), move_all_func(), nmg_2_vrml(), nmg_assoc_void_shells(), nmg_bad_face_normals(), nmg_bot(), nmg_break_crossed_loops(), nmg_break_long_edges(), nmg_brep_face(), nmg_bsegs(), nmg_build_loopuse_tree(), nmg_calc_face_plane(), nmg_check_closed_shell(), nmg_ck_closed_region(), nmg_ck_closed_surf(), nmg_ck_eg_verts(), nmg_ck_face_worthless_edges(), nmg_ck_fg_verts(), nmg_ck_fu(), nmg_ck_fu_verts(), nmg_ck_hitmiss_list(), nmg_ck_lu(), nmg_ck_lueu(), nmg_ck_v_in_2fus(), nmg_ck_v_in_fus(), nmg_ck_vert_on_fus(), nmg_ck_vu_ptbl(), nmg_class_pt_fu_except(), nmg_class_pt_lu_except(), nmg_class_pt_s(), nmg_class_ray_vs_shell(), nmg_classify_lu_lu(), nmg_classify_lu_lu_new(), nmg_classify_pt_loop_new(), nmg_clone_model(), nmg_close_shell(), nmg_cnurb_is_on_crv(), nmg_common_v_2eg(), nmg_complex_vertex_solve(), nmg_connect_same_fu_orients(), nmg_count_shell_kids(), nmg_crackshells(), nmg_cut_lu_into_coplanar_and_non(), nmg_dangling_face(), nmg_decompose_shell(), nmg_disconnect_shells(), nmg_do_radial_join(), nmg_does_fu_use_eg(), nmg_dump_model(), nmg_dup_face(), nmg_dup_loop(), nmg_dup_shell(), nmg_edge_collapse(), nmg_edgeuse_with_eg_tabulate(), nmg_eu_is_part_of_crack(), nmg_eu_to_vlist(), nmg_extrude_cleanup(), nmg_extrude_shell(), nmg_face_bb(), nmg_face_fix_radial_parity(), nmg_face_new_g(), nmg_face_rs_init(), nmg_faces_are_radial(), nmg_faceuse_area(), nmg_find_e(), nmg_find_edge_between_2fu(), nmg_find_eg_between_2fg(), nmg_find_eu_in_face(), nmg_find_eu_with_vu_in_lu(), nmg_find_fu_with_fg_in_s(), nmg_find_isect_faces(), nmg_find_max_index(), nmg_find_outer_and_void_shells(), nmg_find_path(), nmg_find_pt_in_face(), nmg_find_pt_in_lu(), nmg_find_pt_in_model(), nmg_find_pt_in_shell(), nmg_find_radial_eu(), nmg_find_repeated_v_in_lu(), nmg_find_top_face_in_dir(), nmg_find_v_in_face(), nmg_find_v_in_shell(), nmg_find_vertex_in_lu(), 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_touchingloops(), nmg_get_edge_lines(), nmg_get_interior_pt(), nmg_get_touching_jaunts(), nmg_glue_face_in_shell(), nmg_gluefaces(), nmg_hollow_shell(), nmg_insure_radial_list_is_increasing(), nmg_intersect_loops_self(), nmg_invert_shell(), nmg_is_common_bigloop(), nmg_is_edge_in_edgelist(), nmg_is_edge_in_facelist(), nmg_is_edge_in_looplist(), nmg_is_loop_in_facelist(), nmg_is_vertex_a_selfloop_in_shell(), nmg_is_vertex_in_edgelist(), nmg_is_vertex_in_face(), nmg_is_vertex_in_facelist(), nmg_is_vertex_in_looplist(), nmg_isect_2faceuse(), nmg_isect_eu_fu(), nmg_isect_face3p_shell_int(), nmg_isect_fu_jra(), nmg_isect_line2_face2pNEW(), nmg_isect_potcut_fu(), nmg_isect_ray_model(), nmg_isect_ray_shell(), nmg_isect_shell_self(), nmg_isect_vert2p_face2p(), nmg_join_touchingloops(), nmg_k0eu(), nmg_kill_accordions(), nmg_kill_anti_loops(), nmg_kill_cracks(), nmg_kill_cracks_at_vertex(), nmg_kill_non_common_cracks(), nmg_loop_g(), nmg_loop_is_a_crack(), nmg_loop_plane_area(), nmg_loop_plane_area2(), nmg_loop_plane_newell(), nmg_loop_touches_self(), nmg_lu_to_vlist(), nmg_m_reindex(), nmg_m_set_high_bit(), nmg_m_struct_count(), nmg_m_to_vlist(), nmg_make_dualvu(), nmg_make_faces_at_vert(), nmg_make_faces_within_tol(), nmg_manifolds(), nmg_merge_models(), nmg_mesh_face_shell(), nmg_mesh_shell_shell(), nmg_mesh_two_faces(), nmg_mirror_model(), nmg_mk_model_from_region(), nmg_mk_new_face_from_loop(), nmg_model_area(), nmg_model_bb(), nmg_model_fuse(), nmg_move_edge_thru_pt(), nmg_no_isect_fu_pl(), nmg_open_shells_connect(), nmg_pl_fu(), nmg_pl_hitmiss_list(), nmg_pl_isect(), nmg_plot_fu(), nmg_plot_open_edges(), nmg_pr_fu(), nmg_pr_fu_briefly(), nmg_pr_fus_in_fg(), nmg_pr_lu(), nmg_pr_lu_briefly(), nmg_pr_m(), nmg_pr_r(), nmg_pr_radial_list(), nmg_pr_s(), nmg_pr_s_briefly(), nmg_propagate_normals(), nmg_purge_unwanted_intersection_points(), nmg_r_radial_check(), nmg_r_to_vlist(), nmg_radial_build_list(), nmg_radial_exchange_marked(), nmg_radial_find_an_original(), nmg_radial_implement_decisions(), nmg_radial_mark_cracks(), nmg_radial_verify_monotone(), nmg_radial_verify_pointers(), nmg_ray_segs(), nmg_rebound(), nmg_reclassify_lu_eu(), nmg_region_a(), nmg_region_area(), nmg_reverse_face_and_radials(), nmg_reverse_radials(), nmg_rm_redundancies(), nmg_rt_print_hitlist(), nmg_s_join_touchingloops(), nmg_s_split_touchingloops(), nmg_s_to_vlist(), nmg_search_v_eg(), nmg_shell_a(), nmg_shell_area(), nmg_shell_coplanar_face_merge(), nmg_shell_manifolds(), nmg_show_each_loop(), nmg_simplify_face(), nmg_simplify_shell(), nmg_simplify_shell_edges(), nmg_snurb_calc_lu_uv_orient(), nmg_split_loops_handler(), nmg_split_touchingloops(), nmg_tabulate_face_g_verts(), nmg_to_arb(), nmg_to_poly(), nmg_to_tgc(), nmg_translate_face(), nmg_tri_kill_accordions(), nmg_triangulate_fu(), nmg_triangulate_model(), nmg_triangulate_rm_degen_loopuse(), nmg_triangulate_rm_holes(), nmg_two_face_fuse(), nmg_uv_in_lu(), nmg_veg(), nmg_veu(), nmg_vfu(), nmg_visit_faceuse(), nmg_visit_loopuse(), nmg_visit_model(), nmg_visit_region(), nmg_visit_shell(), nmg_vlblock_fu(), nmg_vlblock_lu(), nmg_vlblock_m(), nmg_vlblock_r(), nmg_vlblock_s(), nmg_vlist_to_eu(), nmg_vlist_to_wire_edges(), nmg_vlu(), nmg_vregion(), nmg_vshell(), nmg_vvertex(), observer_attach(), observer_detach(), observer_show(), PHit(), pick_edges(), pipe_scale_id(), pipe_scale_od(), pipe_scale_radius(), pl_ray(), plot_drawVList(), print_loopuse_tree(), print_seg_list(), prj_print(), prj_render(), prj_setup(), promote_ints(), ps_drawVList(), qray_data_to_vlist(), rt_bot_create(), rt_bot_split_func(), rt_bot_sync_func(), rt_ck(), rt_ck_vlist(), rt_clean(), rt_dsp_shot(), rt_dsp_tess(), rt_ehy_tess(), rt_ell_tess(), rt_epa_tess(), rt_eto_tess(), rt_extrude_tess(), rt_get_solidbitv(), rt_gettrees_muves(), rt_hyp_tess(), rt_join_cnurbs(), rt_label_vlist_verts(), rt_load_attrs(), rt_metaball_describe(), rt_metaball_export5(), rt_metaball_get(), rt_metaball_get_bounding_sphere(), rt_metaball_norm_internal(), rt_metaball_plot(), rt_metaball_point_value_blob(), rt_metaball_point_value_iso(), rt_metaball_prep(), rt_metaball_print(), rt_metaball_tess(), rt_nmg_adjust(), rt_nmg_brep(), rt_nmg_get(), rt_nmg_mirror(), rt_nmg_surf_area(), rt_nmg_volume(), rt_nurb_bbox(), rt_nurb_prep(), rt_nurb_shot(), rt_part_tess(), rt_pipe_adjust(), rt_pipe_centroid(), rt_pipe_describe(), rt_pipe_export4(), rt_pipe_export5(), rt_pipe_get(), rt_pipe_mirror(), rt_pipe_shot(), rt_pipe_surf_area(), rt_pipe_tess(), rt_pipe_volume(), rt_plot_cell(), rt_pnts_bbox(), rt_pnts_describe(), rt_pnts_export5(), rt_pnts_plot(), rt_pnts_print(), rt_prep_parallel(), rt_regionfix(), rt_reprep(), rt_rhc_tess(), rt_rpc_tess(), rt_shootray(), rt_shootrays(), rt_submodel_a_hit(), rt_tgc_tess(), rt_tor_tess(), rt_vlist_copy(), rt_vlist_export(), rt_vlist_to_uplot(), rt_vol_tess(), Shell_is_arb(), shoot_and_plot(), show_seg(), stash_shell(), summary_reports(), terminate_check(), tesselate_pipe_bend(), tesselate_pipe_end(), tesselate_pipe_linear(), tesselate_pipe_start(), to_autoview(), to_autoview_all_views(), to_autoview_func(), to_bg(), to_bounds(), to_configure(), to_constrain_rmode(), to_constrain_tmode(), to_copy(), to_create_vlist_callback_solid(), 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_faceplate(), to_fontsize(), to_free_vlist_callback(), to_get_prev_mouse(), to_handle_refresh(), to_hide_view(), to_idle_mode(), to_init_view_bindings(), to_light(), to_list_views(), to_listen(), to_lod(), to_model_axes(), 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_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_refresh_all_views(), to_rotate_arb_face_mode(), to_rotate_mode(), 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(), triangulateFace(), unresolved(), validate_tbl2d(), vdraw_delete(), vdraw_insert(), vertex_neighborhood(), and viewshade().

#define BU_LIST_FOR_BACKWARDS (   p,
  structure,
  hp 
)
Value:
(p)=BU_LIST_LAST(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PLAST(structure, p)
#define BU_LIST_LAST(structure, hp)
Definition: list.h:306
#define BU_LIST_PLAST(structure, p)
Definition: list.h:424
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324

Definition at line 370 of file list.h.

Referenced by nmg_radial_sorted_list_insert(), and rt_nmg_get().

#define BU_LIST_FOR_CIRC (   p,
  structure,
  hp 
)
Value:
(p)=BU_LIST_PNEXT_CIRC(structure, hp); \
(p) && BU_LIST_NOT_HEAD(p, hp); \
(p)=BU_LIST_PNEXT_CIRC(structure, p)
#define BU_LIST_PNEXT_CIRC(structure, p)
Definition: list.h:442
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324

Process all the list members except hp and the actual head. Useful when starting somewhere besides the head.

Definition at line 379 of file list.h.

Referenced by nmg_radial_check_parity(), and nmg_radial_mark_flips().

#define BU_LIST_FOR2 (   p1,
  p2,
  structure,
  hp1,
  hp2 
)
Value:
(p1)=BU_LIST_FIRST(structure, hp1), \
(p2)=BU_LIST_FIRST(structure, hp2); \
(p1) && BU_LIST_NOT_HEAD((struct bu_list *)(p1), (hp1)) && \
(p2) && BU_LIST_NOT_HEAD((struct bu_list *)(p2), (hp2)); \
(p1)=BU_LIST_NEXT(structure, (struct bu_list *)(p1)), \
(p2)=BU_LIST_NEXT(structure, (struct bu_list *)(p2))
Definition: list.h:118
#define BU_LIST_NEXT(structure, hp)
Definition: list.h:316
#define BU_LIST_NOT_HEAD(p, hp)
Definition: list.h:324
#define BU_LIST_FIRST(structure, hp)
Definition: list.h:312

Intended as innards for a for loop to visit elements of two lists in tandem, e.g.:

for (BU_LIST_FOR2(p1, p2, structure, hp1, hp2)) { process(p1, p2); }

Definition at line 392 of file list.h.

Referenced by nmg_compare_faceuse(), nmg_compare_region(), nmg_compare_shell(), nmg_extrude_face(), and test_nmg_clone_model().

#define BU_LIST_FIRST_MAGIC (   hp)    ((hp)->forw->magic)

Return the magic number of the first (or last) item on a list

Definition at line 416 of file list.h.

Referenced by _ged_get_solid_keypoint(), cut_unimonotone(), Eplot(), isect_ray_loopuse(), isect_ray_snurb_face(), nmg_2_vrml(), nmg_assoc_void_shells(), nmg_bot(), nmg_break_crossed_loops(), nmg_break_long_edges(), nmg_brep_face(), nmg_calc_face_plane(), nmg_check_closed_shell(), nmg_ck_closed_surf(), nmg_ck_face_worthless_edges(), nmg_ck_fu_verts(), nmg_ck_lu(), nmg_ck_lueu(), nmg_class_lu_fu(), nmg_class_pt_lu_except(), nmg_classify_lu_lu(), nmg_classify_lu_lu_new(), nmg_classify_pt_loop_new(), nmg_close_shell(), nmg_connect_same_fu_orients(), nmg_crackshells(), nmg_cut_lu_into_coplanar_and_non(), nmg_dangling_face(), nmg_decompose_shell(), nmg_demote_lu(), nmg_does_fu_use_eg(), nmg_dup_loop(), nmg_eval_shell(), nmg_extrude_face(), nmg_extrude_shell(), nmg_face_fix_radial_parity(), nmg_face_rs_init(), nmg_faces_are_radial(), nmg_faceuse_area(), nmg_fcut_face(), nmg_find_edge_between_2fu(), nmg_find_eg_between_2fg(), nmg_find_eu_with_vu_in_lu(), nmg_find_max_index(), nmg_find_pt_in_lu(), nmg_find_top_face_in_dir(), nmg_find_vertex_in_lu(), nmg_fix_overlapping_loops(), nmg_flatten_face(), nmg_fu_planeeqn(), nmg_get_interior_pt(), nmg_get_touching_jaunts(), nmg_glue_face_in_shell(), nmg_gluefaces(), nmg_hollow_shell(), nmg_intersect_loops_self(), nmg_is_common_bigloop(), nmg_is_edge_in_looplist(), nmg_is_vertex_in_looplist(), nmg_isect_2faceuse(), nmg_isect_eu_fu(), nmg_isect_face3p_shell_int(), nmg_isect_line2_face2pNEW(), nmg_isect_vert2p_face2p(), nmg_join_touchingloops(), nmg_keu_zl(), nmg_kill_accordions(), nmg_kill_anti_loops(), nmg_kill_cracks(), nmg_kill_cracks_at_vertex(), nmg_kill_non_common_cracks(), nmg_kill_snakes(), nmg_kill_zero_length_edgeuses(), nmg_klu(), nmg_loop_g(), nmg_loop_is_a_crack(), nmg_loop_plane_area(), nmg_loop_plane_area2(), nmg_loop_plane_newell(), nmg_loop_touches_self(), nmg_lu_is_convex(), nmg_lu_reorient(), nmg_lu_to_vlist(), nmg_m_reindex(), nmg_m_set_high_bit(), nmg_m_struct_count(), nmg_make_dualvu(), nmg_meonvu(), nmg_mesh_two_faces(), nmg_move_edge_thru_pt(), nmg_no_isect_fu_pl(), nmg_open_shells_connect(), nmg_pl_isect(), nmg_plot_fu(), nmg_plot_open_edges(), nmg_pr_lu(), nmg_pr_lu_briefly(), nmg_propagate_normals(), nmg_purge_unwanted_intersection_points(), nmg_reclassify_lu_eu(), nmg_reverse_face_and_radials(), nmg_reverse_radials(), nmg_rm_redundancies(), nmg_sanitize_s_lv(), nmg_show_each_loop(), nmg_simplify_loop(), nmg_simplify_shell_edges(), nmg_snurb_calc_lu_uv_orient(), nmg_split_loops_handler(), nmg_split_touchingloops(), nmg_tabulate_face_g_verts(), nmg_to_poly(), nmg_to_tgc(), nmg_translate_face(), nmg_tri_kill_accordions(), nmg_triangulate_fu(), nmg_triangulate_rm_degen_loopuse(), nmg_uv_in_lu(), nmg_visit_loopuse(), nmg_vlblock_lu(), nmg_vlu(), nmg_vvu(), rt_ehy_tess(), rt_hyp_tess(), rt_nmg_get(), rt_tgc_tess(), Shell_is_arb(), tesselate_pipe_end(), tesselate_pipe_start(), and validate_tbl2d().

#define BU_LIST_LAST_MAGIC (   hp)    ((hp)->back->magic)

Definition at line 417 of file list.h.

#define BU_LIST_PNEXT (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->forw))

Return pointer to next (or previous) element, which may be the head

Definition at line 422 of file list.h.

Referenced by _dl_eraseAllNamesFromDisplay(), _dl_eraseAllPathsFromDisplay(), _dl_eraseFirstSubpath(), bu_cmdhist_next(), bu_observer_free(), check_hitstate(), cho_deleteProc(), dl_addToDisplay(), dl_bitwise_and_fullpath(), dl_bounding_sph(), dl_color_soltab(), dl_erasePathFromDisplay(), dl_how(), dl_plot(), dl_png(), dl_polybinout(), dl_print_schain(), dl_select(), dl_select_partial(), dl_set_flag(), dl_set_iflag(), dl_set_transparency(), dl_set_wflag(), dl_write_animate(), dm_draw_display_list(), do_region_end(), eliminate_overlaps(), eraseAllSubpathsFromSolidList(), eval_op(), fix_halfs(), gcv_region_end(), gcv_region_end_mc(), ged_free(), ged_illum(), ged_osgLoadScene(), ged_saveview(), go_draw_dlist(), headsolid_splitGDL(), insert_above(), make_near_list(), nmg_break_crossed_loops(), nmg_class_shells(), nmg_classify_lu_lu(), nmg_classify_pt_loop_new(), nmg_do_radial_flips(), nmg_eval_shell(), nmg_extrude_cleanup(), nmg_extrude_shell(), nmg_find_pt_in_shell(), nmg_fix_overlapping_loops(), nmg_js(), nmg_jv(), nmg_keu_zl(), nmg_kill_accordions(), nmg_kill_cracks(), nmg_kill_non_common_cracks(), nmg_kill_snakes(), nmg_kill_zero_length_edgeuses(), nmg_polytonmg(), nmg_pr_lu(), nmg_pr_lu_briefly(), nmg_radial_mark_cracks(), nmg_region_end(), nmg_remove_short_eus_inter(), nmg_rm_redundancies(), nmg_sanitize_fu(), nmg_sanitize_s_lv(), nmg_shell_a(), nmg_simplify_loop(), nmg_simplify_shell_edges(), nmg_split_loops_handler(), nmg_tri_kill_accordions(), nmg_triangulate_fu(), nmg_triangulate_rm_degen_loopuse(), nmg_triangulate_shell(), nmg_vlblock_lu(), nurb_c_to_bezier(), promote_ints(), rt_ebm_tess(), rt_nmg_tess(), to_edit_redraw(), unprep_leaf(), and vdraw_delete().

#define BU_LIST_PLAST (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->back))
#define BU_LIST_PNEXT_PNEXT (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->forw->forw))

Return pointer two links away, which may include the head

Definition at line 430 of file list.h.

Referenced by nmg_class_shells(), nmg_find_pt_in_shell(), and nmg_sanitize_s_lv().

#define BU_LIST_PNEXT_PLAST (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->forw->back))

Definition at line 432 of file list.h.

Referenced by nmg_ck_fu(), nmg_vlu(), nmg_vregion(), and nmg_vvu().

#define BU_LIST_PLAST_PNEXT (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->back->forw))

Definition at line 434 of file list.h.

Referenced by nmg_ck_fu().

#define BU_LIST_PLAST_PLAST (   structure,
 
)    ((struct structure *)(((struct bu_list *)(p))->back->back))

Definition at line 436 of file list.h.

#define BU_LIST_PNEXT_CIRC (   structure,
 
)
Value:
BU_LIST_PNEXT_PNEXT(structure, (struct bu_list *)(p)) : \
BU_LIST_PNEXT(structure, p))
Definition: list.h:118
#define BU_LIST_PNEXT(structure, p)
Definition: list.h:422
#define BU_LIST_FIRST_MAGIC(hp)
Definition: list.h:416
#define BU_LIST_HEAD_MAGIC
Definition: magic.h:56
#define BU_LIST_PNEXT_PNEXT(structure, p)
Definition: list.h:430

Return pointer to circular next element; i.e., ignoring the list head

Definition at line 442 of file list.h.

Referenced by edge_hit_ray_state(), eu_touch_func(), nmg_2lu_identical(), nmg_assess_eu(), nmg_assess_vu(), nmg_break_eu_on_v(), nmg_ck_eu(), nmg_ck_face_worthless_edges(), nmg_class_lu_fu(), nmg_class_pt_euvu(), nmg_classify_lu_lu(), nmg_cmface(), nmg_cut_loop(), nmg_cut_lu_into_coplanar_and_non(), nmg_dist_to_cross(), nmg_do_radial_flips(), nmg_edge_collapse(), nmg_face_coincident_vu_sort(), nmg_face_rs_init(), nmg_face_state_transition(), nmg_find_eu_leftvec(), nmg_find_first_last_use_of_v_in_fu(), nmg_find_matching_eu_in_s(), nmg_find_next_use_of_2e_in_lu(), nmg_fu_planeeqn(), nmg_get_edge_lines(), nmg_get_touching_jaunts(), nmg_isect_2colinear_edge2p(), nmg_isect_edge2p_edge2p(), nmg_isect_line2_edge2p(), nmg_isect_line2_face2pNEW(), nmg_isect_potcut_fu(), nmg_isect_two_ptbls(), nmg_jl(), nmg_join_2loops(), nmg_kill_accordions(), nmg_kill_anti_loops(), nmg_kill_cracks(), nmg_kill_non_common_cracks(), nmg_kill_snakes(), nmg_kill_zero_length_edgeuses(), nmg_loop_plane_area(), nmg_loop_plane_area2(), nmg_loop_plane_newell(), nmg_loop_split_at_touching_jaunt(), nmg_lu_is_convex(), nmg_move_edge_thru_pt(), nmg_pr_ptbl(), nmg_radial_build_list(), nmg_radial_verify_pointers(), nmg_search_v_eg(), nmg_simplify_shell_edges(), nmg_split_lu_at_vu(), nmg_to_arb(), nmg_tri_kill_accordions(), nmg_triangulate_rm_holes(), nmg_unbreak_handler(), nmg_veu(), nmg_vu_angle_measure(), pick_edges(), pick_eu(), tesselate_pipe_bend(), tesselate_pipe_linear(), and vertex_neighborhood().

#define BU_LIST_MAIN_PTR (   _type,
  _ptr2,
  _name2 
)    ((struct _type *)(((char *)(_ptr2)) - (bu_offsetof(struct _type, _name2) + bu_offsetof(struct bu_list, magic))))

Support for membership on multiple linked lists.

When a structure of type '_type' contains more than one bu_list structure within it (such as the NMG edgeuse), this macro can be used to convert a pointer '_ptr2' to a "midway" bu_list structure (an element called '_name2' in structure '_type') back into a pointer to the overall enclosing structure. Examples:

eu = BU_LIST_MAIN_PTR(edgeuse, midway, l2);

eu1 = BU_LIST_MAIN_PTR(edgeuse, BU_LIST_FIRST(bu_list, &eg1->eu_hd2), l2);

Files using BU_LIST_MAIN_PTR will need to include stddef.h

Definition at line 470 of file list.h.

Referenced by _rt_find_identical_solid(), nmg_ck_eg_verts(), nmg_common_v_2eg(), nmg_edge_g_fuse(), nmg_edgeuse_with_eg_tabulate(), nmg_index_of_struct(), nmg_jeg(), nmg_veg(), and unprep_leaf().

Typedef Documentation

typedef struct bu_list bu_list_t

Definition at line 123 of file list.h.

Function Documentation

struct bu_list * bu_list_new ( void  )

Creates and initializes a bu_list head structure

Definition at line 30 of file list.c.

References BU_ALLOC, and BU_LIST_INIT.

struct bu_list * bu_list_pop ( struct bu_list hp)

Returns the results of BU_LIST_POP

Definition at line 41 of file list.c.

References BU_LIST_POP.

void bu_list_reverse ( struct bu_list hd)

Reverses the order of elements in a bu_list linked list.

Referenced by nmg_insure_radial_list_is_increasing().

void bu_list_free ( struct bu_list hd)

Given a list of structures allocated with bu_malloc() or bu_calloc() enrolled on a bu_list head, walk the list and free the structures. This routine can only be used when the structures have no interior pointers.

Definition at line 79 of file list.c.

References bu_free(), BU_LIST_DEQUEUE, and BU_LIST_WHILE.

Referenced by ged_nirt().

Here is the call graph for this function:

void bu_list_parallel_append ( struct bu_list headp,
struct bu_list itemp 
)

Simple parallel-safe routine for appending a data structure to the end of a bu_list doubly-linked list.

Issues:
Only one semaphore shared by all list heads.
No portable way to notify waiting thread(s) that are sleeping

Definition at line 90 of file list.c.

References BU_LIST_INSERT, BU_SEM_LISTS, bu_semaphore_acquire(), and bu_semaphore_release().

Here is the call graph for this function:

struct bu_list * bu_list_parallel_dequeue ( struct bu_list headp)

Simple parallel-safe routine for dequeueing one data structure from the head of a bu_list doubly-linked list. If the list is empty, wait until some other thread puts something on the list.

Issues:
No portable way to not spin and burn CPU time while waiting
for something to show up on the list.

Definition at line 98 of file list.c.

References BU_LIST_DEQUEUE, BU_LIST_FIRST, BU_LIST_NOT_HEAD, BU_SEM_LISTS, bu_semaphore_acquire(), and bu_semaphore_release().

Here is the call graph for this function:

void bu_ck_list ( const struct bu_list hd,
const char *  str 
)

Generic bu_list doubly-linked list checker.

Definition at line 116 of file list.c.

References bu_list::back, bu_bomb(), BU_LIST_HEAD_MAGIC, bu_log(), bu_list::forw, bu_list::magic, and UNLIKELY.

Here is the call graph for this function:

void bu_ck_list_magic ( const struct bu_list hd,
const char *  str,
const uint32_t  magic 
)

bu_list doubly-linked list checker which checks the magic number for all elements in the linked list

Definition at line 157 of file list.c.

References bu_list::back, bu_bomb(), bu_identify_magic(), BU_LIST_HEAD_MAGIC, bu_log(), bu_list::forw, bu_list::magic, and UNLIKELY.

Referenced by nmg_veg(), and nmg_veu().

Here is the call graph for this function: