File: libwget-printf.3

package info (click to toggle)
wget2 2.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 22,248 kB
  • sloc: ansic: 121,144; sh: 11,559; makefile: 878; xml: 182; sed: 16
file content (211 lines) | stat: -rw-r--r-- 5,308 bytes parent folder | download | duplicates (3)
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.TH "libwget-printf" 3 "Version 2.2.0" "wget2" \" -*- nroff -*-
.ad l
.nh
.SH NAME
libwget-printf \- Libwget 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_printf\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 Wget2 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 or \fC(size_t) -1\fP on error
.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
Number of bytes written or -1 on error
.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
Number of bytes written or -1 on error
.RE
.PP
Prints arguments to stream \fCfp\fP and returns number of bytes written\&. 
.SS "size_t wget_printf (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
Number of bytes written or -1 on error
.RE
.PP
Prints arguments to \fCstdout\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\&.