Revision: 56494
          http://sourceforge.net/p/brlcad/code/56494
Author:   starseeker
Date:     2013-08-02 21:45:01 +0000 (Fri, 02 Aug 2013)
Log Message:
-----------
Don't need to bother with multiple bu_getopt calls, and for the purpose here 
that's not ideal anyway.  Just loop until we hit something that isn't a flag.

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

Modified: brlcad/trunk/src/libged/search.c
===================================================================
--- brlcad/trunk/src/libged/search.c    2013-08-02 21:23:10 UTC (rev 56493)
+++ brlcad/trunk/src/libged/search.c    2013-08-02 21:45:01 UTC (rev 56494)
@@ -129,21 +129,14 @@
        return TCL_OK;
     }
 
-    /* Find how many possible options we have */
+    /* Find how many options we have */
 
-    bu_optind = 1;
     optcnt = 0;
-    while ((c = bu_getopt(argc, (char * const *)argv_orig, "ah?")) != -1) {
-       switch(c) {
-           case 'a':
-               optcnt++;
-               break;
-           case 'h':
-           case '?':
-               optcnt++;
-               break;
-           default:
-               break;
+    for (i = 1; i < argc; i++) {
+        if ((argv_orig[i][0] == '-') && (strlen(argv_orig[i]) == 2)) {
+           optcnt++;
+       } else {
+           break;
        }
     }
 

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


------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to