Revision: 41268
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41268&view=rev
Author:   brlcad
Date:     2010-11-08 12:40:13 +0000 (Mon, 08 Nov 2010)

Log Message:
-----------
remove dead code.  clean up usage.  needs updating to bu_getopt().

Modified Paths:
--------------
    brlcad/trunk/src/libged/erase.c

Modified: brlcad/trunk/src/libged/erase.c
===================================================================
--- brlcad/trunk/src/libged/erase.c     2010-11-07 01:47:33 UTC (rev 41267)
+++ brlcad/trunk/src/libged/erase.c     2010-11-08 12:40:13 UTC (rev 41268)
@@ -33,14 +33,12 @@
 
 #include "./ged_private.h"
 
+
 void ged_splitGDL(struct ged *gedp, struct ged_display_list *gdlp, struct 
db_full_path *path);
 
 /*
  * Erase objects from the display.
  *
- * Usage:
- * erase object(s)
- *
  */
 int
 ged_erase(struct ged *gedp, int argc, const char *argv[])
@@ -50,7 +48,7 @@
     int flag_o_nonunique=1;
     int last_opt=0;
     struct bu_vls vls;
-    static const char *usage = "<objects(s)> | <-o -A attribute name/value 
pairs>";
+    static const char *usage = "[[-o] -A attribute=value] [object(s)]";
 
     GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
     GED_CHECK_DRAWABLE(gedp, GED_ERROR);
@@ -89,15 +87,8 @@
        last_opt = i;
 
        if (!ptr_A && !ptr_o) {
-#if 1
            bu_vls_printf(&gedp->ged_result_str, "Usage: %s %s", argv[0], 
usage);
            return GED_ERROR;
-#else
-           /*XXX Use this section when we have more options (i.e. ones other 
than -A or -o) */
-           bu_vls_putc(&vls, ' ');
-           bu_vls_strcat(&vls, argv[i]);
-           continue;
-#endif
        }
 
        if (strlen(argv[i]) == ((size_t)1 + (ptr_A != NULL) + (ptr_o != NULL))) 
{
@@ -105,22 +96,8 @@
            continue;
        }
 
-#if 1
        bu_vls_printf(&gedp->ged_result_str, "Usage: %s %s", argv[0], usage);
        return GED_ERROR;
-#else
-       /*XXX Use this section when we have more options (i.e. ones other than 
-A or -o) */
-
-       /* copy args other than "-A" or "-o" */
-       bu_vls_putc(&vls, ' ');
-       c = (char *)argv[i];
-       while (*c != '\0') {
-           if (*c != 'A' && *c != 'o') {
-               bu_vls_putc(&vls, *c);
-           }
-           c++;
-       }
-#endif
     }
 
     if (flag_A_attr) {


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

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to