1.\" $NetBSD: printf_l.3,v 1.1 2015/12/29 17:55:23 christos 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, 2015 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.Ft int 59.Fn vasprintf_l "char **ret" "locale_t loc" "const char *format" "va_list ap" 60.Ft int 61.Fn vfprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "va_list ap" 62.Ft int 63.Fn vprintf_l "locale_t loc" "const char * restrict format" "va_list ap" 64.Ft int 65.Fn vsnprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "va_list ap" 66.Ft int 67.Fn vsprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "va_list ap" 68.Sh DESCRIPTION 69The above functions are used to convert formatted output in the locale 70.Fa loc . 71They behave in the same way as the versions without the _l suffix, but use 72the specified locale rather than the global or per-thread locale. 73See the specific manual pages for more information. 74.Sh SEE ALSO 75.Xr printf 3 , 76.Xr xlocale 3 77.Sh STANDARDS 78These functions do not conform to any specific standard so they should be 79considered as non-portable local extensions. 80.Sh HISTORY 81These functions first appeared in Darwin and were first implemented in 82.Fx 9.1 83and 84.Nx 7 . 85