.TH "libwget-printf" 3 "Tue Jan 26 2021" "Version 1.99.1" "wget2" \" -*- nroff -*- .ad l .nh .SH NAME libwget-printf \- Wget printf functions .SH SYNOPSIS .br .PP .SS "Functions" .in +1c .ti -1c .RI "size_t \fBwget_vasprintf\fP (char **strp, const char *fmt, va_list args)" .br .ti -1c .RI "size_t \fBwget_asprintf\fP (char **strp, const char *fmt,\&.\&.\&.)" .br .ti -1c .RI "char * \fBwget_vaprintf\fP (const char *fmt, va_list args)" .br .ti -1c .RI "char * \fBwget_aprintf\fP (const char *fmt,\&.\&.\&.)" .br .ti -1c .RI "size_t \fBwget_vfprintf\fP (FILE *fp, const char *fmt, va_list args)" .br .ti -1c .RI "size_t \fBwget_fprintf\fP (FILE *fp, const char *fmt,\&.\&.\&.)" .br .ti -1c .RI "size_t \fBwget_vsnprintf\fP (char *str, size_t size, const char *fmt, va_list args)" .br .ti -1c .RI "size_t \fBwget_snprintf\fP (char *str, size_t size, const char *fmt,\&.\&.\&.)" .br .in -1c .SH "Detailed Description" .PP This is a collection of printf-style functions that are used with libwget and/or Wget code\&. They may be useful to other developers that is why they are exported\&. .SH "Function Documentation" .PP .SS "size_t wget_vasprintf (char ** strp, const char * fmt, va_list args)" .PP \fBParameters\fP .RS 4 \fIstrp\fP Pointer to hold the string output .br \fIfmt\fP Printf-like format specifier .br \fIargs\fP va_list of arguments .RE .PP \fBReturns\fP .RS 4 Length of the string returned via \fCstrp\fP .RE .PP Prints arguments to allocated memory and 0-terminates it\&. The string is returned via the first argument\&. It has to be free()'d by the caller when it is no longer needed\&. .SS "size_t wget_asprintf (char ** strp, const char * fmt, \&.\&.\&.)" .PP \fBParameters\fP .RS 4 \fIstrp\fP Pointer to hold the string output .br \fIfmt\fP Printf-like format specifier .br \fI\&.\&.\&.\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Length of the string returned via \fCstrp\fP .RE .PP Prints arguments to allocated memory and 0-terminates it\&. The string is returned via the first argument\&. It has to be free()'d by the caller when it is no longer needed\&. .SS "char* wget_vaprintf (const char * fmt, va_list args)" .PP \fBParameters\fP .RS 4 \fIfmt\fP Printf-like format specifier .br \fIargs\fP va_list of arguments .RE .PP \fBReturns\fP .RS 4 Pointer to 0-terminated string in memory .RE .PP Prints arguments to memory and returns a pointer to allocated and 0-terminated chunk of memory\&. The return value has to be free()'d by the caller when it is no longer needed\&. .SS "char* wget_aprintf (const char * fmt, \&.\&.\&.)" .PP \fBParameters\fP .RS 4 \fIfmt\fP Printf-like format specifier .br \fI\&.\&.\&.\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Pointer to 0-terminated string in memory .RE .PP Prints arguments to memory and returns a pointer to allocated and 0-terminated chunk of memory\&. The return value has to be free()'d by the caller when it is no longer needed\&. .SS "size_t wget_vfprintf (FILE * fp, const char * fmt, va_list args)" .PP \fBParameters\fP .RS 4 \fIfp\fP FILE pointer .br \fIfmt\fP Printf-like format specifier .br \fIargs\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Pointer to 0-terminated string in memory .RE .PP Prints arguments to stream \fCfp\fP and returns number of bytes written\&. .SS "size_t wget_fprintf (FILE * fp, const char * fmt, \&.\&.\&.)" .PP \fBParameters\fP .RS 4 \fIfp\fP FILE pointer .br \fIfmt\fP Printf-like format specifier .br \fI\&.\&.\&.\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Pointer to 0-terminated string in memory .RE .PP Prints arguments to stream \fCfp\fP and returns number of bytes written\&. .SS "size_t wget_vsnprintf (char * str, size_t size, const char * fmt, va_list args)" .PP \fBParameters\fP .RS 4 \fIstr\fP Destination buffer .br \fIsize\fP Size of \fCstr\fP .br \fIfmt\fP Printf-like format specifier .br \fIargs\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Number of bytes written, or, on truncation, that would have been written .RE .PP Prints arguments to buffer \fCstr\fP and returns number of bytes written, or on truncation: that would have been written\&. .PP If \fCstr\fP is NULL the return value are the number of bytes that would have been written\&. .SS "size_t wget_snprintf (char * str, size_t size, const char * fmt, \&.\&.\&.)" .PP \fBParameters\fP .RS 4 \fIstr\fP Destination buffer .br \fIsize\fP Size of \fCstr\fP .br \fIfmt\fP Printf-like format specifier .br \fI\&.\&.\&.\fP List of arguments .RE .PP \fBReturns\fP .RS 4 Number of bytes written, or, on truncation, that would have been written .RE .PP Prints arguments to buffer \fCstr\fP and returns number of bytes written, or on truncation: that would have been written\&. .PP If \fCstr\fP is NULL the return value are the number of bytes that would have been written\&. .SH "Author" .PP Generated automatically by Doxygen for wget2 from the source code\&.