]> pd.if.org Git - pdclib.old/blob - man3/setlocale.3
Add _cbprintf/_vcbprintf (callback based printf formatters)
[pdclib.old] / man3 / setlocale.3
1 .\" This file is part of the Public Domain C Library (PDCLib).\r
2 .\" Permission is granted to use, modify, and / or redistribute at will.\r
3 .\"\r
4 .Dd\r
5 .Dt setlocale 3\r
6 .Os\r
7 .\"\r
8 .Sh NAME\r
9 .Nm setlocale\r
10 .Nd Set the application global locale\r
11 .\"\r
12 .Sh SYNOPSIS\r
13 .In locale.h\r
14 .Fn "char *setlocale" "int category" "const char * locale"\r
15 .\"\r
16 .Sh DESCRIPTION\r
17 The ISO C standards define an application global locale, which all \r
18 locale-dependent functions implicitly use.\r
19 .Fn setlocale\r
20 may be used to change this locale.\r
21 .Pp\r
22 The locale is defined to be comprised of several categories; the category \r
23 parameter specifies which category of the global locale to change, and takes one\r
24 of the following values:\r
25 .Bl -tag\r
26 .It Dv LC_ALL\r
27 Modifies all categories\r
28 .It Dv LC_COLLATE\r
29 Changes the string collation order; affects \r
30 .Fn strcoll\r
31 and\r
32 .Fn strxfrm .\r
33 .It Dv LC_CTYPE\r
34 Affects the behaviour of the character handling functions defined in\r
35 .In ctype.h ,\r
36 excluding \r
37 .Fn isdigit\r
38 and\r
39 .Fn isxdigit .\r
40 .It Dv LC_MONETARY\r
41 Controls the currency-related information returned by\r
42 .Fn localeconv .\r
43 .It Dv LC_NUMERIC\r
44 Controls the decimal point character used by the number formatting functions,\r
45 plus the nonmonetary information returned by \r
46 .Fn localeconv .\r
47 .It Dv LC_TIME\r
48 Controls the formatting used by the\r
49 .Fn strftime\r
50 and\r
51 .Fn wcsftime\r
52 functions.\r
53 .El\r
54 .Pp\r
55 .St -p1003.1-2008\r
56 defines the\r
57 .Fn uselocale\r
58 function which controls the locale of the present thread. If the thread locale\r
59 has been modified using the \r
60 .Fn uselocale\r
61 function, and has not been reset to the global locale by invoking\r
62 .Fn uselocale\r
63 with\r
64 .Dv LC_GLOBAL_LOCALE\r
65 as its parameter, then the\r
66 .Fn setlocale\r
67 function will not affect the result of functions invoked on the current thread.\r
68 .\"\r
69 .Sh IMPLEMENTATION NOTES\r
70 None\r
71 .\"\r
72 .Sh SEE ALSO\r
73 .Xr lconv 3\r
74 .Xr uselocale 3\r
75 .Xr duplocale 3\r
76 .Xr freelocale 3\r
77 .\"\r
78 .Sh STANDARDS\r
79 Conforming to\r
80 .St -isoC-amd1 ,\r
81 .St -isoC-99 ,\r
82 .St -isoC-2011 ,\r
83 .St -p1003.1-2008 .