407 lines
12 KiB
HTML
407 lines
12 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>gencat</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="gencat"></a> <a name="tag_04_59"></a><!-- gencat -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_59_01"></a>NAME</h4>
|
|
|
|
<blockquote>gencat - generate a formatted message catalog</blockquote>
|
|
|
|
<h4><a name="tag_04_59_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> gencat</tt> <i>catfile msgfile</i><tt>... <img src="../images/opt-end.gif" alt="[Option End]" border=
|
|
"0"></tt></code></div>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>gencat</i> utility shall merge the message text source file <i>msgfile</i> into a formatted message catalog
|
|
<i>catfile</i>. The file <i>catfile</i> shall be created if it does not already exist. If <i>catfile</i> does exist, its messages
|
|
shall be included in the new <i>catfile</i>. If set and message numbers collide, the new message text defined in <i>msgfile</i>
|
|
shall replace the old message text currently contained in <i>catfile</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operands shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>catfile</i></dt>
|
|
|
|
<dd>A pathname of the formatted message catalog. If <tt>'-'</tt> is specified, standard output shall be used. The format of the
|
|
message catalog produced is unspecified.</dd>
|
|
|
|
<dt><i>msgfile</i></dt>
|
|
|
|
<dd>A pathname of a message text source file. If <tt>'-'</tt> is specified for an instance of <i>msgfile</i>, standard input shall
|
|
be used. The format of message text source files is defined in the EXTENDED DESCRIPTION section.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard input shall not be used unless a <i>msgfile</i> operand is specified as <tt>'-'</tt> .</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>The input files shall be text files.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>gencat</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
|
opposed to multi-byte characters in arguments and input files).</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
|
error.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd>Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard output shall not be used unless the <i>catfile</i> operand is specified as <tt>'-'</tt> .</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used only for diagnostic messages.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The content of a message text file shall be in the format defined as follows. Note that the fields of a message text source line
|
|
are separated by a single <blank>. Any other <blank>s are considered to be part of the subsequent field.</p>
|
|
|
|
<dl compact>
|
|
<dt><b>$set </b> <i>n comment</i></dt>
|
|
|
|
<dd><br>
|
|
This line specifies the set identifier of the following messages until the next <b>$set</b> or end-of-file appears. The <i>n</i>
|
|
denotes the set identifier, which is defined as a number in the range [1, {NL_SETMAX}] (see the <a href=
|
|
"../basedefs/limits.h.html"><i><limits.h></i></a> header defined in the Base Definitions volume of
|
|
IEEE Std 1003.1-2001). The application shall ensure that set identifiers are presented in ascending order within a single
|
|
source file, but need not be contiguous. Any string following the set identifier shall be treated as a comment. If no <b>$set</b>
|
|
directive is specified in a message text source file, all messages shall be located in an implementation-defined default message
|
|
set NL_SETD (see the <a href="../basedefs/nl_types.h.html"><i><nl_types.h></i></a> header defined in the Base Definitions
|
|
volume of IEEE Std 1003.1-2001).</dd>
|
|
|
|
<dt><b>$delset </b> <i>n comment</i></dt>
|
|
|
|
<dd><br>
|
|
This line deletes message set <i>n</i> from an existing message catalog. The <i>n</i> denotes the set number [1, {NL_SETMAX}]. Any
|
|
string following the set number shall be treated as a comment.</dd>
|
|
|
|
<dt><b>$ </b> <i>comment</i></dt>
|
|
|
|
<dd>A line beginning with <tt>'$'</tt> followed by a <blank> shall be treated as a comment.</dd>
|
|
|
|
<dt><i>m message-text</i></dt>
|
|
|
|
<dd><br>
|
|
The <i>m</i> denotes the message identifier, which is defined as a number in the range [1, {NL_MSGMAX}] (see the <a href=
|
|
"../basedefs/limits.h.html"><i><limits.h></i></a> header). The <i>message-text</i> shall be stored in the message catalog
|
|
with the set identifier specified by the last <b>$set</b> directive, and with message identifier <i>m</i>. If the
|
|
<i>message-text</i> is empty, and a <blank> field separator is present, an empty string shall be stored in the message
|
|
catalog. If a message source line has a message number, but neither a field separator nor <i>message-text</i>, the existing message
|
|
with that number (if any) shall be deleted from the catalog. The application shall ensure that message identifiers are in ascending
|
|
order within a single set, but need not be contiguous. The application shall ensure that the length of <i>message-text</i> is in
|
|
the range [0, {NL_TEXTMAX}] (see the <a href="../basedefs/limits.h.html"><i><limits.h></i></a> header).</dd>
|
|
|
|
<dt><b>$quote </b> <i>n</i></dt>
|
|
|
|
<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 a message source line. By default, or if an empty <b>$quote</b> directive is
|
|
supplied, no quoting of <i>message-text</i> shall be recognized.</dd>
|
|
</dl>
|
|
|
|
<p>Empty lines in a message text source file shall be ignored. The effects of lines starting with any character other than those
|
|
defined above are implementation-defined.</p>
|
|
|
|
<p>Text strings can contain the special characters and escape sequences defined in the following table:</p>
|
|
|
|
<center>
|
|
<table border="1" cellpadding="3" align="center">
|
|
<tr valign="top">
|
|
<th align="center">
|
|
<p class="tent"><b>Description</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Symbol</b></p>
|
|
</th>
|
|
<th align="center">
|
|
<p class="tent"><b>Sequence</b></p>
|
|
</th>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><newline></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">NL(LF)</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\n</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">Horizontal-tab</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">HT</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\t</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><vertical-tab></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">VT</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\v</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><backspace></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">BS</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\b</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><carriage-return></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">CR</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\r</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent"><form-feed></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">FF</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\f</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">Backslash</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><tt>\</tt></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\\</p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr valign="top">
|
|
<td align="left">
|
|
<p class="tent">Bit pattern</p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent"><tt>ddd</tt></p>
|
|
</td>
|
|
<td align="left">
|
|
<p class="tent">\ddd</p>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
|
|
<p>The escape sequence <tt>"\ddd"</tt> consists of backslash followed by one, two, or three octal digits, which shall be taken to
|
|
specify the value of the desired character. If the character following a backslash is not one of those specified, the backslash
|
|
shall be ignored.</p>
|
|
|
|
<p>Backslash ( <tt>'\'</tt> ) followed by a <newline> is also used to continue a string on the following line. Thus, the
|
|
following two lines describe a single message string:</p>
|
|
|
|
<pre>
|
|
<tt>1 This line continues \
|
|
to the next line
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>which shall be equivalent to:</p>
|
|
|
|
<pre>
|
|
<tt>1 This line continues to the next line
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following exit values shall be returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>Successful completion.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_59_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>Message catalogs produced by <i>gencat</i> are binary encoded, meaning that their portability cannot be guaranteed between
|
|
different types of machine. Thus, just as C programs need to be recompiled for each type of machine, so message catalogs must be
|
|
recreated via <i>gencat</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="iconv.html"><i>iconv</i>()</a> , the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/limits.h.html"><i><limits.h></i></a>, <a href="../basedefs/nl_types.h.html"><i><nl_types.h></i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 3.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_59_22"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The normative text is reworded to avoid use of the term "must" for application requirements.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® 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>
|
|
|