Revision: 41328
          http://brlcad.svn.sourceforge.net/brlcad/?rev=41328&view=rev
Author:   brlcad
Date:     2010-11-12 12:11:57 +0000 (Fri, 12 Nov 2010)

Log Message:
-----------
rename bu_vlb_getBuffer() and bu_vlb_getBufferLength() to bu_vlb_addr() and 
bu_vlb_buflen() to be consistent with the bu_vls routines. also make all sizes 
used by bu_vlb be size_t instead of int.

Modified Paths:
--------------
    brlcad/trunk/doc/deprecation.txt
    brlcad/trunk/include/bu.h
    brlcad/trunk/src/libbu/vlb.c

Modified: brlcad/trunk/doc/deprecation.txt
===================================================================
--- brlcad/trunk/doc/deprecation.txt    2010-11-11 04:02:24 UTC (rev 41327)
+++ brlcad/trunk/doc/deprecation.txt    2010-11-12 12:11:57 UTC (rev 41328)
@@ -320,6 +320,13 @@
 have been identified in reverse chronological order.  As expressions
 are not extensively tested, use with caution.
 
+
+s/bu_vlb_getBufferLength(/bu_vlb_buflen(/g
+        bu_vlb_getBufferLength() remamed to bu_vlb_buflen() [7.18]
+
+s/bu_vlb_getBuffer(/bu_vlb_addr(/g
+        bu_vlb_getBuffer() remamed to bu_vlb_addr() [7.18]
+
 s/nmg_struct_counts(/nmg_pr_m_struct_counts(/g
         nmg_struct_counts() renamed to nmg_pr_m_struct_counts() [7.18]
 

Modified: brlcad/trunk/include/bu.h
===================================================================
--- brlcad/trunk/include/bu.h   2010-11-11 04:02:24 UTC (rev 41327)
+++ brlcad/trunk/include/bu.h   2010-11-12 12:11:57 UTC (rev 41328)
@@ -1609,9 +1609,9 @@
  */
 struct bu_vlb {
     unsigned long magic;
-    unsigned char *buf;  /**< @brief Dynamic memory for the buffer */
-    int bufCapacity;     /**< @brief Current capacity of the buffer */
-    int nextByte;        /**< @brief Number of bytes currently used in the 
buffer */
+    unsigned char *buf;     /**< @brief Dynamic memory for the buffer */
+    size_t bufCapacity;     /**< @brief Current capacity of the buffer */
+    size_t nextByte;        /**< @brief Number of bytes currently used in the 
buffer */
 };
 #define BU_VLB_BLOCK_SIZE 512
 #define BU_CK_VLB(_vp)         BU_CKMAG(_vp, BU_VLB_MAGIC, "bu_vlb")
@@ -4939,7 +4939,7 @@
  */
 BU_EXPORT BU_EXTERN(void bu_vlb_initialize,
                    (struct bu_vlb *vlb,
-                    int initialSize));
+                    size_t initialSize));
 
 /**
  * Write some bytes to the end of the bu_vlb structure. If necessary,
@@ -4952,7 +4952,7 @@
 BU_EXPORT BU_EXTERN(void bu_vlb_write,
                    (struct bu_vlb *vlb,
                     unsigned char *start,
-                    int len));
+                    size_t len));
 
 /**
  * Reset the bu_vlb counter to the start of its byte array. This
@@ -4970,7 +4970,7 @@
  * @param vlb Pointer to the bu_vlb structure
  * @return A pointer to the byte array contained by the bu_vlb structure
  */
-BU_EXPORT BU_EXTERN(unsigned char *bu_vlb_getBuffer,
+BU_EXPORT BU_EXTERN(unsigned char *bu_vlb_addr,
                    (struct bu_vlb *vlb));
 
 /**
@@ -4979,7 +4979,7 @@
  * @param vlb Pointer to the bu_vlb structure
  * @return The number of bytes written to the bu_vlb structure
  */
-BU_EXPORT BU_EXTERN(int bu_vlb_getBufferLength,
+BU_EXPORT BU_EXTERN(size_t bu_vlb_buflen,
                    (struct bu_vlb *vlb));
 
 /**

Modified: brlcad/trunk/src/libbu/vlb.c
===================================================================
--- brlcad/trunk/src/libbu/vlb.c        2010-11-11 04:02:24 UTC (rev 41327)
+++ brlcad/trunk/src/libbu/vlb.c        2010-11-12 12:11:57 UTC (rev 41328)
@@ -19,10 +19,15 @@
  */
 
 #include "common.h"
-#include "bu.h"
+
 #include <string.h>
 
+#include "bu.h"
 
+
+#define BU_VLB_BLOCK_SIZE 512
+
+
 void
 bu_vlb_init(struct bu_vlb *vlb)
 {
@@ -34,7 +39,7 @@
 
 
 void
-bu_vlb_initialize(struct bu_vlb *vlb, int initialSize)
+bu_vlb_initialize(struct bu_vlb *vlb, size_t initialSize)
 {
     if (UNLIKELY(initialSize <= 0)) {
        bu_log("bu_vlb_initialize: WARNING - illegal initial size (%d), 
ignored\n", initialSize);
@@ -49,10 +54,10 @@
 
 
 void
-bu_vlb_write(struct bu_vlb *vlb, unsigned char *start, int len)
+bu_vlb_write(struct bu_vlb *vlb, unsigned char *start, size_t len)
 {
-    int addBlocks = 0;
-    int currCapacity;
+    size_t addBlocks = 0;
+    size_t currCapacity;
 
     BU_CKMAG(vlb, BU_VLB_MAGIC, "magic for bu_vlb");
     currCapacity = vlb->bufCapacity;
@@ -80,15 +85,15 @@
 
 
 unsigned char *
-bu_vlb_getBuffer(struct bu_vlb *vlb)
+bu_vlb_addr(struct bu_vlb *vlb)
 {
     BU_CKMAG(vlb, BU_VLB_MAGIC, "magic for bu_vlb");
     return vlb->buf;
 }
 
 
-int
-bu_vlb_getBufferLength(struct bu_vlb *vlb)
+size_t
+bu_vlb_buflen(struct bu_vlb *vlb)
 {
     BU_CKMAG(vlb, BU_VLB_MAGIC, "magic for bu_vlb");
     return vlb->nextByte;


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

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to