[brlcad-commits] SF.net SVN: brlcad:[44942] brlcad/trunk/src/conv/iges
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2011-06-14 13:37:15
|
Revision: 44942 http://brlcad.svn.sourceforge.net/brlcad/?rev=44942&view=rev Author: brlcad Date: 2011-06-14 13:37:08 +0000 (Tue, 14 Jun 2011) Log Message: ----------- MEMCHECK is only used in convtree.c so move from iges_struct.h; also simplify conditional so we can require a semicolon on use so formatting stays sane. cleanup. Modified Paths: -------------- brlcad/trunk/src/conv/iges/convtree.c brlcad/trunk/src/conv/iges/iges_struct.h Modified: brlcad/trunk/src/conv/iges/convtree.c =================================================================== --- brlcad/trunk/src/conv/iges/convtree.c 2011-06-14 13:24:54 UTC (rev 44941) +++ brlcad/trunk/src/conv/iges/convtree.c 2011-06-14 13:37:08 UTC (rev 44942) @@ -28,6 +28,9 @@ #include "./iges_extern.h" +#define MEMCHECK if ((bu_debug & BU_DEBUG_MEM_CHECK) && (bu_mem_barriercheck())) bu_log("memory corruption found in file %s at line %d\n", __FILE__, __LINE__) + + union tree *Readtree(); union tree *Copytree(); @@ -48,9 +51,9 @@ if (bu_debug & BU_DEBUG_MEM_CHECK) bu_log("Doing memory checking in Convtree()\n"); - MEMCHECK + MEMCHECK; - bu_log("\nConverting boolean tree entities:\n"); + bu_log("\nConverting boolean tree entities:\n"); for (i=0; i<totentities; i++) { /* loop through all entities */ @@ -69,17 +72,17 @@ Readrec(dir[i]->param); /* read first record into buffer */ - MEMCHECK + MEMCHECK; - ptr = Readtree(dir[i]->rot); /* construct the tree */ + ptr = Readtree(dir[i]->rot); /* construct the tree */ - MEMCHECK + MEMCHECK; - if (!ptr) { - /* failure */ - bu_log("\tFailed to convert Boolean tree at D%07d\n", dir[i]->direct); - continue; - } + if (!ptr) { + /* failure */ + bu_log("\tFailed to convert Boolean tree at D%07d\n", dir[i]->direct); + continue; + } /* skip over the associativities */ Readint(&no_of_assoc, ""); @@ -131,18 +134,18 @@ } bu_vls_init(&comb->material); - MEMCHECK - if (wdb_export(fdout, dir[i]->name, (genptr_t)comb, ID_COMBINATION, mk_conv2mm)) - bu_exit(1, "mk_export_fwrite() failed for combination (%s)\n", dir[i]->name); + MEMCHECK; + if (wdb_export(fdout, dir[i]->name, (genptr_t)comb, ID_COMBINATION, mk_conv2mm)) + bu_exit(1, "mk_export_fwrite() failed for combination (%s)\n", dir[i]->name); conv++; - MEMCHECK - } + MEMCHECK; + } bu_log("Converted %d trees successfully out of %d total trees\n", conv, tottrees); - MEMCHECK - } + MEMCHECK; +} /* * Local Variables: Modified: brlcad/trunk/src/conv/iges/iges_struct.h =================================================================== --- brlcad/trunk/src/conv/iges/iges_struct.h 2011-06-14 13:24:54 UTC (rev 44941) +++ brlcad/trunk/src/conv/iges/iges_struct.h 2011-06-14 13:37:08 UTC (rev 44942) @@ -210,14 +210,6 @@ }; -#define MEMCHECK if (bu_debug & BU_DEBUG_MEM_CHECK) {\ - if (bu_mem_barriercheck()) {\ - bu_log("memory corruption found in file %s at line %d\n", \ - __FILE__, __LINE__);\ - }\ - } - - extern char *iges_type(int type_no); extern char *Make_unique_brl_name(char *name); extern int Add_loop_to_face(struct shell *s, struct faceuse *fu, int entityno, int face_orient); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |