SOLDOUT_BUFFER(3) | Library Functions Manual | SOLDOUT_BUFFER(3) |
soldout_buffer
,
bufcasecmp
, bufcmp
,
bufcmps
, bufdup
,
bufgrow
, bufnew
,
bufnullterm
, bufprintf
,
bufput
, bufputs
,
bufputc
, bufrelease
,
bufreset
, bufset
,
bufslurp
, buftoi
,
vbufprintf
— buffer handling
functions for soldout
#include
<buffer.h>
#define CONST_BUF(name, string)
#define VOLATILE_BUF(name, strname)
#define BUFPUTSL(output, literal)
int
bufcasecmp
(const struct buf *a,
const struct buf *b);
int
bufcmp
(const struct buf *a,
const struct buf *b);
int
bufcmps
(const struct buf *a,
const char *b);
struct buf *
bufdup
(const struct buf *src,
size_t dupunit);
int
bufgrow
(struct buf *buf,
size_t sz);
struct buf *
bufnew
(size_t unit);
void
bufnullterm
(struct buf
*buf);
void
bufprintf
(struct buf *buf,
const char *fmt, ...);
void
bufput
(struct buf *buf,
const void *data, size_t
len);
void
bufputs
(struct buf *buf,
const char *str);
void
bufputc
(struct buf *buf,
char c);
void
bufrelease
(struct buf *buf);
void
bufreset
(struct buf *buf);
void
bufset
(struct buf **dest,
struct buf *src);
void
bufslurp
(struct buf *buf,
size_t len);
int
buftoi
(struct buf *buf,
size_t offset_i, size_t
*offset_o);
void
vbufprintf
(struct buf *buf,
const char *fmt, va_list
ap);
extern long buffer_stat_nb;
extern size_t buffer_stat_alloc_bytes;
Compile time options. Statistics are kept about memory usage.
CONST_BUF
VOLATILE_BUF
BUFPUTSL
bufputs
()
of a string literal.bufcasecmp
()bufcmp
()bufcmps
()bufdup
()bufgrow
()bufnew
()bufnullterm
()bufprintf
()bufput
()bufputs
()bufputc
()bufrelease
()bufreset
()bufset
()bufslurp
()buftoi
()vbufprintf
()The bufcasecmp
(),
bufcmp
() and bufcmps
()
functions return an integer less than, equal to, or greater than zero if
a is found, respectively, to be less than, to match,
or be greater than b.
The bufdup
() and
bufnew
() functions return a struct
buf * on success; on error they return
NULL
.
The bufgrow
() function returns on success
1; on error - 0.
The bufnullterm
(),
bufprintf
(), bufput
(),
bufputs
(), bufputc
(),
bufrelease
(), bufreset
(),
bufset
(), bufslurp
() and
vbufprintf
() functions do not return a value.
The buftoi
() function return the converted
value.
The soldout
library was written by
Natasha "Kerensikova" Porte
<natacha@instinctive.eu>.
Manual page was originally written by Massimo Manghi
<mxmanghi@apache.org>,
and rewritten to mdoc format by Svyatoslav Mishyn
<juef@openmailbox.org>.
April 13, 2016 | Debian |