Revision: 57077
http://sourceforge.net/p/brlcad/code/57077
Author: carlmoore
Date: 2013-08-22 19:44:04 +0000 (Thu, 22 Aug 2013)
Log Message:
-----------
print output file name ('default' if that is the case), and also do if-else for
percent
Modified Paths:
--------------
brlcad/trunk/src/conv/nmg/g-nmg.c
Modified: brlcad/trunk/src/conv/nmg/g-nmg.c
===================================================================
--- brlcad/trunk/src/conv/nmg/g-nmg.c 2013-08-22 19:40:00 UTC (rev 57076)
+++ brlcad/trunk/src/conv/nmg/g-nmg.c 2013-08-22 19:44:04 UTC (rev 57077)
@@ -425,6 +425,7 @@
{
int i;
int c;
+ int suppliedname = 0;
double percent;
bu_setprogname(argv[0]);
@@ -467,6 +468,7 @@
break;
case 'o': /* Output file name */
out_file = bu_optarg;
+ suppliedname = 1;
break;
case 'r': /* Relative tolerance. */
ttol.rel = atof(bu_optarg);
@@ -531,13 +533,19 @@
rt_vlist_cleanup();
db_close(dbip);
- percent = 100;
if (regions_tried > 0)
- percent = ((double)regions_converted * 100) / regions_tried;
+ percent = (regions_converted * 100) / regions_tried;
+ else
+ percent = 100;
printf("Tried %d regions, %d converted successfully. %g%%\n",
regions_tried, regions_converted, percent);
+ if (suppliedname)
+ printf("Output file name: %s\n",out_file);
+ else
+ printf("Output file name (default): %s\n",out_file);
+
wdb_close(fp_out);
return 0;
}
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