Revision: 57015
          http://sourceforge.net/p/brlcad/code/57015
Author:   brlcad
Date:     2013-08-21 03:57:08 +0000 (Wed, 21 Aug 2013)
Log Message:
-----------
decouple RTG.debug from the -P options on most importers.  Instead, let -x be 
utilized for that so that -P can consistently just refer to the nubmer of cpus 
to use (even though few tools should even be exposing that level of 
configurability, unnecessary/unhelpful option).

Modified Paths:
--------------
    brlcad/trunk/src/conv/dxf/g-dxf.c
    brlcad/trunk/src/conv/euclid/g-euclid.c
    brlcad/trunk/src/conv/euclid/g-euclid1.c
    brlcad/trunk/src/conv/g-acad.c
    brlcad/trunk/src/conv/g-egg.c
    brlcad/trunk/src/conv/g-obj.c
    brlcad/trunk/src/conv/g-x3d.c
    brlcad/trunk/src/conv/iges/g-iges.c
    brlcad/trunk/src/conv/jack/g-jack.c
    brlcad/trunk/src/conv/nmg/g-nmg.c
    brlcad/trunk/src/conv/off/g-off.c
    brlcad/trunk/src/conv/raw/g-raw.c
    brlcad/trunk/src/conv/stl/g-stl.c

Modified: brlcad/trunk/src/conv/dxf/g-dxf.c
===================================================================
--- brlcad/trunk/src/conv/dxf/g-dxf.c   2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/dxf/g-dxf.c   2013-08-21 03:57:08 UTC (rev 57015)
@@ -445,7 +445,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;  /* NOTE: enabling DEBUG_ALLRAYS to get core 
dumps */
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/euclid/g-euclid.c
===================================================================
--- brlcad/trunk/src/conv/euclid/g-euclid.c     2013-08-21 03:49:45 UTC (rev 
57014)
+++ brlcad/trunk/src/conv/euclid/g-euclid.c     2013-08-21 03:57:08 UTC (rev 
57015)
@@ -54,6 +54,7 @@
 static int     verbose;
 static int     curr_id;                /* Current region ident code */
 static int     face_count;             /* Count of faces output for a region 
id */
+static int     ncpu = 1;
 static char    *out_file = NULL;       /* Output filename */
 static FILE    *fp_out;                /* Output file pointer */
 static int     *idents;                /* Array of region ident numbers */
@@ -542,8 +543,7 @@
                verbose++;
                break;
            case 'P':
-/*                     ncpu = atoi(bu_optarg); */
-               RTG.debug = 1;  /* NOTE: setting DEBUG_ALLRAYS to get core 
dumps */
+               ncpu = atoi(bu_optarg);
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);
@@ -623,7 +623,7 @@
        tree_state.ts_ttol = &ttol;
 
        (void)db_walk_tree(dbip, argc-bu_optind, (const char 
**)(&argv[bu_optind]),
-                          1,                   /* ncpu */
+                          ncpu,
                           &tree_state,
                           select_region,
                           do_region_end,

Modified: brlcad/trunk/src/conv/euclid/g-euclid1.c
===================================================================
--- brlcad/trunk/src/conv/euclid/g-euclid1.c    2013-08-21 03:49:45 UTC (rev 
57014)
+++ brlcad/trunk/src/conv/euclid/g-euclid1.c    2013-08-21 03:57:08 UTC (rev 
57015)
@@ -44,7 +44,7 @@
 
 static int     NMG_debug;              /* saved arg of -X, for longjmp 
handling */
 static int     verbose;
-/* static int  ncpu = 1; */            /* Number of processors */
+static int     ncpu = 1;               /* Number of processors */
 static int     face_count;             /* Count of faces output for a region 
id */
 static int     alarm_secs;             /* Number of seconds to allow for 
conversion, 0 means no limit */
 static struct db_i             *dbip;
@@ -638,8 +638,7 @@
                verbose++;
                break;
            case 'P':
-/*                     ncpu = atoi( bu_optarg ); */
-               RTG.debug = 1;  /* NOTE: enabling DEBUG_ALLRAYS to get core 
dumps */
+               ncpu = atoi(bu_optarg);
                break;
            case 'x':
                sscanf( bu_optarg, "%x", (unsigned int *)&RTG.debug );
@@ -678,7 +677,7 @@
     tree_state.ts_ttol = &ttol;
 
     (void)db_walk_tree(dbip, argc-bu_optind, (const char **)(&argv[bu_optind]),
-                      1,                       /* ncpu */
+                      ncpu,
                       &tree_state,
                       0,
                       do_region_end,

Modified: brlcad/trunk/src/conv/g-acad.c
===================================================================
--- brlcad/trunk/src/conv/g-acad.c      2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/g-acad.c      2013-08-21 03:57:08 UTC (rev 57015)
@@ -534,7 +534,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;  /* NOTE: enabling DEBUG_ALLRAYS to get core 
dumps */
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/g-egg.c
===================================================================
--- brlcad/trunk/src/conv/g-egg.c       2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/g-egg.c       2013-08-21 03:57:08 UTC (rev 57015)
@@ -248,7 +248,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/g-obj.c
===================================================================
--- brlcad/trunk/src/conv/g-obj.c       2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/g-obj.c       2013-08-21 03:57:08 UTC (rev 57015)
@@ -141,7 +141,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/g-x3d.c
===================================================================
--- brlcad/trunk/src/conv/g-x3d.c       2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/g-x3d.c       2013-08-21 03:57:08 UTC (rev 57015)
@@ -110,7 +110,7 @@
 static char    *tok_sep = " \t";
 static int     NMG_debug;              /* saved arg of -X, for longjmp 
handling */
 static int     verbose=0;
-/* static int  ncpu = 1; */            /* Number of processors */
+static int     ncpu = 1;               /* Number of processors */
 static char    *out_file = NULL;       /* Output filename */
 static FILE    *outfp;         /* Output file pointer */
 static struct db_i             *dbip;
@@ -416,7 +416,7 @@
                verbose++;
                break;
            case 'P':
-               RTG.debug = 1;
+               ncpu = atoi(bu_optarg);
                break;
            case 'x':
                sscanf( bu_optarg, "%x", (unsigned int *)&RTG.debug );
@@ -497,7 +497,7 @@
 
        /* walk trees selecting only light source regions */
        (void)db_walk_tree(dbip, 1, (const char **)(&argv[i]),
-                          1,                           /* ncpu */
+                          ncpu,
                           &tree_state,
                           select_lights,
                           do_region_end,
@@ -510,7 +510,7 @@
 
     /* Walk indicated tree(s).  Each non-light-source region will be output 
separately */
     (void)db_walk_tree(dbip, argc-bu_optind, (const char **)(&argv[bu_optind]),
-                      1,                               /* ncpu */
+                      ncpu,
                       &tree_state,
                       select_non_lights,
                       do_region_end,

Modified: brlcad/trunk/src/conv/iges/g-iges.c
===================================================================
--- brlcad/trunk/src/conv/iges/g-iges.c 2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/iges/g-iges.c 2013-08-21 03:57:08 UTC (rev 57015)
@@ -274,7 +274,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            default:
                usage(argv[0]);

Modified: brlcad/trunk/src/conv/jack/g-jack.c
===================================================================
--- brlcad/trunk/src/conv/jack/g-jack.c 2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/jack/g-jack.c 2013-08-21 03:57:08 UTC (rev 57015)
@@ -480,7 +480,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/nmg/g-nmg.c
===================================================================
--- brlcad/trunk/src/conv/nmg/g-nmg.c   2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/nmg/g-nmg.c   2013-08-21 03:57:08 UTC (rev 57015)
@@ -477,7 +477,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/off/g-off.c
===================================================================
--- brlcad/trunk/src/conv/off/g-off.c   2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/off/g-off.c   2013-08-21 03:57:08 UTC (rev 57015)
@@ -125,7 +125,6 @@
                break;
            case 'P':
                ncpu = atoi( bu_optarg );
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf( bu_optarg, "%x", (unsigned int *)&RTG.debug );

Modified: brlcad/trunk/src/conv/raw/g-raw.c
===================================================================
--- brlcad/trunk/src/conv/raw/g-raw.c   2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/raw/g-raw.c   2013-08-21 03:57:08 UTC (rev 57015)
@@ -280,7 +280,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

Modified: brlcad/trunk/src/conv/stl/g-stl.c
===================================================================
--- brlcad/trunk/src/conv/stl/g-stl.c   2013-08-21 03:49:45 UTC (rev 57014)
+++ brlcad/trunk/src/conv/stl/g-stl.c   2013-08-21 03:57:08 UTC (rev 57015)
@@ -375,7 +375,6 @@
                break;
            case 'P':
                ncpu = atoi(bu_optarg);
-               RTG.debug = 1;
                break;
            case 'x':
                sscanf(bu_optarg, "%x", (unsigned int *)&RTG.debug);

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to