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