|
|
e9b926 |
diff -up expect5.45.4/exp_chan.c.orig expect5.45.4/exp_chan.c
|
|
|
e9b926 |
--- expect5.45.4/exp_chan.c.orig 2018-02-02 20:15:52.000000000 +0100
|
|
|
e9b926 |
+++ expect5.45.4/exp_chan.c 2018-10-10 09:29:44.702617967 +0200
|
|
|
e9b926 |
@@ -51,6 +51,8 @@ static void ExpWatchProc _ANSI_ARGS_((C
|
|
|
e9b926 |
int mask));
|
|
|
e9b926 |
static int ExpGetHandleProc _ANSI_ARGS_((ClientData instanceData,
|
|
|
e9b926 |
int direction, ClientData *handlePtr));
|
|
|
e9b926 |
+void exp_background_channelhandler _ANSI_ARGS_((ClientData,
|
|
|
e9b926 |
+ int));
|
|
|
e9b926 |
|
|
|
e9b926 |
/*
|
|
|
e9b926 |
* This structure describes the channel type structure for Expect-based IO:
|
|
|
e9b926 |
diff -up expect5.45.4/exp_clib.c.orig expect5.45.4/exp_clib.c
|
|
|
e9b926 |
--- expect5.45.4/exp_clib.c.orig 2018-10-10 09:29:44.695617962 +0200
|
|
|
e9b926 |
+++ expect5.45.4/exp_clib.c 2018-10-10 09:29:44.723617980 +0200
|
|
|
e9b926 |
@@ -37,6 +37,14 @@ would appreciate credit if this program
|
|
|
e9b926 |
# endif
|
|
|
e9b926 |
#endif
|
|
|
e9b926 |
|
|
|
e9b926 |
+#ifdef HAVE_UNISTD_H
|
|
|
e9b926 |
+# include <unistd.h>
|
|
|
e9b926 |
+#endif
|
|
|
e9b926 |
+
|
|
|
e9b926 |
+//#ifdef HAVE_SYS_WAIT_H
|
|
|
e9b926 |
+# include <sys/wait.h>
|
|
|
e9b926 |
+//#endif
|
|
|
e9b926 |
+
|
|
|
e9b926 |
#ifdef HAVE_SYS_FCNTL_H
|
|
|
e9b926 |
# include <sys/fcntl.h>
|
|
|
e9b926 |
#else
|
|
|
e9b926 |
@@ -2196,6 +2204,7 @@ int exp_getptyslave();
|
|
|
e9b926 |
#define sysreturn(x) return(errno = x, -1)
|
|
|
e9b926 |
|
|
|
e9b926 |
void exp_init_pty();
|
|
|
e9b926 |
+void exp_init_tty();
|
|
|
e9b926 |
|
|
|
e9b926 |
/*
|
|
|
e9b926 |
The following functions are linked from the Tcl library. They
|
|
|
e9b926 |
@@ -2715,6 +2724,7 @@ exp_spawnl TCL_VARARGS_DEF(char *,arg1)
|
|
|
e9b926 |
argv[i] = va_arg(args,char *);
|
|
|
e9b926 |
if (!argv[i]) break;
|
|
|
e9b926 |
}
|
|
|
e9b926 |
+ va_end(args);
|
|
|
e9b926 |
i = exp_spawnv(argv[0],argv+1);
|
|
|
e9b926 |
free((char *)argv);
|
|
|
e9b926 |
return(i);
|
|
|
e9b926 |
@@ -3188,6 +3198,7 @@ exp_expectl TCL_VARARGS_DEF(int,arg1)
|
|
|
e9b926 |
/* Ultrix 4.2 compiler refuses enumerations comparison!? */
|
|
|
e9b926 |
if ((int)type < 0 || (int)type >= (int)exp_bogus) {
|
|
|
e9b926 |
fprintf(stderr,"bad type (set %d) in exp_expectl\n",i);
|
|
|
e9b926 |
+ va_end(args);
|
|
|
e9b926 |
sysreturn(EINVAL);
|
|
|
e9b926 |
}
|
|
|
e9b926 |
|
|
|
e9b926 |
@@ -3253,6 +3264,7 @@ exp_fexpectl TCL_VARARGS_DEF(FILE *,arg1
|
|
|
e9b926 |
/* Ultrix 4.2 compiler refuses enumerations comparison!? */
|
|
|
e9b926 |
if ((int)type < 0 || (int)type >= (int)exp_bogus) {
|
|
|
e9b926 |
fprintf(stderr,"bad type (set %d) in exp_expectl\n",i);
|
|
|
e9b926 |
+ va_end(args);
|
|
|
e9b926 |
sysreturn(EINVAL);
|
|
|
e9b926 |
}
|
|
|
e9b926 |
|
|
|
e9b926 |
diff -up expect5.45.4/exp_log.c.orig expect5.45.4/exp_log.c
|
|
|
e9b926 |
--- expect5.45.4/exp_log.c.orig 2018-10-10 09:29:44.691617960 +0200
|
|
|
e9b926 |
+++ expect5.45.4/exp_log.c 2018-10-10 09:29:44.703617967 +0200
|
|
|
e9b926 |
@@ -174,7 +174,10 @@ expStdoutLog TCL_VARARGS_DEF(int,arg1)
|
|
|
e9b926 |
force_stdout = TCL_VARARGS_START(int,arg1,args);
|
|
|
e9b926 |
fmt = va_arg(args,char *);
|
|
|
e9b926 |
|
|
|
e9b926 |
- if ((!tsdPtr->logUser) && (!force_stdout) && (!tsdPtr->logAll)) return;
|
|
|
e9b926 |
+ if ((!tsdPtr->logUser) && (!force_stdout) && (!tsdPtr->logAll)) {
|
|
|
e9b926 |
+ va_end(args);
|
|
|
e9b926 |
+ return;
|
|
|
e9b926 |
+ }
|
|
|
e9b926 |
|
|
|
e9b926 |
(void) vsnprintf(bigbuf,sizeof(bigbuf),fmt,args);
|
|
|
e9b926 |
expDiagWriteBytes(bigbuf,-1);
|
|
|
e9b926 |
diff -up expect5.45.4/exp_main_sub.c.orig expect5.45.4/exp_main_sub.c
|
|
|
e9b926 |
--- expect5.45.4/exp_main_sub.c.orig 2018-02-04 11:43:58.000000000 +0100
|
|
|
e9b926 |
+++ expect5.45.4/exp_main_sub.c 2018-10-10 09:29:44.703617967 +0200
|
|
|
e9b926 |
@@ -57,6 +57,7 @@ int exp_cmdlinecmds = FALSE;
|
|
|
e9b926 |
int exp_interactive = FALSE;
|
|
|
e9b926 |
int exp_buffer_command_input = FALSE;/* read in entire cmdfile at once */
|
|
|
e9b926 |
int exp_fgets();
|
|
|
e9b926 |
+int exp_tty_cooked_echo(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo);
|
|
|
e9b926 |
|
|
|
e9b926 |
Tcl_Interp *exp_interp; /* for use by signal handlers who can't figure out */
|
|
|
e9b926 |
/* the interpreter directly */
|
|
|
e9b926 |
diff -up expect5.45.4/pty_termios.c.orig expect5.45.4/pty_termios.c
|
|
|
e9b926 |
--- expect5.45.4/pty_termios.c.orig 2018-02-02 20:15:52.000000000 +0100
|
|
|
e9b926 |
+++ expect5.45.4/pty_termios.c 2018-10-10 09:29:44.703617967 +0200
|
|
|
e9b926 |
@@ -105,6 +105,7 @@ with openpty which supports 4000 while p
|
|
|
e9b926 |
|
|
|
e9b926 |
void expDiagLog();
|
|
|
e9b926 |
void expDiagLogPtr();
|
|
|
e9b926 |
+char *expErrnoMsg(int errorNo);
|
|
|
e9b926 |
|
|
|
e9b926 |
#include <errno.h>
|
|
|
e9b926 |
/*extern char *sys_errlist[];*/
|
|
|
e9b926 |
@@ -189,6 +190,7 @@ static char slave_name[MAXPTYNAMELEN];
|
|
|
e9b926 |
#endif /* HAVE_SCO_CLIST_PTYS */
|
|
|
e9b926 |
|
|
|
e9b926 |
#ifdef HAVE_OPENPTY
|
|
|
e9b926 |
+#include <pty.h>
|
|
|
e9b926 |
static char master_name[64];
|
|
|
e9b926 |
static char slave_name[64];
|
|
|
e9b926 |
#endif
|