⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xbd_chap08.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">If the locale value has the form:</p><blockquote><pre><i>language</i><b>[</b><i>_territory</i><b>][</b><i>.codeset</i><b>]</b></pre></blockquote><p>it refers to an implementation-provided locale, where settings of language, territory, and codeset areimplementation-defined.</p><p><i>LC_COLLATE ,</i> <i>LC_CTYPE ,</i> <i>LC_MESSAGES ,</i> <i>LC_MONETARY ,</i> <i>LC_NUMERIC ,</i> and <i>LC_TIME</i> aredefined to accept an additional field @ <i>modifier</i>, which allows the user to select a specific instance of localization datawithin a single category (for example, for selecting the dictionary as opposed to the character ordering of data). The syntax forthese environment variables is thus defined as:</p><blockquote><pre><b>[</b><i>language</i><b>[</b><i>_territory</i><b>][</b><i>.codeset</i><b>][</b><tt>@</tt><i>modifier</i><b>]]</b></pre></blockquote><p>For example, if a user wanted to interact with the system in French, but required to sort German text files, <i>LANG</i> and<i>LC_COLLATE</i> could be defined as:</p><blockquote><pre><tt>LANG=Fr_FRLC_COLLATE=De_DE</tt></pre></blockquote><p>This could be extended to select dictionary collation (say) by use of the @ <i>modifier</i> field; for example:</p><blockquote><pre><tt>LC_COLLATE=De_DE@dict</tt></pre></blockquote><img src="../images/opt-end.gif" alt="[Option End]" border="0"> <p>An implementation may support other formats.</p><p>If the locale value is not recognized by the implementation, the behavior is unspecified.</p><p>At runtime, these values are bound to a program's locale by calling the <a href="../functions/setlocale.html"><i>setlocale</i>()</a> function.</p><p>Additional criteria for determining a valid locale name are implementation-defined.</p><h3><a name="tag_08_03"></a>Other Environment Variables</h3><dl compact><dt><i>COLUMNS</i></dt><dd>This variable shall represent a decimal integer &gt;0 used to indicate the user's preferred width in column positions for theterminal screen or window; see <a href="xbd_chap03.html#tag_03_103"><i>Column Position</i></a> . If this variable is unset or null,the implementation determines the number of columns, appropriate for the terminal or window, in an unspecified manner. When<i>COLUMNS</i> is set, any terminal-width information implied by <i>TERM</i> is overridden. Users and conforming applicationsshould not set <i>COLUMNS</i> unless they wish to override the system selection and produce output unrelated to the terminalcharacteristics. <p>Users should not need to set this variable in the environment unless there is a specific reason to override the implementation'sdefault behavior, such as to display data in an area arbitrarily smaller than the terminal or window.</p></dd><dt><i>DATEMSK</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Indicates the pathname of the template file used by <a href="../functions/getdate.html"><i>getdate</i>()</a>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><i>HOME</i></dt><dd>The system shall initialize this variable at the time of login to be a pathname of the user's home directory. See <a href="pwd.h.html"><i>&lt;pwd.h&gt;</i></a> .</dd><dt><i>LINES</i></dt><dd>This variable shall represent a decimal integer &gt;0 used to indicate the user's preferred number of lines on a page or thevertical screen or window size in lines. A line in this case is a vertical measure large enough to hold the tallest character inthe character set being displayed. If this variable is unset or null, the implementation determines the number of lines,appropriate for the terminal or window (size, terminal baud rate, and so on), in an unspecified manner. When <i>LINES</i> is set,any terminal-height information implied by <i>TERM</i> is overridden. Users and conforming applications should not set <i>LINES</i>unless they wish to override the system selection and produce output unrelated to the terminal characteristics. <p>Users should not need to set this variable in the environment unless there is a specific reason to override the implementation'sdefault behavior, such as to display data in an area arbitrarily smaller than the terminal or window.</p></dd><dt><i>LOGNAME</i></dt><dd>The system shall initialize this variable at the time of login to be the user's login name. See <a href="pwd.h.html"><i>&lt;pwd.h&gt;</i></a> . For a value of <i>LOGNAME</i> to be portable across implementations ofIEEE&nbsp;Std&nbsp;1003.1-2001, the value should be composed of characters from the portable filename character set.</dd><dt><i>MSGVERB</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Describes which message components shall be used in writing messages by <a href="../functions/fmtmsg.html"><i>fmtmsg</i>()</a>.<img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><i>PATH</i></dt><dd>This variable shall represent the sequence of path prefixes that certain functions and utilities apply in searching for anexecutable file known only by a filename. The prefixes shall be separated by a colon ( <tt>':'</tt> ). When a non-zero-lengthprefix is applied to this filename, a slash shall be inserted between the prefix and the filename. A zero-length prefix is a legacyfeature that indicates the current working directory. It appears as two adjacent colons ( <tt>"::"</tt> ), as an initial colonpreceding the rest of the list, or as a trailing colon following the rest of the list. A strictly conforming application shall usean actual pathname (such as <b>.</b>) to represent the current working directory in <i>PATH .</i> The list shall be searched frombeginning to end, applying the filename to each prefix, until an executable file with the specified name and appropriate executionpermissions is found. If the pathname being sought contains a slash, the search through the path prefixes shall not be performed.If the pathname begins with a slash, the specified path is resolved (see <a href="xbd_chap04.html#tag_04_11"><i>PathnameResolution</i></a> ). If <i>PATH</i> is unset or is set to null, the path search is implementation-defined.</dd><dt><i>PWD</i></dt><dd>This variable shall represent an absolute pathname of the current working directory. It shall not contain any filenamecomponents of dot or dot-dot. The value is set by the <a href="../utilities/cd.html"><i>cd</i></a> utility.</dd><dt><i>SHELL</i></dt><dd>This variable shall represent a pathname of the user's preferred command language interpreter. If this interpreter does notconform to the Shell Command Language in the Shell and Utilities volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../utilities/xcu_chap02.html">Chapter 2, Shell Command Language</a>, utilities may behave differently from those described inIEEE&nbsp;Std&nbsp;1003.1-2001.</dd><dt><i>TMPDIR</i></dt><dd>This variable shall represent a pathname of a directory made available for programs that need a place to create temporaryfiles.</dd><dt><i>TERM</i></dt><dd>This variable shall represent the terminal type for which output is to be prepared. This information is used by utilities andapplication programs wishing to exploit special capabilities specific to a terminal. The format and allowable values of thisenvironment variable are unspecified.</dd><dt><i>TZ</i></dt><dd>This variable shall represent timezone information. The contents of the environment variable named <i>TZ</i> shall be used bythe <a href="../functions/ctime.html"><i>ctime</i>()</a>, <a href="../functions/localtime.html"><i>localtime</i>()</a>, <a href="../functions/strftime.html"><i>strftime</i>()</a>, <a href="../functions/mktime.html"><i>mktime</i>()</a>, <sup>[<a href="javascript:open_code('TSF')">TSF</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> <a href="../functions/ctime_r.html"><i>ctime_r</i>()</a>, and <a href="../functions/localtime_r.html"><i>localtime_r</i>()</a> <img src="../images/opt-end.gif" alt="[Option End]" border="0"> functions, and by various utilities, to override the default timezone. Thevalue of <i>TZ</i> has one of the two forms (spaces inserted for clarity): <blockquote><pre><tt>:</tt><i>characters</i></pre></blockquote><p>or:</p><blockquote><pre><i>std offset dst offset</i><tt>,</tt> <i>rule</i></pre></blockquote><p>If <i>TZ</i> is of the first format (that is, if the first character is a colon), the characters following the colon are handledin an implementation-defined manner.</p><p>The expanded format (for all <i>TZ s</i> whose value does not have a colon as the first character) is as follows:</p><blockquote><pre><i>stdoffset</i><b>[</b><i>dst</i><b>[</b><i>offset</i><b>][</b><tt>,</tt><i>start</i><b>[</b><tt>/</tt><i>time</i><b>]</b><tt>,</tt><i>end</i><b>[</b><tt>/</tt><i>time</i><b>]]]</b></pre></blockquote><p>Where:</p><dl compact><dt><i>std</i>&nbsp;and&nbsp;<i>dst</i></dt><dd>Indicate no less than three, nor more than {TZNAME_MAX}, bytes that are the designation for the standard ( <i>std</i>) or thealternative ( <i>dst</i> -such as Daylight Savings Time) timezone. Only <i>std</i> is required; if <i>dst</i> is missing, then thealternative time does not apply in this locale. <p>Each of these fields may occur in either of two formats quoted or unquoted:</p><ul><li><p>In the quoted form, the first character shall be the less-than ( <tt>'&lt;'</tt> ) character and the last character shall be thegreater-than ( <tt>'&gt;'</tt> ) character. All characters between these quoting characters shall be alphanumeric characters fromthe portable character set in the current locale, the plus-sign ( <tt>'+'</tt> ) character, or the minus-sign ( <tt>'-'</tt> )character. The <i>std</i> and <i>dst</i> fields in this case shall not include the quoting characters.</p></li><li><p>In the unquoted form, all characters in these fields shall be alphabetic characters from the portable character set in thecurrent locale.</p></li></ul><p>The interpretation of these fields is unspecified if either field is less than three bytes (except for the case when <i>dst</i>is missing), more than {TZNAME_MAX} bytes, or if they contain characters other than those specified.</p></dd><dt><i>offset</i></dt><dd>Indicates the value added to the local time to arrive at Coordinated Universal Time. The <i>offset</i> has the form: <blockquote><pre><i>hh</i><b>[</b><tt>:</tt><i>mm</i><b>[</b><tt>:</tt><i>ss</i><b>]]</b></pre></blockquote><p>The minutes ( <i>mm</i>) and seconds ( <i>ss</i>) are optional. The hour ( <i>hh</i>) shall be required and may be a singledigit. The <i>offset</i> following <i>std</i> shall be required. If no <i>offset</i> follows <i>dst</i>, the alternative time isassumed to be one hour ahead of standard time. One or more digits may be used; the value is always interpreted as a decimal number.The hour shall be between zero and 24, and the minutes (and seconds)-if present-between zero and 59. The result of using valuesoutside of this range is unspecified. If preceded by a <tt>'-'</tt> , the timezone shall be east of the Prime Meridian; otherwise,it shall be west (which may be indicated by an optional preceding <tt>'+'</tt> ).</p></dd><dt><i>rule</i></dt><dd>Indicates when to change to and back from the alternative time. The <i>rule</i> has the form: <blockquote><pre><i>date</i><b>[</b><tt>/</tt><i>time</i><b>]</b><tt>,</tt><i>date</i><b>[</b><tt>/</tt><i>time</i><b>]</b></pre></blockquote><p>where the first <i>date</i> describes when the change from standard to alternative time occurs and the second <i>date</i>describes when the change back happens. Each <i>time</i> field describes when, in current local time, the change to the other timeis made.</p><p>The format of <i>date</i> is one of the following:</p><dl compact><dt>J<i>n</i></dt><dd>The Julian day <i>n</i> (1 &lt;= <i>n</i> &lt;= 365). Leap days shall not be counted. That is, in all years-including leapyears-February 28 is day 59 and March 1 is day 60. It is impossible to refer explicitly to the occasional February 29.</dd><dt><i>n</i></dt><dd>The zero-based Julian day (0 &lt;= <i>n</i> &lt;= 365). Leap days shall be counted, and it is possible to refer to February29.</dd><dt>M<i>m</i>.<i>n</i>.<i>d</i></dt><dd>The <i>d</i>'th day (0 &lt;= <i>d</i> &lt;= 6) of week <i>n</i> of month <i>m</i> of the year (1 &lt;= <i>n</i> &lt;= 5, 1&lt;= <i>m</i> &lt;= 12, where week 5 means &quot;the last <i>d</i> day in month <i>m</i>&quot; which may occur in either the fourth or thefifth week). Week 1 is the first week in which the <i>d</i>'th day occurs. Day zero is Sunday.</dd></dl><p>The <i>time</i> has the same format as <i>offset</i> except that no leading sign ( <tt>'-'</tt> or <tt>'+'</tt> ) is allowed.The default, if <i>time</i> is not given, shall be 02:00:00.</p></dd></dl></dd></dl><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -