]> pd.if.org Git - pdclib/blobdiff - man3/mbsinit.3
PDCLIB-2 PDCLIB-9 mbsinit
[pdclib] / man3 / mbsinit.3
diff --git a/man3/mbsinit.3 b/man3/mbsinit.3
new file mode 100644 (file)
index 0000000..7e84ae1
--- /dev/null
@@ -0,0 +1,58 @@
+.\" This file is part of the Public Domain C Library (PDCLib).\r
+.\" Permission is granted to use, modify, and / or redistribute at will.\r
+.\"\r
+.Dd\r
+.Dt MBSINIT 3\r
+.Os\r
+.\"\r
+.Sh NAME\r
+.Nm mbsinit\r
+.Nd determines multibyte conversion state\r
+.\"\r
+.Sh SYNOPSIS\r
+.In wchar.h\r
+.Fn "int mbsinit" "const mbstate_t *ps"\r
+.In xlocale.h\r
+.Fn "int mbsinit_l" "const mbstate_t *ps" "locale_t loc"\r
+.\"\r
+.Sh DESCRIPTION\r
+.Fn mbsinit \r
+and\r
+.Fn mbsinit_l \r
+shall return a nonzero value if the multibyte converison state pointed to by\r
+.Va ps\r
+corresponds to an initial conversion state. The interpretation of \r
+.Va *ps\r
+is locale dependent; the only guarantee is that an\r
+.Vt mbstate_t\r
+object initialized to zero shall correspond to an initial conversion state. If\r
+.Va ps\r
+is\r
+.Dv NULL ,\r
+then a nonzero value shall be returned.\r
+.\"\r
+.Pp\r
+The locale used for \r
+.Fn mbsinit\r
+shall be the currently active locale; either the current thread locale as set by\r
+.Xr uselocale 3\r
+if one has been specified, or otherwise the global locale controlled by\r
+.Xr setlocale 3 .\r
+The locale used by \r
+.Fn mbsinit_l\r
+is that specified by\r
+.Va loc .\r
+.\"\r
+.Sh SEE ALSO\r
+.Xr mbrtowc 3\r
+.Xr wcrtomb 3\r
+.Xr setlocale 3\r
+.Xr uselocale 3\r
+.\"\r
+.Sh STANDARDS\r
+.Fn mbsinit\r
+is first defined in\r
+.St -isoC-amd1 ;\r
+.Fn mbsinit_l\r
+is a nonstandard extension originating in Darwin. See\r
+.Xr xlocale.h 3
\ No newline at end of file