scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

setlocale.3 (1482B)


      1 .TH setlocale 3
      2 .SH NAME
      3 setlocale - query or modify the program's current locale
      4 .SH SYNOPSIS
      5 #include <locale.h>
      6 
      7 char *setlocale(int category, const char *locale);
      8 .SH DESCRIPTION
      9 The
     10 .BR setlocale ()
     11 function allows querying and changing the active locale of the program,
     12 either in full or in part.
     13 When
     14 .I locale
     15 is not NULL,
     16 the program locale is updated according to the given arguments.
     17 The
     18 .I category
     19 argument selects which aspect of the locale to modify:
     20 
     21 .nf
     22 Category   	Governs
     23 LC_ALL     	All of the locale
     24 LC_COLLATE 	String collation
     25 LC_CTYPE   	Character classification
     26 LC_MONETARY	Formatting of monetary values
     27 LC_NUMERIC 	Formatting of nonmonetary numeric values
     28 LC_TIME    	Formatting of date and time values
     29 .fi
     30 
     31 A
     32 .I locale
     33 value of
     34 .B C
     35 selects the minimal environment for C programs;
     36 a value of
     37 .B ""
     38 selects the native environment of the host system.
     39 
     40 At program startup, the locale behaves as if
     41 .BR setlocale (LC_ALL,"C")
     42 had been called.
     43 .SH RETURN VALUE
     44 On success, a pointer to a string identifying the locale
     45 associated with the specified
     46 .I category
     47 is returned.
     48 If
     49 .I locale
     50 is NULL, the string describes the current locale for that category.
     51 A subsequent call to
     52 .B setlocale
     53 with this string and category will restore that locale.
     54 The returned string must not be modified by the program;
     55 it may be overwritten by the next call to
     56 .BR setlocale .
     57 .SH STANDARDS
     58 ISO/IEC 9899:1999 Section 7.11.1.1 Paragraph 1,2,3,4,6,7,8
     59 .SH SEE ALSO
     60 .B locale.h(3)