• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/postfix-255/postfix/src/util/

Lines Matching refs:bp

9 /*	int	VBUF_GET(bp)
10 /* VBUF *bp;
12 /* int VBUF_PUT(bp, ch)
13 /* VBUF *bp;
16 /* int VBUF_SPACE(bp, len)
17 /* VBUF *bp;
20 /* int vbuf_unget(bp, ch)
21 /* VBUF *bp;
24 /* ssize_t vbuf_read(bp, buf, len)
25 /* VBUF *bp;
29 /* ssize_t vbuf_write(bp, buf, len)
30 /* VBUF *bp;
34 /* int vbuf_err(bp)
35 /* VBUF *bp;
37 /* int vbuf_eof(bp)
38 /* VBUF *bp;
40 /* int vbuf_timeout(bp)
41 /* VBUF *bp;
43 /* int vbuf_clearerr(bp)
44 /* VBUF *bp;
46 /* int vbuf_rd_err(bp)
47 /* VBUF *bp;
49 /* int vbuf_wr_err(bp)
50 /* VBUF *bp;
52 /* int vbuf_rd_timeout(bp)
53 /* VBUF *bp;
55 /* int vbuf_wr_timeout(bp)
56 /* VBUF *bp;
111 /* int get_ready(bp)
112 /* VBUF *bp;
114 /* int put_ready(bp)
115 /* VBUF *bp;
117 /* int space(bp, len)
118 /* VBUF *bp;
156 int vbuf_unget(VBUF *bp, int ch)
158 if ((ch & 0xff) != ch || -bp->cnt >= bp->len) {
159 bp->flags |= VBUF_FLAG_RD_ERR; /* This error affects reads! */
162 bp->cnt--;
163 bp->flags &= ~VBUF_FLAG_EOF;
164 return (*--bp->ptr = ch);
170 int vbuf_get(VBUF *bp)
172 return (bp->get_ready(bp) ? VBUF_EOF : VBUF_GET(bp));
177 int vbuf_put(VBUF *bp, int ch)
179 return (bp->put_ready(bp) ? VBUF_EOF : VBUF_PUT(bp, ch));
184 ssize_t vbuf_read(VBUF *bp, char *buf, ssize_t len)
192 if ((buf[count] = VBUF_GET(bp)) < 0)
197 if (bp->cnt >= 0 && bp->get_ready(bp))
199 n = (count < -bp->cnt ? count : -bp->cnt);
200 memcpy(cp, bp->ptr, n);
201 bp->ptr += n;
202 bp->cnt += n;
210 ssize_t vbuf_write(VBUF *bp, const char *buf, ssize_t len)
218 if (VBUF_PUT(bp, buf[count]) < 0)
223 if (bp->cnt <= 0 && bp->put_ready(bp) != 0)
225 n = (count < bp->cnt ? count : bp->cnt);
226 memcpy(bp->ptr, cp, n);
227 bp->ptr += n;
228 bp->cnt -= n;