📄 ansilocale.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/ansiLocale.html - generated by refgen from ansiLocale.c --> <title> ansiLocale </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>ansiLocale</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>ansiLocale</strong> - ANSI <b>locale</b> documentation </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./ansiLocale.html#localeconv">localeconv</a></i>( )</b> - set the components of an object with type <b>lconv</b> (ANSI)<br><b><i><a href="./ansiLocale.html#setlocale">setlocale</a></i>( )</b> - set the appropriate locale (ANSI)<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>The header <b>locale.h</b> declares two functions and one type, and defines severalmacros. The type is:<dl><dt><b>struct lconv</b><dd>contains members related to the formatting of numeric values. Thestructure should contain at least the members defined in <b>locale.h</b>,in any order.<p></dl></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiLocale.html#top">ansiLocale</a></b>, <b><i><a href="./ansiLocale.html#localeconv">localeconv</a></i>( )</b>, <b><i><a href="./ansiLocale.html#setlocale">setlocale</a></i>( )</b>, American National Standard X3.159-1989<p><hr><a name="localeconv"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>localeconv</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>localeconv</i>( )</strong> - set the components of an object with type <b>lconv</b> (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>struct lconv *localeconv (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the components of an object with type <b>struct lconv</b>with values appropriate for the formatting of numeric quantities(monetary and otherwise) according to the rules of the current locale.<p>The members of the structure with type <b>char *</b> are pointers to stringsany of which (except <b>decimal_point</b>) can point to "" to indicate thatthe value is not available in the current locale or is of zero length.The members with type <b>char</b> are nonnegative numbers, any of which can be<b>CHAR_MAX</b> to indicate that the value is not available in the current locale.The members include the following:<dl><dt><b>char *decimal_point</b><dd>The decimal-point character used to format nonmonetary quantities.<p><dt><b>char *thousands_sep</b><dd>The character used to separate groups of digits before thedecimal-point character in formatted nonmonetary quantities.<p><dt><b>char *grouping</b><dd>A string whose elements indicate the size of each group ofdigits in formatted nonmonetary quantities.<p><dt><b>char *int_curr_symbol</b><dd>The international currency symbol applicable to the currentlocale. The first three characters contain the alphabetic internationalcurrency symbol in accordance with those specified in ISO 4217:1987.The fourth character (immediately preceding the null character) is thecharacter used to separate the international currency symbol fromthe monetary quantity.<p><dt><b>char *currency_symbol</b><dd>The local currency symbol applicable to the current locale.<p><dt><b>char *mon_decimal_point</b><dd>The decimal-point used to format monetary quantities.<p><dt><b>char *mon_thousands_sep</b><dd>The separator for groups of digits before the decimal-point informatted monetary quantities.<p><dt><b>char *mon_grouping</b><dd>A string whose elements indicate the size of each group of digits informatted monetary quantities.<p><dt><b>char *positive_sign</b><dd>The string used to indicate a nonnegative-valued formatted monetaryquantity.<p><dt><b>char *negative_sign</b><dd>The string used to indicate a negative-valued formatted monetaryquantity.<p><dt><b>char int_frac_digits</b><dd>The number of fractional digits (those after the decimal-point)to be displayed in an internationally formatted monetary quantity.<p><dt><b>char frac_digits</b><dd>The number of fractional digits (those after the decimal-point)to be displayed in a formatted monetary quantity.<p><dt><b>char p_cs_precedes</b><dd>Set to 1 or 0 if the <b>currency_symbol</b> respectively precedes orsucceeds the value for a nonnegative formatted monetary quantity.<p><dt><b>char p_sep_by_space</b><dd>Set to 1 or 0 if the <b>currency_symbol</b> respectively is or is notseparated by a space from the value for a nonnegative formattedmonetary quantity.<p><dt><b>char n_cs_precedes</b><dd>Set to 1 or 0 if the <b>currency_symbol</b> respectively precedes orsucceeds the value for a negative formatted monetary quantity.<p><dt><b>char n_sep_by_space</b><dd>Set to 1 or 0 if the <b>currency_symbol</b> respectively is or is notseparated by a space from the value for a negative formatted monetaryquantity.<p><dt><b>char p_sign_posn</b><dd>Set to a value indicating the positioning of the <b>positive_sign</b>for a nonnegative formatted monetary quantity.<p><dt><b>char n_sign_posn</b><dd> Set to a value indicating the positioning of the <b>negative_sign</b>for a negative formatted monetary quantity.<p></dl><p>The elements of <b>grouping</b> and <b>mon_grouping</b> are interpreted accordingto the following:<dl><dt><b>CHAR_MAX</b><dd>No further grouping is to be performed.<p><dt>0<dd>The previous element is to be repeatedly used for the remainder of the digits.<p><dt>other<dd> The integer value is the number of the digits that comprise the currentgroup. The next element is examined to determined the size of the nextgroup of digits before the current group.<p></dl><p>The values of <b>p_sign_posn</b> and <b>n_sign_posn</b> are interpreted according tothe following:<dl><dt>0<dd>Parentheses surround the quantity and <b>currency_symbol</b>.<p><dt>1<dd>The sign string precedes the quantity and <b>currency_symbol</b>.<p><dt>2<dd>The sign string succeeds the quantity and <b>currency_symbol</b>.<p><dt>3<dd>The sign string immediately precedes the <b>currency_symbol</b>.<p><dt>4<dd> The sign string immediately succeeds the <b>currency_symbol</b>.<p></dl><p>The implementation behaves as if no library function calls <b><i><a href="./ansiLocale.html#localeconv">localeconv</a></i>( )</b>.<p>The <b><i><a href="./ansiLocale.html#localeconv">localeconv</a></i>( )</b> routine returns a pointer to the filled-in object. Thestructure pointed to by the return value is not modified by theprogram, but may be overwritten by a subsequent call to <b><i><a href="./ansiLocale.html#localeconv">localeconv</a></i>( )</b>.In addition, calls to <b><i><a href="./ansiLocale.html#setlocale">setlocale</a></i>( )</b> with categories <b>LC_ALL</b>, <b>LC_MONETARY</b>,or <b>LC_NUMERIC</b> may overwrite the contents of the structure.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>locale.h</b>, <b>limits.h</b><p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the structure <b>lconv</b>.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiLocale.html#top">ansiLocale</a></b><hr><a name="setlocale"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>setlocale</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>setlocale</i>( )</strong> - set the appropriate locale (ANSI)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>char *setlocale ( int category, /* category to change */ const char * localeName /* locale name */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This function is included for ANSI compatibility. Only the default isimplemented. At program start-up, the equivalent of the following isexecuted:<pre> setlocale (LC_ALL, "C");</pre>This specifies the program's entire locale and the minimal environmentfor C translation.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>locale.h</b>, <b>string.h</b>, <b>stdlib.h</b> <p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the string "C".</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./ansiLocale.html#top">ansiLocale</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -