diff options
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | doc/expr.n | 16 | ||||
-rw-r--r-- | generic/tclIO.c | 2 | ||||
-rw-r--r-- | generic/tclStubLib.c | 5 | ||||
-rw-r--r-- | tests/chan.test | 2 |
5 files changed, 30 insertions, 6 deletions
@@ -1,3 +1,14 @@ +2012-12-09 Alexandre Ferrieux <ferrieux@users.sourceforge.net> + * tests/chan.test: Clean up unwanted eofchar side-effect of + chan-4.6 leading to a spurious "'" at end of chan.test under + certain conditions (see [Bug 3389289] and [Bug 3389251]). + * doc/expr.n: [Bug 3594188] Clarifications about commas. + +2012-12-08 Alexandre Ferrieux <ferrieux@users.sourceforge.net> + * generic/tclIO.c: Fix busyloop at exit under TCL_FINALIZE_ON_EXIT + when there are unflushed nonblocking channels. Thanks Miguel for + spotting. + 2012-12-07 Jan Nijtmans <nijtmans@users.sf.net> * unix/dltest/pkgb.c: Turn pkgb.so into a Tcl8 interoperability test @@ -39,9 +39,9 @@ additional operators not found in C. .SS OPERANDS .PP A Tcl expression consists of a combination of operands, operators, -and parentheses. +parentheses and commas. White space may be used between the operands and operators and -parentheses; it is ignored by the expression's instructions. +parentheses (or commas); it is ignored by the expression's instructions. Where possible, operands are interpreted as integer values. Integer values may be specified in decimal (the normal case), in binary (if the first two characters of the operand are \fB0b\fR), in octal @@ -280,6 +280,18 @@ rules for resolving functions in namespaces. Either current]::tcl::mathfunc::sin\fR will satisfy the request, and others may as well (depending on the current \fBnamespace path\fR setting). .PP +Some mathematical functions have several arguments, separated by commas like in C. Thus: +.PP +.CS +\fBexpr\fR {hypot($x,$y)} +.CE +.PP +ends up as +.PP +.CS +tcl::mathfunc::hypot $x $y +.CE +.PP See the \fBmathfunc\fR(n) manual page for the math functions that are available by default. .SS "TYPES, OVERFLOW, AND PRECISION" diff --git a/generic/tclIO.c b/generic/tclIO.c index 5bd0e2a..0568d77 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -2472,7 +2472,7 @@ FlushChannel( * it's a tty channel (dup'ed underneath) */ - if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED)) { + if (!GotFlag(statePtr, BG_FLUSH_SCHEDULED) && !TclInExit()) { SetFlag(statePtr, BG_FLUSH_SCHEDULED); UpdateInterest(chanPtr); } diff --git a/generic/tclStubLib.c b/generic/tclStubLib.c index e48e60b..720d9ef 100644 --- a/generic/tclStubLib.c +++ b/generic/tclStubLib.c @@ -79,6 +79,7 @@ TclInitStubs( int magic) { const char *actualVersion = NULL; + ClientData pkgData = NULL; const TclStubs *stubsPtr; /* @@ -92,7 +93,7 @@ TclInitStubs( return NULL; } - actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, NULL); + actualVersion = stubsPtr->tcl_PkgRequireEx(interp, "Tcl", version, 0, &pkgData); if (actualVersion == NULL) { return NULL; } @@ -122,7 +123,7 @@ TclInitStubs( } } } - tclStubsPtr = stubsPtr; + tclStubsPtr = (TclStubs *)pkgData; if (tclStubsPtr->hooks) { tclPlatStubsPtr = tclStubsPtr->hooks->tclPlatStubs; diff --git a/tests/chan.test b/tests/chan.test index da44ffd..d8390e2 100644 --- a/tests/chan.test +++ b/tests/chan.test @@ -61,7 +61,7 @@ test chan-4.5 {chan command: check valid inValue, invalid outValue} -body { } -returnCodes error -match glob -result {bad value for -eofchar:*} test chan-4.6 {chan command: check no inValue, valid outValue} -body { chan configure stdout -eofchar [list {} \x27] -} -returnCodes ok -result {} +} -returnCodes ok -result {} -cleanup {chan configure stdout -eofchar [list {} {}]} test chan-5.1 {chan command: copy subcommand} -body { chan copy foo |