Manpage of SETLOCALE

Google
Web www.fiveanddime.net

SETLOCALE

Section: NEWLIB (3)
Updated: 2005 Feb 23
Index Return to Main Contents
 

NAME

9.1 `setlocale', `localeconv'--select or query locale

 

SYNOPSIS


     #include <locale.h>
     char *setlocale(int CATEGORY, const char *LOCALE);
     lconv *localeconv(void);


     char *_setlocale_r(void *REENT,
         int CATEGORY, const char *LOCALE);
     lconv *_localeconv_r(void *REENT);  

DESCRIPTION

`setlocale' is the facility defined by ANSI C to condition the execution environment for international collating and formatting information; `localeconv' reports on the settings of the current locale.


   This is a minimal implementation, supporting only the required `"C"' value for LOCALE; strings representing other locales are not honored unless _MB_CAPABLE is defined in which case three new extensions are allowed for LC_CTYPE or LC_MESSAGES only: `"C-JIS"', `"C-EUCJP"', `"C-SJIS"', or `"C-ISO-8859-1"'. (`""' is also accepted; it represents the default locale for an implementation, here equivalent to `"C"'.)


   If you use `NULL' as the LOCALE argument, `setlocale' returns a pointer to the string representing the current locale (always `"C"' in this implementation). The acceptable values for CATEGORY are defined in ``locale.h'' as macros beginning with `"LC_"', but this implementation does not check the values you pass in the CATEGORY argument.


   `localeconv' returns a pointer to a structure (also defined in ``locale.h'') describing the locale-specific conventions currently in effect.


   `_localeconv_r' and `_setlocale_r' are reentrant versions of `localeconv' and `setlocale' respectively. The extra argument REENT is a pointer to a reentrancy structure.

 

RETURNS

`setlocale' returns either a pointer to a string naming the locale currently in effect (always `"C"' for this implementation, or, if the locale request cannot be honored, `NULL'.


   `localeconv' returns a pointer to a structure of type `lconv', which describes the formatting and collating conventions in effect (in this implementation, always those of the C locale).

 

PORTABILITY

ANSI C requires `setlocale', but the only locale required across all implementations is the C locale.


   No supporting OS subroutines are required.

 

SEE ALSO

setlocale is part of the libc library. The full documentation for libc is maintained as a Texinfo manual. If info and libc are properly installed at your site, the command
info libc

will give you access to the complete manual.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
PORTABILITY
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 21:25:31 GMT, May 16, 2005



www.fiveanddime.net








Google
Web www.fiveanddime.net