Unix/Linux Go Back    

OpenSolaris 2009.06 - man page for msgcc (opensolaris section 1)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

msgcc(1)				  User Commands 				 msgcc(1)

       msgcc - C language message catalog compiler

       msgcc [-M-option] [cc-optionsoption] file...

       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 speci-
       fied 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 suffix. 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

       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  reuse
				       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 simi-
				       larity measure between old and new message text is:


				       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  mes-
				       sages  are  still deleted. Use -M-preserve to preserve all
				       old messages.

		     verbose	       Trace similar message replacements on the standard error.

       The following operands are supported:

       file    Specifies the name of the file on which msgcc operates.

       0     Successful completion.

       >0    An error occurred.

       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"

       Glenn Fowler, gsf@research.att.com

       See attributes(5) for descriptions of the following attributes:

       |      ATTRIBUTE TYPE	     |	    ATTRIBUTE VALUE	   |
       |Availability		     |SUNWastdev		   |
       |Interface Stability	     |Volatile			   |

       cpp(1), gencat(1), mkmsgs(1), msggen(1), msgcpp(1), msgcvt(1), attributes(5)

SunOS 5.11				    9 Oct 2007					 msgcc(1)
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 01:51 PM.