membuffer.h File Reference

#include <stdlib.h>
#include "util.h"

Go to the source code of this file.

Data Structures

struct  memptr
struct  membuffer

Defines

#define MINVAL(a, b)   ( (a) < (b) ? (a) : (b) )
#define MAXVAL(a, b)   ( (a) > (b) ? (a) : (b) )
#define MEMBUF_DEF_SIZE_INC   5

Functions

char * str_alloc (IN const char *str, IN size_t str_len)
int memptr_cmp (IN memptr *m, IN const char *s)
int memptr_cmp_nocase (IN memptr *m, IN const char *s)
int membuffer_set_size (INOUT membuffer *m, IN size_t new_length)
void membuffer_init (INOUT membuffer *m)
void membuffer_destroy (INOUT membuffer *m)
int membuffer_assign (INOUT membuffer *m, IN const void *buf, IN size_t buf_len)
int membuffer_assign_str (INOUT membuffer *m, IN const char *c_str)
int membuffer_append (INOUT membuffer *m, IN const void *buf, IN size_t buf_len)
int membuffer_append_str (INOUT membuffer *m, IN const char *c_str)
int membuffer_insert (INOUT membuffer *m, IN const void *buf, IN size_t buf_len, int index)
void membuffer_delete (INOUT membuffer *m, IN int index, IN size_t num_bytes)
char * membuffer_detach (INOUT membuffer *m)
void membuffer_attach (INOUT membuffer *m, IN char *new_buf, IN size_t buf_len)

Define Documentation

#define MAXVAL ( a,
 )     ( (a) > (b) ? (a) : (b) )

Definition at line 40 of file membuffer.h.

#define MEMBUF_DEF_SIZE_INC   5

Definition at line 61 of file membuffer.h.

#define MINVAL ( a,
 )     ( (a) < (b) ? (a) : (b) )

Definition at line 39 of file membuffer.h.


Function Documentation

int membuffer_append ( INOUT membuffer m,
IN const void *  buf,
IN size_t  buf_len 
)
int membuffer_append_str ( INOUT membuffer m,
IN const char *  c_str 
)
int membuffer_assign ( INOUT membuffer m,
IN const void *  buf,
IN size_t  buf_len 
)
int membuffer_assign_str ( INOUT membuffer m,
IN const char *  c_str 
)
void membuffer_attach ( INOUT membuffer m,
IN char *  new_buf,
IN size_t  buf_len 
)
void membuffer_delete ( INOUT membuffer m,
IN int  index,
IN size_t  num_bytes 
)
void membuffer_destroy ( INOUT membuffer m  ) 
char* membuffer_detach ( INOUT membuffer m  ) 
void membuffer_init ( INOUT membuffer m  ) 
int membuffer_insert ( INOUT membuffer m,
IN const void *  buf,
IN size_t  buf_len,
int  index 
)
int membuffer_set_size ( INOUT membuffer m,
IN size_t  new_length 
)
int memptr_cmp ( IN memptr m,
IN const char *  s 
)
int memptr_cmp_nocase ( IN memptr m,
IN const char *  s 
)
char* str_alloc ( IN const char *  str,
IN size_t  str_len 
)

Generated on Fri Mar 26 20:16:54 2010 for MediaTomb by  doxygen 1.6.1