Crossfire Server, Trunk  R20513
Data Fields
StringBuffer Struct Reference

A buffer that will be expanded as content is added to it. More...

Collaboration diagram for StringBuffer:
Collaboration graph

Data Fields

char * buf
 The string buffer. More...
 
size_t pos
 The current length of buf. More...
 
size_t size
 The allocation size of buf. More...
 

Detailed Description

A buffer that will be expanded as content is added to it.

Definition at line 25 of file stringbuffer.c.

Field Documentation

char* StringBuffer::buf

The string buffer.

The first pos bytes contain the collected string. Its size is at least size bytes.

Definition at line 30 of file stringbuffer.c.

Referenced by stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_append_stringbuffer(), stringbuffer_delete(), stringbuffer_ensure(), stringbuffer_finish(), and stringbuffer_new().

size_t StringBuffer::pos

The current length of buf.

The invariant pos < size always holds; this means there is always enough room to attach a trailing \0 character.

Definition at line 37 of file stringbuffer.c.

Referenced by stringbuffer_append_printf(), stringbuffer_append_string(), stringbuffer_append_stringbuffer(), stringbuffer_ensure(), stringbuffer_finish(), stringbuffer_length(), and stringbuffer_new().

size_t StringBuffer::size

The allocation size of buf.

Definition at line 42 of file stringbuffer.c.

Referenced by stringbuffer_append_printf(), stringbuffer_ensure(), and stringbuffer_new().


The documentation for this struct was generated from the following file: