| GENCAT(1) | General Commands Manual | GENCAT(1) | 
gencat —
| gencat | catfile [msgfile|- ...] | 
gencat utility generates a formatted message catalog
  catfile from stdin or one or more message source text
  files msgfile. The file catfile is
  created if it does not already exist. If catfile does
  exist, its messages are included in the new catfile. The
  new message text defined in msgfile replaces the old
  message text currently in catfile when the set and
  message numbers match.
The generated message catalog contains message strings that will be retrieved using the catgets(3) library call. These messages are dynamically loaded by the Native Language Support (NLS) library at run time. Error messages are grouped into sets, and a program can load a particular set depending on which type, or language, of messages is desired.
$set
    n comment$set or end-of-file. The
      n is the set identifier which is defined as a number
      in the range [1, NL_SETMAX]. Set identifiers
      within a single source file need not be contiguous. Any string following
      the set identifier is treated as a comment. If no
      $set directive is specified in a message text
      source file, all messages will be located in the default message set
      NL_SETD.$delset
    n commentNL_SETMAX]. If a message set was created earlier
      in the current file, or in a file previously read by the
      gencat command, this directive will remove it. Any
      string following the set identifier is treated as a comment.$
    comment$ followed by a space or tab
      character is treated as a comment.NL_MSGMAX] and the
      message-text. The message-text
      is read until the end of the line or a quote character (if one is
      specified). The message-text is stored in the
      message catalog with the set identifier specified by the last
      $set directive, and the message identifier
      m. If the message-text is
      empty and there is a space or tab character following the message
      identifier, an empty string is stored in the message catalog. If no
      message-text is provided, and if there is no space
      or tab character following the message identifier, the message with the
      message identifier m in the current set is removed
      from the catalog. Message identifiers need not be contiguous within a
      single set. The length of message-text must be in
      the range [0, NL_TEXTMAX].$quote
    c$quote directive is specified, then the current
      quote character is unset.Empty lines and leading blanks in a message text source file are ignored. Any line beginning with any character other than those described above is ignored as a syntax error.
Text message strings may contain any characters and the following special characters and escape sequences.
| Description | Symbol | Sequence | 
| newline | NL(LF) | \n | 
| horizontal tab | HT | \t | 
| vertical tab | VT | \v | 
| backspace | BS | \b | 
| carriage return | CR | \r | 
| form feed | FF | \f | 
| backslash | \ | \\ | 
| bit pattern | ddd | \ddd | 
A bit pattern, \ddd, consists of a
    backslash followed by one, two, or three octal digits representing the value
    of the character. The current quote character, if defined, may be escaped
    with a backslash to generate the quote character. Any character following
    the backslash ('\') other than those specified is ignored.
A backslash at the end of the line continues the message onto the next line. The following two lines are an example of such a message:
1 This message continues
  \Producing the following message:
1 This message continues on the next
  linegencat utility exits 0 on success,
  and >0 if an error occurs.
| December 29, 2011 | NetBSD 10.1 |