3 // SWIG File for building expect
 
   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.
 
  19  * Revision 1.2  1999/11/05 21:45:14  beazley
 
  22  * Revision 1.1.1.1  1999/02/28 02:00:55  beazley
 
  25  * Revision 1.1  1996/05/22 19:47:45  beazley
 
  31 %subsection "expect.i"
 
  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
 
  42 /* main.c - main() and some logging routines for expect
 
  44 Written by: Don Libes, NIST, 2/6/90
 
  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.
 
  51 #include "expect_cf.h"
 
  53 #include "expect_tcl.h"
 
  61         Tcl_Interp *interp = Tcl_CreateInterp();
 
  62         int SWIG_init(Tcl_Interp *);
 
  64         if (Tcl_Init(interp) == TCL_ERROR) {
 
  65                 fprintf(stderr,"Tcl_Init failed: %s\n",interp->result);
 
  69         if (Exp_Init(interp) == TCL_ERROR) {
 
  70                 fprintf(stderr,"Exp_Init failed: %s\n",interp->result);
 
  74         /* SWIG initialization. --- 2/11/96  */
 
  76         if (SWIG_init(interp) == TCL_ERROR) {
 
  77                 fprintf(stderr,"SWIG initialization failed: %s\n", interp->result);
 
  81         exp_parse_argv(interp,argc,argv);
 
  83         /* become interactive if requested or "nothing to do" */
 
  85                 (void) exp_interpreter(interp);
 
  87                 rc = exp_interpret_cmdfile(interp,exp_cmdfile);
 
  88         else if (exp_cmdfilename)
 
  89                 rc = exp_interpret_cmdfilename(interp,exp_cmdfilename);
 
  91         /* assert(exp_cmdlinecmds != 0) */