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