Bug 47207. Backing out logging/PRINTF changes until we can fix stopwatch.h, introduce double parens, etc.

This commit is contained in:
warren@netscape.com
2000-10-28 22:17:53 +00:00
parent db63f8d3ec
commit 0462ea4ce8
675 changed files with 7622 additions and 9767 deletions

View File

@@ -54,10 +54,6 @@
#include "nsXPIDLString.h"
#include "prproces.h"
NS_IMPL_LOG(nsLocalFileUnixLog)
#define PRINTF FILE_PRINTF
#define FLUSH FILE_FLUSH
// we need these for statfs()
#ifdef HAVE_SYS_STATVFS_H
@@ -279,7 +275,7 @@ nsLocalFile::CreateAllAncestors(PRUint32 permissions)
*slashp = buffer;
#ifdef DEBUG_NSIFILE
PRINTF("nsIFile: before: %s\n", buffer);
fprintf(stderr, "nsIFile: before: %s\n", buffer);
#endif
while ((slashp = strchr(slashp + 1, '/'))) {
@@ -301,7 +297,7 @@ nsLocalFile::CreateAllAncestors(PRUint32 permissions)
/* Temporarily NUL-terminate here */
*slashp = '\0';
#ifdef DEBUG_NSIFILE
PRINTF("nsIFile: mkdir(\"%s\")\n", buffer);
fprintf(stderr, "nsIFile: mkdir(\"%s\")\n", buffer);
#endif
int result = mkdir(buffer, permissions);
@@ -319,7 +315,7 @@ nsLocalFile::CreateAllAncestors(PRUint32 permissions)
}
#ifdef DEBUG_NSIFILE
PRINTF("nsIFile: after: %s\n", buffer);
fprintf(stderr, "nsIFile: after: %s\n", buffer);
#endif
return NS_OK;
@@ -394,7 +390,7 @@ nsLocalFile::Create(PRUint32 type, PRUint32 permissions)
dirperm |= S_IXOTH;
#ifdef DEBUG_NSIFILE
PRINTF("nsIFile: perm = %o, dirperm = %o\n", permissions,
fprintf(stderr, "nsIFile: perm = %o, dirperm = %o\n", permissions,
dirperm);
#endif
@@ -402,7 +398,7 @@ nsLocalFile::Create(PRUint32 type, PRUint32 permissions)
return NS_ERROR_FAILURE;
#ifdef DEBUG_NSIFILE
PRINTF("nsIFile: Create(\"%s\") again\n", (const char *)mPath);
fprintf(stderr, "nsIFile: Create(\"%s\") again\n", (const char *)mPath);
#endif
result = exclusiveCreateFunc((const char *)mPath, permissions);
}
@@ -630,7 +626,7 @@ nsLocalFile::CopyTo(nsIFile *newParent, const char *newName)
return rv;
#ifdef DEBUG_blizzard
PRINTF("nsLocalFile::CopyTo() %s -> %s\n", (const char *)mPath, (const char *)newPathName);
printf("nsLocalFile::CopyTo() %s -> %s\n", (const char *)mPath, (const char *)newPathName);
#endif
// actually create the file.
@@ -706,7 +702,7 @@ nsLocalFile::CopyTo(nsIFile *newParent, const char *newName)
}
#ifdef DEBUG_blizzard
PRINTF("read %d bytes, wrote %d bytes\n",
printf("read %d bytes, wrote %d bytes\n",
totalRead, totalWritten);
#endif
@@ -984,13 +980,13 @@ nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
if (STATFS(mPath, &fs_buf) < 0) {
// The call to STATFS failed.
#ifdef DEBUG
PRINTF("ERROR: GetDiskSpaceAvailable: STATFS call FAILED. \n");
printf("ERROR: GetDiskSpaceAvailable: STATFS call FAILED. \n");
#endif
return NS_ERROR_FAILURE;
}
#ifdef DEBUG_DISK_SPACE
PRINTF("DiskSpaceAvailable: %d bytes\n",
fs_buf.f_bsize * (fs_buf.f_bavail - 1));
printf("DiskSpaceAvailable: %d bytes\n",
fs_buf.f_bsize * (fs_buf.f_bavail - 1));
#endif
// The number of Bytes free = The number of free blocks available to
@@ -1012,7 +1008,7 @@ nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
** properly for these platforms yet.
*/
#ifdef DEBUG
PRINTF("ERROR: GetDiskSpaceAvailable: Not implemented for plaforms without statfs.\n");
printf("ERROR: GetDiskSpaceAvailable: Not implemented for plaforms without statfs.\n");
#endif
return NS_ERROR_NOT_IMPLEMENTED;