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