[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/windows-NT ChangeLog filesubr.c
From: |
Mark D. Baushke |
Subject: |
[Cvs-cvs] ccvs/windows-NT ChangeLog filesubr.c |
Date: |
Sun, 14 May 2006 09:40:42 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Mark D. Baushke <address@hidden> 06/05/14 09:40:42
Modified files:
windows-NT : ChangeLog filesubr.c
Log message:
* filesubr.c (isdir, islink, isreadable, isaccessible): Return bool.
(xchmod): Second argument is bool.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/ChangeLog.diff?tr1=1.353&tr2=1.354&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/windows-NT/filesubr.c.diff?tr1=1.63&tr2=1.64&r1=text&r2=text
Patches:
Index: ccvs/windows-NT/ChangeLog
diff -u ccvs/windows-NT/ChangeLog:1.353 ccvs/windows-NT/ChangeLog:1.354
--- ccvs/windows-NT/ChangeLog:1.353 Sat May 13 20:58:54 2006
+++ ccvs/windows-NT/ChangeLog Sun May 14 09:40:42 2006
@@ -1,3 +1,8 @@
+2006-05-14 Mark D. Baushke <address@hidden>
+
+ * filesubr.c (isdir, islink, isreadable, isaccessible): Return bool.
+ (xchmod): Second argument is bool.
+
2006-05-13 Mark D. Baushke <address@hidden>
* config.h.in.in: Add defines for missing symbols: HAVE_WINSOCK2_H
Index: ccvs/windows-NT/filesubr.c
diff -u ccvs/windows-NT/filesubr.c:1.63 ccvs/windows-NT/filesubr.c:1.64
--- ccvs/windows-NT/filesubr.c:1.63 Mon Sep 26 03:09:14 2005
+++ ccvs/windows-NT/filesubr.c Sun May 14 09:40:42 2006
@@ -159,21 +159,21 @@
* Returns non-zero if the argument file is a directory, or is a symbolic
* link which points to a directory.
*/
-int
+bool
isdir (file)
const char *file;
{
struct stat sb;
if (stat (file, &sb) < 0)
- return (0);
- return (S_ISDIR (sb.st_mode));
+ return false;
+ return S_ISDIR (sb.st_mode);
}
/*
* Returns non-zero if the argument file is a symbolic link.
*/
-int
+bool
islink (file)
const char *file;
{
@@ -181,10 +181,10 @@
struct stat sb;
if (lstat (file, &sb) < 0)
- return (0);
- return (S_ISLNK (sb.st_mode));
+ return false;
+ return S_ISLNK (sb.st_mode);
#else
- return (0);
+ return false;
#endif
}
@@ -201,7 +201,7 @@
/*
* Returns non-zero if the argument file is readable.
*/
-int
+bool
isreadable (file)
const char *file;
{
@@ -223,7 +223,7 @@
* mode. If compiled with SETXID_SUPPORT also works if cvs has setxid
* bits set.
*/
-int
+bool
isaccessible (file, mode)
const char *file;
const int mode;
@@ -236,9 +236,9 @@
int uid;
if (stat(file, &sb) == -1)
- return 0;
+ return false;
if (mode == F_OK)
- return 1;
+ return true;
uid = geteuid();
if (uid == 0) /* superuser */
@@ -246,7 +246,7 @@
if (mode & X_OK)
return sb.st_mode & (S_IXUSR|S_IXGRP|S_IXOTH);
else
- return 1;
+ return true;
}
if (mode & R_OK)
@@ -361,7 +361,7 @@
void
xchmod (fname, writable)
const char *fname;
- int writable;
+ bool writable;
{
struct stat sb;
mode_t mode, oumask;
- [Cvs-cvs] ccvs/windows-NT ChangeLog filesubr.c,
Mark D. Baushke <=