Back to index

courier  0.68.2
Classes | Defines
mybuf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mybuf

Defines

#define MYBUF_SIZE   512
#define mybuf_init(p, f)   ((p)->fd=(f), (p)->readleft=0)
#define mybuf_readfunc   read
#define mybuf_get(p)
#define mybuf_more(q)   (!!(q)->readleft)
#define mybuf_ptr(p)   ( (p)->readptr )
#define mybuf_ptrleft(p)   ( (p)->readleft )

Class Documentation

struct mybuf

Definition at line 18 of file mybuf.h.

Class Members
char buffer
int fd
int readleft
char * readptr

Define Documentation

#define mybuf_get (   p)
Value:
(  (p)->readleft <= 0 && \
              ((p)->readptr=(p)->buffer, \
                     (p)->readleft=mybuf_readfunc((p)->fd, (p)->buffer, \
                            sizeof((p)->buffer))) <= 0 ? -1: \
              (--(p)->readleft, (int)(unsigned char)*(p)->readptr++))

Definition at line 31 of file mybuf.h.

#define mybuf_init (   p,
  f 
)    ((p)->fd=(f), (p)->readleft=0)

Definition at line 25 of file mybuf.h.

#define mybuf_more (   q)    (!!(q)->readleft)

Definition at line 37 of file mybuf.h.

#define mybuf_ptr (   p)    ( (p)->readptr )

Definition at line 41 of file mybuf.h.

#define mybuf_ptrleft (   p)    ( (p)->readleft )

Definition at line 42 of file mybuf.h.

#define mybuf_readfunc   read

Definition at line 28 of file mybuf.h.

#define MYBUF_SIZE   512

Definition at line 15 of file mybuf.h.