Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -1,8 +1,8 @@ # -*- make -*- -# FILE: "/krispc6/home/joze/src/tclreadline/Makefile.in" -# LAST MODIFICATION: "Mon May 10 13:10:22 1999 (joze)" +# FILE: "/diska/home/joze/src/tclreadline/Makefile.in" +# LAST MODIFICATION: "Fri Aug 20 15:03:54 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -104,10 +104,11 @@ # for installing, but there are just too many different versions of # "install" around; better to use the install-sh script that comes # with the distribution, which is slower but guaranteed to work. INSTALL = $(TOP_DIR)/aux/install-sh -c +# INSTALL = @INSTALL@ INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 MKINSTALLDIRS = $(TOP_DIR)/aux/mkinstalldirs # The symbols below provide support for dynamic loading and shared Index: README ================================================================== --- README +++ README @@ -1,8 +1,8 @@ - FILE: "/krispc6/home/joze/src/tclreadline/README" - LAST MODIFICATION: "Sat May 8 14:05:41 1999 (joze)" + FILE: "/diska/home/joze/src/tclreadline/README" + LAST MODIFICATION: "Fri Aug 20 15:01:56 1999 (joze)" (C) 1998, 1999 by Johannes Zellner, $Id$ --- tclreadline -- gnu readline for tcl @@ -31,11 +31,11 @@ 1. Introduction --------------- This directory contains the sources and documentation for tclreadline, which builds a connection between tcl and the gnu readline. -The information here corresponds to release 0.7 (initial developers release). +The information here corresponds to release 0.9 (still a developers release). 2. Documentation ---------------- The tclreadline.n nroff man page in this release contains the reference @@ -70,7 +70,5 @@ like wish, you should copy the file sample.tclshrc to $HOME/.wishrc (or whatever the manual page of your interpreter says.) If you have installed tclreadline properly, you are just ready to start: start your favorite interpreter. The tclreadlineSetup.tcl script does the rest. - - Index: configure.in ================================================================== --- configure.in +++ configure.in @@ -1,8 +1,8 @@ # -*- autoconf -*- -# FILE: "/krispc6/home/joze/src/tclreadline/configure.in" -# LAST MODIFICATION: "Fri May 14 14:47:38 1999 (joze)" +# FILE: "/diska/home/joze/src/tclreadline/configure.in" +# LAST MODIFICATION: "Fri Aug 20 15:35:10 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -44,29 +44,29 @@ AC_PREREQ(2.13) AC_CONFIG_AUX_DIR(./aux) AC_CANONICAL_HOST -TCLREADLINE_LPATH="" -for path in $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH; do - nocolon_path=`echo $path | sed 's/:/ /g'` - TCLREADLINE_LPATH="$TCLREADLINE_LPATH $nocolon_path" -done +TCLREADLINE_LPATH=`echo $LD_LIBRARY_PATH $LD_RUN_PATH $LPATH | sed 's/:/ /g'` TCLREADLINE_LPATH="$TCLREADLINE_LPATH /lib /usr/lib /usr/local/lib" #-------------------------------------------------------------------- # See if there was a command-line option for where Tcl is; if # not, search for Tcl. #-------------------------------------------------------------------- -AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.x binaries from DIR], - tcl_search=$withval, tcl_search=/usr/local/lib) +AC_ARG_WITH( + tcl, + [ --with-tcl=DIR use Tcl 8.x binaries from DIR], + tcl_search=$withval, + tcl_search="" +) AC_MSG_CHECKING([which tclConfig.sh to use]) TCL_LIB_DIR="" -for dir in $tcl_search $exec_prefix/lib /usr/local/lib/unix /usr/lib; do +for dir in $tcl_search /usr/lib /usr/local/lib $exec_prefix/lib /usr/local/lib/unix; do if test -r $dir/tclConfig.sh; then TCL_LIB_DIR=$dir break fi done @@ -110,11 +110,11 @@ # ----------------------------------------------------------------------- # Set up a new default --prefix. # ----------------------------------------------------------------------- -AC_PREFIX_DEFAULT(/usr/local) +# AC_PREFIX_DEFAULT(/usr/local) if test "${prefix}" = "NONE"; then prefix=$TCL_PREFIX fi if test "${exec_prefix}" = "NONE"; then @@ -470,11 +470,11 @@ AC_SUBST(TCLREADLINE_PACKAGE_PATH) AC_SUBST(TCLREADLINE_LIBRARY) -AC_OUTPUT(Makefile tclreadline.h tclreadlineInit.tcl tclreadlineSetup.tcl tclreadlineConfig.sh tclreadline.n) +AC_OUTPUT(Makefile tclreadline.h tclreadlineInit.tcl tclreadlineSetup.tcl tclreadlineConfig.sh tclreadline.n pkgIndex.tcl) #TCL_CC='cc' #TCL_CFLAGS_DEBUG='-g' #TCL_CFLAGS_OPTIMIZE='-O' DELETED pkgIndex.tcl Index: pkgIndex.tcl ================================================================== --- pkgIndex.tcl +++ pkgIndex.tcl @@ -1,11 +0,0 @@ -# Tcl package index file, version 1.1 -# This file is generated by the "pkg_mkIndex" command -# and sourced either when an application starts up or -# by a "package unknown" script. It invokes the -# "package ifneeded" command to set up package-related -# information so that packages will be loaded automatically -# in response to "package require" commands. When this -# script is sourced, the variable $dir must contain the -# full path name of this file's directory. - -package ifneeded tclreadline 0.8 [list tclPkgSetup $dir tclreadline 0.8 {{tclreadlineInit.tcl source ::tclreadline::Init} {tclreadlineSetup.tcl source {::tclreadline::Glob ::tclreadline::InitCmds ::tclreadline::InitTclCmds ::tclreadline::InitTkCmds ::tclreadline::Loop ::tclreadline::Print ::tclreadline::Setup}}}] ADDED pkgIndex.tcl.in Index: pkgIndex.tcl.in ================================================================== --- pkgIndex.tcl.in +++ pkgIndex.tcl.in @@ -0,0 +1,31 @@ +#!/usr/local/bin/tclsh +# FILE: "/diska/home/joze/src/tclreadline/pkgIndex.tcl" +# LAST MODIFICATION: "Fri Aug 20 15:33:25 1999 (joze)" +# (C) 1998, 1999 by Johannes Zellner, +# $Id$ +# --- +# +# tclreadline -- gnu readline for tcl +# Copyright (C) 1999 Johannes Zellner +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# johannes@zellner.org +# http://www.zellner.org/tclreadline/ +# +# ================================================================== + +package ifneeded tclreadline @TCLREADLINE_VERSION@ \ + [list source [file join $dir tclreadlineInit.tcl]] Index: sample.tclshrc ================================================================== --- sample.tclshrc +++ sample.tclshrc @@ -1,17 +1,16 @@ -#!/usr/local/bin/tclsh -# -# FILE: "/krispc6/home/joze/src/tclreadline/sample.tclshrc" -# LAST MODIFICATION: "Sat May 8 14:02:19 1999 (joze)" -# (C) 1999 by Johannes Zellner -# johannes@zellner.org +#!/bin/sh +# FILE: "/diska/home/joze/src/tclreadline/sample.tclshrc" +# LAST MODIFICATION: "Fri Aug 20 15:39:58 1999 (joze)" +# (C) 1999 by Johannes Zellner, # $Id$ - +# vim:set ft=tcl: \ +exec tclsh "$0" "$@" if {$tcl_interactive} { package require tclreadline namespace import ::tclreadline::Print # ::tclreadline::Print no ::tclreadline::Loop } Index: tclreadline.n.in ================================================================== --- tclreadline.n.in +++ tclreadline.n.in @@ -1,10 +1,10 @@ .TH tclreadline n "@TCLREADLINE_VERSION@" "Johannes Zellner" .\" (C) 1999 by Johannes Zellner .\" FILE: "/diska/home/joze/src/tclreadline/tclreadline.n.in" -.\" LAST MODIFICATION: "Fri Aug 20 11:09:26 1999 (joze)" +.\" LAST MODIFICATION: "Fri Aug 20 15:01:22 1999 (joze)" .\" (C) 1998, 1999 by Johannes Zellner, .\" $Id$ .\" --- .\" .\" tclreadline -- gnu readline for the tcl scripting language @@ -72,11 +72,11 @@ for developing tcl scripts, you probably don't have to read this section. .PP The following list will give all commands, which are currently -implemented in the shared lib (e.g. libtclreadline0.7.so). +implemented in the shared lib (e.g. libtclreadline@TCLREADLINE_VERSION@.so). Additional commands were introduced in a startup script \fBtclreadlineSetup.tcl\fP, which lives in the tclreadline installation directory. (typically something like /usr/local/lib/tclreadline ..) These commands are primarily for internal use and not documented here. Index: tclreadlineInit.tcl.in ================================================================== --- tclreadlineInit.tcl.in +++ tclreadlineInit.tcl.in @@ -1,8 +1,8 @@ #!/usr/local/bin/tclsh -# FILE: "/krispc6/home/joze/src/tclreadline/tclreadlineInit.tcl.in" -# LAST MODIFICATION: "Sat May 8 15:02:23 1999 (joze)" +# FILE: "/diska/home/joze/src/tclreadline/tclreadlineInit.tcl.in" +# LAST MODIFICATION: "Fri Aug 20 15:37:08 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -45,5 +45,9 @@ puts stderr $msg exit 2 } } +tclreadline::Init + +source [file join [file dirname [info script]] tclreadlineSetup.tcl] + Index: tclreadlineSetup.tcl.in ================================================================== --- tclreadlineSetup.tcl.in +++ tclreadlineSetup.tcl.in @@ -1,8 +1,8 @@ #!/usr/local/bin/tclsh # FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in" -# LAST MODIFICATION: "Thu May 27 14:26:19 1999 (joze)" +# LAST MODIFICATION: "Fri Aug 20 15:23:15 1999 (joze)" # (C) 1998, 1999 by Johannes Zellner, # $Id$ # --- # # tclreadline -- gnu readline for tcl @@ -167,11 +167,13 @@ } proc ::tclreadline::prompt1 {} { variable prompt_string global env - set pwd [pwd] + if {[catch {set pwd [pwd]} tmp]} { + set pwd "unable to get pwd" + } if [info exists env(HOME)] { regsub $env(HOME) $pwd "~" pwd } return "$prompt_string \[$pwd\]"