Index: config.h.in ================================================================== --- config.h.in +++ config.h.in @@ -1,10 +1,10 @@ /* ================================================================== - FILE: "/diska/home/joze/src/tclreadline/config.h.in" - LAST MODIFICATION: "Mon Sep 13 17:51:29 1999 (joze)" + FILE: "/home/joze/src/tclreadline/config.h.in" + LAST MODIFICATION: "Mon Sep 20 01:31:18 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ vim:set ft=c: --- @@ -30,5 +30,7 @@ ================================================================== */ #undef EXECUTING_MACRO_HACK + +#undef CLEANUP_AFER_SIGNAL Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ # -*- autoconf -*- -# FILE: "/disk01/home/joze/src/tclreadline/configure.in" -# LAST MODIFICATION: "Mon Sep 20 01:20:59 1999 (joze)" +# FILE: "/home/joze/src/tclreadline/configure.in" +# LAST MODIFICATION: "Mon Sep 20 01:44:59 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -376,11 +376,11 @@ res="OK", res="FAIL", res="FAIL") if test "$res" = "OK"; then TERMLIB_DIR=-L${dir} if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then - TERMLIB_DIR="$TERMLIB_DIR -R ${dir}" + TERMLIB_DIR_R="${TERMLIB_DIR} -R${dir}" fi TERMLIB=-l${tlib} break fi done @@ -430,10 +430,22 @@ _rl_executing_macro = (char*) 0; return 0; }], AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(EXECUTING_MACRO_HACK, 1), AC_MSG_RESULT(no)) + +# check for readline's rl_cleanup_after_signal + +AC_MSG_CHECKING([for rl_cleanup_after_signal() in -lreadline]) +AC_TRY_LINK(,[ +extern void rl_cleanup_after_signal(); +int main () { + rl_cleanup_after_signal(); + return 0; +}], + AC_MSG_RESULT(yes); AC_DEFINE_UNQUOTED(CLEANUP_AFER_SIGNAL, 1), + AC_MSG_RESULT(no)) AC_MSG_CHECKING([for the readline version number]) AC_TRY_RUN([ #include Index: tclreadline.c ================================================================== --- tclreadline.c +++ tclreadline.c @@ -1,10 +1,10 @@ /* ================================================================== - FILE: "/disk01/home/joze/src/tclreadline/tclreadline.c" - LAST MODIFICATION: "Mon Sep 20 01:23:39 1999 (joze)" + FILE: "/home/joze/src/tclreadline/tclreadline.c" + LAST MODIFICATION: "Mon Sep 20 01:35:18 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ --- tclreadline -- gnu readline for tcl @@ -375,20 +375,23 @@ case TCLRL_RESET_TERMINAL: /* TODO: add this to the completer */ if (argc > 3) { Tcl_WrongNumArgs(interp, 2, objv, "?terminal-name?"); return TCL_ERROR; - } else if (3 == argc) { + } + if (3 == argc) { /* * - tcl8.0 doesn't have Tcl_GetString() * - rl_reset_terminal() might be defined * to take no arguments. This might produce * a compiler warning. */ rl_reset_terminal(Tcl_GetStringFromObj(objv[2], (int*) NULL)); +#ifdef CLEANUP_AFER_SIGNAL } else { rl_cleanup_after_signal(); +#endif } break; default: goto BAD_COMMAND; Index: tclreadlineSetup.tcl.in ================================================================== --- tclreadlineSetup.tcl.in +++ tclreadlineSetup.tcl.in @@ -1,8 +1,8 @@ #!/usr/locanl/bin/tclsh # FILE: "/home/joze/src/tclreadline/tclreadlineSetup.tcl.in" -# LAST MODIFICATION: "Sun Sep 19 22:42:13 1999 (joze)" +# LAST MODIFICATION: "Mon Sep 20 01:34:31 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -203,10 +203,15 @@ [::tclreadline::HistoryFileGet] } ::tclreadline::errorMsg]} { puts stderr $::tclreadline::errorMsg } + # this call is ignored, if tclreadline.c + # was compiled with CLEANUP_AFER_SIGNAL + # not defined. This is the case for + # older versions of libreadline. + # ::tclreadline::readline reset-terminal if [catch "eval ::tclreadline::Exit $args" message] { puts stderr "error:" puts stderr "$message"