1curl_printf(3)                  libcurl Manual                  curl_printf(3)
2
3
4

NAME

6       curl_maprintf,     curl_mfprintf,     curl_mprintf,     curl_msnprintf,
7       curl_msprintf curl_mvaprintf, curl_mvfprintf, curl_mvprintf,  curl_mvs‐
8       nprintf, curl_mvsprintf - formatted output conversion
9

SYNOPSIS

11       #include <curl/mprintf.h>
12
13       int curl_mprintf(const char *format, ...);
14       int curl_mfprintf(FILE *fd, const char *format, ...);
15       int curl_msprintf(char *buffer, const char *format, ...);
16       int  curl_msnprintf(char *buffer, size_t maxlength, const char *format,
17       ...);
18       int curl_mvprintf(const char *format, va_list args);
19       int curl_mvfprintf(FILE *fd, const char *format, va_list args);
20       int curl_mvsprintf(char *buffer, const char *format, va_list args);
21       int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
22       va_list args);
23       char *curl_maprintf(const char *format, ...);
24       char *curl_mvaprintf(const char *format, va_list args);
25

DESCRIPTION

27       These  are  all  functions  that  produce  output according to a format
28       string and given arguments. These are mostly clones of  the  well-known
29       C-style  functions  and  there  will  be no detailed explanation of all
30       available formatting rules and usage here.
31
32       See this table for notable exceptions.
33
34              curl_mprintf()
35                     Normal printf() clone.
36
37              curl_mfprintf()
38                     Normal fprintf() clone.
39
40              curl_msprintf()
41                     Normal sprintf() clone.
42
43              curl_msnprintf()
44                     snprintf() clone. Many systems don't  have  this.  It  is
45                     just  like  sprintf  but with an extra argument after the
46                     buffer that specifies the length of the target buffer.
47
48              curl_mvprintf()
49                     Normal vprintf() clone.
50
51              curl_mvfprintf()
52                     Normal vfprintf() clone.
53
54              curl_mvsprintf()
55                     Normal vsprintf() clone.
56
57              curl_mvsnprintf()
58                     vsnprintf() clone.  Many systems don't have this.  It  is
59                     just  like  vsprintf but with an extra argument after the
60                     buffer that specifies the length of the target buffer.
61
62              curl_maprintf()
63                     Like printf() but returns the output  string  as  a  mal‐
64                     loc()ed  string.  The returned string must be free()ed by
65                     the receiver.
66
67              curl_mvaprintf()
68                     Like curl_maprintf() but takes a va_list pointer argument
69                     instead of a variable amount of arguments.
70

AVAILABILITY

72       These  functions  will  be  removed  from the public libcurl API in the
73       future. Do not use them in any new programs or projects.
74

RETURN VALUE

76       The curl_maprintf and curl_mvaprintf functions return a  pointer  to  a
77       newly allocated string, or NULL if it failed.
78
79       All  other functions return the number of characters they actually out‐
80       putted.
81

SEE ALSO

83       printf(3), sprintf(3), fprintf(3), vprintf(3)
84
85
86
87libcurl 7.71.1                  April 01, 2016                  curl_printf(3)
Impressum