X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/a28bf75d63c6a64e4c3b417c6052e45f42c6cedd..6465356a983ac139f81d3b7913cdb548477c346c:/stdio/xprintf.3 diff --git a/stdio/xprintf.3 b/stdio/xprintf.3 new file mode 100644 index 0000000..fba50ae --- /dev/null +++ b/stdio/xprintf.3 @@ -0,0 +1,64 @@ +.Dd Aug 19, 2012 +.Dt XPRINTF 3 +.Os Darwin +.Sh NAME +.Nm asxprintf , dxprintf , fxprintf , sxprintf , xprintf , +.Nm vasxprintf , vdxprintf , vfxprintf , vsxprintf , vxprintf +.Nd extensible printf +.Sh SYNOPSIS +.In printf.h +.Ft int +.Fn asxprintf "char ** restrict ret" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" ... +.Ft int +.Fn dxprintf "int fd" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" ... +.Ft int +.Fn fxprintf "FILE * restrict stream" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" ... +.Ft int +.Fn sxprintf "char * restrict str" "size_t size" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" ... +.Ft int +.Fn xprintf "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" ... +.In stdarg.h +.Ft int +.Fn vasxprintf "char ** restrict ret" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" "va_list ap" +.Ft int +.Fn vdxprintf "int fd" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" "va_list ap" +.Ft int +.Fn vfxprintf "FILE * restrict stream" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" "va_list ap" +.Ft int +.Fn vsxprintf "char * restrict str" "size_t size" "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" "va_list ap" +.Ft int +.Fn vxprintf "printf_domain_t restrict domain" "locale_t restrict loc" "const char * restrict format" "va_list ap" +.Sh DESCRIPTION +These extensible printf (see +.Xr xprintf 5 ) +variants behave like their normal printf counterparts +(see +.Xr printf 3 ) +without +.Sq Li x +in the name (except +.Fn sxprintf +and +.Fn vsxprintf +behave like +.Fn snprintf +and +.Fn vsnprintf , +respectively). +.Pp +The +.Va domain +argument must be a pointer to a printf domain structure, as returned by one of +the functions described in +.Xr xprintf_domain 3 . +The +.Va loc +argument should be an extended locale (see +.Xr xlocale 3 ) +or NULL, which means to use the current locale in effect (either the per-thread +locale if set, or the global locale by default). +.Sh SEE ALSO +.Xr printf 3 , +.Xr xlocale 3 , +.Xr xprintf_domain 3 , +.Xr xprintf 5