1buffer_peek(3)             Library Functions Manual             buffer_peek(3)
2
3
4

NAME

6       buffer_peek - return pointer to string in buffer
7

SYNTAX

9       #include <buffer.h>
10
11       char* buffer_peek(buffer* b);
12

DESCRIPTION

14       buffer_peek  returns  a  pointer to the first byte of the string in the
15       buffer.
16

EXAMPLE

18       buffer_feed, buffer_peek and buffer_seek  can  be  used  for  efficient
19       reading loops, nearly the same speed as calling op directly:
20
21         for (;;) {
22           r = buffer_feed(&b);
23           if (r <= 0) return r;
24           x = buffer_peek(&b);
25           dosomething(x,r);
26           buffer_seek(&b,r);
27         }
28

SEE ALSO

30       buffer_init(3),  buffer_feed(3),  buffer_get(3),  buffer_seek(3),  buf‐
31       fer(3)
32
33
34
35                                                                buffer_peek(3)
Impressum