Main Page | Namespace List | Class List | File List | Class Members | File Members | Related Pages

buffer.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

struct  buffer

Defines

#define BUFFER_INIT(op, fd, buf, len)   { (buf), 0, (len), (fd), (op) }
#define BUFFER_INSIZE   8192
#define BUFFER_OUTSIZE   8192
#define buffer_PUTC(s, c)
#define buffer_PEEK(s)   ( (s)->x + (s)->n )
#define buffer_SEEK(s, len)   ( ( (s)->p -= (len) ) , ( (s)->n += (len) ) )
#define buffer_GETC(s, c)

Typedefs

typedef buffer buffer

Functions

void buffer_init (buffer *, int(*)(), int, char *, unsigned int)
int buffer_flush (buffer *)
int buffer_put (buffer *, char *, unsigned int)
int buffer_putalign (buffer *, char *, unsigned int)
int buffer_putflush (buffer *, char *, unsigned int)
int buffer_puts (buffer *, char *)
int buffer_putsalign (buffer *, char *)
int buffer_putsflush (buffer *, char *)
int buffer_get (buffer *, char *, unsigned int)
int buffer_bget (buffer *, char *, unsigned int)
int buffer_feed (buffer *)
char * buffer_peek (buffer *)
void buffer_seek (buffer *, unsigned int)
int buffer_copy (buffer *, buffer *)

Variables

bufferbuffer_0
bufferbuffer_0small
bufferbuffer_1
bufferbuffer_1small
bufferbuffer_2


Define Documentation

#define buffer_GETC s,
 ) 
 

Value:

( ((s)->p > 0) \
    ? ( *(c) = (s)->x[(s)->n], buffer_SEEK((s),1), 1 ) \
    : buffer_get((s),(c),1) \
  )

Definition at line 42 of file buffer.h.

#define BUFFER_INIT op,
fd,
buf,
len   )     { (buf), 0, (len), (fd), (op) }
 

Definition at line 12 of file buffer.h.

#define BUFFER_INSIZE   8192
 

Definition at line 13 of file buffer.h.

#define BUFFER_OUTSIZE   8192
 

Definition at line 14 of file buffer.h.

Referenced by buffer_put().

#define buffer_PEEK  )     ( (s)->x + (s)->n )
 

Definition at line 39 of file buffer.h.

Referenced by buffer_copy().

#define buffer_PUTC s,
 ) 
 

Value:

( ((s)->n != (s)->p) \
    ? ( (s)->x[(s)->p++] = (c), 0 ) \
    : buffer_put((s),&(c),1) \
  )

Definition at line 26 of file buffer.h.

#define buffer_SEEK s,
len   )     ( ( (s)->p -= (len) ) , ( (s)->n += (len) ) )
 

Definition at line 40 of file buffer.h.

Referenced by buffer_copy().


Typedef Documentation

typedef struct buffer buffer
 


Function Documentation

int buffer_bget buffer ,
char *  ,
unsigned  int
 

Definition at line 38 of file buffer_get.c.

References buffer_feed(), buffer::fd, buffer::n, buffer::op, and buffer::p.

Here is the call graph for this function:

int buffer_copy buffer ,
buffer
 

Definition at line 3 of file buffer_copy.c.

References buffer_feed(), buffer_PEEK, buffer_put(), and buffer_SEEK.

Here is the call graph for this function:

int buffer_feed buffer  ) 
 

Definition at line 25 of file buffer_get.c.

References byte_copyr(), buffer::fd, buffer::n, buffer::op, buffer::p, and buffer::x.

Referenced by buffer_bget(), buffer_copy(), and buffer_get().

Here is the call graph for this function:

int buffer_flush buffer  ) 
 

Definition at line 23 of file buffer_put.c.

References buffer::fd, buffer::op, buffer::p, and buffer::x.

Referenced by buffer_0_read(), buffer_put(), buffer_putalign(), buffer_putflush(), cdb_make_finish(), and strerr_warn().

int buffer_get buffer ,
char *  ,
unsigned  int
 

Definition at line 48 of file buffer_get.c.

References buffer_feed(), buffer::fd, buffer::n, buffer::op, and buffer::p.

Here is the call graph for this function:

void buffer_init buffer ,
int(*  )(),
int  ,
char *  ,
unsigned  int
 

Definition at line 3 of file buffer.c.

References buffer::fd, buffer::n, buffer::op, buffer::p, and buffer::x.

Referenced by cdb_make_start().

char* buffer_peek buffer  ) 
 

Definition at line 58 of file buffer_get.c.

References buffer::n, and buffer::x.

int buffer_put buffer ,
char *  ,
unsigned  int
 

Definition at line 47 of file buffer_put.c.

References buffer_flush(), BUFFER_OUTSIZE, byte_copy(), buffer::fd, buffer::n, buffer::op, buffer::p, and buffer::x.

Referenced by buffer_copy(), and buffer_puts().

Here is the call graph for this function:

int buffer_putalign buffer ,
char *  ,
unsigned  int
 

Definition at line 33 of file buffer_put.c.

References buffer_flush(), byte_copy(), buffer::n, buffer::p, and buffer::x.

Referenced by buffer_putsalign(), cdb_make_add(), cdb_make_addbegin(), and cdb_make_finish().

Here is the call graph for this function:

int buffer_putflush buffer ,
char *  ,
unsigned  int
 

Definition at line 69 of file buffer_put.c.

References buffer_flush(), buffer::fd, and buffer::op.

Referenced by buffer_putsflush(), and cdb_make_finish().

Here is the call graph for this function:

int buffer_puts buffer ,
char * 
 

Definition at line 80 of file buffer_put.c.

References buffer_put(), and str_len().

Referenced by strerr_warn().

Here is the call graph for this function:

int buffer_putsalign buffer ,
char * 
 

Definition at line 75 of file buffer_put.c.

References buffer_putalign(), and str_len().

Here is the call graph for this function:

int buffer_putsflush buffer ,
char * 
 

Definition at line 85 of file buffer_put.c.

References buffer_putflush(), and str_len().

Here is the call graph for this function:

void buffer_seek buffer ,
unsigned  int
 

Definition at line 63 of file buffer_get.c.

References buffer::n, and buffer::p.


Variable Documentation

buffer* buffer_0
 

Definition at line 50 of file buffer.h.

buffer* buffer_0small
 

Definition at line 51 of file buffer.h.

buffer* buffer_1
 

Definition at line 52 of file buffer.h.

Referenced by buffer_0_read().

buffer* buffer_1small
 

Definition at line 53 of file buffer.h.

buffer* buffer_2
 

Definition at line 54 of file buffer.h.

Referenced by strerr_warn().


Generated on Mon Apr 26 09:49:23 2004 for ConstantDataStore by doxygen 1.3.6-20040222