DTCODEGEN(1)
β¨ NAME β¨
dtcodegen (user cmd) β generate code from a XCDE application building services project or module file. Sheβs the code-gen bestie who takes your BIL files and turns them into actual source code, no cap. π
π¦ SYNOPSIS π¦
dtcodegen [-changed] [-main] [-merge] [-nomerge] [-module mymod]
[-useWC class] [-p | -project myproj ] [-np | -noproject ]
[-showall] [-noshowall] [-s | -silent ] [-v | -verbose ] [file |
... ]
dtcodegen [-help]
πΈ DESCRIPTION πΈ
Okay so dtcodegen reads Builder Interface Language (BIL) files created by the XCDE application building services graphical user interface, and then it produces C, Motif and XCDE source code for the user interface and application elements you defined. β¨
The BIL files you feed it 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. π
π OPTIONS π
The following options are available:
-chaCaretngedβ generate only source code for those modules that have changed since the last timedtcodegenwas run. (The synopsis spells this one-changed; the option heading in the original page is literally-chaCaretnged, so Iβm keeping both facts visible, bestie.)-helpβ write a help message to standard output explaining alldtcodegenoptions, then terminate. π«Ά-mainβ produce the project files associated with the applicationβs main routine.-mergeβ merge generated stubs files with previous versions, perpetuating changes made or custom edits done to the previous stubs file. This is the default behavior.-nomergeβ do not merge existing and new_stubs.cfiles. This option overrides the default merging behavior. If both-mergeand-nomergeare used, the one given last on the command line takes precedence. Periodt.-modulemymodβ generate code for the modulemymod, which is expected to be defined in the filemymod .bil. Using multiple-moduleoptions includes multiple modules in the generated code.-useWCclassβ use the specified widget class whenever possible. Valid values are:dtβ generateDtComboBoxandDtSpinBoxwidgets. This value retains the CDE 1.0 behavior.xmβ generateXmComboBoxandXmSimpleSpinBoxwidgets. This value selects the Motif/Xm behavior.
-p|-projectmyprojβ generate code for the projectmyproj, which is expected to be defined in the filemyproj .bip.-noprojectβ ignore theproject.bipproject file and use default project settings instead. This is useful in producing an application from one or a few module files (for example, for testing) as an alternative to generating the entire project. π§-showallβ cause the generated application to show (map) all application windows (main windows and dialogs) at startup, ignoring whether they are set to be initially visible or not. If no project is specified on the command line, either by using-projector by specifying a project.bipfile as an operand,dtcodegenperforms as if-showallhad been specified. (The-noshowalloption suppresses this behavior.)-noshowallβ cause the generated application to show at startup (map) only those windows (main windows and dialogs) whose initially visible attribute is true. If a project is specified on the command line, either by using-projector by specifying a project.bipfile as an operand,dtcodegenperforms as if-noshowallhad been specified. (The-showalloption suppresses this behavior.)-s|-silentβ work silently, producing no output except error messages while generating source code. π€«-v|-verboseβ be more verbose in providing progress and status messages during the generation of source code. π£οΈ
π OPERANDS π
The following operand is supported:
fileβ a pathname of a project or module file. It is not necessary to specify the.bipor.bilextension for any file becausedtcodegenuses a sequence of search algorithms in the current directory to determine what files should be read in order to satisfy the specified command line. π
If no file operands are given, dtcodegen searches the current directory for a project file (a file with a .bip suffix). If one is found, it is used as if it had been specified on the command line. If more than one is found, the first one encountered is used.
If one or more file operands are specified, dtcodegen checks to see if any of them is a project file in the current working directory, and uses the first one found. If none of the file operands are project files, then the directory is searched for a project file. This search is similar to the no-operand case, but is modified to look for a project file that contain modules corresponding to other file operands.
Operands other than the project file are taken to be module names.
See the EXAMPLES section for more on the interpretation of filename operands and how the search features of dtcodegen may be used.
π§ RESOURCES π§
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:
xm(the default) β generateXmComboBoxandXmSimpleSpinBoxwidgets. This value selects the Motif/Xm behavior.dtβ generateDtComboBoxandDtSpinBoxwidgets. This value retains the CDE 1.0 behavior.
π STDIN π
Not used. Literally not used, bestie. π
β INPUT FILES β
All input files are text files in the BIL format. See BIL(4).
π ENVIRONMENT VARIABLES π
The following environment variables affect the execution of dtcodegen:
LANGβ provide a default value for the internationalization variables that are unset or null. IfLANGis 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.LC_ALLβ if set to a non-empty string value, override the values of all the other internationalization variables.LC_MESSAGESβ 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.NLSPATHβ determine the location of message catalogues for the processing ofLC_MESSAGES.
π ASYNCHRONOUS EVENTS π
The dtcodegen utility takes the standard action for all signals. β‘
π₯ STDOUT π₯
When -help is specified, dtcodegen writes to standard output a usage message in an unspecified format. Otherwise, standard output is not used.
π STDERR π
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.
π OUTPUT FILES π
The dtcodegen utility produces the following files:
modname_ui.cβ the primary source code file for modulemodname, containing C code to create the objects in the module and establish connections for those objects.modname_ui.hβ declarations and C externs for modulemodname.modname_stubs.cβ callback functions for the element handlers specific to modulemodname.project.cβ ifdtcodegenis generating code for a project, this file containsmainplus any callback functions that are common across modules.project.hβ ifdtcodegenis generating code for a project, this file contains declarations for any callback functions and C externs that are common across interfaces..dtcodegen.logβ a record of per-module code generation and the date and time of each module as it was processed. This data is required to provide support for the-changedoption as part of determining which files need to be regenerated and which ones do not. π
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.
π EXTENDED DESCRIPTION π
None. Thatβs it, thatβs the section. π
π«Ά EXIT STATUS π«Ά
The following exit values are returned:
0β successful completion β¨>0β an error occurred π
π CONSEQUENCES OF ERRORS π
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. Do not play with that, bestie.
π APPLICATION USAGE π
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. π οΈβ¨
β¨ EXAMPLES β¨
Okay bestie, here's where it gets cute and practical. These are the little recipes for running the code generator π
Run the code generator on the application defined by the project file myproject.bip:
dtcodegen -p myproject
Run the code generator for the project myproject.bip, but only generate code for the module modulename.bil:
dtcodegen 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:
dtcodegen -silent mymodule
In the following example:
dtcodegen 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. Lowkey iconic conditional behavior, fr fr π¦
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:
dtcodegen
Generate just the files associated with the main routine for the project myproject, namely myproject.c and myproject.h:
dtcodegen -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:
dtcodegen -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:
dtcodegen -changed -p myproject module1 module2 module3
π SEE ALSO π
Go peek at these too, bestie β they're part of the lore π
That's the whole page, and it ate, no cap. Footer vibes: source/version is dtcodegen(user cmd), and the date is not listed on this page, soz πβ¨ Byeee π«Άπ
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms