Minor tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9909 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-05-09 08:32:52 +00:00
parent e1bdc53e46
commit 4cf87241db
3 changed files with 12 additions and 4 deletions

View file

@ -4,6 +4,8 @@
Chris B Vetter.
* Source/NSString.m: Fix memory allocation of a unichar buffer to
correct size.
* Source/NSPipe.m: Log an error if we can't open a new pipe.
* Source/NSTask.m: Slight tidyup
2001-05-04 Nicola Pero <n.pero@mi.flashnet.it>

View file

@ -25,6 +25,7 @@
#include <base/preface.h>
#include <Foundation/NSObject.h>
#include <Foundation/NSFileHandle.h>
#include <Foundation/NSDebug.h>
#include <unistd.h>
@implementation NSPipe
@ -53,9 +54,14 @@
if (pipe(p) == 0)
{
readHandle = [[NSFileHandle alloc] initWithFileDescriptor:p[0]];
writeHandle = [[NSFileHandle alloc] initWithFileDescriptor:p[1]];
readHandle = [[NSFileHandle alloc] initWithFileDescriptor: p[0]];
writeHandle = [[NSFileHandle alloc] initWithFileDescriptor: p[1]];
}
else
{
NSLog(@"Failed to create pipe ... %s", strerror(errno));
DESTROY(self);
}
#else
HANDLE readh, writeh;

View file

@ -854,7 +854,7 @@ GSCheckTasks()
for (i = 0; i < ac; i++)
{
args[i+1] = [[[a objectAtIndex: i] description] cString];
args[i+1] = [[[a objectAtIndex: i] description] lossyCString];
}
args[ac+1] = 0;
@ -872,7 +872,7 @@ GSCheckTasks()
{
s = [NSString stringWithFormat: @"%@=", key];
}
envl[i] = [s cString];
envl[i] = [s lossyCString];
}
envl[ec] = 0;