1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
=head1 NAME
rbuf_sprintf - creating formatted rbuf's
=head1 SYNOPSIS
#include <roy.h>
void rbuf_sprintf (I<RBuf> *buf, const char *I<format>, ...);
void rbuf_append_sprintf (I<RBuf> *buf, const char *I<format>, ...);
void rbuf_append_vsprintf (I<RBuf> *buf, const char *I<format>, va_list args);
RBuf * rbuf_new_with_sprintf (const char *I<format>, ...);
=head1 DESCRIPTION
These functions are used to insert formatted strings into an
I<RBuf>.
A call to rbuf_sprintf(3) resets the current contents of the
rbuf with the formatted string.
A call to rbuf_append_sprintf(3) appends the formatted string
to the rbuf.
A call to rbuf_append_vsprintf(3) is identical to rbuf_append_sprintf(3)
except that a *I<va_list> is used as the arguments to the formatted
string *I<format>.
A call to rbuf_new_with_sprintf(3) creates a new rbuf with its
buffer set to the formatted string.
=head1 RBUF FORMAT SPECIFICATION
The RBuf sprintf calls all implement %b as a format specification for rufs.
=head1 RETURN VALUE
All these calls with the exception of rbuf_new_with_sprintf(3) have
no return value. rbuf_new_with_sprintf(3) returns an rbuf struct for use with other
rbuf calls. The programmer should free this rbuf
a call to rbuf_free(3) when he/she is done using the rbuf.
=head1 ERRORS
These calls do not error.
=head1 FUNCTION
All rbuf_sprintf(3) style api calls are implemented using functions.
=head1 SEE ALSO
L<rbuf(3)|rbuf(3)>, L<rbuf_append(3)|rbuf_append(3)>,
L<rbuf_append_char(3)|rbuf_append_char(3)>, L<rbuf_append_data(3)|rbuf_append_data(3)>,
L<rbuf_append_rbuf(3)|rbuf_append_rbuf(3)>, L<rbuf_append_sprintf(3)|rbuf_append_sprintf(3)>,
L<rbuf_append_str(3)|rbuf_append_str(3)>, L<rbuf_append_vsprintf(3)|rbuf_append_vsprintf(3)>,
L<rbuf_auto(3)|rbuf_auto(3)>, L<rbuf_down(3)|rbuf_down(3)>,
L<rbuf_empty(3)|rbuf_empty(3)>, L<rbuf_equal(3)|rbuf_equal(3)>,
L<rbuf_equal_data(3)|rbuf_equal_data(3)>, L<rbuf_equal_rbuf(3)|rbuf_equal_rbuf(3)>,
L<rbuf_equal_rbuf_len(3)|rbuf_equal_rbuf_len(3)>, L<rbuf_equal_rbufcase(3)|rbuf_equal_rbufcase(3)>,
L<rbuf_equal_str(3)|rbuf_equal_str(3)>, L<rbuf_equal_str_len(3)|rbuf_equal_str_len(3)>,
L<rbuf_equal_strcase(3)|rbuf_equal_strcase(3)>, L<rbuf_erase(3)|rbuf_erase(3)>,
L<rbuf_float(3)|rbuf_float(3)>, L<rbuf_free(3)|rbuf_free(3)>,
L<rbuf_hash(3)|rbuf_hash(3)>, L<rbuf_insert(3)|rbuf_insert(3)>,
L<rbuf_last(3)|rbuf_last(3)>, L<rbuf_len(3)|rbuf_len(3)>,
L<rbuf_long(3)|rbuf_long(3)>, L<rbuf_new(3)|rbuf_new(3)>,
L<rbuf_new_with_sprintf(3)|rbuf_new_with_sprintf(3)>, L<rbuf_own(3)|rbuf_own(3)>,
L<rbuf_prepend(3)|rbuf_prepend(3)>, L<rbuf_prepend_char(3)|rbuf_prepend_char(3)>,
L<rbuf_prepend_data(3)|rbuf_prepend_data(3)>, L<rbuf_prepend_rbuf(3)|rbuf_prepend_rbuf(3)>,
L<rbuf_prepend_str(3)|rbuf_prepend_str(3)>, L<rbuf_rdonly(3)|rbuf_rdonly(3)>,
L<rbuf_set_to(3)|rbuf_set_to(3)>, L<rbuf_split(3)|rbuf_split(3)>,
L<rbuf_str(3)|rbuf_str(3)>, L<rbuf_truncate(3)|rbuf_truncate(3)>,
L<rbuf_up(3)|rbuf_up(3)>, L<roy(3)|roy(3)>
|