diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-31 11:16:20 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-31 11:16:20 (GMT) |
commit | 3eb5ddf1da36ed5c046ee03b2c584c86c8582d22 (patch) | |
tree | 7d98540f02fb6014ed259a9edf03e39e33d23034 | |
parent | feac96c8b3c738ef7cb8e3e89e076aa4f23f13b0 (diff) | |
parent | cc936d0713b9e1b725a3296ecf05ab40139290e6 (diff) | |
download | tcl-3eb5ddf1da36ed5c046ee03b2c584c86c8582d22.zip tcl-3eb5ddf1da36ed5c046ee03b2c584c86c8582d22.tar.gz tcl-3eb5ddf1da36ed5c046ee03b2c584c86c8582d22.tar.bz2 |
Merge 8.7
-rw-r--r-- | generic/tclIO.c | 2 | ||||
-rw-r--r-- | generic/tclTest.c | 38 | ||||
-rw-r--r-- | library/tzdata/Asia/Beirut | 2 | ||||
-rw-r--r-- | win/tclWinChan.c | 12 | ||||
-rw-r--r-- | win/tclWinInt.h | 2 |
5 files changed, 28 insertions, 28 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c index fd3c331..bfe0aaf 100644 --- a/generic/tclIO.c +++ b/generic/tclIO.c @@ -4432,7 +4432,7 @@ Write( ) { encodingError = 1; result = TCL_OK; - } + } bufPtr->nextAdded += dstWrote; src += srcRead; diff --git a/generic/tclTest.c b/generic/tclTest.c index ef908a1..e42d5e6 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -2029,6 +2029,22 @@ static int UtfExtWrapper( int flags; Tcl_Obj **flagObjs; int nflags; + static const struct { + const char *flagKey; + int flag; + } flagMap[] = { + {"start", TCL_ENCODING_START}, + {"end", TCL_ENCODING_END}, + {"stoponerror", TCL_ENCODING_STOPONERROR}, + {"noterminate", TCL_ENCODING_NO_TERMINATE}, + {"charlimit", TCL_ENCODING_CHAR_LIMIT}, + {"profiletcl8", TCL_ENCODING_PROFILE_TCL8}, + {"profilestrict", TCL_ENCODING_PROFILE_STRICT}, + {"profilereplace", TCL_ENCODING_PROFILE_REPLACE}, + {NULL, 0} + }; + int i; + Tcl_WideInt wide; if (objc < 7 || objc > 10) { Tcl_WrongNumArgs(interp, @@ -2047,21 +2063,6 @@ static int UtfExtWrapper( return TCL_ERROR; } - struct { - const char *flagKey; - int flag; - } flagMap[] = { - {"start", TCL_ENCODING_START}, - {"end", TCL_ENCODING_END}, - {"stoponerror", TCL_ENCODING_STOPONERROR}, - {"noterminate", TCL_ENCODING_NO_TERMINATE}, - {"charlimit", TCL_ENCODING_CHAR_LIMIT}, - {"profiletcl8", TCL_ENCODING_PROFILE_TCL8}, - {"profilestrict", TCL_ENCODING_PROFILE_STRICT}, - {"profilereplace", TCL_ENCODING_PROFILE_REPLACE}, - {NULL, 0} - }; - int i; for (i = 0; i < nflags; ++i) { int flag; if (Tcl_GetIntFromObj(NULL, flagObjs[i], &flag) == TCL_OK) { @@ -2082,7 +2083,6 @@ static int UtfExtWrapper( } /* Assumes state is integer if not "" */ - Tcl_WideInt wide; if (Tcl_GetWideIntFromObj(interp, objv[5], &wide) == TCL_OK) { encState = (Tcl_EncodingState)(size_t)wide; encStatePtr = &encState; @@ -2262,7 +2262,7 @@ TestencodingObjCmd( Tcl_WrongNumArgs(interp, 2, objv, "name toutfcmd fromutfcmd"); return TCL_ERROR; } - encodingPtr = (TclEncoding*)Tcl_Alloc(sizeof(TclEncoding)); + encodingPtr = (TclEncoding *)Tcl_Alloc(sizeof(TclEncoding)); encodingPtr->interp = interp; string = Tcl_GetStringFromObj(objv[3], &length); @@ -8265,7 +8265,7 @@ InterpCmdResolver( Tcl_Interp *interp, const char *name, TCL_UNUSED(Tcl_Namespace *), - TCL_UNUSED(int) /*flags*/, + TCL_UNUSED(int) /* flags */, Tcl_Command *rPtr) { Interp *iPtr = (Interp *) interp; @@ -8450,7 +8450,7 @@ static int InterpCompiledVarResolver( TCL_UNUSED(Tcl_Interp *), const char *name, - TCL_UNUSED(Tcl_Size) /*length*/, + TCL_UNUSED(Tcl_Size) /* length */, TCL_UNUSED(Tcl_Namespace *), Tcl_ResolvedVarInfo **rPtr) { diff --git a/library/tzdata/Asia/Beirut b/library/tzdata/Asia/Beirut index a01a53a..ac0a64e 100644 --- a/library/tzdata/Asia/Beirut +++ b/library/tzdata/Asia/Beirut @@ -113,7 +113,7 @@ set TZData(:Asia/Beirut) { {1635627600 7200 0 EET} {1648332000 10800 1 EEST} {1667077200 7200 0 EET} - {1682028000 10800 1 EEST} + {1679781600 10800 1 EEST} {1698526800 7200 0 EET} {1711836000 10800 1 EEST} {1729976400 7200 0 EET} diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 888dae8..7d1f849 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -95,6 +95,8 @@ static int FileTruncateProc(void *instanceData, long long length); static DWORD FileGetType(HANDLE handle); static int NativeIsComPort(const WCHAR *nativeName); +static Tcl_Channel OpenFileChannel(HANDLE handle, char *channelName, + int permissions, int appendMode); /* * This structure describes the channel type structure for file based IO. @@ -948,7 +950,7 @@ TclpOpenFileChannel( case FILE_TYPE_CHAR: case FILE_TYPE_DISK: case FILE_TYPE_UNKNOWN: - channel = TclWinOpenFileChannel(handle, channelName, + channel = OpenFileChannel(handle, channelName, channelPermissions, TEST_FLAG(mode, O_APPEND) ? FILE_APPEND : 0); break; @@ -1026,7 +1028,7 @@ Tcl_MakeFileChannel( case FILE_TYPE_DISK: case FILE_TYPE_CHAR: - channel = TclWinOpenFileChannel(handle, channelName, mode, 0); + channel = OpenFileChannel(handle, channelName, mode, 0); break; case FILE_TYPE_UNKNOWN: @@ -1160,7 +1162,7 @@ Tcl_MakeFileChannel( * is valid to something. */ - channel = TclWinOpenFileChannel(handle, channelName, mode, 0); + channel = OpenFileChannel(handle, channelName, mode, 0); } return channel; @@ -1248,7 +1250,7 @@ TclpGetDefaultStdChannel( /* *---------------------------------------------------------------------- * - * TclWinOpenFileChannel -- + * OpenFileChannel -- * * Constructs a File channel for the specified standard OS handle. This * is a helper function to break up the construction of channels into @@ -1265,7 +1267,7 @@ TclpGetDefaultStdChannel( */ Tcl_Channel -TclWinOpenFileChannel( +OpenFileChannel( HANDLE handle, /* Win32 HANDLE to swallow */ char *channelName, /* Buffer to receive channel name */ int permissions, /* OR'ed combination of TCL_READABLE, diff --git a/win/tclWinInt.h b/win/tclWinInt.h index d3d6680..1267f3f 100644 --- a/win/tclWinInt.h +++ b/win/tclWinInt.h @@ -43,8 +43,6 @@ MODULE_SCOPE void TclWinInit(HINSTANCE hInst); MODULE_SCOPE TclFile TclWinMakeFile(HANDLE handle); MODULE_SCOPE Tcl_Channel TclWinOpenConsoleChannel(HANDLE handle, char *channelName, int permissions); -MODULE_SCOPE Tcl_Channel TclWinOpenFileChannel(HANDLE handle, char *channelName, - int permissions, int appendMode); MODULE_SCOPE Tcl_Channel TclWinOpenSerialChannel(HANDLE handle, char *channelName, int permissions); MODULE_SCOPE HANDLE TclWinSerialOpen(HANDLE handle, const WCHAR *name, |