gnurl_printf(3)
π NAME π
hii bestie π this is gnurl_printf(3) from the libgnurl Manual, and the whole squad here is all about formatted output conversion. The main characters are curl_maprintf, curl_mfprintf, curl_mprintf, curl_msnprintf, curl_msprintf, curl_mvaprintf, curl_mvfprintf, curl_mvprintf, curl_mvsnprintf, and curl_mvsprintf β¨
π SYNOPSIS π
#include <gnurl/mprintf.h>
int curl_mprintf(const char *format, ...);
int curl_mfprintf(FILE *fd, const char *format, ...);
int curl_msprintf(char *buffer, const char *format, ...);
int curl_msnprintf(char *buffer, size_t maxlength, const char *format,
...);
int curl_mvprintf(const char *format, va_list args);
int curl_mvfprintf(FILE *fd, const char *format, va_list args);
int curl_mvsprintf(char *buffer, const char *format, va_list args);
int curl_mvsnprintf(char *buffer, size_t maxlength, const char *format,
va_list args);
char *curl_maprintf(const char *format, ...);
char *curl_mvaprintf(const char *format, va_list args);
πΈ DESCRIPTION πΈ
okay so these functions all produce output according to a format string and the arguments you give them π«Ά They're mostly clones of the well-known C-style functions, and this page is not doing a detailed explanation of every available formatting rule and usage. That's the vibe: familiar formatting behavior, but with the libgnurl names π
π¦ notable exceptions π¦
curl_mprintf()β Normalprintf()clone.curl_mfprintf()β Normalfprintf()clone.curl_msprintf()β Normalsprintf()clone.curl_msnprintf()βsnprintf()clone. Many systems don't have this. It is just likesprintfbut with an extra argument after the buffer that specifies the length of the target buffer.curl_mvprintf()β Normalvprintf()clone.curl_mvfprintf()β Normalvfprintf()clone.curl_mvsprintf()β Normalvsprintf()clone.curl_mvsnprintf()βvsnprintf()clone. Many systems don't have this. It is just likevsprintfbut with an extra argument after the buffer that specifies the length of the target buffer.curl_maprintf()β Likeprintf()but returns the output string as amalloc()ed string. The returned string must befree()ed by the receiver.curl_mvaprintf()β Likecurl_maprintf()but takes ava_listpointer argument instead of a variable amount of arguments.
β οΈ AVAILABILITY β οΈ
bestie, listen π These functions will be removed from the public libcurl API in the future. Do not use them in any new programs or projects. Like, fr fr β new code should not be hopping on this ride π
β¨ RETURN VALUE β¨
The curl_maprintf and curl_mvaprintf functions return a pointer to a newly allocated string, or NULL if it failed.
All other functions return the number of characters they actually outputted π
π SEE ALSO π
bye bestie π«Ά β source/version: libcurl 7.12, dated 30 April 2004, and this page is gnurl_printf(3) π
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms