Revision: 55125
http://brlcad.svn.sourceforge.net/brlcad/?rev=55125&view=rev
Author: carlmoore
Date: 2013-04-11 20:45:31 +0000 (Thu, 11 Apr 2013)
Log Message:
-----------
use the defaults if no arguments at all or if there is ONLY the -? argument
Modified Paths:
--------------
brlcad/trunk/src/shapes/coil.c
Modified: brlcad/trunk/src/shapes/coil.c
===================================================================
--- brlcad/trunk/src/shapes/coil.c 2013-04-11 20:32:07 UTC (rev 55124)
+++ brlcad/trunk/src/shapes/coil.c 2013-04-11 20:45:31 UTC (rev 55125)
@@ -42,6 +42,7 @@
#define DEFAULT_COIL_FILENAME "coil.g"
#define DEFAULT_COIL_OBJECT "coil"
+int usedefaults = 0;
struct coil_data_t {
struct bu_list l;
@@ -338,6 +339,7 @@
if (argc == 1) {
usage();
bu_log(" Program continues running:\n");
+ usedefaults=1;
}
while ((c=bu_getopt(argc, argv, options)) != -1) {
switch (c) {
@@ -393,6 +395,8 @@
BU_LIST_INSERT(&(*sections), &((*coil_data).l));
break;
case '?':
+ if (argc == 2)
+ usedefaults=1;
usage();
break;
default:
@@ -445,7 +449,7 @@
if (BU_LIST_IS_EMPTY(§ions)) {
- if (ac == 1) {
+ if (usedefaults) {
bu_log("Creating a coil with default parameters.\n");
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits