Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dt_buf.h File Reference


Detailed Description

A resizeable data buffer used internally (interface).

Definition in file dt_buf.h.

Go to the source code of this file.

Data Structures

struct  dt_buf_
 A structure that contains a dynamically allocated, resizeable block of memory. More...


Typedefs

typedef dt_buf_ dt_buf
 A structure that contains a dynamically allocated, resizeable block of memory.


Typedef Documentation

typedef struct dt_buf_ dt_buf
 

A structure that contains a dynamically allocated, resizeable block of memory.


Function Documentation

dt_bool dt_buf_append dt_buf buf,
int  c
 

Appends a single byte of value c to the end of the buffer.

Definition at line 57 of file dt_buf.c.

dt_bool dt_buf_append_data dt_buf buf,
void const *  data,
size_t  len
 

Appends the data found at data of length len to the end of the buffer.

void dt_buf_clear dt_buf buf  ) 
 

Makes the buffer empty without releasing its memory.

Postcondition:
strEnd == begin

Definition at line 53 of file dt_buf.c.

void dt_buf_free dt_buf buf  ) 
 

Frees the memory associated with the buffer.

Must balance every call to dt_buf_init.

Definition at line 45 of file dt_buf.c.

dt_bool dt_buf_growth_reserve dt_buf buf,
size_t  len
 

Ensure that the buffer allocates sufficient memory to store 'len' additional data.

Postcondition:
( strEnd - begin ) has the same value as prior to the call

( allocEnd - strEnd ) >= len

dt_bool dt_buf_init dt_buf buf  ) 
 

Initialize the buffer.

Postcondition:
begin == strEnd == a valid buffer address

Definition at line 14 of file dt_buf.c.

dt_bool dt_buf_init_data dt_buf buf,
dt_byte const *  data,
size_t  len
 

Initialize a buffer and store specified data into it.

Definition at line 29 of file dt_buf.c.


Generated on Sun Jun 1 16:35:38 2003 for datatree by doxygen 1.3.1