Manual Pages for UNIX Darwin command on man setlocale
MyWebUniversity

Manual Pages for UNIX Darwin command on man setlocale

SETLOCALE(3) BSD Library Functions Manual SETLOCALE(3)

NAME

sseettllooccaallee - natural language formatting for C

LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

char * sseettllooccaallee(int category, const char *locale);

DESCRIPTION

The sseettllooccaallee() function sets the C library's notion of natural language formatting style for particular sets of routines. Each such style is called a `locale' and is invoked using an appropriate name passed as a C string. The sseettllooccaallee() function recognizes several categories of routines. These are the categories and the sets of routines they select: LCALL Set the entire locale generically. LCCOLLATE Set a locale for string collation routines. This controls alphabetic ordering in ssttrrccoollll() and ssttrrxxffrrmm(). LCCTYPE Set a locale for the ctype(3) and multibyte(3) functions.

This controls recognition of upper and lower case, alpha-

betic or non-alphabetic characters, and so on.

LCMESSAGES Set a locale for message catalogs, see catopen(3) function. LCMONETARY Set a locale for formatting monetary values; this affects the llooccaalleeccoonnvv() function.

LCNUMERIC Set a locale for formatting numbers. This controls the for-

matting of decimal points in input and output of floating point numbers in functions such as pprriinnttff() and ssccaannff(), as well as values returned by llooccaalleeccoonnvv(). LCTIME Set a locale for formatting dates and times using the ssttrrffttiimmee() function. Only three locales are defined by default, the empty string "" which denotes the native environment, and the "C" and "POSIX" locales, which denote the C language environment. A locale argument of NULL causes sseettllooccaallee() to return the current locale. By default, C programs start in the "C" locale. The only function in the library that sets the locale is sseettllooccaallee(); the locale is never changed as a side effect of some other routine.

RETURN VALUES

Upon successful completion, sseettllooccaallee() returns the string associated with the specified category for the requested locale. The sseettllooccaallee()

function returns NULL and fails to change the locale if the given combi-

nation of category and locale makes no sense. EERRRROORRSS No errors are defined. FILES

$PATHLOCALE/locale/category

/usr/share/locale/locale/category locale file for the locale locale and the category category.

SEE ALSO

colldef(1), mklocale(1), catopen(3), ctype(3), localeconv(3), multibyte(3), strcoll(3), strxfrm(3), euc(5), utf8(5), environ(7) STANDARDS The sseettllooccaallee() function conforms to ISO/IEC 9899:1999 (``ISO C99''). HISTORY The sseettllooccaallee() function first appeared in 4.4BSD. BSD November 21, 2003 BSD




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™