2003-05-02 12:35:42 +04:00
|
|
|
.\" $NetBSD: gencat.1,v 1.8 2003/05/02 08:35:42 gmcgarry Exp $
|
1999-12-21 12:25:43 +03:00
|
|
|
.\"
|
|
|
|
.\" Written by Kee Hinckley <nazgul@somewhere.com>
|
|
|
|
.\"
|
|
|
|
.Dd April 29, 1999
|
|
|
|
.Os
|
2001-06-05 15:40:04 +04:00
|
|
|
.Dt GENCAT 1
|
1999-12-21 12:25:43 +03:00
|
|
|
.Sh NAME
|
|
|
|
.Nm gencat
|
2002-02-03 12:31:36 +03:00
|
|
|
.Nd generates a Native Language Support (NLS) message catalog file
|
1999-12-21 12:25:43 +03:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl \&?
|
|
|
|
.Ar catalog-file
|
|
|
|
.Ar message-file
|
|
|
|
.Op Ar message-file ...
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command reads one or more files containing message strings that will
|
|
|
|
be displayed using the
|
|
|
|
.Xr catgets 3
|
|
|
|
library call.
|
|
|
|
From these files it generates a message catalog which
|
2002-02-03 12:31:36 +03:00
|
|
|
is loaded dynamically by the Native Language Support (NLS) library at run time.
|
|
|
|
.Pp
|
1999-12-21 12:25:43 +03:00
|
|
|
The message description files are text files in the format described below.
|
2002-02-03 12:31:36 +03:00
|
|
|
.Pp
|
1999-12-21 12:25:43 +03:00
|
|
|
The message catalog file is a binary file.
|
|
|
|
If it already exists, it will be truncated when
|
|
|
|
.Nm
|
|
|
|
is run.
|
|
|
|
.Pp
|
|
|
|
Error messages are grouped into sets, and a program can load a
|
|
|
|
particular set depending on which type, or language, of messages
|
|
|
|
is desired.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Fl \&?
|
|
|
|
option flag prints the usage message.
|
|
|
|
.Sh MESSAGE FILE FORMAT
|
|
|
|
Empty lines and leading blanks are ignored.
|
|
|
|
.Bl -tag -width "NN message"
|
|
|
|
.It Em "$set NN"
|
|
|
|
Determines the set to be used for all subsequent messages.
|
|
|
|
.Ar "NN"
|
|
|
|
is an integer greater than 0.
|
|
|
|
.It Em "$delset NN"
|
|
|
|
Removes a set from the catalog.
|
|
|
|
.Ar "NN"
|
|
|
|
is an integer greater than 0.
|
|
|
|
.Pp
|
|
|
|
If a set was created earlier in the
|
|
|
|
current file, or in a file previously read by the
|
|
|
|
.Nm
|
|
|
|
command, this command will remove it.
|
|
|
|
.It Em "$quote C"
|
|
|
|
Sets a quote character to be used around the messages.
|
|
|
|
.Ar "C"
|
|
|
|
may be any character other than white space.
|
|
|
|
.Pp
|
|
|
|
If this is specified, then messages must begin and end with the
|
|
|
|
quote character.
|
|
|
|
By default no quote character is used.
|
2001-04-09 16:31:34 +04:00
|
|
|
If none is specified, then the current quote character is unset.
|
1999-12-21 12:25:43 +03:00
|
|
|
This is useful when messages must contain leading white space.
|
|
|
|
.It Em "NN message"
|
|
|
|
Defines a message.
|
|
|
|
.Ar "NN"
|
|
|
|
is an integer greater than 0.
|
|
|
|
.Pp
|
|
|
|
The message is read until the end of the line or a quote character (if one is
|
|
|
|
specified).
|
|
|
|
If no message is provided, the message with the number
|
|
|
|
.Ar "NN"
|
|
|
|
is removed from the catalog.
|
|
|
|
If no "set" has been created, this command generates an error.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Messages may contain any characters, however the "\\"
|
|
|
|
is special as an escape character, where the following instances
|
|
|
|
are allowed:
|
|
|
|
.Pp
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
\&\\\\ Generates a single backslash.
|
|
|
|
\&\\n Generates a newline (as defined by the C compiler).
|
|
|
|
\&\\t Generates a tab (as defined by the C compiler).
|
|
|
|
\&\\v Generates a vertical tab (as defined by the C compiler).
|
|
|
|
\&\\b Generates a backspace (as defined by the C compiler).
|
|
|
|
\&\\r Generates a carriage return (as defined by the C compiler).
|
|
|
|
\&\\f Generates a form feed (as defined by the C compiler).
|
|
|
|
\&\\NNN Generates the character corresponding to the specified
|
|
|
|
octal number.
|
|
|
|
\&\\EOL A backslash at the end of line continues the message onto
|
|
|
|
the next line.
|
|
|
|
\&\\quote A backslash preceding the current quote character generates
|
|
|
|
the quote character.
|
|
|
|
.Ed
|
1999-12-29 09:54:00 +03:00
|
|
|
.Sh SEE ALSO
|
2003-02-05 08:10:58 +03:00
|
|
|
.Xr catclose 3 ,
|
|
|
|
.Xr catgets 3 ,
|
2003-05-02 12:35:42 +04:00
|
|
|
.Xr catopen 3 ,
|
|
|
|
.Xr nls 7
|
2001-06-05 15:40:04 +04:00
|
|
|
.Sh AUTHORS
|
2003-02-05 08:10:58 +03:00
|
|
|
The Native Language Support (NLS) message catalog facility was
|
2003-02-14 18:59:16 +03:00
|
|
|
contributed by
|
|
|
|
.An J.T. Conklin
|
|
|
|
.Aq jtc@NetBSD.org .
|
2003-02-05 08:10:58 +03:00
|
|
|
This page was written by
|
2003-02-14 18:59:16 +03:00
|
|
|
.An Kee Hinckley
|
2003-02-05 08:10:58 +03:00
|
|
|
.Aq nazgul@somewhere.com .
|