Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

catexstr(1)

catgets(1)

catopen(3C)

catgets(3C)

catclose(3C)

nl_types(5)

mkmsgs(1)

gettxt(3C)



gencat(1)                        DG/UX R4.11                       gencat(1)


NAME
       gencat - generate a formatted message catalogue

SYNOPSIS
       gencat [-l] catfile [msgfile ...]
       gencat [-a] catfile [msgfile ...]
       gencat -d catfile

DESCRIPTION
       The gencat utility processes X/Open-style message catalogs.  gencat
       merges the message text source file(s) msgfile into a formatted
       message database catfile.  The database catfile will be created if it
       does not already exist.  If catfile does exist its messages will be
       included in the new catfile.  If set and message numbers collide, the
       new message-text defined in msgfile will replace the old message text
       currently contained in catfile.  The message text source file (or set
       of files) input to gencat can contain either set and message numbers
       or simply message numbers, in which case the set NL_SETD [see
       nl_types(5)] is assumed.

       The -l option can be used to list the messages as they are read in
       from the catfile.

       The -a option generates an AT&T style message catalog that can be
       accessed by the gettxt(3C) function.  If this option is selected,
       then the source message file should contain only one set which is
       numbered 1.  The catopen(3C), catgets(3C), and catclose(3C) functions
       cannot be used on catalogs that are generated with the gencat -a
       option.

       With the -d option, gencat writes to its standard output a text
       version of catfile in the format of a msgfile.  This file can then be
       modified and reprocessed with gencat (without the -d option).  If no
       file by the name catfile can be found, the environment variable
       NLSPATH is used to locate it, using the same algorithm as
       catopen(3C).

       The format of a message text source file is defined as follows.  Note
       that the fields of a message text source line are separated by a
       single ASCII space or tab character.  Any other ASCII spaces or tabs
       are considered as being part of the subsequent field.

       $set  n comment
            Where n specifies the set identifier of the following messages
            until the next $set, $delset or end-of-file appears.  n must be
            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 comment
            Deletes message set n from an existing message catalogue.  Any
            string following the set number is treated as a comment.

       (Note:  if n is not a valid set it is ignored.)


       $ comment
            A line beginning with a dollar symbol $ followed by an ASCII
            space or tab character is treated as a comment.

       m message-text
            The m denotes the message identifier, which is a number in the
            range (1-{NL_MSGMAX}).  The message-text is stored in the
            message catalogue with the set identifier specified by the last
            $set directive, and with message identifier m.  If the message-
            text is empty, and an ASCII space or tab field separator is
            present, an empty string is stored in the message catalogue.  If
            a message source line has a message number, but neither a field
            separator nor message-text , the existing message with that
            number (if any) is deleted from the catalogue.  Message
            identifiers need not be contiguous.  The length of message-text
            must be in the range (0-{NL_TEXTMAX}).


       $quote c
            This line specifies an optional quote character c, which can be
            used to surround message-text so that trailing spaces or null
            (empty) messages are visible in a message source line.  By
            default, or if an empty $quote directive is supplied, no quoting
            of message-text will be recognized.

       Empty lines in a message text source file are ignored.

       Text strings can contain the special characters and escape sequences
       defined in the following table:
                    +------------------------------------------+
                    | 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      |
                    +------------------------------------------+
       The escape sequence \ddd consists of backslash followed by 1, 2 or 3
       octal digits, which are taken to specify the value of the desired
       character.  If the character following a backslash is not one of
       those specified, the backslash is ignored.

       Backslash followed by an ASCII newline character is also used to
       continue a string on the following line.  Thus, the following two
       lines describe a single message string:

           1 This line continues \
           to the next line

       which is equivalent to:

           1 This line continues to the next line

SEE ALSO
       catexstr(1), catgets(1), catopen(3C), catgets(3C), catclose(3C),
       nl_types(5).
       mkmsgs(1), gettxt(3C) -- AT&T-style message facility.


Licensed material--property of copyright holder(s)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026