caterr(1) caterr(1) NAME caterr - processes message text files SYNOPSIS caterr [-c catfile] [-e] [-s[-P cpp_opts]] [-Y x,pathname] [msgfile] DESCRIPTION A message catalog is a binary file that contains the run-time source of error messages output by UNICOS software products. A message catalog is produced from a message text file that contains messages (tagged with $msg tags) and message explanations (tagged with $nexp or $exp tags). Before it can be accessed at run time, a message text file must be converted to a message catalog binary file by the caterr processor and the gencat(1) catalog generator. The caterr utility converts the error message text source in msgfile into the format used as input to gencat(1), the error message catalog generation utility. If msgfile is not specified or if a dash (-) is specified, caterr reads from the standard input. The -c option to the caterr utility calls gencat(1) after processing is complete. Using the -c option allows a catalog to be generated from a message text file in one step. It is recommended that you use caterr with the -c option. The gencat(1) utility exists as a separate utility to maintain compatibility with industry standards for message catalog processing. No advantage exists in calling gencat(1) separately. By default, caterr looks for gencat(1) in the /usr/bin/gencat file. A single invocation of caterr can process either the messages or the explanations in the input files, but not both. The caterr utility processes the messages by default. Use the -e option to specify processing of the explanations. The caterr utility calls the text formatting utility nroff(1) to process formatted explanations as part of its processing of the message text file. nroff(1) uses message macro definitions to format the explanation text. On IRIX systems, caterr looks for nroff(1) in the /usr/bin/nroff file and for the message macros in the /usr/share/lib/tmac/tmac.sg file. If no options are specified, caterr processes msgfile by using the tools in the default locations. The output, suitable for input to gencat(1), is sent to stdout. The caterr utility accepts the following options and arguments: -c catfile (Catalog) Calls gencat(1) to update or create a catalog with the information in the processed msgfile. If the -c option is used, caterr invokes gencat(1) to update the specified catalog by using the generated output. If catfile does not exist, it is created. Using the -c option makes it unnecessary to call gencat(1) separately; the message catalog is generated in one step. -e (Explanations) Processes the explanations in msgfile. Without the -e option, caterr processes the messages in msgfile. -s[-P cpp_opts] (Symbolic names) Calls the C language preprocessor (cpp(1)) to preprocess symbolic message names into message numbers. The mapping of names to numbers must be specified in a header filename in the input file. On IRIX systems, caterr looks for cpp(1) in the /lib/cpp directory. Options can be passed to cpp by specifying the -P suboption to the -s option. Place the options to be passed to cpp within double quotation marks (" "). The entire string within the quotation marks is passed to cpp for execution. The -P suboption can be specified only if the -s option also is specified. -Y x,pathname Specifies the version of the nroff(1) and gencat(1) tools and of the tmac.sg message macros that caterr calls. If the -Y option is not specified, caterr calls the version of nroff(1) in /usr/bin/nroff, the version of gencat(1) in /usr/bin/gencat, and the version of the message macros in /usr/share/lib/tmac/tmac.sg. If you need to specify alternative paths for all three tools that caterr calls, you can specify the -Y option up to three times in the same command line. The -Y option takes two arguments: a pathname and a key letter that specifies which software (nroff(1), gencat(1), or the message macros) is located at that pathname. The key letter is specified first, followed by a comma (,), followed by the pathname. The alternative tool path specified with pathname must be a full path. The -Y option accepts the following key letters: c Specifies that the pathname following the comma is the pathname for gencat(1). m Specifies that the pathname following the comma is the pathname for the message macros. n Specifies that the pathname following the comma is the pathname for nroff(1). msgfile Specifies the name of the file containing the message text source to be processed. EXAMPLES Example 1: In the following example, caterr processes the messages in file ldr.msg. The output, sent to stdout, is suitable for input to gencat(1). caterr ldr.msg Example 2: In the following example, caterr invokes gencat(1) to update the messages in the ldr.cat catalog with the information in file ldr.msg. caterr -c ldr.cat ldr.msg Example 3: In the following example, caterr uses the message macros in the file /usr/me/errmsg/tmac.sg to produce a catalog of explanations suitable for processing by gencat(1). The input file is ldr.msg; the output is sent to stdout. caterr -e -Y m,/usr/me/errmsg/tmac.sg ldr.msg Example 4: In the following example, caterr uses the message macros in the current directory and invokes gencat(1) from /bin/gencat to update the explanation catalog ldr.exp with the information in ldr.msg. caterr -e -c ldr.exp -Y m,tmac.sg -Y c,/bin/gencat ldr.msg Example 5: In the following example, caterr calls nroff from /usr/me/errmsg/nroff and uses the message macros in the current directory. The input file is ldr.msg. Explanations suitable for processing by gencat(1) are output to stdout. caterr -e -Y n,/usr/me/errmsg/nroff -Y m,tmac.sg ldr.msg Example 6: In the following example, caterr calls alternative versions of all three tools. It uses the versions of nroff(1) and the message macros in the current directory, and it calls gencat(1) from /bin/gencat. Using these tools, the explanations in the ldr.exp file are updated with the information in the ldr.msg file. caterr -e -c ldr.exp -Y c,/bin/gencat -Y m,tmac.sg -Y n,nroff ldr.msg Example 7: In the following example, caterr invokes gencat(1) to update the messages in the ldr.cat catalog with the information in the ldr.msg file. The caterr utility calls cpp(1) to preprocess symbolic message names, and passes the -M option to cpp(1) for execution. caterr -c ldr.cat -s -P "-M" ldr.msg Example 8: In the following example, caterr invokes gencat(1) to update the ldr.cat catalog. Because no message text file name is specified, the input to caterr is read from the standard input. caterr -c ldr.cat SEE ALSO explain(1), gencat, whichcat(1) catgetmsg(3C), catgets(3C), catmsgfmt(3C), nl_types(5), msg(7D). Page 4