Revision: 56989
          http://sourceforge.net/p/brlcad/code/56989
Author:   tbrowder2
Date:     2013-08-20 13:14:55 +0000 (Tue, 20 Aug 2013)
Log Message:
-----------
prep for auo-man-page; simplify; hardwire progname; style

Modified Paths:
--------------
    brlcad/trunk/src/shapes/wire.c

Modified: brlcad/trunk/src/shapes/wire.c
===================================================================
--- brlcad/trunk/src/shapes/wire.c      2013-08-20 13:12:11 UTC (rev 56988)
+++ brlcad/trunk/src/shapes/wire.c      2013-08-20 13:14:55 UTC (rev 56989)
@@ -38,10 +38,12 @@
 
 
 /* Maximum number of segments.  The maximum may be no greater then 100
- * because of the way the name of the segments is found.
+ * because of the way the names of the segments are found.
  */
 #define MAXWIRESEG 100
 
+static const char usage[]   = "Usage: wire [interactive questions...]\n";
+static const char purpose[] = "generate a wire of up to 100 segments";
 
 int
 main(int argc, char *argv[])
@@ -77,8 +79,8 @@
     char temp1[10];                    /* Temporary char string. */
     int ret;
 
-    if (argc > 1)
-       bu_exit(1, "Usage: %s\n", argv[0]);
+    if (argc > 1 && argv)
+       bu_exit(1, usage);
 
     /* Set up solid, region, & group names. */
     solcyl[0] = 's';
@@ -182,7 +184,7 @@
        numseg = (float)MAXWIRESEG;
 
     /* Enter starting & ending points of segments & radi. */
-    for (i=0; i<numseg; i++) {
+    for (i = 0; i < numseg; i++) {
        /* START # 2 */
        if (i == 0) {
            /* START # 3 */
@@ -257,7 +259,7 @@
     (void)fflush(stdout);
 
     /* Print out coordinates of segments. */
-    for (i=0; i<numseg; i++) {
+    for (i = 0; i < numseg; i++) {
        /* START # 5 */
        printf("Segment # %d:  ", (i+1));
        printf("(%f, %f, %f)", strtpt[i][0], strtpt[i][1], strtpt[i][2]);
@@ -277,7 +279,7 @@
     /* Create solids. */
 
     /* Create solid for each segment. */
-    for (i=0; i<numseg; i++) {
+    for (i = 0; i < numseg; i++) {
        /* START # 10 */
        /* Base of cone. */
        bs[0] = (fastf_t)strtpt[i][0];
@@ -326,7 +328,7 @@
     }                                                  /* END # 10 */
 
     /* Create solid for each sphere. */
-    for (i=1; i<numseg; i++) {
+    for (i = 1; i < numseg; i++) {
        /* Sphere 0 does not exist since there is one less sphere
         * than segment.
         */
@@ -368,7 +370,7 @@
 
     /* Create region for each segment. */
 
-    for (i=0; i<numseg; i++) {
+    for (i = 0; i < numseg; i++) {
        /* START # 30 */
        /* Fill in correct number in region & solid names. */
        (void)sprintf(temp, "%d", i);
@@ -426,7 +428,7 @@
     }                                                  /* END # 30 */
 
     /* Create region for each sphere. */
-    for (i=1; i<numseg; i++) {
+    for (i = 1; i < numseg; i++) {
        /* START # 40 */
        /* Fill in correct region & solid names. */
        (void)sprintf(temp, "%d", i);
@@ -473,7 +475,7 @@
     /* Initialize list. */
     BU_LIST_INIT(&comb1.l);
 
-    for (i=0; i<numseg; i++) {
+    for (i = 0; i < numseg; i++) {
        /* START # 50 */
        (void)sprintf(temp, "%d", i);
 

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