* GSWeb.framework/GSWDefaultAdaptorThread.m

([GSWDefaultAdaptorThread run:]): Replace NSThreadExiting
        with NSThreadWillExitNotification.
        ([GSWDefaultAdaptorThread threadExited:]): Ditto.
        ([GSWDefaultAdaptorThread readRequestReturnedRequestLine:
        returnedHeaders:returnedData:]): Assign current date to typed
        variable to avoid compiler warning on compare:.
        * GSWeb.framework/GSWUtils.m
        ([NSException exceptionWithName:format:]): Adapt variables name
        to not clash with instance variable names on Cocoa.
        ([NSException exceptionByAddingUserInfo:]): Ditto.
        ([NSException exceptionByAddingToUserInfoKey:format:]): Ditto.
        ([NSException exceptionByAddingUserInfoKey:format:]): Ditto.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@18681 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
ayers 2004-02-26 16:26:31 +00:00
parent 85d09b936c
commit 54bc7abdd4
3 changed files with 53 additions and 32 deletions

View file

@ -1,3 +1,19 @@
2004-02-26 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWDefaultAdaptorThread.m
([GSWDefaultAdaptorThread run:]): Replace NSThreadExiting
with NSThreadWillExitNotification.
([GSWDefaultAdaptorThread threadExited:]): Ditto.
([GSWDefaultAdaptorThread readRequestReturnedRequestLine:
returnedHeaders:returnedData:]): Assign current date to typed
variable to avoid compiler warning on compare:.
* GSWeb.framework/GSWUtils.m
([NSException exceptionWithName:format:]): Adapt variables name
to not clash with instance variable names on Cocoa.
([NSException exceptionByAddingUserInfo:]): Ditto.
([NSException exceptionByAddingToUserInfoKey:format:]): Ditto.
([NSException exceptionByAddingUserInfoKey:format:]): Ditto.
2004-02-25 David Ayers <d.ayers@inode.at>
* GSWeb.framework/GSWApplication.h

View file

@ -142,12 +142,12 @@ RCS_ID("$Id$")
forKey:GSWThreadKey_DefaultAdaptorThread];
[[NSNotificationCenter defaultCenter] addObserver:[self class]
selector:@selector(threadExited:)
name:NSThreadExiting//NSThreadWillExitNotification
name:NSThreadWillExitNotification
object:[NSThread currentThread]];
/*
[NotificationDispatcher addObserver:[self class]
selector:@selector(threadExited:)
name:NSThreadExiting//NSThreadWillExitNotification
name:NSThreadWillExitNotification
object:[NSThread currentThread]];
*/
};
@ -293,10 +293,10 @@ RCS_ID("$Id$")
NSDebugMLLog(@"low",@"adaptorThread=%@",adaptorThread);
[threadDict removeObjectForKey:GSWThreadKey_DefaultAdaptorThread];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:NSThreadExiting//NSThreadWillExitNotification
name:NSThreadWillExitNotification
object:thread];
/* [NotificationDispatcher removeObserver:self
name:NSThreadExiting//NSThreadWillExitNotification
name:NSThreadWillExitNotification
object:_thread];
*/
[adaptorThread threadExited];
@ -522,11 +522,15 @@ RCS_ID("$Id$")
};
if (!isAllDataReaden)
{
isElapsed=[[NSDate date]compare:maxDate]==NSOrderedDescending;
/* Because +date returns (id) we use the variable
to insure the compiler finds the correct signature. */
NSDate *now = [NSDate date];
isElapsed =[now compare: maxDate]==NSOrderedDescending;
if (!isElapsed)
{
NSTimeIntervalSleep(sleepTime);//Is this the good method ? //TODOV
isElapsed=[[NSDate date]compare:maxDate]==NSOrderedDescending;
now = [NSDate date];
isElapsed=[now compare:maxDate]==NSOrderedDescending;
};
};
} while (!isAllDataReaden && !isElapsed);

View file

@ -454,18 +454,18 @@ void ValidationExceptionRaiseFn0(const char *func,
//====================================================================
@implementation NSException (NSBuild)
+(NSException*)exceptionWithName:(NSString*)name
+(NSException*)exceptionWithName:(NSString*)excptName
format:(NSString*)format,...
{
NSException* exception=nil;
NSString* reason=nil;
NSString* excptReason=nil;
va_list args;
va_start(args,format);
reason=[NSString stringWithFormat:format
arguments:args];
excptReason=[NSString stringWithFormat:format
arguments:args];
va_end(args);
exception=[self exceptionWithName:name
reason:reason
exception=[self exceptionWithName:excptName
reason:excptReason
userInfo: nil];
return exception;
};
@ -476,11 +476,12 @@ void ValidationExceptionRaiseFn0(const char *func,
-(NSException*)exceptionByAddingUserInfo:(NSDictionary*)aUserInfo
{
NSMutableDictionary* userInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
[userInfo addEntriesFromDictionary:aUserInfo];
NSMutableDictionary* excptUserInfo
= [NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
[excptUserInfo addEntriesFromDictionary:aUserInfo];
return [[self class]exceptionWithName:[self name]
reason:[self reason]
userInfo:userInfo];
userInfo: excptUserInfo];
};
-(NSException*)exceptionByAddingToUserInfoKey:(id)key
@ -488,33 +489,33 @@ void ValidationExceptionRaiseFn0(const char *func,
{
NSException* exception=nil;
NSString* userInfoString=nil;
NSMutableDictionary* userInfo=nil;
NSMutableDictionary* excptUserInfo=nil;
va_list args;
LOGObjectFnStart();
userInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
excptUserInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
va_start(args,format);
userInfoString = [NSString stringWithFormat:format
arguments:args];
va_end(args);
{
id curArray = [userInfo objectForKey:key];
id curArray = [excptUserInfo objectForKey:key];
id newArray=[NSMutableArray arrayWithObject:userInfoString];
if (!curArray)
{
curArray = [NSMutableArray array];
}
if (![curArray isKindOf:[NSMutableArray class]])
if (![curArray isKindOfClass:[NSMutableArray class]])
{
id tempObject = curArray;
curArray = [NSMutableArray array];
[curArray addObject:tempObject];
}
[newArray addObjectsFromArray:curArray];
[userInfo setObject:newArray forKey:key];
[excptUserInfo setObject:newArray forKey:key];
}
exception=[[self class]exceptionWithName:[self name]
reason:[self reason]
userInfo:userInfo];
userInfo:excptUserInfo];
LOGObjectFnStop();
return exception;
};
@ -525,19 +526,19 @@ void ValidationExceptionRaiseFn0(const char *func,
{
NSException* exception=nil;
NSString* userInfoString=nil;
NSMutableDictionary* userInfo=nil;
NSMutableDictionary* excptUserInfo=nil;
va_list args;
LOGObjectFnStart();
userInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
excptUserInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
va_start(args,format);
userInfoString = [NSString stringWithFormat:format
arguments:args];
va_end(args);
[userInfo setObject:userInfoString
forKey:key];
[excptUserInfo setObject:userInfoString
forKey:key];
exception=[[self class]exceptionWithName:[self name]
reason:[self reason]
userInfo:userInfo];
userInfo:excptUserInfo];
LOGObjectFnStop();
return exception;
};
@ -545,21 +546,21 @@ void ValidationExceptionRaiseFn0(const char *func,
-(NSException*)exceptionByAddingUserInfoFrameInfo:(NSString*)frameInfo
{
NSException* exception=nil;
NSMutableDictionary* userInfo=nil;
NSMutableDictionary* excptUserInfo=nil;
NSArray* frameInfoArray=nil;
LOGObjectFnStart();
NSAssert(frameInfo,@"No frameInfo");
userInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
frameInfoArray=[userInfo objectForKey:@"FrameInfo"];
excptUserInfo=[NSMutableDictionary dictionaryWithDictionary:[self userInfo]];
frameInfoArray=[excptUserInfo objectForKey:@"FrameInfo"];
if (frameInfoArray)
frameInfoArray=[frameInfoArray arrayByAddingObject:frameInfo];
else
frameInfoArray=[NSArray arrayWithObject:frameInfo];
[userInfo setObject:frameInfoArray
forKey:@"FrameInfo"];
[excptUserInfo setObject:frameInfoArray
forKey:@"FrameInfo"];
exception=[[self class]exceptionWithName:[self name]
reason:[self reason]
userInfo:userInfo];
userInfo:excptUserInfo];
LOGObjectFnStop();
return exception;
};