#include <foo.h> -> #include <libowfat/foo.h>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer.h \- generic read/write buffering
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
buffer* buffer_0; /* like stdio's stdin */
|
||||
buffer* buffer_1; /* like stdio's stdout */
|
||||
@@ -25,7 +25,7 @@ program termination; you must manually call \fBbuffer_flush\fR,
|
||||
See buffer_init(3) for example read buffer code. Here is typical code
|
||||
for printing an error message on stderr:
|
||||
|
||||
#include <buffer.h>
|
||||
#include <libowfat/buffer.h>
|
||||
|
||||
buffer_puts(buffer_2,"error: got only ");
|
||||
buffer_putulong(buffer_2,got);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_close \- close buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_close\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_feed \- low-level component of buffer_get
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_feed\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_flush \- feed buffer to write function
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_flush\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
.SH NAME
|
||||
buffer_fromarray \- initialize buffer structure from array
|
||||
.SH SYNTAX
|
||||
.B #include <array.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/array.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_fromarray\fR(buffer* \fIb\fR,array* \fIa\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_frombuf \- initialize buffer structure from raw memory
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_frombuf\fR(buffer* \fIb\fR,const char* \fIx\fR, size_t \fIl\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_fromsa \- initialize buffer structure from stralloc
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_fromsa\fR(buffer* \fIb\fR,const stralloc* \fIsa\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_get \- read binary data from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
ssize_t \fBbuffer_get\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_get_new_token_sa \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_get_new_token_sa\fP(buffer* \fIb\fR,stralloc* \fIsa\fR,
|
||||
const char* \fIcharset\fR,size_t \fIsetlen\fR);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_get_new_token_sa_pred \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_get_new_token_sa_pred\fP(buffer* \fIb\fR,stralloc* \fIsa\fR,
|
||||
int (*\fIpredicate\fR)(stralloc* * \fIsa\fR));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_get_token \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
ssize_t \fBbuffer_get_token\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR,
|
||||
const char* \fIcharset\fR,size_t \fIsetlen\fR);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_get_token_pred \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
ssize_t \fBbuffer_get_token_pred\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR,
|
||||
int (*\fIpredicate\fR)(const char* \fIs\fR,size_t \fIlen\fR));
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_get_token_sa \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_get_token_sa\fP(buffer* \fIb\fR,stralloc* \fIsa\fR,
|
||||
const char* \fIcharset\fR,size_t \fIsetlen\fR);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_get_token_sa_pred \- read token from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_get_token_sa_pred\fP(buffer* \fIb\fR,stralloc* \fIsa\fR,
|
||||
int (*\fIpredicate\fR)(stralloc* * \fIsa\fR));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_getc \- read one char from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_getc\fP(buffer* \fIb\fR,char* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_getline \- read line from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
ssize_t \fBbuffer_getline\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_getline_sa \- read line from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_getline_sa\fP(buffer* \fIb\fR,stralloc* \fIsa\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_getn \- read binary data from buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
ssize_t \fBbuffer_getn\fP(buffer* \fIb\fR,char* \fIx\fR,size_t \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_getnewline_sa \- read line from buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_getnewline_sa\fP(buffer* \fIb\fR,stralloc* \fIsa\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_init \- initialize buffer structure
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_init\fR(buffer &\fIb\fR,
|
||||
ssize_t (*\fIop\fR)(int,char*,size_t),
|
||||
@@ -24,8 +24,8 @@ are compile-time constants.
|
||||
You can call buffer_init again at any time. Note that this discards the
|
||||
currently buffered string.
|
||||
.SH EXAMPLE
|
||||
#include <buffer.h>
|
||||
#include <open.h>
|
||||
#include <libowfat/buffer.h>
|
||||
#include <libowfat/open.h>
|
||||
|
||||
char buf[4096];
|
||||
int fd=open_read("/etc/services");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_init_free \- initialize buffer structure
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_init_free\fR(buffer &\fIb\fR,
|
||||
ssize_t (*\fIop\fR)(int,char*,size_t),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_mmapread \- create read-only memory-mapped file buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_mmapread\fR(buffer &\fIb\fR,const char* \fIfilename\fR);
|
||||
.SH DESCRIPTION
|
||||
@@ -11,8 +11,8 @@ that the contents of the file can be read from it. Using mmap is more
|
||||
efficient than reading through a real buffer, but you have to call
|
||||
buffer_close to unmap the memory in the end.
|
||||
.SH EXAMPLE
|
||||
#include <buffer.h>
|
||||
#include <open.h>
|
||||
#include <libowfat/buffer.h>
|
||||
#include <libowfat/open.h>
|
||||
|
||||
buffer input;
|
||||
char x;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_peek \- return pointer to string in buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
char* \fBbuffer_peek\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_put \- write binary data to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_put\fP(buffer* \fIb\fR,const char* \fIx\fR,size_t \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_put8long \- write an octal ASCII representation of an unsigned
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_put8long\fP(buffer* \fIb\fR,unsigned long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putalign \- write binary data to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putalign\fP(buffer* \fIb\fR,const char* \fIx\fR,size_t \fIlen\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_puterror \- write error string to buffer and flush
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_puterror\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_puterror2 \- write error string to buffer and flush
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_puterror2\fP(buffer* \fIb\fR,int \fIerrnum\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putflush \- write binary data to buffer and flush
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putflush\fP(buffer* \fIb\fR,
|
||||
const char* \fIx\fR,size_t \fIlen\fR);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_putlong \- write a decimal ASCII representation of a signed
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putlong\fP(buffer* \fIb\fR,signed long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_putlonglong \- write a decimal ASCII representation of a signed
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putlonglong\fP(buffer* \fIb\fR,signed long long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putm \- write ASCIIZ string(s) to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putm\fP(buffer* \fIb\fR,const char* \fIx\fR,...);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putnlflush \- write '\\n' to buffer and flush
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putnlflush\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_puts \- write ASCIIZ string to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_puts\fP(buffer* \fIb\fR,const char* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_putsa \- write stralloc to buffer
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putsa\fP(buffer* \fIb\fR,const stralloc* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
buffer_putsa \- write stralloc to buffer and flush
|
||||
.SH SYNTAX
|
||||
.nf
|
||||
.B #include <stralloc.h>
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/stralloc.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putsaflush\fP(buffer* \fIb\fR,const stralloc* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putsalign \- write ASCIIZ string to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putsalign\fP(buffer* \fIb\fR,const char* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putsflush \- write ASCIIZ string to buffer and flush
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putsflush\fP(buffer* \fIb\fR,const char* \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_putspace \- write ASCII space to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putspace\fP(buffer* \fIb\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_putulong \- write a decimal ASCII representation of an unsigned
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putulong\fP(buffer* \fIb\fR,unsigned long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_putulonglong \- write a decimal ASCII representation of a signed
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putulonglong\fP(buffer* \fIb\fR,unsigned long long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
buffer_putxlong \- write a hexidecimal ASCII representation of an unsigned
|
||||
long integer to buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_putxlong\fP(buffer* \fIb\fR,unsigned long \fIx\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_seek \- remove bytes from beginning of string in buffer
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
void \fBbuffer_seek\fP(buffer* \fIb\fR,size_t \fIr\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
.SH NAME
|
||||
buffer_tosa \- initialize buffer for writing to stralloc
|
||||
.SH SYNTAX
|
||||
.B #include <buffer.h>
|
||||
.B #include <libowfat/buffer.h>
|
||||
|
||||
int \fBbuffer_tosa\fR(buffer* \fIb\fR,stralloc* \fIsa\fR);
|
||||
.SH DESCRIPTION
|
||||
|
||||
Reference in New Issue
Block a user