Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gencat(1int) [ultrix man page]

gencat(1int)															      gencat(1int)

Name
       gencat - generate a formatted message catalog

Syntax
       gencat catalog_file [source_file ...]

Description
       The  command  takes  one or more message source files and either creates a new catalog or merges new message text into an existing catalog.
       You should use the extension for message text files (for example, ) and the extension for catalogs (for example, ) to  process  files  with
       the command.

       In  some  cases, a formatted message catalog exists that has the same name the one that is creating.  When this occurs, merges the messages
       from the source message catalogs into this existing formatted message catalog.  The command merges the source  message  catalogs  into  the
       formatted  message  catalog  in	the same manner as it merges a group of source message catalogs.  If a source message catalog contains the
       same set number or message number as a set or message in the formatted message catalog, the source  message  catalog  set  or  message  has
       precedence.  For example, if both the source and formatted message catalogs contain a message number 25, the message text for message 25 in
       the source message catalog replaces the message text in the formatted message catalog.  Thus, when source message catalogs are merged  with
       formatted message catalogs, the formatted catalogs are updated.

       If you do not specify a source file, the command accepts message source data from standard input.

       Numeric message source files are portable between X/Open systems.

       For information on the source format for messages files, see the Guide to Developing International Software.

Restrictions
       The command does not accept mnemonic identifiers.  You must run the command if you want to use mnemonic identifiers.

See Also
       extract(1int), mkcatdefs(1int), trans(1int), catgets(3int), catopen(3int), intro(3int), environ(5int)
       Guide to Developing International Software

																      gencat(1int)

Check Out this Related Man Page

strmerge(1int)															    strmerge(1int)

Name
       strmerge - batch string replacement

Syntax
       strmerge [ -m prefix ] [ -p patternfile ] [ -s string ] source-program...

Description
       The  command  reads  the strings specified in the message file produced by and replaces those strings with calls to the message file in the
       source program to create a new source program. The new version of source program has the same name as the input source  program,  with  the
       prefix nl_. For example, if the input source program is named the output source program is named You use this command to replace hard-coded
       messages (text strings identified by the command) with calls to the function and to create a source message catalog file. The  source  mes-
       sage  catalog  contains the text for each message extracted from your input source program. The command names the file by appending .msf to
       the name of the input source program. For example, the source message catalog for the program is named You can use the source message cata-
       log as input to the command.

       At  run	time, the program reads the message text from the message catalog.  By storing messages in a message catalog, instead of your pro-
       gram, you allow the text of messages to be translated to a new language or modified without the source program being changed.

       In the source-program argument, you name one or more source programs for which you want strings replaced. The command does not replace mes-
       sages  for source programs included using the directive. Therefore, you might want a source program and all the source programs it includes
       on a single command line.

       You can create a patterns file (as specified by patternfile ) to control how the command replaces text. The patterns file is  divided  into
       several	sections, each of which is identified by a keyword. The keyword must start at the beginning of a new line, and its first character
       must be a dollar sign ($).  Following the identifier, you specify a number of patterns. Each pattern begins on a new line and  follows  the
       regular expression syntax you use in the editor. For more information on the patterns file, see the reference page.

Options
       -m   Add  prefix  to  message  numbers in the output source program and source message catalog.	You can use this prefix as a mnemonic. You
	    must process source message catalogs that contain number prefixes using the option.  Message numbers will be in the form:
	    <prefix><msg_num>

	    Set numbers will be in the form:
	    S_<prefix><set_num>

	    If you process your input source program with this option, the resulting source program and source message catalog may not	be  porta-
	    ble.  For more information, see the Guide to Developing International Software.

       -p   Use  patternfile  to  match strings in the input source program.  By default, the command searches for the pattern file in the current
	    directory, your home directory and finally

	    If you omit the option, the command uses a default patterns file that is stored in

       -s   Write string at the top of the source message catalog. If you omit the option, uses the string specified in the section  of  the  pat-
	    terns file.

Restrictions
       You can specify only one rewrite string for all classes of pattern matches.

       The command does not verify if the message text file matches the source file being rewritten.

       The command does not replace strings to files included with directive. You must run the command on these files separately.

Examples
       The following produces a message file for a program called
       % strextract -p c_patterns prog.c prog2.c
       % vi prog.msg
       % strmerge -p c_patterns prog.c prog2.c
       % gencat prog.cat prog.msf
       % vi nl_prog.c
       % vi nl_prog2.c
       % cc nl_prog.c nl_prog2.c -li

       In this example, the command uses the file to determine which strings to match. The input source programs are named and

       If  you	need  to  remove  any  of the messages or extract one of the created strings, edit the resulting message file, Under no conditions
       should you add to this file. Doing so could result in unpredictable behavior.

       You issue the command to replace the extracted strings with calls to the message catalog.  In response to this command, creates the  source
       message catalogs, and and the output source programs, and

       Before compiling the source programs, you must edit and to include the appropriate and function calls.

       The command creates a message catalog and the command creates an executable program.

See Also
       intro(3int), extract(1int), gencat(1int), strextract(1int), trans(1int), regex(3), catopen(3int), catgets(3int), patterns(5int)
       Guide to Developing International Software

																    strmerge(1int)
Man Page