diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/tclWin32Dll.c | 6 | ||||
-rw-r--r-- | win/tclWinChan.c | 8 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 120 | ||||
-rw-r--r-- | win/tclWinFile.c | 116 | ||||
-rw-r--r-- | win/tclWinInit.c | 4 | ||||
-rw-r--r-- | win/tclWinLoad.c | 6 | ||||
-rw-r--r-- | win/tclWinNotify.c | 8 | ||||
-rw-r--r-- | win/tclWinPipe.c | 31 | ||||
-rw-r--r-- | win/tclWinReg.c | 44 | ||||
-rw-r--r-- | win/tclWinSerial.c | 8 | ||||
-rw-r--r-- | win/tclWinSock.c | 8 | ||||
-rw-r--r-- | win/tclWinTime.c | 8 |
12 files changed, 184 insertions, 183 deletions
diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index ac04198..8b7387f 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWin32Dll.c,v 1.57 2008/08/01 18:22:29 hobbs Exp $ + * RCS: @(#) $Id: tclWin32Dll.c,v 1.58 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -660,7 +660,7 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + if (tclWinProcs->getVolumeNameForVMPProc((TCHAR *) drive, (TCHAR *) Target, 55) != 0) { if (wcscmp((WCHAR *) dlIter->volumeName, Target) == 0) { /* @@ -719,7 +719,7 @@ TclWinDriveLetterForVolMountPoint( * Try to read the volume mount point and see where it points. */ - if ((*tclWinProcs->getVolumeNameForVMPProc)((TCHAR *) drive, + if (tclWinProcs->getVolumeNameForVMPProc((TCHAR *) drive, (TCHAR *) Target, 55) != 0) { int alreadyStored = 0; diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 20f618d..6079887 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinChan.c,v 1.52 2008/10/14 22:43:30 nijtmans Exp $ + * RCS: @(#) $Id: tclWinChan.c,v 1.53 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -915,7 +915,7 @@ TclpOpenFileChannel( flags = FILE_ATTRIBUTE_READONLY; } } else { - flags = (*tclWinProcs->getFileAttributesProc)(nativeName); + flags = tclWinProcs->getFileAttributesProc(nativeName); if (flags == 0xFFFFFFFF) { flags = 0; } @@ -931,8 +931,8 @@ TclpOpenFileChannel( * Now we get to create the file. */ - handle = (*tclWinProcs->createFileProc)(nativeName, accessMode, - shareMode, NULL, createMode, flags, (HANDLE) NULL); + handle = tclWinProcs->createFileProc(nativeName, accessMode, shareMode, + NULL, createMode, flags, (HANDLE) NULL); if (handle == INVALID_HANDLE_VALUE) { DWORD err = GetLastError(); diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 92ef2e9..93ea1bc 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.54 2008/10/05 22:25:35 nijtmans Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.55 2008/10/26 18:43:26 dkf Exp $ */ #include "tclWinInt.h" @@ -201,7 +201,7 @@ DoRenameFile( #ifndef HAVE_NO_SEH __try { - if ((*tclWinProcs->moveFileProc)(nativeSrc, nativeDst) != FALSE) { + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { retval = TCL_OK; } } __except (EXCEPTION_EXECUTE_HANDLER) {} @@ -299,10 +299,10 @@ DoRenameFile( TclWinConvertError(GetLastError()); - srcAttr = (*tclWinProcs->getFileAttributesProc)(nativeSrc); - dstAttr = (*tclWinProcs->getFileAttributesProc)(nativeDst); + srcAttr = tclWinProcs->getFileAttributesProc(nativeSrc); + dstAttr = tclWinProcs->getFileAttributesProc(nativeDst); if (srcAttr == 0xffffffff) { - if ((*tclWinProcs->getFullPathNameProc)(nativeSrc, 0, NULL, + if (tclWinProcs->getFullPathNameProc(nativeSrc, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; return TCL_ERROR; @@ -310,7 +310,7 @@ DoRenameFile( srcAttr = 0; } if (dstAttr == 0xffffffff) { - if ((*tclWinProcs->getFullPathNameProc)(nativeDst, 0, NULL, + if (tclWinProcs->getFullPathNameProc(nativeDst, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; return TCL_ERROR; @@ -333,18 +333,18 @@ DoRenameFile( Tcl_DString srcString, dstString; const char *src, *dst; - size = (*tclWinProcs->getFullPathNameProc)(nativeSrc, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeSrc, MAX_PATH, nativeSrcPath, &nativeSrcRest); if ((size == 0) || (size > MAX_PATH)) { return TCL_ERROR; } - size = (*tclWinProcs->getFullPathNameProc)(nativeDst, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, nativeDstPath, &nativeDstRest); if ((size == 0) || (size > MAX_PATH)) { return TCL_ERROR; } - (*tclWinProcs->charLowerProc)((TCHAR *) nativeSrcPath); - (*tclWinProcs->charLowerProc)((TCHAR *) nativeDstPath); + tclWinProcs->charLowerProc((TCHAR *) nativeSrcPath); + tclWinProcs->charLowerProc((TCHAR *) nativeDstPath); src = Tcl_WinTCharToUtf((TCHAR *) nativeSrcPath, -1, &srcString); dst = Tcl_WinTCharToUtf((TCHAR *) nativeDstPath, -1, &dstString); @@ -426,7 +426,7 @@ DoRenameFile( * directory back, for completeness. */ - if ((*tclWinProcs->moveFileProc)(nativeSrc, + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { return TCL_OK; } @@ -437,8 +437,8 @@ DoRenameFile( */ TclWinConvertError(GetLastError()); - (*tclWinProcs->createDirectoryProc)(nativeDst, NULL); - (*tclWinProcs->setFileAttributesProc)(nativeDst, dstAttr); + tclWinProcs->createDirectoryProc(nativeDst, NULL); + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr); if (Tcl_GetErrno() == EACCES) { /* * Decode the EACCES to a more meaningful error. @@ -467,7 +467,7 @@ DoRenameFile( int result, size; WCHAR tempBuf[MAX_PATH]; - size = (*tclWinProcs->getFullPathNameProc)(nativeDst, MAX_PATH, + size = tclWinProcs->getFullPathNameProc(nativeDst, MAX_PATH, tempBuf, &nativeRest); if ((size == 0) || (size > MAX_PATH) || (nativeRest == NULL)) { return TCL_ERROR; @@ -479,8 +479,8 @@ DoRenameFile( result = TCL_ERROR; nativePrefix = (tclWinProcs->useWide) ? (TCHAR *) L"tclr" : (TCHAR *) "tclr"; - if ((*tclWinProcs->getTempFileNameProc)(nativeTmp, - nativePrefix, 0, tempBuf) != 0) { + if (tclWinProcs->getTempFileNameProc(nativeTmp, nativePrefix, + 0, tempBuf) != 0) { /* * Strictly speaking, need the following DeleteFile and * MoveFile to be joined as an atomic operation so no @@ -489,18 +489,18 @@ DoRenameFile( */ nativeTmp = (TCHAR *) tempBuf; - (*tclWinProcs->deleteFileProc)(nativeTmp); - if ((*tclWinProcs->moveFileProc)(nativeDst, + tclWinProcs->deleteFileProc(nativeTmp); + if (tclWinProcs->moveFileProc(nativeDst, nativeTmp) != FALSE) { - if ((*tclWinProcs->moveFileProc)(nativeSrc, + if (tclWinProcs->moveFileProc(nativeSrc, nativeDst) != FALSE) { - (*tclWinProcs->setFileAttributesProc)(nativeTmp, + tclWinProcs->setFileAttributesProc(nativeTmp, FILE_ATTRIBUTE_NORMAL); - (*tclWinProcs->deleteFileProc)(nativeTmp); + tclWinProcs->deleteFileProc(nativeTmp); return TCL_OK; } else { - (*tclWinProcs->deleteFileProc)(nativeDst); - (*tclWinProcs->moveFileProc)(nativeTmp, nativeDst); + tclWinProcs->deleteFileProc(nativeDst); + tclWinProcs->moveFileProc(nativeTmp, nativeDst); } } @@ -589,7 +589,7 @@ DoCopyFile( #ifndef HAVE_NO_SEH __try { - if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, 0) != FALSE) { + if (tclWinProcs->copyFileProc(nativeSrc, nativeDst, 0) != FALSE) { retval = TCL_OK; } } __except (EXCEPTION_EXECUTE_HANDLER) {} @@ -695,8 +695,8 @@ DoCopyFile( if (Tcl_GetErrno() == EACCES) { DWORD srcAttr, dstAttr; - srcAttr = (*tclWinProcs->getFileAttributesProc)(nativeSrc); - dstAttr = (*tclWinProcs->getFileAttributesProc)(nativeDst); + srcAttr = tclWinProcs->getFileAttributesProc(nativeSrc); + dstAttr = tclWinProcs->getFileAttributesProc(nativeDst); if (srcAttr != 0xffffffff) { if (dstAttr == 0xffffffff) { dstAttr = 0; @@ -712,9 +712,9 @@ DoCopyFile( Tcl_SetErrno(EISDIR); } if (dstAttr & FILE_ATTRIBUTE_READONLY) { - (*tclWinProcs->setFileAttributesProc)(nativeDst, + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr & ~((DWORD)FILE_ATTRIBUTE_READONLY)); - if ((*tclWinProcs->copyFileProc)(nativeSrc, nativeDst, + if (tclWinProcs->copyFileProc(nativeSrc, nativeDst, 0) != FALSE) { return TCL_OK; } @@ -725,7 +725,7 @@ DoCopyFile( */ TclWinConvertError(GetLastError()); - (*tclWinProcs->setFileAttributesProc)(nativeDst, dstAttr); + tclWinProcs->setFileAttributesProc(nativeDst, dstAttr); } } } @@ -780,13 +780,13 @@ TclpDeleteFile( return TCL_ERROR; } - if ((*tclWinProcs->deleteFileProc)(nativePath) != FALSE) { + if (tclWinProcs->deleteFileProc(nativePath) != FALSE) { return TCL_OK; } TclWinConvertError(GetLastError()); if (Tcl_GetErrno() == EACCES) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { @@ -807,21 +807,21 @@ TclpDeleteFile( Tcl_SetErrno(EISDIR); } else if (attr & FILE_ATTRIBUTE_READONLY) { - int res = (*tclWinProcs->setFileAttributesProc)(nativePath, - attr & ~((DWORD)FILE_ATTRIBUTE_READONLY)); + int res = tclWinProcs->setFileAttributesProc(nativePath, + attr & ~((DWORD) FILE_ATTRIBUTE_READONLY)); - if ((res != 0) && ((*tclWinProcs->deleteFileProc)(nativePath) - != FALSE)) { + if ((res != 0) && + (tclWinProcs->deleteFileProc(nativePath) != FALSE)) { return TCL_OK; } TclWinConvertError(GetLastError()); if (res != 0) { - (*tclWinProcs->setFileAttributesProc)(nativePath, attr); + tclWinProcs->setFileAttributesProc(nativePath, attr); } } } } else if (Tcl_GetErrno() == ENOENT) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { /* @@ -880,9 +880,9 @@ static int DoCreateDirectory( const TCHAR *nativePath) /* Pathname of directory to create (native). */ { - DWORD error; - if ((*tclWinProcs->createDirectoryProc)(nativePath, NULL) == 0) { - error = GetLastError(); + if (tclWinProcs->createDirectoryProc(nativePath, NULL) == 0) { + DWORD error = GetLastError(); + TclWinConvertError(error); return TCL_ERROR; } @@ -1049,7 +1049,7 @@ DoRemoveJustDirectory( goto end; } - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { /* @@ -1063,7 +1063,7 @@ DoRemoveJustDirectory( * Ordinary directory. */ - if ((*tclWinProcs->removeDirectoryProc)(nativePath) != FALSE) { + if (tclWinProcs->removeDirectoryProc(nativePath) != FALSE) { return TCL_OK; } } @@ -1071,7 +1071,7 @@ DoRemoveJustDirectory( TclWinConvertError(GetLastError()); if (Tcl_GetErrno() == EACCES) { - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr != 0xffffffff) { if ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { /* @@ -1095,15 +1095,15 @@ DoRemoveJustDirectory( if (attr & FILE_ATTRIBUTE_READONLY) { attr &= ~FILE_ATTRIBUTE_READONLY; - if ((*tclWinProcs->setFileAttributesProc)(nativePath, + if (tclWinProcs->setFileAttributesProc(nativePath, attr) == FALSE) { goto end; } - if ((*tclWinProcs->removeDirectoryProc)(nativePath) != FALSE) { + if (tclWinProcs->removeDirectoryProc(nativePath) != FALSE) { return TCL_OK; } TclWinConvertError(GetLastError()); - (*tclWinProcs->setFileAttributesProc)(nativePath, + tclWinProcs->setFileAttributesProc(nativePath, attr | FILE_ATTRIBUTE_READONLY); } @@ -1253,7 +1253,7 @@ TraverseWinTree( (targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)); oldSourceLen = Tcl_DStringLength(sourcePtr); - sourceAttr = (*tclWinProcs->getFileAttributesProc)(nativeSource); + sourceAttr = tclWinProcs->getFileAttributesProc(nativeSource); if (sourceAttr == 0xffffffff) { nativeErrfile = nativeSource; goto end; @@ -1264,7 +1264,7 @@ TraverseWinTree( * Process the symbolic link */ - return (*traverseProc)(nativeSource, nativeTarget, DOTREE_LINK, + return traverseProc(nativeSource, nativeTarget, DOTREE_LINK, errorPtr); } @@ -1273,7 +1273,7 @@ TraverseWinTree( * Process the regular file */ - return (*traverseProc)(nativeSource, nativeTarget, DOTREE_F, errorPtr); + return traverseProc(nativeSource, nativeTarget, DOTREE_F, errorPtr); } if (tclWinProcs->useWide) { @@ -1284,7 +1284,7 @@ TraverseWinTree( } nativeSource = (TCHAR *) Tcl_DStringValue(sourcePtr); - handle = (*tclWinProcs->findFirstFileProc)(nativeSource, &data); + handle = tclWinProcs->findFirstFileProc(nativeSource, &data); if (handle == INVALID_HANDLE_VALUE) { /* * Can't read directory. @@ -1297,7 +1297,7 @@ TraverseWinTree( nativeSource[oldSourceLen + 1] = '\0'; Tcl_DStringSetLength(sourcePtr, oldSourceLen); - result = (*traverseProc)(nativeSource, nativeTarget, DOTREE_PRED, + result = traverseProc(nativeSource, nativeTarget, DOTREE_PRED, errorPtr); if (result != TCL_OK) { FindClose(handle); @@ -1329,7 +1329,7 @@ TraverseWinTree( } found = 1; - for (; found; found = (*tclWinProcs->findNextFileProc)(handle, &data)) { + for (; found; found = tclWinProcs->findNextFileProc(handle, &data)) { TCHAR *nativeName; int len; @@ -1400,7 +1400,7 @@ TraverseWinTree( * files in that directory. */ - result = (*traverseProc)(Tcl_DStringValue(sourcePtr), + result = traverseProc(Tcl_DStringValue(sourcePtr), (targetPtr == NULL ? NULL : Tcl_DStringValue(targetPtr)), DOTREE_POSTD, errorPtr); } @@ -1455,9 +1455,9 @@ TraversalCopy( break; case DOTREE_PRED: if (DoCreateDirectory(nativeDst) == TCL_OK) { - DWORD attr = (tclWinProcs->getFileAttributesProc)(nativeSrc); + DWORD attr = tclWinProcs->getFileAttributesProc(nativeSrc); - if ((tclWinProcs->setFileAttributesProc)(nativeDst, + if (tclWinProcs->setFileAttributesProc(nativeDst, attr) != FALSE) { return TCL_OK; } @@ -1593,7 +1593,7 @@ GetWinFileAttributes( int attr; nativeName = Tcl_FSGetNativePath(fileName); - result = (*tclWinProcs->getFileAttributesProc)(nativeName); + result = tclWinProcs->getFileAttributesProc(nativeName); if (result == 0xffffffff) { StatError(interp, fileName); @@ -1739,7 +1739,7 @@ ConvertFileNameFormat( tempString = Tcl_GetStringFromObj(tempPath,&tempLen); nativeName = Tcl_WinUtfToTChar(tempString, tempLen, &ds); Tcl_DecrRefCount(tempPath); - handle = (*tclWinProcs->findFirstFileProc)(nativeName, &data); + handle = tclWinProcs->findFirstFileProc(nativeName, &data); if (handle == INVALID_HANDLE_VALUE) { /* * FindFirstFile() doesn't like root directories. We would @@ -1748,7 +1748,7 @@ ConvertFileNameFormat( * root directory */ - attr = (*tclWinProcs->getFileAttributesProc)(nativeName); + attr = tclWinProcs->getFileAttributesProc(nativeName); if ((attr!=0xFFFFFFFF) && (attr & FILE_ATTRIBUTE_DIRECTORY)) { Tcl_DStringFree(&ds); goto simple; @@ -1932,7 +1932,7 @@ SetWinFileAttributes( const TCHAR *nativeName; nativeName = Tcl_FSGetNativePath(fileName); - fileAttributes = (*tclWinProcs->getFileAttributesProc)(nativeName); + fileAttributes = tclWinProcs->getFileAttributesProc(nativeName); if (fileAttributes == 0xffffffff) { StatError(interp, fileName); @@ -1950,7 +1950,7 @@ SetWinFileAttributes( fileAttributes &= ~(attributeArray[objIndex]); } - if (!(*tclWinProcs->setFileAttributesProc)(nativeName, fileAttributes)) { + if (!tclWinProcs->setFileAttributesProc(nativeName, fileAttributes)) { StatError(interp, fileName); return TCL_ERROR; } diff --git a/win/tclWinFile.c b/win/tclWinFile.c index f5f8d5d..bdbad41 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.96 2008/04/05 23:25:15 kennykb Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.97 2008/10/26 18:43:27 dkf Exp $ */ /* #define _WIN32_WINNT 0x0500 */ @@ -232,7 +232,7 @@ WinLink( * Get the full path referenced by the target. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkTargetPath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkTargetPath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -246,7 +246,7 @@ WinLink( * Make sure source file doesn't exist. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkSourcePath); + attr = tclWinProcs->getFileAttributesProc(linkSourcePath); if (attr != 0xffffffff) { Tcl_SetErrno(EEXIST); return -1; @@ -256,7 +256,7 @@ WinLink( * Get the full path referenced by the source file/directory. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkSourcePath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkSourcePath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -270,7 +270,7 @@ WinLink( * Check the target. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkTargetPath); + attr = tclWinProcs->getFileAttributesProc(linkTargetPath); if (attr == 0xffffffff) { /* * The target doesn't exist. @@ -290,7 +290,7 @@ WinLink( } if (linkAction & TCL_CREATE_HARD_LINK) { - if (!(*tclWinProcs->createHardLinkProc)(linkSourcePath, + if (!tclWinProcs->createHardLinkProc(linkSourcePath, linkTargetPath, NULL)) { TclWinConvertError(GetLastError()); return -1; @@ -353,7 +353,7 @@ WinReadLink( * Get the full path referenced by the target. */ - if (!(*tclWinProcs->getFullPathNameProc)(linkSourcePath, MAX_PATH, + if (!tclWinProcs->getFullPathNameProc(linkSourcePath, MAX_PATH, tempFileName, &tempFilePart)) { /* * Invalid file. @@ -367,7 +367,7 @@ WinReadLink( * Make sure source file does exist. */ - attr = (*tclWinProcs->getFileAttributesProc)(linkSourcePath); + attr = tclWinProcs->getFileAttributesProc(linkSourcePath); if (attr == 0xffffffff) { /* * The source doesn't exist. @@ -524,9 +524,9 @@ TclWinSymLinkDelete( memset(reparseBuffer, 0, sizeof(DUMMY_REPARSE_BUFFER)); reparseBuffer->ReparseTag = IO_REPARSE_TAG_MOUNT_POINT; - hFile = (*tclWinProcs->createFileProc)(linkOrigPath, GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkOrigPath, GENERIC_WRITE, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile != INVALID_HANDLE_VALUE) { if (!DeviceIoControl(hFile, FSCTL_DELETE_REPARSE_POINT, reparseBuffer, @@ -540,7 +540,7 @@ TclWinSymLinkDelete( } else { CloseHandle(hFile); if (!linkOnly) { - (*tclWinProcs->removeDirectoryProc)(linkOrigPath); + tclWinProcs->removeDirectoryProc(linkOrigPath); } return 0; } @@ -580,7 +580,7 @@ WinReadLinkDirectory( Tcl_DString ds; const char *copy; - attr = (*tclWinProcs->getFileAttributesProc)(linkDirPath); + attr = tclWinProcs->getFileAttributesProc(linkDirPath); if (!(attr & FILE_ATTRIBUTE_REPARSE_POINT)) { goto invalidError; } @@ -708,9 +708,9 @@ NativeReadReparse( HANDLE hFile; DWORD returnedLength; - hFile = (*tclWinProcs->createFileProc)(linkDirPath, GENERIC_READ, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkDirPath, GENERIC_READ, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile == INVALID_HANDLE_VALUE) { /* @@ -768,7 +768,7 @@ NativeWriteReparse( * Create the directory - it must not already exist. */ - if ((*tclWinProcs->createDirectoryProc)(linkDirPath, NULL) == 0) { + if (tclWinProcs->createDirectoryProc(linkDirPath, NULL) == 0) { /* * Error creating directory. */ @@ -776,9 +776,9 @@ NativeWriteReparse( TclWinConvertError(GetLastError()); return -1; } - hFile = (*tclWinProcs->createFileProc)(linkDirPath, GENERIC_WRITE, 0, - NULL, OPEN_EXISTING, - FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, NULL); + hFile = tclWinProcs->createFileProc(linkDirPath, GENERIC_WRITE, 0, NULL, + OPEN_EXISTING, FILE_FLAG_OPEN_REPARSE_POINT + | FILE_FLAG_BACKUP_SEMANTICS, NULL); if (hFile == INVALID_HANDLE_VALUE) { /* * Error creating directory. @@ -801,7 +801,7 @@ NativeWriteReparse( TclWinConvertError(GetLastError()); CloseHandle(hFile); - (*tclWinProcs->removeDirectoryProc)(linkDirPath); + tclWinProcs->removeDirectoryProc(linkDirPath); return -1; } CloseHandle(hFile); @@ -911,13 +911,14 @@ TclpMatchInDirectory( native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); if (tclWinProcs->getFileAttributesExProc == NULL) { - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if (attr == 0xffffffff) { return TCL_OK; } } else { WIN32_FILE_ATTRIBUTE_DATA data; - if ((*tclWinProcs->getFileAttributesExProc)(native, + + if (tclWinProcs->getFileAttributesExProc(native, GetFileExInfoStandard, &data) != TRUE) { return TCL_OK; } @@ -961,7 +962,7 @@ TclpMatchInDirectory( if (native == NULL) { return TCL_OK; } - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if ((attr == 0xffffffff) || ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0)) { return TCL_OK; @@ -1004,13 +1005,13 @@ TclpMatchInDirectory( native = Tcl_WinUtfToTChar(dirName, -1, &ds); if (tclWinProcs->findFirstFileExProc == NULL || (types == NULL) || (types->type != TCL_GLOB_TYPE_DIR)) { - handle = (*tclWinProcs->findFirstFileProc)(native, &data); + handle = tclWinProcs->findFirstFileProc(native, &data); } else { /* * We can be more efficient, for pure directory requests. */ - handle = (*tclWinProcs->findFirstFileExProc)(native, + handle = tclWinProcs->findFirstFileExProc(native, FindExInfoStandard, &data, FindExSearchLimitToDirectories, NULL, 0); } @@ -1140,7 +1141,7 @@ TclpMatchInDirectory( */ Tcl_DStringFree(&ds); - } while ((*tclWinProcs->findNextFileProc)(handle, &data) == TRUE); + } while (tclWinProcs->findNextFileProc(handle, &data) == TRUE); FindClose(handle); Tcl_DStringFree(&dsOrig); @@ -1438,6 +1439,7 @@ TclpGetUserHome( GetProcAddress(netapiInst, "NetGetDCName"); netUserGetInfoProc = (NETUSERGETINFOPROC *) GetProcAddress(netapiInst, "NetUserGetInfo"); + if ((netUserGetInfoProc != NULL) && (netGetDCNameProc != NULL) && (netApiBufferFreeProc != NULL)) { USER_INFO_1 *uiPtr, **uiPtrPtr = &uiPtr; @@ -1454,7 +1456,7 @@ TclpGetUserHome( if (domain != NULL) { Tcl_DStringInit(&ds); wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds); - badDomain = (netGetDCNameProc)(NULL, wName, + badDomain = netGetDCNameProc(NULL, wName, (LPBYTE *) wDomainPtr); Tcl_DStringFree(&ds); nameLen = domain - name; @@ -1462,7 +1464,7 @@ TclpGetUserHome( if (badDomain == 0) { Tcl_DStringInit(&ds); wName = Tcl_UtfToUniCharDString(name, nameLen, &ds); - if ((netUserGetInfoProc)(wDomain, wName, 1, + if (netUserGetInfoProc(wDomain, wName, 1, (LPBYTE *) uiPtrPtr) == 0) { wHomeDir = uiPtr->usri1_home_dir; if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) { @@ -1479,12 +1481,12 @@ TclpGetUserHome( Tcl_DStringAppend(bufferPtr, "/users/default", -1); } result = Tcl_DStringValue(bufferPtr); - (*netApiBufferFreeProc)((void *) uiPtr); + netApiBufferFreeProc((void *) uiPtr); } Tcl_DStringFree(&ds); } if (wDomain != NULL) { - (*netApiBufferFreeProc)((void *) wDomain); + netApiBufferFreeProc((void *) wDomain); } } FreeLibrary(netapiInst); @@ -1543,7 +1545,7 @@ NativeAccess( { DWORD attr; - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr == 0xffffffff) { /* @@ -1603,11 +1605,11 @@ NativeAccess( int error; /* - * First find out how big the buffer needs to be + * First find out how big the buffer needs to be. */ size = 0; - (*tclWinProcs->getFileSecurityProc)(nativePath, + tclWinProcs->getFileSecurityProc(nativePath, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, 0, 0, &size); @@ -1627,7 +1629,7 @@ NativeAccess( } /* - * Now size contains the size of buffer needed + * Now size contains the size of buffer needed. */ sdPtr = (SECURITY_DESCRIPTOR *) HeapAlloc(GetProcessHeap(), 0, size); @@ -1637,10 +1639,10 @@ NativeAccess( } /* - * Call GetFileSecurity() for real + * Call GetFileSecurity() for real. */ - if (!(*tclWinProcs->getFileSecurityProc)(nativePath, + if (!tclWinProcs->getFileSecurityProc(nativePath, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION, sdPtr, size, &size)) { /* @@ -1655,14 +1657,14 @@ NativeAccess( * thread token. */ - if (!(*tclWinProcs->impersonateSelfProc)(SecurityImpersonation)) { + if (!tclWinProcs->impersonateSelfProc(SecurityImpersonation)) { /* * Unable to perform security impersonation. */ goto accessError; } - if (!(*tclWinProcs->openThreadTokenProc)(GetCurrentThread(), + if (!tclWinProcs->openThreadTokenProc(GetCurrentThread(), TOKEN_DUPLICATE | TOKEN_QUERY, FALSE, &hToken)) { /* * Unable to get current thread's token. @@ -1671,7 +1673,7 @@ NativeAccess( goto accessError; } - (*tclWinProcs->revertToSelfProc)(); + tclWinProcs->revertToSelfProc(); /* * Setup desiredAccess according to the access priveleges we are @@ -1698,7 +1700,7 @@ NativeAccess( * Perform access check using the token. */ - if (!(*tclWinProcs->accessCheckProc)(sdPtr, hToken, desiredAccess, + if (!tclWinProcs->accessCheckProc(sdPtr, hToken, desiredAccess, &genMap, &privSet, &privSetSize, &grantedAccess, &accessYesNo)) { /* @@ -1852,7 +1854,7 @@ TclpObjChdir( result = (chdir(posixPath) == 0 ? 1 : 0); Tcl_DStringFree(&ds); #else /* __CYGWIN__ */ - result = (*tclWinProcs->setCurrentDirectoryProc)(nativePath); + result = tclWinProcs->setCurrentDirectoryProc(nativePath); #endif /* __CYGWIN__ */ if (result == 0) { @@ -1938,7 +1940,7 @@ TclpGetCwd( WCHAR buffer[MAX_PATH]; char *p; - if ((*tclWinProcs->getCurrentDirectoryProc)(MAX_PATH, buffer) == 0) { + if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); if (interp != NULL) { Tcl_AppendResult(interp, "error getting working directory name: ", @@ -2043,7 +2045,7 @@ NativeStat( * simpler routines. */ - fileHandle = (tclWinProcs->createFileProc)(nativePath, GENERIC_READ, + fileHandle = tclWinProcs->createFileProc(nativePath, GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL); @@ -2089,7 +2091,7 @@ NativeStat( WIN32_FILE_ATTRIBUTE_DATA data; - if ((*tclWinProcs->getFileAttributesExProc)(nativePath, + if (tclWinProcs->getFileAttributesExProc(nativePath, GetFileExInfoStandard, &data) != TRUE) { Tcl_SetErrno(ENOENT); return -1; @@ -2111,14 +2113,14 @@ NativeStat( WIN32_FIND_DATAT data; HANDLE handle; - handle = (*tclWinProcs->findFirstFileProc)(nativePath, &data); + handle = tclWinProcs->findFirstFileProc(nativePath, &data); if (handle == INVALID_HANDLE_VALUE) { /* * FindFirstFile() doesn't work on root directories, so call * GetFileAttributes() to see if the specified file exists. */ - attr = (*tclWinProcs->getFileAttributesProc)(nativePath); + attr = tclWinProcs->getFileAttributesProc(nativePath); if (attr == INVALID_FILE_ATTRIBUTES) { Tcl_SetErrno(ENOENT); return -1; @@ -2177,8 +2179,8 @@ NativeDev( TCHAR *nativePart; const char *fullPath; - (*tclWinProcs->getFullPathNameProc)(nativePath, MAX_PATH, - nativeFullPath, &nativePart); + tclWinProcs->getFullPathNameProc(nativePath, MAX_PATH, nativeFullPath, + &nativePart); fullPath = Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds); @@ -2203,8 +2205,8 @@ NativeDev( } nativeVol = Tcl_WinUtfToTChar(fullPath, p - fullPath, &volString); dw = (DWORD) -1; - (*tclWinProcs->getVolumeInformationProc)(nativeVol, NULL, 0, &dw, - NULL, NULL, NULL, 0); + tclWinProcs->getVolumeInformationProc(nativeVol, NULL, 0, &dw, NULL, + NULL, NULL, 0); /* * GetFullPathName() turns special devices like "NUL" into "\\.\NUL", @@ -2349,7 +2351,7 @@ TclpGetNativeCwd( { WCHAR buffer[MAX_PATH]; - if ((*tclWinProcs->getCurrentDirectoryProc)(MAX_PATH, buffer) == 0) { + if (tclWinProcs->getCurrentDirectoryProc(MAX_PATH, buffer) == 0) { TclWinConvertError(GetLastError()); return NULL; } @@ -2729,7 +2731,7 @@ TclpObjNormalizePath( const char *nativePath = Tcl_WinUtfToTChar(path, currentPathEndPosition - path, &ds); - if ((*tclWinProcs->getFileAttributesExProc)(nativePath, + if (tclWinProcs->getFileAttributesExProc(nativePath, GetFileExInfoStandard, &data) != TRUE) { /* * File doesn't exist. @@ -2922,8 +2924,8 @@ TclpObjNormalizePath( WCHAR wpath[MAX_PATH]; const char *nativePath = Tcl_WinUtfToTChar(path, lastValidPathEnd - path, &ds); - DWORD wpathlen = (*tclWinProcs->getLongPathNameProc)( - nativePath, (TCHAR *) wpath, MAX_PATH); + DWORD wpathlen = tclWinProcs->getLongPathNameProc(nativePath, + (TCHAR *) wpath, MAX_PATH); /* * We have to make the drive letter uppercase. @@ -3309,7 +3311,7 @@ TclpUtime( native = (const TCHAR *) Tcl_FSGetNativePath(pathPtr); - attr = (*tclWinProcs->getFileAttributesProc)(native); + attr = tclWinProcs->getFileAttributesProc(native); if (attr != INVALID_FILE_ATTRIBUTES && attr & FILE_ATTRIBUTE_DIRECTORY) { flags = FILE_FLAG_BACKUP_SEMANTICS; @@ -3320,7 +3322,7 @@ TclpUtime( * savings complications that utime gets wrong. */ - fileHandle = (tclWinProcs->createFileProc)(native, FILE_WRITE_ATTRIBUTES, + fileHandle = tclWinProcs->createFileProc(native, FILE_WRITE_ATTRIBUTES, 0, NULL, OPEN_EXISTING, flags, NULL); if (fileHandle == INVALID_HANDLE_VALUE || diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 70170fe..f1e72de 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinInit.c,v 1.79 2008/10/16 22:34:19 nijtmans Exp $ + * RCS: @(#) $Id: tclWinInit.c,v 1.80 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -210,7 +210,7 @@ TclpInitLibraryPath( *encodingPtr = NULL; bytes = Tcl_GetStringFromObj(pathPtr, lengthPtr); - *valuePtr = ckalloc((unsigned int)(*lengthPtr)+1); + *valuePtr = ckalloc((unsigned)(*lengthPtr)+1); memcpy(*valuePtr, bytes, (size_t)(*lengthPtr)+1); Tcl_DecrRefCount(pathPtr); } diff --git a/win/tclWinLoad.c b/win/tclWinLoad.c index 33233bb..7202b24 100644 --- a/win/tclWinLoad.c +++ b/win/tclWinLoad.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinLoad.c,v 1.21 2008/04/27 22:21:36 dkf Exp $ + * RCS: @(#) $Id: tclWinLoad.c,v 1.22 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -57,7 +57,7 @@ TclpDlopen( */ nativeName = Tcl_FSGetNativePath(pathPtr); - handle = (*tclWinProcs->loadLibraryProc)(nativeName); + handle = tclWinProcs->loadLibraryProc(nativeName); if (handle == NULL) { /* * Let the OS loader examine the binary search path for whatever @@ -69,7 +69,7 @@ TclpDlopen( char *fileName = Tcl_GetString(pathPtr); nativeName = Tcl_WinUtfToTChar(fileName, -1, &ds); - handle = (*tclWinProcs->loadLibraryProc)(nativeName); + handle = tclWinProcs->loadLibraryProc(nativeName); Tcl_DStringFree(&ds); } diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c index 436d333..47ad88f 100644 --- a/win/tclWinNotify.c +++ b/win/tclWinNotify.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinNotify.c,v 1.24 2008/07/24 21:54:43 nijtmans Exp $ + * RCS: @(#) $Id: tclWinNotify.c,v 1.25 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -457,7 +457,7 @@ Tcl_WaitForEvent( myTime.usec = timePtr->usec; if (myTime.sec != 0 || myTime.usec != 0) { - (*tclScaleTimeProcPtr) (&myTime, tclTimeClientData); + tclScaleTimeProcPtr(&myTime, tclTimeClientData); } timeout = myTime.sec * 1000 + myTime.usec / 1000; @@ -580,7 +580,7 @@ Tcl_Sleep( * TIP #233: Scale delay from virtual to real-time. */ - (*tclScaleTimeProcPtr) (&vdelay, tclTimeClientData); + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); sleepTime = vdelay.sec * 1000 + vdelay.usec / 1000; for (;;) { @@ -595,7 +595,7 @@ Tcl_Sleep( vdelay.sec = desired.sec - now.sec; vdelay.usec = desired.usec - now.usec; - (*tclScaleTimeProcPtr) (&vdelay, tclTimeClientData); + tclScaleTimeProcPtr(&vdelay, tclTimeClientData); sleepTime = vdelay.sec * 1000 + vdelay.usec / 1000; } } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index c24875f..db484db 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPipe.c,v 1.66 2008/07/21 21:02:20 ferrieux Exp $ + * RCS: @(#) $Id: tclWinPipe.c,v 1.67 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -482,8 +482,8 @@ TempFileName( TCHAR *prefix; prefix = (tclWinProcs->useWide) ? (TCHAR *) L"TCL" : (TCHAR *) "TCL"; - if ((*tclWinProcs->getTempPathProc)(MAX_PATH, name) != 0) { - if ((*tclWinProcs->getTempFileNameProc)((TCHAR *) name, prefix, 0, + if (tclWinProcs->getTempPathProc(MAX_PATH, name) != 0) { + if (tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, name) != 0) { return 1; } @@ -495,8 +495,7 @@ TempFileName( ((char *) name)[0] = '.'; ((char *) name)[1] = '\0'; } - return (*tclWinProcs->getTempFileNameProc)((TCHAR *) name, prefix, 0, - name); + return tclWinProcs->getTempFileNameProc((TCHAR *) name, prefix, 0, name); } /* @@ -608,7 +607,7 @@ TclpOpenFile( flags = 0; if (!(mode & O_CREAT)) { - flags = (*tclWinProcs->getFileAttributesProc)(nativePath); + flags = tclWinProcs->getFileAttributesProc(nativePath); if (flags == 0xFFFFFFFF) { flags = 0; } @@ -624,8 +623,8 @@ TclpOpenFile( * Now we get to create the file. */ - handle = (*tclWinProcs->createFileProc)(nativePath, accessMode, - shareMode, NULL, createMode, flags, NULL); + handle = tclWinProcs->createFileProc(nativePath, accessMode, shareMode, + NULL, createMode, flags, NULL); Tcl_DStringFree(&ds); if (handle == INVALID_HANDLE_VALUE) { @@ -681,7 +680,7 @@ TclpCreateTempFile( return NULL; } - handle = (*tclWinProcs->createFileProc)((TCHAR *) name, + handle = tclWinProcs->createFileProc((TCHAR *) name, GENERIC_READ | GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE, NULL); if (handle == INVALID_HANDLE_VALUE) { @@ -741,7 +740,7 @@ TclpCreateTempFile( TclWinConvertError(GetLastError()); CloseHandle(handle); - (*tclWinProcs->deleteFileProc)((TCHAR *) name); + tclWinProcs->deleteFileProc((TCHAR *) name); return NULL; } @@ -1245,7 +1244,7 @@ TclpCreateProcess( BuildCommandLine(execPath, argc, argv, &cmdLine); - if ((*tclWinProcs->createProcessProc)(NULL, + if (tclWinProcs->createProcessProc(NULL, (TCHAR *) Tcl_DStringValue(&cmdLine), NULL, NULL, TRUE, (DWORD) createFlags, NULL, NULL, &startInfo, &procInfo) == 0) { TclWinConvertError(GetLastError()); @@ -1404,8 +1403,8 @@ ApplicationType( Tcl_DStringAppend(&nameBuf, extensions[i], -1); nativeName = Tcl_WinUtfToTChar(Tcl_DStringValue(&nameBuf), Tcl_DStringLength(&nameBuf), &ds); - found = (*tclWinProcs->searchPathProc)(NULL, nativeName, NULL, - MAX_PATH, nativeFullPath, &rest); + found = tclWinProcs->searchPathProc(NULL, nativeName, NULL, MAX_PATH, + nativeFullPath, &rest); Tcl_DStringFree(&ds); if (found == 0) { continue; @@ -1416,7 +1415,7 @@ ApplicationType( * known type. */ - attr = (*tclWinProcs->getFileAttributesProc)((TCHAR *) nativeFullPath); + attr = tclWinProcs->getFileAttributesProc((TCHAR *) nativeFullPath); if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } @@ -1429,7 +1428,7 @@ ApplicationType( break; } - hFile = (*tclWinProcs->createFileProc)((TCHAR *) nativeFullPath, + hFile = tclWinProcs->createFileProc((TCHAR *) nativeFullPath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -1509,7 +1508,7 @@ ApplicationType( * application name from the arguments. */ - (*tclWinProcs->getShortPathNameProc)((TCHAR *) nativeFullPath, + tclWinProcs->getShortPathNameProc((TCHAR *) nativeFullPath, nativeFullPath, MAX_PATH); strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *) nativeFullPath, -1, &ds)); Tcl_DStringFree(&ds); diff --git a/win/tclWinReg.c b/win/tclWinReg.c index e46eb70..c695b94 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.43 2008/10/14 22:43:30 nijtmans Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.44 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -549,7 +549,7 @@ DeleteValue( valueName = Tcl_GetStringFromObj(valueNameObj, &length); Tcl_WinUtfToTChar(valueName, length, &ds); - result = (*regWinProcs->regDeleteValueProc)(key, Tcl_DStringValue(&ds)); + result = regWinProcs->regDeleteValueProc(key, Tcl_DStringValue(&ds)); Tcl_DStringFree(&ds); if (result != ERROR_SUCCESS) { Tcl_AppendResult(interp, "unable to delete value \"", @@ -726,7 +726,7 @@ GetType( valueName = Tcl_GetStringFromObj(valueNameObj, &length); nativeValue = Tcl_WinUtfToTChar(valueName, length, &ds); - result = (*regWinProcs->regQueryValueExProc)(key, nativeValue, NULL, &type, + result = regWinProcs->regQueryValueExProc(key, nativeValue, NULL, &type, NULL, NULL); Tcl_DStringFree(&ds); RegCloseKey(key); @@ -807,7 +807,7 @@ GetValue( valueName = Tcl_GetStringFromObj(valueNameObj, &nameLen); nativeValue = Tcl_WinUtfToTChar(valueName, nameLen, &buf); - result = (*regWinProcs->regQueryValueExProc)(key, nativeValue, NULL, &type, + result = regWinProcs->regQueryValueExProc(key, nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); while (result == ERROR_MORE_DATA) { /* @@ -818,7 +818,7 @@ GetValue( length *= 2; Tcl_DStringSetLength(&data, (int) length); - result = (*regWinProcs->regQueryValueExProc)(key, (char *) nativeValue, + result = regWinProcs->regQueryValueExProc(key, (char *) nativeValue, NULL, &type, (BYTE *) Tcl_DStringValue(&data), &length); } Tcl_DStringFree(&buf); @@ -929,7 +929,7 @@ GetValueNames( * largest value name plus the terminating null. */ - result = (*regWinProcs->regQueryInfoKeyProc)(key, NULL, NULL, NULL, NULL, + result = regWinProcs->regQueryInfoKeyProc(key, NULL, NULL, NULL, NULL, NULL, NULL, &index, &maxSize, NULL, NULL, NULL); if (result != ERROR_SUCCESS) { Tcl_AppendResult(interp, "unable to query key \"", @@ -961,10 +961,8 @@ GetValueNames( */ size = maxSize; - while ((*regWinProcs->regEnumValueProc)(key, index, - Tcl_DStringValue(&buffer), &size, NULL, NULL, NULL, NULL) - == ERROR_SUCCESS) { - + while (regWinProcs->regEnumValueProc(key,index, Tcl_DStringValue(&buffer), + &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) { if (regWinProcs->useWide) { size *= 2; } @@ -1080,7 +1078,7 @@ OpenSubKey( if (hostName) { hostName = (char *) Tcl_WinUtfToTChar(hostName, -1, &buf); - result = (*regWinProcs->regConnectRegistryProc)(hostName, rootKey, + result = regWinProcs->regConnectRegistryProc(hostName, rootKey, &rootKey); Tcl_DStringFree(&buf); if (result != ERROR_SUCCESS) { @@ -1096,17 +1094,19 @@ OpenSubKey( keyName = (char *) Tcl_WinUtfToTChar(keyName, -1, &buf); if (flags & REG_CREATE) { DWORD create; - result = (*regWinProcs->regCreateKeyExProc)(rootKey, keyName, 0, NULL, + + result = regWinProcs->regCreateKeyExProc(rootKey, keyName, 0, NULL, REG_OPTION_NON_VOLATILE, mode, NULL, keyPtr, &create); } else if (rootKey == HKEY_PERFORMANCE_DATA) { /* * Here we fudge it for this special root key. See MSDN for more info * on HKEY_PERFORMANCE_DATA and the peculiarities surrounding it. */ + *keyPtr = HKEY_PERFORMANCE_DATA; result = ERROR_SUCCESS; } else { - result = (*regWinProcs->regOpenKeyExProc)(rootKey, keyName, 0, mode, + result = regWinProcs->regOpenKeyExProc(rootKey, keyName, 0, mode, keyPtr); } Tcl_DStringFree(&buf); @@ -1238,12 +1238,12 @@ RecursiveDeleteKey( return ERROR_BADKEY; } - result = (*regWinProcs->regOpenKeyExProc)(startKey, keyName, 0, + result = regWinProcs->regOpenKeyExProc(startKey, keyName, 0, KEY_ENUMERATE_SUB_KEYS | DELETE | KEY_QUERY_VALUE, &hKey); if (result != ERROR_SUCCESS) { return result; } - result = (*regWinProcs->regQueryInfoKeyProc)(hKey, NULL, NULL, NULL, NULL, + result = regWinProcs->regQueryInfoKeyProc(hKey, NULL, NULL, NULL, NULL, &maxSize, NULL, NULL, NULL, NULL, NULL, NULL); maxSize++; if (result != ERROR_SUCCESS) { @@ -1260,10 +1260,10 @@ RecursiveDeleteKey( */ size = maxSize; - result=(*regWinProcs->regEnumKeyExProc)(hKey, 0, + result = regWinProcs->regEnumKeyExProc(hKey, 0, Tcl_DStringValue(&subkey), &size, NULL, NULL, NULL, NULL); if (result == ERROR_NO_MORE_ITEMS) { - result = (*regWinProcs->regDeleteKeyProc)(startKey, keyName); + result = regWinProcs->regDeleteKeyProc(startKey, keyName); break; } else if (result == ERROR_SUCCESS) { result = RecursiveDeleteKey(hKey, Tcl_DStringValue(&subkey)); @@ -1333,7 +1333,7 @@ SetValue( } value = ConvertDWORD((DWORD)type, (DWORD)value); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) &value, sizeof(DWORD)); } else if (type == REG_MULTI_SZ) { Tcl_DString data, buf; @@ -1368,7 +1368,7 @@ SetValue( Tcl_WinUtfToTChar(Tcl_DStringValue(&data), Tcl_DStringLength(&data)+1, &buf); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) Tcl_DStringValue(&buf), (DWORD) Tcl_DStringLength(&buf)); Tcl_DStringFree(&data); @@ -1388,7 +1388,7 @@ SetValue( } length = Tcl_DStringLength(&buf) + 1; - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) data, (DWORD) length); Tcl_DStringFree(&buf); } else { @@ -1399,7 +1399,7 @@ SetValue( */ data = Tcl_GetByteArrayFromObj(dataObj, &length); - result = (*regWinProcs->regSetValueExProc)(key, valueName, 0, + result = regWinProcs->regSetValueExProc(key, valueName, 0, (DWORD) type, (BYTE *) data, (DWORD) length); } @@ -1603,7 +1603,7 @@ ConvertDWORD( * Check to see if the low bit is in the first byte. */ - localType = (*((char*)(&order)) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; + localType = (*((char*) &order) == 1) ? REG_DWORD : REG_DWORD_BIG_ENDIAN; return (type != localType) ? SWAPLONG(value) : value; } diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index 9135d25..94d2863 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -11,7 +11,7 @@ * * Serial functionality implemented by Rolf.Schroedter@dlr.de * - * RCS: @(#) $Id: tclWinSerial.c,v 1.38 2008/10/14 22:43:29 nijtmans Exp $ + * RCS: @(#) $Id: tclWinSerial.c,v 1.39 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -1450,8 +1450,8 @@ TclWinSerialReopen( if (CloseHandle(handle) == FALSE) { return INVALID_HANDLE_VALUE; } - handle = (*tclWinProcs->createFileProc)(name, access, 0, 0, - OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); + handle = tclWinProcs->createFileProc(name, access, 0, 0, OPEN_EXISTING, + FILE_FLAG_OVERLAPPED, 0); return handle; } @@ -1685,7 +1685,7 @@ SerialSetOptionProc( return TCL_ERROR; } native = Tcl_WinUtfToTChar(value, -1, &ds); - result = (*tclWinProcs->buildCommDCBProc)(native, &dcb); + result = tclWinProcs->buildCommDCBProc(native, &dcb); Tcl_DStringFree(&ds); if (result == FALSE) { diff --git a/win/tclWinSock.c b/win/tclWinSock.c index ff94767..df04b8e 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinSock.c,v 1.62 2008/02/22 11:50:54 patthoyts Exp $ + * RCS: @(#) $Id: tclWinSock.c,v 1.63 2008/10/26 18:43:27 dkf Exp $ */ #include "tclWinInt.h" @@ -1472,7 +1472,7 @@ TcpAccept( */ if (infoPtr->acceptProc != NULL) { - (infoPtr->acceptProc) (infoPtr->acceptProcData, newInfoPtr->channel, + infoPtr->acceptProc(infoPtr->acceptProcData, newInfoPtr->channel, inet_ntoa(addr.sin_addr), ntohs(addr.sin_port)); } } @@ -2121,7 +2121,7 @@ SocketThread( LPVOID arg) { MSG msg; - ThreadSpecificData *tsdPtr = (ThreadSpecificData *)(arg); + ThreadSpecificData *tsdPtr = (ThreadSpecificData *) arg; /* * Create a dummy window receiving socket events. @@ -2362,7 +2362,7 @@ InitializeHostName( DWORD length = sizeof(wbuf) / sizeof(WCHAR); Tcl_DString ds; - if ((*tclWinProcs->getComputerNameProc)(wbuf, &length) != 0) { + if (tclWinProcs->getComputerNameProc(wbuf, &length) != 0) { /* * Convert string from native to UTF then change to lowercase. */ diff --git a/win/tclWinTime.c b/win/tclWinTime.c index c185c4c..6fa0017 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinTime.c,v 1.34 2008/04/27 22:21:37 dkf Exp $ + * RCS: @(#) $Id: tclWinTime.c,v 1.35 2008/10/26 18:43:27 dkf Exp $ */ #include "tclInt.h" @@ -158,7 +158,7 @@ TclpGetSeconds(void) { Tcl_Time t; - (*tclGetTimeProcPtr) (&t, tclTimeClientData); /* Tcl_GetTime inlined. */ + tclGetTimeProcPtr(&t, tclTimeClientData); /* Tcl_GetTime inlined. */ return t.sec; } @@ -192,7 +192,7 @@ TclpGetClicks(void) Tcl_Time now; /* Current Tcl time */ unsigned long retval; /* Value to return */ - (*tclGetTimeProcPtr) (&now, tclTimeClientData); /* Tcl_GetTime inlined */ + tclGetTimeProcPtr(&now, tclTimeClientData); /* Tcl_GetTime inlined */ retval = (now.sec * 1000000) + now.usec; return retval; @@ -254,7 +254,7 @@ void Tcl_GetTime( Tcl_Time *timePtr) /* Location to store time information. */ { - (*tclGetTimeProcPtr) (timePtr, tclTimeClientData); + tclGetTimeProcPtr(timePtr, tclTimeClientData); } /* |