FILE(2/2): tkAppInit.c & tcl-dp3.2 with tcl/tk4.0b3 
Author Message
 FILE(2/2): tkAppInit.c & tcl-dp3.2 with tcl/tk4.0b3

/*
 * tkAppInit.c --
 *
 *      Provides a default version of the Tcl_AppInit procedure for
 *      use in wish and similar Tk-based applications.
 *
 * Copyright (c) 1993 The Regents of the University of California.
 * All rights reserved.
 *
 * Permission is hereby granted, without written agreement and without
 * license or royalty fees, to use, copy, modify, and distribute this
 * software and its documentation for any purpose, provided that the
 * above copyright notice and the following two paragraphs appear in
 * all copies of this software.
 *
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 */

#include <tcl.h>
#include <tk.h>
#include "dpInt.h"
extern    char *dp_RcFileName;

/*
 *----------------------------------------------------------------------
 *
 * Tcl_AppInit --
 *
 *      This procedure performs application-specific initialization.
 *      Most applications, especially those that incorporate additional
 *      packages, will have their own version of this procedure.
 *
 * Results:
 *      Returns a standard Tcl completion code, and leaves an error
 *      message in interp->result if an error occurs.
 *
 * Side effects:
 *      Depends on the startup script.
 *
 *----------------------------------------------------------------------
 */

int
Tcl_AppInit(interp)
    Tcl_Interp *interp;         /* Interpreter for application. */
{
#ifndef NO_X11
    Tk_Window main;

    main = Tk_MainWindow(interp);
#endif

    /*
     * Call the init procedures for included packages.  Each call should
     * look like this:
     *
     * if (Mod_Init(interp) == TCL_ERROR) {
     *     return TCL_ERROR;
     * }
     *
     * where "Mod" is the name of the module.
     */

    if (Tcl_Init(interp) == TCL_ERROR) {
        return TCL_ERROR;
    }

#ifndef NO_X11
    if (main && Tk_Init(interp) == TCL_ERROR) {
        return TCL_ERROR;
    }
#endif

    /*
     * Call Tcl_CreateCommand for application-specific commands, if
     * they weren't already created by the init procedures called above.
     */
    if (Tdp_Init(interp) == TCL_ERROR) {
        return TCL_ERROR;
    }

    /*
     * Specify a user-specific startup file to invoke if the application
     * is run interactively.  Typically the startup file is "~/.apprc"
     * where "app" is the name of the application.  If this line is deleted
     * then no user-specific startup file will be run under any conditions.
     */

    dp_RcFileName = "~/.dpwishrc";
    return TCL_OK;

Quote:
}



Mon, 10 Nov 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. FILE(1/2): tkMain.c for tcl-dp3.2 and tcl/tk4.0b3

2. tcl-dp3.3b1, tcl7.4 and tk4.0

3. Tcl/Tk4.0b3 locale problem.

4. installing tk4.0b3 and tcl 7.4b3

5. tcl-dp3.1 and Tcl

6. Tcl version mismatch with tkAppInit.c

7. dde package - buggy pkgIndex.tcl file in /Tcl/lib/tcl.8.4/dde1.1

8. Tcl-DP3.3b1 on Linux

9. Need Tcl-dp3.4x

10. Tcl-dp3.3b1

11. compile tcl-dp3.4b2

12. Where is tcl-dp3.4 source ??

 

 
Powered by phpBB® Forum Software