06.08.2013 Views

pSOSystem System Calls - Read

pSOSystem System Calls - Read

pSOSystem System Calls - Read

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

setlocale pREPC+ <strong>System</strong> <strong>Calls</strong><br />

setlocale Obtains or changes the program’s locale.<br />

#include <br />

char *setlocale (<br />

int category /* localization category */<br />

const char *locale /* locale */<br />

)<br />

Description<br />

Arguments<br />

The setlocale() function allows you to query or set certain parameters that are<br />

sensitive to the geo-political location where a program is used. For example, in<br />

Europe, the comma is sometimes used in place of the decimal point.<br />

To query the locale or a portion thereof, you set locale to point to NULL. To change<br />

the locale, or a portion thereof, you set locale to point to a string that specifies the<br />

desired value.<br />

category Specifies the localization category to be queried or changed, and<br />

must be one of the following:<br />

LC_ALL All categories.<br />

LC_COLLATE Affects the behavior of strcoll() and<br />

strxfrm().<br />

LC_CTYPE Affects the behavior of the character-handling<br />

functions (isalnum(), etc.) and the multibyte<br />

functions.<br />

LC_MONETARY Affects the monetary formatting information<br />

returned by localeconv().<br />

LC_NUMERIC Affects the decimal-point character for the<br />

formatted input/output functions and the string<br />

conversion functions, as well as the non-monetary<br />

formatting information returned by<br />

localeconv().<br />

LC_TIME Affects the behavior of strftime().<br />

3-134 <strong>pSO<strong>System</strong></strong> <strong>System</strong> <strong>Calls</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!