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

Log Message:
-----------
db_get_directory() renamed to db_alloc_directory() to be a little more 
consistent with other (non-macro) routines that don't do much except allocate 
memory.

Modified Paths:
--------------
    brlcad/trunk/doc/deprecation.txt
    brlcad/trunk/include/raytrace.h
    brlcad/trunk/src/librt/db_lookup.c

Modified: brlcad/trunk/doc/deprecation.txt
===================================================================
--- brlcad/trunk/doc/deprecation.txt    2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/doc/deprecation.txt    2011-01-19 08:27:37 UTC (rev 42434)
@@ -324,6 +324,8 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+s/db_get_directory(/db_alloc_directory(/g
+        db_get_directory() renamed to db_alloc_directory() [7.18]
 s/db_get_directory_size(/db_directory_size(/g
         db_get_directory_size() renamed to db_directory_size() [7.18]
 s/db_get_version(/db_version(/g

Modified: brlcad/trunk/include/raytrace.h
===================================================================
--- brlcad/trunk/include/raytrace.h     2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/include/raytrace.h     2011-01-19 08:27:37 UTC (rev 42434)
@@ -928,7 +928,7 @@
  */
 #define RT_GET_DIRECTORY(_p, _res) { \
        while (((_p) = (_res)->re_directory_hd) == NULL) \
-               db_get_directory(_res); \
+               db_alloc_directory(_res); \
        (_res)->re_directory_hd = (_p)->d_forw; \
        (_p)->d_forw = NULL; }
 
@@ -3131,7 +3131,16 @@
                     struct directory *,
                     const char *newname));
 
+/**
+ * D B _ A L L O C _ D I R E C T O R Y
+ *
+ * This routine is called by the RT_GET_DIRECTORY macro when the
+ * freelist is exhausted.  Rather than simply getting one additional
+ * structure, we get a whole batch, saving overhead.
+ */
+RT_EXPORT BU_EXTERN(void db_alloc_directory, (struct resource *resp));
 
+
 /* db_match.c */
 RT_EXPORT BU_EXTERN(void db_update_nref,
                    (struct db_i *dbip,
@@ -3360,8 +3369,6 @@
 RT_EXPORT BU_EXTERN(void rt_optim_tree,
                    (union tree *tp,
                     struct resource *resp));
-RT_EXPORT BU_EXTERN(void db_get_directory,
-                   (struct resource *resp));
 
 /* db_walk.c */
 RT_EXPORT BU_EXTERN(void db_functree,

Modified: brlcad/trunk/src/librt/db_lookup.c
===================================================================
--- brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:09:57 UTC (rev 42433)
+++ brlcad/trunk/src/librt/db_lookup.c  2011-01-19 08:27:37 UTC (rev 42434)
@@ -484,15 +484,8 @@
 }
 
 
-/**
- * D B _ G E T _ D I R E C T O R Y
- *
- * This routine is called by the RT_GET_DIRECTORY macro when the
- * freelist is exhausted.  Rather than simply getting one additional
- * structure, we get a whole batch, saving overhead.
- */
 void
-db_get_directory(struct resource *resp)
+db_alloc_directory(struct resource *resp)
 {
     struct directory *dp;
     size_t bytes;
@@ -504,7 +497,7 @@
 
     /* 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_get_directory() " BU_FLSTR);
+    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);


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