|
MGE General C Library - API Documentation
Library of general C functions.
|
Go to the documentation of this file.
45 #include <sys/types.h>
62 #define MGEBUFFER_INIT \
64 .buffer = NULL, .size = 0, .proc_next = 0, .next_free = 0 \
struct mgebuffer * concat_buf(const char *s_buf, const size_t s_buf_os, struct mgebuffer *m_buf)
Concatenate the used portion of a flat buffer into a buffer object.
Definition: buffer.c:70
size_t size
Size of the buffer storage area.
Definition: mgebuffer.h:54
A buffer object.
Definition: mgebuffer.h:52
#define BEGIN_C_DECLS
BEGIN_C_DECLS should be used at the beginning of declarations so that C++ compilers don't mangle thei...
Definition: portability.h:46
size_t next_free
Next free buffer location.
Definition: mgebuffer.h:56
#define END_C_DECLS
Use END_C_DECLS at the end of C declarations.
Definition: portability.h:50
char * buffer
Buffer storage.
Definition: mgebuffer.h:53
struct mgebuffer * trim_buf(struct mgebuffer *msg_buf)
Remove processed data from a buffer object if deemed necessary.
Definition: buffer.c:109
void print_buf(struct mgebuffer *m_buf)
Print a buffer object to stdout, (for debugging).
Definition: buffer.c:150
size_t proc_next
Next buffer location for processing.
Definition: mgebuffer.h:55