Documentation tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14252 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-08-08 19:25:17 +00:00
parent f6f7faa176
commit f03160898a
6 changed files with 36 additions and 22 deletions

View file

@ -134,4 +134,8 @@
sinceDate: (NSDate*)date;
@end
#ifndef NO_GNUSTEP
NSTimeInterval GSTime(int d, int m, int y, int hh, int mm, int ss, int mil);
#endif
#endif /* __NSCalendarDate_h_GNUSTEP_BASE_INCLUDE*/

View file

@ -97,18 +97,7 @@ typedef double NSTimeInterval;
@end
#ifndef NO_GNUSTEP
/*
* Our concrete base class - NSCalendar date must share the ivar layout.
*/
@interface NSGDate : NSDate
{
@public
NSTimeInterval _seconds_since_ref;
}
@end
NSTimeInterval GSTimeNow(); /* Get time since reference date*/
NSTimeInterval GSTime(int d, int m, int y, int hh, int mm, int ss, int mil);
#endif
#endif /* __NSDate_h_GNUSTEP_BASE_INCLUDE*/

View file

@ -387,13 +387,16 @@ GS_EXPORT NSRecursiveLock *gnustep_global_lock;
* objective-c method if the receiver is not nil.
*/
#ifndef TEST_RETAIN
#define TEST_RETAIN(object) (object != nil ? [object retain] : nil)
#define TEST_RETAIN(object) ({\
id __object = (id)(object); (__object != nil) ? [__object retain] : nil; })
#endif
#ifndef TEST_RELEASE
#define TEST_RELEASE(object) ({ if (object) [object release]; })
#define TEST_RELEASE(object) ({\
id __object = (id)(object); if (__object != nil) [__object retain]; })
#endif
#ifndef TEST_AUTORELEASE
#define TEST_AUTORELEASE(object) ({ if (object) [object autorelease]; })
#define TEST_AUTORELEASE(object) ({\
id __object = (id)(object); (__object != nil) ? [__object autorelease] : nil; })
#endif
/*
@ -420,12 +423,12 @@ if (__value != __object) \
#endif
/*
* ASSIGNCOPY(object,value) assignes a copy of the value to the object with
* and release operations.
* ASSIGNCOPY(object,value) assigns a copy of the value to the object
* with release of the original.
*/
#ifndef ASSIGNCOPY
#define ASSIGNCOPY(object,value) ({\
id __value = (value); \
id __value = (id)(value); \
id __object = (id)(object); \
if (__value != __object) \
{ \

View file

@ -368,6 +368,7 @@ DOCUMENT_NAME = Base
Base_HEADER_FILES_DIR = $(HEADER_DIR)
Base_AGSDOC_FILES = Base.gsdoc $(AUTOGSDOC_HEADERS)
Base_DOC_INSTALL_DIR = Developer
Base_AGSDOC_FLAGS = \
-HeaderDirectory ../Headers/Foundation \
-Declared Foundation \

View file

@ -89,8 +89,10 @@ absoluteGregorianDay(int day, int month, int year)
+ (year - 1)/400); // ...plus prior years divisible by 400
}
/*
* External - so NSDate can use it.
/**
* Convert a broken out time specification into a time interval
* since the reference date.<br />
* External - so NSDate and others can use it.
*/
NSTimeInterval
GSTime(int day, int month, int year, int h, int m, int s, int mil)
@ -116,6 +118,8 @@ GSTime(int day, int month, int year, int h, int m, int s, int mil)
@end
@class NSGDate;
@implementation NSCalendarDate
+ (void) initialize
@ -127,9 +131,9 @@ GSTime(int day, int month, int year, int h, int m, int s, int mil)
}
}
//
// Getting an NSCalendar Date
//
/**
* Getting an NSCalendar Date
*/
+ (id) calendarDate
{
id d = [[self alloc] init];

View file

@ -71,6 +71,16 @@ static Class abstractClass = nil;
static Class concreteClass = nil;
static Class calendarClass = nil;
/**
* Our concrete base class - NSCalendar date must share the ivar layout.
*/
@interface NSGDate : NSDate
{
@public
NSTimeInterval _seconds_since_ref;
}
@end
@interface GSDateSingle : NSGDate
@end
@ -117,6 +127,9 @@ otherTime(NSDate* other)
return [other timeIntervalSinceReferenceDate];
}
/**
* Returns the current time (seconds since reference date) as an NSTimeInterval.
*/
NSTimeInterval
GSTimeNow()
{