1 .\" Copyright 2005 Sun Microsystems, Inc. All rights reserved. 2 .\" Use is subject to license terms. 3 .\" 4 .\" CDDL HEADER START 5 .\" 6 .\" The contents of this file are subject to the terms of the 7 .\" Common Development and Distribution License, Version 1.0 only 8 .\" (the "License"). You may not use this file except in compliance 9 .\" with the License. 10 .\" 11 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 12 .\" or http://www.opensolaris.org/os/licensing. 13 .\" See the License for the specific language governing permissions 14 .\" and limitations under the License. 15 .\" 16 .\" When distributing Covered Code, include this CDDL HEADER in each 17 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. 18 .\" If applicable, add the following below this CDDL HEADER, with the 19 .\" fields enclosed by brackets "[]" replaced with your own identifying 20 .\" information: Portions Copyright [yyyy] [name of copyright owner] 21 .\" 22 .\" CDDL HEADER END 23 .\" 24 .if n .tr \-- 25 .TH chkmsg 1l "Apr 5, 1997" 26 .SH NAME 27 chkmsg \- cross check messages 28 .SH SYNOPSIS 29 .B chkmsg 30 .BI [ -64 ] 31 .BI file 32 .BI source_files ... 33 .SH AVAILABILITY 34 Internal to the linker group 35 .SH DESCRIPTION 36 chkmsg checks the message identifiers defined in the input file 37 and the message identifyer used in the input source_files. The input 38 file is the input file which is used by the sgsmsg command. 39 .P 40 The chkmsg command reads the input file and 41 generates two sets of message identifiers. 42 The first set is 43 the identifiers defined in between the _START_ and _END_ key words. 44 These identifiers are intended to be referenced by MSG_INTL(). 45 This set is named as MSG_INTL_FROM_INPUT. 46 .P 47 The other set is 48 the identifiers defined after the _END_ key words. 49 These identifiers are intended to be referenced by MSG_ORIG(). 50 This set is named as MSG_ORIG_FROM_INPUT. 51 .P 52 The chkmsg command reads the specified input source_files and 53 generates two sets of message identifiers. The first set is 54 the message identifiers referenced by MSG_INTL() macro. 55 This set is named as MSG_INTL_FROM_SRC. 56 .P 57 The other set is the message identifiers referenced by the 58 MSG_ORIG() macro. 59 This set is named as MSG_ORIG_FROM_SRC. 60 .P 61 The chkmsg command compares MSG_INTL_FROM_SRC and MSG_INTL_FROM_INPUT. 62 If these two sets are different, the command gives the warning 63 message and print the identifiers which are different. 64 .P 65 The chkmsg command compares MSG_ORIG_FROM_SRC and MSG_ORIG_FROM_INPUT. 66 If these two sets are different, the command gives the warning 67 message and print the identifiers which are different. 68 .P 69 The identifiers in MSG_INTL_FROM_SRC and MSG_ORIG_FROM_SRC are 70 extracted from the source files only if they are 71 directly passed to MSG_INTL() or MSG_ORIG(). Therefore, for example: 72 .RS 73 .nf 74 .ft 3 75 char *msg; 76 | 77 msg = MSG_ERROR_01; 78 | 79 printf(MSG_INTL(msg)); 80 | 81 .fi 82 .RE 83 the identifyer MSG_ERROR_01 will not be included in MSG_INTL_FROM_SRC set. 84 .P 85 There are two key words which can be used in the input file 86 to control whether the identifier will be extracted into 87 MSG_{INTL,ORIG}_FROM_ORIG or not. If the identifyer are 88 surrounded by _CHKMSG_SKIP_BEGIN_ {sparc,i386} 89 and _CHKMSG_SKIP_END_ {sparc,i386}, then 90 the identifiers will not be included in the output set. 91 The architecture being checked should be specified after 92 the key works. 93 These key words should be specified in the comment lines. 94 For example, the input file could contain: 95 .RS 96 .nf 97 .ft 3 98 # _CHKMSG_SKIP_BEGIN_ sparc 99 @ MSG_ERROR_01 "This identifier is not defined." 100 # _CHKMSG_SKIP_END_ sparc 101 .fi 102 .RE 103 .P 104 It is assumed that the message identifier names are composed 105 of only upper letters. 106 .SH OPTIONS 107 .TP 12 108 .B \-64 109 Use a 64-bit version of the machine type (i.e. sparc => sparcv9). 110 Note that this option must be specified first on the command line. 111 .SH "SEE ALSO" 112 .BR gencat (1), 113 .BR ld (1), 114 .BR msgfmt (1), 115 .BR catgets (3C), 116 .BR gettext (3C). 117 .BR sgsmsg (1ONBLD). 118 .if n .tr \-\-