1.\" $NetBSD: printf_l.3,v 1.2 2016/12/29 20:29:30 wiz Exp $ 2.\" Copyright (c) 2012 Isabell Long <issyl0@FreeBSD.org> 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD: head/lib/libc/stdio/printf_l.3 258245 2013-11-17 02:03:45Z eadler $ 27.\" 28.Dd December 29, 2016 29.Dt PRINTF_L 3 30.Os 31.Sh NAME 32.Nm printf_l , 33.Nm asprintf_l , 34.Nm fprintf_l , 35.Nm snprintf_l , 36.Nm sprintf_l , 37.Nm vasprintf_l , 38.Nm vfprintf_l , 39.Nm vprintf_l , 40.Nm vsnprintf_l , 41.Nm vsprintf_l 42.Nd formatted output conversion 43.Sh LIBRARY 44.Lb libc 45.Sh SYNOPSIS 46.In stdio.h 47.In locale.h 48.Ft int 49.Fn printf_l "locale_t loc" "const char * restrict format" "..." 50.Ft int 51.Fn asprintf_l "char **ret" "locale_t loc" "const char * format" "..." 52.Ft int 53.Fn fprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "..." 54.Ft int 55.Fn snprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "..." 56.Ft int 57.Fn sprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "..." 58.In stdarg.h 59.Ft int 60.Fn vasprintf_l "char **ret" "locale_t loc" "const char *format" "va_list ap" 61.Ft int 62.Fn vfprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "va_list ap" 63.Ft int 64.Fn vprintf_l "locale_t loc" "const char * restrict format" "va_list ap" 65.Ft int 66.Fn vsnprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "va_list ap" 67.Ft int 68.Fn vsprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "va_list ap" 69.Sh DESCRIPTION 70The above functions are used to convert formatted output in the locale 71.Fa loc . 72They behave in the same way as the versions without the _l suffix, but use 73the specified locale rather than the global or per-thread locale. 74See the specific manual pages for more information. 75.Sh SEE ALSO 76.Xr printf 3 , 77.Xr xlocale 3 78.Sh STANDARDS 79These functions do not conform to any specific standard so they should be 80considered as non-portable local extensions. 81.Sh HISTORY 82These functions first appeared in Darwin and were first implemented in 83.Fx 9.1 84and 85.Nx 7 . 86