summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFCmd.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2002-06-28 09:56:53 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2002-06-28 09:56:53 (GMT)
commit162d8a6442e7b0ff9c4e72433af6f403b6c61de8 (patch)
treeb63c3be4e760bb55b6a54bd129b721c82b935145 /unix/tclUnixFCmd.c
parent955c45431fce7b8b9490a2d5ae3132e4f21da0f6 (diff)
downloadtcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.zip
tcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.tar.gz
tcl-162d8a6442e7b0ff9c4e72433af6f403b6c61de8.tar.bz2
Changed all the Tcl_Platform* symbols to TclOS*; they weren't public so their
names were really badly chosen. Also prevented a double-#def.
Diffstat (limited to 'unix/tclUnixFCmd.c')
-rw-r--r--unix/tclUnixFCmd.c28
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;