]> git.saurik.com Git - apple/security.git/blob - SecuritySNACCRuntime/c++-lib/c++/tkAppInit.c
Security-54.1.7.tar.gz
[apple/security.git] / SecuritySNACCRuntime / c++-lib / c++ / tkAppInit.c
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 * snacced - Snacc_Init added to the default tkXAppInit.
21 *
22 * $Header: /cvs/root/Security/SecuritySNACCRuntime/c++-lib/c++/Attic/tkAppInit.c,v 1.1.1.1 2001/05/18 23:14:06 mb Exp $
23 * $Log: tkAppInit.c,v $
24 * Revision 1.1.1.1 2001/05/18 23:14:06 mb
25 * Move from private repository to open source repository
26 *
27 * Revision 1.3 2001/05/05 00:59:17 rmurphy
28 * Adding darwin license headers
29 *
30 * Revision 1.2 2000/06/15 18:44:59 dmitch
31 * These snacc-generated source files are now checked in to allow cross-platform build.
32 *
33 * Revision 1.2 2000/06/08 20:05:37 dmitch
34 * Mods for X port. These files are actually machine generated and probably don't need to be in CVS....
35 *
36 * Revision 1.1.1.1 2000/03/09 01:00:06 rmurphy
37 * Base Fortissimo Tree
38 *
39 * Revision 1.1 1999/02/25 05:21:58 mb
40 * Added snacc c++ library
41 *
42 * Revision 1.2 1997/02/28 13:39:48 wan
43 * Modifications collected for new version 1.3: Bug fixes, tk4.2.
44 *
45 * Revision 1.1 1997/01/02 09:07:59 rj
46 * first check-in
47 *
48 */
49
50 #ifndef __APPLE__
51 /* I don't know why this gets configd to build but we don't have tk.h */
52
53 #include "snacc.h"
54
55 #if TCL
56
57 /*
58 * tkXAppInit.c --
59 *
60 * Provides a default version of the TclX_AppInit procedure for use with
61 * applications built with Extended Tcl and Tk. This is based on the
62 * the UCB Tk file tkAppInit.c
63 *
64 *-----------------------------------------------------------------------------
65 * Copyright 1991-1993 Karl Lehenbauer and Mark Diekhans.
66 *
67 * Permission to use, copy, modify, and distribute this software and its
68 * documentation for any purpose and without fee is hereby granted, provided
69 * that the above copyright notice appear in all copies. Karl Lehenbauer and
70 * Mark Diekhans make no representations about the suitability of this
71 * software for any purpose. It is provided "as is" without express or
72 * implied warranty.
73 *-----------------------------------------------------------------------------
74 * $Id: tkAppInit.c,v 1.1.1.1 2001/05/18 23:14:06 mb Exp $
75 *-----------------------------------------------------------------------------
76 * Copyright (c) 1993 The Regents of the University of California.
77 * All rights reserved.
78 *
79 * Permission is hereby granted, without written agreement and without
80 * license or royalty fees, to use, copy, modify, and distribute this
81 * software and its documentation for any purpose, provided that the
82 * above copyright notice and the following two paragraphs appear in
83 * all copies of this software.
84 *
85 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
86 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
87 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
88 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
89 *
90 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
91 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
92 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
93 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
94 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
95 */
96
97 #ifndef lint
98 static char rcsid[] = "$Header: /cvs/root/Security/SecuritySNACCRuntime/c++-lib/c++/Attic/tkAppInit.c,v 1.1.1.1 2001/05/18 23:14:06 mb Exp $ SPRITE (Berkeley)";
99 #endif /* not lint */
100
101 #include <tk.h>
102
103 #include "init.h"
104
105 int
106 main(argc, argv)
107 int argc; /* Number of command-line arguments. */
108 char **argv; /* Values of command-line arguments. */
109 {
110 Tk_Main(argc, argv, Tcl_AppInit);
111 return 0; /* Needed only to prevent compiler warning. */
112 }
113
114 int
115 Tcl_AppInit (interp)
116 Tcl_Interp *interp; /* Interpreter for application. */
117 {
118 if (Tcl_Init(interp) == TCL_ERROR) {
119 return TCL_ERROR;
120 }
121 if (Tk_Init(interp) == TCL_ERROR) {
122 return TCL_ERROR;
123 }
124 Tcl_StaticPackage(interp, "Tk", Tk_Init, (Tcl_PackageInitProc *) NULL);
125
126 if (Snacc_Init (interp) == TCL_ERROR)
127 return TCL_ERROR;
128
129 if (Tree_Init (interp) == TCL_ERROR)
130 return TCL_ERROR;
131
132 Tcl_SetVar (interp, "tcl_rcFileName", "~/.snaccedrc", TCL_GLOBAL_ONLY);
133
134 return TCL_OK;
135 }
136
137 #endif
138
139 #endif // Apple