xref: /freebsd/usr.bin/gencat/gencat.1 (revision 4f8f43b06ed07e96a250855488cc531799d5b78f)
1.\"	$OpenBSD: gencat.1,v 1.3 1997/06/11 15:39:54 kstailey Exp $
2.\"
3.\" Copyright (c) 1997 Ken Stailey
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. The name of the author may not be used to endorse or promote products
14.\"    derived from this software without specific prior written permission
15.\"
16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26.\"
27.Dd June 11, 1997
28.Dt GENCAT 1
29.Os
30.Sh NAME
31.Nm gencat
32.Nd NLS catalog compiler
33.Sh SYNOPSIS
34.Nm
35.Ar "output-file"
36.Ar "input-files..."
37.Sh DESCRIPTION
38The
39.Nm
40utility merges the text NLS input files
41.Ar "input-files..."
42into a formatted message catalog file
43.Ar "output-file" .
44The file
45.Ar "output-file"
46will be created if it does not already exist.
47If
48.Ar "output-file"
49does exist, its messages will be included in the new
50.Ar "output-file" .
51If set and message numbers collide, the new message text defined in
52.Ar "input-files..."
53will replace the old message text currently contained in
54.Ar "output-file" .
55.Sh INPUT FILES
56The format of a message text source file is defined below.
57Note that
58the fields of a message text source line are separated by a single space
59character: any other space characters are considered to be part of the
60field contents.
61.Bl -tag -width 3n
62.It Li $set Ar n comment
63This line specifies the set identifier of the following messages until
64the next
65.Li $set
66or end-of-file appears.
67The argument
68.Ar n
69is the set identifier which is defined as a number in the range
70[1, (NL_SETMAX)].
71Set identifiers must occur in ascending order within
72a single source file, but need not be contiguous.
73Any string following
74a space following the set identifier is treated as a comment.
75If no
76.Li $set
77directive is specified in a given source file, all messages will
78be located in the default message set NL_SETD.
79.It Li $del Ar n comment
80This line deletes messages from set
81.Ar n
82from a message catalog.
83The
84.Ar n
85specifies a set number.
86Any string following a space following the set
87number is treated as a comment.
88.It Li $ Ar comment
89A line beginning with
90.Li $
91followed by a space is treated as a comment.
92.It Ar m message-text
93A message line consists of a message identifier
94.Ar m
95in the range [1, (NL_MSGMAX)].
96The
97.Ar message-text
98is stored in the message catalog with the set identifier specified by
99the last
100.Li $set
101directive, and the message identifier
102.Ar m .
103If the
104.Ar message-text
105is empty, and there is a space character following the message identifier,
106an empty string is stored in the message catalog.
107If the
108.Ar message-text
109is empty, and if there is no space character following the message
110identifier, then the existing message in the current set with the
111specified message identifier is deleted from the catalog.
112Message
113identifiers must be in ascending order within a single set, but
114need not be contiguous.
115The
116.Ar message-text
117length must be in the range [0, (NL_TEXTMAX)].
118.It Li $quote Ar c
119This line specifies an optional quote character
120.Ar c
121which can be used to surround
122.Ar message-text
123so that trailing space or empty messages are visible in message
124source files.
125By default, or if an empty
126.Li $quote
127directive is specified, no quoting of
128.Ar message-text
129will be recognized.
130.El
131.Pp
132Empty lines in message source files are ignored.
133The effect of lines
134beginning with any character other than those described above is
135undefined.
136.Pp
137Text strings can contain the following special characters and escape
138sequences.
139In addition, if a quote character is defined, it may be
140escaped as well to embed a literal quote character.
141.Pp
142.Bl -tag -width "\eooo" -offset indent -compact
143.It Li \en
144line feed
145.It Li \et
146horizontal tab
147.It Li \ev
148vertical tab
149.It Li \eb
150backspace
151.It Li \er
152carriage return
153.It Li \ef
154form feed
155.It Li \e\e
156backslash
157.It Li \eooo
158octal number in the range [000, 377]
159.El
160.Pp
161A backslash character immediately before the end of the line in a file
162is used to continue the line onto the next line, e.g.:
163.Pp
164.Dl 1 This line is continued \e
165.Dl on this line.
166.Pp
167If the character following the backslash is not one of those specified,
168the backslash is ignored.
169.Sh EXIT STATUS
170.Ex -std
171.Sh SEE ALSO
172.Xr catclose 3 ,
173.Xr catgets 3 ,
174.Xr catopen 3
175.Sh STANDARDS
176The
177.Nm
178utility is compliant with the
179.St -xpg4
180standard.
181.Sh AUTHORS
182.An -nosplit
183This manual page was originally written by
184.An Ken Stailey
185and later revised by
186.An Terry Lambert .
187.Sh BUGS
188A message catalog file created from a blank input file cannot be revised;
189it must be deleted and recreated.
190