1.\" $NetBSD: src/usr.bin/gencat/gencat.1,v 1.8 2003/05/02 08:35:42 gmcgarry Exp $ 2.\" $DragonFly: src/usr.bin/gencat/gencat.1,v 1.3 2005/04/21 16:36:35 joerg Exp $ 3.\" 4.\" Written by Kee Hinckley <nazgul@somewhere.com> 5.\" 6.Dd April 29, 1999 7.Os 8.Dt GENCAT 1 9.Sh NAME 10.Nm gencat 11.Nd generates a Native Language Support (NLS) message catalog file 12.Sh SYNOPSIS 13.Nm 14.Op Fl \&? 15.Ar catalog-file 16.Ar message-file 17.Op Ar message-file ... 18.Sh DESCRIPTION 19The 20.Nm 21command reads one or more files containing message strings that will 22be displayed using the 23.Xr catgets 3 24library call. 25From these files it generates a message catalog which 26is loaded dynamically by the Native Language Support (NLS) library at run time. 27.Pp 28The message description files are text files in the format described below. 29.Pp 30The message catalog file is a binary file. 31If it already exists, it will be truncated when 32.Nm 33is run. 34.Pp 35Error messages are grouped into sets, and a program can load a 36particular set depending on which type, or language, of messages 37is desired. 38.Pp 39The 40.Fl \&? 41option flag prints the usage message. 42.Sh MESSAGE FILE FORMAT 43Empty lines and leading blanks are ignored. 44.Bl -tag -width "NN message" 45.It Em "$set NN" 46Determines the set to be used for all subsequent messages. 47.Ar "NN" 48is an integer greater than 0. 49.It Em "$delset NN" 50Removes a set from the catalog. 51.Ar "NN" 52is an integer greater than 0. 53.Pp 54If a set was created earlier in the 55current file, or in a file previously read by the 56.Nm 57command, this command will remove it. 58.It Em "$quote C" 59Sets a quote character to be used around the messages. 60.Ar "C" 61may be any character other than white space. 62.Pp 63If this is specified, then messages must begin and end with the 64quote character. 65By default no quote character is used. 66If none is specified, then the current quote character is unset. 67This is useful when messages must contain leading white space. 68.It Em "NN message" 69Defines a message. 70.Ar "NN" 71is an integer greater than 0. 72.Pp 73The message is read until the end of the line or a quote character (if one is 74specified). 75If no message is provided, the message with the number 76.Ar "NN" 77is removed from the catalog. 78If no "set" has been created, this command generates an error. 79.El 80.Pp 81Messages may contain any characters, however the "\\" 82is special as an escape character, where the following instances 83are allowed: 84.Pp 85.Bd -literal -offset indent 86\&\\\\ Generates a single backslash. 87\&\\n Generates a newline (as defined by the C compiler). 88\&\\t Generates a tab (as defined by the C compiler). 89\&\\v Generates a vertical tab (as defined by the C compiler). 90\&\\b Generates a backspace (as defined by the C compiler). 91\&\\r Generates a carriage return (as defined by the C compiler). 92\&\\f Generates a form feed (as defined by the C compiler). 93\&\\NNN Generates the character corresponding to the specified 94 octal number. 95\&\\EOL A backslash at the end of line continues the message onto 96 the next line. 97\&\\quote A backslash preceding the current quote character generates 98 the quote character. 99.Ed 100.Sh SEE ALSO 101.Xr catclose 3 , 102.Xr catgets 3 , 103.Xr catopen 3 , 104.Xr nls 7 105.Sh AUTHORS 106The Native Language Support (NLS) message catalog facility was 107contributed by 108.An J.T. Conklin 109.Aq jtc@NetBSD.org . 110This page was written by 111.An Kee Hinckley 112.Aq nazgul@somewhere.com . 113