From f22e10095d99d1f13e18695b98089572caf9ed1e7bbeaa512dbfeeb5b47f35fd Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 7 May 2008 19:53:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/expect?expand=0&rev=4 --- expect-warnings.patch | 950 +++++++++++++++++++++--------------------- expect.changes | 5 + expect.spec | 4 +- 3 files changed, 493 insertions(+), 466 deletions(-) diff --git a/expect-warnings.patch b/expect-warnings.patch index bf66324..a12dc7a 100644 --- a/expect-warnings.patch +++ b/expect-warnings.patch @@ -1,8 +1,8 @@ Index: exp_command.c -=================================================================== ---- exp_command.c.orig +================================================================================ +--- exp_command.c +++ exp_command.c -@@ -29,7 +29,6 @@ would appreciate credit if this program +@@ -29,7 +29,6 @@ # include #endif #include @@ -10,7 +10,7 @@ Index: exp_command.c #include #include -@@ -66,6 +65,7 @@ would appreciate credit if this program +@@ -66,6 +65,7 @@ #include "tcl.h" #include "string.h" @@ -18,7 +18,7 @@ Index: exp_command.c #include "expect_tcl.h" #include "exp_rename.h" #include "exp_prog.h" -@@ -73,6 +73,7 @@ would appreciate credit if this program +@@ -73,6 +73,7 @@ #include "exp_log.h" #include "exp_event.h" #include "exp_pty.h" @@ -26,7 +26,7 @@ Index: exp_command.c #ifdef TCL_DEBUGGER #include "tcldbg.h" #endif -@@ -86,8 +87,8 @@ would appreciate credit if this program +@@ -86,8 +87,8 @@ #define SPAWN_ID_VARNAME "spawn_id" @@ -37,7 +37,7 @@ Index: exp_command.c int exp_forked = FALSE; /* whether we are child process */ -@@ -151,8 +152,7 @@ static Tcl_ThreadDataKey dataKey; +@@ -151,8 +152,7 @@ #ifdef FULLTRAPS static void @@ -47,7 +47,7 @@ Index: exp_command.c { int i; -@@ -183,11 +183,11 @@ exp_error TCL_VARARGS_DEF(Tcl_Interp *,a +@@ -183,11 +183,11 @@ /* returns current ExpState or 0. If 0, may be immediately followed by return TCL_ERROR. */ struct ExpState * @@ -64,7 +64,7 @@ Index: exp_command.c { static char *user_spawn_id = "exp0"; -@@ -198,12 +198,12 @@ expStateCurrent(interp,opened,adjust,any +@@ -198,12 +198,12 @@ } ExpState * @@ -83,7 +83,7 @@ Index: exp_command.c { if (open && !esPtr->open) { exp_error(interp,"%s: spawn id %s not open",msg,esPtr->name); -@@ -214,12 +214,13 @@ expStateCheck(interp,esPtr,open,adjust,m +@@ -214,12 +214,13 @@ } ExpState * @@ -103,7 +103,7 @@ Index: exp_command.c { ExpState *esPtr; Tcl_Channel channel; -@@ -248,8 +249,7 @@ expStateFromChannelName(interp,name,open +@@ -248,8 +249,7 @@ /* zero out the wait status field */ static void @@ -113,7 +113,7 @@ Index: exp_command.c { int i; -@@ -260,9 +260,9 @@ WAIT_STATUS_TYPE *status; +@@ -260,9 +260,9 @@ /* called just before an ExpState entry is about to be invalidated */ void @@ -126,7 +126,7 @@ Index: exp_command.c { exp_ecmd_remove_state_direct_and_indirect(interp,esPtr); -@@ -275,8 +275,7 @@ ExpState *esPtr; +@@ -275,8 +275,7 @@ /*ARGSUSED*/ void @@ -136,7 +136,7 @@ Index: exp_command.c { #ifdef HAVE_PTYTRAP if (master == -1) return; -@@ -285,8 +284,7 @@ int master; +@@ -285,8 +284,7 @@ } int @@ -146,7 +146,7 @@ Index: exp_command.c { #ifdef HAVE_PTYTRAP ExpState *esPtr; -@@ -310,8 +308,7 @@ char *name; +@@ -310,8 +308,7 @@ static void @@ -156,7 +156,7 @@ Index: exp_command.c { int x = open("/dev/null",0); if (x != esPtr->fdin) { -@@ -323,9 +320,9 @@ expBusy(esPtr) +@@ -323,9 +320,9 @@ } int @@ -169,7 +169,7 @@ Index: exp_command.c { if (0 == expStateCheck(interp,esPtr,1,0,"close")) return TCL_ERROR; esPtr->open = FALSE; -@@ -404,8 +401,7 @@ exp_close(interp,esPtr) +@@ -404,8 +401,7 @@ /* we need a separate function because spawn_id_any is thread-specific */ /* and can't be seen outside this file */ int @@ -179,7 +179,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -413,8 +409,7 @@ expStateAnyIs(esPtr) +@@ -413,8 +409,7 @@ } int @@ -189,7 +189,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -422,8 +417,7 @@ expDevttyIs(esPtr) +@@ -422,8 +417,7 @@ } int @@ -199,7 +199,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -447,8 +441,7 @@ expDevttyGet() +@@ -447,8 +441,7 @@ } void @@ -209,7 +209,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -467,8 +460,7 @@ exp_init_spawn_id_vars(interp) +@@ -467,8 +460,7 @@ } void @@ -219,7 +219,7 @@ Index: exp_command.c { static ExpState any_placeholder; /* can be shared process-wide */ -@@ -504,8 +496,7 @@ exp_init_spawn_ids(interp) +@@ -504,8 +496,7 @@ } void @@ -229,7 +229,7 @@ Index: exp_command.c { (void) fcntl(fd,F_SETFD,1); } -@@ -516,9 +507,9 @@ expCloseOnExec(fd) +@@ -516,9 +507,9 @@ /* * DEBUGGING UTILITIES - DON'T DELETE */ static void @@ -242,7 +242,7 @@ Index: exp_command.c { int pgrp; -@@ -532,8 +523,7 @@ show_pgrp(fd,string) +@@ -532,8 +523,7 @@ } static void @@ -252,7 +252,7 @@ Index: exp_command.c { int pgrp = getpgrp(0); if (-1 == ioctl(fd,TIOCSETPGRP,&pgrp)) perror("TIOCSETPGRP"); -@@ -562,9 +552,9 @@ expSetpgrp() +@@ -562,9 +552,9 @@ /*ARGSUSED*/ static void @@ -265,7 +265,7 @@ Index: exp_command.c { #ifdef HAVE_PTYTRAP int newptr; -@@ -582,11 +572,11 @@ set_slave_name(esPtr,name) +@@ -582,11 +572,11 @@ /* arguments are passed verbatim to execvp() */ /*ARGSUSED*/ static int @@ -282,7 +282,7 @@ Index: exp_command.c { ExpState *esPtr = 0; int slave; -@@ -910,16 +900,16 @@ Exp_SpawnObjCmd(clientData,interp,objc,o +@@ -910,16 +900,16 @@ return TCL_ERROR; } if (mode & TCL_READABLE) { @@ -303,7 +303,7 @@ Index: exp_command.c } master = ((mode & TCL_READABLE)?rfd:wfd); -@@ -1346,7 +1336,7 @@ Exp_SpawnObjCmd(clientData,interp,objc,o +@@ -1346,7 +1336,7 @@ } argv[k] = NULL; @@ -312,7 +312,7 @@ Index: exp_command.c for (k=0,i=cmdIndex;inext) exp_free_i(interp,i->next,updateproc); -@@ -1781,12 +1768,12 @@ exp_free_i(interp,i,updateproc) +@@ -1781,12 +1768,12 @@ /* can only fail on bad direct descriptors */ /* indirect descriptors always succeed */ struct exp_i * @@ -487,7 +487,7 @@ Index: exp_command.c { struct exp_i *i; char **stringp; -@@ -1829,9 +1816,9 @@ exp_new_i_complex(interp,arg,duration,up +@@ -1829,9 +1816,9 @@ } void @@ -500,7 +500,7 @@ Index: exp_command.c { struct exp_state_list *new_state; -@@ -1844,9 +1831,9 @@ exp_i_add_state(i,esPtr) +@@ -1844,9 +1831,9 @@ /* returns TCL_ERROR only on direct */ /* indirects always succeed */ static int @@ -513,7 +513,7 @@ Index: exp_command.c { struct ExpState *esPtr; char *p = i->value; -@@ -1873,9 +1860,9 @@ exp_i_parse_states(interp,i) /* INTL */ +@@ -1873,9 +1860,9 @@ /* return TCL_ERROR only on direct variables */ /* indirect variables always succeed */ int @@ -526,7 +526,7 @@ Index: exp_command.c { char *p; /* string representation of list of spawn ids */ -@@ -1907,9 +1894,9 @@ exp_i_update(interp,i) +@@ -1907,9 +1894,9 @@ } struct exp_i * @@ -539,7 +539,7 @@ Index: exp_command.c /* should only need do this in expect_before/after */ { struct exp_i *i; -@@ -1926,11 +1913,11 @@ exp_new_i_simple(esPtr,duration) +@@ -1926,11 +1913,11 @@ /*ARGSUSED*/ static int @@ -556,7 +556,7 @@ Index: exp_command.c { static char* options[] = { "--", NULL }; enum options { LOG_QUOTE }; -@@ -1970,11 +1957,11 @@ Exp_SendLogObjCmd(clientData, interp, ob +@@ -1970,11 +1957,11 @@ /* you should quote all your send args to make them one single argument. */ /*ARGSUSED*/ static int @@ -573,7 +573,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); ExpState *esPtr = 0; -@@ -2168,11 +2155,11 @@ Exp_SendObjCmd(clientData, interp, objc, +@@ -2168,11 +2155,11 @@ /*ARGSUSED*/ static int @@ -590,7 +590,7 @@ Index: exp_command.c { static char resultbuf[1000]; char *chanName = 0; -@@ -2301,11 +2288,11 @@ Exp_LogFileObjCmd(clientData, interp, ob +@@ -2301,11 +2288,11 @@ /*ARGSUSED*/ static int @@ -607,7 +607,7 @@ Index: exp_command.c { int old_loguser = expLogUserGet(); -@@ -2333,11 +2320,11 @@ Exp_LogUserObjCmd(clientData, interp, ob +@@ -2333,11 +2320,11 @@ #ifdef TCL_DEBUGGER /*ARGSUSED*/ static int @@ -624,7 +624,7 @@ Index: exp_command.c { int now = FALSE; /* soon if FALSE, now if TRUE */ int exp_tcl_debugger_was_available = exp_tcl_debugger_available; -@@ -2403,11 +2390,11 @@ Exp_DebugObjCmd(clientData, interp, objc +@@ -2403,11 +2390,11 @@ /*ARGSUSED*/ static int @@ -641,7 +641,7 @@ Index: exp_command.c { int newChannel = FALSE; Tcl_Channel oldChannel; -@@ -2483,11 +2470,11 @@ char *exp_onexit_action = 0; +@@ -2483,11 +2470,11 @@ /*ARGSUSED*/ static int @@ -658,7 +658,7 @@ Index: exp_command.c { int value = 0; -@@ -2534,20 +2521,21 @@ Exp_ExitObjCmd(clientData, interp, objc, +@@ -2534,20 +2521,21 @@ Tcl_Eval(interp, "rename _close.pre_expect close"); Tcl_Exit(value); /*NOTREACHED*/ @@ -686,7 +686,7 @@ Index: exp_command.c "-strictwrite", NULL }; enum options { -@@ -2579,11 +2567,11 @@ Exp_ConfigureObjCmd(clientData, interp, +@@ -2579,11 +2567,11 @@ /*ARGSUSED*/ static int @@ -703,7 +703,7 @@ Index: exp_command.c { int onexec_flag = FALSE; /* true if -onexec seen */ int close_onexec; -@@ -2690,14 +2678,14 @@ Exp_CloseObjCmd(clientData, interp, objc +@@ -2690,14 +2678,14 @@ /*ARGSUSED*/ static int @@ -726,7 +726,7 @@ Index: exp_command.c { int i; -@@ -2710,19 +2698,18 @@ tcl_tracer(clientData,interp,level,comma +@@ -2710,19 +2698,18 @@ } static void @@ -752,7 +752,7 @@ Index: exp_command.c { static int trace_level = 0; static Tcl_Trace trace_handle; -@@ -2829,9 +2816,9 @@ fork_clear_all() +@@ -2829,9 +2816,9 @@ } void @@ -765,7 +765,7 @@ Index: exp_command.c { f->pid = pid; f->link_status = wait_not_done; -@@ -2839,8 +2826,7 @@ fork_init(f,pid) +@@ -2839,8 +2826,7 @@ /* make an entry for a new proc */ void @@ -775,7 +775,7 @@ Index: exp_command.c { struct forked_proc *f; -@@ -2873,11 +2859,11 @@ fork_add(pid) +@@ -2873,11 +2859,11 @@ */ /*ARGSUSED*/ static int @@ -792,7 +792,7 @@ Index: exp_command.c { char *chanName = 0; struct ExpState *esPtr; -@@ -2940,7 +2926,7 @@ Exp_WaitObjCmd(clientData, interp, objc, +@@ -2940,7 +2926,7 @@ /* are marked sys_waited already */ if (!esPtr->sys_waited) { if (nowait) { @@ -801,7 +801,7 @@ Index: exp_command.c /* should probably generate an error */ /* if SIGCHLD is trapped. */ -@@ -3086,11 +3072,11 @@ Exp_WaitObjCmd(clientData, interp, objc, +@@ -3086,11 +3072,11 @@ /*ARGSUSED*/ static int @@ -818,7 +818,7 @@ Index: exp_command.c { int rc; if (objc > 1) { -@@ -3120,11 +3106,11 @@ Exp_ForkObjCmd(clientData, interp, objc, +@@ -3120,11 +3106,11 @@ /*ARGSUSED*/ static int @@ -835,7 +835,7 @@ Index: exp_command.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -3230,11 +3216,11 @@ Exp_DisconnectObjCmd(clientData, interp, +@@ -3230,11 +3216,11 @@ /*ARGSUSED*/ static int @@ -852,7 +852,7 @@ Index: exp_command.c { int newfd, oldfd; int dash_name = 0; -@@ -3317,11 +3303,11 @@ Exp_OverlayObjCmd(clientData, interp, ob +@@ -3317,11 +3303,11 @@ /*ARGSUSED*/ int @@ -869,7 +869,7 @@ Index: exp_command.c { Tcl_Obj *eofObj = 0; int i; -@@ -3365,11 +3351,11 @@ Exp_InterpreterObjCmd(clientData, interp +@@ -3365,11 +3351,11 @@ /* this command supercede's Tcl's builtin CONTINUE command */ /*ARGSUSED*/ int @@ -886,7 +886,7 @@ Index: exp_command.c { if (objc == 1) { return EXP_CONTINUE; -@@ -3385,11 +3371,11 @@ Exp_ExpContinueObjCmd(clientData, interp +@@ -3385,11 +3371,11 @@ /* most of this is directly from Tcl's definition for return */ /*ARGSUSED*/ int @@ -903,7 +903,7 @@ Index: exp_command.c { /* let Tcl's return command worry about args */ /* if successful (i.e., TCL_RETURN is returned) */ -@@ -3406,11 +3392,11 @@ Exp_InterReturnObjCmd(clientData, interp +@@ -3406,11 +3392,11 @@ /*ARGSUSED*/ int @@ -920,7 +920,7 @@ Index: exp_command.c { ExpState *esPtr; char *chanName = 0; -@@ -3469,7 +3455,7 @@ Exp_OpenObjCmd(clientData, interp, objc, +@@ -3469,7 +3455,7 @@ if (!leaveopen) { /* remove from Expect's memory in anticipation of passing to Tcl */ if (esPtr->pid != EXP_NOPID) { @@ -929,7 +929,7 @@ Index: exp_command.c Tcl_DetachPids(1,&pid); esPtr->pid = EXP_NOPID; esPtr->sys_waited = esPtr->user_waited = TRUE; -@@ -3486,7 +3472,7 @@ Exp_OpenObjCmd(clientData, interp, objc, +@@ -3486,7 +3472,7 @@ * Oh, and we're also being rather cavalier with the permissions here, * but they're likely to be right for the same reasons. */ @@ -938,7 +938,7 @@ Index: exp_command.c Tcl_RegisterChannel(interp, channel); Tcl_AppendResult(interp, Tcl_GetChannelName(channel), (char *) NULL); return TCL_OK; -@@ -3499,10 +3485,10 @@ Exp_OpenObjCmd(clientData, interp, objc, +@@ -3499,10 +3485,10 @@ /* return 1 if a string is substring of a flag */ /* this version is the code used by the macro that everyone calls */ int @@ -953,7 +953,7 @@ Index: exp_command.c { for (;*flag;flag++,string++,minlen--) { if (*string == '\0') break; -@@ -3579,8 +3565,7 @@ static struct exp_cmd_data cmd_data[] = +@@ -3579,8 +3565,7 @@ {0}}; void @@ -963,257 +963,9 @@ Index: exp_command.c { exp_create_commands(interp,cmd_data); -Index: exp_pty.h -=================================================================== ---- exp_pty.h.orig -+++ exp_pty.h -@@ -8,10 +8,12 @@ would appreciate credit if this program - - */ - --int exp_pty_test_start(); --void exp_pty_test_end(); --int exp_pty_test(); --void exp_pty_unlock(); --int exp_pty_lock(); -+int exp_pty_test_start(void); -+void exp_pty_test_end(void); -+int exp_pty_test(char *master_name, char *slave_name, char bank, char *num); -+void exp_pty_unlock(void); -+int exp_pty_lock(char bank, char *num); -+int exp_getptymaster(void); -+int exp_getptyslave(int ttycopy, int ttyinit, CONST char *stty_args); - - extern char *exp_pty_slave_name; -Index: exp_tty.c -=================================================================== ---- exp_tty.c.orig -+++ exp_tty.c -@@ -50,21 +50,20 @@ int exp_stdout_is_tty; - #define tty_cooked exp_tty_cooked - - int --exp_israw() -+exp_israw(void) - { - return is_raw; - } - - int --exp_isecho() -+exp_isecho(void) - { - return !is_noecho; - } - - /* if set == 1, set it to raw, else unset it */ - void --exp_tty_raw(set) --int set; -+exp_tty_raw(int set) - { - if (set == 1) { - is_raw = TRUE; -@@ -95,8 +94,7 @@ int set; - } - - void --exp_tty_echo(set) --int set; -+exp_tty_echo(int set) - { - if (set == 1) { - is_noecho = FALSE; -@@ -114,8 +112,7 @@ int set; - } - - int --exp_tty_set_simple(tty) --exp_tty *tty; -+exp_tty_set_simple(exp_tty *tty) - { - #ifdef HAVE_TCSETATTR - return(tcsetattr(exp_dev_tty, TCSADRAIN,tty)); -@@ -125,8 +122,7 @@ exp_tty *tty; - } - - int --exp_tty_get_simple(tty) --exp_tty *tty; -+exp_tty_get_simple(exp_tty *tty) - { - #ifdef HAVE_TCSETATTR - return(tcgetattr(exp_dev_tty, tty)); -@@ -138,10 +134,11 @@ exp_tty *tty; - /* returns 0 if nothing changed */ - /* if something changed, the out parameters are changed as well */ - int --exp_tty_raw_noecho(interp,tty_old,was_raw,was_echo) --Tcl_Interp *interp; --exp_tty *tty_old; --int *was_raw, *was_echo; -+exp_tty_raw_noecho( -+ Tcl_Interp *interp, -+ exp_tty *tty_old, -+ int *was_raw, -+ int *was_echo) - { - if (exp_disconnected) return(0); - if (is_raw && is_noecho) return(0); -@@ -173,10 +170,11 @@ int *was_raw, *was_echo; - /* returns 0 if nothing changed */ - /* if something changed, the out parameters are changed as well */ - int --exp_tty_cooked_echo(interp,tty_old,was_raw,was_echo) --Tcl_Interp *interp; --exp_tty *tty_old; --int *was_raw, *was_echo; -+exp_tty_cooked_echo( -+ Tcl_Interp *interp, -+ exp_tty *tty_old, -+ int *was_raw, -+ int *was_echo) - { - if (exp_disconnected) return(0); - if (!is_raw && !is_noecho) return(0); -@@ -206,11 +204,11 @@ int *was_raw, *was_echo; - } - - void --exp_tty_set(interp,tty,raw,echo) --Tcl_Interp *interp; --exp_tty *tty; --int raw; --int echo; -+exp_tty_set( -+ Tcl_Interp *interp, -+ exp_tty *tty, -+ int raw, -+ int echo) - { - if (exp_tty_set_simple(tty) == -1) { - expErrorLog("ioctl(set): %s\r\n",Tcl_PosixError(interp)); -@@ -258,9 +256,9 @@ exp_init_stdio() - - /*ARGSUSED*/ - void --exp_tty_break(interp,fd) --Tcl_Interp *interp; --int fd; -+exp_tty_break( -+ Tcl_Interp *interp, -+ int fd) - { - #ifdef POSIX - tcsendbreak(fd,0); -@@ -280,9 +278,9 @@ int fd; - /* If len == 0, use strlen to compute it */ - /* NB: if terminal is not in raw mode, nothing is done. */ - char * --exp_cook(s,len) --char *s; --int *len; /* current and new length of s */ -+exp_cook( -+ char *s, -+ int *len) /* current and new length of s */ - { - static int destlen = 0; - static char *dest = 0; -@@ -315,11 +313,11 @@ int *len; /* current and new length of s - } - - static int /* returns TCL_whatever */ --exec_stty(interp,argc,argv,devtty) --Tcl_Interp *interp; --int argc; --char **argv; --int devtty; /* if true, redirect to /dev/tty */ -+exec_stty( -+ Tcl_Interp *interp, -+ int argc, -+ char **argv, -+ int devtty) /* if true, redirect to /dev/tty */ - { - int i; - int rc; -@@ -368,11 +366,11 @@ int devtty; /* if true, redirect to /de - - /*ARGSUSED*/ - static int --Exp_SttyCmd(clientData, interp, argc, argv) --ClientData clientData; --Tcl_Interp *interp; --int argc; --char **argv; -+Exp_SttyCmd( -+ ClientData clientData, -+ Tcl_Interp *interp, -+ int argc, -+ char **argv) - { - /* redirection symbol is not counted as a stty arg in terms */ - /* of recognition. */ -@@ -567,11 +565,11 @@ char **argv; - - /*ARGSUSED*/ - static int --Exp_SystemCmd(clientData, interp, argc, argv) --ClientData clientData; --Tcl_Interp *interp; --int argc; --char **argv; -+Exp_SystemCmd( -+ ClientData clientData, -+ Tcl_Interp *interp, -+ int argc, -+ char **argv) - { - int result = TCL_OK; - RETSIGTYPE (*old)(); /* save old sigalarm handler */ -@@ -799,8 +797,7 @@ cmd_data[] = { - {0}}; - - void --exp_init_tty_cmds(interp) --struct Tcl_Interp *interp; -+exp_init_tty_cmds(struct Tcl_Interp *interp) - { - exp_create_commands(interp,cmd_data); - } -Index: exp_tty.h -=================================================================== ---- exp_tty.h.orig -+++ exp_tty.h -@@ -15,15 +15,15 @@ extern int exp_ioctled_devtty; - extern int exp_stdin_is_tty; - extern int exp_stdout_is_tty; - --void exp_tty_raw(); --void exp_tty_echo(); --void exp_tty_break(); --int exp_tty_raw_noecho(); --int exp_israw(); --int exp_isecho(); -+void exp_tty_raw(int set); -+void exp_tty_echo(int set); -+void exp_tty_break(Tcl_Interp *interp, int fd); -+int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); -+int exp_israw(void); -+int exp_isecho(void); - --void exp_tty_set(); --int exp_tty_set_simple(); --int exp_tty_get_simple(); -+void exp_tty_set(Tcl_Interp *interp, exp_tty *tty, int raw, int echo); -+int exp_tty_set_simple(exp_tty *tty); -+int exp_tty_get_simple(exp_tty *tty); - - #endif /* __EXP_TTY_H__ */ -Index: exp_command.h -=================================================================== ---- exp_command.h.orig +--- exp_command.h +++ exp_command.h -@@ -220,7 +220,7 @@ EXTERN void exp_ecmd_remove_fd_direct_a +@@ -220,7 +220,7 @@ EXTERN void exp_trap_on _ANSI_ARGS_((int)); EXTERN int exp_trap_off _ANSI_ARGS_((char *)); @@ -1222,11 +974,9 @@ Index: exp_command.h #define exp_deleteProc (void (*)())0 #define exp_deleteObjProc (void (*)())0 -Index: exp_inter.c -=================================================================== ---- exp_inter.c.orig +--- exp_inter.c +++ exp_inter.c -@@ -125,9 +125,9 @@ struct input { +@@ -125,9 +125,9 @@ */ struct input * @@ -1239,7 +989,7 @@ Index: exp_inter.c { Tcl_HashEntry *entry = Tcl_FindHashEntry(hash,(char *)esPtr); -@@ -139,10 +139,10 @@ expStateToInput(hash,esPtr) +@@ -139,10 +139,10 @@ } void @@ -1254,7 +1004,7 @@ Index: exp_inter.c { Tcl_HashEntry *entry; int newPtr; -@@ -151,12 +151,15 @@ expCreateStateToInput(hash,esPtr,inp) +@@ -151,12 +151,15 @@ Tcl_SetHashValue(entry,(ClientData)inp); } @@ -1276,7 +1026,7 @@ Index: exp_inter.c /* intMatch() accepts user keystrokes and returns one of MATCH, CANMATCH, or CANTMATCH. These describe whether the keystrokes match a -@@ -187,13 +190,13 @@ we're ready). The other is to return ca +@@ -187,13 +190,13 @@ */ static int @@ -1297,7 +1047,7 @@ Index: exp_inter.c { Tcl_UniChar *string; struct keymap *km; -@@ -344,12 +347,12 @@ intMatch(esPtr,keymap,km_match,matchLen, +@@ -344,12 +347,12 @@ /* put regexp result in variables */ static void @@ -1316,7 +1066,7 @@ Index: exp_inter.c { char name[20], value[20]; int i; -@@ -390,10 +393,10 @@ intRegExpMatchProcess(interp,esPtr,km,in +@@ -390,10 +393,10 @@ * echo chars */ static void @@ -1331,7 +1081,7 @@ Index: exp_inter.c { int seenBytes; /* either printed or echoed */ int echoBytes; -@@ -421,12 +424,12 @@ intEcho(esPtr,skipBytes,matchBytes) +@@ -421,12 +424,12 @@ * Returns # of bytes read or negative number (EXP_XXX) indicating unusual event. */ static int @@ -1350,7 +1100,7 @@ Index: exp_inter.c { Tcl_UniChar *eobOld; /* old end of buffer */ int cc; -@@ -549,11 +552,11 @@ sigchld_handler() +@@ -549,11 +552,11 @@ * process or the child (surrogate). */ static int @@ -1367,7 +1117,7 @@ Index: exp_inter.c { int cc = EXP_CHILD_EOF; -@@ -578,9 +581,9 @@ int flags; +@@ -578,9 +581,9 @@ #define SPAWNED_PROCESS_DIED -3 static void @@ -1380,7 +1130,7 @@ Index: exp_inter.c { expWaitOnOne(); /* wait for slave */ expWaitOnOne(); /* wait for child */ -@@ -593,16 +596,15 @@ ExpState *esPtr; +@@ -593,16 +596,15 @@ #endif /*SIMPLE_EVENT*/ static int @@ -1406,7 +1156,7 @@ Index: exp_inter.c { struct input *inp; struct output *outp; -@@ -686,12 +688,12 @@ int *real_tty_caller; +@@ -686,12 +688,12 @@ /*ARGSUSED*/ static char * @@ -1425,7 +1175,7 @@ Index: exp_inter.c { exp_configure_count++; return 0; -@@ -704,15 +706,16 @@ static char interpreter_cmd[] = "interpr +@@ -704,15 +706,16 @@ /*ARGSUSED*/ int @@ -1447,7 +1197,7 @@ Index: exp_inter.c char *string; Tcl_UniChar *ustring; -@@ -2146,10 +2149,10 @@ got_action: +@@ -2146,10 +2149,10 @@ /* version of Tcl_Eval for interact */ static int @@ -1462,7 +1212,7 @@ Index: exp_inter.c { int status; -@@ -2168,8 +2171,7 @@ ExpState *esPtr; +@@ -2168,8 +2171,7 @@ } static void @@ -1472,7 +1222,7 @@ Index: exp_inter.c { if (km == 0) return; free_keymap(km->next); -@@ -2178,8 +2180,7 @@ struct keymap *km; +@@ -2178,8 +2180,7 @@ } static void @@ -1482,7 +1232,7 @@ Index: exp_inter.c { struct action *next; -@@ -2191,9 +2192,9 @@ struct action *a; +@@ -2191,9 +2192,9 @@ } static void @@ -1495,7 +1245,7 @@ Index: exp_inter.c { if (i == 0) return; free_input(interp,i->next); -@@ -2205,8 +2206,7 @@ struct input *i; +@@ -2205,8 +2206,7 @@ } static struct action * @@ -1505,7 +1255,7 @@ Index: exp_inter.c { struct action *o = new(struct action); -@@ -2218,9 +2218,9 @@ struct action **base; +@@ -2218,9 +2218,9 @@ } static void @@ -1518,7 +1268,7 @@ Index: exp_inter.c { if (o == 0) return; free_output(interp,o->next); -@@ -2235,8 +2235,7 @@ static struct exp_cmd_data cmd_data[] = +@@ -2235,8 +2235,7 @@ {0}}; void @@ -1528,11 +1278,323 @@ Index: exp_inter.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -Index: expect.c -=================================================================== ---- expect.c.orig +--- exp_main_exp.c ++++ exp_main_exp.c +@@ -14,6 +14,7 @@ + #include + #include "tcl.h" + #include "expect_tcl.h" ++#include + + int + main(argc, argv) +--- exp_main_sub.c ++++ exp_main_sub.c +@@ -471,6 +471,7 @@ + Tcl_Eval(interp, buffer); + } + /*NOTREACHED*/ ++ return(TCL_ERROR); + } + + static char init_auto_path[] = "\ +--- exp_pty.h ++++ exp_pty.h +@@ -8,10 +8,12 @@ + + */ + +-int exp_pty_test_start(); +-void exp_pty_test_end(); +-int exp_pty_test(); +-void exp_pty_unlock(); +-int exp_pty_lock(); ++int exp_pty_test_start(void); ++void exp_pty_test_end(void); ++int exp_pty_test(char *master_name, char *slave_name, char bank, char *num); ++void exp_pty_unlock(void); ++int exp_pty_lock(char bank, char *num); ++int exp_getptymaster(void); ++int exp_getptyslave(int ttycopy, int ttyinit, CONST char *stty_args); + + extern char *exp_pty_slave_name; +--- exp_strf.c ++++ exp_strf.c +@@ -148,7 +148,7 @@ + void + /*size_t*/ + #ifndef __STDC__ +-exp_strftime(/*s,*/ format, timeptr, dstring) ++exp_strftime( + /*char *s;*/ + char *format; + const struct tm *timeptr; +--- exp_tty.c ++++ exp_tty.c +@@ -50,21 +50,20 @@ + #define tty_cooked exp_tty_cooked + + int +-exp_israw() ++exp_israw(void) + { + return is_raw; + } + + int +-exp_isecho() ++exp_isecho(void) + { + return !is_noecho; + } + + /* if set == 1, set it to raw, else unset it */ + void +-exp_tty_raw(set) +-int set; ++exp_tty_raw(int set) + { + if (set == 1) { + is_raw = TRUE; +@@ -95,8 +94,7 @@ + } + + void +-exp_tty_echo(set) +-int set; ++exp_tty_echo(int set) + { + if (set == 1) { + is_noecho = FALSE; +@@ -114,8 +112,7 @@ + } + + int +-exp_tty_set_simple(tty) +-exp_tty *tty; ++exp_tty_set_simple(exp_tty *tty) + { + #ifdef HAVE_TCSETATTR + return(tcsetattr(exp_dev_tty, TCSADRAIN,tty)); +@@ -125,8 +122,7 @@ + } + + int +-exp_tty_get_simple(tty) +-exp_tty *tty; ++exp_tty_get_simple(exp_tty *tty) + { + #ifdef HAVE_TCSETATTR + return(tcgetattr(exp_dev_tty, tty)); +@@ -138,10 +134,11 @@ + /* returns 0 if nothing changed */ + /* if something changed, the out parameters are changed as well */ + int +-exp_tty_raw_noecho(interp,tty_old,was_raw,was_echo) +-Tcl_Interp *interp; +-exp_tty *tty_old; +-int *was_raw, *was_echo; ++exp_tty_raw_noecho( ++ Tcl_Interp *interp, ++ exp_tty *tty_old, ++ int *was_raw, ++ int *was_echo) + { + if (exp_disconnected) return(0); + if (is_raw && is_noecho) return(0); +@@ -173,10 +170,11 @@ + /* returns 0 if nothing changed */ + /* if something changed, the out parameters are changed as well */ + int +-exp_tty_cooked_echo(interp,tty_old,was_raw,was_echo) +-Tcl_Interp *interp; +-exp_tty *tty_old; +-int *was_raw, *was_echo; ++exp_tty_cooked_echo( ++ Tcl_Interp *interp, ++ exp_tty *tty_old, ++ int *was_raw, ++ int *was_echo) + { + if (exp_disconnected) return(0); + if (!is_raw && !is_noecho) return(0); +@@ -206,11 +204,11 @@ + } + + void +-exp_tty_set(interp,tty,raw,echo) +-Tcl_Interp *interp; +-exp_tty *tty; +-int raw; +-int echo; ++exp_tty_set( ++ Tcl_Interp *interp, ++ exp_tty *tty, ++ int raw, ++ int echo) + { + if (exp_tty_set_simple(tty) == -1) { + expErrorLog("ioctl(set): %s\r\n",Tcl_PosixError(interp)); +@@ -258,9 +256,9 @@ + + /*ARGSUSED*/ + void +-exp_tty_break(interp,fd) +-Tcl_Interp *interp; +-int fd; ++exp_tty_break( ++ Tcl_Interp *interp, ++ int fd) + { + #ifdef POSIX + tcsendbreak(fd,0); +@@ -280,9 +278,9 @@ + /* If len == 0, use strlen to compute it */ + /* NB: if terminal is not in raw mode, nothing is done. */ + char * +-exp_cook(s,len) +-char *s; +-int *len; /* current and new length of s */ ++exp_cook( ++ char *s, ++ int *len) /* current and new length of s */ + { + static int destlen = 0; + static char *dest = 0; +@@ -315,11 +313,11 @@ + } + + static int /* returns TCL_whatever */ +-exec_stty(interp,argc,argv,devtty) +-Tcl_Interp *interp; +-int argc; +-char **argv; +-int devtty; /* if true, redirect to /dev/tty */ ++exec_stty( ++ Tcl_Interp *interp, ++ int argc, ++ char **argv, ++ int devtty) /* if true, redirect to /dev/tty */ + { + int i; + int rc; +@@ -368,11 +366,11 @@ + + /*ARGSUSED*/ + static int +-Exp_SttyCmd(clientData, interp, argc, argv) +-ClientData clientData; +-Tcl_Interp *interp; +-int argc; +-char **argv; ++Exp_SttyCmd( ++ ClientData clientData, ++ Tcl_Interp *interp, ++ int argc, ++ char **argv) + { + /* redirection symbol is not counted as a stty arg in terms */ + /* of recognition. */ +@@ -567,11 +565,11 @@ + + /*ARGSUSED*/ + static int +-Exp_SystemCmd(clientData, interp, argc, argv) +-ClientData clientData; +-Tcl_Interp *interp; +-int argc; +-char **argv; ++Exp_SystemCmd( ++ ClientData clientData, ++ Tcl_Interp *interp, ++ int argc, ++ char **argv) + { + int result = TCL_OK; + RETSIGTYPE (*old)(); /* save old sigalarm handler */ +@@ -799,8 +797,7 @@ + {0}}; + + void +-exp_init_tty_cmds(interp) +-struct Tcl_Interp *interp; ++exp_init_tty_cmds(struct Tcl_Interp *interp) + { + exp_create_commands(interp,cmd_data); + } +--- exp_tty.h ++++ exp_tty.h +@@ -15,15 +15,15 @@ + extern int exp_stdin_is_tty; + extern int exp_stdout_is_tty; + +-void exp_tty_raw(); +-void exp_tty_echo(); +-void exp_tty_break(); +-int exp_tty_raw_noecho(); +-int exp_israw(); +-int exp_isecho(); ++void exp_tty_raw(int set); ++void exp_tty_echo(int set); ++void exp_tty_break(Tcl_Interp *interp, int fd); ++int exp_tty_raw_noecho(Tcl_Interp *interp, exp_tty *tty_old, int *was_raw, int *was_echo); ++int exp_israw(void); ++int exp_isecho(void); + +-void exp_tty_set(); +-int exp_tty_set_simple(); +-int exp_tty_get_simple(); ++void exp_tty_set(Tcl_Interp *interp, exp_tty *tty, int raw, int echo); ++int exp_tty_set_simple(exp_tty *tty); ++int exp_tty_get_simple(exp_tty *tty); + + #endif /* __EXP_TTY_H__ */ +--- exp_win.c ++++ exp_win.c +@@ -51,7 +51,7 @@ + # include + #endif /* HAVE_SYS_PTEM_H */ + +-#include "exp_tty.h" ++#include "exp_tty_in.h" + #include "exp_win.h" + + #ifdef TIOCGWINSZ +@@ -87,6 +87,7 @@ + #if defined(TIOCSSIZE) && !defined(TIOCSWINSZ) + ioctl(fd,TIOCSSIZE,&winsize); + #endif ++ return 0; + } + + int exp_window_size_get(fd) +@@ -102,6 +103,7 @@ + winsize.rows = 0; + winsize.columns = 0; + #endif ++ return 0; + } + + void +@@ -151,6 +153,7 @@ + #if defined(TIOCSSIZE) && !defined(TIOCSWINSZ) + ioctl(fd,TIOCSSIZE,&win2size); + #endif ++ return 0; + } + + int exp_win2_size_get(fd) +@@ -162,6 +165,7 @@ + #if defined(TIOCGSIZE) && !defined(TIOCGWINSZ) + ioctl(fd,TIOCGSIZE,&win2size); + #endif ++ return 0; + } + + void +--- expect.c +++ expect.c -@@ -34,7 +34,7 @@ would appreciate credit if this program +@@ -34,7 +34,7 @@ #include "exp_command.h" #include "exp_log.h" #include "exp_event.h" @@ -1541,7 +1603,7 @@ Index: expect.c #include "exp_tstamp.h" /* this should disappear when interact */ /* loses ref's to it */ #ifdef TCL_DEBUGGER -@@ -134,10 +134,10 @@ struct exp_cmd_descriptor { +@@ -134,10 +134,10 @@ */ static void @@ -1556,7 +1618,7 @@ Index: expect.c { cmd->duration = duration; cmd->cmdtype = cmdtype; -@@ -156,14 +156,21 @@ static int alarm_fired; /* if alarm occu +@@ -156,14 +156,21 @@ void exp_background_channelhandlers_run_all(); /* exp_indirect_updateX is called by Tcl when an indirect variable is set */ @@ -1582,7 +1644,7 @@ Index: expect.c { alarm_fired = TRUE; } -@@ -171,10 +178,10 @@ int n; /* unused, for compatibi +@@ -171,10 +178,10 @@ /* free up everything in ecase */ static void @@ -1597,7 +1659,7 @@ Index: expect.c { if (ec->i_list->duration == EXP_PERMANENT) { if (ec->pat) { Tcl_DecrRefCount(ec->pat); } -@@ -194,10 +201,10 @@ int free_ilist; /* if we should free il +@@ -194,10 +201,10 @@ /* free up any argv structures in the ecases */ static void @@ -1612,7 +1674,7 @@ Index: expect.c { int i; -@@ -216,8 +223,7 @@ int free_ilist; /* if true, free ilists +@@ -216,8 +223,7 @@ #if 0 /* no standard defn for this, and some systems don't even have it, so avoid */ /* the whole quagmire by calling it something else */ @@ -1622,7 +1684,7 @@ Index: expect.c { char *news = ckalloc(strlen(s) + 1); strcpy(news,s); -@@ -242,8 +248,7 @@ char *s; +@@ -242,8 +248,7 @@ Current test is very cheap and almost always right :-) */ int @@ -1632,7 +1694,7 @@ Index: expect.c { int seen_nl = FALSE; char *p = Tcl_GetString(objPtr); -@@ -268,10 +273,10 @@ Tcl_Obj *objPtr; +@@ -268,10 +273,10 @@ * its current argumnts */ /*ARGSUSED*/ Tcl_Obj* @@ -1647,7 +1709,7 @@ Index: expect.c { Tcl_Obj* res = Tcl_NewListObj (1,objv); -@@ -348,8 +353,7 @@ Tcl_Obj *CONST objv[]; /* Argument obje +@@ -348,8 +353,7 @@ } static void @@ -1657,7 +1719,7 @@ Index: expect.c { ec->i_list = 0; ec->pat = 0; -@@ -365,7 +369,7 @@ struct ecase *ec; +@@ -365,7 +369,7 @@ } static struct ecase * @@ -1666,7 +1728,7 @@ Index: expect.c { struct ecase *ec = (struct ecase *)ckalloc(sizeof(struct ecase)); -@@ -400,12 +404,12 @@ The exp_i chain can be broken by the cal +@@ -400,12 +404,12 @@ */ static int @@ -1685,7 +1747,7 @@ Index: expect.c { int i; char *string; -@@ -718,9 +722,9 @@ struct eval_out { +@@ -718,9 +722,9 @@ */ Tcl_UniChar * @@ -1698,7 +1760,7 @@ Index: expect.c * special characters (utf8). */ { Tcl_UniChar *s; -@@ -748,9 +752,9 @@ string_case_first(string,pattern) /* INT +@@ -748,9 +752,9 @@ } Tcl_UniChar * @@ -1711,7 +1773,7 @@ Index: expect.c * special characters (utf8). */ { Tcl_UniChar *s; -@@ -778,9 +782,9 @@ string_first(string,pattern) /* INTL */ +@@ -778,9 +782,9 @@ } Tcl_UniChar * @@ -1724,7 +1786,7 @@ Index: expect.c { /* unicode based Tcl_UtfFindFirst */ -@@ -803,15 +807,15 @@ string_first_char(string,pattern) /* INT +@@ -803,15 +807,15 @@ /* string match */ /* returns EXP_X where X is MATCH, NOMATCH, FULLBUFFER, TCLERRROR */ static int @@ -1748,7 +1810,7 @@ Index: expect.c { Tcl_RegExp re; Tcl_RegExpInfo info; -@@ -977,18 +981,18 @@ char *suffix; +@@ -977,18 +981,18 @@ /* sets o.e if successfully finds a matching pattern, eof, timeout or deflt */ /* returns original status arg or EXP_TCLERROR */ static int @@ -1778,7 +1840,7 @@ Index: expect.c { int i; ExpState *em; /* ExpState of ecase */ -@@ -1061,10 +1065,10 @@ char *suffix; +@@ -1061,10 +1065,10 @@ } static void @@ -1793,7 +1855,7 @@ Index: expect.c { int i; -@@ -1095,10 +1099,10 @@ struct exp_i *exp_i; +@@ -1095,10 +1099,10 @@ /* remove exp_i from list */ static void @@ -1808,7 +1870,7 @@ Index: expect.c { /* since it's in middle of list, free exp_i by hand */ for (;*ei; ei = &(*ei)->next) { -@@ -1113,10 +1117,10 @@ struct exp_i *exp_i; /* element to remov +@@ -1113,10 +1117,10 @@ /* remove exp_i from list and remove any dependent ecases */ static void @@ -1823,7 +1885,7 @@ Index: expect.c { ecases_remove_by_expi(interp,ecmd,exp_i); exp_i_remove(interp,&ecmd->i_list,exp_i); -@@ -1124,11 +1128,11 @@ struct exp_i *exp_i; +@@ -1124,11 +1128,11 @@ /* remove ecases tied to a single direct spawn id */ static void @@ -1840,7 +1902,7 @@ Index: expect.c { struct exp_i *exp_i, *next; struct exp_state_list **slPtr; -@@ -1168,9 +1172,9 @@ int direct; +@@ -1168,9 +1172,9 @@ /* this is called from exp_close to clean up the ExpState */ void @@ -1853,7 +1915,7 @@ Index: expect.c { ecmd_remove_state(interp,&exp_cmds[EXP_CMD_BEFORE],esPtr,EXP_DIRECT|EXP_INDIRECT); ecmd_remove_state(interp,&exp_cmds[EXP_CMD_AFTER],esPtr,EXP_DIRECT|EXP_INDIRECT); -@@ -1182,9 +1186,9 @@ ExpState *esPtr; +@@ -1182,9 +1186,9 @@ /* arm a list of background ExpState's */ static void @@ -1866,7 +1928,7 @@ Index: expect.c { /* for each spawn id in list, arm if necessary */ for (;slPtr;slPtr=slPtr->next) { -@@ -1201,9 +1205,9 @@ struct exp_state_list *slPtr; +@@ -1201,9 +1205,9 @@ /* return TRUE if this ecase is used by this fd */ static int @@ -1879,7 +1941,7 @@ Index: expect.c { struct exp_state_list *fdp; -@@ -1214,9 +1218,9 @@ ExpState *esPtr; +@@ -1214,9 +1218,9 @@ } static void @@ -1892,7 +1954,7 @@ Index: expect.c { if (!ec->transfer) Tcl_AppendElement(interp,"-notransfer"); if (ec->indices) Tcl_AppendElement(interp,"-indices"); -@@ -1231,10 +1235,10 @@ struct ecase *ec; +@@ -1231,10 +1235,10 @@ /* append all ecases that match this exp_i */ static void @@ -1907,7 +1969,7 @@ Index: expect.c { int i; for (i=0;iecd.count;i++) { -@@ -1245,9 +1249,9 @@ struct exp_i *exp_i; +@@ -1245,9 +1249,9 @@ } static void @@ -1920,7 +1982,7 @@ Index: expect.c { Tcl_AppendElement(interp,"-i"); if (exp_i->direct == EXP_INDIRECT) { -@@ -1261,8 +1265,8 @@ struct exp_i *exp_i; +@@ -1261,8 +1265,8 @@ } for (fdp = exp_i->state_list;fdp;fdp=fdp->next) { @@ -1931,7 +1993,7 @@ Index: expect.c Tcl_AppendElement(interp,buf); } -@@ -1274,11 +1278,11 @@ struct exp_i *exp_i; +@@ -1274,11 +1278,11 @@ /* return current setting of the permanent expect_before/after/bg */ int @@ -1948,7 +2010,7 @@ Index: expect.c { struct exp_i *exp_i; int i; -@@ -1362,11 +1366,11 @@ Tcl_Obj *CONST objv[]; /* Argument obje +@@ -1362,11 +1366,11 @@ /* Exp_ExpectGlobalObjCmd is invoked to process expect_before/after/background */ /*ARGSUSED*/ int @@ -1965,7 +2027,7 @@ Index: expect.c { int result = TCL_OK; struct exp_i *exp_i, **eip; -@@ -1574,8 +1578,7 @@ Tcl_Obj *CONST objv[]; /* Argument obje +@@ -1574,8 +1578,7 @@ /* adjusts file according to user's size request */ void @@ -1975,7 +2037,7 @@ Index: expect.c { int new_msize, excess; Tcl_UniChar *string; -@@ -1632,9 +1635,9 @@ ExpState *esPtr; +@@ -1632,9 +1635,9 @@ #if OBSOLETE /* Strip parity */ static void @@ -1988,7 +2050,7 @@ Index: expect.c { char *p, ch; -@@ -1659,9 +1662,9 @@ expParityStrip(obj,offsetBytes) +@@ -1659,9 +1662,9 @@ be at a UTF boundary. */ static void @@ -2001,7 +2063,7 @@ Index: expect.c { char *s, *end; int len; -@@ -1709,9 +1712,9 @@ expValid(obj,offset) +@@ -1709,9 +1712,9 @@ /* Strip nulls from object, beginning at offset */ static int @@ -2014,7 +2076,7 @@ Index: expect.c { Tcl_UniChar *src, *src2, *dest, *end; int newsize; /* size of obj after all nulls removed */ -@@ -1737,11 +1740,11 @@ expNullStrip(buf,offsetChars) +@@ -1737,11 +1740,11 @@ /* the read will complete immediately. */ /*ARGSUSED*/ static int @@ -2031,7 +2093,7 @@ Index: expect.c { int cc = EXP_TIMEOUT; int size; -@@ -1812,13 +1815,13 @@ int save_flags; +@@ -1812,13 +1815,13 @@ /* if it returns a non-negative number, it means there is data */ /* (0 means nothing new was actually read, but it should be looked at again) */ int @@ -2052,7 +2114,7 @@ Index: expect.c { ExpState *esPtr; -@@ -1920,12 +1923,12 @@ int key; +@@ -1920,12 +1923,12 @@ /* when buffer fills, copy second half over first and */ /* continue, so we can do matches over multiple buffers */ void @@ -2071,7 +2133,7 @@ Index: expect.c { Tcl_UniChar *str; Tcl_UniChar *p; -@@ -1989,8 +1992,7 @@ char *caller_name; +@@ -1989,8 +1992,7 @@ /* map EXP_ style return value to TCL_ style return value */ /* not defined to work on TCL_OK */ int @@ -2081,7 +2143,7 @@ Index: expect.c { switch (x) { case TCL_ERROR: return EXP_TCLERROR; -@@ -2009,8 +2011,7 @@ int x; +@@ -2009,8 +2011,7 @@ /* map from EXP_ style return value to TCL_ style return values */ int @@ -2091,7 +2153,7 @@ Index: expect.c { switch (x) { case EXP_TCLERROR: return TCL_ERROR; -@@ -2033,9 +2034,9 @@ This allows the user to localize them if +@@ -2033,9 +2034,9 @@ avoid having to put "global" in procedure definitions. */ char * @@ -2104,7 +2166,7 @@ Index: expect.c { char *val; -@@ -2045,8 +2046,7 @@ char *var; +@@ -2045,8 +2046,7 @@ } static int @@ -2114,7 +2176,7 @@ Index: expect.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); CONST char *t; -@@ -2060,9 +2060,9 @@ Tcl_Interp *interp; +@@ -2060,9 +2060,9 @@ /* make a copy of a linked list (1st arg) and attach to end of another (2nd arg) */ static int @@ -2127,7 +2189,7 @@ Index: expect.c { struct exp_i *p; -@@ -2092,8 +2092,7 @@ struct exp_state_list **i_union; +@@ -2092,8 +2092,7 @@ } char * @@ -2137,7 +2199,7 @@ Index: expect.c { switch (cmdtype) { case EXP_CMD_FG: return("expect"); -@@ -2110,12 +2109,12 @@ int cmdtype; +@@ -2110,12 +2109,12 @@ /* an indirect spawn id list is changed */ /*ARGSUSED*/ static char * @@ -2156,7 +2218,7 @@ Index: expect.c { char *msg; -@@ -2129,10 +2128,10 @@ int flags; /* Information about what ha +@@ -2129,10 +2128,10 @@ } static char * @@ -2171,7 +2233,7 @@ Index: expect.c { struct exp_state_list *slPtr; /* temp for interating over state_list */ -@@ -2205,13 +2204,13 @@ struct exp_i *exp_i; +@@ -2205,13 +2204,13 @@ } int @@ -2191,7 +2253,7 @@ Index: expect.c { ExpState *esPtr = 0; Tcl_Obj *body = 0; -@@ -2385,9 +2384,9 @@ expMatchProcess(interp, eo, cc, bg, deta +@@ -2385,9 +2384,9 @@ /* this function is called from the background when input arrives */ /*ARGSUSED*/ void @@ -2204,7 +2266,7 @@ Index: expect.c { char backup[EXP_CHANNELNAMELEN+1]; /* backup copy of esPtr channel name! */ -@@ -2510,11 +2509,11 @@ do_more_data: +@@ -2510,11 +2509,11 @@ /*ARGSUSED*/ int @@ -2221,7 +2283,7 @@ Index: expect.c { int cc; /* number of chars returned in a single read */ /* or negative EXP_whatever */ -@@ -2767,11 +2766,11 @@ error: +@@ -2767,11 +2766,11 @@ /*ARGSUSED*/ static int @@ -2238,7 +2300,7 @@ Index: expect.c { char *format = 0; time_t seconds = -1; -@@ -2866,14 +2865,14 @@ process_di _ANSI_ARGS_ ((Tcl_Interp* int +@@ -2866,14 +2865,14 @@ CONST char* cmd)); static int @@ -2261,7 +2323,7 @@ Index: expect.c { static char* options[] = { "-d", -@@ -2947,11 +2946,11 @@ Tcl_Interp *interp; +@@ -2947,11 +2946,11 @@ /*ARGSUSED*/ int @@ -2278,7 +2340,7 @@ Index: expect.c { int size = -1; ExpState *esPtr = 0; -@@ -2993,11 +2992,11 @@ Exp_MatchMaxObjCmd(clientData,interp,obj +@@ -2993,11 +2992,11 @@ /*ARGSUSED*/ int @@ -2295,7 +2357,7 @@ Index: expect.c { int value = -1; ExpState *esPtr = 0; -@@ -3037,11 +3036,11 @@ Tcl_Interp *interp; +@@ -3037,11 +3036,11 @@ /*ARGSUSED*/ int @@ -2312,7 +2374,7 @@ Index: expect.c { int parity; ExpState *esPtr = 0; -@@ -3076,11 +3075,11 @@ Tcl_Interp *interp; +@@ -3076,11 +3075,11 @@ /*ARGSUSED*/ int @@ -2329,7 +2391,7 @@ Index: expect.c { int close_on_eof; ExpState *esPtr = 0; -@@ -3117,8 +3116,7 @@ Tcl_Interp *interp; +@@ -3117,8 +3116,7 @@ /* This big chunk of code is just for debugging the permanent */ /* expect cases */ void @@ -2339,7 +2401,7 @@ Index: expect.c { if (!slPtr) return; printf("%d ",slPtr->esPtr); -@@ -3126,8 +3124,7 @@ struct exp_state_list *slPtr; +@@ -3126,8 +3124,7 @@ } void @@ -2349,7 +2411,7 @@ Index: expect.c { if (!exp_i) return; printf("exp_i %x",exp_i); -@@ -3143,16 +3140,14 @@ struct exp_i *exp_i; +@@ -3143,16 +3140,14 @@ } void @@ -2368,7 +2430,7 @@ Index: expect.c { int i; -@@ -3161,8 +3156,7 @@ struct exp_cases_descriptor *ecd; +@@ -3161,8 +3156,7 @@ } void @@ -2378,7 +2440,7 @@ Index: expect.c { printf("expect cmd type: %17s",exp_cmdtype_printable(ecmd->cmdtype)); printf((ecmd->duration==EXP_PERMANENT)?" perm ": "tmp "); -@@ -3172,7 +3166,7 @@ struct exp_cmd_descriptor *ecmd; +@@ -3172,7 +3166,7 @@ } void @@ -2387,7 +2449,7 @@ Index: expect.c { exp_cmd_print(&exp_cmds[EXP_CMD_BEFORE]); exp_cmd_print(&exp_cmds[EXP_CMD_AFTER]); -@@ -3181,11 +3175,11 @@ exp_cmds_print() +@@ -3181,11 +3175,11 @@ /*ARGSUSED*/ int @@ -2404,7 +2466,7 @@ Index: expect.c { exp_cmds_print(); return TCL_OK; -@@ -3193,7 +3187,7 @@ Tcl_Interp *interp; +@@ -3193,7 +3187,7 @@ #endif /*DEBUG_PERM_ECASES*/ void @@ -2413,7 +2475,7 @@ Index: expect.c { ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); -@@ -3216,8 +3210,7 @@ cmd_data[] = { +@@ -3216,8 +3210,7 @@ {0}}; void @@ -2423,7 +2485,7 @@ Index: expect.c { exp_create_commands(interp,cmd_data); -@@ -3248,7 +3241,7 @@ Tcl_Interp *interp; +@@ -3248,7 +3241,7 @@ } void @@ -2432,53 +2494,9 @@ Index: expect.c #if 0 signal(SIGALRM,sigalarm_handler); signal(SIGINT,sigint_handler); -Index: retoglob.c -=================================================================== ---- retoglob.c.orig -+++ retoglob.c -@@ -44,9 +44,9 @@ xxx (Tcl_UniChar* x, int xl) - - - Tcl_Obj* --exp_retoglob (str,strlen) -- Tcl_UniChar* str; -- int strlen; -+exp_retoglob ( -+ Tcl_UniChar* str, -+ int strlen) - { - /* - * Output: x2 size of input (literal where every character has to be -Index: exp_main_exp.c -=================================================================== ---- exp_main_exp.c.orig -+++ exp_main_exp.c -@@ -14,6 +14,7 @@ would appreciate credit if this program - #include - #include "tcl.h" - #include "expect_tcl.h" -+#include - - int - main(argc, argv) -Index: exp_win.c -=================================================================== ---- exp_win.c.orig -+++ exp_win.c -@@ -51,7 +51,7 @@ conflicts with sys/ioctl.h - # include - #endif /* HAVE_SYS_PTEM_H */ - --#include "exp_tty.h" -+#include "exp_tty_in.h" - #include "exp_win.h" - - #ifdef TIOCGWINSZ -Index: pty_termios.c -=================================================================== ---- pty_termios.c.orig +--- pty_termios.c +++ pty_termios.c -@@ -627,10 +627,10 @@ int control; /* if 1, enable pty trappin +@@ -627,10 +627,10 @@ } int @@ -2493,16 +2511,18 @@ Index: pty_termios.c { int slave, slave2; char buf[10240]; -Index: exp_strf.c -=================================================================== ---- exp_strf.c.orig -+++ exp_strf.c -@@ -148,7 +148,7 @@ int low, item, hi; - void - /*size_t*/ - #ifndef __STDC__ --exp_strftime(/*s,*/ format, timeptr, dstring) -+exp_strftime( - /*char *s;*/ - char *format; - const struct tm *timeptr; +--- retoglob.c ++++ retoglob.c +@@ -44,9 +44,9 @@ + + + Tcl_Obj* +-exp_retoglob (str,strlen) +- Tcl_UniChar* str; +- int strlen; ++exp_retoglob ( ++ Tcl_UniChar* str, ++ int strlen) + { + /* + * Output: x2 size of input (literal where every character has to be diff --git a/expect.changes b/expect.changes index b344f29..ba2cd34 100644 --- a/expect.changes +++ b/expect.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue May 6 21:22:31 CEST 2008 - aj@suse.de + +- Add missing return values. + ------------------------------------------------------------------- Thu Apr 3 14:00:24 CEST 2008 - max@suse.de diff --git a/expect.spec b/expect.spec index 9d1985a..a120a38 100644 --- a/expect.spec +++ b/expect.spec @@ -15,7 +15,7 @@ Url: http://expect.nist.gov Name: expect BuildRequires: tcl-devel Version: 5.44.1.5 -Release: 6 +Release: 12 BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Languages/Tcl License: Public Domain, Freeware @@ -109,6 +109,8 @@ rm -rf %buildroot %doc %_mandir/man3/* %changelog +* Tue May 06 2008 aj@suse.de +- Add missing return values. * Thu Apr 03 2008 max@suse.de - Fixed swapped arguments in prototype of exp_cmd_init() - Adjusted installation to the new Tcl file system layout