Revision: 57187
          http://sourceforge.net/p/brlcad/code/57187
Author:   starseeker
Date:     2013-08-27 21:15:59 +0000 (Tue, 27 Aug 2013)
Log Message:
-----------
More thinking about what will needed for db_search function

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

Modified: brlcad/trunk/src/librt/search.c
===================================================================
--- brlcad/trunk/src/librt/search.c     2013-08-27 20:27:01 UTC (rev 57186)
+++ brlcad/trunk/src/librt/search.c     2013-08-27 21:15:59 UTC (rev 57187)
@@ -2264,7 +2264,7 @@
     return results;
 }
 
-/*
+#if 0
 struct bu_ptbl *
 db_search(const char *plan_string,
        const char *path_strings[],
@@ -2286,6 +2286,26 @@
            const char *curr_path = search_path_strings[0];
            while (curr_path) {
                // search
+               struct db_node_t curr_node;
+               struct directory *curr_dp = db_lookup
+               if (dp) {
+                   struct db_full_path_list *search_results_list = NULL;
+                   struct db_full_path_list *entry = NULL;
+                   BU_ALLOC(search_results_list, struct db_full_path_list);
+                   BU_LIST_INIT(&(search_results_list->l));
+                   db_add_node_to_full_path(curr_node.path, curr_dp);
+                   /* by convention, the top level node is "unioned" into the 
global database */
+                   DB_FULL_PATH_SET_CUR_BOOL(curr_node.path, 2);
+                   db_fullpath_traverse(wdbp->dbip, wdbp, search_results_list, 
&curr_node, find_execute_plans, find_execute_plans, wdbp->wdb_resp, (struct 
db_plan_t *)dbplan);
+                   for (BU_LIST_FOR(entry, db_full_path_list, 
&(search_results_list->l))) {
+                       /* Need to duplicate each path here so we can free the 
results list itself -
+                        * once the deprecation is complete just have the tree 
searches work directly
+                        * on ptbls*/
+                       /* duplicate path */
+                       bu_ptbl_ins(search_results, (long *)dup_path);
+                   }
+                   db_free_full_path_list(search_results);
+               }
                curr_path++;
            }
            break;
@@ -2303,7 +2323,7 @@
     db_search_freeplan(&dbplan);
     return search_results;
 }
-*/
+#endif
 
 /*
  * Local Variables:

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


------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to