]> pd.if.org Git - pdclib/commitdiff
Add manpage for setlocale
authorOwen Shepherd <owen.shepherd@e43.eu>
Wed, 20 Feb 2013 01:58:08 +0000 (01:58 +0000)
committerOwen Shepherd <owen.shepherd@e43.eu>
Wed, 20 Feb 2013 01:58:08 +0000 (01:58 +0000)
man3/setlocale.3 [new file with mode: 0644]

diff --git a/man3/setlocale.3 b/man3/setlocale.3
new file mode 100644 (file)
index 0000000..f0f35bf
--- /dev/null
@@ -0,0 +1,83 @@
+.\" 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 setlocale 3\r
+.Os\r
+.\"\r
+.Sh NAME\r
+.Nm setlocale\r
+.Nd Set the application global locale\r
+.\"\r
+.Sh SYNOPSIS\r
+.In locale.h\r
+.Fn "char *setlocale" "int category" "const char * locale"\r
+.\"\r
+.Sh DESCRIPTION\r
+The ISO C standards define an application global locale, which all \r
+locale-dependent functions implicitly use.\r
+.Fn setlocale\r
+may be used to change this locale.\r
+.Pp\r
+The locale is defined to be comprised of several categories; the category \r
+parameter specifies which category of the global locale to change, and takes one\r
+of the following values:\r
+.Bl -tag\r
+.It Dv LC_ALL\r
+Modifies all categories\r
+.It Dv LC_COLLATE\r
+Changes the string collation order; affects \r
+.Fn strcoll\r
+and\r
+.Fn strxfrm .\r
+.It Dv LC_CTYPE\r
+Affects the behaviour of the character handling functions defined in\r
+.In ctype.h ,\r
+excluding \r
+.Fn isdigit\r
+and\r
+.Fn isxdigit .\r
+.It Dv LC_MONETARY\r
+Controls the currency-related information returned by\r
+.Fn localeconv .\r
+.It Dv LC_NUMERIC\r
+Controls the decimal point character used by the number formatting functions,\r
+plus the nonmonetary information returned by \r
+.Fn localeconv .\r
+.It Dv LC_TIME\r
+Controls the formatting used by the\r
+.Fn strftime\r
+and\r
+.Fn wcsftime\r
+functions.\r
+.El\r
+.Pp\r
+.St -p1003.1-2008\r
+defines the\r
+.Fn uselocale\r
+function which controls the locale of the present thread. If the thread locale\r
+has been modified using the \r
+.Fn uselocale\r
+function, and has not been reset to the global locale by invoking\r
+.Fn uselocale\r
+with\r
+.Dv LC_GLOBAL_LOCALE\r
+as its parameter, then the\r
+.Fn setlocale\r
+function will not affect the result of functions invoked on the current thread.\r
+.\"\r
+.Sh IMPLEMENTATION NOTES\r
+None\r
+.\"\r
+.Sh SEE ALSO\r
+.Xr lconv 3\r
+.Xr uselocale 3\r
+.Xr duplocale 3\r
+.Xr freelocale 3\r
+.\"\r
+.Sh STANDARDS\r
+Conforming to\r
+.St -isoC-amd1 ,\r
+.St -isoC-99 ,\r
+-St -isoC-2011 ,\r
+.St -p1003.1-2008 .
\ No newline at end of file