Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dt_buf.c File Reference


Detailed Description

A resizeable data buffer used internally (implementation).

Definition in file dt_buf.c.

Go to the source code of this file.

Functions

dt_bool dt_buf_init (dt_buf *buf)
 Initialize the buffer.

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.

void dt_buf_free (dt_buf *buf)
 Frees the memory associated with the buffer.

void dt_buf_clear (dt_buf *buf)
 Makes the buffer empty without releasing its memory.

dt_bool dt_buf_append (dt_buf *buf, int c)
 Appends a single byte of value c to the end of the buffer.

dt_bool dt_buf_growth_reserve (dt_buf *buf, unsigned len)
dt_bool dt_buf_append_data (dt_buf *buf, void const *data, unsigned len)

Variables

unsigned dt_buf_instance_count = 0
 The number of dt_buf instances that currently exist. A debugging facility.


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,
unsigned  len
 

Definition at line 96 of file dt_buf.c.

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,
unsigned  len
 

Definition at line 76 of file dt_buf.c.

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.


Variable Documentation

unsigned dt_buf_instance_count = 0
 

The number of dt_buf instances that currently exist. A debugging facility.

Definition at line 10 of file dt_buf.c.


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