Check-in [63be52cad5]
Not logged in
Overview
Comment: Makefile.in README configure.in sample.tclshrc tclreadline.n.in tclreadlineInit.tcl.in tclreadlineSetup.tcl.in Added Files: pkgIndex.tcl.in Removed Files: pkgIndex.tcl
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 63be52cad5e1e48d9aa26ff7b36a31293cbc944a
User & Date: johannes@zellner.org on 1999-08-20 13:40:53
Other Links: manifest | tags
Context
1999-08-20
13:41
sources check-in: fba2a11ea2 user: johannes@zellner.org tags: trunk
13:40
Makefile.in README configure.in sample.tclshrc tclreadline.n.in tclreadlineInit.tcl.in tclreadlineSetup.tcl.in Added Files: pkgIndex.tcl.in Removed Files: pkgIndex.tcl check-in: 63be52cad5 user: johannes@zellner.org tags: trunk
11:35
config.guess config.sub install-sh mkinstalldirs tcltags vimtags check-in: 3aa896e85d user: johannes@zellner.org tags: trunk
Changes

Modified Makefile.in from [2ce64798a5] to [0257af5dc0].

1
2
3
4
5
6
7
8
9
10
# -*- make -*-
# FILE: "/krispc6/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Mon May 10 13:10:22 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#

|
|







1
2
3
4
5
6
7
8
9
10
# -*- make -*-
# FILE: "/diska/home/joze/src/tclreadline/Makefile.in"
# LAST MODIFICATION: "Fri Aug 20 15:03:54 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
102
103
104
105
106
107
108

109
110
111
112
113
114
115

# Tk used to let the configure script choose which program to use
# 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_PROGRAM = ${INSTALL}
INSTALL_DATA    = ${INSTALL} -m 644
MKINSTALLDIRS   = $(TOP_DIR)/aux/mkinstalldirs

# The symbols below provide support for dynamic loading and shared
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of







>







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

# Tk used to let the configure script choose which program to use
# 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
# libraries.  The values of the symbols are normally set by the
# configure script.  You shouldn't normally need to modify any of

Modified README from [e9f79be895] to [ae2b4b25fc].

1
2
3
4
5
6
7
8
9
10

    FILE: "/krispc6/home/joze/src/tclreadline/README"
    LAST MODIFICATION: "Sat May  8 14:05:41 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner


|
|







1
2
3
4
5
6
7
8
9
10

    FILE: "/diska/home/joze/src/tclreadline/README"
    LAST MODIFICATION: "Fri Aug 20 15:01:56 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


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).

2. Documentation
----------------

The tclreadline.n nroff man page in this release contains the reference
manual entries for tclreadline.  If you only want to use tclreadline as
a tool for interactive script development,  you don't have to read this







|







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


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.9 (still a developers release).

2. Documentation
----------------

The tclreadline.n nroff man page in this release contains the reference
manual entries for tclreadline.  If you only want to use tclreadline as
a tool for interactive script development,  you don't have to read this
68
69
70
71
72
73
74
75
76

copy the sample.tclshrc to $HOME/.tclshrc. If you use another interpreter
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.









<
<
68
69
70
71
72
73
74



copy the sample.tclshrc to $HOME/.tclshrc. If you use another interpreter
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.


Modified configure.in from [8c8e79267c] to [2d822276ab].

1
2
3
4
5
6
7
8
9
10
# -*- autoconf -*-
# FILE: "/krispc6/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Fri May 14 14:47:38 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#

|
|







1
2
3
4
5
6
7
8
9
10
# -*- autoconf -*-
# FILE: "/diska/home/joze/src/tclreadline/configure.in"
# LAST MODIFICATION: "Fri Aug 20 15:35:10 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61


62
63


64
65
66
67
68
69
70
71
72
73
74


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="$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_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
    if test -r $dir/tclConfig.sh; then
        TCL_LIB_DIR=$dir
        break
    fi
done

if test -z "$TCL_LIB_DIR"; then







<
|
<
<
<








>
>
|
|
>
>



|







42
43
44
45
46
47
48

49



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74


AC_PREREQ(2.13)
AC_CONFIG_AUX_DIR(./aux)
AC_CANONICAL_HOST



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=""
)

AC_MSG_CHECKING([which tclConfig.sh to use])
TCL_LIB_DIR=""
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

if test -z "$TCL_LIB_DIR"; then
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122



# -----------------------------------------------------------------------
#   Set up a new default --prefix.
# -----------------------------------------------------------------------

AC_PREFIX_DEFAULT(/usr/local)

if test "${prefix}" = "NONE"; then
    prefix=$TCL_PREFIX
fi
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$TCL_EXEC_PREFIX
else







|







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122



# -----------------------------------------------------------------------
#   Set up a new default --prefix.
# -----------------------------------------------------------------------

# AC_PREFIX_DEFAULT(/usr/local)

if test "${prefix}" = "NONE"; then
    prefix=$TCL_PREFIX
fi
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$TCL_EXEC_PREFIX
else
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
AC_SUBST(TCLREADLINE_LIB_DIR)
AC_SUBST(TCLREADLINE_PKG_FILE)

AC_SUBST(TCLREADLINE_PACKAGE_PATH)
AC_SUBST(TCLREADLINE_LIBRARY)


AC_OUTPUT(Makefile tclreadline.h tclreadlineInit.tcl tclreadlineSetup.tcl tclreadlineConfig.sh tclreadline.n)


#TCL_CC='cc'
#TCL_CFLAGS_DEBUG='-g'
#TCL_CFLAGS_OPTIMIZE='-O'
#TCL_SHARED_BUILD=1
#







|







468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
AC_SUBST(TCLREADLINE_LIB_DIR)
AC_SUBST(TCLREADLINE_PKG_FILE)

AC_SUBST(TCLREADLINE_PACKAGE_PATH)
AC_SUBST(TCLREADLINE_LIBRARY)


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'
#TCL_SHARED_BUILD=1
#

Deleted pkgIndex.tcl version [cd9e5665c0].

1
2
3
4
5
6
7
8
9
10
11
# 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 version [62387bbed8].































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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, <johannes@zellner.org>
# $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]]

Modified sample.tclshrc from [693bb1ae82] to [79de25f768].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
16
17
#!/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
# $Id$




if {$tcl_interactive} {
    package require tclreadline
    namespace import ::tclreadline::Print
#    ::tclreadline::Print no
    ::tclreadline::Loop
}

|
<
|
|
|
<

|
>









1

2
3
4

5
6
7
8
9
10
11
12
13
14
15
16
#!/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, <johannes@zellner.org>

# $Id$
# vim:set ft=tcl: \
exec tclsh "$0" "$@"


if {$tcl_interactive} {
    package require tclreadline
    namespace import ::tclreadline::Print
#    ::tclreadline::Print no
    ::tclreadline::Loop
}

Modified tclreadline.n.in from [42771656fc] to [09c544295b].

1
2
3
4
5
6
7
8
9
10
11
12
.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)"
.\" (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
.\" $Id$
.\" ---
.\"
.\" tclreadline -- gnu readline for the tcl scripting language
.\" Copyright (C) 1999  Johannes Zellner
.\"




|







1
2
3
4
5
6
7
8
9
10
11
12
.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 15:01:22 1999 (joze)"
.\" (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
.\" $Id$
.\" ---
.\"
.\" tclreadline -- gnu readline for the tcl scripting language
.\" Copyright (C) 1999  Johannes Zellner
.\"
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

If you want to use \fBtclreadline\fP as a line interface
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).
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.

Note that all commands reside in the namespace \fB::tclreadline::\fP.







|







70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

If you want to use \fBtclreadline\fP as a line interface
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. 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.

Note that all commands reside in the namespace \fB::tclreadline::\fP.

Modified tclreadlineInit.tcl.in from [49ecba8dbd] to [5477ab3f3e].

1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/tclsh
# FILE: "/krispc6/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
# LAST MODIFICATION: "Sat May  8 15:02:23 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#

|
|







1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/tclsh
# 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, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
43
44
45
46
47
48
49





    if [catch {load @TCLREADLINE_LIBRARY@/@TCLREADLINE_LIB_FILE@} msg] {
        puts stderr $msg
        exit 2
    }
}












>
>
>
>
43
44
45
46
47
48
49
50
51
52
53

    if [catch {load @TCLREADLINE_LIBRARY@/@TCLREADLINE_LIB_FILE@} msg] {
        puts stderr $msg
        exit 2
    }
}

tclreadline::Init

source [file join [file dirname [info script]] tclreadlineSetup.tcl]

Modified tclreadlineSetup.tcl.in from [6a07e26e50] to [5442833e91].

1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Thu May 27 14:26:19 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#


|







1
2
3
4
5
6
7
8
9
10
#!/usr/local/bin/tclsh
# FILE: "/diska/home/joze/src/tclreadline/tclreadlineSetup.tcl.in"
# LAST MODIFICATION: "Fri Aug 20 15:23:15 1999 (joze)"
# (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
#
# tclreadline -- gnu readline for tcl
# Copyright (C) 1999  Johannes Zellner
#
165
166
167
168
169
170
171

172

173
174
175
176
177
178
179
                }

            }

            proc ::tclreadline::prompt1 {} {
                variable prompt_string
                global env

                set pwd [pwd]


                if [info exists env(HOME)] {
                    regsub $env(HOME) $pwd "~" pwd
                }
                return "$prompt_string \[$pwd\]"
            }
        }







>
|
>







165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
                }

            }

            proc ::tclreadline::prompt1 {} {
                variable prompt_string
                global env
                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\]"
            }
        }