gencat(1int)
Name
gencat − generate a formatted message catalog
Syntax
gencat [ -h hdrfile ] catfile msgfile ...
Description
The gencat command takes one or more message source files and either creates a new catalog or merges new message text into an existing catalog. You should use the extension .msf for message text files (for example, msgfile.msf ) and the extension .cat for catalogs (for example, catfile.cat ) to process files with the gencat command.
In some cases, a formatted message catalog exists that has the same name the one that gencat is creating. When this occurs, gencat merges the messages from the source message catalogs into this existing formatted message catalog. The command merges the source message catalogs into the formatted message catalog in the same manner as it merges a group of source message catalogs. If a source message catalog contains the same set number or message number as a set or message in the formatted message catalog, the source message catalog set or message has precedence. For example, if both the source and formatted message catalogs contain a message number 25, the message text for message 25 in the source message catalog replaces the message text in the formatted message catalog. Thus, when source message catalogs are merged with formatted message catalogs, the formatted catalogs are updated.
The −h option indicates that the source message file contains set and message mnemonics instead of numeric identifiers. This option causes the gencat command to create the header file, hdrfile. The header file contains C preprocessor directives that control the mapping between set and message labels specified in the source catalogs and the set and message numbers written to the formatted catalog. If you use message labels in your program, you must include the header file gencat creates. Use the #include directive to include the header file. When you specify the −h option, gencat does not merge source message catalogs with existing formatted message catalogs. If a formatted message catalog exists, the gencat command writes over it with the new message catalog. If no formatted message catalog exists, gencat creates one.
For information on the source format for messages files, see the Guide to Developing International Software.
Options
-hGenerate a header file that maps set and message labels in the formatted message catalog to set and message labels in source message catalogs.
The gencat command ignores this option if you use set and message numbers, rather than set and message labels.
You must include the header file hdrfile in your C program if you want to use set and message labels.
Restrictions
Source message catalogs you want to format using gencat can contain either set and message numbers or set and message labels, but not both.
Numeric message source files are guaranteed portable between X/Open systems.
See Also
intro(3int), extract(1int), trans(1int), catgets(3int), catopen(3int)
Guide to Developing International Software