Annotation of src/usr.bin/gencat/gencat.1, Revision 1.9
1.9 ! aaron 1: .\" $OpenBSD: gencat.1,v 1.8 1999/06/05 01:21:26 aaron Exp $
1.1 kstailey 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: .\"
1.9 ! aaron 27: .\" $Id: gencat.1,v 1.8 1999/06/05 01:21:26 aaron Exp $
1.1 kstailey 28: .\"
29: .Dd June 11, 1997
30: .Dt GENCAT 1
31: .Os
32: .Sh NAME
33: .Nm gencat
34: .Nd NLS catalog compiler
35: .Sh SYNOPSIS
1.7 aaron 36: .Nm gencat
1.4 aaron 37: .Ar output-file
1.9 ! aaron 38: .Ar input-file Op Ar ...
1.1 kstailey 39: .Sh DESCRIPTION
40: The
1.5 deraadt 41: .Nm
1.6 espie 42: utility merges the text NLS (National Language Support) in
1.5 deraadt 43: .Ar input-file
44: into a formatted message catalog file
45: .Ar output-file .
46: The file
47: .Ar output-file
1.9 ! aaron 48: will be created if it does not already exist.
! 49: If
1.5 deraadt 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-file
55: will replace the old message text currently contained in
56: .Ar output-file .
57: .Sh INPUT FILES
1.9 ! aaron 58: The format of a message text source file is defined below.
! 59: Note that the fields of a message text source line are separated by a
! 60: single space character; any other space characters are considered to be
! 61: part of the field contents.
1.5 deraadt 62: .Pp
63: .Bl -tag -width
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
1.9 ! aaron 68: or end-of-file appears.
! 69: The argument
1.5 deraadt 70: .Ar n
71: is the set identifier which is defined as a number in the range
1.9 ! aaron 72: .Bo 1 ,
! 73: .Dv NL_SETMAX Bc .
! 74: Set identifiers must occur in ascending order within
! 75: a single source file, but need not be contiguous.
! 76: Any string following
! 77: a space following the set identifier is treated as a comment.
! 78: If no
1.5 deraadt 79: .Li $set
1.9 ! aaron 80: directive is specified in a given source file, all messages will
! 81: be located in the default message set
! 82: .Dv NL_SETD .
1.5 deraadt 83: .It Li $del Ar n comment
84: This line deletes messages from set
85: .Ar n
1.9 ! aaron 86: from a message catalog.
! 87: The
1.5 deraadt 88: .Ar n
1.9 ! aaron 89: specifies a set number.
! 90: Any string following a space following the set
1.5 deraadt 91: number is treated as a comment.
92: .It Li $ Ar comment
93: A line beginning with
94: .Li $
95: followed by a space is treated as a comment.
96: .It Ar m message-text
97: A message line consists of a message identifier
98: .Ar m
1.9 ! aaron 99: in the range
! 100: .Bo 1 ,
! 101: .Dv NL_MSGMAX Bc .
! 102: The
1.5 deraadt 103: .Ar message-text
104: is stored in the message catalog with the set identifier specified by
105: the last
106: .Li $set
107: directive, and the message identifier
108: .Ar m .
109: If the
110: .Ar message-text
111: is empty, and there is a space character following the message identifier,
1.9 ! aaron 112: an empty string is stored in the message catalog.
! 113: If the
1.5 deraadt 114: .Ar message-text
115: is empty, and if there is no space character following the message
116: identifier, then the existing message in the current set with the
1.9 ! aaron 117: specified message identifier is deleted from the catalog.
! 118: Message identifiers must be in ascending order within a single set, but
! 119: need not be contiguous.
! 120: The
1.5 deraadt 121: .Ar message-text
1.9 ! aaron 122: length must be in the range
! 123: .Bo 0 ,
! 124: .Dv NL_TEXTMAX Bc .
1.5 deraadt 125: .It Li $quote Ar c
126: This line specifies an optional quote character
127: .Ar c
128: which can be used to surround
129: .Ar message-text
130: so that trailing space or empty messages are visible in message
1.9 ! aaron 131: source files.
! 132: By default, or if an empty
1.5 deraadt 133: .Li $quote
134: directive is specified, no quoting of
135: .Ar message-text
136: will be recognized.
137: .El
138: .Pp
1.9 ! aaron 139: Empty lines in message source files are ignored.
! 140: The effect of lines beginning with any character other than those
! 141: described above is undefined.
1.5 deraadt 142: .Pp
143: Text strings can contain the following special characters and escape
1.9 ! aaron 144: sequences.
! 145: In addition, if a quote character is defined, it may be
1.5 deraadt 146: escaped as well to embed a literal quote character.
147: .Pp
1.9 ! aaron 148: .Bl -tag -width Ds -offset indent -compact
1.5 deraadt 149: .It Li \en
150: line feed
151: .It Li \et
152: horizontal tab
153: .It Li \ev
154: vertical tab
155: .It Li \eb
156: backspace
157: .It Li \er
158: carriage return
159: .It Li \ef
160: form feed
161: .It Li \e\e
162: backslash
163: .It Li \eooo
164: octal number in the range [000, 377]
165: .El
166: .Pp
167: A backslash character immediately before the end of the line in a file
1.9 ! aaron 168: is used to continue the line onto the next line, e.g.,
1.5 deraadt 169: .Pp
170: .Dl 1 This line is continued \e
171: .Dl on this line.
172: .Pp
173: If the character following the backslash is not one of those specified,
174: the backslash is ignored.
1.1 kstailey 175: .Pp
176: The
1.8 aaron 177: .Nm
1.9 ! aaron 178: utility exits 0 on success or >0 if an error occurred.
1.1 kstailey 179: .Sh SEE ALSO
180: .Xr catclose 3 ,
181: .Xr catgets 3 ,
182: .Xr catopen 3
183: .Sh STANDARDS
184: The
1.5 deraadt 185: .Nm
186: utility is compliant with the
187: .St -xpg4
188: standard.
189: .Sh AUTHOR
190: This manual page by
191: .An Ken Stailey
192: updated and revised by
193: .An Terry Lambert .
194: .Sh BUGS
195: A message catalog file created from a blank input file can not be revised;
196: it must be deleted and recreated.