Revision: 42435
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42435&view=rev
Author:   brlcad
Date:     2011-01-19 08:29:04 +0000 (Wed, 19 Jan 2011)

Log Message:
-----------
move the allocation routine into db_alloc.c

Modified Paths:
--------------
    brlcad/trunk/src/librt/db_alloc.c
    brlcad/trunk/src/librt/db_lookup.c

Modified: brlcad/trunk/src/librt/db_alloc.c
===================================================================
--- brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:27:37 UTC (rev 42434)
+++ brlcad/trunk/src/librt/db_alloc.c   2011-01-19 08:29:04 UTC (rev 42435)
@@ -214,6 +214,36 @@
     bu_free((char *)rp, "db_zapper buf");
     return ret;
 }
+
+
+void
+db_alloc_directory(struct resource *resp)
+{
+    struct directory *dp;
+    size_t bytes;
+
+    RT_CK_RESOURCE(resp);
+    BU_CK_PTBL(&resp->re_directory_blocks);
+
+    BU_ASSERT_PTR(resp->re_directory_hd, ==, NULL);
+
+    /* Get a BIG block */
+    bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
+    dp = (struct directory *)bu_malloc(bytes, "re_directory_blocks from 
db_alloc_directory() " BU_FLSTR);
+
+    /* Record storage for later */
+    bu_ptbl_ins(&resp->re_directory_blocks, (long *)dp);
+
+    while (bytes >= sizeof(struct directory)) {
+       dp->d_magic = RT_DIR_MAGIC;
+       dp->d_forw = resp->re_directory_hd;
+       resp->re_directory_hd = dp;
+       dp++;
+       bytes -= sizeof(struct directory);
+    }
+}
+
+
 /** @} */
 
 /*

Modified: brlcad/trunk/src/librt/db_lookup.c
===================================================================
--- brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:27:37 UTC (rev 42434)
+++ brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:29:04 UTC (rev 42435)
@@ -484,34 +484,6 @@
 }
 
 
-void
-db_alloc_directory(struct resource *resp)
-{
-    struct directory *dp;
-    size_t bytes;
-
-    RT_CK_RESOURCE(resp);
-    BU_CK_PTBL(&resp->re_directory_blocks);
-
-    BU_ASSERT_PTR(resp->re_directory_hd, ==, NULL);
-
-    /* Get a BIG block */
-    bytes = (size_t)bu_malloc_len_roundup(1024*sizeof(struct directory));
-    dp = (struct directory *)bu_malloc(bytes, "re_directory_blocks from 
db_alloc_directory() " BU_FLSTR);
-
-    /* Record storage for later */
-    bu_ptbl_ins(&resp->re_directory_blocks, (long *)dp);
-
-    while (bytes >= sizeof(struct directory)) {
-       dp->d_magic = RT_DIR_MAGIC;
-       dp->d_forw = resp->re_directory_hd;
-       resp->re_directory_hd = dp;
-       dp++;
-       bytes -= sizeof(struct directory);
-    }
-}
-
-
 /**
  * D B _ L O O K U P _ B Y _ A T T R
  *


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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to