mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Change NSDebugLog to NSLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14636 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2623c68610
commit
9fa387428d
3 changed files with 21 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2002-10-03 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSData.m (readContentsOfFile): Change NSDebugLog(s) to
|
||||
NSWarnLog or NSLog.
|
||||
(-writeToFile:atomically:): Idem.
|
||||
([NSDataMappedFile -initWithContentsOfMappedFile:]): Idem.
|
||||
* Source/NSDictionary.m ([NSDictionary -initWithContentsOfFile:]):
|
||||
Release ourselves and return nil if file cannot be read.
|
||||
|
||||
2002-10-03 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSRunLoop.m: ([-runMode:beforeDate:]) permit the use of a
|
||||
|
|
|
@ -144,7 +144,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone)
|
|||
if ([path getFileSystemRepresentation: thePath
|
||||
maxLength: sizeof(thePath)-1] == NO)
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
NSWarnLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone)
|
|||
FILE_ATTRIBUTE_NORMAL, 0);
|
||||
if (fh == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed", thePath);
|
||||
NSLog(@"Open (%s) attempt failed", thePath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ readContentsOfFile(NSString* path, void** buf, unsigned int* len, NSZone* zone)
|
|||
|
||||
if (theFile == NULL) /* We failed to open the file. */
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed - %s", thePath,
|
||||
NSLog(@"Open (%s) attempt failed - %s", thePath,
|
||||
GSLastErrorStr(errno));
|
||||
goto failure;
|
||||
}
|
||||
|
@ -783,7 +783,7 @@ failure:
|
|||
if ([path getFileSystemRepresentation: theRealPath
|
||||
maxLength: sizeof(theRealPath)-1] == NO)
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed - bad path", theRealPath);
|
||||
NSWarnLog(@"Open (%s) attempt failed - bad path", theRealPath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -795,7 +795,7 @@ failure:
|
|||
if ([tmppath getFileSystemRepresentation: thePath
|
||||
maxLength: sizeof(thePath)-1] == NO)
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
NSWarnLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
@ -2629,7 +2629,7 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos)
|
|||
if ([path getFileSystemRepresentation: thePath
|
||||
maxLength: sizeof(thePath)-1] == NO)
|
||||
{
|
||||
NSDebugLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
NSLog(@"Open (%s) attempt failed - bad path", thePath);
|
||||
return NO;
|
||||
}
|
||||
fd = open(thePath, O_RDONLY);
|
||||
|
|
|
@ -478,6 +478,12 @@ static SEL appSel;
|
|||
|
||||
someData = [[NSData allocWithZone: NSDefaultMallocZone()]
|
||||
initWithContentsOfFile: path];
|
||||
if (someData == nil)
|
||||
{
|
||||
/* NSData should have already logged an error message */
|
||||
RELEASE(self);
|
||||
return nil;
|
||||
}
|
||||
myString = [[NSString allocWithZone: NSDefaultMallocZone()]
|
||||
initWithData: someData encoding: NSUTF8StringEncoding];
|
||||
RELEASE(someData);
|
||||
|
|
Loading…
Reference in a new issue