diff --git a/exp_chan.c b/exp_chan.c index 79f486c..c92e26b 100644 --- a/exp_chan.c +++ b/exp_chan.c @@ -51,6 +51,8 @@ static void ExpWatchProc _ANSI_ARGS_((ClientData instanceData, int mask)); static int ExpGetHandleProc _ANSI_ARGS_((ClientData instanceData, int direction, ClientData *handlePtr)); +void exp_background_channelhandler _ANSI_ARGS_((ClientData, + int)); /* * This structure describes the channel type structure for Expect-based IO: diff --git a/exp_clib.c b/exp_clib.c index 3127d61..6c6601c 100644 --- a/exp_clib.c +++ b/exp_clib.c @@ -37,6 +37,14 @@ would appreciate credit if this program or parts of it are used. # endif #endif +#ifdef HAVE_UNISTD_H +# include +#endif + +//#ifdef HAVE_SYS_WAIT_H +# include +//#endif + #ifdef HAVE_SYS_FCNTL_H # include #else @@ -2196,6 +2204,7 @@ int exp_getptyslave(); #define sysreturn(x) return(errno = x, -1) void exp_init_pty(); +void exp_init_tty(); /* The following functions are linked from the Tcl library. They @@ -2715,6 +2724,7 @@ exp_spawnl TCL_VARARGS_DEF(char *,arg1) argv[i] = va_arg(args,char *); if (!argv[i]) break; } + va_end(args); i = exp_spawnv(argv[0],argv+1); free((char *)argv); return(i); @@ -3188,6 +3198,7 @@ exp_expectl TCL_VARARGS_DEF(int,arg1) /* Ultrix 4.2 compiler refuses enumerations comparison!? */ if ((int)type < 0 || (int)type >= (int)exp_bogus) { fprintf(stderr,"bad type (set %d) in exp_expectl\n",i); + va_end(args); sysreturn(EINVAL); } @@ -3253,6 +3264,7 @@ exp_fexpectl TCL_VARARGS_DEF(FILE *,arg1) /* Ultrix 4.2 compiler refuses enumerations comparison!? */ if ((int)type < 0 || (int)type >= (int)exp_bogus) { fprintf(stderr,"bad type (set %d) in exp_expectl\n",i); + va_end(args); sysreturn(EINVAL); } diff --git a/exp_log.c b/exp_log.c index 225ad48..4131720 100644 --- a/exp_log.c +++ b/exp_log.c @@ -174,7 +174,10 @@ expStdoutLog TCL_VARARGS_DEF(int,arg1) force_stdout = TCL_VARARGS_START(int,arg1,args); fmt = va_arg(args,char *); - if ((!tsdPtr->logUser) && (!force_stdout) && (!tsdPtr->logAll)) return; + if ((!tsdPtr->logUser) && (!force_stdout) && (!tsdPtr->logAll)) { + va_end(args); + return; + } (void) vsnprintf(bigbuf,sizeof(bigbuf),fmt,args); expDiagWriteBytes(bigbuf,-1); diff --git a/exp_main_sub.c b/exp_main_sub.c index 66fa48a..0732736 100644 --- a/exp_main_sub.c +++ b/exp_main_sub.c @@ -57,6 +57,7 @@ int exp_cmdlinecmds = FALSE; int exp_interactive = FALSE; int exp_buffer_command_input = FALSE;/* read in entire cmdfile at once */ int exp_fgets(); +int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); Tcl_Interp *exp_interp; /* for use by signal handlers who can't figure out */ /* the interpreter directly */ diff --git a/pty_termios.c b/pty_termios.c index c605b23..d78658a 100644 --- a/pty_termios.c +++ b/pty_termios.c @@ -105,6 +105,7 @@ with openpty which supports 4000 while ptmx supports 60. */ void expDiagLog(); void expDiagLogPtr(); +char *expErrnoMsg(int errorNo); #include /*extern char *sys_errlist[];*/ @@ -189,6 +190,7 @@ static char slave_name[MAXPTYNAMELEN]; #endif /* HAVE_SCO_CLIST_PTYS */ #ifdef HAVE_OPENPTY +#include static char master_name[64]; static char slave_name[64]; #endif