summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2018-09-02 23:39:43 +0200
committerRuben Undheim <ruben.undheim@gmail.com>2018-09-02 23:39:43 +0200
commit2503cd99c49f6c0c962a74339fd0c3a9931d1052 (patch)
treea8d03db33f8b5e97532a6daa71d9784cc98c56e6
parentf755f8b97dcbe99f794bbd0d946e41b98b1b23a3 (diff)
New upstream version 9.7.100
-rw-r--r--VERSION2
-rw-r--r--analyzer/postscript.c2
-rw-r--r--irsim/Makefile2
-rw-r--r--random/Makefile2
-rwxr-xr-xscripts/configure19
-rw-r--r--scripts/configure.in19
-rw-r--r--tclsubckt/Makefile2
-rw-r--r--tcltk/Makefile2
-rwxr-xr-xtcltk/irsim.sh.in2
-rw-r--r--tcltk/irsim.tcl.in7
-rw-r--r--tcltk/tclirsim.c16
-rwxr-xr-xtcltk/tkcon.tcl87
12 files changed, 130 insertions, 32 deletions
diff --git a/VERSION b/VERSION
index c635ed0..2d95838 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-9.7.93
+9.7.100
diff --git a/analyzer/postscript.c b/analyzer/postscript.c
index 9ede099..e54a753 100644
--- a/analyzer/postscript.c
+++ b/analyzer/postscript.c
@@ -141,7 +141,7 @@ public void WritePSfile( psfname )
if( *psfname == '\0' )
psfname = fname;
- else
+ else if (fname != psfname)
(void) strcpy( fname, psfname );
if( (psout = fopen( psfname, "w" )) == NULL )
diff --git a/irsim/Makefile b/irsim/Makefile
index 928af67..f2808ed 100644
--- a/irsim/Makefile
+++ b/irsim/Makefile
@@ -22,7 +22,7 @@ tcl-main: tclirsim${SHDLIB_EXT}
tclirsim${SHDLIB_EXT}: ${EXTRA_LIBS}
@echo --- making irsim Tcl library \(tclirsim${SHDLIB_EXT}\)
${RM} tclirsim${SHDLIB_EXT}
- ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${LDDL_FLAGS} ${LD_RUN_PATH} \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ ${LDDL_FLAGS} ${LD_RUN_PATH} \
${EXTRA_LIBS} -lc ${LIBS} ${LD_EXTRA_LIBS}
$(DESTDIR)${BINDIR}/irsim:
diff --git a/random/Makefile b/random/Makefile
index f0c2638..78b26ed 100644
--- a/random/Makefile
+++ b/random/Makefile
@@ -21,7 +21,7 @@ randwrap.o: random.c
random${SHDLIB_EXT}: randwrap.o
@echo --- making random Tcl library
${RM} random${SHDLIB_EXT}
- ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${LDDL_FLAGS} randwrap.o \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ ${LDDL_FLAGS} randwrap.o \
${MAC_SHARED} -lc ${LIBS} ${LD_EXTRA_LIBS}
install-tcl: $(DESTDIR)${TCLDIR}/random${SHDLIB_EXT}
diff --git a/scripts/configure b/scripts/configure
index 36f3936..9914605 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -5150,6 +5150,25 @@ if test $usingTcl ; then
. $tcl_config_sh
. $tk_config_sh
+ # Should probably trust the config file contents, but this configure
+ # file checks the Tcl and Tk include and lib directories. Since
+ # the config file doesn't separate out the libraries from the strings
+ # passed to the compiler/linker, do it manually here.
+ #
+ # Extract TCL_LIB_DIR from TCL_LIB_SPEC
+ # Extract TK_LIB_DIR from TK_LIB_SPEC
+ # Extract TCL_INC_DIR from TCL_INCLUDE_SPEC
+ # Extract TK_INC_DIR from TK_INCLUDE_SPEC
+ #
+ # These will be the defaults unless overridden by configure command line
+
+ tmpstr=${TCL_LIB_SPEC#*-L}
+ TCL_LIB_DIR=${tmpstr% -l*}
+ tmpstr=${TK_LIB_SPEC#*-L}
+ TK_LIB_DIR=${tmpstr% -l*}
+ TCL_INC_DIR=${TCL_INCLUDE_SPEC#*-I}
+ TK_INC_DIR=${TK_INCLUDE_SPEC#*-I}
+
if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then
:
elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then
diff --git a/scripts/configure.in b/scripts/configure.in
index cf61d2e..3570602 100644
--- a/scripts/configure.in
+++ b/scripts/configure.in
@@ -458,6 +458,25 @@ if test $usingTcl ; then
. $tcl_config_sh
. $tk_config_sh
+ # Should probably trust the config file contents, but this configure
+ # file checks the Tcl and Tk include and lib directories. Since
+ # the config file doesn't separate out the libraries from the strings
+ # passed to the compiler/linker, do it manually here.
+ #
+ # Extract TCL_LIB_DIR from TCL_LIB_SPEC
+ # Extract TK_LIB_DIR from TK_LIB_SPEC
+ # Extract TCL_INC_DIR from TCL_INCLUDE_SPEC
+ # Extract TK_INC_DIR from TK_INCLUDE_SPEC
+ #
+ # These will be the defaults unless overridden by configure command line
+
+ tmpstr=${TCL_LIB_SPEC#*-L}
+ TCL_LIB_DIR=${tmpstr% -l*}
+ tmpstr=${TK_LIB_SPEC#*-L}
+ TK_LIB_DIR=${tmpstr% -l*}
+ TCL_INC_DIR=${TCL_INCLUDE_SPEC#*-I}
+ TK_INC_DIR=${TK_INCLUDE_SPEC#*-I}
+
if test "$TCL_VERSION" = "7.6" -a "$TK_VERSION" = "4.2" ; then
:
elif test "$TCL_VERSION" = "7.5" -a "$TK_VERSION" = "4.1" ; then
diff --git a/tclsubckt/Makefile b/tclsubckt/Makefile
index 9a4c760..0bf5a67 100644
--- a/tclsubckt/Makefile
+++ b/tclsubckt/Makefile
@@ -22,7 +22,7 @@ diglib.o: diglib.c
diglib${SHDLIB_EXT}: diglib.o
@echo --- making diglib subcircuit shared library
${RM} diglib${SHDLIB_EXT}
- ${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${LDDL_FLAGS} diglib.o \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o $@ ${LDDL_FLAGS} diglib.o \
${MAC_SHARED} -lc ${LIBS} ${LD_EXTRA_LIBS}
install-tcl: $(DESTDIR)${TCLDIR}/diglib${SHDLIB_EXT}
diff --git a/tcltk/Makefile b/tcltk/Makefile
index 075be78..1ff6caf 100644
--- a/tcltk/Makefile
+++ b/tcltk/Makefile
@@ -26,7 +26,7 @@ install-tcl: irsimexec $(DESTDIR)${BINDIR}/irsim.sh ${TCL_FILES}
${CP} irsimexec $(DESTDIR)${TCLDIR}/irsimexec
irsimexec: irsimexec.c tclirsim.o
- ${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} irsimexec.c -o irsimexec \
+ ${CC} ${CFLAGS} ${CPPFLAGS} ${DFLAGS} ${LDFLAGS} irsimexec.c -o irsimexec \
${LIBS} ${LIB_SPECS}
irsim.tcl: irsim.tcl.in
diff --git a/tcltk/irsim.sh.in b/tcltk/irsim.sh.in
index e9e9333..779617b 100755
--- a/tcltk/irsim.sh.in
+++ b/tcltk/irsim.sh.in
@@ -17,7 +17,7 @@ IRSIM_WISH=WISH_EXE
export IRSIM_WISH
# Hacks for Cygwin
-if [ ${TERM:=""} = "cygwin" ]; then
+if [ "`uname | cut -d_ -f1`" = "CYGWIN" ]; then
export PATH="$PATH:TCLLIB_DIR"
export DISPLAY=${DISPLAY:=":0"}
fi
diff --git a/tcltk/irsim.tcl.in b/tcltk/irsim.tcl.in
index 639cf40..fb1698a 100644
--- a/tcltk/irsim.tcl.in
+++ b/tcltk/irsim.tcl.in
@@ -1103,7 +1103,12 @@ if { $UsingMagic } {
}
}
}
- eval $argafter ;# irsim::start ${argv}
+ set ret [catch {eval $argafter} result] ;# irsim::start ${argv}
+ if {$ret == 0} {
+ return result
+ } else {
+ return -code $ret -errorcode $errorCode $result
+ }
}
}
diff --git a/tcltk/tclirsim.c b/tcltk/tclirsim.c
index de13ba5..5e5db90 100644
--- a/tcltk/tclirsim.c
+++ b/tcltk/tclirsim.c
@@ -504,6 +504,7 @@ static int _irsim_start(ClientData clientData,
Tcl_Interp *interp, int argc, char *argv[])
{
int i, arg1, has_prm_file = -1;
+ int result = TCL_OK;
char versionstr[128];
/* Did we start in the same interpreter as we initialized? */
@@ -599,6 +600,7 @@ static int _irsim_start(ClientData clientData,
filename = "command line";
lineno = 1;
+ result = TCL_OK;
for (i = arg1; i < argc; i++) {
if (argv[i][0] == '-') {
char *farg;
@@ -606,8 +608,10 @@ static int _irsim_start(ClientData clientData,
if (!strcmp(&argv[i][1], "c") && (i < (argc - 1)))
{
farg = argv[++i];
- if (!finput(farg))
- rsimerror(filename, lineno, "cannot open %s for input\n", farg);
+ if (!finput(farg)) {
+ rsimerror(filename, lineno, "error reading script %s\n", farg);
+ result = TCL_ERROR;
+ }
}
else if (!strcmp(&argv[i][1], "@") && (i < (argc - 1)))
{
@@ -617,12 +621,14 @@ static int _irsim_start(ClientData clientData,
else
{
farg = &argv[i][1];
- if (!finput(farg))
- rsimerror(filename, lineno, "cannot open %s for input\n", farg);
+ if (!finput(farg)) {
+ rsimerror(filename, lineno, "error reading script %s\n", farg);
+ result = TCL_ERROR;
+ }
}
}
}
- return TCL_OK;
+ return result;
}
/*--------------------------------------*/
diff --git a/tcltk/tkcon.tcl b/tcltk/tkcon.tcl
index 071b6f4..36c7cf6 100755
--- a/tcltk/tkcon.tcl
+++ b/tcltk/tkcon.tcl
@@ -742,9 +742,9 @@ proc ::tkcon::EvalCmd {w cmd} {
set tag [UniqueTag $w]
$w insert output $res [list stderr $tag] \n stderr
$w tag bind $tag <Enter> \
- [list $w tag configure $tag -under 1]
+ [list $w tag configure $tag -underline 1]
$w tag bind $tag <Leave> \
- [list $w tag configure $tag -under 0]
+ [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> \
"if {!\[info exists tkPriv(mouseMoved)\] || !\$tkPriv(mouseMoved)} \
{[list edit -attach [Attach] -type error -- $PRIV(errorInfo)]}"
@@ -2473,8 +2473,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $start+${c0}c $start+1c+${c1}c
$w tag configure $tag -foreground $COLOR(stdout)
- $w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
- $w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
+ $w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
+ $w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list edit -attach $app -type proc -find $what -- $cmd]}"
}
@@ -2502,8 +2502,8 @@ proc ::tkcon::ErrorHighlight w {
set tag [UniqueTag $w]
$w tag add $tag $ix+1c $start
$w tag configure $tag -foreground $COLOR(proc)
- $w tag bind $tag <Enter> [list $w tag configure $tag -under 1]
- $w tag bind $tag <Leave> [list $w tag configure $tag -under 0]
+ $w tag bind $tag <Enter> [list $w tag configure $tag -underline 1]
+ $w tag bind $tag <Leave> [list $w tag configure $tag -underline 0]
$w tag bind $tag <ButtonRelease-1> "if {!\$tkPriv(mouseMoved)} \
{[list edit -attach $app -type proc -- $cmd]}"
}
@@ -2553,8 +2553,8 @@ proc tkcon {cmd args} {
## 'congets' a replacement for [gets stdin]
# Use the 'gets' alias of 'tkcon_gets' command instead of
# calling the *get* methods directly for best compatability
- if {[llength $args]} {
- return -code error "wrong # args: must be \"tkcon congets\""
+ if {[llength $args] > 1} {
+ return -code error "wrong # args: must be \"tkcon congets [pfix]\""
}
tkcon show
set old [bind TkConsole <<TkCon_Eval>>]
@@ -2562,7 +2562,12 @@ proc tkcon {cmd args} {
set w $::tkcon::PRIV(console)
# Make sure to move the limit to get the right data
$w mark set insert end
- $w mark set limit insert
+ if {[llength $args]} {
+ $w mark set limit insert
+ $w insert end $args
+ } else {
+ $w mark set limit insert
+ }
$w see end
vwait ::tkcon::PRIV(wait)
set line [::tkcon::CmdGet $w]
@@ -2799,13 +2804,19 @@ proc tkcon_puts args {
foreach {arg1 arg2 arg3} $args { break }
if {$len == 1} {
- tkcon console insert output "$arg1\n" stdout
+ set sarg $arg1
+ set nl 1
+ set farg stdout
} elseif {$len == 2} {
if {![string compare $arg1 -nonewline]} {
- tkcon console insert output $arg2 stdout
+ set sarg $arg2
+ set farg stdout
+ set nl 0
} elseif {![string compare $arg1 stdout] \
|| ![string compare $arg1 stderr]} {
- tkcon console insert output "$arg2\n" $arg1
+ set sarg $arg2
+ set farg $arg1
+ set nl 1
} else {
set len 0
}
@@ -2813,11 +2824,15 @@ proc tkcon_puts args {
if {![string compare $arg1 -nonewline] \
&& (![string compare $arg2 stdout] \
|| ![string compare $arg2 stderr])} {
- tkcon console insert output $arg3 $arg2
+ set sarg $arg3
+ set farg $arg2
+ set nl 0
} elseif {(![string compare $arg1 stdout] \
|| ![string compare $arg1 stderr]) \
&& ![string compare $arg3 nonewline]} {
- tkcon console insert output $arg2 $arg1
+ set sarg $arg2
+ set farg $arg1
+ set nl 0
} else {
set len 0
}
@@ -2827,7 +2842,41 @@ proc tkcon_puts args {
## $len == 0 means it wasn't handled by tkcon above.
##
- if {$len == 0} {
+
+ if {$len != 0} {
+
+ ## "poor man's" \r substitution---erase everything on the output
+ ## line and print from character after the \r
+
+ set rpt [string last \r $sarg]
+ if {$rpt >= 0} {
+ tkcon console delete "insert linestart" "insert lineend"
+ set sarg [string range $sarg [expr {$rpt + 1}] end]
+ }
+
+ set bpt [string first \b $sarg]
+ if {$bpt >= 0} {
+ set narg [string range $sarg [expr {$bpt + 1}] end]
+ set sarg [string range $sarg 0 [expr {$bpt - 1}]]
+ set nl 0
+ }
+
+ if {$nl == 0} {
+ tkcon console insert output $sarg $farg
+ } else {
+ tkcon console insert output "$sarg\n" $farg
+ }
+
+ if {$bpt >= 0} {
+ tkcon console delete "insert -1 char" insert
+ if {$nl == 0} {
+ tkcon_puts $farg $narg nonewline
+ } else {
+ tkcon_puts $farg $narg
+ }
+ }
+
+ } else {
global errorCode errorInfo
if {[catch "tkcon_tcl_puts $args" msg]} {
regsub tkcon_tcl_puts $msg puts msg
@@ -2955,14 +3004,14 @@ proc edit {args} {
##
set text $w.text
set m [menu [::tkcon::MenuButton $menu Edit edit]]
- $m add command -label "Cut" -under 2 \
+ $m add command -label "Cut" -underline 2 \
-command [list tk_textCut $text]
- $m add command -label "Copy" -under 0 \
+ $m add command -label "Copy" -underline 0 \
-command [list tk_textCopy $text]
- $m add command -label "Paste" -under 0 \
+ $m add command -label "Paste" -underline 0 \
-command [list tk_textPaste $text]
$m add separator
- $m add command -label "Find" -under 0 \
+ $m add command -label "Find" -underline 0 \
-command [list ::tkcon::FindBox $text]
## Send To Menu