1 /*----------------------------------------------------------------------*/
4 /* See comments for "xcircexec.c". This has the same function as */
5 /* xcircexec.c, but does not initialize the Tk package. This avoids */
6 /* problems attempting to run in an environment without a DISPLAY */
7 /* variable set (true batch mode). */
8 /*----------------------------------------------------------------------*/
14 /*----------------------------------------------------------------------*/
15 /* Application initiation. This is exactly like the AppInit routine */
16 /* for "wish", minus the cruft, but with "tcl_rcFileName" set to */
17 /* "xcircuit.tcl" instead of "~/.wishrc". */
18 /*----------------------------------------------------------------------*/
21 xcircuit_AppInit(interp
)
24 if (Tcl_Init(interp
) == TCL_ERROR
) {
27 Tcl_StaticPackage(interp
, "Tcl", Tcl_Init
, Tcl_Init
);
29 /* This is where we replace the home ".tclshrc" file with */
30 /* xcircuit's startup script. */
32 Tcl_SetVar(interp
, "tcl_rcFileName", SCRIPTS_DIR
"/xcircuit.tcl",
35 /* Additional variable can be used to tell if xcircuit is in batch mode */
36 Tcl_SetVar(interp
, "batch_mode", "true", TCL_GLOBAL_ONLY
);
41 /*----------------------------------------------------------------------*/
42 /* The main procedure; replacement for "wish". */
43 /*----------------------------------------------------------------------*/
50 Tcl_Main(argc
, argv
, xcircuit_AppInit
);
54 /*----------------------------------------------------------------------*/