chkmsg(1l) | chkmsg(1l) |
The chkmsg command reads the input file and generates two sets of message identifiers. The first set is the identifiers defined in between the _START_ and _END_ key words. These identifiers are intended to be referenced by MSG_INTL(). This set is named as MSG_INTL_FROM_INPUT.
The other set is the identifiers defined after the _END_ key words. These identifiers are intended to be referenced by MSG_ORIG(). This set is named as MSG_ORIG_FROM_INPUT.
The chkmsg command reads the specified input source_files and generates two sets of message identifiers. The first set is the message identifiers referenced by MSG_INTL() macro. This set is named as MSG_INTL_FROM_SRC.
The other set is the message identifiers referenced by the MSG_ORIG() macro. This set is named as MSG_ORIG_FROM_SRC.
The chkmsg command compares MSG_INTL_FROM_SRC and MSG_INTL_FROM_INPUT. If these two sets are different, the command gives the warning message and print the identifiers which are different.
The chkmsg command compares MSG_ORIG_FROM_SRC and MSG_ORIG_FROM_INPUT. If these two sets are different, the command gives the warning message and print the identifiers which are different.
The identifiers in MSG_INTL_FROM_SRC and MSG_ORIG_FROM_SRC are extracted from the source files only if they are directly passed to MSG_INTL() or MSG_ORIG(). Therefore, for example:
char *msg; | msg = MSG_ERROR_01; | printf(MSG_INTL(msg)); |
There are two key words which can be used in the input file to control whether the identifier will be extracted into MSG_{INTL,ORIG}_FROM_ORIG or not. If the identifyer are surrounded by _CHKMSG_SKIP_BEGIN_ {sparc,i386} and _CHKMSG_SKIP_END_ {sparc,i386}, then the identifiers will not be included in the output set. The architecture being checked should be specified after the key works. These key words should be specified in the comment lines. For example, the input file could contain:
# _CHKMSG_SKIP_BEGIN_ sparc @ MSG_ERROR_01 "This identifier is not defined." # _CHKMSG_SKIP_END_ sparc
It is assumed that the message identifier names are composed of only upper letters.
April 5, 1997 |