Name
dtcodegen [-changed] [-main] [-merge] [-nomerge] [-module mymod] [-useWC class] [-p | -project myproj ] [-np | -noproject ] [-showall] [-noshowall] [-s | -silent ] [-v | -verbose ] [file | .!.!. ]
dtcodegen [-help]
The dtcodegen utility reads Builder Interface Language (BIL) files created by the XCDE application building services graphical user interface and produces C, Motif and XCDE source code for the user interface and application elements defined. The BIL files supplied can be individual module files (files with a .bil suffix) or a project file (files with a .bip suffix) that contains references to zero or more module files.
The following options are available:
The following operand is supported:
See the EXAMPLES section for more on the interpretation of filename operands and how the search features of dtcodegen may be used.
If the -useWC option is not specified, dtcodegen uses the useWidgetClass resource in the Xt resources table to determine which class to use for generated widgets. The class/type is XmCUseWidgetClass/XtEnum and the valid values are:
Not used.
All input files are text files in the BIL format. See BIL(4) .
The following environment variables affect the execution of dtcodegen:
The dtcodegen utility takes the standard action for all signals.
When -help is specified, dtcodegen writes to standard output a usage message in an unspecified format. Otherwise, standard output is not used.
When -verbose is specified, dtcodegen writes to standard error informational progress messages and diagnostic messages in an unspecified format. Otherwise, standard error is used only for diagnostic messages.
The dtcodegen utility produces the following files:
Additional application code should be added to the modname _stubs.c, project .c and project .c files, as appropriate, because their contents are merged across runs of dtcodegen.
None.
The following exit values are returned:
Because code generation involves the sequential production of a set of application files, errors that cause the dtcodegen utility to exit prematurely also may result in some module or project source files having been generated while others were not. Attempts to build the application from this mix of new and old generated code produce undefined results.
Typically the dtcodegen utility is used indirectly through the XCDE Application Builder’s Code Generator dialog. This allows application code to be generated while the user is working with the Application Builder rather than through a separate interface or shell command line. The Code Generator dialog provides a graphical user interface for dtcodegen that makes it easy to generate code, build the resulting application and then execute it.
In some cases, however, it may be desirable to use the dtcodegen utility directly. A common example of this usage is to employ the code generator from within an application Makefile to produce a portion of the application code from pre-existing project or module files.
Run the code generator on the application defined by the project file myproject.bip:
CWdtcodegen -p myproject
Run the code generator for the project myproject.bip, but only generate code for the module modulename.bil:
CWdtcodegen myproject.bip modulename
Search the current working directory for a project file that references the module mymodule and then silently generate code for just that module:
CWdtcodegen -silent mymodule
In the following example:
CWdtcodegen name1 name2
if the project file name1.bip exists, it is used and code is generated for module name2.bil. Otherwise, both name1 and name2 are taken as the name of modules, the current working directory is searched for a project file that references both modules, and code for those two modules is generated.
Run the code generator, which searches the current working directory for a project file to be processed, and generates all code associated with that project:
CWdtcodegen
Generate just the files associated with the main routine for the project myproject, namely myproject.c and myproject.h:
CWdtcodegen -main -p myproject
Search the current working directory for a project file and, if one is found, generate code for only those modules that have changed since the code generator was last run:
CWdtcodegen -changed
Generate, for the project myproject.bip, code only for those modules among the set module1, module2 and module3 that have changed since the last time the code generator was run:
CWdtcodegen -changed -p myproject module1 module2 module3
dtbuilder(1) , BIL(4) .