[brlcad-commits] SF.net SVN: brlcad:[37033] brlcad/trunk
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2009-12-28 09:43:56
|
Revision: 37033 http://brlcad.svn.sourceforge.net/brlcad/?rev=37033&view=rev Author: brlcad Date: 2009-12-28 09:43:45 +0000 (Mon, 28 Dec 2009) Log Message: ----------- remove the unused resource pointer from the ifree() callback. Modified Paths: -------------- brlcad/trunk/include/raytrace.h brlcad/trunk/src/librt/primitives/arb8/arb8.c brlcad/trunk/src/librt/primitives/arbn/arbn.c brlcad/trunk/src/librt/primitives/ars/ars.c brlcad/trunk/src/librt/primitives/bot/bot.c brlcad/trunk/src/librt/primitives/brep/brep.cpp brlcad/trunk/src/librt/primitives/bspline/bspline.cpp brlcad/trunk/src/librt/primitives/cline/cline.c brlcad/trunk/src/librt/primitives/dsp/dsp.c brlcad/trunk/src/librt/primitives/ebm/ebm.c brlcad/trunk/src/librt/primitives/ehy/ehy.c brlcad/trunk/src/librt/primitives/ell/ell.c brlcad/trunk/src/librt/primitives/epa/epa.c brlcad/trunk/src/librt/primitives/eto/eto.c brlcad/trunk/src/librt/primitives/extrude/extrude.c brlcad/trunk/src/librt/primitives/grip/grip.c brlcad/trunk/src/librt/primitives/half/half.c brlcad/trunk/src/librt/primitives/hf/hf.c brlcad/trunk/src/librt/primitives/hyp/hyp.c brlcad/trunk/src/librt/primitives/metaball/metaball.c brlcad/trunk/src/librt/primitives/nmg/nmg.c brlcad/trunk/src/librt/primitives/part/part.c brlcad/trunk/src/librt/primitives/pipe/pipe.c brlcad/trunk/src/librt/primitives/pnts/pnts.c brlcad/trunk/src/librt/primitives/poly/poly.c brlcad/trunk/src/librt/primitives/revolve/revolve.c brlcad/trunk/src/librt/primitives/rhc/rhc.c brlcad/trunk/src/librt/primitives/rpc/rpc.c brlcad/trunk/src/librt/primitives/sketch/sketch.c brlcad/trunk/src/librt/primitives/submodel/submodel.c brlcad/trunk/src/librt/primitives/superell/superell.c brlcad/trunk/src/librt/primitives/table.c brlcad/trunk/src/librt/primitives/tgc/tgc.c brlcad/trunk/src/librt/primitives/tor/tor.c brlcad/trunk/src/librt/primitives/vol/vol.c brlcad/trunk/src/librt/primitives/xxx/xxx.c Modified: brlcad/trunk/include/raytrace.h =================================================================== --- brlcad/trunk/include/raytrace.h 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/include/raytrace.h 2009-12-28 09:43:45 UTC (rev 37033) @@ -1936,8 +1936,7 @@ double /*local2mm*/, const struct db_i * /*dbip*/, struct resource * /*resp*/)); - void (*ft_ifree) BU_ARGS((struct rt_db_internal * /*ip*/, - struct resource * /*resp*/)); + void (*ft_ifree) BU_ARGS((struct rt_db_internal * /*ip*/)); int (*ft_describe) BU_ARGS((struct bu_vls * /*str*/, const struct rt_db_internal * /*ip*/, int /*verbose*/, Modified: brlcad/trunk/src/librt/primitives/arb8/arb8.c =================================================================== --- brlcad/trunk/src/librt/primitives/arb8/arb8.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/arb8/arb8.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1426,10 +1426,9 @@ * solid. */ void -rt_arb_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_arb_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; bu_free(ip->idb_ptr, "arb ifree"); ip->idb_ptr = (genptr_t)NULL; } Modified: brlcad/trunk/src/librt/primitives/arbn/arbn.c =================================================================== --- brlcad/trunk/src/librt/primitives/arbn/arbn.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/arbn/arbn.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1044,12 +1044,11 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_arbn_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_arbn_ifree(struct rt_db_internal *ip) { struct rt_arbn_internal *aip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; aip = (struct rt_arbn_internal *)ip->idb_ptr; RT_ARBN_CK_MAGIC(aip); Modified: brlcad/trunk/src/librt/primitives/ars/ars.c =================================================================== --- brlcad/trunk/src/librt/primitives/ars/ars.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/ars/ars.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -64,7 +64,7 @@ /* from g_bot.c */ extern int rt_bot_prep(struct soltab *stp, struct rt_db_internal *ip, struct rt_i *rtip); -extern void rt_bot_ifree(struct rt_db_internal *ip, struct resource *resp); +extern void rt_bot_ifree(struct rt_db_internal *ip); void @@ -454,13 +454,12 @@ * solid. */ void -rt_ars_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_ars_ifree(struct rt_db_internal *ip) { register struct rt_ars_internal *arip; register int i; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; arip = (struct rt_ars_internal *)ip->idb_ptr; RT_ARS_CK_MAGIC(arip); Modified: brlcad/trunk/src/librt/primitives/bot/bot.c =================================================================== --- brlcad/trunk/src/librt/primitives/bot/bot.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/bot/bot.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1242,12 +1242,11 @@ * solid. */ void -rt_bot_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_bot_ifree(struct rt_db_internal *ip) { register struct rt_bot_internal *bot_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; bot_ip = (struct rt_bot_internal *)ip->idb_ptr; RT_BOT_CK_MAGIC(bot_ip); Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/brep/brep.cpp 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/brep/brep.cpp 2009-12-28 09:43:45 UTC (rev 37033) @@ -81,7 +81,7 @@ int rt_brep_import5(struct rt_db_internal *ip, const struct bu_external *ep, register const fastf_t *mat, const struct db_i *dbip); void - rt_brep_ifree(struct rt_db_internal *ip, struct resource *resp); + rt_brep_ifree(struct rt_db_internal *ip); int rt_brep_describe(struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local); int @@ -2793,10 +2793,9 @@ * R T _ B R E P _ I F R E E */ void -rt_brep_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_brep_ifree(struct rt_db_internal *ip) { struct rt_brep_internal* bi; - if (!resp) resp = &rt_uniresource; RT_CK_DB_INTERNAL(ip); TRACE1("rt_brep_ifree"); Modified: brlcad/trunk/src/librt/primitives/bspline/bspline.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/bspline/bspline.cpp 2009-12-28 09:43:45 UTC (rev 37033) @@ -1170,13 +1170,12 @@ * R T _ N U R B _ I F R E E */ void -rt_nurb_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_nurb_ifree(struct rt_db_internal *ip) { register struct rt_nurb_internal *sip; register int i; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; sip = (struct rt_nurb_internal *) ip->idb_ptr; RT_NURB_CK_MAGIC(sip); Modified: brlcad/trunk/src/librt/primitives/cline/cline.c =================================================================== --- brlcad/trunk/src/librt/primitives/cline/cline.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/cline/cline.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1002,12 +1002,11 @@ * solid. */ void -rt_cline_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_cline_ifree(struct rt_db_internal *ip) { register struct rt_cline_internal *cline_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; cline_ip = (struct rt_cline_internal *)ip->idb_ptr; RT_CLINE_CK_MAGIC(cline_ip); Modified: brlcad/trunk/src/librt/primitives/dsp/dsp.c =================================================================== --- brlcad/trunk/src/librt/primitives/dsp/dsp.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/dsp/dsp.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -4543,7 +4543,7 @@ * solid. */ void -rt_dsp_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_dsp_ifree(struct rt_db_internal *ip) { register struct rt_dsp_internal *dsp_ip; @@ -4552,11 +4552,6 @@ RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - if (resp) RT_CK_RESOURCE(resp); - dsp_ip = (struct rt_dsp_internal *)ip->idb_ptr; RT_DSP_CK_MAGIC(dsp_ip); @@ -4566,7 +4561,7 @@ } if (dsp_ip->dsp_bip) { - dsp_ip->dsp_bip->idb_meth->ft_ifree((struct rt_db_internal *) dsp_ip->dsp_bip, resp); + dsp_ip->dsp_bip->idb_meth->ft_ifree((struct rt_db_internal *) dsp_ip->dsp_bip); } dsp_ip->magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/ebm/ebm.c =================================================================== --- brlcad/trunk/src/librt/primitives/ebm/ebm.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/ebm/ebm.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -851,16 +851,12 @@ * solid. */ void -rt_ebm_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_ebm_ifree(struct rt_db_internal *ip) { register struct rt_ebm_internal *eip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - eip = (struct rt_ebm_internal *)ip->idb_ptr; RT_EBM_CK_MAGIC(eip); Modified: brlcad/trunk/src/librt/primitives/ehy/ehy.c =================================================================== --- brlcad/trunk/src/librt/primitives/ehy/ehy.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/ehy/ehy.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1661,12 +1661,11 @@ * solid. */ void -rt_ehy_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_ehy_ifree(struct rt_db_internal *ip) { register struct rt_ehy_internal *xip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; xip = (struct rt_ehy_internal *)ip->idb_ptr; RT_EHY_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/ell/ell.c =================================================================== --- brlcad/trunk/src/librt/primitives/ell/ell.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/ell/ell.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1321,10 +1321,9 @@ * solid. */ void -rt_ell_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_ell_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; bu_free(ip->idb_ptr, "ell ifree"); ip->idb_ptr = GENPTR_NULL; Modified: brlcad/trunk/src/librt/primitives/epa/epa.c =================================================================== --- brlcad/trunk/src/librt/primitives/epa/epa.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/epa/epa.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1698,12 +1698,11 @@ * solid. */ void -rt_epa_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_epa_ifree(struct rt_db_internal *ip) { register struct rt_epa_internal *xip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; xip = (struct rt_epa_internal *)ip->idb_ptr; RT_EPA_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/eto/eto.c =================================================================== --- brlcad/trunk/src/librt/primitives/eto/eto.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/eto/eto.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1431,12 +1431,11 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_eto_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_eto_ifree(struct rt_db_internal *ip) { register struct rt_eto_internal *tip; RT_CK_DB_INTERNAL(ip); - if (!resp) resp = &rt_uniresource; tip = (struct rt_eto_internal *)ip->idb_ptr; RT_ETO_CK_MAGIC(tip); Modified: brlcad/trunk/src/librt/primitives/extrude/extrude.c =================================================================== --- brlcad/trunk/src/librt/primitives/extrude/extrude.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/extrude/extrude.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -2311,17 +2311,13 @@ * solid. */ void -rt_extrude_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_extrude_ifree(struct rt_db_internal *ip) { struct rt_extrude_internal *extrude_ip; struct rt_db_internal tmp_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - extrude_ip = (struct rt_extrude_internal *)ip->idb_ptr; RT_EXTRUDE_CK_MAGIC(extrude_ip); if (extrude_ip->skt) { @@ -2330,7 +2326,7 @@ tmp_ip.idb_type = ID_SKETCH; tmp_ip.idb_ptr = (genptr_t)extrude_ip->skt; tmp_ip.idb_meth = &rt_functab[ID_SKETCH]; - tmp_ip.idb_meth->ft_ifree(&tmp_ip, resp); + tmp_ip.idb_meth->ft_ifree(&tmp_ip); } extrude_ip->magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/grip/grip.c =================================================================== --- brlcad/trunk/src/librt/primitives/grip/grip.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/grip/grip.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -482,14 +482,10 @@ * solid. */ void -rt_grp_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_grp_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - bu_free(ip->idb_ptr, "grip ifree"); ip->idb_ptr = GENPTR_NULL; } Modified: brlcad/trunk/src/librt/primitives/half/half.c =================================================================== --- brlcad/trunk/src/librt/primitives/half/half.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/half/half.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -768,14 +768,10 @@ * solid. */ void -rt_hlf_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_hlf_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - bu_free(ip->idb_ptr, "hlf ifree"); ip->idb_ptr = GENPTR_NULL; } Modified: brlcad/trunk/src/librt/primitives/hf/hf.c =================================================================== --- brlcad/trunk/src/librt/primitives/hf/hf.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/hf/hf.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -117,14 +117,13 @@ * V5 database for an HF. */ int -rt_hf_to_dsp(struct rt_db_internal *db_intern, struct resource *resp) +rt_hf_to_dsp(struct rt_db_internal *db_intern) { struct rt_hf_internal *hip = (struct rt_hf_internal *)db_intern->idb_ptr; struct rt_dsp_internal *dsp; vect_t tmp; RT_CK_DB_INTERNAL(db_intern); - RT_CK_RESOURCE(resp); RT_HF_CK_MAGIC(hip); if (! hip->shorts) { @@ -181,7 +180,7 @@ dsp->magic = RT_DSP_INTERNAL_MAGIC; - rt_db_free_internal(db_intern, resp); + rt_db_free_internal(db_intern, &rt_uniresource); db_intern->idb_ptr = (genptr_t)dsp; db_intern->idb_major_type = DB5_MAJORTYPE_BRLCAD; @@ -2128,14 +2127,10 @@ * solid. */ void -rt_hf_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_hf_ifree(struct rt_db_internal *ip) { register struct rt_hf_internal *xip; - if (!resp) { - resp = &rt_uniresource; - } - RT_CK_DB_INTERNAL(ip); xip = (struct rt_hf_internal *)ip->idb_ptr; RT_HF_CK_MAGIC(xip); Modified: brlcad/trunk/src/librt/primitives/hyp/hyp.c =================================================================== --- brlcad/trunk/src/librt/primitives/hyp/hyp.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/hyp/hyp.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1307,16 +1307,12 @@ * solid. */ void -rt_hyp_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_hyp_ifree(struct rt_db_internal *ip) { register struct rt_hyp_internal *hyp_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - hyp_ip = (struct rt_hyp_internal *)ip->idb_ptr; RT_HYP_CK_MAGIC(hyp_ip); hyp_ip->hyp_magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/metaball/metaball.c =================================================================== --- brlcad/trunk/src/librt/primitives/metaball/metaball.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/metaball/metaball.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -729,17 +729,13 @@ * solid. This only effects the in-memory copy. */ void -rt_metaball_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_metaball_ifree(struct rt_db_internal *ip) { register struct rt_metaball_internal *metaball; register struct wdb_metaballpt *mbpt; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - metaball = (struct rt_metaball_internal*)ip->idb_ptr; RT_METABALL_CK_MAGIC(metaball); Modified: brlcad/trunk/src/librt/primitives/nmg/nmg.c =================================================================== --- brlcad/trunk/src/librt/primitives/nmg/nmg.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/nmg/nmg.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -2665,14 +2665,10 @@ * solid. */ void -rt_nmg_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_nmg_ifree(struct rt_db_internal *ip) { register struct model *m; - if (!resp) { - resp = &rt_uniresource; - } - RT_CK_DB_INTERNAL(ip); if (ip->idb_ptr) { m = (struct model *)ip->idb_ptr; Modified: brlcad/trunk/src/librt/primitives/part/part.c =================================================================== --- brlcad/trunk/src/librt/primitives/part/part.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/part/part.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1763,14 +1763,10 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_part_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_part_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - bu_free(ip->idb_ptr, "particle ifree"); ip->idb_ptr = GENPTR_NULL; } Modified: brlcad/trunk/src/librt/primitives/pipe/pipe.c =================================================================== --- brlcad/trunk/src/librt/primitives/pipe/pipe.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/pipe/pipe.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -3507,17 +3507,13 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_pipe_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_pipe_ifree(struct rt_db_internal *ip) { register struct rt_pipe_internal *pipe; register struct wdb_pipept *ptp; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - pipe = (struct rt_pipe_internal*)ip->idb_ptr; RT_PIPE_CK_MAGIC(pipe); Modified: brlcad/trunk/src/librt/primitives/pnts/pnts.c =================================================================== --- brlcad/trunk/src/librt/primitives/pnts/pnts.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/pnts/pnts.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -582,17 +582,13 @@ * each point type. */ void -rt_pnts_ifree(struct rt_db_internal *internal, struct resource *resp) +rt_pnts_ifree(struct rt_db_internal *internal) { struct rt_pnts_internal *pnts; register struct bu_list *point; RT_CK_DB_INTERNAL(internal); - if (!resp) { - resp = &rt_uniresource; - } - pnts = ((struct rt_pnts_internal *)(internal->idb_ptr)); RT_PNTS_CK_MAGIC(pnts); Modified: brlcad/trunk/src/librt/primitives/poly/poly.c =================================================================== --- brlcad/trunk/src/librt/primitives/poly/poly.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/poly/poly.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -831,17 +831,13 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_pg_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_pg_ifree(struct rt_db_internal *ip) { register struct rt_pg_internal *pgp; register int i; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - pgp = (struct rt_pg_internal *)ip->idb_ptr; RT_PG_CK_MAGIC(pgp); Modified: brlcad/trunk/src/librt/primitives/revolve/revolve.c =================================================================== --- brlcad/trunk/src/librt/primitives/revolve/revolve.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/revolve/revolve.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1482,16 +1482,12 @@ * solid. */ void -rt_revolve_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_revolve_ifree(struct rt_db_internal *ip) { register struct rt_revolve_internal *revolve_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - revolve_ip = (struct rt_revolve_internal *)ip->idb_ptr; RT_REVOLVE_CK_MAGIC(revolve_ip); revolve_ip->magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/rhc/rhc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rhc/rhc.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/rhc/rhc.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1416,16 +1416,12 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_rhc_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_rhc_ifree(struct rt_db_internal *ip) { register struct rt_rhc_internal *xip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - xip = (struct rt_rhc_internal *)ip->idb_ptr; RT_RHC_CK_MAGIC(xip); xip->rhc_magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/rpc/rpc.c =================================================================== --- brlcad/trunk/src/librt/primitives/rpc/rpc.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/rpc/rpc.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1397,16 +1397,12 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_rpc_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_rpc_ifree(struct rt_db_internal *ip) { register struct rt_rpc_internal *xip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - xip = (struct rt_rpc_internal *)ip->idb_ptr; RT_RPC_CK_MAGIC(xip); xip->rpc_magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/sketch/sketch.c =================================================================== --- brlcad/trunk/src/librt/primitives/sketch/sketch.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/sketch/sketch.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1838,17 +1838,13 @@ * solid. */ void -rt_sketch_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_sketch_ifree(struct rt_db_internal *ip) { register struct rt_sketch_internal *sketch_ip; struct curve *crv; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - sketch_ip = (struct rt_sketch_internal *)ip->idb_ptr; RT_SKETCH_CK_MAGIC(sketch_ip); sketch_ip->magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/submodel/submodel.c =================================================================== --- brlcad/trunk/src/librt/primitives/submodel/submodel.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/submodel/submodel.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1016,16 +1016,12 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_submodel_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_submodel_ifree(struct rt_db_internal *ip) { register struct rt_submodel_internal *sip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - sip = (struct rt_submodel_internal *)ip->idb_ptr; RT_SUBMODEL_CK_MAGIC(sip); sip->magic = 0; /* sanity */ Modified: brlcad/trunk/src/librt/primitives/superell/superell.c =================================================================== --- brlcad/trunk/src/librt/primitives/superell/superell.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/superell/superell.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -989,14 +989,10 @@ * solid. */ void -rt_superell_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_superell_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - bu_free(ip->idb_ptr, "superell ifree"); ip->idb_ptr = GENPTR_NULL; } Modified: brlcad/trunk/src/librt/primitives/table.c =================================================================== --- brlcad/trunk/src/librt/primitives/table.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/table.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -65,7 +65,7 @@ BU_EXTERN(int rt_##name##_export5, (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct resource *resp)); \ BU_EXTERN(int rt_##name##_import4, (struct rt_db_internal *ip, const struct bu_external *ep, const mat_t mat, const struct db_i *dbip, struct resource *resp)); \ BU_EXTERN(int rt_##name##_export4, (struct bu_external *ep, const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct resource *resp)); \ - BU_EXTERN(void rt_##name##_ifree, (struct rt_db_internal *ip, struct resource *resp)); \ + BU_EXTERN(void rt_##name##_ifree, (struct rt_db_internal *ip)); \ BU_EXTERN(int rt_##name##_get, (struct bu_vls *log, const struct rt_db_internal *intern, const char *attr)); \ BU_EXTERN(int rt_##name##_adjust, (struct bu_vls *log, struct rt_db_internal *intern, int argc, char **argv)); \ BU_EXTERN(int rt_##name##_describe, (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local, struct resource *resp, struct db_i *db_i)); \ @@ -208,8 +208,7 @@ const struct db_i *dbip, struct resource *resp)); -BU_EXTERN(void rt_binunif_ifree, (struct rt_db_internal *ip, - struct resource *resp)); +BU_EXTERN(void rt_binunif_ifree, (struct rt_db_internal *ip)); BU_EXTERN(int rt_binunif_describe, (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local, struct resource *resp, struct db_i *db_i)); @@ -224,7 +223,7 @@ BU_EXTERN(int rt_comb_adjust, (struct bu_vls *log, struct rt_db_internal *intern, int argc, char **argv)); BU_EXTERN(int rt_comb_form, (struct bu_vls *log, const struct rt_functab *ftp)); BU_EXTERN(void rt_comb_make, (const struct rt_functab *ftp, struct rt_db_internal *intern)); -BU_EXTERN(void rt_comb_ifree, (struct rt_db_internal *ip, struct resource *resp)); +BU_EXTERN(void rt_comb_ifree, (struct rt_db_internal *ip)); /* generics for solid */ BU_EXTERN(int rt_parsetab_get, (struct bu_vls *log, const struct rt_db_internal *intern, const char *attr)); @@ -992,7 +991,7 @@ const struct rt_db_internal *ip, double local2mm, const struct db_i *dbip, struct resource *resp)); -void DEF(rt_nul_ifree, (struct rt_db_internal *ip, struct resource *resp)); +void DEF(rt_nul_ifree, (struct rt_db_internal *ip)); int NDEF(rt_nul_describe, (struct bu_vls *str, const struct rt_db_internal *ip, int verbose, double mm2local, struct resource *resp, Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c =================================================================== --- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1763,14 +1763,10 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_tgc_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_tgc_ifree(struct rt_db_internal *ip) { RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - bu_free(ip->idb_ptr, "tgc ifree"); ip->idb_ptr = GENPTR_NULL; } Modified: brlcad/trunk/src/librt/primitives/tor/tor.c =================================================================== --- brlcad/trunk/src/librt/primitives/tor/tor.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/tor/tor.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -1589,16 +1589,12 @@ * solid. */ void -rt_tor_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_tor_ifree(struct rt_db_internal *ip) { register struct rt_tor_internal *tip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - tip = (struct rt_tor_internal *)ip->idb_ptr; RT_TOR_CK_MAGIC(tip); Modified: brlcad/trunk/src/librt/primitives/vol/vol.c =================================================================== --- brlcad/trunk/src/librt/primitives/vol/vol.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/vol/vol.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -718,16 +718,12 @@ * Free the storage associated with the rt_db_internal version of this solid. */ void -rt_vol_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_vol_ifree(struct rt_db_internal *ip) { register struct rt_vol_internal *vip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - vip = (struct rt_vol_internal *)ip->idb_ptr; RT_VOL_CK_MAGIC(vip); Modified: brlcad/trunk/src/librt/primitives/xxx/xxx.c =================================================================== --- brlcad/trunk/src/librt/primitives/xxx/xxx.c 2009-12-28 09:22:31 UTC (rev 37032) +++ brlcad/trunk/src/librt/primitives/xxx/xxx.c 2009-12-28 09:43:45 UTC (rev 37033) @@ -397,16 +397,12 @@ * solid. */ void -rt_xxx_ifree(struct rt_db_internal *ip, struct resource *resp) +rt_xxx_ifree(struct rt_db_internal *ip) { struct rt_xxx_internal *xxx_ip; RT_CK_DB_INTERNAL(ip); - if (!resp) { - resp = &rt_uniresource; - } - xxx_ip = (struct rt_xxx_internal *)ip->idb_ptr; RT_XXX_CK_MAGIC(xxx_ip); xxx_ip->magic = 0; /* sanity */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |