®ndmsg(1)

®ndmsg(1)

NAME

®ndmsg, dumpmsg - create message catalog ®le for modi®cation

SYNOPSIS

findmsg [-aiv] [ [-D sym ] [-U sym ]] ®le ...

dumpmsg ®le ...

DESCRIPTION

The findmsg command extracts messages from a C program source ®le and writes them to the standard output in a format suitable for input to gencat (see gencat(1)). The input ®le will be preprocessed using cpp (see cpp(1)) in order to select print speci®ers and handle ifdef, ifndef... conditional cpp primi- tives. If multiple input ®les are speci®ed and the -aoption is not used, the ®les are processed sequentially such that message catalog comment lines identifying the input ®le are written before the output for each input ®le.

The findmsg command scans the source ®les for uncommented lines with one of the following three formats embedded within it:

catgets(any_var,NL_SETN,n,<message>)

<message>

/* catgets n */

/* catgets n */

<message>

or any combination of these formats wholly contained on a single physical line. <message> could be a string constant or a combination of string constants and print speci®ers (PRI*). Any number of spaces or tabs can separate the catgets comment from the message. The digit n, which can be any valid message number (see gencat(1)), is combined with the message string to produce a message catalog source line. The message source line is assigned to the set whose number is the current value of NL_SETN as set by the last #define directive encountered. If NL_SETN has not yet been de®ned when a message line is found, the message is output without a set number speci®cation. If more than one message is found belonging to the same set and message number, the last message found is output; any others are silently discarded. Conditional compilation and #include instructions in the C source ®les are ignored.

Options

findmsg recognizes the following command-line options:

-a

Merge identically numbered sets from multiple input ®les so that gencat can process

 

the findmsg output.

-Dsym

De®ne symbol sym.

-Usym

Cause symbol sym to be unde®ned.

-i

Consider all #ifdefs to extract messages from the input ®le. Options -Dand -Uwill be

 

used to select print speci®ers if this option is not used.

-v

Outputs all error messages issued by cpp. By default, findmsg does not display the

 

error messages issued by cpp.

The dumpmsg command extracts messages from a message catalog ®le created by gencat. Messages are written to standard output in a format suitable for editing and re-input to gencat.

EXTERNAL INFLUENCES

Environment Variables

LC_CTYPE determines the interpretation of messages as single-byte and/or multi-byte characters.

LC_MESSAGES determines the language in which messages are displayed.

If LC_CTYPE or LC_MESSAGES is not speci®ed in the environment or is set to the empty string, the value of LANG is used as a default for each unspeci®ed or empty variable. If LANG is not speci®ed or is set to the empty string, a default of C (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, findmsg and dumpmsg behave as if all internationalization variables are set to C. See environ(5).

International Code Set Support

Single-byte and multi-byte character code sets are supported.

HP-UX Release 11i: December 2000

− 1 −

Section 1277

f