Main Page | Modules | Class List | Directories | File List | Class Members | File Members | Related Pages

blob.h File Reference

Go to the source code of this file.

Defines

#define blob_skip(b, l)   blob_seek(b, l, SEEK_CUR)
#define blob_rewind(b)   blob_seek(b, 0, SEEK_SET)
#define blob_offset(b)   ((b)->off)
#define blob_left(b)   ((b)->end - (b)->off)

Typedefs

typedef blob blob_t

Functions

__BEGIN_DECLS blob_t * blob_new (void)
int blob_read (blob_t *b, void *buf, int len)
int blob_write (blob_t *b, const void *buf, int len)
int blob_seek (blob_t *b, int off, int whence)
int blob_index (blob_t *b, const void *buf, int len)
int blob_rindex (blob_t *b, const void *buf, int len)
int blob_pack (blob_t *b, const char *fmt,...)
int blob_unpack (blob_t *b, const char *fmt,...)
int blob_insert (blob_t *b, const void *buf, int len)
int blob_delete (blob_t *b, void *buf, int len)
int blob_print (blob_t *b, char *style, int len)
blob_t * blob_free (blob_t *b)
int blob_register_alloc (size_t size, void *(*bmalloc)(size_t), void(*bfree)(void *), void *(*brealloc)(void *, size_t))


Define Documentation

#define blob_left (  b   )     ((b)->end - (b)->off)
 

Definition at line 32 of file blob.h.

Referenced by START_TEST().

#define blob_offset (  b   )     ((b)->off)
 

Definition at line 31 of file blob.h.

#define blob_rewind (  b   )     blob_seek(b, 0, SEEK_SET)
 

Definition at line 29 of file blob.h.

Referenced by START_TEST().

#define blob_skip (  b,
l   )     blob_seek(b, l, SEEK_CUR)
 

Definition at line 28 of file blob.h.

Referenced by START_TEST().


Typedef Documentation

typedef struct blob blob_t
 


Function Documentation

int blob_delete (  blob_t *  b,
void *  buf,
int  len
) 
 

Definition at line 139 of file blob.c.

References blob::base, blob::end, memcpy, memmove, NULL, blob::off, and blob::size.

Referenced by START_TEST().

blob_t* blob_free (  blob_t *  b  ) 
 

Definition at line 263 of file blob.c.

References blob::base, bl_free, NULL, and blob::size.

Referenced by START_TEST().

int blob_index (  blob_t *  b,
const void *  buf,
int  len
) 
 

Definition at line 221 of file blob.c.

References memcmp().

Referenced by START_TEST().

int blob_insert (  blob_t *  b,
const void *  buf,
int  len
) 
 

Definition at line 126 of file blob.c.

References blob::base, blob_reserve(), blob::end, memcpy, memmove, blob::off, and blob::size.

Referenced by START_TEST().

__BEGIN_DECLS blob_t* blob_new (  void   ) 
 

Definition at line 62 of file blob.c.

References bl_free, bl_malloc, bl_size, and NULL.

Referenced by START_TEST().

int blob_pack (  blob_t *  b,
const char *  fmt,
  ...
) 
 

Definition at line 191 of file blob.c.

References blob_fmt().

Referenced by START_TEST().

int blob_print (  blob_t *  b,
char *  style,
int  len
) 
 

Definition at line 245 of file blob.c.

References blob_printers, blob_printer::name, NULL, and blob_printer::print.

Referenced by START_TEST().

int blob_read (  blob_t *  b,
void *  buf,
int  len
) 
 

Definition at line 102 of file blob.c.

References blob::base, blob::end, memcpy, and blob::off.

Referenced by fmt_b(), fmt_c(), fmt_d(), fmt_D(), fmt_h(), fmt_H(), and START_TEST().

int blob_register_alloc (  size_t  size,
void *(*)(size_t)  bmalloc,
void(*)(void *)  bfree,
void *(*)(void *, size_t)  brealloc
) 
 

int blob_rindex (  blob_t *  b,
const void *  buf,
int  len
) 
 

Definition at line 233 of file blob.c.

References blob::base, blob::end, and memcmp().

Referenced by START_TEST().

int blob_seek (  blob_t *  b,
int  off,
int  whence
) 
 

Definition at line 207 of file blob.c.

Referenced by START_TEST().

int blob_unpack (  blob_t *  b,
const char *  fmt,
  ...
) 
 

Definition at line 199 of file blob.c.

References blob_fmt().

Referenced by START_TEST().

int blob_write (  blob_t *  b,
const void *  buf,
int  len
) 
 

Definition at line 114 of file blob.c.

References blob_reserve(), and memcpy.

Referenced by fmt_b(), fmt_c(), fmt_d(), fmt_D(), fmt_h(), fmt_H(), fmt_s(), and START_TEST().


Generated on Sun May 14 14:51:20 2006 by  doxygen 1.4.2