mkcatdefs - Preprocesses a message source file
mkcatdefs [-h] catname source_file...
Suppresses the generation of a
The mkcatdefs utility preprocesses a message source file to change symbolic identifiers into numeric constants. The utility produces two forms of output. The standard output is a set of commands suitable for passing to the gencat utility, which creates a new message catalog. In addition, catname, produces a file named catname_msg.h containing definition statements that equate your symbolic identifiers with set numbers and message ID numbers assigned by mkcatdefs. The catname_msg.h file is required in your application program if you use symbolic identifiers.
See gencat(1) for a description of input format for commands. The only difference between gencat and mkcatdefs is that gencat requires a number to identify each message, while mkcatdefs accepts either a number or a symbolic name. The mkcatdefs program can send message source data, with numbers instead of symbolic identifiers, to standard output. This output is suitable as input to the gencat program. You can use the > (right angle bracket) character to write the new message source to a file, and then use the file as input to the gencat command.
A symbolic name is converted to a number in the mkcatdefs output. Each set and message in a program must have a unique number or symbolic name. Symbolic identifiers can contain letters, digits, and underscores. The first character cannot be a digit or an underscore. You cannot use a symbolic name for a set in the $delset command.
The mkcatdefs program is designed to create new message catalogs, not to change existing ones incrementally. Thus, the program's first operation on each set is to delete it, in case the catalog contains a set with that number. The sets specified in source_file are assigned numbers in ascending order, starting at 1. Within each set, messages are also assigned numbers in ascending order, starting at 1. If you assign a message to a number in your source_file, mkcatdefs continues its ascending series with that number.
Note also that you can use the
command automatically sends the message source file through the
command and pipes the files to the
Symbolic references allow a convenient input source for both the message
catalog and the program's header file; however, symbolic references are an
extension to X/Open specifications may not be supported on all systems conforming
The following example shows a message source file with symbolic message identifiers and quoted messages:
/* The following was generated from symb.src. */
/* definitions for set MSFAC */ #define MSFAC 1
#define SYM_FORM 1 #define MSG_H 6 #endif
Commands: dspcat(1), dspmsg(1), gencat(1), runcat(1)
Functions: catclose(3), catgets(3), catopen(3)