File: buffer_peekc.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.TH buffer_peekc 3
.SH NAME
buffer_peekc \- read one char from buffer
.SH SYNTAX
.B #include <libowfat/buffer.h>

int \fBbuffer_peekc\fP(buffer* \fIb\fR,char* \fIx\fR);
.SH DESCRIPTION
buffer_peekc(b,x) is like buffer_get(b,x,1) but without
advancing the buffer pointer. If you call it again, or call
\fIbuffer_getc\fR after it, you will get the same data again.

.SH "RETURN VALUE"
\fIbuffer_peekc\fR returns 1 on success, 0 when at the end of the file, 
or -1 if there was an I/O error (setting \fIerrno\fR appropriately).
.SH "SEE ALSO"
buffer_init(3), buffer_get(3), buffer_getc(3), buffer(3)