4 * Provides a default version of the Tcl_AppInit procedure for
7 * Copyright (c) 1993 The Regents of the University of California.
8 * Copyright (c) 1994 Sun Microsystems, Inc.
9 * Copyright (c) 1995 Christian Werner.
11 * See the file "license.terms" for information on usage and redistribution
12 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
18 * The following variable is a special hack that is needed in order for
19 * Sun shared libraries to be used for Tcl.
24 int *tclDummyMathPtr = (int *) matherr;
28 *----------------------------------------------------------------------
32 * This is the main program for the application.
35 * None: Ck_Main never returns here, so this procedure never
39 * Whatever the application does.
41 *----------------------------------------------------------------------
46 int argc; /* Number of command-line arguments. */
47 char **argv; /* Values of command-line arguments. */
49 Ck_Main(argc, argv, Tcl_AppInit);
50 return 0; /* Needed only to prevent compiler warning. */
54 *----------------------------------------------------------------------
58 * This procedure performs application-specific initialization.
59 * Most applications, especially those that incorporate additional
60 * packages, will have their own version of this procedure.
63 * Returns a standard Tcl completion code, and leaves an error
64 * message in interp->result if an error occurs.
67 * Depends on the startup script.
69 *----------------------------------------------------------------------
74 Tcl_Interp *interp; /* Interpreter for application. */
76 if (Tcl_Init(interp) == TCL_ERROR) {
80 if (Ck_Init(interp) == TCL_ERROR) {
84 #if !((TCL_MAJOR_VERSION == 7) && (TCL_MINOR_VERSION <= 4))
85 Tcl_StaticPackage(interp, "Ck", Ck_Init, (Tcl_PackageInitProc *) NULL);
89 * Call the init procedures for included packages. Each call should
92 * if (Mod_Init(interp) == TCL_ERROR) {
96 * where "Mod" is the name of the module.
100 * Call Tcl_CreateCommand for application-specific commands, if
101 * they weren't already created by the init procedures called above.
105 * Specify a user-specific startup file to invoke if the application
106 * is run interactively. Typically the startup file is "~/.apprc"
107 * where "app" is the name of the application. If this line is deleted
108 * then no user-specific startup file will be run under any conditions.
112 # define CWSHRC "cwsh.rc"
114 # define CWSHRC ".cwshrc"
117 #if (TCL_MAJOR_VERSION == 7) && (TCL_MINOR_VERSION <= 4)
118 tcl_RcFileName = "~/" CWSHRC;
120 Tcl_SetVar(interp, "tcl_rcFileName", "~/" CWSHRC, TCL_GLOBAL_ONLY);