Revision: 55147
          http://brlcad.svn.sourceforge.net/brlcad/?rev=55147&view=rev
Author:   brlcad
Date:     2013-04-12 19:38:28 +0000 (Fri, 12 Apr 2013)
Log Message:
-----------
don't need to use BRLCAD_DATA_SUBPATH since we already have BRLCAD_DATA_DIR 
defined.  remove the hard-coded share/brlcad/version directory searching while 
we're at it since those are no longer the default.

Modified Paths:
--------------
    brlcad/trunk/src/libbu/brlcad_path.c

Modified: brlcad/trunk/src/libbu/brlcad_path.c
===================================================================
--- brlcad/trunk/src/libbu/brlcad_path.c        2013-04-12 17:27:29 UTC (rev 
55146)
+++ brlcad/trunk/src/libbu/brlcad_path.c        2013-04-12 19:38:28 UTC (rev 
55147)
@@ -49,14 +49,22 @@
 _brlcad_data()
 {
     static char path[MAXPATHLEN] = {0};
+
 #ifndef BRLCAD_DATA
-    snprintf(path, MAXPATHLEN, "%s/share/brlcad/%s", BRLCAD_ROOT, 
brlcad_version());
+#  ifdef BRLCAD_DATA_DIR
+    if (find_path(path, BRLCAD_ROOT, BRLCAD_DATA_DIR, NULL, 0))
+       return path;
+#  endif
+
+    snprintf(path, MAXPATHLEN, "%s%cshare", BRLCAD_ROOT, BU_DIR_SEPARATOR);
+
 #else
     /* do this instead of just returning BRLCAD_DATA to keep compiler
      * quiet about unreachable code.
      */
     snprintf(path, MAXPATHLEN, "%s", BRLCAD_DATA);
 #endif
+
     return path;
 }
 
@@ -432,9 +440,9 @@
        return result;
     }
 
-    /* bu_brlcad_root/BRLCAD_DATA_SUBPATH path */
-#ifdef BRLCAD_DATA_SUBPATH
-    snprintf(path, MAXPATHLEN, "%s", BRLCAD_DATA_SUBPATH);
+    /* bu_brlcad_root/BRLCAD_DATA_DIR path */
+#ifdef BRLCAD_DATA_DIR
+    snprintf(path, MAXPATHLEN, "%s", BRLCAD_DATA_DIR);
     lhs = bu_brlcad_root(path, 1);
     if (lhs) {
        snprintf(where, MAX_WHERE_SIZE, "\tBRLCAD_ROOT common data path  
[%s]\n", path);
@@ -448,33 +456,6 @@
     }
 #endif
 
-    /* bu_brlcad_root/share/brlcad/VERSION path */
-    snprintf(path, (size_t)MAXPATHLEN, "share/brlcad/%s", brlcad_version());
-    lhs = bu_brlcad_root(path, 1);
-    if (lhs) {
-       snprintf(where, MAX_WHERE_SIZE, "\tBRLCAD_ROOT common data path  
[%s]\n", path);
-       if (find_path(result, lhs, rhs, &searched, where)) {
-           if (UNLIKELY(bu_debug & BU_DEBUG_PATHS)) {
-               bu_log("Found: BRLCAD_ROOT common data path [%s]\n", result);
-           }
-           bu_vls_free(&searched);
-           return result;
-       }
-    }
-
-    /* bu_brlcad_root/share/brlcad path */
-    lhs = bu_brlcad_root("share/brlcad", 1);
-    if (lhs) {
-       snprintf(where, MAX_WHERE_SIZE, "\tBRLCAD_ROOT common data path  
[%s]\n", lhs);
-       if (find_path(result, lhs, rhs, &searched, where)) {
-           if (UNLIKELY(bu_debug & BU_DEBUG_PATHS)) {
-               bu_log("Found: BRLCAD_ROOT common data path [%s]\n", result);
-           }
-           bu_vls_free(&searched);
-           return result;
-       }
-    }
-
     /* bu_brlcad_root/share path */
     lhs = bu_brlcad_root("share", 1);
     if (lhs) {

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

Reply via email to