]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/swig_lib/tcl/expect.i
fix text scrolling in GTK2 (patch 703988)
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / tcl / expect.i
1 //
2 // $Header$
3 // SWIG File for building expect
4 // Dave Beazley
5 // March 18, 1996
6 //
7 /* Revision History
8 * $Log$
9 * Revision 1.1 2002/04/29 19:56:56 RD
10 * Since I have made several changes to SWIG over the years to accomodate
11 * special cases and other things in wxPython, and since I plan on making
12 * several more, I've decided to put the SWIG sources in wxPython's CVS
13 * instead of relying on maintaining patches. This effectivly becomes a
14 * fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still
15 * doesn't have some things I rely on in 1.1, not to mention that my
16 * custom patches would all have to be redone, I felt that this is the
17 * easier road to take.
18 *
19 * Revision 1.2 1999/11/05 21:45:14 beazley
20 * Minor Changes
21 *
22 * Revision 1.1.1.1 1999/02/28 02:00:55 beazley
23 * Swig1.1
24 *
25 * Revision 1.1 1996/05/22 19:47:45 beazley
26 * Initial revision
27 *
28 */
29
30 #ifdef AUTODOC
31 %subsection "expect.i"
32 %text %{
33 This module provides a main() function for building an extended version of
34 Expect. It has been tested with Expect 5.19, but may need modification
35 for newer versions.
36 %}
37 #endif
38
39
40 %{
41
42 /* main.c - main() and some logging routines for expect
43
44 Written by: Don Libes, NIST, 2/6/90
45
46 Design and implementation of this program was paid for by U.S. tax
47 dollars. Therefore it is public domain. However, the author and NIST
48 would appreciate credit if this program or parts of it are used.
49 */
50
51 #include "expect_cf.h"
52 #include <stdio.h>
53 #include "expect_tcl.h"
54
55 void
56 main(argc, argv)
57 int argc;
58 char *argv[];
59 {
60 int rc = 0;
61 Tcl_Interp *interp = Tcl_CreateInterp();
62 int SWIG_init(Tcl_Interp *);
63
64 if (Tcl_Init(interp) == TCL_ERROR) {
65 fprintf(stderr,"Tcl_Init failed: %s\n",interp->result);
66 exit(1);
67 }
68
69 if (Exp_Init(interp) == TCL_ERROR) {
70 fprintf(stderr,"Exp_Init failed: %s\n",interp->result);
71 exit(1);
72 }
73
74 /* SWIG initialization. --- 2/11/96 */
75
76 if (SWIG_init(interp) == TCL_ERROR) {
77 fprintf(stderr,"SWIG initialization failed: %s\n", interp->result);
78 exit(1);
79 }
80
81 exp_parse_argv(interp,argc,argv);
82
83 /* become interactive if requested or "nothing to do" */
84 if (exp_interactive)
85 (void) exp_interpreter(interp);
86 else if (exp_cmdfile)
87 rc = exp_interpret_cmdfile(interp,exp_cmdfile);
88 else if (exp_cmdfilename)
89 rc = exp_interpret_cmdfilename(interp,exp_cmdfilename);
90
91 /* assert(exp_cmdlinecmds != 0) */
92
93 exp_exit(interp,rc);
94 /*NOTREACHED*/
95 }
96
97 %}