subprojects, testing fiex

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3762 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1999-02-19 21:47:15 +00:00
parent a56ba28bc8
commit 2ec05ffc37
4 changed files with 38 additions and 3 deletions

View file

@ -1,3 +1,12 @@
1999-02-19 Adam Fedor <fedor@gnu.org>
* Source/NSHost.m ([NSHost +currentHost]): Check for host not found.
([NSHost +hostWithName:]): Check for nil arg.
([NSHost +hostWithAddress:]): Likewise.
* Testing/release.m: Make array mutable.
* Testing/fref.m: Switch to NSArchiver/NSUnarchiver
Wed Feb 17 8:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSProcessInfo.m: Include process name in arguments list as

View file

@ -155,6 +155,12 @@ static NSMutableDictionary *_hostCache = nil;
}
h = gethostbyname(name);
if (h == NULL)
{
NSLog(@"Unable to determine current host");
return nil;
}
return [self _hostWithHostEntry:h name:[NSString
stringWithCString:name]];
@ -163,6 +169,12 @@ static NSMutableDictionary *_hostCache = nil;
+ (NSHost *)hostWithName:(NSString *)name
{
struct hostent *h;
if (name == nil)
{
NSLog(@"Nil host name sent to +[NSHost hostWithName]");
return nil;
}
h = gethostbyname((char *)[name cString]);
@ -175,6 +187,12 @@ static NSMutableDictionary *_hostCache = nil;
struct hostent *h;
struct in_addr hostaddr;
if (address == nil)
{
NSLog(@"Nil address sent to +[NSHost hostWithAddress]");
return nil;
}
hostaddr.s_addr = inet_addr((char *)[address cString]);
if (hostaddr.s_addr == -1)
{

View file

@ -11,11 +11,11 @@
/* Both 1 works; both 0 works. 0 and 1 crash, as does NeXT's */
/* Use GNU Archiving features, if they are available. */
#define TRY_GNU_ARCHIVING 1
#define TRY_GNU_ARCHIVING 0
/* In the forward self-reference test, -initWithCoder substitutes
another object for self. */
#define SELF_REF_DECODE_SUBSTITUTES 1
#define SELF_REF_DECODE_SUBSTITUTES 0
/* End of some parameters to vary. */
@ -213,7 +213,11 @@ test_fref ()
[sub_foo release];
[array release];
#if GNU_ARCHIVING
array = [Unarchiver unarchiveObjectWithFile: @"fref.dat"];
#else
array = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
#endif
foo = [array objectAtIndex: 1];
sub_foo = [foo subFoo];
printf ("Decoded: ");
@ -243,7 +247,11 @@ test_self_fref ()
[foo release];
[sub_foo release];
#if GNU_ARCHIVING
foo = [Unarchiver unarchiveObjectWithFile: @"fref.dat"];
#else
foo = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
#endif
sub_foo = [foo subFoo];
printf ("Decoded: ");
[sub_foo print];

View file

@ -38,7 +38,7 @@ autorelease_test (int depth)
{
int n = 2;
id os[n];
id a = [NSArray new];
id a = [NSMutableArray new];
int i;
id arp;