Revision: 48429
          http://brlcad.svn.sourceforge.net/brlcad/?rev=48429&view=rev
Author:   bob1961
Date:     2012-01-11 19:33:30 +0000 (Wed, 11 Jan 2012)
Log Message:
-----------
To appease MGED when it doesn't have a database open, GED_OK needs to be 
returned when the qray or glob commands are called.

Modified Paths:
--------------
    brlcad/trunk/src/libged/glob.c
    brlcad/trunk/src/libged/qray.c

Modified: brlcad/trunk/src/libged/glob.c
===================================================================
--- brlcad/trunk/src/libged/glob.c      2012-01-11 19:27:52 UTC (rev 48428)
+++ brlcad/trunk/src/libged/glob.c      2012-01-11 19:33:30 UTC (rev 48429)
@@ -94,8 +94,6 @@
     struct bu_vls src;
     static const char *usage = "expression";
 
-    GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
-
     /* initialize result */
     bu_vls_trunc(gedp->ged_result_str, 0);
 
@@ -160,6 +158,7 @@
           it to the database. */
 
        if (regexp) {
+           GED_CHECK_DATABASE_OPEN(gedp, GED_OK);
            bu_vls_trunc(&temp, 0);
            if (db_regexp_match_all(&temp, gedp->ged_wdbp->dbip,
                                    bu_vls_addr(&word)) == 0) {

Modified: brlcad/trunk/src/libged/qray.c
===================================================================
--- brlcad/trunk/src/libged/qray.c      2012-01-11 19:27:52 UTC (rev 48428)
+++ brlcad/trunk/src/libged/qray.c      2012-01-11 19:33:30 UTC (rev 48429)
@@ -126,7 +126,7 @@
         int argc,
         const char *argv[])
 {
-    GED_CHECK_DATABASE_OPEN(gedp, GED_ERROR);
+    GED_CHECK_DATABASE_OPEN(gedp, GED_OK);
     GED_CHECK_ARGC_GT_0(gedp, argc, GED_ERROR);
 
     /* initialize result */

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


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to