diff options
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r-- | unix/tclUnixFCmd.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 51e354e..4e8ca21 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.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: tclUnixFCmd.c,v 1.24 2002/06/27 12:27:35 vincentdarley Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.25 2002/06/28 09:56:54 dkf Exp $ * * Portions of this code were derived from NetBSD source code which has * the following copyright notice: @@ -260,7 +260,7 @@ DoRenameFile(src, dst) dirPtr = opendir(dst); /* INTL: Native. */ if (dirPtr != NULL) { while (1) { - dirEntPtr = Tcl_PlatformReaddir(dirPtr); /* INTL: Native. */ + dirEntPtr = TclOSreaddir(dirPtr); /* INTL: Native. */ if (dirEntPtr == NULL) { break; } @@ -344,7 +344,7 @@ DoCopyFile(src, dst) * Have to do a stat() to determine the filetype. */ - if (Tcl_PlatformLStat(src, &srcStatBuf) != 0) { /* INTL: Native. */ + if (TclOSlstat(src, &srcStatBuf) != 0) { /* INTL: Native. */ return TCL_ERROR; } if (S_ISDIR(srcStatBuf.st_mode)) { @@ -357,7 +357,7 @@ DoCopyFile(src, dst) * exists, so we remove it first */ - if (Tcl_PlatformLStat(dst, &dstStatBuf) == 0) { /* INTL: Native. */ + if (TclOSlstat(dst, &dstStatBuf) == 0) { /* INTL: Native. */ if (S_ISDIR(dstStatBuf.st_mode)) { errno = EISDIR; return TCL_ERROR; @@ -438,12 +438,12 @@ CopyFile(src, dst, statBufPtr) char *buffer; /* Data buffer for copy */ size_t nread; - if ((srcFd = Tcl_PlatformOpen(src, O_RDONLY, 0)) < 0) { /* INTL: Native. */ + if ((srcFd = TclOSopen(src, O_RDONLY, 0)) < 0) { /* INTL: Native. */ return TCL_ERROR; } - dstFd = Tcl_PlatformOpen(dst, /* INTL: Native. */ - O_CREAT | O_TRUNC | O_WRONLY, statBufPtr->st_mode); + dstFd = TclOSopen(dst, O_CREAT|O_TRUNC|O_WRONLY, /* INTL: Native. */ + statBufPtr->st_mode); if (dstFd < 0) { close(srcFd); return TCL_ERROR; @@ -718,7 +718,7 @@ DoRemoveDirectory(pathPtr, recursive, errorPtr) Tcl_StatBuf statBuf; int newPerm; - if (Tcl_PlatformStat(path, &statBuf) == 0) { + if (TclOSstat(path, &statBuf) == 0) { oldPerm = (mode_t) (statBuf.st_mode & 0x00007FFF); } @@ -803,7 +803,7 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr) targetLen = 0; /* lint. */ source = Tcl_DStringValue(sourcePtr); - if (Tcl_PlatformLStat(source, &statBuf) != 0) { /* INTL: Native. */ + if (TclOSlstat(source, &statBuf) != 0) { /* INTL: Native. */ errfile = source; goto end; } @@ -838,8 +838,8 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr) Tcl_DStringAppend(targetPtr, "/", 1); targetLen = Tcl_DStringLength(targetPtr); } - - while ((dirEntPtr = Tcl_PlatformReaddir(dirPtr)) != NULL) { /* INTL: Native. */ + + while ((dirEntPtr = TclOSreaddir(dirPtr)) != NULL) { /* INTL: Native. */ if ((strcmp(dirEntPtr->d_name, ".") == 0) || (strcmp(dirEntPtr->d_name, "..") == 0)) { continue; @@ -904,8 +904,8 @@ TraverseUnixTree(traverseProc, sourcePtr, targetPtr, errorPtr) * * TraversalCopy * - * Called from TraverseUnixTree in order to execute a recursive copy of a - * directory. + * Called from TraverseUnixTree in order to execute a recursive copy + * of a directory. * * Results: * Standard Tcl result. @@ -931,7 +931,7 @@ TraversalCopy(srcPtr, dstPtr, statBufPtr, type, errorPtr) switch (type) { case DOTREE_F: if (DoCopyFile(Tcl_DStringValue(srcPtr), - Tcl_DStringValue(dstPtr)) == TCL_OK) { + Tcl_DStringValue(dstPtr)) == TCL_OK) { return TCL_OK; } break; |