logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

gencat.1p (8291B)


  1. '\" et
  2. .TH GENCAT "1P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. gencat
  12. \(em generate a formatted message catalog
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. gencat \fIcatfile msgfile\fR...
  17. .fi
  18. .SH DESCRIPTION
  19. The
  20. .IR gencat
  21. utility shall merge the message text source file
  22. .IR msgfile
  23. into a formatted message catalog
  24. .IR catfile .
  25. The file
  26. .IR catfile
  27. shall be created if it does not already exist. If
  28. .IR catfile
  29. does exist, its messages shall be included in the new
  30. .IR catfile .
  31. If set and message numbers collide, the new message text defined in
  32. .IR msgfile
  33. shall replace the old message text currently contained in
  34. .IR catfile .
  35. .SH OPTIONS
  36. None.
  37. .SH OPERANDS
  38. The following operands shall be supported:
  39. .IP "\fIcatfile\fR" 10
  40. A pathname of the formatted message catalog. If
  41. .BR '\-'
  42. is specified, standard output shall be used. The format of the message
  43. catalog produced is unspecified.
  44. .IP "\fImsgfile\fR" 10
  45. A pathname of a message text source file. If
  46. .BR '\-'
  47. is specified for an instance of
  48. .IR msgfile ,
  49. standard input shall be used. The format of message text source files
  50. is defined in the EXTENDED DESCRIPTION section.
  51. .SH STDIN
  52. The standard input shall not be used unless a
  53. .IR msgfile
  54. operand is specified as
  55. .BR '\-' .
  56. .SH "INPUT FILES"
  57. The input files shall be text files.
  58. .SH "ENVIRONMENT VARIABLES"
  59. The following environment variables shall affect the execution of
  60. .IR gencat :
  61. .IP "\fILANG\fP" 10
  62. Provide a default value for the internationalization variables that are
  63. unset or null. (See the Base Definitions volume of POSIX.1\(hy2017,
  64. .IR "Section 8.2" ", " "Internationalization Variables"
  65. for the precedence of internationalization variables used to determine
  66. the values of locale categories.)
  67. .IP "\fILC_ALL\fP" 10
  68. If set to a non-empty string value, override the values of all the
  69. other internationalization variables.
  70. .IP "\fILC_CTYPE\fP" 10
  71. Determine the locale for the interpretation of sequences of bytes of
  72. text data as characters (for example, single-byte as opposed to
  73. multi-byte characters in arguments and input files).
  74. .IP "\fILC_MESSAGES\fP" 10
  75. .br
  76. Determine the locale that should be used to affect the format and
  77. contents of diagnostic messages written to standard error.
  78. .IP "\fINLSPATH\fP" 10
  79. Determine the location of message catalogs for the processing of
  80. .IR LC_MESSAGES .
  81. .SH "ASYNCHRONOUS EVENTS"
  82. Default.
  83. .SH STDOUT
  84. The standard output shall not be used unless the
  85. .IR catfile
  86. operand is specified as
  87. .BR '\-' .
  88. .SH STDERR
  89. The standard error shall be used only for diagnostic messages.
  90. .SH "OUTPUT FILES"
  91. None.
  92. .SH "EXTENDED DESCRIPTION"
  93. The content of a message text file shall be in the format defined as
  94. follows. Note that the fields of a message text source line are
  95. separated by a single
  96. <blank>
  97. character. Any other
  98. <blank>
  99. characters are considered to be part of the subsequent field.
  100. .IP "\fB$set\ \fIn\ comment\fR" 10
  101. .br
  102. This line specifies the set identifier of the following messages until
  103. the next
  104. .BR $set
  105. or end-of-file appears. The
  106. .IR n
  107. denotes the set identifier, which is defined as a number in the range
  108. [1,
  109. {NL_SETMAX}]
  110. (see the
  111. .IR <limits.h>
  112. header defined in the Base Definitions volume of POSIX.1\(hy2017). The application shall ensure that set
  113. identifiers are presented in ascending order within a single source
  114. file, but need not be contiguous. Any string following the set
  115. identifier shall be treated as a comment. If no
  116. .BR $set
  117. directive is specified in a message text source file, all messages
  118. shall be located in an implementation-defined default message set
  119. NL_SETD (see the
  120. .IR <nl_types.h>
  121. header defined in the Base Definitions volume of POSIX.1\(hy2017).
  122. .IP "\fB$delset\ \fIn\ comment\fR" 10
  123. .br
  124. This line deletes message set
  125. .IR n
  126. from an existing message catalog. The
  127. .IR n
  128. denotes the set number [1,
  129. {NL_SETMAX}].
  130. Any string following the set number shall be treated as a comment.
  131. .IP "\fB$\ \fIcomment\fR" 10
  132. A line beginning with
  133. .BR '$'
  134. followed by a
  135. <blank>
  136. shall be treated as a comment.
  137. .IP "\fIm\ message-text\fR" 10
  138. .br
  139. The
  140. .IR m
  141. denotes the message identifier, which is defined as a number in the
  142. range [1,
  143. {NL_MSGMAX}]
  144. (see the
  145. .IR <limits.h>
  146. header). The
  147. .IR message-text
  148. shall be stored in the message catalog with the set identifier
  149. specified by the last
  150. .BR $set
  151. directive, and with message identifier
  152. .IR m .
  153. If the
  154. .IR message-text
  155. is empty, and a
  156. <blank>
  157. field separator is present, an empty string shall be stored
  158. in the message catalog. If a message source line has a message number,
  159. but neither a field separator nor
  160. .IR message-text ,
  161. the existing message with that number (if any) shall be deleted from
  162. the catalog. The application shall ensure that message identifiers are
  163. in ascending order within a single set, but need not be contiguous. The
  164. application shall ensure that the length of
  165. .IR message-text
  166. is in the range [0,
  167. {NL_TEXTMAX}]
  168. (see the
  169. .IR <limits.h>
  170. header).
  171. .IP "\fB$quote\ \fIn\fR" 10
  172. This line specifies an optional quote character
  173. .IR c ,
  174. which can be used to surround
  175. .IR message-text
  176. so that trailing
  177. <space>
  178. characters or null (empty) messages are visible in a message source
  179. line. By default, or if an empty
  180. .BR $quote
  181. directive is supplied, no quoting of
  182. .IR message-text
  183. shall be recognized.
  184. .P
  185. Empty lines in a message text source file shall be ignored. The
  186. effects of lines starting with any character other than those defined
  187. above are implementation-defined.
  188. .P
  189. Text strings can contain the special characters and escape sequences
  190. defined in the following table:
  191. .TS
  192. center tab(@) box;
  193. cB | cB | cB
  194. l | l | lf5.
  195. Description@Symbol@Sequence
  196. _
  197. <newline>@NL(LF)@\en
  198. Horizontal-tab@HT@\et
  199. <vertical-tab>@VT@\ev
  200. <backspace>@BS@\eb
  201. <carriage-return>@CR@\er
  202. <form-feed>@FF@\ef
  203. Backslash@\fR\e\fP@\e\e
  204. Bit pattern@\fRddd\fP@\eddd
  205. .TE
  206. .P
  207. The escape sequence
  208. .BR \(dq\eddd\(dq
  209. consists of
  210. <backslash>
  211. followed by one, two, or three octal digits, which shall be taken to
  212. specify the value of the desired character. If the character following a
  213. <backslash>
  214. is not one of those specified, the
  215. <backslash>
  216. shall be ignored.
  217. .P
  218. A
  219. <backslash>
  220. followed by a
  221. <newline>
  222. is also used to continue a string on the following line. Thus, the
  223. following two lines describe a single message string:
  224. .sp
  225. .RS 4
  226. .nf
  227. 1 This line continues \e
  228. to the next line
  229. .fi
  230. .P
  231. .RE
  232. .P
  233. which shall be equivalent to:
  234. .sp
  235. .RS 4
  236. .nf
  237. 1 This line continues to the next line
  238. .fi
  239. .P
  240. .RE
  241. .SH "EXIT STATUS"
  242. The following exit values shall be returned:
  243. .IP "\00" 6
  244. Successful completion.
  245. .IP >0 6
  246. An error occurred.
  247. .SH "CONSEQUENCES OF ERRORS"
  248. Default.
  249. .LP
  250. .IR "The following sections are informative."
  251. .SH "APPLICATION USAGE"
  252. Message catalogs produced by
  253. .IR gencat
  254. are binary encoded, meaning that their portability cannot be guaranteed
  255. between different types of machine. Thus, just as C programs need to
  256. be recompiled for each type of machine, so message catalogs must be
  257. recreated via
  258. .IR gencat .
  259. .SH EXAMPLES
  260. None.
  261. .SH RATIONALE
  262. None.
  263. .SH "FUTURE DIRECTIONS"
  264. None.
  265. .SH "SEE ALSO"
  266. .IR "\fIiconv\fR\^"
  267. .P
  268. The Base Definitions volume of POSIX.1\(hy2017,
  269. .IR "Chapter 8" ", " "Environment Variables",
  270. .IR "\fB<limits.h>\fP",
  271. .IR "\fB<nl_types.h>\fP"
  272. .\"
  273. .SH COPYRIGHT
  274. Portions of this text are reprinted and reproduced in electronic form
  275. from IEEE Std 1003.1-2017, Standard for Information Technology
  276. -- Portable Operating System Interface (POSIX), The Open Group Base
  277. Specifications Issue 7, 2018 Edition,
  278. Copyright (C) 2018 by the Institute of
  279. Electrical and Electronics Engineers, Inc and The Open Group.
  280. In the event of any discrepancy between this version and the original IEEE and
  281. The Open Group Standard, the original IEEE and The Open Group Standard
  282. is the referee document. The original Standard can be obtained online at
  283. http://www.opengroup.org/unix/online.html .
  284. .PP
  285. Any typographical or formatting errors that appear
  286. in this page are most likely
  287. to have been introduced during the conversion of the source files to
  288. man page format. To report such errors, see
  289. https://www.kernel.org/doc/man-pages/reporting_bugs.html .