mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
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:
parent
3c7d220858
commit
6a75fb2858
4 changed files with 38 additions and 3 deletions
|
@ -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>
|
Wed Feb 17 8:52:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
* Source/NSProcessInfo.m: Include process name in arguments list as
|
* Source/NSProcessInfo.m: Include process name in arguments list as
|
||||||
|
|
|
@ -155,6 +155,12 @@ static NSMutableDictionary *_hostCache = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = gethostbyname(name);
|
h = gethostbyname(name);
|
||||||
|
if (h == NULL)
|
||||||
|
{
|
||||||
|
NSLog(@"Unable to determine current host");
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return [self _hostWithHostEntry:h name:[NSString
|
return [self _hostWithHostEntry:h name:[NSString
|
||||||
stringWithCString:name]];
|
stringWithCString:name]];
|
||||||
|
@ -163,6 +169,12 @@ static NSMutableDictionary *_hostCache = nil;
|
||||||
+ (NSHost *)hostWithName:(NSString *)name
|
+ (NSHost *)hostWithName:(NSString *)name
|
||||||
{
|
{
|
||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
|
|
||||||
|
if (name == nil)
|
||||||
|
{
|
||||||
|
NSLog(@"Nil host name sent to +[NSHost hostWithName]");
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
h = gethostbyname((char *)[name cString]);
|
h = gethostbyname((char *)[name cString]);
|
||||||
|
|
||||||
|
@ -175,6 +187,12 @@ static NSMutableDictionary *_hostCache = nil;
|
||||||
struct hostent *h;
|
struct hostent *h;
|
||||||
struct in_addr hostaddr;
|
struct in_addr hostaddr;
|
||||||
|
|
||||||
|
if (address == nil)
|
||||||
|
{
|
||||||
|
NSLog(@"Nil address sent to +[NSHost hostWithAddress]");
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
hostaddr.s_addr = inet_addr((char *)[address cString]);
|
hostaddr.s_addr = inet_addr((char *)[address cString]);
|
||||||
if (hostaddr.s_addr == -1)
|
if (hostaddr.s_addr == -1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
/* Both 1 works; both 0 works. 0 and 1 crash, as does NeXT's */
|
/* Both 1 works; both 0 works. 0 and 1 crash, as does NeXT's */
|
||||||
|
|
||||||
/* Use GNU Archiving features, if they are available. */
|
/* 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
|
/* In the forward self-reference test, -initWithCoder substitutes
|
||||||
another object for self. */
|
another object for self. */
|
||||||
#define SELF_REF_DECODE_SUBSTITUTES 1
|
#define SELF_REF_DECODE_SUBSTITUTES 0
|
||||||
|
|
||||||
/* End of some parameters to vary. */
|
/* End of some parameters to vary. */
|
||||||
|
|
||||||
|
@ -213,7 +213,11 @@ test_fref ()
|
||||||
[sub_foo release];
|
[sub_foo release];
|
||||||
[array release];
|
[array release];
|
||||||
|
|
||||||
|
#if GNU_ARCHIVING
|
||||||
|
array = [Unarchiver unarchiveObjectWithFile: @"fref.dat"];
|
||||||
|
#else
|
||||||
array = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
|
array = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
|
||||||
|
#endif
|
||||||
foo = [array objectAtIndex: 1];
|
foo = [array objectAtIndex: 1];
|
||||||
sub_foo = [foo subFoo];
|
sub_foo = [foo subFoo];
|
||||||
printf ("Decoded: ");
|
printf ("Decoded: ");
|
||||||
|
@ -243,7 +247,11 @@ test_self_fref ()
|
||||||
[foo release];
|
[foo release];
|
||||||
[sub_foo release];
|
[sub_foo release];
|
||||||
|
|
||||||
|
#if GNU_ARCHIVING
|
||||||
|
foo = [Unarchiver unarchiveObjectWithFile: @"fref.dat"];
|
||||||
|
#else
|
||||||
foo = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
|
foo = [NSUnarchiver unarchiveObjectWithFile: @"fref.dat"];
|
||||||
|
#endif
|
||||||
sub_foo = [foo subFoo];
|
sub_foo = [foo subFoo];
|
||||||
printf ("Decoded: ");
|
printf ("Decoded: ");
|
||||||
[sub_foo print];
|
[sub_foo print];
|
||||||
|
|
|
@ -38,7 +38,7 @@ autorelease_test (int depth)
|
||||||
{
|
{
|
||||||
int n = 2;
|
int n = 2;
|
||||||
id os[n];
|
id os[n];
|
||||||
id a = [NSArray new];
|
id a = [NSMutableArray new];
|
||||||
int i;
|
int i;
|
||||||
id arp;
|
id arp;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue