1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
4 <title>curl_printf man page
</title>
5 <meta name=
"generator" content=
"roffit">
6 <STYLE type=
"text/css">
12 P.level0, pre.level0 {
16 P.level1, pre.level1 {
20 P.level2, pre.level2 {
37 background-color: #e0e0e0;
43 font-family: monospace;
53 <p class=
"level0"><a name=
"NAME"></a><h2 class=
"nroffsh">NAME
</h2>
54 <p class=
"level0">curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf, curl_mvsprintf - formatted output conversion
<a name=
"SYNOPSIS"></a><h2 class=
"nroffsh">SYNOPSIS
</h2>
55 <p class=
"level0"><span Class=
"bold">#include
<curl/mprintf.h
></span>
56 <p class=
"level0"><span Class=
"bold">int curl_mprintf(const char * format , ...);
</span> <br><span Class=
"bold">int curl_mfprintf(FILE * fd , const char * format , ...);
</span> <br><span Class=
"bold">int curl_msprintf(char * buffer , const char * format , ...);
</span> <br><span Class=
"bold">int curl_msnprintf(char * buffer , size_t maxlength , const char * format , ...);
</span> <br><span Class=
"bold">int curl_mvprintf(const char * format , va_list args );
</span> <br><span Class=
"bold">int curl_mvfprintf(FILE * fd , const char * format , va_list args );
</span> <br><span Class=
"bold">int curl_mvsprintf(char * buffer , const char * format , va_list args );
</span> <br><span Class=
"bold">int curl_mvsnprintf(char * buffer , size_t maxlength , const char * format , va_list args );
</span> <br><span Class=
"bold">char *curl_maprintf(const char * format , ...);
</span> <br><span Class=
"bold">char *curl_mvaprintf(const char * format , va_list args );
</span> <a name=
"DESCRIPTION"></a><h2 class=
"nroffsh">DESCRIPTION
</h2>
57 <p class=
"level0">These are all functions that produce 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.
58 <p class=
"level0">See this table for notable exceptions.
60 <p class=
"level1"><span Class=
"bold">curl_mprintf()
</span> Normal printf() clone.
61 <p class=
"level1"><span Class=
"bold">curl_mfprintf()
</span> Normal fprintf() clone.
62 <p class=
"level1"><span Class=
"bold">curl_msprintf()
</span> Normal sprintf() clone.
63 <p class=
"level1"><span Class=
"bold">curl_msnprintf()
</span> snprintf() clone. Many systems don't have this. It is just like
<span Class=
"bold">sprintf
</span> but with an extra argument after the buffer that specifies the length of the target buffer.
64 <p class=
"level1"><span Class=
"bold">curl_mvprintf()
</span> Normal vprintf() clone.
65 <p class=
"level1"><span Class=
"bold">curl_mvfprintf()
</span> Normal vfprintf() clone.
66 <p class=
"level1"><span Class=
"bold">curl_mvsprintf()
</span> Normal vsprintf() clone.
67 <p class=
"level1"><span Class=
"bold">curl_mvsnprintf()
</span> vsnprintf() clone. Many systems don't have this. It is just like
<span Class=
"bold">vsprintf
</span> but with an extra argument after the buffer that specifies the length of the target buffer.
68 <p class=
"level1"><span Class=
"bold">curl_maprintf()
</span> Like printf() but returns the output string as a malloc()ed string. The returned string must be free()ed by the receiver.
69 <p class=
"level1"><span Class=
"bold">curl_mvaprintf()
</span> Like curl_maprintf() but takes a va_list pointer argument instead of a variable amount of arguments.
70 <p class=
"level0"><a name=
"AVAILABILITY"></a><h2 class=
"nroffsh">AVAILABILITY
</h2>
71 <p class=
"level0">These functions will be removed from the public libcurl API in the future. Do not use them in any new programs or projects.
<a name=
"RETURN"></a><h2 class=
"nroffsh">RETURN VALUE
</h2>
72 <p class=
"level0">The
<span Class=
"bold">curl_maprintf
</span> and
<span Class=
"bold">curl_mvaprintf
</span> functions return a pointer to a newly allocated string, or NULL if it failed.
73 <p class=
"level0">All other functions return the number of characters they actually outputted.
<a name=
"SEE"></a><h2 class=
"nroffsh">SEE ALSO
</h2>
74 <p class=
"level0"><span Class=
"manpage">printf (
3)
</span>,
<span Class=
"manpage">sprintf (
3)
</span>,
<span Class=
"manpage">fprintf (
3)
</span>,
<span Class=
"manpage">vprintf (
3)
</span><p class=
"roffit">
75 This HTML page was made with
<a href=
"http://daniel.haxx.se/projects/roffit/">roffit
</a>.