Tidied removing some obsolete code.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12758 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-02-25 15:04:06 +00:00
parent 95ac5d1ba7
commit 72eab219b4
9 changed files with 32 additions and 50 deletions

View file

@ -99,7 +99,6 @@ int SubFoo_awakeAfterUsingCoder_substitutes = 1;
- (void) encodeWithCoder: coder
{
printf ("In [SubFoo encodeWithCoder:]\n");
[super encodeWithCoder: coder];
#if GNU_ARCHIVING
[coder encodeObjectReference: super_foo
withName: @"super foo"];
@ -118,10 +117,6 @@ int SubFoo_awakeAfterUsingCoder_substitutes = 1;
self = [[[self class] alloc] init];
[o release];
}
else
{
self = [super initWithCoder: coder];
}
#if GNU_ARCHIVING
[coder decodeObjectAt: &super_foo
withName: NULL];
@ -179,7 +174,6 @@ int SubFoo_awakeAfterUsingCoder_substitutes = 1;
- (void) encodeWithCoder: coder
{
printf ("In [Foo encodeWithCoder:]\n");
[super encodeWithCoder: coder];
[coder encodeObject: sub_foo];
[coder encodeValueOfObjCType: @encode(int)
at: &label];
@ -193,10 +187,6 @@ int SubFoo_awakeAfterUsingCoder_substitutes = 1;
self = [[[self class] alloc] init];
[o release];
}
else
{
self = [super initWithCoder: coder];
}
sub_foo = [coder decodeObject];
[coder decodeValueOfObjCType: @encode(int)
at: &label];

View file

@ -251,6 +251,7 @@ bench_object()
AUTO_END;
}
void
bench_array()
{
int i;
@ -300,6 +301,7 @@ bench_array()
AUTO_END;
}
void
bench_dict()
{
int i;
@ -364,6 +366,7 @@ bench_dict()
AUTO_END;
}
void
bench_str()
{
int i;
@ -487,6 +490,7 @@ bench_str()
AUTO_END;
}
void
bench_data()
{
int i;

View file

@ -24,6 +24,7 @@
#include <Foundation/NSDictionary.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSUtilities.h>
#include <Foundation/NSTimeZone.h>
int
main (int argc, char *argv[])

View file

@ -23,6 +23,7 @@
#include <Foundation/NSException.h>
#include <Foundation/NSDate.h>
#include <Foundation/NSUtilities.h>
#include <Foundation/NSTimeZone.h>
#define HOURSECS (60*60) /* Seconds in 1 hour. */
#define DAYSECS (HOURSECS*24) /* Seconds in 24 hours. */

View file

@ -113,31 +113,32 @@ id forks[5];
//
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
int i;
id p[5];
NSAutoreleasePool *arp = [NSAutoreleasePool new];
int i;
id p[5];
// Create the locks
for (i = 0;i < 5; ++i)
{
forks[i] = [[NSConditionLock alloc]
initWithCondition:NO_FOOD];
[forks[i] lock];
}
// Create the locks
for (i = 0;i < 5; ++i)
{
forks[i] = [[NSConditionLock alloc]
initWithCondition:NO_FOOD];
[forks[i] lock];
}
// Create the philosophers
for (i = 0;i < 5; ++i)
p[i] = [[Philosopher alloc] init];
// Create the philosophers
for (i = 0;i < 5; ++i)
p[i] = [[Philosopher alloc] init];
// Have them sit at the table
for (i = 0;i < 5; ++i)
[NSThread detachNewThreadSelector:@selector(sitAtChair:)
toTarget:p[i] withObject: [NSNumber numberWithInt: i]];
// Have them sit at the table
for (i = 0;i < 5; ++i)
[NSThread detachNewThreadSelector:@selector(sitAtChair:)
toTarget:p[i] withObject: [NSNumber numberWithInt: i]];
// Now let them all eat
for (i = 0;i < 5; ++i)
[forks[i] unlockWithCondition:FOOD_SERVED];
while (1);
// Now let them all eat
for (i = 0;i < 5; ++i)
[forks[i] unlockWithCondition:FOOD_SERVED];
while (1);
[arp release];
}

View file

@ -3,6 +3,7 @@
#include <Foundation/NSRunLoop.h>
#include <Foundation/NSPortMessage.h>
#include <Foundation/NSPortNameServer.h>
#include <Foundation/NSData.h>
#include <Foundation/NSPort.h>
@class GSTcpPort;
@ -22,7 +23,7 @@ main()
local = [GSTcpPort new];
loop = [NSRunLoop currentRunLoop];
[NSPortNameServer setPortClass: [GSTcpPort class]];
names = [NSPortNameServer systemDefaultPortNameServer];
names = (id)[NSPortNameServer systemDefaultPortNameServer];
remote = [names portForName: @"GSTcpPort"];
[loop addPort: (NSPort*)local forMode: NSDefaultRunLoopMode];
[remote sendBeforeDate: [NSDate dateWithTimeIntervalSinceNow: 240]

View file

@ -32,7 +32,7 @@ main()
local = [GSTcpPort new];
del = [MyDelegate new];
[local setDelegate: del];
[(id)local setDelegate: del];
loop = [NSRunLoop currentRunLoop];
[NSPortNameServer setPortClass: [GSTcpPort class]];
names = [NSPortNameServer systemDefaultPortNameServer];

View file

@ -278,9 +278,6 @@ con_benchmark (id prx)
rep = [prx sendObject: sen];
printf(" Sent: 0x%p, Reply: 0x%p, Length: %d\n", sen, rep, [rep length]);
[NSConnection setDebug: 0];
[NSDistantObject setDebug: 0];
//[NSPort setDebug: 0];
localObj = [[NSObject alloc] init];
[prx addObject: localObj]; // FIXME: Why is this needed?
for (i = 0; i < 10000; i++)
@ -453,13 +450,6 @@ int main (int argc, char *argv[], char **env)
if (type_test == NO_TEST)
type_test = TYPE_TEST;
if (debug)
{
[NSConnection setDebug: 10];
[NSDistantObject setDebug: 10];
//[NSPort setDebug: 10];
}
if (type_test == CONNECT_TEST)
connect_attempts = 100000;
else

View file

@ -459,12 +459,6 @@ int main(int argc, char *argv[], char **env)
[NSDistantObject setProtocolForProxies:@protocol(AllProxies)];
#endif
if (debug)
{
[NSConnection setDebug: 10];
[NSDistantObject setDebug: 10];
}
c = [NSConnection defaultConnection];
[c setRootObject: l];