Opaque dbuffer struct. More...
#include <dbuffer.h>
Data Fields | |
size_t | len |
size_t | space |
struct dbuffer_element * | head |
struct dbuffer_element * | tail |
char * | start |
char * | end |
struct dbuffer * | next_free |
Opaque dbuffer struct.
For internal use only.
Stores pointers that describe the dbuffer (the actual data is kept in the struct dbuffer_element members)When len == 0, then start == end and head == tail. When start == end, then len == 0
Definition at line 47 of file dbuffer.h.
char* dbuffer::end |
For internal use only.
Pointer to the first unused byte allocated to this buffer, and therefore to the byte immediately after the last byte storedWhen start == end, the buffer is empty.This should always point into tail. Thusly head == tail when the buffer is empty.
Definition at line 77 of file dbuffer.h.
Referenced by CL_ActorMouseTrace(), CL_TargetingStraight(), dbuffer_add(), dbuffer_extract(), dbuffer_remove(), FS_FileLength(), new_dbuffer(), and SV_WriteDummyByte().
struct dbuffer_element* dbuffer::head |
For internal use only.
Pointer to the first dbuffer_element allocated to this buffer
Definition at line 57 of file dbuffer.h.
Referenced by dbuffer_dup(), dbuffer_extract(), dbuffer_get(), dbuffer_get_at(), dbuffer_merge(), dbuffer_prepend(), dbuffer_remove(), free_dbuffer(), and new_dbuffer().
size_t dbuffer::len |
For internal use only.
Current number of bytes stored in the buffer
Definition at line 50 of file dbuffer.h.
Referenced by dbuffer_add(), dbuffer_extract(), dbuffer_remove(), and new_dbuffer().
struct dbuffer* dbuffer::next_free |
For internal use only.
Pointer to the next free buffer (or NULL if this buffer is not free)
Definition at line 81 of file dbuffer.h.
Referenced by free_dbuffer(), and new_dbuffer().
size_t dbuffer::space |
For internal use only.
Current number of unused bytes allocated to this buffer (All unused bytes are at the end of the buffer)
Definition at line 54 of file dbuffer.h.
Referenced by dbuffer_add(), dbuffer_extract(), dbuffer_grow(), dbuffer_remove(), and new_dbuffer().
char* dbuffer::start |
For internal use only.
Pointer to the first byte stored in the buffer, or to the first free space if there are no bytes in the buffer at presentThis should always point into head
Definition at line 67 of file dbuffer.h.
Referenced by CL_DisplayFloorArrows(), CL_DisplayObstructionArrows(), CL_TargetingStraight(), dbuffer_dup(), dbuffer_extract(), dbuffer_get(), dbuffer_get_at(), dbuffer_merge(), dbuffer_prepend(), dbuffer_remove(), and new_dbuffer().
struct dbuffer_element* dbuffer::tail |
For internal use only.
Pointer to the last dbuffer_element allocated to this buffer
Definition at line 60 of file dbuffer.h.
Referenced by dbuffer_add(), dbuffer_grow(), and new_dbuffer().