1/*
2 * tclXwinTest.c --
3 *
4 * Provides a test version of the Tcl_AppInit procedure for use with
5 * applications built with Extended Tcl on  Windows 95/NT systems.
6 *-----------------------------------------------------------------------------
7 * Copyright 1991-1999 Karl Lehenbauer and Mark Diekhans.
8 *
9 * Permission to use, copy, modify, and distribute this software and its
10 * documentation for any purpose and without fee is hereby granted, provided
11 * that the above copyright notice appear in all copies.  Karl Lehenbauer and
12 * Mark Diekhans make no representations about the suitability of this
13 * software for any purpose.  It is provided "as is" without express or
14 * implied warranty.
15 *-----------------------------------------------------------------------------
16 * $Id: tclXwinTest.c,v 1.1 2001/10/24 23:31:50 hobbs Exp $
17 *-----------------------------------------------------------------------------
18 */
19
20#include "tclExtend.h"
21
22extern int
23Tcltest_Init (Tcl_Interp *interp);
24
25extern int
26Tclxtest_Init (Tcl_Interp *interp);
27
28
29/*-----------------------------------------------------------------------------
30 * main --
31 *
32 * This is the main program for the application.
33 *-----------------------------------------------------------------------------
34 */
35int
36main (int    argc,
37      char **argv)
38{
39    TclX_Main (argc, argv, Tcl_AppInit);
40    return 0;                   /* Needed only to prevent compiler warning. */
41}
42
43
44/*-----------------------------------------------------------------------------
45 * Tcl_AppInit --
46 *
47 * This procedure performs application-specific initialization.  Most
48 * applications, especially those that incorporate additional packages, will
49 * have their own version of this procedure.
50 *
51 * Results:
52 *   Returns a standard Tcl completion code, and leaves an error message in
53 *  interp result if an error occurs.
54 *-----------------------------------------------------------------------------
55 */
56int
57Tcl_AppInit (Tcl_Interp *interp)
58{
59    if (Tcl_Init (interp) == TCL_ERROR) {
60        return TCL_ERROR;
61    }
62
63    if (Tclx_Init (interp) == TCL_ERROR) {
64        return TCL_ERROR;
65    }
66    Tcl_StaticPackage (interp, "Tclx", Tclx_Init, Tclx_SafeInit);
67
68    if (Tcltest_Init (interp) == TCL_ERROR) {
69	return TCL_ERROR;
70    }
71    Tcl_StaticPackage(interp, "Tcltest", Tcltest_Init,
72                      (Tcl_PackageInitProc *) NULL);
73
74    if (Tclxtest_Init (interp) == TCL_ERROR) {
75	return TCL_ERROR;
76    }
77    Tcl_StaticPackage(interp, "Tclxtest", Tclxtest_Init,
78                      (Tcl_PackageInitProc *) NULL);
79
80    return TCL_OK;
81}
82
83
84