Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / gencat / gencat.1
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 .\" $FreeBSD: src/usr.bin/gencat/gencat.1,v 1.4.2.5 2001/12/14 15:53:30 ru Exp $
28 .\" $DragonFly: src/usr.bin/gencat/gencat.1,v 1.2 2003/06/17 04:29:27 dillon Exp $
29 .\"
30 .Dd June 11, 1997
31 .Dt GENCAT 1
32 .Os
33 .Sh NAME
34 .Nm gencat
35 .Nd NLS catalog compiler
36 .Sh SYNOPSIS
37 .Nm
38 .Ar "output-file"
39 .Ar "input-files..."
40 .Sh DESCRIPTION
41 The
42 .Nm
43 utility merges the text NLS input files
44 .Ar "input-files..."
45 into a formatted message catalog file
46 .Ar "output-file" .
47 The file
48 .Ar "output-file"
49 will be created if it does not already exist.  If
50 .Ar "output-file"
51 does exist, its messages will be included in the new
52 .Ar "output-file" .
53 If set and message numbers collide, the new message text defined in
54 .Ar "input-files..."
55 will replace the old message text currently contained in
56 .Ar "output-file" .
57 .Sh INPUT FILES
58 The format of a message text source file is defined below.  Note that
59 the fields of a message text source line are separated by a single space
60 character: any other space characters are considered to be part of the
61 field contents.
62 .Pp
63 .Bl -tag -width 3n
64 .It Li $set Ar n comment
65 This line specifies the set identifier of the following messages until
66 the next
67 .Li $set
68 or end-of-file appears.  The argument
69 .Ar n
70 is the set identifier which is defined as a number in the range
71 [1, (NL_SETMAX)].  Set identifiers must occur in ascending order within
72 a single source file, but need not be contiguous.  Any string following
73 a space following the set identifier is treated as a comment.  If no
74 .Li $set
75 directive  is specified in a given source file, all messages will
76 be located in the default message set NL_SETD.
77 .It Li $del Ar n comment
78 This line deletes messages from set
79 .Ar n
80 from a message catalog.  The
81 .Ar n
82 specifies a set number.  Any string following a space following the set
83 number is treated as a comment.
84 .It Li $ Ar comment
85 A line beginning with
86 .Li $
87 followed by a space is treated as a comment.
88 .It Ar m message-text
89 A message line consists of a message identifier
90 .Ar m
91 in the range [1, (NL_MSGMAX)].  The
92 .Ar message-text
93 is stored in the message catalog with the set identifier specified by
94 the last
95 .Li $set
96 directive, and the message identifier
97 .Ar m .
98 If the
99 .Ar message-text
100 is empty, and there is a space character following the message identifier,
101 an empty string is stored in the message catalog.  If the
102 .Ar message-text
103 is empty, and if there is no space character following the message
104 identifier, then the existing message in the current set with the
105 specified message identifier is deleted from the catalog.  Message
106 identifiers must be in ascending order within a single set, but
107 need not be contiguous.  The
108 .Ar message-text
109 length must be in the range [0, (NL_TEXTMAX)].
110 .It Li $quote Ar c
111 This line specifies an optional quote character
112 .Ar c
113 which can be used to surround
114 .Ar message-text
115 so that trailing space or empty messages are visible in message
116 source files.  By default, or if an empty
117 .Li $quote
118 directive is specified, no quoting of
119 .Ar message-text
120 will be recognized.
121 .El
122 .Pp
123 Empty lines in message source files are ignored.  The effect of lines
124 beginning with any character other than those described above is
125 undefined.
126 .Pp
127 Text strings can contain the following special characters and escape
128 sequences.  In addition, if a quote character is defined, it may be
129 escaped as well to embed a literal quote character.
130 .Pp
131 .Bl -tag -width "\eooo" -offset indent -compact
132 .It Li \en
133 line feed
134 .It Li \et
135 horizontal tab
136 .It Li \ev
137 vertical tab
138 .It Li \eb
139 backspace
140 .It Li \er
141 carriage return
142 .It Li \ef
143 form feed
144 .It Li \e\e
145 backslash
146 .It Li \eooo
147 octal number in the range [000, 377]
148 .El
149 .Pp
150 A backslash character immediately before the end of the line in a file
151 is used to continue the line onto the next line, e.g.:
152 .Pp
153 .Dl 1 This line is continued \e
154 .Dl on this line.
155 .Pp
156 If the character following the backslash is not one of those specified,
157 the backslash is ignored.
158 .Sh DIAGNOSTICS
159 .Ex -std
160 .Sh SEE ALSO
161 .Xr catclose 3 ,
162 .Xr catgets 3 ,
163 .Xr catopen 3
164 .Sh STANDARDS
165 The
166 .Nm
167 utility is compliant with the
168 .St -xpg4
169 standard.
170 .Sh AUTHORS
171 .An -nosplit
172 This manual page was originally written by
173 .An Ken Stailey
174 and later revised by
175 .An Terry Lambert .
176 .Sh BUGS
177 A message catalog file created from a blank input file cannot be revised;
178 it must be deleted and recreated.