📄 gencat.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>gencat</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_001_014_814"> </a>NAME</h4><blockquote>gencat - generate a formatted message catalogue</blockquote><h4><a name = "tag_001_014_815"> </a>SYNOPSIS</h4><blockquote><pre><code>gencat <i>catfile msgfile</i>... </code></pre></blockquote><h4><a name = "tag_001_014_816"> </a>DESCRIPTION</h4><blockquote>The<i>gencat</i>utilitymerges the message text source files<i>msgfile</i>into a formatted message catalogue<i>catfile</i>.The file<i>catfile</i>will be created if it does not already exist.If<i>catfile</i>does exist,its messages will be included in the new<i>catfile</i>.If set and message numbers collide,the new message text defined in<i>msgfile</i>will replace the old message text currently contained in<i>catfile</i>.</blockquote><h4><a name = "tag_001_014_817"> </a>OPTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_818"> </a>OPERANDS</h4><blockquote>The following operands are supported:<dl compact><dt><i>catfile</i><dd>A pathname of the formatted message catalogue.If "-" is specified, standard output is used.The format of the message catalogue produced is unspecified.<dt><i>msgfile</i><dd>A pathname of a message text source file.If "-" is specified for an instance of<i>msgfile</i>,standard input is used.The format of message text source files is defined in theEXTENDED DESCRIPTION section.</dl></blockquote><h4><a name = "tag_001_014_819"> </a>STDIN</h4><blockquote>The standard input is not used unless a<i>msgfile</i>operand is specified as "-".</blockquote><h4><a name = "tag_001_014_820"> </a>INPUT FILES</h4><blockquote>The input files are text files.</blockquote><h4><a name = "tag_001_014_821"> </a>ENVIRONMENT VARIABLES</h4><blockquote>The following environment variables affect the execution of<i>gencat</i>:<dl compact><dt><i>LANG</i><dd>Provide a default value for the internationalisation variablesthat are unset or null.If<i>LANG</i>is unset or null, the corresponding value from theimplementation-dependent default locale will be used.If any of the internationalisation variables contains an invalid setting, theutility will behave as if none of the variables had been defined.<dt><i>LC_ALL</i><dd>If set to a non-empty string value,override the values of all the other internationalisation variables.<dt><i>LC_CTYPE</i><dd>Determine thelocale for the interpretation of sequences of bytes of text data ascharacters (for example, single- as opposed to multi-byte charactersin arguments and input files).<dt><i>LC_MESSAGES</i><dd>Determine the locale that should be used to affectthe format and contents of diagnosticmessages written to standard error.<dt><i>NLSPATH</i><dd>Determine the location of message cataloguesfor the processing of<i>LC_MESSAGES .</i></dl></blockquote><h4><a name = "tag_001_014_822"> </a>ASYNCHRONOUS EVENTS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_823"> </a>STDOUT</h4><blockquote>The standard output is not used unless the<i>catfile</i>operand is specified as -.</blockquote><h4><a name = "tag_001_014_824"> </a>STDERR</h4><blockquote>Used only for diagnostic messages.</blockquote><h4><a name = "tag_001_014_825"> </a>OUTPUT FILES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_826"> </a>EXTENDED DESCRIPTION</h4><blockquote>The format of a message text source file is defined as follows.Note that the fields of a message text source line are separatedby a singleblankcharacter.Any otherblank charactersare considered as being partof the subsequent field.<dl compact><dt><b>$set </b><i>n comment</i><dd>This line specifies the set identifier of thefollowing messages until the next<b>$set</b>or end-of-file appears.The<i>n</i>denotes the set identifier, whichis defined as a number in the range [1,{NL_SETMAX}](see the <b>XSH</b> specification,<i><a href="../xsh/limits.h.html"><limits.h></a></i>).Set identifiersmust be presented in ascending orderwithin a single source file but need not be contiguous.Any string following the set identifier is treated as a comment.If no<b>$set</b>directive is specified in a message text source file, all messageswill be located in animplementation-dependent default message setNL_SETD(see the <b>XSH</b> specification,<i><a href="../xsh/nl_types.h.html"><nl_types.h></a></i>).<dt><b>$delset </b><i>n comment</i><dd>This line deletes message set<i>n</i>from anexisting message catalogue.The<i>n</i>denotes the set number [1,{NL_SETMAX}].Any string following the set number is treated as a comment.<dt><b>$ </b><i>comment</i><dd>A line beginning with "$" followed by a blankcharacter is treated as a comment.<dt><i>m message-text</i><dd>The<i>m</i>denotes the message identifier,which is defined as a number in the range [1,{NL_MSGMAX}](see the <b>XSH</b> specification,<i><a href="../xsh/limits.h.html"><limits.h></a></i>).The<i>message-text</i>is stored in the message cataloguewith the set identifierspecified by the last<b>$set</b>directive, and with message identifier<i>m</i>.If the<i>message-text</i>is empty,and ablank characterfield separator is present, an empty string isstored in the message catalogue.If a message source line has amessage number, but neither a field separator nor<i>message-text</i>,the existing message with that number (if any) is deleted from thecatalogue.Message identifiers must be in ascendingorder within a single set, but need not be contiguous.The length of<i>message-text</i>must be in the range [0,{NL_TEXTMAX}](see the <b>XSH</b> specification,<i><a href="../xsh/limits.h.html"><limits.h></a></i>).<dt><b>$quote </b><i>n</i><dd>This line specifies an optional quote character<i>c</i>,which can be used to surround<i>message-text</i>so that trailing spaces or null (empty) messages are visible in amessage source line.By default, or if an empty<b>$quote</b>directive is supplied, no quoting of<i>message-text</i>will be recognised.</dl><p>Empty lines in a message text source file are ignored.The effects of lines starting with any character other than thosedefined above are implementation-dependent.<p>Text strings can contain the special characters andescape sequences defined in the following table:<p><table bordercolor=#000000 border=1 align=center><tr valign=top><th align=center><b>Description</b><th align=center><b>Symbol</b><th align=center><b>Sequence</b><tr valign=top><td align=left>newline<td align=left>NL(LF)<td align=left>\n<tr valign=top><td align=left>horizontal tab<td align=left>HT<td align=left>\t<tr valign=top><td align=left>vertical-tab<td align=left>VT<td align=left>\v<tr valign=top><td align=left>backspace<td align=left>BS<td align=left>\b<tr valign=top><td align=left>carriage-return<td align=left>CR<td align=left>\r<tr valign=top><td align=left>form-feed<td align=left>FF<td align=left>\f<tr valign=top><td align=left>backslash<td align=left>\<td align=left>\\<tr valign=top><td align=left>bit pattern<td align=left><i>ddd</i><td align=left>\<i>ddd</i></table><p>The escape sequence<i>\ddd</i>consists of backslash followed by one, two or three octal digits,which are taken to specify the value of the desired character.If the character following a backslash is not one of those specified,the backslash is ignored.<p>Backslash (\) followed by anewlinecharacter is also usedto continue a string on the following line.Thus, the following two lines describe a single message string:<pre><code>1 This line continues \to the next line</code></pre>which is equivalent to:<pre><code>1 This line continues to the next line</code></pre></blockquote><h4><a name = "tag_001_014_827"> </a>EXIT STATUS</h4><blockquote>The following exit values are returned:<dl compact><dt>0<dd>Successful completion.<dt>>0<dd>An error occurred.</dl></blockquote><h4><a name = "tag_001_014_828"> </a>CONSEQUENCES OF ERRORS</h4><blockquote>Default.</blockquote><h4><a name = "tag_001_014_829"> </a>APPLICATION USAGE</h4><blockquote>Message catalogues produced by<i>gencat</i>are binary encoded, meaningthat their portability cannot be guaranteedbetween different types of machine.Thus, just as C programs need to be recompiled for each type ofmachine, so message catalogues must be recreated via<i>gencat</i>.</blockquote><h4><a name = "tag_001_014_830"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_831"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_001_014_832"> </a>SEE ALSO</h4><blockquote><i><a href="iconv.html">iconv</a></i>,the <b>XSH</b> specification description of<i><a href="../xsh/limits.h.html"><limits.h></a></i>.<br></blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -