diff options
author | suresh <suresh@noemail.net> | 1998-05-20 17:33:52 (GMT) |
---|---|---|
committer | suresh <suresh@noemail.net> | 1998-05-20 17:33:52 (GMT) |
commit | 7391f78ed39f96795d6da6c404493084561697e5 (patch) | |
tree | 31abc26120e28686d8f641466ec9818908378c4b /unix/tclUnixFile.c | |
parent | 33b6eec8d8c57439f61def0bcc6db93fd9f9e93e (diff) | |
download | tcl-7391f78ed39f96795d6da6c404493084561697e5.zip tcl-7391f78ed39f96795d6da6c404493084561697e5.tar.gz tcl-7391f78ed39f96795d6da6c404493084561697e5.tar.bz2 |
Changed call ref's of 'stat(...)' to 'TclStat(...)' and 'access(...)' to
'TclAccess(...)'.
FossilOrigin-Name: 8b6899e9e320f5ee3fa0253e7f8728e57d988ec3
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r-- | unix/tclUnixFile.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index eb11006..7f9644b 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -278,8 +278,8 @@ Tcl_FindExecutable(argv0) } } Tcl_DStringAppend(&buffer, argv0, -1); - if ((access(Tcl_DStringValue(&buffer), X_OK) == 0) - && (stat(Tcl_DStringValue(&buffer), &statBuf) == 0) + if ((TclAccess(Tcl_DStringValue(&buffer), X_OK) == 0) + && (TclStat(Tcl_DStringValue(&buffer), &statBuf) == 0) && S_ISREG(statBuf.st_mode)) { name = Tcl_DStringValue(&buffer); goto gotName; @@ -425,7 +425,7 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail) } else { dirName = dirPtr->string; } - if ((stat(dirName, &statBuf) != 0) || !S_ISDIR(statBuf.st_mode)) { + if ((TclStat(dirName, &statBuf) != 0) || !S_ISDIR(statBuf.st_mode)) { return TCL_OK; } @@ -511,7 +511,7 @@ TclMatchFiles(interp, separators, dirPtr, pattern, tail) Tcl_DStringAppend(dirPtr, entryPtr->d_name, -1); if (tail == NULL) { Tcl_AppendElement(interp, dirPtr->string); - } else if ((stat(dirPtr->string, &statBuf) == 0) + } else if ((TclStat(dirPtr->string, &statBuf) == 0) && S_ISDIR(statBuf.st_mode)) { Tcl_DStringAppend(dirPtr, "/", 1); result = TclDoGlob(interp, separators, dirPtr, tail); |