Ivar underscore prefixes added and some tidying done.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4902 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
richard 1999-09-16 07:21:34 +00:00
parent 6a01c2a85d
commit a2737c2cf5
69 changed files with 2340 additions and 2203 deletions

View file

@ -102,7 +102,7 @@ otherTime(NSDate* other)
Class c = fastClass(other);
if (c == concreteClass || c == calendarClass)
return ((NSGDate*)other)->seconds_since_ref;
return ((NSGDate*)other)->_seconds_since_ref;
else
return [other timeIntervalSinceReferenceDate];
}
@ -1097,18 +1097,18 @@ GSTimeNow()
- (void) encodeWithCoder: (NSCoder*)coder
{
[coder encodeValueOfObjCType: @encode(NSTimeInterval) at: &seconds_since_ref];
[coder encodeValueOfObjCType: @encode(NSTimeInterval) at: &_seconds_since_ref];
}
- (id) initWithCoder: (NSCoder*)coder
{
[coder decodeValueOfObjCType: @encode(NSTimeInterval) at: &seconds_since_ref];
[coder decodeValueOfObjCType: @encode(NSTimeInterval) at: &_seconds_since_ref];
return self;
}
- (id) initWithTimeIntervalSinceReferenceDate: (NSTimeInterval)secs
{
seconds_since_ref = secs;
_seconds_since_ref = secs;
return self;
}
@ -1119,37 +1119,37 @@ GSTimeNow()
{
/* xxx We need to check for overflow? */
return [concreteClass dateWithTimeIntervalSinceReferenceDate:
seconds_since_ref + seconds];
_seconds_since_ref + seconds];
}
- (NSTimeInterval) timeIntervalSince1970
{
return seconds_since_ref - UNIX_REFERENCE_INTERVAL;
return _seconds_since_ref - UNIX_REFERENCE_INTERVAL;
}
- (NSTimeInterval) timeIntervalSinceDate: (NSDate*)otherDate
{
return seconds_since_ref - otherTime(otherDate);
return _seconds_since_ref - otherTime(otherDate);
}
- (NSTimeInterval) timeIntervalSinceNow
{
return seconds_since_ref - GSTimeNow();
return _seconds_since_ref - GSTimeNow();
}
- (NSTimeInterval) timeIntervalSinceReferenceDate
{
return seconds_since_ref;
return _seconds_since_ref;
}
// Comparing dates
- (NSComparisonResult) compare: (NSDate*)otherDate
{
if (seconds_since_ref > otherTime(otherDate))
if (_seconds_since_ref > otherTime(otherDate))
return NSOrderedDescending;
if (seconds_since_ref < otherTime(otherDate))
if (_seconds_since_ref < otherTime(otherDate))
return NSOrderedAscending;
return NSOrderedSame;
@ -1157,7 +1157,7 @@ GSTimeNow()
- (NSDate*) earlierDate: (NSDate*)otherDate
{
if (seconds_since_ref > otherTime(otherDate))
if (_seconds_since_ref > otherTime(otherDate))
return otherDate;
return self;
}
@ -1165,21 +1165,21 @@ GSTimeNow()
- (BOOL) isEqual: (id)other
{
if ([other isKindOfClass: abstractClass]
&& 1.0 > ABS(seconds_since_ref - otherTime(other)))
&& 1.0 > ABS(_seconds_since_ref - otherTime(other)))
return YES;
return NO;
}
- (BOOL) isEqualToDate: (NSDate*)other
{
if (1.0 > ABS(seconds_since_ref - otherTime(other)))
if (1.0 > ABS(_seconds_since_ref - otherTime(other)))
return YES;
return NO;
}
- (NSDate*) laterDate: (NSDate*)otherDate
{
if (seconds_since_ref < otherTime(otherDate))
if (_seconds_since_ref < otherTime(otherDate))
return otherDate;
return self;
}
@ -1278,7 +1278,7 @@ GSTimeNow()
- (id) initWithTimeIntervalSinceReferenceDate: (NSTimeInterval)secs
{
seconds_since_ref = DISTANT_PAST;
_seconds_since_ref = DISTANT_PAST;
return self;
}
@ -1300,7 +1300,7 @@ GSTimeNow()
- (id) initWithTimeIntervalSinceReferenceDate: (NSTimeInterval)secs
{
seconds_since_ref = DISTANT_FUTURE;
_seconds_since_ref = DISTANT_FUTURE;
return self;
}