tt_type_comp(1)

NAME
tt_type_comp - compile ToolTalk otypes and ptypes

SYNOPSIS
tt_type_comp [-mMs] [-d db] source_file

tt_type_comp -r [-s] [-d db] type ...

tt_type_comp -p | -O | -P [-sE] [-d db]

tt_type_comp -p | -O | -P [-s] source_file

tt_type_comp -x [-s] [-o compiled_file] source_file

tt_type_comp [-hv]

DESCRIPTION
The tt_type_comp utility processes otypes and ptypes. The default action of tt_type_comp is to compile types from source form into compiled form and then merge the compiled types into the standard ToolTalk types databases. The tt_type_comp utility preprocesses the source types with cpp(1), and can optionally write out the compiled types instead of merging them into the standard databases. The tt_type_comp utility can also remove types from the standard databases or write out the contents of these databases.

The tt_type_comp utility operates in two fundamental modes: XDR and Classing Engine. XDR mode is the default. In XDR mode, the standard databases are simply serialized ToolTalk data structures, and the format of tt_type_comp output files is the same as that of the databases. In Classing Engine mode, the standard databases are in fact the Classing Engine's own databases, and the format of tt_type_comp output files is that expected for input to ce_db_build(1) and ce_db_merge(1).

OPTIONS
The following options are available:

    Specify the database to work on, which must be one of user, system or network. For Classing Engine mode these are defined as:

        $HOME/.cetables/cetables /etc/cetables/cetables $OPENWINHOME/lib/cetables/cetables

    For the XDR format these are defined respectively as the first, second, and last elements of $TTPATH. These databases form a hierarchy in which the definition of a type in the user database overrides the definition in the system database, and so on. For the merge and remove options, the default database is user. For the -p, -O and -P options, the default is all three databases. Use Classing Engine mode, instead of the default XDR mode. Write a help message for invoking tt_type_comp and then exit. Merge types into the specified database, updating any existing type with the new definition given. This is the default action. This action is not supported for Classing Engine mode. Merge types into the specified database (see -m), but only if they do not already exist in that database. This action is not supported for Classing Engine mode. Write the names of all otypes read. Write the ToolTalk types read in a source format suitable for recompilation with tt_type_comp. Write the names of all ptypes read.
    Write the compiled types into the specified file, or to standard output if compiled_file is -. Remove the given ptypes or otypes from the specified database, as indicated by the type operands. Silent mode. Write nothing to standard output. Write the version number of tt_type_comp and then exit. Compile source types into a compiled types file, instead of merging them into the standard types databases.

OPERANDS
The following operands are supported:

    A pathname of a text file containing ToolTalk source code. If source_file is -, standard input is used. A name of a type to be removed by the -r option.

STDIN
The standard input is used only if a source_file operand is -.

INPUT FILES
The input file named by source_file is a text file containing ToolTalk source code.

ENVIRONMENT VARIABLES
The following environment variables affect the execution of tt_type_comp:

    In Classing Engine mode, a colon-separated list of directories that tells the Classing Engine where to find the databases that contain (among other things) ToolTalk types. See ce_db_build(1). Provide a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, override the values of all the other internationalization variables. Determine the locale that is used to affect the format and contents of diagnostic messages written to standard error and informative messages written to standard output. Determine the location of message catalogues for the processing of LC_MESSAGES. In XDR mode, a colon-separated list of directories that tells the ToolTalk service where to find the ToolTalk types databases. If TTPATH has no value or is not set, it is considered to be:

        $HOME/.tt:\
        /etc/tt:\
        /usr/dt/appconfig/tttypes:\
        $OPENWINHOME/etc/tt

RESOURCES
None.

ASYNCHRONOUS EVENTS
The tt_type_comp utility takes the standard action for all signals.

STDOUT
When the -h option is used, tt_type_comp writes to standard output a help message in an unspecified format.

When the -o option is used, tt_type_comp writes to standard output a listing of all otypes read.

When the -p option is used, tt_type_comp writes to standard output a listing of all the ToolTalk types read, in a source format suitable for recompilation with tt_type_comp.

When the -P option is used, tt_type_comp writes to standard output a listing of all ptypes read.

When the -v option is used, tt_type_comp writes to standard output a version number in an unspecified format.

STDERR
Used only for diagnostic messages.

OUTPUT FILES
When the -x or -d user option is used, tt_type_comp writes the compiled types in an unspecified format into a user-specified file. Otherwise, it writes the compiled types into the databases described under -d.

EXTENDED DESCRIPTION
None.

EXIT STATUS
The following exit values are returned:

    Successful completion. Usage; tt_type_comp was given invalid command line options. A syntax error was found in the source types given to tt_type_comp. System error; tt_type_comp was interrupted by SIGINT, or encountered some system or internal error.

CONSEQUENCES OF ERRORS
Default.

FILES

    User's ToolTalk types database for XDR mode
    System ToolTalk types database for XDR mode
    Network ToolTalk types databases for XDR mode

    Classing Engine databases containing ToolTalk types for CE mode. See ce_db_build(1).

APPLICATION USAGE
None.

EXAMPLES
None.

SEE ALSO
ttsession(1), ce_db_build(1), ce_db_merge(1), cpp(1).