Index: Makefile.in =================================================================== diff -u -rca94e89f9a531dd4c58e22f1b87c0b941689799a -r043dc9b94b99894cc9b7ad6b61e469f67023c705 --- Makefile.in (.../Makefile.in) (revision ca94e89f9a531dd4c58e22f1b87c0b941689799a) +++ Makefile.in (.../Makefile.in) (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -263,7 +263,7 @@ -(cd $(src_doc_dir); htmldoc --webpage --format pdf14 \ -f langRef-xotcl.pdf langRef-xotcl.html ) -install: install-binaries install-shells install-libraries install-doc install-xotcl-libraries +install: install-binaries install-shells install-libraries install-doc install-xotcl-shells install-xotcl-libraries @if test ! "x$(subdirs)" = "x" ; then dirs="$(subdirs)" ; \ for dir in $$dirs ; do \ if (cd $$dir; $(MAKE) $@) ; then true ; else exit 1 ; fi ; \ @@ -323,6 +323,14 @@ $(INSTALL_DATA) $(xotcl_src_lib_dir)/$$i $(DESTDIR)$(xotcl_pkglibdir)/$$i ; \ done; +install-xotcl-shells: + @if test -f $(xotcl_srcdir)/xotclsh; then \ + $(INSTALL_PROGRAM) $(xotcl_srcdir)/xotclsh $(DESTDIR)$(bindir); \ + fi + @if test -f $(xotcl_srcdir)/xowish; then \ + $(INSTALL_PROGRAM) $(xotcl_srcdir)/xowish $(DESTDIR)$(bindir); \ + fi + install-xotcl-apps: install-xotcl-libraries @echo "Installing Applications to $(DESTDIR)$(xotcl_pkglibdir)/apps/" @for i in $(xotcl_appdirs) ; do \ @@ -480,8 +488,8 @@ @if test -f nxsh; then \ $(INSTALL_PROGRAM) nxsh $(DESTDIR)$(bindir); \ fi - @if test -f xowish; then \ - $(INSTALL_PROGRAM) xowish $(DESTDIR)$(bindir); \ + @if test -f nxwish; then \ + $(INSTALL_PROGRAM) nxwish $(DESTDIR)$(bindir); \ fi #======================================================================== @@ -685,14 +693,8 @@ @echo " export TCLLIBPATH=\"$(TCLLIBPATH)\" or " @echo " setenv TCLLIBPATH \"$(TCLLIBPATH)\"" @echo " and" - @if test "x$(NXSH)" = "x" ; then \ - echo " @TCLSH_PROG@" ; \ - echo " package require nx; namespace import -force nx::*" ; \ - echo " or" ; \ - echo " put the 'package require' line into your ~/.tclshrc" ; \ - else \ - echo " ./nxsh" ; \ - fi + @echo " @TCLSH_PROG@" + @echo " package require nx; namespace import -force nx::*" @echo "************************************************************" RPMSOURCES=/usr/src/redhat/SOURCES Index: TODO =================================================================== diff -u -r39b3afac5fee73db5fadf53f7c25f00a650d11e9 -r043dc9b94b99894cc9b7ad6b61e469f67023c705 --- TODO (.../TODO) (revision 39b3afac5fee73db5fadf53f7c25f00a650d11e9) +++ TODO (.../TODO) (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -1537,6 +1537,11 @@ - perform invariants checking after cmd execution, not additionally before - commented dispatch machinery +- added nxwish.in (scripted replacement for former xowish) +- added xotclsh.in (scripted replacement for former xotclsh) +- added xowish.in (scripted replacement for former xowish) +- added error handling to all scripted shells +- removed old xotclsh.in and xowish.in (from apps/utils) TODO: - extend coro regression test Index: configure =================================================================== diff -u -rd137fce76cdcb71cb10ea76a24e480923124d12c -r043dc9b94b99894cc9b7ad6b61e469f67023c705 --- configure (.../configure) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) +++ configure (.../configure) (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -10940,9 +10940,9 @@ # target, defined in Makefile.in #-------------------------------------------------------------------- -CONFIG_CLEAN_FILES="Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh autom4te.cache/" +CONFIG_CLEAN_FILES="Makefile nsfConfig.sh library/xotcl/xotclsh library/xotcl/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh nxwish autom4te.cache/" -ac_config_files="$ac_config_files Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh" +ac_config_files="$ac_config_files Makefile nsfConfig.sh library/xotcl/xotclsh library/xotcl/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh nxwish" #-------------------------------------------------------------------- @@ -11526,11 +11526,12 @@ case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "nsfConfig.sh") CONFIG_FILES="$CONFIG_FILES nsfConfig.sh" ;; - "library/xotcl/apps/utils/xotclsh") CONFIG_FILES="$CONFIG_FILES library/xotcl/apps/utils/xotclsh" ;; - "library/xotcl/apps/utils/xowish") CONFIG_FILES="$CONFIG_FILES library/xotcl/apps/utils/xowish" ;; + "library/xotcl/xotclsh") CONFIG_FILES="$CONFIG_FILES library/xotcl/xotclsh" ;; + "library/xotcl/xowish") CONFIG_FILES="$CONFIG_FILES library/xotcl/xowish" ;; "unix/xotcl.spec") CONFIG_FILES="$CONFIG_FILES unix/xotcl.spec" ;; "unix/pkgIndex.unix") CONFIG_FILES="$CONFIG_FILES unix/pkgIndex.unix" ;; "nxsh") CONFIG_FILES="$CONFIG_FILES nxsh" ;; + "nxwish") CONFIG_FILES="$CONFIG_FILES nxwish" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} @@ -12113,7 +12114,7 @@ fi -chmod +x nxsh +chmod +x nxsh nxwish library/xotcl/xotclsh library/xotcl/xowish echo "==================== building genstubs (needed for Tcl 8.6)" make genstubs echo "==================== genstubs built" Index: configure.in =================================================================== diff -u -rd137fce76cdcb71cb10ea76a24e480923124d12c -r043dc9b94b99894cc9b7ad6b61e469f67023c705 --- configure.in (.../configure.in) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) +++ configure.in (.../configure.in) (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -424,7 +424,7 @@ dnl Change the value of -this- macro if you want to add or remove dnl such files. -AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/apps/utils/xotclsh library/xotcl/apps/utils/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh]]) +AC_DEFUN(CONFIG_OUTPUT_FILES, [[Makefile nsfConfig.sh library/xotcl/xotclsh library/xotcl/xowish unix/xotcl.spec unix/pkgIndex.unix nxsh nxwish]]) #-------------------------------------------------------------------- # the value of this variable is set to the files which are to be @@ -449,7 +449,7 @@ AC_OUTPUT -chmod +x nxsh +chmod +x nxsh nxwish library/xotcl/xotclsh library/xotcl/xowish echo "==================== building genstubs (needed for Tcl 8.6)" make genstubs echo "==================== genstubs built" Fisheye: Tag 043dc9b94b99894cc9b7ad6b61e469f67023c705 refers to a dead (removed) revision in file `library/xotcl/apps/utils/xotclsh.in'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 043dc9b94b99894cc9b7ad6b61e469f67023c705 refers to a dead (removed) revision in file `library/xotcl/apps/utils/xowish.in'. Fisheye: No comparison available. Pass `N' to diff? Index: library/xotcl/xotclsh.in =================================================================== diff -u --- library/xotcl/xotclsh.in (revision 0) +++ library/xotcl/xotclsh.in (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -0,0 +1,39 @@ +#!@NSF_COMPATIBLE_TCLSH@ +#!/bin/env tclsh +puts @NSF_COMPATIBLE_TCLSH@ +# +# Tiny scripted replacement of a binary nxsh. This script can be used +# as interactive shell for testing or like a regular shell with the !# +# markup in the first line of a script. It is designed to work with +# multiple installed shells during development. For installed +# versions, it should be sufficient to remove the first line. +# +package require XOTcl +namespace import -force ::xotcl::* + +if {$argc == 0} { + set prefix "" + set line "" + while {1} { + if {$line eq ""} { + puts -nonewline "% " + flush stdout + } + append line [gets stdin] + if {[info complete $line]} { + if {[catch $line result]} { + puts $::errorInfo + } else { + puts $result + } + set line "" + continue + } + append line \n + } +} else { + set argv0 [lindex $argv 0] + set argv [lreplace $argv 0 0] + incr argc -1 + source $argv0 +} Index: library/xotcl/xowish.in =================================================================== diff -u --- library/xotcl/xowish.in (revision 0) +++ library/xotcl/xowish.in (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -0,0 +1,42 @@ +#!@NSF_COMPATIBLE_TCLSH@ +#!/bin/env tclsh +puts @NSF_COMPATIBLE_TCLSH@ +# +# Tiny scripted replacement of a binary nxwish (former xowish). This +# script can be used as interactive shell for testing or like a +# regular shell with the !# markup in the first line of a script. It +# is designed to work with multiple installed shells during +# development. For installed versions, it should be sufficient to +# remove the first line. +# +package require Tk +package require XOTcl +namespace import -force ::xotcl::* + +if {$argc == 0} { + set prefix "" + set line "" + while {1} { + update + if {$line eq ""} { + puts -nonewline "% " + flush stdout + } + append line [gets stdin] + if {[info complete $line]} { + if {[catch $line result]} { + puts $::errorInfo + } else { + puts $result + } + set line "" + continue + } + append line \n + } +} else { + set argv0 [lindex $argv 0] + set argv [lreplace $argv 0 0] + incr argc -1 + source $argv0 +} Index: nxsh.in =================================================================== diff -u -rd137fce76cdcb71cb10ea76a24e480923124d12c -r043dc9b94b99894cc9b7ad6b61e469f67023c705 --- nxsh.in (.../nxsh.in) (revision d137fce76cdcb71cb10ea76a24e480923124d12c) +++ nxsh.in (.../nxsh.in) (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -21,9 +21,13 @@ } append line [gets stdin] if {[info complete $line]} { - puts [eval $line] - set line "" - continue + if {[catch $line result]} { + puts $::errorInfo + } else { + puts $result + } + set line "" + continue } append line \n } Index: nxwish.in =================================================================== diff -u --- nxwish.in (revision 0) +++ nxwish.in (revision 043dc9b94b99894cc9b7ad6b61e469f67023c705) @@ -0,0 +1,42 @@ +#!@NSF_COMPATIBLE_TCLSH@ +#!/bin/env tclsh +puts @NSF_COMPATIBLE_TCLSH@ +# +# Tiny scripted replacement of a binary nxwish (former xowish). This +# script can be used as interactive shell for testing or like a +# regular shell with the !# markup in the first line of a script. It +# is designed to work with multiple installed shells during +# development. For installed versions, it should be sufficient to +# remove the first line. +# +package require Tk +package require nx +namespace import ::nx::* + +if {$argc == 0} { + set prefix "" + set line "" + while {1} { + update + if {$line eq ""} { + puts -nonewline "% " + flush stdout + } + append line [gets stdin] + if {[info complete $line]} { + if {[catch $line result]} { + puts $::errorInfo + } else { + puts $result + } + set line "" + continue + } + append line \n + } +} else { + set argv0 [lindex $argv 0] + set argv [lreplace $argv 0 0] + incr argc -1 + source $argv0 +}