diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-13 20:33:58 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-09-13 20:33:58 (GMT) |
commit | c5943ec574403a010f3065a6d8fdb6d590e68de4 (patch) | |
tree | 7bea997dbc3f729938cb44b5bd2350da28735287 /win/tclWinChan.c | |
parent | f11320b6b0dd2681bef8470d4fcf7c3b7eb6cbbd (diff) | |
download | tcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.zip tcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.tar.gz tcl-c5943ec574403a010f3065a6d8fdb6d590e68de4.tar.bz2 |
Eliminate the use of macro's like LLONG_MAX|MIN, since they assume that Tcl_WideInt equals "long long". Also eliminate uses of Tcl_WideAsLong() and friends, as - often - simple type cases make things more clear.
Diffstat (limited to 'win/tclWinChan.c')
-rw-r--r-- | win/tclWinChan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 8ffb31f..8c47be6 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -554,8 +554,8 @@ FileWideSeekProc( moveMethod = FILE_END; } - newPosHigh = Tcl_WideAsLong(offset >> 32); - newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(offset), + newPosHigh = (LONG)(offset >> 32); + newPos = SetFilePointer(infoPtr->handle, (LONG)offset, &newPosHigh, moveMethod); if (newPos == (LONG) INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); @@ -567,7 +567,7 @@ FileWideSeekProc( } } return (((Tcl_WideInt)((unsigned)newPos)) - | (Tcl_LongAsWide(newPosHigh) << 32)); + | ((Tcl_WideInt)newPosHigh << 32)); } /* @@ -613,8 +613,8 @@ FileTruncateProc( * Move to where we want to truncate */ - newPosHigh = Tcl_WideAsLong(length >> 32); - newPos = SetFilePointer(infoPtr->handle, Tcl_WideAsLong(length), + newPosHigh = (LONG)(length >> 32); + newPos = SetFilePointer(infoPtr->handle, (LONG)length, &newPosHigh, FILE_BEGIN); if (newPos == (LONG) INVALID_SET_FILE_POINTER) { DWORD winError = GetLastError(); |