Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
gencat.html (15233B)
1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved --> 2 <!DOCTYPE HTML> 3 <html lang="en"> 4 <head> 5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0"> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 --> 8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved --> 9 <title>gencat</title> 10 </head> 11 <body bgcolor="white"> 12 <div class="NAVHEADER"> 13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 14 <tr class="nav"> 15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/fuser.html" accesskey="P"><<< 16 Previous</a></td> 17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/get.html" accesskey="N">Next >>></a></td> 19 </tr> 20 </table> 21 <hr align="left" width="100%"></div> 22 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> 23 <center><font size="2">The Open Group Base Specifications Issue 8<br> 24 IEEE Std 1003.1-2024<br> 25 Copyright © 2001-2024 The IEEE and The Open Group</font></center> 26 <hr size="2" noshade> 27 <a name="top" id="top"></a> <a name="gencat" id="gencat"></a> <a name="tag_20_50" id="tag_20_50"></a><!-- gencat --> 28 <h4 class="mansect"><a name="tag_20_50_01" id="tag_20_50_01"></a>NAME</h4> 29 <blockquote>gencat — generate a formatted message catalog</blockquote> 30 <h4 class="mansect"><a name="tag_20_50_02" id="tag_20_50_02"></a>SYNOPSIS</h4> 31 <blockquote class="synopsis"> 32 <p><code><tt>gencat</tt> <i>catfile msgfile</i><tt>...</tt></code></p> 33 </blockquote> 34 <h4 class="mansect"><a name="tag_20_50_03" id="tag_20_50_03"></a>DESCRIPTION</h4> 35 <blockquote> 36 <p>The <i>gencat</i> utility shall merge the message text source file <i>msgfile</i> into a formatted message catalog 37 <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 38 shall be included in the new <i>catfile</i>. If set and message numbers collide, the new message text defined in <i>msgfile</i> 39 shall replace the old message text currently contained in <i>catfile</i>.</p> 40 </blockquote> 41 <h4 class="mansect"><a name="tag_20_50_04" id="tag_20_50_04"></a>OPTIONS</h4> 42 <blockquote> 43 <p>None.</p> 44 </blockquote> 45 <h4 class="mansect"><a name="tag_20_50_05" id="tag_20_50_05"></a>OPERANDS</h4> 46 <blockquote> 47 <p>The following operands shall be supported:</p> 48 <dl compact> 49 <dd></dd> 50 <dt><i>catfile</i></dt> 51 <dd>A pathname of the formatted message catalog. If <tt>'-'</tt> is specified, standard output shall be used. The format of the 52 message catalog produced is unspecified.</dd> 53 <dt><i>msgfile</i></dt> 54 <dd>A pathname of a message text source file. If <tt>'-'</tt> is specified for an instance of <i>msgfile</i>, standard input shall 55 be used. The format of message text source files is defined in the EXTENDED DESCRIPTION section.</dd> 56 </dl> 57 </blockquote> 58 <h4 class="mansect"><a name="tag_20_50_06" id="tag_20_50_06"></a>STDIN</h4> 59 <blockquote> 60 <p>The standard input shall not be used unless a <i>msgfile</i> operand is specified as <tt>'-'</tt>.</p> 61 </blockquote> 62 <h4 class="mansect"><a name="tag_20_50_07" id="tag_20_50_07"></a>INPUT FILES</h4> 63 <blockquote> 64 <p>The input files shall be text files.</p> 65 </blockquote> 66 <h4 class="mansect"><a name="tag_20_50_08" id="tag_20_50_08"></a>ENVIRONMENT VARIABLES</h4> 67 <blockquote> 68 <p>The following environment variables shall affect the execution of <i>gencat</i>:</p> 69 <dl compact> 70 <dd></dd> 71 <dt><i>LANG</i></dt> 72 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 73 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 74 variables used to determine the values of locale categories.)</dd> 75 <dt><i>LC_ALL</i></dt> 76 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 77 <dt><i>LC_CTYPE</i></dt> 78 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 79 opposed to multi-byte characters in arguments and input files).</dd> 80 <dt><i>LC_MESSAGES</i></dt> 81 <dd><br> 82 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 83 <dt><i>NLSPATH</i></dt> 84 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 85 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 86 "0"></dd> 87 </dl> 88 </blockquote> 89 <h4 class="mansect"><a name="tag_20_50_09" id="tag_20_50_09"></a>ASYNCHRONOUS EVENTS</h4> 90 <blockquote> 91 <p>Default.</p> 92 </blockquote> 93 <h4 class="mansect"><a name="tag_20_50_10" id="tag_20_50_10"></a>STDOUT</h4> 94 <blockquote> 95 <p>The standard output shall not be used unless the <i>catfile</i> operand is specified as <tt>'-'</tt>.</p> 96 </blockquote> 97 <h4 class="mansect"><a name="tag_20_50_11" id="tag_20_50_11"></a>STDERR</h4> 98 <blockquote> 99 <p>The standard error shall be used only for diagnostic messages.</p> 100 </blockquote> 101 <h4 class="mansect"><a name="tag_20_50_12" id="tag_20_50_12"></a>OUTPUT FILES</h4> 102 <blockquote> 103 <p>None.</p> 104 </blockquote> 105 <h4 class="mansect"><a name="tag_20_50_13" id="tag_20_50_13"></a>EXTENDED DESCRIPTION</h4> 106 <blockquote> 107 <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 108 are separated by a single <blank> character. Any other <blank> characters are considered to be part of the subsequent 109 field.</p> 110 <dl compact> 111 <dd></dd> 112 <dt><b>$set </b><i>n comment</i></dt> 113 <dd><br> 114 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> 115 denotes the set identifier, which is defined as a number in the range [1, {NL_SETMAX}] (see the <a href= 116 "../basedefs/limits.h.html"><i><limits.h></i></a> header defined in the Base Definitions volume of POSIX.1-2024). The 117 application shall ensure that set identifiers are presented in ascending order within a single source file, but need not be 118 contiguous. Any string following the set identifier shall be treated as a comment. If no <b>$set</b> directive is specified in a 119 message text source file, all messages shall be located in an implementation-defined default message set NL_SETD (see the <a href= 120 "../basedefs/nl_types.h.html"><i><nl_types.h></i></a> header defined in the Base Definitions volume of POSIX.1-2024).</dd> 121 <dt><b>$delset </b><i>n comment</i></dt> 122 <dd><br> 123 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 124 string following the set number shall be treated as a comment.</dd> 125 <dt><b>$ </b><i>comment</i></dt> 126 <dd>A line beginning with <tt>'$'</tt> followed by a <blank> shall be treated as a comment.</dd> 127 <dt><i>m message-text</i></dt> 128 <dd><br> 129 The <i>m</i> denotes the message identifier, which is defined as a number in the range [1, {NL_MSGMAX}] (see the <a href= 130 "../basedefs/limits.h.html"><i><limits.h></i></a> header). The <i>message-text</i> shall be stored in the message catalog 131 with the set identifier specified by the last <b>$set</b> directive, and with message identifier <i>m</i>. If the 132 <i>message-text</i> is empty, and a <blank> field separator is present, an empty string shall be stored in the message 133 catalog. If a message source line has a message number, but neither a field separator nor <i>message-text</i>, the existing message 134 with that number (if any) shall be deleted from the catalog. The application shall ensure that message identifiers are in ascending 135 order within a single set, but need not be contiguous. The application shall ensure that the length of <i>message-text</i> is in 136 the range [0, {NL_TEXTMAX}] (see the <a href="../basedefs/limits.h.html"><i><limits.h></i></a> header).</dd> 137 <dt><b>$quote </b><i>c</i></dt> 138 <dd>This line specifies an optional quote character <i>c</i>, which can be used to surround <i>message-text</i> so that trailing 139 <space> characters or null (empty) messages are visible in a message source line. By default, or if an empty <b>$quote</b> 140 directive is supplied, no quoting of <i>message-text</i> shall be recognized.</dd> 141 </dl> 142 <p>Empty lines in a message text source file shall be ignored. The effects of lines starting with any character other than those 143 defined above are implementation-defined.</p> 144 <p>Text strings can contain the special characters and escape sequences defined in the following table:</p> 145 <center> 146 <table border="1" cellpadding="3" align="center"> 147 <tr valign="top"> 148 <th align="center"> 149 <p class="tent"><b>Description</b></p> 150 </th> 151 <th align="center"> 152 <p class="tent"><b>Symbol</b></p> 153 </th> 154 <th align="center"> 155 <p class="tent"><b>Sequence</b></p> 156 </th> 157 </tr> 158 <tr valign="top"> 159 <td align="left"> 160 <p class="tent"><newline></p> 161 </td> 162 <td align="left"> 163 <p class="tent">NL(LF)</p> 164 </td> 165 <td align="left"> 166 <p class="tent">\n</p> 167 </td> 168 </tr> 169 <tr valign="top"> 170 <td align="left"> 171 <p class="tent">Horizontal-tab</p> 172 </td> 173 <td align="left"> 174 <p class="tent">HT</p> 175 </td> 176 <td align="left"> 177 <p class="tent">\t</p> 178 </td> 179 </tr> 180 <tr valign="top"> 181 <td align="left"> 182 <p class="tent"><vertical-tab></p> 183 </td> 184 <td align="left"> 185 <p class="tent">VT</p> 186 </td> 187 <td align="left"> 188 <p class="tent">\v</p> 189 </td> 190 </tr> 191 <tr valign="top"> 192 <td align="left"> 193 <p class="tent"><backspace></p> 194 </td> 195 <td align="left"> 196 <p class="tent">BS</p> 197 </td> 198 <td align="left"> 199 <p class="tent">\b</p> 200 </td> 201 </tr> 202 <tr valign="top"> 203 <td align="left"> 204 <p class="tent"><carriage-return></p> 205 </td> 206 <td align="left"> 207 <p class="tent">CR</p> 208 </td> 209 <td align="left"> 210 <p class="tent">\r</p> 211 </td> 212 </tr> 213 <tr valign="top"> 214 <td align="left"> 215 <p class="tent"><form-feed></p> 216 </td> 217 <td align="left"> 218 <p class="tent">FF</p> 219 </td> 220 <td align="left"> 221 <p class="tent">\f</p> 222 </td> 223 </tr> 224 <tr valign="top"> 225 <td align="left"> 226 <p class="tent">Backslash</p> 227 </td> 228 <td align="left"> 229 <p class="tent"><tt>\</tt></p> 230 </td> 231 <td align="left"> 232 <p class="tent">\\</p> 233 </td> 234 </tr> 235 <tr valign="top"> 236 <td align="left"> 237 <p class="tent">Bit pattern</p> 238 </td> 239 <td align="left"> 240 <p class="tent"><tt>ddd</tt></p> 241 </td> 242 <td align="left"> 243 <p class="tent">\ddd</p> 244 </td> 245 </tr> 246 </table> 247 </center> 248 <p class="tent">The escape sequence <tt>"\ddd"</tt> consists of <backslash> followed by one, two, or three octal digits, 249 which shall be taken to specify the value of the desired character. If the character following a <backslash> is not one of 250 those specified, the <backslash> shall be ignored.</p> 251 <p class="tent">A <backslash> followed by a <newline> is also used to continue a string on the following line. Thus, 252 the following two lines describe a single message string:</p> 253 <pre> 254 <tt>1 This line continues \ 255 to the next line 256 </tt></pre> 257 <p class="tent">which shall be equivalent to:</p> 258 <pre> 259 <tt>1 This line continues to the next line 260 </tt></pre></blockquote> 261 <h4 class="mansect"><a name="tag_20_50_14" id="tag_20_50_14"></a>EXIT STATUS</h4> 262 <blockquote> 263 <p>The following exit values shall be returned:</p> 264 <dl compact> 265 <dd></dd> 266 <dt> 0</dt> 267 <dd>Successful completion.</dd> 268 <dt>>0</dt> 269 <dd>An error occurred.</dd> 270 </dl> 271 </blockquote> 272 <h4 class="mansect"><a name="tag_20_50_15" id="tag_20_50_15"></a>CONSEQUENCES OF ERRORS</h4> 273 <blockquote> 274 <p>Default.</p> 275 </blockquote> 276 <hr> 277 <div class="box"><em>The following sections are informative.</em></div> 278 <h4 class="mansect"><a name="tag_20_50_16" id="tag_20_50_16"></a>APPLICATION USAGE</h4> 279 <blockquote> 280 <p>Message catalogs produced by <i>gencat</i> are binary encoded, meaning that their portability cannot be guaranteed between 281 different types of machine. Thus, just as C programs need to be recompiled for each type of machine, so message catalogs must be 282 recreated via <i>gencat</i>.</p> 283 </blockquote> 284 <h4 class="mansect"><a name="tag_20_50_17" id="tag_20_50_17"></a>EXAMPLES</h4> 285 <blockquote> 286 <p>None.</p> 287 </blockquote> 288 <h4 class="mansect"><a name="tag_20_50_18" id="tag_20_50_18"></a>RATIONALE</h4> 289 <blockquote> 290 <p>None.</p> 291 </blockquote> 292 <h4 class="mansect"><a name="tag_20_50_19" id="tag_20_50_19"></a>FUTURE DIRECTIONS</h4> 293 <blockquote> 294 <p>None.</p> 295 </blockquote> 296 <h4 class="mansect"><a name="tag_20_50_20" id="tag_20_50_20"></a>SEE ALSO</h4> 297 <blockquote> 298 <p><a href="../utilities/iconv.html#tag_20_58"><i>iconv</i></a></p> 299 <p class="tent">XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 300 "../basedefs/limits.h.html"><i><limits.h></i></a> , <a href="../basedefs/nl_types.h.html"><i><nl_types.h></i></a></p> 301 </blockquote> 302 <h4 class="mansect"><a name="tag_20_50_21" id="tag_20_50_21"></a>CHANGE HISTORY</h4> 303 <blockquote> 304 <p>First released in Issue 3.</p> 305 </blockquote> 306 <h4 class="mansect"><a name="tag_20_50_22" id="tag_20_50_22"></a>Issue 6</h4> 307 <blockquote> 308 <p>The normative text is reworded to avoid use of the term "must" for application requirements.</p> 309 </blockquote> 310 <h4 class="mansect"><a name="tag_20_50_23" id="tag_20_50_23"></a>Issue 7</h4> 311 <blockquote> 312 <p>The <i>gencat</i> utility is moved from the XSI option to the Base.</p> 313 </blockquote> 314 <h4 class="mansect"><a name="tag_20_50_24" id="tag_20_50_24"></a>Issue 8</h4> 315 <blockquote> 316 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 317 <p class="tent">Austin Group Defect 1463 is applied, changing <i>n</i> to <i>c</i> in the definition of <b>$quote</b>.</p> 318 <p class="tent">Austin Group Defect 1516 is applied, adding XSI shading to text relating to <i>NLSPATH .</i></p> 319 </blockquote> 320 <div class="box"><em>End of informative text.</em></div> 321 <hr> 322 <p> </p> 323 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 324 <hr size="2" noshade> 325 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 326 POSIX™ is a Trademark of The IEEE.<br> 327 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 328 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 329 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 330 ]</font></center> 331 <hr size="2" noshade> 332 <div class="NAVHEADER"> 333 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 334 <tr class="nav"> 335 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/fuser.html" accesskey="P"><<< 336 Previous</a></td> 337 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 338 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/get.html" accesskey="N">Next >>></a></td> 339 </tr> 340 </table> 341 <hr align="left" width="100%"></div> 342 </body> 343 </html>