1gencat(1) User Commands gencat(1)
2
3
4
6 gencat - generate a formatted message catalog
7
9 gencat catfile msgfile...
10
11
13 The gencat command merges the message text source file(s) msgfile into
14 a formatted message database catfile. The database catfile is created
15 if it does not already exist. If catfile does exist, its messages are
16 included in the new catfile. If set and message numbers collide, the
17 new message-text defined in msgfile replaces the old message text cur‐
18 rently contained in catfile. The message text source file (or set of
19 files) input to gencat can contain either set and message numbers or
20 simply message numbers, in which case the set NL_SETD (see
21 nl_types.h(3HEAD)) is assumed.
22
23 Message Text Source File Format
24 The format of a message text source file is defined as follows. Note
25 that the fields of a message text source line are separated by a single
26 ASCII space or tab character. Any other ASCII spaces or tabs are con‐
27 sidered as part of the subsequent field.
28
29 $set n comment Where n specifies the set identifier of the fol‐
30 lowing messages until the next $set, $delset, or
31 end-of-file appears. n must be a number in the
32 range (1-{NL_SETMAX}). Set identifiers within a
33 single source file need not be contiguous. Any
34 string following the set identifier is treated as
35 a comment. If no $set directive is specified in
36 a message text source file, all messages are
37 located in the default message set NL_SETD.
38
39
40 $delset n comment Deletes message set n from an existing message
41 catalog. Any string following the set number is
42 treated as a comment. (Note: if n is not a valid
43 set it is ignored.)
44
45
46 $comment A line beginning with a dollar symbol $ followed
47 by an ASCII space or tab character is treated as
48 a comment.
49
50
51 m message-text The m denotes the message identifier, a number in
52 the range (1-{NL_MSGMAX}). The message-text is
53 stored in the message catalog with the set iden‐
54 tifier specified by the last $set directive, and
55 with message identifier m. If the message-text is
56 empty, and an ASCII space or tab field separator
57 is present, an empty string is stored in the mes‐
58 sage catalog. If a message source line has a
59 message number, but neither a field separator nor
60 message-text, the existing message with that num‐
61 ber (if any) is deleted from the catalog. Message
62 identifiers need not be contiguous. The length
63 of message-text must be in the range
64 (0-{NL_TEXTMAX}).
65
66
67 $quote c This line specifies an optional quote character
68 c, which can be used to surround message-text so
69 that trailing spaces or null (empty) messages are
70 visible in a message source line. By default, or
71 if an empty $quote directive is supplied, no
72 quoting of message-text will be recognized.
73
74
75
76 Empty lines in a message text source file are ignored.
77
78
79 Text strings can contain the special characters and escape sequences
80 defined in the following table:
81
82
83
84
85 ┌──────────────────────────────────────────────────────────────┐
86 │Description Symbol Sequence │
87 │newline NL(LF) \n │
88 │horizontal tab HT \t │
89 │vertical tab VT \v │
90 │backspace BS \b │
91 │carriage return CR \r │
92 │form feed FF \f │
93 │backslash \ \\ │
94 │bit pattern ddd \ddd │
95 └──────────────────────────────────────────────────────────────┘
96
97
98 The escape sequence \ddd consists of backslash followed by 1, 2 or 3
99 octal digits, which are taken to specify the value of the desired char‐
100 acter. If the character following a backslash is not one of those spec‐
101 ified, the backslash is ignored.
102
103
104 Backslash followed by an ASCII newline character is also used to con‐
105 tinue a string on the following line. Thus, the following two lines
106 describe a single message string:
107
108 1 This line continues \
109 to the next line
110
111
112
113 which is equivalent to:
114
115 1 This line continues to the next line
116
117
119 The following operands are supported:
120
121 catfile A path name of the formatted message catalog. If − is spec‐
122 ified, standard output is used.
123
124
125 msgfile A path name of a message text source file. If − is speci‐
126 fied for an instance of msgfile, standard input is used.
127 The format of message text source files is defined in Mes‐
128 sage Text Source File Format.
129
130
132 See environ(5) for descriptions of the following environment variables
133 that affect the execution of gencat: LANG, LC_ALL, LC_CTYPE, LC_MES‐
134 SAGES, and NLSPATH.
135
137 The following exit values are returned:
138
139 0 Successful completion.
140
141
142 >0 An error occurred.
143
144
146 See attributes(5) for descriptions of the following attributes:
147
148
149
150
151 ┌─────────────────────────────┬─────────────────────────────┐
152 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
153 ├─────────────────────────────┼─────────────────────────────┤
154 │Availability │SUNWloc │
155 ├─────────────────────────────┼─────────────────────────────┤
156 │CSI │enabled │
157 ├─────────────────────────────┼─────────────────────────────┤
158 │Interface Stability │Standard │
159 └─────────────────────────────┴─────────────────────────────┘
160
162 mkmsgs(1), catgets(3C), catopen(3C), gettxt(3C), nl_types.h(3HEAD),
163 attributes(5), environ(5), standards(5)
164
165
166
167SunOS 5.11 1 Feb 1995 gencat(1)