Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

msgcc(1) [opensolaris man page]

msgcc(1)							   User Commands							  msgcc(1)

NAME
msgcc - C language message catalog compiler SYNOPSIS
msgcc [-M-option] [cc-optionsoption] file... DESCRIPTION
msgcc is a C language message catalog compiler. It accepts cc style options and arguments. A msgcpp(1) .mso file is generated for each input .c file. If the -c option is not specified then a gencat(1) format .msg file is generated from the input .mso and .msg files. If -c is not specified then a .msg suffix is appended to the -o file if it doesn't already have a suf- fix. The default output is a.out.msg if -c and -o are not specified. If -M-new is not specified then messages are merged with those in the pre-existing -o file. OPTIONS
The following options are supported: cc-options Specify cc style options and arguments. -M-option Set a msgcc option. Specify option as one of the following: mkmsgs The -o file is assumed to be in mkmsgs(1) format. new Create a new -o file. preserve Messages in the -o file that are not in new .msg file arguments are preserved. The default is to either re- use the message numbers with new message text that is similar to the old or to delete the message text, leaving an unused message number. set=number Set the message set number to number. The default is 1. similar=number The message text similarity message threshold. The similarity measure between old and new message text is: 100*(2*gzip(old+new) /(gzip(old)+gzip(new))-1) where gzip(x) is the size of text x when compressed by gzip. The default threshold is $__similar__$.A threshold of 0 turns off message replacement, but unused old messages are still deleted. Use -M-preserve to preserve all old messages. verbose Trace similar message replacements on the standard error. OPERANDS
The following operands are supported: file Specifies the name of the file on which msgcc operates. EXIT STATUS
0 Successful completion. >0 An error occurred. EXAMPLES
Example 1 Using msgcc The following example uses msgcc to extract localizable strings from the file hello.c, marked using ERROR_dictionary(), writes them to the file hello.mso, and creates a gencat format xxx.msg file: example% cat hello.c #include <stdio.h> #include <stdlib.h> /* * dummy macro to avoid including * libast headers */ #define ERROR_dictionary(x) x int main(int ac, char *av[]) { puts( ERROR_dictionary("hello world") ); return( EXIT_SUCCESS ); } example% msgcc -o xxx -D__STDC__ -D__i386 hello.c example% cat hello.mso str "hello world" example% cat xxx.msg $ xxx message catalog $translation msgcc 2007-09-25 $set 1 $quote " 1 "hello world" AUTHORS
Glenn Fowler, gsf@research.att.com ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWastdev | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
cpp(1), gencat(1), mkmsgs(1), msggen(1), msgcpp(1), msgcvt(1), attributes(5) SunOS 5.11 9 Oct 2007 msgcc(1)

Check Out this Related Man Page

mkmsgs(1)						      General Commands Manual							 mkmsgs(1)

NAME
mkmsgs - create message files for use by gettxt() SYNOPSIS
locale] textfile msgfile DESCRIPTION
The command takes as input a file of localized text strings and generates a message file that can be accessed by the gettxt(3C) routine. textfile is the name of the file that contains the text strings. msgfile is the name of the output message file. appends the suffix to the message file name. The combined length of the file name should be less than 14 bytes for short file name file system. The msgfile file should not contain a colon since it will confuse the formatting routines. The textfile file contains the localized text strings. The text strings are separated by a newline character. The text strings are pro- cessed sequentially and copied to the msgfile message file. An empty line in the input results in a corresponding empty message written to the msgfile message file. Options The command supports the following options: Overwrite the msgfile message file if it exists. The msgfile message file is installed in the system-wide localization directory corresponding to the specified locale. Only a user with the appropriate privileges can create or overwrite the message file in that directory. The direc- tory will be created if it does not exist. EXTERNAL INFLUENCES
Environment Variables determines the interpretation of messages as single- and/or multibyte characters. Messages are issued in if it is set to a valid language and messages are available. Otherwise "C" locale messages are issued. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multibyte character code sets are supported. EXAMPLES
The following example shows the format of the input text strings: WARNINGS
is provided for SVID3 compatibility only. The user is encouraged to use the NLS mechanism developed by HP and the X/Open Company, Ltd. SEE ALSO
gencat(1), gettxt(3C), setlocale(3C). STANDARDS COMPLIANCE
mkmsgs(1)
Man Page