![]() |
wget2 2.3.0
|
Functions | |
| size_t | wget_vasprintf (char **strp, const char *fmt, va_list args) |
| size_t | wget_asprintf (char **strp, const char *fmt,...) |
| char * | wget_vaprintf (const char *fmt, va_list args) |
| char * | wget_aprintf (const char *fmt,...) |
| size_t | wget_vfprintf (FILE *fp, const char *fmt, va_list args) |
| size_t | wget_fprintf (FILE *fp, const char *fmt,...) |
| size_t | wget_printf (const char *fmt,...) |
| size_t | wget_vsnprintf (char *str, size_t size, const char *fmt, va_list args) |
| size_t | wget_snprintf (char *str, size_t size, const char *fmt,...) |
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.
| size_t wget_vasprintf | ( | char ** | strp, |
| const char * | fmt, | ||
| va_list | args ) |
| [in] | strp | Pointer to hold the string output |
| [in] | fmt | Printf-like format specifier |
| [in] | args | va_list of arguments |
strp or (size_t) -1 on errorPrints 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.
| size_t wget_asprintf | ( | char ** | strp, |
| const char * | fmt, | ||
| ... ) |
| [in] | strp | Pointer to hold the string output |
| [in] | fmt | Printf-like format specifier |
| [in] | ... | List of arguments |
strp 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.
| char * wget_vaprintf | ( | const char * | fmt, |
| va_list | args ) |
| [in] | fmt | Printf-like format specifier |
| [in] | args | va_list of arguments |
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.
| char * wget_aprintf | ( | const char * | fmt, |
| ... ) |
| [in] | fmt | Printf-like format specifier |
| [in] | ... | List of arguments |
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.
| size_t wget_vfprintf | ( | FILE * | fp, |
| const char * | fmt, | ||
| va_list | args ) |
| [in] | fp | FILE pointer |
| [in] | fmt | Printf-like format specifier |
| [in] | args | List of arguments |
Prints arguments to stream fp and returns number of bytes written.
| size_t wget_fprintf | ( | FILE * | fp, |
| const char * | fmt, | ||
| ... ) |
| [in] | fp | FILE pointer |
| [in] | fmt | Printf-like format specifier |
| [in] | ... | List of arguments |
Prints arguments to stream fp and returns number of bytes written.
| size_t wget_printf | ( | const char * | fmt, |
| ... ) |
| [in] | fmt | Printf-like format specifier |
| [in] | ... | List of arguments |
Prints arguments to stdout and returns number of bytes written.
| size_t wget_vsnprintf | ( | char * | str, |
| size_t | size, | ||
| const char * | fmt, | ||
| va_list | args ) |
| [in] | str | Destination buffer |
| [in] | size | Size of str |
| [in] | fmt | Printf-like format specifier |
| [in] | args | List of arguments |
Prints arguments to buffer str and returns number of bytes written, or on truncation: that would have been written.
If str is NULL the return value are the number of bytes that would have been written.
| size_t wget_snprintf | ( | char * | str, |
| size_t | size, | ||
| const char * | fmt, | ||
| ... ) |
| [in] | str | Destination buffer |
| [in] | size | Size of str |
| [in] | fmt | Printf-like format specifier |
| [in] | ... | List of arguments |
Prints arguments to buffer str and returns number of bytes written, or on truncation: that would have been written.
If str is NULL the return value are the number of bytes that would have been written.