-- cgit v0.12 From c0481e830577e5c171081870edce6c95d6f6ef87 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Sun, 7 Aug 2022 07:16:38 +0000 Subject: TIP 631 - lsubst command --- generic/tclBasic.c | 1 + generic/tclCmdIL.c | 117 +++++++++++++++++++++ generic/tclInt.h | 3 + tests/lreplace.test | 295 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 416 insertions(+) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index a0c5a91..f7e0929 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -324,6 +324,7 @@ static const CmdInfo builtInCmds[] = { {"lsearch", Tcl_LsearchObjCmd, NULL, NULL, CMD_IS_SAFE}, {"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, CMD_IS_SAFE}, {"lsort", Tcl_LsortObjCmd, NULL, NULL, CMD_IS_SAFE}, + {"lsubst", Tcl_LsubstObjCmd, NULL, NULL, CMD_IS_SAFE}, {"package", Tcl_PackageObjCmd, NULL, TclNRPackageObjCmd, CMD_IS_SAFE}, {"proc", Tcl_ProcObjCmd, NULL, NULL, CMD_IS_SAFE}, {"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, CMD_IS_SAFE}, diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index cdc302c..7776c78 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -4486,6 +4486,123 @@ Tcl_LsortObjCmd( /* *---------------------------------------------------------------------- * + * Tcl_LsubstObjCmd -- + * + * This procedure is invoked to process the "lsubst" Tcl command. See the + * user documentation for details on what it does. + * + * Results: + * A standard Tcl result. + * + * Side effects: + * See the user documentation. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_LsubstObjCmd( + TCL_UNUSED(ClientData), + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument values. */ +{ + Tcl_Obj *listPtr; /* Pointer to the list being altered. */ + Tcl_Obj *finalValuePtr; /* Value finally assigned to the variable. */ + int createdNewObj; + int result; + int first; + int last; + int listLen; + int numToDelete; + + if (objc < 4) { + Tcl_WrongNumArgs(interp, 1, objv, + "listVar first last ?element ...?"); + return TCL_ERROR; + } + + listPtr = Tcl_ObjGetVar2(interp, objv[1], NULL, TCL_LEAVE_ERR_MSG); + if (listPtr == NULL) { + return TCL_ERROR; + } + + /* + * TODO - refactor the index extraction into a common function shared + * by Tcl_{Lrange,Lreplace,Lsubst}ObjCmd + */ + + result = TclListObjLengthM(interp, listPtr, &listLen); + if (result != TCL_OK) { + return result; + } + + result = TclGetIntForIndexM(interp, objv[2], /*end*/ listLen-1, &first); + if (result != TCL_OK) { + return result; + } + + result = TclGetIntForIndexM(interp, objv[3], /*end*/ listLen-1, &last); + if (result != TCL_OK) { + return result; + } + + if (first == TCL_INDEX_NONE) { + first = 0; + } else if (first > listLen) { + first = listLen; + } + + if (last >= listLen) { + last = listLen - 1; + } + if (first <= last) { + numToDelete = last - first + 1; + } else { + numToDelete = 0; + } + + if (Tcl_IsShared(listPtr)) { + listPtr = TclListObjCopy(NULL, listPtr); + createdNewObj = 1; + } else { + createdNewObj = 0; + } + + result = + Tcl_ListObjReplace(interp, listPtr, first, numToDelete, objc - 4, objv + 4); + if (result != TCL_OK) { + if (createdNewObj) { + Tcl_DecrRefCount(listPtr); + } + return result; + } + + /* + * Tcl_ObjSetVar2 mau return a value different from listPtr in the + * presence of traces etc.. Note that finalValuePtr will always have a + * reference count of at least 1 corresponding to the reference from the + * var. If it is same as listPtr, then ref count will be at least 2 + * since we are incr'ing the latter below (safer when calling + * Tcl_ObjSetVar2 which can release it in some cases). Note that we + * leave the incrref of listPtr this late because we want to pass it as + * unshared to Tcl_ListObjReplace above if possible. + */ + Tcl_IncrRefCount(listPtr); + finalValuePtr = + Tcl_ObjSetVar2(interp, objv[1], NULL, listPtr, TCL_LEAVE_ERR_MSG); + Tcl_DecrRefCount(listPtr); /* safe irrespective of createdNewObj */ + if (finalValuePtr == NULL) { + return TCL_ERROR; + } + + Tcl_SetObjResult(interp, finalValuePtr); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * * MergeLists - * * This procedure combines two sorted lists of SortElement structures diff --git a/generic/tclInt.h b/generic/tclInt.h index 06ec2ad..562140c 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3711,6 +3711,9 @@ MODULE_SCOPE int Tcl_LsetObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_LsortObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int Tcl_LsubstObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); MODULE_SCOPE Tcl_Command TclInitNamespaceCmd(Tcl_Interp *interp); MODULE_SCOPE int TclNamespaceEnsembleCmd(ClientData dummy, Tcl_Interp *interp, int objc, diff --git a/tests/lreplace.test b/tests/lreplace.test index 0b26e86..4204c2f 100644 --- a/tests/lreplace.test +++ b/tests/lreplace.test @@ -236,6 +236,301 @@ apply {{} { } }} +# Essentially same tests as above but for lsubst +test lsubst-1.1 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 0 0 a] $l +} {{a 2 3 4 5} {a 2 3 4 5}} +test lsubst-1.2 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 1 1 a] $l +} {{1 a 3 4 5} {1 a 3 4 5}} +test lsubst-1.3 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 2 2 a] $l +} {{1 2 a 4 5} {1 2 a 4 5}} +test lsubst-1.4 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 3 3 a] $l +} {{1 2 3 a 5} {1 2 3 a 5}} +test lsubst-1.5 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 4 4 a] $l +} {{1 2 3 4 a} {1 2 3 4 a}} +test lsubst-1.6 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 4 5 a] $l +} {{1 2 3 4 a} {1 2 3 4 a}} +test lsubst-1.7 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l -1 -1 a] $l +} {{a 1 2 3 4 5} {a 1 2 3 4 5}} +test lsubst-1.8 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 2 end a b c d] $l +} {{1 2 a b c d} {1 2 a b c d}} +test lsubst-1.9 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 0 3] $l +} {5 5} +test lsubst-1.10 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 0 4] $l +} {{} {}} +test lsubst-1.11 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 0 1] $l +} {{3 4 5} {3 4 5}} +test lsubst-1.12 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 2 3] $l +} {{1 2 5} {1 2 5}} +test lsubst-1.13 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l 3 end] $l +} {{1 2 3} {1 2 3}} +test lsubst-1.14 {lsubst command} { + set l {1 2 3 4 5} + list [lsubst l -1 4 a b c] $l +} {{a b c} {a b c}} +test lsubst-1.15 {lsubst command} { + set l {a b "c c" d e f} + list [lsubst l 3 3] $l +} {{a b {c c} e f} {a b {c c} e f}} +test lsubst-1.16 {lsubst command} { + set l { 1 2 3 4 5} + list [lsubst l 0 0 a] $l +} {{a 2 3 4 5} {a 2 3 4 5}} +test lsubst-1.17 {lsubst command} { + set l {1 2 3 4 "5 6"} + list [lsubst l 4 4 a] $l +} {{1 2 3 4 a} {1 2 3 4 a}} +test lsubst-1.18 {lsubst command} { + set l {1 2 3 4 {5 6}} + list [lsubst l 4 4 a] $l +} {{1 2 3 4 a} {1 2 3 4 a}} +test lsubst-1.19 {lsubst command} { + set l {1 2 3 4} + list [lsubst l 2 end x y z] $l +} {{1 2 x y z} {1 2 x y z}} +test lsubst-1.20 {lsubst command} { + set l {1 2 3 4} + list [lsubst l end end a] $l +} {{1 2 3 a} {1 2 3 a}} +test lsubst-1.21 {lsubst command} { + set l {1 2 3 4} + list [lsubst l end 3 a] $l +} {{1 2 3 a} {1 2 3 a}} +test lsubst-1.22 {lsubst command} { + set l {1 2 3 4} + list [lsubst l end end] $l +} {{1 2 3} {1 2 3}} +test lsubst-1.23 {lsubst command} { + set l {1 2 3 4} + list [lsubst l 2 -1 xy] $l +} {{1 2 xy 3 4} {1 2 xy 3 4}} +test lsubst-1.24 {lsubst command} { + set l {1 2 3 4} + list [lsubst l end -1 z] $l +} {{1 2 3 z 4} {1 2 3 z 4}} +test lsubst-1.25 {lsubst command} { + set l {\}\ hello} + concat \"[lsubst l end end]\" $l +} {"\}\ " \}\ } +test lsubst-1.26 {lsubst command} { + catch {unset foo} + set foo {a b} + list [lsubst foo end end] $foo \ + [lsubst foo end end] $foo \ + [lsubst foo end end] $foo +} {a a {} {} {} {}} +test lsubst-1.27 {lsubset command} -body { + set l x + list [lsubst l 1 1] $l +} -result {x x} +test lsubst-1.28 {lsubst command} -body { + set l x + list [lsubst l 1 1 y] $l +} -result {{x y} {x y}} +test lsubst-1.29 {lsubst command} -body { + set l x + lsubst l 1 1 [error foo] +} -returnCodes 1 -result {foo} +test lsubst-1.30 {lsubst command} -body { + set l {not {}alist} + lsubst l 0 0 [error foo] +} -returnCodes 1 -result {foo} +test lsubst-1.31 {lsubst command} -body { + unset -nocomplain arr + set arr(x) {a b} + list [lsubst arr(x) 0 0 c] $arr(x) +} -result {{c b} {c b}} + +test lsubst-2.1 {lsubst errors} -body { + list [catch lsubst msg] $msg +} -result {1 {wrong # args: should be "lsubst listVar first last ?element ...?"}} +test lsubst-2.2 {lsubst errors} -body { + unset -nocomplain x + list [catch {lsubst l b} msg] $msg +} -result {1 {wrong # args: should be "lsubst listVar first last ?element ...?"}} +test lsubst-2.3 {lsubst errors} -body { + set x {} + list [catch {lsubst x a 10} msg] $msg +} -result {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}} +test lsubst-2.4 {lsubst errors} -body { + set l {} + list [catch {lsubst l 10 x} msg] $msg +} -result {1 {bad index "x": must be integer?[+-]integer? or end?[+-]integer?}} +test lsubst-2.5 {lsubst errors} -body { + set l {} + list [catch {lsubst l 10 1x} msg] $msg +} -result {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}} +test lsubst-2.6 {lsubst errors} -body { + set l x + list [catch {lsubst l 3 2} msg] $msg +} -result {0 x} +test lsubst-2.7 {lsubst errors} -body { + set l x + list [catch {lsubst l 2 2} msg] $msg +} -result {0 x} +test lsubst-2.8 {lsubst errors} -body { + unset -nocomplain l + lsubst l 0 0 x +} -returnCodes error -result {can't read "l": no such variable} +test lsubst-2.9 {lsubst errors} -body { + unset -nocomplain arr + lsubst arr(x) 0 0 x +} -returnCodes error -result {can't read "arr(x)": no such variable} +test lsubst-2.10 {lsubst errors} -body { + unset -nocomplain arr + set arr(y) y + lsubst arr(x) 0 0 x +} -returnCodes error -result {can't read "arr(x)": no such element in array} + +test lsubst-3.1 {lsubst won't modify shared argument objects} { + proc p {} { + set l "a b c" + lsubst l 1 1 "x y" + # The literal in locals table should be unmodified + return [list "a b c" $l] + } + p +} {{a b c} {a {x y} c}} + +# Following bugs were in lreplace. Make sure lsubst does not have them +test lsubst-4.1 {Bug ccc2c2cc98: lreplace edge case} { + set l {} + list [lsubst l 1 1] $l +} {{} {}} +test lsubst-4.2 {Bug ccc2c2cc98: lreplace edge case} { + set l { } + list [lsubst l 1 1] $l +} {{} {}} +test lsubst-4.3 {lreplace edge case} { + set l {1 2 3} + lsubst l 2 0 +} {1 2 3} +test lsubst-4.4 {lsubst edge case} { + set l {1 2 3 4 5} + list [lsubst l 3 1] $l +} {{1 2 3 4 5} {1 2 3 4 5}} +test lreplace-4.5 {lreplace edge case} { + lreplace {1 2 3 4 5} 3 0 _ +} {1 2 3 _ 4 5} +test lsubst-4.6 {lsubst end-x: bug a4cb3f06c4} { + set l {0 1 2 3 4} + list [lsubst l 0 end-2] $l +} {{3 4} {3 4}} +test lsubst-4.6.1 {lsubst end-x: bug a4cb3f06c4} { + set l {0 1 2 3 4} + list [lsubst l 0 end-2 a b c] $l +} {{a b c 3 4} {a b c 3 4}} +test lsubst-4.7 {lsubst with two end-indexes: increasing} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-1] $l +} {{0 1 4} {0 1 4}} +test lsubst-4.7.1 {lsubst with two end-indexes: increasing} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-1 a b c] $l +} {{0 1 a b c 4} {0 1 a b c 4}} +test lsubst-4.8 {lsubst with two end-indexes: equal} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-2] $l +} {{0 1 3 4} {0 1 3 4}} +test lsubst-4.8.1 {lsubst with two end-indexes: equal} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-2 a b c] $l +} {{0 1 a b c 3 4} {0 1 a b c 3 4}} +test lsubst-4.9 {lsubst with two end-indexes: decreasing} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-3] $l +} {{0 1 2 3 4} {0 1 2 3 4}} +test lsubst-4.9.1 {lsubst with two end-indexes: decreasing} { + set l {0 1 2 3 4} + list [lsubst l end-2 end-3 a b c] $l +} {{0 1 a b c 2 3 4} {0 1 a b c 2 3 4}} +test lsubst-4.10 {lsubst with two equal indexes} { + set l {0 1 2 3 4} + list [lsubst l 2 2] $l +} {{0 1 3 4} {0 1 3 4}} +test lsubst-4.10.1 {lsubst with two equal indexes} { + set l {0 1 2 3 4} + list [lsubst l 2 2 a b c] $l +} {{0 1 a b c 3 4} {0 1 a b c 3 4}} +test lsubst-4.11 {lsubst end index first} { + set l {0 1 2 3 4} + list [lsubst l end-2 1 a b c] $l +} {{0 1 a b c 2 3 4} {0 1 a b c 2 3 4}} +test lsubst-4.12 {lsubst end index first} { + set l {0 1 2 3 4} + list [lsubst l end-2 2 a b c] $l +} {{0 1 a b c 3 4} {0 1 a b c 3 4}} +test lsubst-4.13 {lsubst empty list} { + set l {} + list [lsubst l 1 1 1] $l +} {1 1} +test lsubst-4.14 {lsubst empty list} { + set l {} + list [lsubst l 2 2 2] $l +} {2 2} + +test lsubst-5.1 {compiled lreplace: Bug 47ac84309b} { + apply {x { + lsubst x end 0 + }} {a b c} +} {a b c} +test lsubst-5.2 {compiled lreplace: Bug 47ac84309b} { + apply {x { + lsubst x end 0 A + }} {a b c} +} {a b A c} + +# Testing for compiled behaviour. Far too many variations to check with +# spelt-out tests. Note that this *just* checks whether the compiled version +# and the interpreted version are the same, not whether the interpreted +# version is correct. +apply {{} { + set lss {{} {a} {a b c} {a b c d}} + set ins {{} A {A B}} + set idxs {-2 -1 0 1 2 3 end-3 end-2 end-1 end end+1 end+2} + set lreplace lreplace + + foreach ls $lss { + foreach a $idxs { + foreach b $idxs { + foreach i $ins { + set expected [list [catch {$lreplace $ls $a $b {*}$i} m] $m] + set tester [list lsubst ls $a $b {*}$i] + set script [list catch $tester m] + set script "list \[$script\] \$m" + test lsubst-6.[incr n] {lsubst battery} -body \ + [list apply [list {ls} $script] $ls] -result $expected + } + } + } + } +}} + # cleanup catch {unset foo} ::tcltest::cleanupTests -- cgit v0.12 From cdecc6d50946d64936ade03c2384bf0361e9156e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 7 Sep 2022 11:45:29 +0000 Subject: Revive TIP #220 implementation: Escalate Privileges in VFS Close Callback --- doc/CrtChannel.3 | 15 +++++++ generic/tcl.decls | 5 +++ generic/tclDecls.h | 6 +++ generic/tclIO.c | 52 ++++++++++++++++++++++ generic/tclIO.h | 2 + generic/tclStubInit.c | 1 + generic/tclTest.c | 39 +++++++++++++++++ tests/io.test | 118 ++++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 238 insertions(+) diff --git a/doc/CrtChannel.3 b/doc/CrtChannel.3 index 02772e8..1496631 100644 --- a/doc/CrtChannel.3 +++ b/doc/CrtChannel.3 @@ -35,6 +35,11 @@ Tcl_ThreadId int \fBTcl_GetChannelMode\fR(\fIchannel\fR) .sp +.VS 8.7 +int +\fBTcl_RemoveChannelMode\fR(\fIinterp, channel, mode\fR) +.VE 8.7 +.sp int \fBTcl_GetChannelBufferSize\fR(\fIchannel\fR) .sp @@ -243,6 +248,16 @@ events to the correct event queue even for a multi-threaded core. and \fBTCL_WRITABLE\fR, indicating whether the channel is open for input and output. .PP +.VS 8.7 +.PP +\fBTcl_RemoveChannelMode\fR removes an access privilege from the +channel, either \fBTCL_READABLE\fR or \fBTCL_WRITABLE\fR, and returns +a regular Tcl result code, \fBTCL_OK\fR, or \fBTCL_ERROR\fR. The +function throws an error if either an invalid mode is specified or the +result of the removal would be an inaccessible channel. In that case +an error message is left in the interp argument, if not NULL. +.VE 8.7 +.PP \fBTcl_GetChannelBufferSize\fR returns the size, in bytes, of buffers allocated to store input or output in \fIchannel\fR. If the value was not set by a previous call to \fBTcl_SetChannelBufferSize\fR, described below, then diff --git a/generic/tcl.decls b/generic/tcl.decls index d08ba0a..c7c917f 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -2524,6 +2524,11 @@ declare 679 { void *clientData, size_t objc, Tcl_Obj *const objv[]) } +# TIP #220. +declare 680 { + int Tcl_RemoveChannelMode(Tcl_Interp *interp, Tcl_Channel chan, int mode) +} + # ----- BASELINE -- FOR -- 8.7.0 ----- # ############################################################################## diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 3917d0f..fc61249 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -1996,6 +1996,9 @@ EXTERN Tcl_Command Tcl_NRCreateCommand2(Tcl_Interp *interp, EXTERN int Tcl_NRCallObjProc2(Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2, void *clientData, size_t objc, Tcl_Obj *const objv[]); +/* 680 */ +EXTERN int Tcl_RemoveChannelMode(Tcl_Interp *interp, + Tcl_Channel chan, int mode); typedef struct { const struct TclPlatStubs *tclPlatStubs; @@ -2711,6 +2714,7 @@ typedef struct TclStubs { Tcl_Trace (*tcl_CreateObjTrace2) (Tcl_Interp *interp, int level, int flags, Tcl_CmdObjTraceProc2 *objProc2, void *clientData, Tcl_CmdObjTraceDeleteProc *delProc); /* 677 */ Tcl_Command (*tcl_NRCreateCommand2) (Tcl_Interp *interp, const char *cmdName, Tcl_ObjCmdProc2 *proc, Tcl_ObjCmdProc2 *nreProc2, void *clientData, Tcl_CmdDeleteProc *deleteProc); /* 678 */ int (*tcl_NRCallObjProc2) (Tcl_Interp *interp, Tcl_ObjCmdProc2 *objProc2, void *clientData, size_t objc, Tcl_Obj *const objv[]); /* 679 */ + int (*tcl_RemoveChannelMode) (Tcl_Interp *interp, Tcl_Channel chan, int mode); /* 680 */ } TclStubs; extern const TclStubs *tclStubsPtr; @@ -4099,6 +4103,8 @@ extern const TclStubs *tclStubsPtr; (tclStubsPtr->tcl_NRCreateCommand2) /* 678 */ #define Tcl_NRCallObjProc2 \ (tclStubsPtr->tcl_NRCallObjProc2) /* 679 */ +#define Tcl_RemoveChannelMode \ + (tclStubsPtr->tcl_RemoveChannelMode) /* 680 */ #endif /* defined(USE_TCL_STUBS) */ diff --git a/generic/tclIO.c b/generic/tclIO.c index 5313eed..532f758 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -1681,6 +1681,7 @@ Tcl_CreateChannel( } statePtr->channelName = tmp; statePtr->flags = mask; + statePtr->maxPerms = mask; /* Save max privileges for close callback */ /* * Set the channel to system default encoding. @@ -2166,8 +2167,11 @@ Tcl_UnstackChannel( /* * Close and free the channel driver state. + * TIP #220: This is done with maximum privileges (as created). */ + statePtr->flags &= ~(TCL_READABLE|TCL_WRITABLE); + statePtr->flags |= statePtr->maxPerms; result = ChanClose(chanPtr, interp); ChannelFree(chanPtr); @@ -2447,6 +2451,54 @@ Tcl_GetChannelHandle( } /* + *---------------------------------------------------------------------- + * + * Tcl_RemoveChannelMode -- + * + * Remove either read or write privileges from the channel. + * + * Results: + * A standard Tcl result code. + * + * Side effects: + * May change the access mode of the channel. + * May leave an error message in the interp. + * + *---------------------------------------------------------------------- + */ + +int +Tcl_RemoveChannelMode( + Tcl_Interp* interp, /* The interp for an error message. Allowed to be NULL. */ + Tcl_Channel chan, /* The channel which is modified. */ + int mode) /* The access mode to drop from the channel */ +{ + const char* emsg; + ChannelState *statePtr = ((Channel *) chan)->state; + /* State of actual channel. */ + + if ((mode != TCL_READABLE) && (mode != TCL_WRITABLE)) { + emsg = "Illegal mode value."; + goto error; + } + if (0 == (statePtr->flags & (TCL_READABLE | TCL_WRITABLE) & ~mode)) { + emsg = "Bad mode, would make channel inacessible"; + goto error; + } + + statePtr->flags &= ~mode; + return TCL_OK; + + error: + if (interp != NULL) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "Tcl_RemoveChannelMode error: %s. Channel: \"%s\"", + emsg, Tcl_GetChannelName((Tcl_Channel) chan))); + } + return TCL_ERROR; +} + +/* *--------------------------------------------------------------------------- * * AllocChannelBuffer -- diff --git a/generic/tclIO.h b/generic/tclIO.h index 54aa5af..3d2b7be 100644 --- a/generic/tclIO.h +++ b/generic/tclIO.h @@ -216,6 +216,8 @@ typedef struct ChannelState { * companion to 'unreportedError'. */ size_t epoch; /* Used to test validity of stored channelname * lookup results. */ + int maxPerms; /* TIP #220: Max access privileges + * the channel was created with. */ } ChannelState; /* diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 87c9d0a..f31146c 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -2042,6 +2042,7 @@ const TclStubs tclStubs = { Tcl_CreateObjTrace2, /* 677 */ Tcl_NRCreateCommand2, /* 678 */ Tcl_NRCallObjProc2, /* 679 */ + Tcl_RemoveChannelMode, /* 680 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index d13b7ce..3d64992 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -6042,6 +6042,45 @@ TestChannelCmd( return TCL_OK; } + if ((cmdName[0] == 'm') && (strncmp(cmdName, "maxmode", len) == 0)) { + if (argc != 3) { + Tcl_AppendResult(interp, "channel name required", NULL); + return TCL_ERROR; + } + + if (statePtr->maxPerms & TCL_READABLE) { + Tcl_AppendElement(interp, "read"); + } else { + Tcl_AppendElement(interp, ""); + } + if (statePtr->maxPerms & TCL_WRITABLE) { + Tcl_AppendElement(interp, "write"); + } else { + Tcl_AppendElement(interp, ""); + } + return TCL_OK; + } + + if ((cmdName[0] == 'm') && (strncmp(cmdName, "mremove-rd", len) == 0)) { + if (argc != 3) { + Tcl_AppendResult(interp, "channel name required", + (char *) NULL); + return TCL_ERROR; + } + + return Tcl_RemoveChannelMode(interp, chan, TCL_READABLE); + } + + if ((cmdName[0] == 'm') && (strncmp(cmdName, "mremove-wr", len) == 0)) { + if (argc != 3) { + Tcl_AppendResult(interp, "channel name required", + (char *) NULL); + return TCL_ERROR; + } + + return Tcl_RemoveChannelMode(interp, chan, TCL_WRITABLE); + } + if ((cmdName[0] == 'm') && (strncmp(cmdName, "mthread", len) == 0)) { if (argc != 3) { Tcl_AppendResult(interp, "channel name required", NULL); diff --git a/tests/io.test b/tests/io.test index 6314ace..767c22e 100644 --- a/tests/io.test +++ b/tests/io.test @@ -8954,6 +8954,124 @@ test io-74.1 {[104f2885bb] improper cache validity check} -setup { # ### ### ### ######### ######### ######### + + +test io-75.0 {channel modes} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r] +} -constraints testchannel -body { + testchannel mode $f +} -cleanup { + close $f + removeFile dummy +} -result {read {}} + +test io-75.1 {channel modes} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile w] +} -constraints testchannel -body { + testchannel mode $f +} -cleanup { + close $f + removeFile dummy +} -result {{} write} + +test io-75.2 {channel modes} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r+] +} -constraints testchannel -body { + testchannel mode $f +} -cleanup { + close $f + removeFile dummy +} -result {read write} + +test io-75.3 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r] +} -constraints testchannel -body { + testchannel mremove-wr $f + list [testchannel mode $f] [testchannel maxmode $f] +} -cleanup { + close $f + removeFile dummy +} -result {{read {}} {read {}}} + +test io-75.4 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r] +} -constraints testchannel -body { + testchannel mremove-rd $f +} -returnCodes error -cleanup { + close $f + removeFile dummy +} -match glob -result {Tcl_RemoveChannelMode error: Bad mode, would make channel inacessible. Channel: "*"} + +test io-75.5 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile w] +} -constraints testchannel -body { + testchannel mremove-rd $f + list [testchannel mode $f] [testchannel maxmode $f] +} -cleanup { + close $f + removeFile dummy +} -result {{{} write} {{} write}} + +test io-75.6 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile w] +} -constraints testchannel -body { + testchannel mremove-wr $f +} -returnCodes error -cleanup { + close $f + removeFile dummy +} -match glob -result {Tcl_RemoveChannelMode error: Bad mode, would make channel inacessible. Channel: "*"} + +test io-75.7 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r+] +} -constraints testchannel -body { + testchannel mremove-rd $f + list [testchannel mode $f] [testchannel maxmode $f] +} -cleanup { + close $f + removeFile dummy +} -result {{{} write} {read write}} + +test io-75.8 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r+] +} -constraints testchannel -body { + testchannel mremove-wr $f + list [testchannel mode $f] [testchannel maxmode $f] +} -cleanup { + close $f + removeFile dummy +} -result {{read {}} {read write}} + +test io-75.9 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r+] +} -constraints testchannel -body { + testchannel mremove-wr $f + testchannel mremove-rd $f +} -returnCodes error -cleanup { + close $f + removeFile dummy +} -match glob -result {Tcl_RemoveChannelMode error: Bad mode, would make channel inacessible. Channel: "*"} + +test io-75.10 {channel mode dropping} -setup { + set datafile [makeFile {some characters} dummy] + set f [open $datafile r+] +} -constraints testchannel -body { + testchannel mremove-rd $f + testchannel mremove-wr $f +} -returnCodes error -cleanup { + close $f + removeFile dummy +} -match glob -result {Tcl_RemoveChannelMode error: Bad mode, would make channel inacessible. Channel: "*"} + # cleanup foreach file [list fooBar longfile script script2 output test1 pipe my_script \ test2 test3 cat stdout kyrillic.txt utf8-fcopy.txt utf8-rp.txt] { -- cgit v0.12 From 5c0c8a2c84ae92a60624623d05f43e3189a9653c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 7 Sep 2022 15:33:02 +0000 Subject: TIP #594 implementation: Modernize "file stat" interface --- doc/file.n | 37 ++++++++++++++++++------------------ generic/tclCmdAH.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++-------- tests/cmdAH.test | 18 ++++++++++++++---- 3 files changed, 80 insertions(+), 30 deletions(-) diff --git a/doc/file.n b/doc/file.n index c5a5eed..b0ad4ca 100644 --- a/doc/file.n +++ b/doc/file.n @@ -251,14 +251,14 @@ symbolic and hard links (the latter for files only). Windows supports symbolic directory links and hard file links on NTFS drives. .RE .TP -\fBfile lstat \fIname varName\fR +\fBfile lstat \fIname ?varName?\fR . Same as \fBstat\fR option (see below) except uses the \fIlstat\fR kernel call instead of \fIstat\fR. This means that if \fIname\fR -refers to a symbolic link the information returned in \fIvarName\fR -is for the link rather than the file it refers to. On systems that -do not support symbolic links this option behaves exactly the same -as the \fBstat\fR option. +refers to a symbolic link the information returned is for the link +rather than the file it refers to. On systems that do not support +symbolic links this option behaves exactly the same as the +\fBstat\fR option. .TP \fBfile mkdir\fR ?\fIdir\fR ...? . @@ -393,19 +393,20 @@ that use the third component do not attempt to perform tilde substitution. .RE .TP -\fBfile stat \fIname varName\fR -. -Invokes the \fBstat\fR kernel call on \fIname\fR, and uses the variable -given by \fIvarName\fR to hold information returned from the kernel call. -\fIVarName\fR is treated as an array variable, and the following elements -of that variable are set: \fBatime\fR, \fBctime\fR, \fBdev\fR, \fBgid\fR, -\fBino\fR, \fBmode\fR, \fBmtime\fR, \fBnlink\fR, \fBsize\fR, \fBtype\fR, -\fBuid\fR. Each element except \fBtype\fR is a decimal string with the -value of the corresponding field from the \fBstat\fR return structure; -see the manual entry for \fBstat\fR for details on the meanings of the -values. The \fBtype\fR element gives the type of the file in the same -form returned by the command \fBfile type\fR. This command returns an -empty string. +\fBfile stat \fIname ?varName?\fR +. +Invokes the \fBstat\fR kernel call on \fIname\fR, and returns a +dictionary with the information returned from the kernel call. If +\fIvarName\fR is given, it uses the variable to hold the information. +\fIVarName\fR is treated as an array variable, and in such case the +command returns the empty string. The following elements are set: +\fBatime\fR, \fBctime\fR, \fBdev\fR, \fBgid\fR, \fBino\fR, \fBmode\fR, +\fBmtime\fR, \fBnlink\fR, \fBsize\fR, \fBtype\fR, \fBuid\fR. Each element +except \fBtype\fR is a decimal string with the value of the corresponding +field from the \fBstat\fR return structure; see the manual entry for +\fBstat\fR for details on the meanings of the values. The \fBtype\fR +element gives the type of the file in the same form returned by the +command \fBfile type\fR. .TP \fBfile system \fIname\fR . diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 28fc210..f0d6966 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -1409,14 +1409,18 @@ FileAttrLinkStatCmd( { Tcl_StatBuf buf; - if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "name varName"); + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "name ?varName?"); return TCL_ERROR; } if (GetStatBuf(interp, objv[1], Tcl_FSLstat, &buf) != TCL_OK) { return TCL_ERROR; } - return StoreStatData(interp, objv[2], &buf); + if (objc == 2) { + return StoreStatData(interp, NULL, &buf); + } else { + return StoreStatData(interp, objv[2], &buf); + } } /* @@ -1445,14 +1449,18 @@ FileAttrStatCmd( { Tcl_StatBuf buf; - if (objc != 3) { - Tcl_WrongNumArgs(interp, 1, objv, "name varName"); + if (objc < 2 || objc > 3) { + Tcl_WrongNumArgs(interp, 1, objv, "name ?varName?"); return TCL_ERROR; } if (GetStatBuf(interp, objv[1], Tcl_FSStat, &buf) != TCL_OK) { return TCL_ERROR; } - return StoreStatData(interp, objv[2], &buf); + if (objc == 2) { + return StoreStatData(interp, NULL, &buf); + } else { + return StoreStatData(interp, objv[2], &buf); + } } /* @@ -2352,7 +2360,7 @@ GetStatBuf( * * This is a utility procedure that breaks out the fields of a "stat" * structure and stores them in textual form into the elements of an - * associative array. + * associative array (if given) or returns a dictionary. * * Results: * Returns a standard Tcl return value. If an error occurs then a message @@ -2372,9 +2380,40 @@ StoreStatData( Tcl_StatBuf *statPtr) /* Pointer to buffer containing stat data to * store in varName. */ { - Tcl_Obj *field, *value; + Tcl_Obj *field, *value, *result; unsigned short mode; + if (varName == NULL) { + result = Tcl_NewObj(); + Tcl_IncrRefCount(result); +#define DOBJPUT(key, objValue) \ + Tcl_DictObjPut(NULL, result, \ + Tcl_NewStringObj((key), -1), \ + (objValue)); + DOBJPUT("dev", Tcl_NewWideIntObj((long)statPtr->st_dev)); + DOBJPUT("ino", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_ino)); + DOBJPUT("nlink", Tcl_NewWideIntObj((long)statPtr->st_nlink)); + DOBJPUT("uid", Tcl_NewWideIntObj((long)statPtr->st_uid)); + DOBJPUT("gid", Tcl_NewWideIntObj((long)statPtr->st_gid)); + DOBJPUT("size", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_size)); +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + DOBJPUT("blocks", Tcl_NewWideIntObj((Tcl_WideInt)statPtr->st_blocks)); +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + DOBJPUT("blksize", Tcl_NewWideIntObj((long)statPtr->st_blksize)); +#endif + DOBJPUT("atime", Tcl_NewWideIntObj(Tcl_GetAccessTimeFromStat(statPtr))); + DOBJPUT("mtime", Tcl_NewWideIntObj(Tcl_GetModificationTimeFromStat(statPtr))); + DOBJPUT("ctime", Tcl_NewWideIntObj(Tcl_GetChangeTimeFromStat(statPtr))); + mode = (unsigned short) statPtr->st_mode; + DOBJPUT("mode", Tcl_NewWideIntObj(mode)); + DOBJPUT("type", Tcl_NewStringObj(GetTypeFromMode(mode), -1)); +#undef DOBJPUT + Tcl_SetObjResult(interp, result); + Tcl_DecrRefCount(result); + return TCL_OK; + } + /* * Assume Tcl_ObjSetVar2() does not keep a copy of the field name! * diff --git a/tests/cmdAH.test b/tests/cmdAH.test index ab1a8e6..1a79fa3 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -1527,14 +1527,14 @@ catch {file attributes $gorpfile -permissions 0o765} # stat test cmdAH-28.1 {Tcl_FileObjCmd: stat} -returnCodes error -body { - file stat _bogus_ -} -result {wrong # args: should be "file stat name varName"} + file stat +} -result {wrong # args: should be "file stat name ?varName?"} test cmdAH-28.2 {Tcl_FileObjCmd: stat} -returnCodes error -body { file stat _bogus_ a b -} -result {wrong # args: should be "file stat name varName"} +} -result {wrong # args: should be "file stat name ?varName?"} test cmdAH-28.3 {Tcl_FileObjCmd: stat} -setup { unset -nocomplain stat - set stat(blocks) [set stat(blksize) {}] + array set stat {blocks {} blksize {}} } -body { file stat $gorpfile stat unset stat(blocks) stat(blksize); # Ignore these fields; not always set @@ -1627,6 +1627,16 @@ test cmdAH-28.13.1 {Tcl_FileObjCmd: stat (built-in Windows names)} -constraints } set res } -result {0 0 -1 0 0 8630 0 0 0 characterSpecial 0} +test cmdAH-28.14 {Tcl_FileObjCmd: stat} -setup { + unset -nocomplain stat +} -body { + file stat $gorpfile stat + expr { + [lsort -stride 2 [array get stat]] + eq + [lsort -stride 2 [file stat $gorpfile]] + } +} -result {1} unset -nocomplain stat # type -- cgit v0.12 From 0eddd55ab6d8747fd749f24f769a4025e5863e8b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 8 Sep 2022 13:01:43 +0000 Subject: Fix cmdAH-23.* testcases --- tests/cmdAH.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cmdAH.test b/tests/cmdAH.test index 1a79fa3..984100e 100644 --- a/tests/cmdAH.test +++ b/tests/cmdAH.test @@ -1194,10 +1194,10 @@ test cmdAH-22.3 {Tcl_FileObjCmd: isfile} {file isfile $dirfile} 0 catch {file link -symbolic $linkfile $gorpfile} test cmdAH-23.1 {Tcl_FileObjCmd: lstat} -returnCodes error -body { file lstat a -} -result {wrong # args: should be "file lstat name varName"} +} -result {could not read "a": no such file or directory} test cmdAH-23.2 {Tcl_FileObjCmd: lstat} -returnCodes error -body { file lstat a b c -} -result {wrong # args: should be "file lstat name varName"} +} -result {wrong # args: should be "file lstat name ?varName?"} test cmdAH-23.3 {Tcl_FileObjCmd: lstat} -setup { unset -nocomplain stat } -constraints {unix nonPortable} -body { -- cgit v0.12 From 0c5c7cc5eb0499b1b4f2b9000364ebe52186adf5 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Fri, 16 Sep 2022 07:29:15 +0000 Subject: Rename lsubst to ledit, add docs --- doc/interp.n | 20 ++-- doc/lappend.n | 2 +- doc/lassign.n | 2 +- doc/ledit.n | 91 ++++++++++++++++++ doc/lindex.n | 2 +- doc/linsert.n | 2 +- doc/list.n | 2 +- doc/llength.n | 2 +- doc/lmap.n | 2 +- doc/lpop.n | 2 +- doc/lrange.n | 2 +- doc/lremove.n | 2 +- doc/lrepeat.n | 2 +- doc/lreplace.n | 2 +- doc/lreverse.n | 2 +- doc/lsearch.n | 2 +- doc/lset.n | 2 +- doc/lsort.n | 2 +- generic/tclBasic.c | 2 +- generic/tclCmdIL.c | 8 +- generic/tclInt.h | 6 +- tests/lreplace.test | 264 ++++++++++++++++++++++++++-------------------------- 22 files changed, 257 insertions(+), 166 deletions(-) create mode 100644 doc/ledit.n diff --git a/doc/interp.n b/doc/interp.n index 2943404..b3cc918 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -591,16 +591,16 @@ built-in commands: \fBflush\fR \fBfor\fR \fBforeach\fR \fBformat\fR \fBgets\fR \fBglobal\fR \fBif\fR \fBincr\fR \fBinfo\fR \fBinterp\fR \fBjoin\fR \fBlappend\fR -\fBlassign\fR \fBlindex\fR \fBlinsert\fR \fBlist\fR -\fBllength\fR \fBlrange\fR \fBlrepeat\fR \fBlreplace\fR -\fBlsearch\fR \fBlset\fR \fBlsort\fR \fBnamespace\fR -\fBpackage\fR \fBpid\fR \fBproc\fR \fBputs\fR -\fBread\fR \fBregexp\fR \fBregsub\fR \fBrename\fR -\fBreturn\fR \fBscan\fR \fBseek\fR \fBset\fR -\fBsplit\fR \fBstring\fR \fBsubst\fR \fBswitch\fR -\fBtell\fR \fBtime\fR \fBtrace\fR \fBunset\fR -\fBupdate\fR \fBuplevel\fR \fBupvar\fR \fBvariable\fR -\fBvwait\fR \fBwhile\fR +\fBlassign\fR \fBledit\fR \fBlindex\fR \fBlinsert\fR +\fBlist\fR \fBllength\fR \fBlrange\fR \fBlrepeat\fR +\fBlreplace\fR \fBlsearch\fR \fBlset\fR \fBlsort\fR +\fBnamespace\fR \fBpackage\fR \fBpid\fR \fBproc\fR +\fBputs\fR \fBread\fR \fBregexp\fR \fBregsub\fR +\fBrename\fR \fBreturn\fR \fBscan\fR \fBseek\fR +\fBset\fR \fBsplit\fR \fBstring\fR \fBsubst\fR +\fBswitch\fR \fBtell\fR \fBtime\fR \fBtrace\fR +\fBunset\fR \fBupdate\fR \fBuplevel\fR \fBupvar\fR +\fBvariable\fR \fBvwait\fR \fBwhile\fR .DE The following commands are hidden by \fBinterp create\fR when it creates a safe interpreter: diff --git a/doc/lappend.n b/doc/lappend.n index 89b6909..3ddb36c 100644 --- a/doc/lappend.n +++ b/doc/lappend.n @@ -49,7 +49,7 @@ Using \fBlappend\fR to build up a list of numbers. 1 2 3 4 5 .CE .SH "SEE ALSO" -list(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lassign.n b/doc/lassign.n index 67048ba..ac53322 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -52,7 +52,7 @@ command in many shell languages like this: set ::argv [\fBlassign\fR $::argv argumentToReadOff] .CE .SH "SEE ALSO" -list(n), lappend(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/ledit.n b/doc/ledit.n new file mode 100644 index 0000000..f7704ed --- /dev/null +++ b/doc/ledit.n @@ -0,0 +1,91 @@ +'\" +'\" Copyright (c) 2022 Ashok P. Nadkarni . All rights reserved. +'\" +'\" See the file "license.terms" for information on usage and redistribution +'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. +'\" +.TH ledit n 8.7 Tcl "Tcl Built-In Commands" +.so man.macros +.BS +'\" Note: do not modify the .SH NAME line immediately below! +.SH NAME +ledit \- Replace elements of a list stored in variable +.SH SYNOPSIS +\fBledit \fIlistVar first last \fR?\fIvalue value ...\fR? +.BE +.SH DESCRIPTION +.PP +The command fetches the list value in variable \fIlistVar\fR and replaces the +elements in the range given by indices \fIfirst\fR to \fIlast\fR (inclusive) +with the \fIvalue\fR arguments. The resulting list is then stored back in +\fIlistVar\fR and returned as the result of the command. +.PP +Arguments \fIfirst\fR and \fIlast\fR are index values specifying the first and +last elements of the range to replace. They are interpreted +the same as index values for the command \fBstring index\fR, +supporting simple index arithmetic and indices relative to the +end of the list. The index 0 refers to the first element of the +list, and \fBend\fR refers to the last element of the list. +.PP +If either \fIfirst\fR or \fIlast\fR is less than zero, it is considered to +refer to the position before the first element of the list. This allows +elements to be prepended. +.PP +If either \fIfirst\fR or \fIlast\fR indicates a position greater than the +index of the last element of the list, it is treated as if it is an +index one greater than the last element. This allows elements to be appended. +.PP +If \fIlast\fR is less than \fIfirst\fR, then any specified elements +will be inserted into the list before the element specified by \fIfirst\fR +with no elements being deleted. +.PP +The \fIvalue\fR arguments specify zero or more new elements to +be added to the list in place of those that were deleted. +Each \fIvalue\fR argument will become a separate element of +the list. If no \fIvalue\fR arguments are specified, then the elements +between \fIfirst\fR and \fIlast\fR are simply deleted. +.SH EXAMPLES +.PP +Prepend to a list. +.PP +.CS +% set lst {c d e f g} +c d e f g +% ledit lst -1 -1 a b +a b c d e f g +.CE +.PP +Append to the list. +.PP +.CS +% ledit lst end+1 end+1 h i +a b c d e f g h i +.CE +.PP +Delete third and fourth elements. +.PP +.CS +% ledit lst 2 3 +a b e f g h i +.CE +.PP +Replace two elements with three. +.PP +.CS +% ledit lst 2 3 x y z +a b x y z g h i +% set lst +a b x y z g h i +.CE +.PP +.SH "SEE ALSO" +list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), +lreverse(n), lsearch(n), lset(n), lsort(n), +string(n) +.SH KEYWORDS +element, list, replace +.\" Local variables: +.\" mode: nroff +.\" fill-column: 78 +.\" End: diff --git a/doc/lindex.n b/doc/lindex.n index 75fe5e8..0ba30a4 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -115,7 +115,7 @@ set idx 3 \fI\(-> f\fR .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n), string(n) diff --git a/doc/linsert.n b/doc/linsert.n index 3179256..685b563 100644 --- a/doc/linsert.n +++ b/doc/linsert.n @@ -45,7 +45,7 @@ set newList [\fBlinsert\fR $midList end-1 lazy] set newerList [\fBlinsert\fR [\fBlinsert\fR $oldList end-1 quick] 1 lazy] .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n), string(n) diff --git a/doc/list.n b/doc/list.n index 3fa1975..1792560 100644 --- a/doc/list.n +++ b/doc/list.n @@ -46,7 +46,7 @@ while \fBconcat\fR with the same arguments will return \fBa b c d e f {g h}\fR .CE .SH "SEE ALSO" -lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/llength.n b/doc/llength.n index 26824a0..7a3e6de 100644 --- a/doc/llength.n +++ b/doc/llength.n @@ -49,7 +49,7 @@ An empty list is not necessarily an empty string: 1,0 .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lmap.n b/doc/lmap.n index 026e9d0..29b1242 100644 --- a/doc/lmap.n +++ b/doc/lmap.n @@ -78,7 +78,7 @@ set prefix [\fBlmap\fR x $values {expr { .CE .SH "SEE ALSO" break(n), continue(n), for(n), foreach(n), while(n), -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lpop.n b/doc/lpop.n index 3d88638..0a156ee 100644 --- a/doc/lpop.n +++ b/doc/lpop.n @@ -86,7 +86,7 @@ The indicated value becomes the new value of \fIx\fR. \fI\(-> {{a b} {c d}} {{e f} h}\fR .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n), string(n) diff --git a/doc/lrange.n b/doc/lrange.n index 0d4b261..c0434bb 100644 --- a/doc/lrange.n +++ b/doc/lrange.n @@ -71,7 +71,7 @@ elements to {elements to} .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n), string(n) diff --git a/doc/lremove.n b/doc/lremove.n index 59d261b..e71f607 100644 --- a/doc/lremove.n +++ b/doc/lremove.n @@ -46,7 +46,7 @@ Removing the same element indicated in two different ways: a b d e .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lrepeat.n b/doc/lrepeat.n index 9a3fc88..de7ba54 100644 --- a/doc/lrepeat.n +++ b/doc/lrepeat.n @@ -32,7 +32,7 @@ is identical to \fBlist element ...\fR. \fI\(-> {a a} b c {a a} b c {a a} b c\fR .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lreplace.n b/doc/lreplace.n index bc9d7ca..6694ad7 100644 --- a/doc/lreplace.n +++ b/doc/lreplace.n @@ -95,7 +95,7 @@ a b c d e f g h i .CE .VE TIP505 .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreverse(n), lsearch(n), lset(n), lsort(n), string(n) diff --git a/doc/lreverse.n b/doc/lreverse.n index e2e3b69..0f0b6d6 100644 --- a/doc/lreverse.n +++ b/doc/lreverse.n @@ -25,7 +25,7 @@ input list, \fIlist\fR, except with the elements in the reverse order. \fI\(-> f e {c d} b a\fR .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS diff --git a/doc/lsearch.n b/doc/lsearch.n index c5dc98f..85b8609 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -229,7 +229,7 @@ The same thing for a flattened list: .CE .SH "SEE ALSO" foreach(n), -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lset(n), lsort(n), string(n) diff --git a/doc/lset.n b/doc/lset.n index 4b97ed6..588a0a5 100644 --- a/doc/lset.n +++ b/doc/lset.n @@ -136,7 +136,7 @@ The indicated return value also becomes the new value of \fIx\fR. \fI\(-> {{a b} {c d}} {{e f} {j h}}\fR .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lsort(n) string(n) diff --git a/doc/lsort.n b/doc/lsort.n index 2018e30..ddf9ed1 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -264,7 +264,7 @@ More complex sorting using a comparison function: {1 dingo} {2 banana} {0x2 carrot} {3 apple} .CE .SH "SEE ALSO" -list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), +list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), lreverse(n), lsearch(n), lset(n) .SH KEYWORDS diff --git a/generic/tclBasic.c b/generic/tclBasic.c index b013909..21503b4 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -324,7 +324,7 @@ static const CmdInfo builtInCmds[] = { {"lsearch", Tcl_LsearchObjCmd, NULL, NULL, CMD_IS_SAFE}, {"lset", Tcl_LsetObjCmd, TclCompileLsetCmd, NULL, CMD_IS_SAFE}, {"lsort", Tcl_LsortObjCmd, NULL, NULL, CMD_IS_SAFE}, - {"lsubst", Tcl_LsubstObjCmd, NULL, NULL, CMD_IS_SAFE}, + {"ledit", Tcl_LeditObjCmd, NULL, NULL, CMD_IS_SAFE}, {"package", Tcl_PackageObjCmd, NULL, TclNRPackageObjCmd, CMD_IS_SAFE}, {"proc", Tcl_ProcObjCmd, NULL, NULL, CMD_IS_SAFE}, {"regexp", Tcl_RegexpObjCmd, TclCompileRegexpCmd, NULL, CMD_IS_SAFE}, diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 7776c78..b2e3ac8 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -4486,9 +4486,9 @@ Tcl_LsortObjCmd( /* *---------------------------------------------------------------------- * - * Tcl_LsubstObjCmd -- + * Tcl_LeditObjCmd -- * - * This procedure is invoked to process the "lsubst" Tcl command. See the + * This procedure is invoked to process the "ledit" Tcl command. See the * user documentation for details on what it does. * * Results: @@ -4501,7 +4501,7 @@ Tcl_LsortObjCmd( */ int -Tcl_LsubstObjCmd( +Tcl_LeditObjCmd( TCL_UNUSED(ClientData), Tcl_Interp *interp, /* Current interpreter. */ int objc, /* Number of arguments. */ @@ -4529,7 +4529,7 @@ Tcl_LsubstObjCmd( /* * TODO - refactor the index extraction into a common function shared - * by Tcl_{Lrange,Lreplace,Lsubst}ObjCmd + * by Tcl_{Lrange,Lreplace,Ledit}ObjCmd */ result = TclListObjLengthM(interp, listPtr, &listLen); diff --git a/generic/tclInt.h b/generic/tclInt.h index 155bb82..863251b 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -3686,6 +3686,9 @@ MODULE_SCOPE int Tcl_LappendObjCmd(void *clientData, MODULE_SCOPE int Tcl_LassignObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); +MODULE_SCOPE int Tcl_LeditObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); MODULE_SCOPE int Tcl_LindexObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); @@ -3731,9 +3734,6 @@ MODULE_SCOPE int Tcl_LsetObjCmd(void *clientData, MODULE_SCOPE int Tcl_LsortObjCmd(void *clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]); -MODULE_SCOPE int Tcl_LsubstObjCmd(ClientData clientData, - Tcl_Interp *interp, int objc, - Tcl_Obj *const objv[]); MODULE_SCOPE Tcl_Command TclInitNamespaceCmd(Tcl_Interp *interp); MODULE_SCOPE int TclNamespaceEnsembleCmd(void *dummy, Tcl_Interp *interp, int objc, diff --git a/tests/lreplace.test b/tests/lreplace.test index 4204c2f..2952899 100644 --- a/tests/lreplace.test +++ b/tests/lreplace.test @@ -236,272 +236,272 @@ apply {{} { } }} -# Essentially same tests as above but for lsubst -test lsubst-1.1 {lsubst command} { +# Essentially same tests as above but for ledit +test ledit-1.1 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 0 0 a] $l + list [ledit l 0 0 a] $l } {{a 2 3 4 5} {a 2 3 4 5}} -test lsubst-1.2 {lsubst command} { +test ledit-1.2 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 1 1 a] $l + list [ledit l 1 1 a] $l } {{1 a 3 4 5} {1 a 3 4 5}} -test lsubst-1.3 {lsubst command} { +test ledit-1.3 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 2 2 a] $l + list [ledit l 2 2 a] $l } {{1 2 a 4 5} {1 2 a 4 5}} -test lsubst-1.4 {lsubst command} { +test ledit-1.4 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 3 3 a] $l + list [ledit l 3 3 a] $l } {{1 2 3 a 5} {1 2 3 a 5}} -test lsubst-1.5 {lsubst command} { +test ledit-1.5 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 4 4 a] $l + list [ledit l 4 4 a] $l } {{1 2 3 4 a} {1 2 3 4 a}} -test lsubst-1.6 {lsubst command} { +test ledit-1.6 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 4 5 a] $l + list [ledit l 4 5 a] $l } {{1 2 3 4 a} {1 2 3 4 a}} -test lsubst-1.7 {lsubst command} { +test ledit-1.7 {ledit command} { set l {1 2 3 4 5} - list [lsubst l -1 -1 a] $l + list [ledit l -1 -1 a] $l } {{a 1 2 3 4 5} {a 1 2 3 4 5}} -test lsubst-1.8 {lsubst command} { +test ledit-1.8 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 2 end a b c d] $l + list [ledit l 2 end a b c d] $l } {{1 2 a b c d} {1 2 a b c d}} -test lsubst-1.9 {lsubst command} { +test ledit-1.9 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 0 3] $l + list [ledit l 0 3] $l } {5 5} -test lsubst-1.10 {lsubst command} { +test ledit-1.10 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 0 4] $l + list [ledit l 0 4] $l } {{} {}} -test lsubst-1.11 {lsubst command} { +test ledit-1.11 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 0 1] $l + list [ledit l 0 1] $l } {{3 4 5} {3 4 5}} -test lsubst-1.12 {lsubst command} { +test ledit-1.12 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 2 3] $l + list [ledit l 2 3] $l } {{1 2 5} {1 2 5}} -test lsubst-1.13 {lsubst command} { +test ledit-1.13 {ledit command} { set l {1 2 3 4 5} - list [lsubst l 3 end] $l + list [ledit l 3 end] $l } {{1 2 3} {1 2 3}} -test lsubst-1.14 {lsubst command} { +test ledit-1.14 {ledit command} { set l {1 2 3 4 5} - list [lsubst l -1 4 a b c] $l + list [ledit l -1 4 a b c] $l } {{a b c} {a b c}} -test lsubst-1.15 {lsubst command} { +test ledit-1.15 {ledit command} { set l {a b "c c" d e f} - list [lsubst l 3 3] $l + list [ledit l 3 3] $l } {{a b {c c} e f} {a b {c c} e f}} -test lsubst-1.16 {lsubst command} { +test ledit-1.16 {ledit command} { set l { 1 2 3 4 5} - list [lsubst l 0 0 a] $l + list [ledit l 0 0 a] $l } {{a 2 3 4 5} {a 2 3 4 5}} -test lsubst-1.17 {lsubst command} { +test ledit-1.17 {ledit command} { set l {1 2 3 4 "5 6"} - list [lsubst l 4 4 a] $l + list [ledit l 4 4 a] $l } {{1 2 3 4 a} {1 2 3 4 a}} -test lsubst-1.18 {lsubst command} { +test ledit-1.18 {ledit command} { set l {1 2 3 4 {5 6}} - list [lsubst l 4 4 a] $l + list [ledit l 4 4 a] $l } {{1 2 3 4 a} {1 2 3 4 a}} -test lsubst-1.19 {lsubst command} { +test ledit-1.19 {ledit command} { set l {1 2 3 4} - list [lsubst l 2 end x y z] $l + list [ledit l 2 end x y z] $l } {{1 2 x y z} {1 2 x y z}} -test lsubst-1.20 {lsubst command} { +test ledit-1.20 {ledit command} { set l {1 2 3 4} - list [lsubst l end end a] $l + list [ledit l end end a] $l } {{1 2 3 a} {1 2 3 a}} -test lsubst-1.21 {lsubst command} { +test ledit-1.21 {ledit command} { set l {1 2 3 4} - list [lsubst l end 3 a] $l + list [ledit l end 3 a] $l } {{1 2 3 a} {1 2 3 a}} -test lsubst-1.22 {lsubst command} { +test ledit-1.22 {ledit command} { set l {1 2 3 4} - list [lsubst l end end] $l + list [ledit l end end] $l } {{1 2 3} {1 2 3}} -test lsubst-1.23 {lsubst command} { +test ledit-1.23 {ledit command} { set l {1 2 3 4} - list [lsubst l 2 -1 xy] $l + list [ledit l 2 -1 xy] $l } {{1 2 xy 3 4} {1 2 xy 3 4}} -test lsubst-1.24 {lsubst command} { +test ledit-1.24 {ledit command} { set l {1 2 3 4} - list [lsubst l end -1 z] $l + list [ledit l end -1 z] $l } {{1 2 3 z 4} {1 2 3 z 4}} -test lsubst-1.25 {lsubst command} { +test ledit-1.25 {ledit command} { set l {\}\ hello} - concat \"[lsubst l end end]\" $l + concat \"[ledit l end end]\" $l } {"\}\ " \}\ } -test lsubst-1.26 {lsubst command} { +test ledit-1.26 {ledit command} { catch {unset foo} set foo {a b} - list [lsubst foo end end] $foo \ - [lsubst foo end end] $foo \ - [lsubst foo end end] $foo + list [ledit foo end end] $foo \ + [ledit foo end end] $foo \ + [ledit foo end end] $foo } {a a {} {} {} {}} -test lsubst-1.27 {lsubset command} -body { +test ledit-1.27 {lsubset command} -body { set l x - list [lsubst l 1 1] $l + list [ledit l 1 1] $l } -result {x x} -test lsubst-1.28 {lsubst command} -body { +test ledit-1.28 {ledit command} -body { set l x - list [lsubst l 1 1 y] $l + list [ledit l 1 1 y] $l } -result {{x y} {x y}} -test lsubst-1.29 {lsubst command} -body { +test ledit-1.29 {ledit command} -body { set l x - lsubst l 1 1 [error foo] + ledit l 1 1 [error foo] } -returnCodes 1 -result {foo} -test lsubst-1.30 {lsubst command} -body { +test ledit-1.30 {ledit command} -body { set l {not {}alist} - lsubst l 0 0 [error foo] + ledit l 0 0 [error foo] } -returnCodes 1 -result {foo} -test lsubst-1.31 {lsubst command} -body { +test ledit-1.31 {ledit command} -body { unset -nocomplain arr set arr(x) {a b} - list [lsubst arr(x) 0 0 c] $arr(x) + list [ledit arr(x) 0 0 c] $arr(x) } -result {{c b} {c b}} -test lsubst-2.1 {lsubst errors} -body { - list [catch lsubst msg] $msg -} -result {1 {wrong # args: should be "lsubst listVar first last ?element ...?"}} -test lsubst-2.2 {lsubst errors} -body { +test ledit-2.1 {ledit errors} -body { + list [catch ledit msg] $msg +} -result {1 {wrong # args: should be "ledit listVar first last ?element ...?"}} +test ledit-2.2 {ledit errors} -body { unset -nocomplain x - list [catch {lsubst l b} msg] $msg -} -result {1 {wrong # args: should be "lsubst listVar first last ?element ...?"}} -test lsubst-2.3 {lsubst errors} -body { + list [catch {ledit l b} msg] $msg +} -result {1 {wrong # args: should be "ledit listVar first last ?element ...?"}} +test ledit-2.3 {ledit errors} -body { set x {} - list [catch {lsubst x a 10} msg] $msg + list [catch {ledit x a 10} msg] $msg } -result {1 {bad index "a": must be integer?[+-]integer? or end?[+-]integer?}} -test lsubst-2.4 {lsubst errors} -body { +test ledit-2.4 {ledit errors} -body { set l {} - list [catch {lsubst l 10 x} msg] $msg + list [catch {ledit l 10 x} msg] $msg } -result {1 {bad index "x": must be integer?[+-]integer? or end?[+-]integer?}} -test lsubst-2.5 {lsubst errors} -body { +test ledit-2.5 {ledit errors} -body { set l {} - list [catch {lsubst l 10 1x} msg] $msg + list [catch {ledit l 10 1x} msg] $msg } -result {1 {bad index "1x": must be integer?[+-]integer? or end?[+-]integer?}} -test lsubst-2.6 {lsubst errors} -body { +test ledit-2.6 {ledit errors} -body { set l x - list [catch {lsubst l 3 2} msg] $msg + list [catch {ledit l 3 2} msg] $msg } -result {0 x} -test lsubst-2.7 {lsubst errors} -body { +test ledit-2.7 {ledit errors} -body { set l x - list [catch {lsubst l 2 2} msg] $msg + list [catch {ledit l 2 2} msg] $msg } -result {0 x} -test lsubst-2.8 {lsubst errors} -body { +test ledit-2.8 {ledit errors} -body { unset -nocomplain l - lsubst l 0 0 x + ledit l 0 0 x } -returnCodes error -result {can't read "l": no such variable} -test lsubst-2.9 {lsubst errors} -body { +test ledit-2.9 {ledit errors} -body { unset -nocomplain arr - lsubst arr(x) 0 0 x + ledit arr(x) 0 0 x } -returnCodes error -result {can't read "arr(x)": no such variable} -test lsubst-2.10 {lsubst errors} -body { +test ledit-2.10 {ledit errors} -body { unset -nocomplain arr set arr(y) y - lsubst arr(x) 0 0 x + ledit arr(x) 0 0 x } -returnCodes error -result {can't read "arr(x)": no such element in array} -test lsubst-3.1 {lsubst won't modify shared argument objects} { +test ledit-3.1 {ledit won't modify shared argument objects} { proc p {} { set l "a b c" - lsubst l 1 1 "x y" + ledit l 1 1 "x y" # The literal in locals table should be unmodified return [list "a b c" $l] } p } {{a b c} {a {x y} c}} -# Following bugs were in lreplace. Make sure lsubst does not have them -test lsubst-4.1 {Bug ccc2c2cc98: lreplace edge case} { +# Following bugs were in lreplace. Make sure ledit does not have them +test ledit-4.1 {Bug ccc2c2cc98: lreplace edge case} { set l {} - list [lsubst l 1 1] $l + list [ledit l 1 1] $l } {{} {}} -test lsubst-4.2 {Bug ccc2c2cc98: lreplace edge case} { +test ledit-4.2 {Bug ccc2c2cc98: lreplace edge case} { set l { } - list [lsubst l 1 1] $l + list [ledit l 1 1] $l } {{} {}} -test lsubst-4.3 {lreplace edge case} { +test ledit-4.3 {lreplace edge case} { set l {1 2 3} - lsubst l 2 0 + ledit l 2 0 } {1 2 3} -test lsubst-4.4 {lsubst edge case} { +test ledit-4.4 {ledit edge case} { set l {1 2 3 4 5} - list [lsubst l 3 1] $l + list [ledit l 3 1] $l } {{1 2 3 4 5} {1 2 3 4 5}} test lreplace-4.5 {lreplace edge case} { lreplace {1 2 3 4 5} 3 0 _ } {1 2 3 _ 4 5} -test lsubst-4.6 {lsubst end-x: bug a4cb3f06c4} { +test ledit-4.6 {ledit end-x: bug a4cb3f06c4} { set l {0 1 2 3 4} - list [lsubst l 0 end-2] $l + list [ledit l 0 end-2] $l } {{3 4} {3 4}} -test lsubst-4.6.1 {lsubst end-x: bug a4cb3f06c4} { +test ledit-4.6.1 {ledit end-x: bug a4cb3f06c4} { set l {0 1 2 3 4} - list [lsubst l 0 end-2 a b c] $l + list [ledit l 0 end-2 a b c] $l } {{a b c 3 4} {a b c 3 4}} -test lsubst-4.7 {lsubst with two end-indexes: increasing} { +test ledit-4.7 {ledit with two end-indexes: increasing} { set l {0 1 2 3 4} - list [lsubst l end-2 end-1] $l + list [ledit l end-2 end-1] $l } {{0 1 4} {0 1 4}} -test lsubst-4.7.1 {lsubst with two end-indexes: increasing} { +test ledit-4.7.1 {ledit with two end-indexes: increasing} { set l {0 1 2 3 4} - list [lsubst l end-2 end-1 a b c] $l + list [ledit l end-2 end-1 a b c] $l } {{0 1 a b c 4} {0 1 a b c 4}} -test lsubst-4.8 {lsubst with two end-indexes: equal} { +test ledit-4.8 {ledit with two end-indexes: equal} { set l {0 1 2 3 4} - list [lsubst l end-2 end-2] $l + list [ledit l end-2 end-2] $l } {{0 1 3 4} {0 1 3 4}} -test lsubst-4.8.1 {lsubst with two end-indexes: equal} { +test ledit-4.8.1 {ledit with two end-indexes: equal} { set l {0 1 2 3 4} - list [lsubst l end-2 end-2 a b c] $l + list [ledit l end-2 end-2 a b c] $l } {{0 1 a b c 3 4} {0 1 a b c 3 4}} -test lsubst-4.9 {lsubst with two end-indexes: decreasing} { +test ledit-4.9 {ledit with two end-indexes: decreasing} { set l {0 1 2 3 4} - list [lsubst l end-2 end-3] $l + list [ledit l end-2 end-3] $l } {{0 1 2 3 4} {0 1 2 3 4}} -test lsubst-4.9.1 {lsubst with two end-indexes: decreasing} { +test ledit-4.9.1 {ledit with two end-indexes: decreasing} { set l {0 1 2 3 4} - list [lsubst l end-2 end-3 a b c] $l + list [ledit l end-2 end-3 a b c] $l } {{0 1 a b c 2 3 4} {0 1 a b c 2 3 4}} -test lsubst-4.10 {lsubst with two equal indexes} { +test ledit-4.10 {ledit with two equal indexes} { set l {0 1 2 3 4} - list [lsubst l 2 2] $l + list [ledit l 2 2] $l } {{0 1 3 4} {0 1 3 4}} -test lsubst-4.10.1 {lsubst with two equal indexes} { +test ledit-4.10.1 {ledit with two equal indexes} { set l {0 1 2 3 4} - list [lsubst l 2 2 a b c] $l + list [ledit l 2 2 a b c] $l } {{0 1 a b c 3 4} {0 1 a b c 3 4}} -test lsubst-4.11 {lsubst end index first} { +test ledit-4.11 {ledit end index first} { set l {0 1 2 3 4} - list [lsubst l end-2 1 a b c] $l + list [ledit l end-2 1 a b c] $l } {{0 1 a b c 2 3 4} {0 1 a b c 2 3 4}} -test lsubst-4.12 {lsubst end index first} { +test ledit-4.12 {ledit end index first} { set l {0 1 2 3 4} - list [lsubst l end-2 2 a b c] $l + list [ledit l end-2 2 a b c] $l } {{0 1 a b c 3 4} {0 1 a b c 3 4}} -test lsubst-4.13 {lsubst empty list} { +test ledit-4.13 {ledit empty list} { set l {} - list [lsubst l 1 1 1] $l + list [ledit l 1 1 1] $l } {1 1} -test lsubst-4.14 {lsubst empty list} { +test ledit-4.14 {ledit empty list} { set l {} - list [lsubst l 2 2 2] $l + list [ledit l 2 2 2] $l } {2 2} -test lsubst-5.1 {compiled lreplace: Bug 47ac84309b} { +test ledit-5.1 {compiled lreplace: Bug 47ac84309b} { apply {x { - lsubst x end 0 + ledit x end 0 }} {a b c} } {a b c} -test lsubst-5.2 {compiled lreplace: Bug 47ac84309b} { +test ledit-5.2 {compiled lreplace: Bug 47ac84309b} { apply {x { - lsubst x end 0 A + ledit x end 0 A }} {a b c} } {a b A c} @@ -520,10 +520,10 @@ apply {{} { foreach b $idxs { foreach i $ins { set expected [list [catch {$lreplace $ls $a $b {*}$i} m] $m] - set tester [list lsubst ls $a $b {*}$i] + set tester [list ledit ls $a $b {*}$i] set script [list catch $tester m] set script "list \[$script\] \$m" - test lsubst-6.[incr n] {lsubst battery} -body \ + test ledit-6.[incr n] {ledit battery} -body \ [list apply [list {ls} $script] $ls] -result $expected } } -- cgit v0.12 From 5257269714cc2a8444e2f5602e8232b1f9f3c594 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Sep 2022 12:18:46 +0000 Subject: Add some more unused stub entries --- generic/tcl.decls | 6 +++--- generic/tclDecls.h | 27 ++++++++++++++++++++++++--- generic/tclStubInit.c | 9 ++++++++- 3 files changed, 35 insertions(+), 7 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index e07ae5e..9716b32 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -5,8 +5,8 @@ # This file is used to generate the tclDecls.h, tclPlatDecls.h # and tclStubInit.c files. # -# Copyright (c) 1998-1999 by Scriptics Corporation. -# Copyright (c) 2001, 2002 by Kevin B. Kenny. All rights reserved. +# Copyright (c) 1998-1999 Scriptics Corporation. +# Copyright (c) 2001, 2002 Kevin B. Kenny. All rights reserved. # Copyright (c) 2007 Daniel A. Steffen # # See the file "license.terms" for information on usage and redistribution @@ -2111,7 +2111,7 @@ declare 579 { # ----- BASELINE -- FOR -- 8.5.0 ----- # -declare 675 { +declare 682 { void TclUnusedStubEntry(void) } diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 246e2c9..6d7a8a3 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -3507,9 +3507,16 @@ EXTERN void Tcl_AppendPrintfToObj(Tcl_Obj *objPtr, /* Slot 672 is reserved */ /* Slot 673 is reserved */ /* Slot 674 is reserved */ +/* Slot 675 is reserved */ +/* Slot 676 is reserved */ +/* Slot 677 is reserved */ +/* Slot 678 is reserved */ +/* Slot 679 is reserved */ +/* Slot 680 is reserved */ +/* Slot 681 is reserved */ #ifndef TclUnusedStubEntry_TCL_DECLARED #define TclUnusedStubEntry_TCL_DECLARED -/* 675 */ +/* 682 */ EXTERN void TclUnusedStubEntry(void); #endif @@ -4222,7 +4229,14 @@ typedef struct TclStubs { VOID *reserved672; VOID *reserved673; VOID *reserved674; - void (*tclUnusedStubEntry) (void); /* 675 */ + VOID *reserved675; + VOID *reserved676; + VOID *reserved677; + VOID *reserved678; + VOID *reserved679; + VOID *reserved680; + VOID *reserved681; + void (*tclUnusedStubEntry) (void); /* 682 */ } TclStubs; extern TclStubs *tclStubsPtr; @@ -6670,9 +6684,16 @@ extern TclStubs *tclStubsPtr; /* Slot 672 is reserved */ /* Slot 673 is reserved */ /* Slot 674 is reserved */ +/* Slot 675 is reserved */ +/* Slot 676 is reserved */ +/* Slot 677 is reserved */ +/* Slot 678 is reserved */ +/* Slot 679 is reserved */ +/* Slot 680 is reserved */ +/* Slot 681 is reserved */ #ifndef TclUnusedStubEntry #define TclUnusedStubEntry \ - (tclStubsPtr->tclUnusedStubEntry) /* 675 */ + (tclStubsPtr->tclUnusedStubEntry) /* 682 */ #endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 0d2a3c2..f1cf6a2 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -1474,7 +1474,14 @@ TclStubs tclStubs = { NULL, /* 672 */ NULL, /* 673 */ NULL, /* 674 */ - TclUnusedStubEntry, /* 675 */ + NULL, /* 675 */ + NULL, /* 676 */ + NULL, /* 677 */ + NULL, /* 678 */ + NULL, /* 679 */ + NULL, /* 680 */ + NULL, /* 681 */ + TclUnusedStubEntry, /* 682 */ }; /* !END!: Do not edit above this line. */ -- cgit v0.12 From a5fc6492213184ed373920e0afb5dd2f569c8f84 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Sep 2022 12:19:22 +0000 Subject: Update tzdata to 2022d --- library/tzdata/Asia/Gaza | 310 +++++++++++++++++++-------------------- library/tzdata/Asia/Hebron | 310 +++++++++++++++++++-------------------- library/tzdata/Europe/Uzhgorod | 255 +------------------------------- library/tzdata/Europe/Zaporozhye | 254 +------------------------------- 4 files changed, 316 insertions(+), 813 deletions(-) diff --git a/library/tzdata/Asia/Gaza b/library/tzdata/Asia/Gaza index e819d87..1ceb680 100644 --- a/library/tzdata/Asia/Gaza +++ b/library/tzdata/Asia/Gaza @@ -126,159 +126,159 @@ set TZData(:Asia/Gaza) { {1616796000 10800 1 EEST} {1635458400 7200 0 EET} {1648332000 10800 1 EEST} - {1666908000 7200 0 EET} - {1679781600 10800 1 EEST} - {1698357600 7200 0 EET} - {1711836000 10800 1 EEST} - {1729807200 7200 0 EET} - {1743285600 10800 1 EEST} - {1761256800 7200 0 EET} - {1774735200 10800 1 EEST} - {1792706400 7200 0 EET} - {1806184800 10800 1 EEST} - {1824760800 7200 0 EET} - {1837634400 10800 1 EEST} - {1856210400 7200 0 EET} - {1869084000 10800 1 EEST} - {1887660000 7200 0 EET} - {1901138400 10800 1 EEST} - {1919109600 7200 0 EET} - {1932588000 10800 1 EEST} - {1950559200 7200 0 EET} - {1964037600 10800 1 EEST} - {1982613600 7200 0 EET} - {1995487200 10800 1 EEST} - {2014063200 7200 0 EET} - {2026936800 10800 1 EEST} - {2045512800 7200 0 EET} - {2058386400 10800 1 EEST} - {2076962400 7200 0 EET} - {2090440800 10800 1 EEST} - {2108412000 7200 0 EET} - {2121890400 10800 1 EEST} - {2139861600 7200 0 EET} - {2153340000 10800 1 EEST} - {2171916000 7200 0 EET} - {2184789600 10800 1 EEST} - {2203365600 7200 0 EET} - {2216239200 10800 1 EEST} - {2234815200 7200 0 EET} - {2248293600 10800 1 EEST} - {2266264800 7200 0 EET} - {2279743200 10800 1 EEST} - {2297714400 7200 0 EET} - {2311192800 10800 1 EEST} - {2329164000 7200 0 EET} - {2342642400 10800 1 EEST} - {2361218400 7200 0 EET} - {2374092000 10800 1 EEST} - {2392668000 7200 0 EET} - {2405541600 10800 1 EEST} - {2424117600 7200 0 EET} - {2437596000 10800 1 EEST} - {2455567200 7200 0 EET} - {2469045600 10800 1 EEST} - {2487016800 7200 0 EET} - {2500495200 10800 1 EEST} - {2519071200 7200 0 EET} - {2531944800 10800 1 EEST} - {2550520800 7200 0 EET} - {2563394400 10800 1 EEST} - {2581970400 7200 0 EET} - {2595448800 10800 1 EEST} - {2613420000 7200 0 EET} - {2626898400 10800 1 EEST} - {2644869600 7200 0 EET} - {2658348000 10800 1 EEST} - {2676319200 7200 0 EET} - {2689797600 10800 1 EEST} - {2708373600 7200 0 EET} - {2721247200 10800 1 EEST} - {2739823200 7200 0 EET} - {2752696800 10800 1 EEST} - {2771272800 7200 0 EET} - {2784751200 10800 1 EEST} - {2802722400 7200 0 EET} - {2816200800 10800 1 EEST} - {2834172000 7200 0 EET} - {2847650400 10800 1 EEST} - {2866226400 7200 0 EET} - {2879100000 10800 1 EEST} - {2897676000 7200 0 EET} - {2910549600 10800 1 EEST} - {2929125600 7200 0 EET} - {2941999200 10800 1 EEST} - {2960575200 7200 0 EET} - {2974053600 10800 1 EEST} - {2992024800 7200 0 EET} - {3005503200 10800 1 EEST} - {3023474400 7200 0 EET} - {3036952800 10800 1 EEST} - {3055528800 7200 0 EET} - {3068402400 10800 1 EEST} - {3086978400 7200 0 EET} - {3099852000 10800 1 EEST} - {3118428000 7200 0 EET} - {3131906400 10800 1 EEST} - {3149877600 7200 0 EET} - {3163356000 10800 1 EEST} - {3181327200 7200 0 EET} - {3194805600 10800 1 EEST} - {3212776800 7200 0 EET} - {3226255200 10800 1 EEST} - {3244831200 7200 0 EET} - {3257704800 10800 1 EEST} - {3276280800 7200 0 EET} - {3289154400 10800 1 EEST} - {3307730400 7200 0 EET} - {3321208800 10800 1 EEST} - {3339180000 7200 0 EET} - {3352658400 10800 1 EEST} - {3370629600 7200 0 EET} - {3384108000 10800 1 EEST} - {3402684000 7200 0 EET} - {3415557600 10800 1 EEST} - {3434133600 7200 0 EET} - {3447007200 10800 1 EEST} - {3465583200 7200 0 EET} - {3479061600 10800 1 EEST} - {3497032800 7200 0 EET} - {3510511200 10800 1 EEST} - {3528482400 7200 0 EET} - {3541960800 10800 1 EEST} - {3559932000 7200 0 EET} - {3573410400 10800 1 EEST} - {3591986400 7200 0 EET} - {3604860000 10800 1 EEST} - {3623436000 7200 0 EET} - {3636309600 10800 1 EEST} - {3654885600 7200 0 EET} - {3668364000 10800 1 EEST} - {3686335200 7200 0 EET} - {3699813600 10800 1 EEST} - {3717784800 7200 0 EET} - {3731263200 10800 1 EEST} - {3749839200 7200 0 EET} - {3762712800 10800 1 EEST} - {3781288800 7200 0 EET} - {3794162400 10800 1 EEST} - {3812738400 7200 0 EET} - {3825612000 10800 1 EEST} - {3844188000 7200 0 EET} - {3857666400 10800 1 EEST} - {3875637600 7200 0 EET} - {3889116000 10800 1 EEST} - {3907087200 7200 0 EET} - {3920565600 10800 1 EEST} - {3939141600 7200 0 EET} - {3952015200 10800 1 EEST} - {3970591200 7200 0 EET} - {3983464800 10800 1 EEST} - {4002040800 7200 0 EET} - {4015519200 10800 1 EEST} - {4033490400 7200 0 EET} - {4046968800 10800 1 EEST} - {4064940000 7200 0 EET} - {4078418400 10800 1 EEST} - {4096389600 7200 0 EET} + {1666998000 7200 0 EET} + {1679702400 10800 1 EEST} + {1698447600 7200 0 EET} + {1711756800 10800 1 EEST} + {1729897200 7200 0 EET} + {1743206400 10800 1 EEST} + {1761346800 7200 0 EET} + {1774656000 10800 1 EEST} + {1792796400 7200 0 EET} + {1806105600 10800 1 EEST} + {1824850800 7200 0 EET} + {1837555200 10800 1 EEST} + {1856300400 7200 0 EET} + {1869004800 10800 1 EEST} + {1887750000 7200 0 EET} + {1901059200 10800 1 EEST} + {1919199600 7200 0 EET} + {1932508800 10800 1 EEST} + {1950649200 7200 0 EET} + {1963958400 10800 1 EEST} + {1982703600 7200 0 EET} + {1995408000 10800 1 EEST} + {2014153200 7200 0 EET} + {2026857600 10800 1 EEST} + {2045602800 7200 0 EET} + {2058307200 10800 1 EEST} + {2077052400 7200 0 EET} + {2090361600 10800 1 EEST} + {2108502000 7200 0 EET} + {2121811200 10800 1 EEST} + {2139951600 7200 0 EET} + {2153260800 10800 1 EEST} + {2172006000 7200 0 EET} + {2184710400 10800 1 EEST} + {2203455600 7200 0 EET} + {2216160000 10800 1 EEST} + {2234905200 7200 0 EET} + {2248214400 10800 1 EEST} + {2266354800 7200 0 EET} + {2279664000 10800 1 EEST} + {2297804400 7200 0 EET} + {2311113600 10800 1 EEST} + {2329254000 7200 0 EET} + {2342563200 10800 1 EEST} + {2361308400 7200 0 EET} + {2374012800 10800 1 EEST} + {2392758000 7200 0 EET} + {2405462400 10800 1 EEST} + {2424207600 7200 0 EET} + {2437516800 10800 1 EEST} + {2455657200 7200 0 EET} + {2468966400 10800 1 EEST} + {2487106800 7200 0 EET} + {2500416000 10800 1 EEST} + {2519161200 7200 0 EET} + {2531865600 10800 1 EEST} + {2550610800 7200 0 EET} + {2563315200 10800 1 EEST} + {2582060400 7200 0 EET} + {2595369600 10800 1 EEST} + {2613510000 7200 0 EET} + {2626819200 10800 1 EEST} + {2644959600 7200 0 EET} + {2658268800 10800 1 EEST} + {2676409200 7200 0 EET} + {2689718400 10800 1 EEST} + {2708463600 7200 0 EET} + {2721168000 10800 1 EEST} + {2739913200 7200 0 EET} + {2752617600 10800 1 EEST} + {2771362800 7200 0 EET} + {2784672000 10800 1 EEST} + {2802812400 7200 0 EET} + {2816121600 10800 1 EEST} + {2834262000 7200 0 EET} + {2847571200 10800 1 EEST} + {2866316400 7200 0 EET} + {2879020800 10800 1 EEST} + {2897766000 7200 0 EET} + {2910470400 10800 1 EEST} + {2929215600 7200 0 EET} + {2941920000 10800 1 EEST} + {2960665200 7200 0 EET} + {2973974400 10800 1 EEST} + {2992114800 7200 0 EET} + {3005424000 10800 1 EEST} + {3023564400 7200 0 EET} + {3036873600 10800 1 EEST} + {3055618800 7200 0 EET} + {3068323200 10800 1 EEST} + {3087068400 7200 0 EET} + {3099772800 10800 1 EEST} + {3118518000 7200 0 EET} + {3131827200 10800 1 EEST} + {3149967600 7200 0 EET} + {3163276800 10800 1 EEST} + {3181417200 7200 0 EET} + {3194726400 10800 1 EEST} + {3212866800 7200 0 EET} + {3226176000 10800 1 EEST} + {3244921200 7200 0 EET} + {3257625600 10800 1 EEST} + {3276370800 7200 0 EET} + {3289075200 10800 1 EEST} + {3307820400 7200 0 EET} + {3321129600 10800 1 EEST} + {3339270000 7200 0 EET} + {3352579200 10800 1 EEST} + {3370719600 7200 0 EET} + {3384028800 10800 1 EEST} + {3402774000 7200 0 EET} + {3415478400 10800 1 EEST} + {3434223600 7200 0 EET} + {3446928000 10800 1 EEST} + {3465673200 7200 0 EET} + {3478982400 10800 1 EEST} + {3497122800 7200 0 EET} + {3510432000 10800 1 EEST} + {3528572400 7200 0 EET} + {3541881600 10800 1 EEST} + {3560022000 7200 0 EET} + {3573331200 10800 1 EEST} + {3592076400 7200 0 EET} + {3604780800 10800 1 EEST} + {3623526000 7200 0 EET} + {3636230400 10800 1 EEST} + {3654975600 7200 0 EET} + {3668284800 10800 1 EEST} + {3686425200 7200 0 EET} + {3699734400 10800 1 EEST} + {3717874800 7200 0 EET} + {3731184000 10800 1 EEST} + {3749929200 7200 0 EET} + {3762633600 10800 1 EEST} + {3781378800 7200 0 EET} + {3794083200 10800 1 EEST} + {3812828400 7200 0 EET} + {3825532800 10800 1 EEST} + {3844278000 7200 0 EET} + {3857587200 10800 1 EEST} + {3875727600 7200 0 EET} + {3889036800 10800 1 EEST} + {3907177200 7200 0 EET} + {3920486400 10800 1 EEST} + {3939231600 7200 0 EET} + {3951936000 10800 1 EEST} + {3970681200 7200 0 EET} + {3983385600 10800 1 EEST} + {4002130800 7200 0 EET} + {4015440000 10800 1 EEST} + {4033580400 7200 0 EET} + {4046889600 10800 1 EEST} + {4065030000 7200 0 EET} + {4078339200 10800 1 EEST} + {4096479600 7200 0 EET} } diff --git a/library/tzdata/Asia/Hebron b/library/tzdata/Asia/Hebron index b484c6f..b92db8d 100644 --- a/library/tzdata/Asia/Hebron +++ b/library/tzdata/Asia/Hebron @@ -125,159 +125,159 @@ set TZData(:Asia/Hebron) { {1616796000 10800 1 EEST} {1635458400 7200 0 EET} {1648332000 10800 1 EEST} - {1666908000 7200 0 EET} - {1679781600 10800 1 EEST} - {1698357600 7200 0 EET} - {1711836000 10800 1 EEST} - {1729807200 7200 0 EET} - {1743285600 10800 1 EEST} - {1761256800 7200 0 EET} - {1774735200 10800 1 EEST} - {1792706400 7200 0 EET} - {1806184800 10800 1 EEST} - {1824760800 7200 0 EET} - {1837634400 10800 1 EEST} - {1856210400 7200 0 EET} - {1869084000 10800 1 EEST} - {1887660000 7200 0 EET} - {1901138400 10800 1 EEST} - {1919109600 7200 0 EET} - {1932588000 10800 1 EEST} - {1950559200 7200 0 EET} - {1964037600 10800 1 EEST} - {1982613600 7200 0 EET} - {1995487200 10800 1 EEST} - {2014063200 7200 0 EET} - {2026936800 10800 1 EEST} - {2045512800 7200 0 EET} - {2058386400 10800 1 EEST} - {2076962400 7200 0 EET} - {2090440800 10800 1 EEST} - {2108412000 7200 0 EET} - {2121890400 10800 1 EEST} - {2139861600 7200 0 EET} - {2153340000 10800 1 EEST} - {2171916000 7200 0 EET} - {2184789600 10800 1 EEST} - {2203365600 7200 0 EET} - {2216239200 10800 1 EEST} - {2234815200 7200 0 EET} - {2248293600 10800 1 EEST} - {2266264800 7200 0 EET} - {2279743200 10800 1 EEST} - {2297714400 7200 0 EET} - {2311192800 10800 1 EEST} - {2329164000 7200 0 EET} - {2342642400 10800 1 EEST} - {2361218400 7200 0 EET} - {2374092000 10800 1 EEST} - {2392668000 7200 0 EET} - {2405541600 10800 1 EEST} - {2424117600 7200 0 EET} - {2437596000 10800 1 EEST} - {2455567200 7200 0 EET} - {2469045600 10800 1 EEST} - {2487016800 7200 0 EET} - {2500495200 10800 1 EEST} - {2519071200 7200 0 EET} - {2531944800 10800 1 EEST} - {2550520800 7200 0 EET} - {2563394400 10800 1 EEST} - {2581970400 7200 0 EET} - {2595448800 10800 1 EEST} - {2613420000 7200 0 EET} - {2626898400 10800 1 EEST} - {2644869600 7200 0 EET} - {2658348000 10800 1 EEST} - {2676319200 7200 0 EET} - {2689797600 10800 1 EEST} - {2708373600 7200 0 EET} - {2721247200 10800 1 EEST} - {2739823200 7200 0 EET} - {2752696800 10800 1 EEST} - {2771272800 7200 0 EET} - {2784751200 10800 1 EEST} - {2802722400 7200 0 EET} - {2816200800 10800 1 EEST} - {2834172000 7200 0 EET} - {2847650400 10800 1 EEST} - {2866226400 7200 0 EET} - {2879100000 10800 1 EEST} - {2897676000 7200 0 EET} - {2910549600 10800 1 EEST} - {2929125600 7200 0 EET} - {2941999200 10800 1 EEST} - {2960575200 7200 0 EET} - {2974053600 10800 1 EEST} - {2992024800 7200 0 EET} - {3005503200 10800 1 EEST} - {3023474400 7200 0 EET} - {3036952800 10800 1 EEST} - {3055528800 7200 0 EET} - {3068402400 10800 1 EEST} - {3086978400 7200 0 EET} - {3099852000 10800 1 EEST} - {3118428000 7200 0 EET} - {3131906400 10800 1 EEST} - {3149877600 7200 0 EET} - {3163356000 10800 1 EEST} - {3181327200 7200 0 EET} - {3194805600 10800 1 EEST} - {3212776800 7200 0 EET} - {3226255200 10800 1 EEST} - {3244831200 7200 0 EET} - {3257704800 10800 1 EEST} - {3276280800 7200 0 EET} - {3289154400 10800 1 EEST} - {3307730400 7200 0 EET} - {3321208800 10800 1 EEST} - {3339180000 7200 0 EET} - {3352658400 10800 1 EEST} - {3370629600 7200 0 EET} - {3384108000 10800 1 EEST} - {3402684000 7200 0 EET} - {3415557600 10800 1 EEST} - {3434133600 7200 0 EET} - {3447007200 10800 1 EEST} - {3465583200 7200 0 EET} - {3479061600 10800 1 EEST} - {3497032800 7200 0 EET} - {3510511200 10800 1 EEST} - {3528482400 7200 0 EET} - {3541960800 10800 1 EEST} - {3559932000 7200 0 EET} - {3573410400 10800 1 EEST} - {3591986400 7200 0 EET} - {3604860000 10800 1 EEST} - {3623436000 7200 0 EET} - {3636309600 10800 1 EEST} - {3654885600 7200 0 EET} - {3668364000 10800 1 EEST} - {3686335200 7200 0 EET} - {3699813600 10800 1 EEST} - {3717784800 7200 0 EET} - {3731263200 10800 1 EEST} - {3749839200 7200 0 EET} - {3762712800 10800 1 EEST} - {3781288800 7200 0 EET} - {3794162400 10800 1 EEST} - {3812738400 7200 0 EET} - {3825612000 10800 1 EEST} - {3844188000 7200 0 EET} - {3857666400 10800 1 EEST} - {3875637600 7200 0 EET} - {3889116000 10800 1 EEST} - {3907087200 7200 0 EET} - {3920565600 10800 1 EEST} - {3939141600 7200 0 EET} - {3952015200 10800 1 EEST} - {3970591200 7200 0 EET} - {3983464800 10800 1 EEST} - {4002040800 7200 0 EET} - {4015519200 10800 1 EEST} - {4033490400 7200 0 EET} - {4046968800 10800 1 EEST} - {4064940000 7200 0 EET} - {4078418400 10800 1 EEST} - {4096389600 7200 0 EET} + {1666998000 7200 0 EET} + {1679702400 10800 1 EEST} + {1698447600 7200 0 EET} + {1711756800 10800 1 EEST} + {1729897200 7200 0 EET} + {1743206400 10800 1 EEST} + {1761346800 7200 0 EET} + {1774656000 10800 1 EEST} + {1792796400 7200 0 EET} + {1806105600 10800 1 EEST} + {1824850800 7200 0 EET} + {1837555200 10800 1 EEST} + {1856300400 7200 0 EET} + {1869004800 10800 1 EEST} + {1887750000 7200 0 EET} + {1901059200 10800 1 EEST} + {1919199600 7200 0 EET} + {1932508800 10800 1 EEST} + {1950649200 7200 0 EET} + {1963958400 10800 1 EEST} + {1982703600 7200 0 EET} + {1995408000 10800 1 EEST} + {2014153200 7200 0 EET} + {2026857600 10800 1 EEST} + {2045602800 7200 0 EET} + {2058307200 10800 1 EEST} + {2077052400 7200 0 EET} + {2090361600 10800 1 EEST} + {2108502000 7200 0 EET} + {2121811200 10800 1 EEST} + {2139951600 7200 0 EET} + {2153260800 10800 1 EEST} + {2172006000 7200 0 EET} + {2184710400 10800 1 EEST} + {2203455600 7200 0 EET} + {2216160000 10800 1 EEST} + {2234905200 7200 0 EET} + {2248214400 10800 1 EEST} + {2266354800 7200 0 EET} + {2279664000 10800 1 EEST} + {2297804400 7200 0 EET} + {2311113600 10800 1 EEST} + {2329254000 7200 0 EET} + {2342563200 10800 1 EEST} + {2361308400 7200 0 EET} + {2374012800 10800 1 EEST} + {2392758000 7200 0 EET} + {2405462400 10800 1 EEST} + {2424207600 7200 0 EET} + {2437516800 10800 1 EEST} + {2455657200 7200 0 EET} + {2468966400 10800 1 EEST} + {2487106800 7200 0 EET} + {2500416000 10800 1 EEST} + {2519161200 7200 0 EET} + {2531865600 10800 1 EEST} + {2550610800 7200 0 EET} + {2563315200 10800 1 EEST} + {2582060400 7200 0 EET} + {2595369600 10800 1 EEST} + {2613510000 7200 0 EET} + {2626819200 10800 1 EEST} + {2644959600 7200 0 EET} + {2658268800 10800 1 EEST} + {2676409200 7200 0 EET} + {2689718400 10800 1 EEST} + {2708463600 7200 0 EET} + {2721168000 10800 1 EEST} + {2739913200 7200 0 EET} + {2752617600 10800 1 EEST} + {2771362800 7200 0 EET} + {2784672000 10800 1 EEST} + {2802812400 7200 0 EET} + {2816121600 10800 1 EEST} + {2834262000 7200 0 EET} + {2847571200 10800 1 EEST} + {2866316400 7200 0 EET} + {2879020800 10800 1 EEST} + {2897766000 7200 0 EET} + {2910470400 10800 1 EEST} + {2929215600 7200 0 EET} + {2941920000 10800 1 EEST} + {2960665200 7200 0 EET} + {2973974400 10800 1 EEST} + {2992114800 7200 0 EET} + {3005424000 10800 1 EEST} + {3023564400 7200 0 EET} + {3036873600 10800 1 EEST} + {3055618800 7200 0 EET} + {3068323200 10800 1 EEST} + {3087068400 7200 0 EET} + {3099772800 10800 1 EEST} + {3118518000 7200 0 EET} + {3131827200 10800 1 EEST} + {3149967600 7200 0 EET} + {3163276800 10800 1 EEST} + {3181417200 7200 0 EET} + {3194726400 10800 1 EEST} + {3212866800 7200 0 EET} + {3226176000 10800 1 EEST} + {3244921200 7200 0 EET} + {3257625600 10800 1 EEST} + {3276370800 7200 0 EET} + {3289075200 10800 1 EEST} + {3307820400 7200 0 EET} + {3321129600 10800 1 EEST} + {3339270000 7200 0 EET} + {3352579200 10800 1 EEST} + {3370719600 7200 0 EET} + {3384028800 10800 1 EEST} + {3402774000 7200 0 EET} + {3415478400 10800 1 EEST} + {3434223600 7200 0 EET} + {3446928000 10800 1 EEST} + {3465673200 7200 0 EET} + {3478982400 10800 1 EEST} + {3497122800 7200 0 EET} + {3510432000 10800 1 EEST} + {3528572400 7200 0 EET} + {3541881600 10800 1 EEST} + {3560022000 7200 0 EET} + {3573331200 10800 1 EEST} + {3592076400 7200 0 EET} + {3604780800 10800 1 EEST} + {3623526000 7200 0 EET} + {3636230400 10800 1 EEST} + {3654975600 7200 0 EET} + {3668284800 10800 1 EEST} + {3686425200 7200 0 EET} + {3699734400 10800 1 EEST} + {3717874800 7200 0 EET} + {3731184000 10800 1 EEST} + {3749929200 7200 0 EET} + {3762633600 10800 1 EEST} + {3781378800 7200 0 EET} + {3794083200 10800 1 EEST} + {3812828400 7200 0 EET} + {3825532800 10800 1 EEST} + {3844278000 7200 0 EET} + {3857587200 10800 1 EEST} + {3875727600 7200 0 EET} + {3889036800 10800 1 EEST} + {3907177200 7200 0 EET} + {3920486400 10800 1 EEST} + {3939231600 7200 0 EET} + {3951936000 10800 1 EEST} + {3970681200 7200 0 EET} + {3983385600 10800 1 EEST} + {4002130800 7200 0 EET} + {4015440000 10800 1 EEST} + {4033580400 7200 0 EET} + {4046889600 10800 1 EEST} + {4065030000 7200 0 EET} + {4078339200 10800 1 EEST} + {4096479600 7200 0 EET} } diff --git a/library/tzdata/Europe/Uzhgorod b/library/tzdata/Europe/Uzhgorod index 0a058db..2a0f450 100644 --- a/library/tzdata/Europe/Uzhgorod +++ b/library/tzdata/Europe/Uzhgorod @@ -1,254 +1,5 @@ # created by tools/tclZIC.tcl - do not edit - -set TZData(:Europe/Uzhgorod) { - {-9223372036854775808 5352 0 LMT} - {-2500939752 3600 0 CET} - {-946774800 3600 0 CET} - {-938905200 7200 1 CEST} - {-857257200 3600 0 CET} - {-844556400 7200 1 CEST} - {-828226800 3600 0 CET} - {-812502000 7200 1 CEST} - {-796870800 7200 1 CEST} - {-794714400 3600 0 CET} - {-773456400 10800 0 MSD} - {354920400 14400 1 MSD} - {370728000 10800 0 MSK} - {386456400 14400 1 MSD} - {402264000 10800 0 MSK} - {417992400 14400 1 MSD} - {433800000 10800 0 MSK} - {449614800 14400 1 MSD} - {465346800 10800 0 MSK} - {481071600 14400 1 MSD} - {496796400 10800 0 MSK} - {512521200 14400 1 MSD} - {528246000 10800 0 MSK} - {543970800 14400 1 MSD} - {559695600 10800 0 MSK} - {575420400 14400 1 MSD} - {591145200 10800 0 MSK} - {606870000 14400 1 MSD} - {622594800 10800 0 MSK} - {631141200 10800 0 MSK} - {646786800 3600 0 CET} - {670384800 7200 0 EET} - {701042400 7200 0 EET} - {701827200 10800 1 EEST} - {717552000 7200 0 EET} - {733276800 10800 1 EEST} - {749001600 7200 0 EET} - {764726400 10800 1 EEST} - {780451200 7200 0 EET} - {796176000 10800 1 EEST} - {811900800 7200 0 EET} - {828230400 10800 1 EEST} - {831938400 10800 0 EEST} - {846378000 7200 0 EET} - {859683600 10800 1 EEST} - {877827600 7200 0 EET} - {891133200 10800 1 EEST} - {909277200 7200 0 EET} - {922582800 10800 1 EEST} - {941331600 7200 0 EET} - {954032400 10800 1 EEST} - {972781200 7200 0 EET} - {985482000 10800 1 EEST} - {1004230800 7200 0 EET} - {1017536400 10800 1 EEST} - {1035680400 7200 0 EET} - {1048986000 10800 1 EEST} - {1067130000 7200 0 EET} - {1080435600 10800 1 EEST} - {1099184400 7200 0 EET} - {1111885200 10800 1 EEST} - {1130634000 7200 0 EET} - {1143334800 10800 1 EEST} - {1162083600 7200 0 EET} - {1174784400 10800 1 EEST} - {1193533200 7200 0 EET} - {1206838800 10800 1 EEST} - {1224982800 7200 0 EET} - {1238288400 10800 1 EEST} - {1256432400 7200 0 EET} - {1269738000 10800 1 EEST} - {1288486800 7200 0 EET} - {1301187600 10800 1 EEST} - {1319936400 7200 0 EET} - {1332637200 10800 1 EEST} - {1351386000 7200 0 EET} - {1364691600 10800 1 EEST} - {1382835600 7200 0 EET} - {1396141200 10800 1 EEST} - {1414285200 7200 0 EET} - {1427590800 10800 1 EEST} - {1445734800 7200 0 EET} - {1459040400 10800 1 EEST} - {1477789200 7200 0 EET} - {1490490000 10800 1 EEST} - {1509238800 7200 0 EET} - {1521939600 10800 1 EEST} - {1540688400 7200 0 EET} - {1553994000 10800 1 EEST} - {1572138000 7200 0 EET} - {1585443600 10800 1 EEST} - {1603587600 7200 0 EET} - {1616893200 10800 1 EEST} - {1635642000 7200 0 EET} - {1648342800 10800 1 EEST} - {1667091600 7200 0 EET} - {1679792400 10800 1 EEST} - {1698541200 7200 0 EET} - {1711846800 10800 1 EEST} - {1729990800 7200 0 EET} - {1743296400 10800 1 EEST} - {1761440400 7200 0 EET} - {1774746000 10800 1 EEST} - {1792890000 7200 0 EET} - {1806195600 10800 1 EEST} - {1824944400 7200 0 EET} - {1837645200 10800 1 EEST} - {1856394000 7200 0 EET} - {1869094800 10800 1 EEST} - {1887843600 7200 0 EET} - {1901149200 10800 1 EEST} - {1919293200 7200 0 EET} - {1932598800 10800 1 EEST} - {1950742800 7200 0 EET} - {1964048400 10800 1 EEST} - {1982797200 7200 0 EET} - {1995498000 10800 1 EEST} - {2014246800 7200 0 EET} - {2026947600 10800 1 EEST} - {2045696400 7200 0 EET} - {2058397200 10800 1 EEST} - {2077146000 7200 0 EET} - {2090451600 10800 1 EEST} - {2108595600 7200 0 EET} - {2121901200 10800 1 EEST} - {2140045200 7200 0 EET} - {2153350800 10800 1 EEST} - {2172099600 7200 0 EET} - {2184800400 10800 1 EEST} - {2203549200 7200 0 EET} - {2216250000 10800 1 EEST} - {2234998800 7200 0 EET} - {2248304400 10800 1 EEST} - {2266448400 7200 0 EET} - {2279754000 10800 1 EEST} - {2297898000 7200 0 EET} - {2311203600 10800 1 EEST} - {2329347600 7200 0 EET} - {2342653200 10800 1 EEST} - {2361402000 7200 0 EET} - {2374102800 10800 1 EEST} - {2392851600 7200 0 EET} - {2405552400 10800 1 EEST} - {2424301200 7200 0 EET} - {2437606800 10800 1 EEST} - {2455750800 7200 0 EET} - {2469056400 10800 1 EEST} - {2487200400 7200 0 EET} - {2500506000 10800 1 EEST} - {2519254800 7200 0 EET} - {2531955600 10800 1 EEST} - {2550704400 7200 0 EET} - {2563405200 10800 1 EEST} - {2582154000 7200 0 EET} - {2595459600 10800 1 EEST} - {2613603600 7200 0 EET} - {2626909200 10800 1 EEST} - {2645053200 7200 0 EET} - {2658358800 10800 1 EEST} - {2676502800 7200 0 EET} - {2689808400 10800 1 EEST} - {2708557200 7200 0 EET} - {2721258000 10800 1 EEST} - {2740006800 7200 0 EET} - {2752707600 10800 1 EEST} - {2771456400 7200 0 EET} - {2784762000 10800 1 EEST} - {2802906000 7200 0 EET} - {2816211600 10800 1 EEST} - {2834355600 7200 0 EET} - {2847661200 10800 1 EEST} - {2866410000 7200 0 EET} - {2879110800 10800 1 EEST} - {2897859600 7200 0 EET} - {2910560400 10800 1 EEST} - {2929309200 7200 0 EET} - {2942010000 10800 1 EEST} - {2960758800 7200 0 EET} - {2974064400 10800 1 EEST} - {2992208400 7200 0 EET} - {3005514000 10800 1 EEST} - {3023658000 7200 0 EET} - {3036963600 10800 1 EEST} - {3055712400 7200 0 EET} - {3068413200 10800 1 EEST} - {3087162000 7200 0 EET} - {3099862800 10800 1 EEST} - {3118611600 7200 0 EET} - {3131917200 10800 1 EEST} - {3150061200 7200 0 EET} - {3163366800 10800 1 EEST} - {3181510800 7200 0 EET} - {3194816400 10800 1 EEST} - {3212960400 7200 0 EET} - {3226266000 10800 1 EEST} - {3245014800 7200 0 EET} - {3257715600 10800 1 EEST} - {3276464400 7200 0 EET} - {3289165200 10800 1 EEST} - {3307914000 7200 0 EET} - {3321219600 10800 1 EEST} - {3339363600 7200 0 EET} - {3352669200 10800 1 EEST} - {3370813200 7200 0 EET} - {3384118800 10800 1 EEST} - {3402867600 7200 0 EET} - {3415568400 10800 1 EEST} - {3434317200 7200 0 EET} - {3447018000 10800 1 EEST} - {3465766800 7200 0 EET} - {3479072400 10800 1 EEST} - {3497216400 7200 0 EET} - {3510522000 10800 1 EEST} - {3528666000 7200 0 EET} - {3541971600 10800 1 EEST} - {3560115600 7200 0 EET} - {3573421200 10800 1 EEST} - {3592170000 7200 0 EET} - {3604870800 10800 1 EEST} - {3623619600 7200 0 EET} - {3636320400 10800 1 EEST} - {3655069200 7200 0 EET} - {3668374800 10800 1 EEST} - {3686518800 7200 0 EET} - {3699824400 10800 1 EEST} - {3717968400 7200 0 EET} - {3731274000 10800 1 EEST} - {3750022800 7200 0 EET} - {3762723600 10800 1 EEST} - {3781472400 7200 0 EET} - {3794173200 10800 1 EEST} - {3812922000 7200 0 EET} - {3825622800 10800 1 EEST} - {3844371600 7200 0 EET} - {3857677200 10800 1 EEST} - {3875821200 7200 0 EET} - {3889126800 10800 1 EEST} - {3907270800 7200 0 EET} - {3920576400 10800 1 EEST} - {3939325200 7200 0 EET} - {3952026000 10800 1 EEST} - {3970774800 7200 0 EET} - {3983475600 10800 1 EEST} - {4002224400 7200 0 EET} - {4015530000 10800 1 EEST} - {4033674000 7200 0 EET} - {4046979600 10800 1 EEST} - {4065123600 7200 0 EET} - {4078429200 10800 1 EEST} - {4096573200 7200 0 EET} +if {![info exists TZData(Europe/Kyiv)]} { + LoadTimeZoneFile Europe/Kyiv } +set TZData(:Europe/Uzhgorod) $TZData(:Europe/Kyiv) diff --git a/library/tzdata/Europe/Zaporozhye b/library/tzdata/Europe/Zaporozhye index 8ae9604..385d862 100644 --- a/library/tzdata/Europe/Zaporozhye +++ b/library/tzdata/Europe/Zaporozhye @@ -1,253 +1,5 @@ # created by tools/tclZIC.tcl - do not edit - -set TZData(:Europe/Zaporozhye) { - {-9223372036854775808 8440 0 LMT} - {-2840149240 8400 0 +0220} - {-1441160400 7200 0 EET} - {-1247536800 10800 0 MSK} - {-894769200 3600 0 CET} - {-857257200 3600 0 CET} - {-844556400 7200 1 CEST} - {-828226800 3600 0 CET} - {-826419600 10800 0 MSD} - {354920400 14400 1 MSD} - {370728000 10800 0 MSK} - {386456400 14400 1 MSD} - {402264000 10800 0 MSK} - {417992400 14400 1 MSD} - {433800000 10800 0 MSK} - {449614800 14400 1 MSD} - {465346800 10800 0 MSK} - {481071600 14400 1 MSD} - {496796400 10800 0 MSK} - {512521200 14400 1 MSD} - {528246000 10800 0 MSK} - {543970800 14400 1 MSD} - {559695600 10800 0 MSK} - {575420400 14400 1 MSD} - {591145200 10800 0 MSK} - {606870000 14400 1 MSD} - {622594800 10800 0 MSK} - {638319600 14400 1 MSD} - {654649200 10800 0 MSK} - {670374000 10800 0 EEST} - {686091600 7200 0 EET} - {701042400 7200 0 EET} - {701827200 10800 1 EEST} - {717552000 7200 0 EET} - {733276800 10800 1 EEST} - {749001600 7200 0 EET} - {764726400 10800 1 EEST} - {780451200 7200 0 EET} - {796176000 10800 1 EEST} - {811900800 7200 0 EET} - {828230400 10800 1 EEST} - {831938400 10800 0 EEST} - {846378000 7200 0 EET} - {859683600 10800 1 EEST} - {877827600 7200 0 EET} - {891133200 10800 1 EEST} - {909277200 7200 0 EET} - {922582800 10800 1 EEST} - {941331600 7200 0 EET} - {954032400 10800 1 EEST} - {972781200 7200 0 EET} - {985482000 10800 1 EEST} - {1004230800 7200 0 EET} - {1017536400 10800 1 EEST} - {1035680400 7200 0 EET} - {1048986000 10800 1 EEST} - {1067130000 7200 0 EET} - {1080435600 10800 1 EEST} - {1099184400 7200 0 EET} - {1111885200 10800 1 EEST} - {1130634000 7200 0 EET} - {1143334800 10800 1 EEST} - {1162083600 7200 0 EET} - {1174784400 10800 1 EEST} - {1193533200 7200 0 EET} - {1206838800 10800 1 EEST} - {1224982800 7200 0 EET} - {1238288400 10800 1 EEST} - {1256432400 7200 0 EET} - {1269738000 10800 1 EEST} - {1288486800 7200 0 EET} - {1301187600 10800 1 EEST} - {1319936400 7200 0 EET} - {1332637200 10800 1 EEST} - {1351386000 7200 0 EET} - {1364691600 10800 1 EEST} - {1382835600 7200 0 EET} - {1396141200 10800 1 EEST} - {1414285200 7200 0 EET} - {1427590800 10800 1 EEST} - {1445734800 7200 0 EET} - {1459040400 10800 1 EEST} - {1477789200 7200 0 EET} - {1490490000 10800 1 EEST} - {1509238800 7200 0 EET} - {1521939600 10800 1 EEST} - {1540688400 7200 0 EET} - {1553994000 10800 1 EEST} - {1572138000 7200 0 EET} - {1585443600 10800 1 EEST} - {1603587600 7200 0 EET} - {1616893200 10800 1 EEST} - {1635642000 7200 0 EET} - {1648342800 10800 1 EEST} - {1667091600 7200 0 EET} - {1679792400 10800 1 EEST} - {1698541200 7200 0 EET} - {1711846800 10800 1 EEST} - {1729990800 7200 0 EET} - {1743296400 10800 1 EEST} - {1761440400 7200 0 EET} - {1774746000 10800 1 EEST} - {1792890000 7200 0 EET} - {1806195600 10800 1 EEST} - {1824944400 7200 0 EET} - {1837645200 10800 1 EEST} - {1856394000 7200 0 EET} - {1869094800 10800 1 EEST} - {1887843600 7200 0 EET} - {1901149200 10800 1 EEST} - {1919293200 7200 0 EET} - {1932598800 10800 1 EEST} - {1950742800 7200 0 EET} - {1964048400 10800 1 EEST} - {1982797200 7200 0 EET} - {1995498000 10800 1 EEST} - {2014246800 7200 0 EET} - {2026947600 10800 1 EEST} - {2045696400 7200 0 EET} - {2058397200 10800 1 EEST} - {2077146000 7200 0 EET} - {2090451600 10800 1 EEST} - {2108595600 7200 0 EET} - {2121901200 10800 1 EEST} - {2140045200 7200 0 EET} - {2153350800 10800 1 EEST} - {2172099600 7200 0 EET} - {2184800400 10800 1 EEST} - {2203549200 7200 0 EET} - {2216250000 10800 1 EEST} - {2234998800 7200 0 EET} - {2248304400 10800 1 EEST} - {2266448400 7200 0 EET} - {2279754000 10800 1 EEST} - {2297898000 7200 0 EET} - {2311203600 10800 1 EEST} - {2329347600 7200 0 EET} - {2342653200 10800 1 EEST} - {2361402000 7200 0 EET} - {2374102800 10800 1 EEST} - {2392851600 7200 0 EET} - {2405552400 10800 1 EEST} - {2424301200 7200 0 EET} - {2437606800 10800 1 EEST} - {2455750800 7200 0 EET} - {2469056400 10800 1 EEST} - {2487200400 7200 0 EET} - {2500506000 10800 1 EEST} - {2519254800 7200 0 EET} - {2531955600 10800 1 EEST} - {2550704400 7200 0 EET} - {2563405200 10800 1 EEST} - {2582154000 7200 0 EET} - {2595459600 10800 1 EEST} - {2613603600 7200 0 EET} - {2626909200 10800 1 EEST} - {2645053200 7200 0 EET} - {2658358800 10800 1 EEST} - {2676502800 7200 0 EET} - {2689808400 10800 1 EEST} - {2708557200 7200 0 EET} - {2721258000 10800 1 EEST} - {2740006800 7200 0 EET} - {2752707600 10800 1 EEST} - {2771456400 7200 0 EET} - {2784762000 10800 1 EEST} - {2802906000 7200 0 EET} - {2816211600 10800 1 EEST} - {2834355600 7200 0 EET} - {2847661200 10800 1 EEST} - {2866410000 7200 0 EET} - {2879110800 10800 1 EEST} - {2897859600 7200 0 EET} - {2910560400 10800 1 EEST} - {2929309200 7200 0 EET} - {2942010000 10800 1 EEST} - {2960758800 7200 0 EET} - {2974064400 10800 1 EEST} - {2992208400 7200 0 EET} - {3005514000 10800 1 EEST} - {3023658000 7200 0 EET} - {3036963600 10800 1 EEST} - {3055712400 7200 0 EET} - {3068413200 10800 1 EEST} - {3087162000 7200 0 EET} - {3099862800 10800 1 EEST} - {3118611600 7200 0 EET} - {3131917200 10800 1 EEST} - {3150061200 7200 0 EET} - {3163366800 10800 1 EEST} - {3181510800 7200 0 EET} - {3194816400 10800 1 EEST} - {3212960400 7200 0 EET} - {3226266000 10800 1 EEST} - {3245014800 7200 0 EET} - {3257715600 10800 1 EEST} - {3276464400 7200 0 EET} - {3289165200 10800 1 EEST} - {3307914000 7200 0 EET} - {3321219600 10800 1 EEST} - {3339363600 7200 0 EET} - {3352669200 10800 1 EEST} - {3370813200 7200 0 EET} - {3384118800 10800 1 EEST} - {3402867600 7200 0 EET} - {3415568400 10800 1 EEST} - {3434317200 7200 0 EET} - {3447018000 10800 1 EEST} - {3465766800 7200 0 EET} - {3479072400 10800 1 EEST} - {3497216400 7200 0 EET} - {3510522000 10800 1 EEST} - {3528666000 7200 0 EET} - {3541971600 10800 1 EEST} - {3560115600 7200 0 EET} - {3573421200 10800 1 EEST} - {3592170000 7200 0 EET} - {3604870800 10800 1 EEST} - {3623619600 7200 0 EET} - {3636320400 10800 1 EEST} - {3655069200 7200 0 EET} - {3668374800 10800 1 EEST} - {3686518800 7200 0 EET} - {3699824400 10800 1 EEST} - {3717968400 7200 0 EET} - {3731274000 10800 1 EEST} - {3750022800 7200 0 EET} - {3762723600 10800 1 EEST} - {3781472400 7200 0 EET} - {3794173200 10800 1 EEST} - {3812922000 7200 0 EET} - {3825622800 10800 1 EEST} - {3844371600 7200 0 EET} - {3857677200 10800 1 EEST} - {3875821200 7200 0 EET} - {3889126800 10800 1 EEST} - {3907270800 7200 0 EET} - {3920576400 10800 1 EEST} - {3939325200 7200 0 EET} - {3952026000 10800 1 EEST} - {3970774800 7200 0 EET} - {3983475600 10800 1 EEST} - {4002224400 7200 0 EET} - {4015530000 10800 1 EEST} - {4033674000 7200 0 EET} - {4046979600 10800 1 EEST} - {4065123600 7200 0 EET} - {4078429200 10800 1 EEST} - {4096573200 7200 0 EET} +if {![info exists TZData(Europe/Kyiv)]} { + LoadTimeZoneFile Europe/Kyiv } +set TZData(:Europe/Zaporozhye) $TZData(:Europe/Kyiv) -- cgit v0.12 From 3636d805fcf6da495f444297a7159347ff1ed3a0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 26 Sep 2022 15:51:20 +0000 Subject: Make Tcl_SaveResult() and friends _really_ deprecated, so make gcc/clang warn when it's used --- generic/tcl.decls | 6 +++--- generic/tclDecls.h | 25 ++++++++++++++++++------- generic/tclTest.c | 9 +++++++++ 3 files changed, 30 insertions(+), 10 deletions(-) diff --git a/generic/tcl.decls b/generic/tcl.decls index aab5cb5..3b00f4a 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -1043,7 +1043,7 @@ declare 288 { declare 289 { void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc, void *clientData) } -declare 290 { +declare 290 {deprecated {Use Tcl_DiscardInterpState}} { void Tcl_DiscardResult(Tcl_SavedResult *statePtr) } declare 291 { @@ -1126,10 +1126,10 @@ declare 313 { int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, int appendFlag) } -declare 314 { +declare 314 {deprecated {Use Tcl_RestoreInterpState}} { void Tcl_RestoreResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr) } -declare 315 { +declare 315 {deprecated {Use Tcl_SaveInterpState}} { void Tcl_SaveResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr) } declare 316 { diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 562ea1a..ea5c187 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -900,7 +900,8 @@ EXTERN void Tcl_CreateThreadExitHandler(Tcl_ExitProc *proc, EXTERN void Tcl_DeleteThreadExitHandler(Tcl_ExitProc *proc, void *clientData); /* 290 */ -EXTERN void Tcl_DiscardResult(Tcl_SavedResult *statePtr); +TCL_DEPRECATED("Use Tcl_DiscardInterpState") +void Tcl_DiscardResult(Tcl_SavedResult *statePtr); /* 291 */ EXTERN int Tcl_EvalEx(Tcl_Interp *interp, const char *script, int numBytes, int flags); @@ -965,10 +966,12 @@ EXTERN int Tcl_NumUtfChars(const char *src, int length); EXTERN int Tcl_ReadChars(Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, int appendFlag); /* 314 */ -EXTERN void Tcl_RestoreResult(Tcl_Interp *interp, +TCL_DEPRECATED("Use Tcl_RestoreInterpState") +void Tcl_RestoreResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 315 */ -EXTERN void Tcl_SaveResult(Tcl_Interp *interp, +TCL_DEPRECATED("Use Tcl_SaveInterpState") +void Tcl_SaveResult(Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 316 */ EXTERN int Tcl_SetSystemEncoding(Tcl_Interp *interp, @@ -2327,7 +2330,7 @@ typedef struct TclStubs { Tcl_Encoding (*tcl_CreateEncoding) (const Tcl_EncodingType *typePtr); /* 287 */ void (*tcl_CreateThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 288 */ void (*tcl_DeleteThreadExitHandler) (Tcl_ExitProc *proc, void *clientData); /* 289 */ - void (*tcl_DiscardResult) (Tcl_SavedResult *statePtr); /* 290 */ + TCL_DEPRECATED_API("Use Tcl_DiscardInterpState") void (*tcl_DiscardResult) (Tcl_SavedResult *statePtr); /* 290 */ int (*tcl_EvalEx) (Tcl_Interp *interp, const char *script, int numBytes, int flags); /* 291 */ int (*tcl_EvalObjv) (Tcl_Interp *interp, int objc, Tcl_Obj *const objv[], int flags); /* 292 */ int (*tcl_EvalObjEx) (Tcl_Interp *interp, Tcl_Obj *objPtr, int flags); /* 293 */ @@ -2351,8 +2354,8 @@ typedef struct TclStubs { void (*tcl_ConditionWait) (Tcl_Condition *condPtr, Tcl_Mutex *mutexPtr, const Tcl_Time *timePtr); /* 311 */ int (*tcl_NumUtfChars) (const char *src, int length); /* 312 */ int (*tcl_ReadChars) (Tcl_Channel channel, Tcl_Obj *objPtr, int charsToRead, int appendFlag); /* 313 */ - void (*tcl_RestoreResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 314 */ - void (*tcl_SaveResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 315 */ + TCL_DEPRECATED_API("Use Tcl_RestoreInterpState") void (*tcl_RestoreResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 314 */ + TCL_DEPRECATED_API("Use Tcl_SaveInterpState") void (*tcl_SaveResult) (Tcl_Interp *interp, Tcl_SavedResult *statePtr); /* 315 */ int (*tcl_SetSystemEncoding) (Tcl_Interp *interp, const char *name); /* 316 */ Tcl_Obj * (*tcl_SetVar2Ex) (Tcl_Interp *interp, const char *part1, const char *part2, Tcl_Obj *newValuePtr, int flags); /* 317 */ void (*tcl_ThreadAlert) (Tcl_ThreadId threadId); /* 318 */ @@ -4228,22 +4231,30 @@ extern const TclStubs *tclStubsPtr; #define Tcl_GlobalEval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, TCL_EVAL_GLOBAL) #undef Tcl_SaveResult +inline TCL_DEPRECATED_API("Use Tcl_SaveInterpState") void Tcl_SaveResult_(void) {} #define Tcl_SaveResult(interp, statePtr) \ do { \ + Tcl_SaveResult_(); \ (statePtr)->objResultPtr = Tcl_GetObjResult(interp); \ Tcl_IncrRefCount((statePtr)->objResultPtr); \ Tcl_SetObjResult(interp, Tcl_NewObj()); \ } while(0) #undef Tcl_RestoreResult +inline TCL_DEPRECATED_API("Use Tcl_RestoreInterpState") void Tcl_RestoreResult_(void) {} #define Tcl_RestoreResult(interp, statePtr) \ do { \ + Tcl_RestoreResult_(); \ Tcl_ResetResult(interp); \ Tcl_SetObjResult(interp, (statePtr)->objResultPtr); \ Tcl_DecrRefCount((statePtr)->objResultPtr); \ } while(0) #undef Tcl_DiscardResult +inline TCL_DEPRECATED_API("Use Tcl_DiscardInterpState") void Tcl_DiscardResult_(void) {} #define Tcl_DiscardResult(statePtr) \ - Tcl_DecrRefCount((statePtr)->objResultPtr) + do { \ + Tcl_DiscardResult_(); \ + Tcl_DecrRefCount((statePtr)->objResultPtr); \ + } while(0) #undef Tcl_SetResult #define Tcl_SetResult(interp, result, freeProc) \ do { \ diff --git a/generic/tclTest.c b/generic/tclTest.c index dcd86db..354ea9c 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -176,6 +176,15 @@ typedef struct TestChannel { static TestChannel *firstDetached; +#ifdef __GNUC__ +/* + * The rest of this file shouldn't warn about deprecated functions; they're + * there because we intend them to be so and know that this file is OK to + * touch those fields. + */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + /* * Forward declarations for procedures defined later in this file: */ -- cgit v0.12 From f7d30cbf993a21d1a461c806ded05e3d3fd6ea50 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 27 Sep 2022 03:17:28 +0000 Subject: Add lseq to list command cross references --- doc/interp.n | 16 ++++++++-------- doc/lappend.n | 2 +- doc/lassign.n | 2 +- doc/ledit.n | 2 +- doc/lindex.n | 2 +- doc/linsert.n | 2 +- doc/list.n | 2 +- doc/llength.n | 2 +- doc/lmap.n | 2 +- doc/lpop.n | 2 +- doc/lrange.n | 2 +- doc/lremove.n | 2 +- doc/lrepeat.n | 2 +- doc/lreplace.n | 2 +- doc/lreverse.n | 2 +- doc/lsearch.n | 2 +- doc/lseq.n | 4 ++-- doc/lset.n | 2 +- doc/lsort.n | 2 +- 19 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/interp.n b/doc/interp.n index b3cc918..08bed1c 100644 --- a/doc/interp.n +++ b/doc/interp.n @@ -593,14 +593,14 @@ built-in commands: \fBinfo\fR \fBinterp\fR \fBjoin\fR \fBlappend\fR \fBlassign\fR \fBledit\fR \fBlindex\fR \fBlinsert\fR \fBlist\fR \fBllength\fR \fBlrange\fR \fBlrepeat\fR -\fBlreplace\fR \fBlsearch\fR \fBlset\fR \fBlsort\fR -\fBnamespace\fR \fBpackage\fR \fBpid\fR \fBproc\fR -\fBputs\fR \fBread\fR \fBregexp\fR \fBregsub\fR -\fBrename\fR \fBreturn\fR \fBscan\fR \fBseek\fR -\fBset\fR \fBsplit\fR \fBstring\fR \fBsubst\fR -\fBswitch\fR \fBtell\fR \fBtime\fR \fBtrace\fR -\fBunset\fR \fBupdate\fR \fBuplevel\fR \fBupvar\fR -\fBvariable\fR \fBvwait\fR \fBwhile\fR +\fBlreplace\fR \fBlsearch\fR \fBlseq\fR \fBlset\fR +\fBlsort\fR \fBnamespace\fR \fBpackage\fR \fBpid\fR +\fBproc\fR \fBputs\fR \fBread\fR \fBregexp\fR +\fBregsub\fR \fBrename\fR \fBreturn\fR \fBscan\fR +\fBseek\fR \fBset\fR \fBsplit\fR \fBstring\fR +\fBsubst\fR \fBswitch\fR \fBtell\fR \fBtime\fR +\fBtrace\fR \fBunset\fR \fBupdate\fR \fBuplevel\fR +\fBupvar\fR \fBvariable\fR \fBvwait\fR \fBwhile\fR .DE The following commands are hidden by \fBinterp create\fR when it creates a safe interpreter: diff --git a/doc/lappend.n b/doc/lappend.n index 3ddb36c..3fbda79 100644 --- a/doc/lappend.n +++ b/doc/lappend.n @@ -51,7 +51,7 @@ Using \fBlappend\fR to build up a list of numbers. .SH "SEE ALSO" list(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS append, element, list, variable .\" Local variables: diff --git a/doc/lassign.n b/doc/lassign.n index ac53322..d23509a 100644 --- a/doc/lassign.n +++ b/doc/lassign.n @@ -54,7 +54,7 @@ set ::argv [\fBlassign\fR $::argv argumentToReadOff] .SH "SEE ALSO" list(n), lappend(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS assign, element, list, multiple, set, variable '\"Local Variables: diff --git a/doc/ledit.n b/doc/ledit.n index f7704ed..48e6da5 100644 --- a/doc/ledit.n +++ b/doc/ledit.n @@ -81,7 +81,7 @@ a b x y z g h i .SH "SEE ALSO" list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, list, replace diff --git a/doc/lindex.n b/doc/lindex.n index 0ba30a4..d4d845d 100644 --- a/doc/lindex.n +++ b/doc/lindex.n @@ -117,7 +117,7 @@ set idx 3 .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, index, list diff --git a/doc/linsert.n b/doc/linsert.n index 685b563..014f9cd 100644 --- a/doc/linsert.n +++ b/doc/linsert.n @@ -47,7 +47,7 @@ set newerList [\fBlinsert\fR [\fBlinsert\fR $oldList end-1 quick] 1 lazy] .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, insert, list diff --git a/doc/list.n b/doc/list.n index 1792560..08a6fe7 100644 --- a/doc/list.n +++ b/doc/list.n @@ -48,7 +48,7 @@ while \fBconcat\fR with the same arguments will return .SH "SEE ALSO" lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS element, list, quoting '\"Local Variables: diff --git a/doc/llength.n b/doc/llength.n index 7a3e6de..574834f 100644 --- a/doc/llength.n +++ b/doc/llength.n @@ -51,7 +51,7 @@ An empty list is not necessarily an empty string: .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS element, list, length '\" Local Variables: diff --git a/doc/lmap.n b/doc/lmap.n index 29b1242..36a0c7c 100644 --- a/doc/lmap.n +++ b/doc/lmap.n @@ -80,7 +80,7 @@ set prefix [\fBlmap\fR x $values {expr { break(n), continue(n), for(n), foreach(n), while(n), list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS foreach, iteration, list, loop, map '\" Local Variables: diff --git a/doc/lpop.n b/doc/lpop.n index 0a156ee..2a464eb 100644 --- a/doc/lpop.n +++ b/doc/lpop.n @@ -88,7 +88,7 @@ The indicated value becomes the new value of \fIx\fR. .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, index, list, remove, pop, stack, queue diff --git a/doc/lrange.n b/doc/lrange.n index c0434bb..38c4abf 100644 --- a/doc/lrange.n +++ b/doc/lrange.n @@ -73,7 +73,7 @@ elements to .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, list, range, sublist diff --git a/doc/lremove.n b/doc/lremove.n index e71f607..8763ea6 100644 --- a/doc/lremove.n +++ b/doc/lremove.n @@ -48,7 +48,7 @@ a b d e .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS element, list, remove .\" Local variables: diff --git a/doc/lrepeat.n b/doc/lrepeat.n index de7ba54..cd672db 100644 --- a/doc/lrepeat.n +++ b/doc/lrepeat.n @@ -34,7 +34,7 @@ is identical to \fBlist element ...\fR. .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n), -lreverse(n), lsearch(n), lset(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS element, index, list '\" Local Variables: diff --git a/doc/lreplace.n b/doc/lreplace.n index 6694ad7..47d33f9 100644 --- a/doc/lreplace.n +++ b/doc/lreplace.n @@ -97,7 +97,7 @@ a b c d e f g h i .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), -lreverse(n), lsearch(n), lset(n), lsort(n), +lreverse(n), lsearch(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS element, list, replace diff --git a/doc/lreverse.n b/doc/lreverse.n index 0f0b6d6..bb0703d 100644 --- a/doc/lreverse.n +++ b/doc/lreverse.n @@ -27,7 +27,7 @@ input list, \fIlist\fR, except with the elements in the reverse order. .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lsearch(n), lset(n), lsort(n) +lsearch(n), lseq(n), lset(n), lsort(n) .SH KEYWORDS element, list, reverse '\" Local Variables: diff --git a/doc/lsearch.n b/doc/lsearch.n index 85b8609..dc6d1f7 100644 --- a/doc/lsearch.n +++ b/doc/lsearch.n @@ -231,7 +231,7 @@ The same thing for a flattened list: foreach(n), list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lset(n), lsort(n), +lreverse(n), lseq(n), lset(n), lsort(n), string(n) .SH KEYWORDS binary search, linear search, diff --git a/doc/lseq.n b/doc/lseq.n index 5c7d03b..df8a8bc 100644 --- a/doc/lseq.n +++ b/doc/lseq.n @@ -81,8 +81,8 @@ must be numeric; a non-numeric string will result in an error. .\" .CE .SH "SEE ALSO" -foreach(n), list(n), lappend(n), lassign(n), lindex(n), linsert(n), llength(n), -lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n), +foreach(n), list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), +llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lreplace(n), lreverse(n), lsearch(n), lset(n), lsort(n) .SH KEYWORDS element, index, list diff --git a/doc/lset.n b/doc/lset.n index 588a0a5..e2e1590 100644 --- a/doc/lset.n +++ b/doc/lset.n @@ -138,7 +138,7 @@ The indicated return value also becomes the new value of \fIx\fR. .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lsort(n) +lreverse(n), lsearch(n), lseq(n), lsort(n) string(n) .SH KEYWORDS element, index, list, replace, set diff --git a/doc/lsort.n b/doc/lsort.n index ddf9ed1..1695ea8 100644 --- a/doc/lsort.n +++ b/doc/lsort.n @@ -266,7 +266,7 @@ More complex sorting using a comparison function: .SH "SEE ALSO" list(n), lappend(n), lassign(n), ledit(n), lindex(n), linsert(n), llength(n), lmap(n), lpop(n), lrange(n), lremove(n), lrepeat(n), lreplace(n), -lreverse(n), lsearch(n), lset(n) +lreverse(n), lsearch(n), lseq(n), lset(n) .SH KEYWORDS element, list, order, sort '\" Local Variables: -- cgit v0.12 From a0ee4e463ed283418dc94c826f9b65933fe5ba7d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 27 Sep 2022 08:52:31 +0000 Subject: Since 'inline' doesn't seem to work, use MODULE_SCOPE --- generic/tclDecls.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclDecls.h b/generic/tclDecls.h index ea5c187..5d6e184 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -4231,7 +4231,7 @@ extern const TclStubs *tclStubsPtr; #define Tcl_GlobalEval(interp, objPtr) \ Tcl_EvalEx(interp, objPtr, TCL_INDEX_NONE, TCL_EVAL_GLOBAL) #undef Tcl_SaveResult -inline TCL_DEPRECATED_API("Use Tcl_SaveInterpState") void Tcl_SaveResult_(void) {} +MODULE_SCOPE TCL_DEPRECATED_API("Use Tcl_SaveInterpState") void Tcl_SaveResult_(void) {} #define Tcl_SaveResult(interp, statePtr) \ do { \ Tcl_SaveResult_(); \ @@ -4240,7 +4240,7 @@ inline TCL_DEPRECATED_API("Use Tcl_SaveInterpState") void Tcl_SaveResult_(void) Tcl_SetObjResult(interp, Tcl_NewObj()); \ } while(0) #undef Tcl_RestoreResult -inline TCL_DEPRECATED_API("Use Tcl_RestoreInterpState") void Tcl_RestoreResult_(void) {} +MODULE_SCOPE TCL_DEPRECATED_API("Use Tcl_RestoreInterpState") void Tcl_RestoreResult_(void) {} #define Tcl_RestoreResult(interp, statePtr) \ do { \ Tcl_RestoreResult_(); \ @@ -4249,7 +4249,7 @@ inline TCL_DEPRECATED_API("Use Tcl_RestoreInterpState") void Tcl_RestoreResult_( Tcl_DecrRefCount((statePtr)->objResultPtr); \ } while(0) #undef Tcl_DiscardResult -inline TCL_DEPRECATED_API("Use Tcl_DiscardInterpState") void Tcl_DiscardResult_(void) {} +MODULE_SCOPE TCL_DEPRECATED_API("Use Tcl_DiscardInterpState") void Tcl_DiscardResult_(void) {} #define Tcl_DiscardResult(statePtr) \ do { \ Tcl_DiscardResult_(); \ -- cgit v0.12