wcstombs.3.patch   [plain text]


--- wcstombs.3.orig	Fri Mar 11 19:44:47 2005
+++ wcstombs.3	Fri Mar 11 19:48:16 2005
@@ -41,7 +41,8 @@
 .Dt WCSTOMBS 3
 .Os
 .Sh NAME
-.Nm wcstombs
+.Nm wcstombs ,
+.Nm wcstombs_l
 .Nd convert a wide-character string to a character string
 .Sh LIBRARY
 .Lb libc
@@ -52,6 +53,12 @@
 .Fa "char * restrict mbstring" "const wchar_t * restrict wcstring"
 .Fa "size_t nbytes"
 .Fc
+.In xlocale.h
+.Ft size_t
+.Fo wcstombs_l
+.Fa "char * restrict mbstring" "const wchar_t * restrict wcstring"
+.Fa "size_t nbytes" "locale_t loc"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn wcstombs
@@ -66,6 +73,14 @@
 .Fa mbstring .
 Partial multibyte characters at the end of the string are not stored.
 The multibyte character string is null terminated if there is room.
+.Pp
+While the
+.Fn wcstombs
+function uses the current locale, the
+.Fn wcstombs_l
+function may be passed a locale directly. See
+.Xr xlocale 3
+for more information.
 .Sh RETURN VALUES
 The
 .Fn wcstombs
@@ -86,7 +101,8 @@
 .Xr mbstowcs 3 ,
 .Xr multibyte 3 ,
 .Xr wcsrtombs 3 ,
-.Xr wctomb 3
+.Xr wctomb 3 ,
+.Xr xlocale 3
 .Sh STANDARDS
 The
 .Fn wcstombs