curlprintf(3) libcurl Manual curlprintf(3)
NAME
curlmaprintf, curlmfprintf, curlmprintf, curlmsnprintf,
curlmsprintf curlmvaprintf, curlmvfprintf, curlmvprintf, curlmvs-
nprintf, curlmvsprintf - formatted output conversion
SYNOPSIS
##include <>
int curlmprintf(const char **format,, ...);;
int curlmfprintf(FILE **fd,, const char **format,, ...);;
int curlmsprintf(char **buffer,, const char **format,, ...);;
int curlmsnprintf(char **buffer,, sizet maxlength,, const char **format,,
...);;
int curlmvprintf(const char **format,, valist args);;
int curlmvfprintf(FILE **fd,, const char **format,, valist args);;
int curlmvsprintf(char **buffer,, const char **format,, valist args);;
int curlmvsnprintf(char **buffer,, sizet maxlength,, const char **format,,
valist args);;
char **curlmaprintf(const char **format,, ...);;
char **curlmvaprintf(const char **format,, valist args);;
DESCRIPTION
These are all functions that produces output according to a format
string and given arguments. These are mostly clones of the well-known
C-style functions and there will be no detailed explanation of all
available formatting rules and usage here.
See this table for notable exceptions.
curlmprintf()
Normal printf() clone.
curlmfprintf()
Normal fprintf() clone.
curlmsprintf()
Normal sprintf() clone.
curlmsnprintf()
snprintf() clone. Many systems don't have this. It is
just like sprintf but with an extra argument after the
buffer that specifies the length of the target buffer.
curlmvprintf()
Normal vprintf() clone.
curlmvfprintf()
Normal vfprintf() clone.
curlmvsprintf()
Normal vsprintf() clone.
curlmvsnprintf()
vsnprintf() clone. Many systems don't have this. It is
just like vsprintf but with an extra argument after the
buffer that specifies the length of the target buffer.
curlmaprintf()
Like printf() but returns the output string as a mal-
loc()ed string. The returned string must be free()ed by
the receiver.
curlmvaprintf()
Like curlmaprintf() but takes a valist pointer argument
instead of a variable amount of arguments.
To easily use all these cloned functions instead of the normal ones,
#define MPRINTFREPLACE before you include the file.
Then all the normal names like printf, fprintf, sprintf etc will use
the curl-functions instead.
AVAILABILITY
These function will be removed from the public libcurl API in a near
future. They will instead be made "available" by source code access
only, and then as curlx-prefixed functions. See lib/README.curlx for
further details.
RETURN VALUE
The curlmaprintf and curlmvaprintf functions return a pointer to a
newly allocated string, or NUL it it failed.
All other functions return the number of character they actually out-
puted.
SEE ALSO
printf(3), sprintf(3), fprintf(3), vprintf(3)
libcurl 7.12 30 April 2004 curlprintf(3)
|