mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Documentation tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@21286 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
13ed7fb078
commit
ab9a50e0d1
6 changed files with 123 additions and 26 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,10 +1,20 @@
|
|||
2005-06-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSObject.h: Add a versioning constant and
|
||||
document a bit better.
|
||||
* Tools/AGSParser.m: Support new version constant and fix version
|
||||
comparison for minor and subminor numbers.
|
||||
* Tools/AGSHtml.m: ditto
|
||||
* Headers/Foundation/NSArchiver.h: convert o new versioning as test.
|
||||
* Documentation/Base.gsdoc: Document version constants.
|
||||
|
||||
2005-06-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSObject.h: Add subminor number to versioning
|
||||
macros as apple sometimes add/remove things at subminor versions.
|
||||
Add some constants for versions.
|
||||
* Tools/AGSParser.m: Support subminor version info
|
||||
* Tools/AGSHatm.m: ditto
|
||||
* Tools/AGSHtml.m: ditto
|
||||
|
||||
2005-06-04 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -53,20 +53,62 @@
|
|||
being compiled -
|
||||
</p>
|
||||
<deflist>
|
||||
<term>GS_GNUSTEP_V</term>
|
||||
<desc>
|
||||
Specifies the software version of the header being included.<br />
|
||||
Features in that header which are declared as having been
|
||||
introduced at or before the specified version, and not being
|
||||
removed until or after the specified version are available.<br />
|
||||
The version consists of five or six digits ...
|
||||
a major number (0-99) followed by a minor number (00-99) and
|
||||
a subminor number (00-00).<br />
|
||||
Features in the header file are marked as belonging to different
|
||||
version ranges using the GS_API_VERSION macro.<br />
|
||||
NB. This is the <em>native</em> versioning of the library being
|
||||
used via the header file. You can use this mechanism in your
|
||||
own libraries and frameworks.
|
||||
</desc>
|
||||
<term>GS_OPENSTEP_V</term>
|
||||
<desc>
|
||||
Used only for the software version in sequence of OpenStep
|
||||
specification and the NeXT/Apple implementation of that
|
||||
specification and its extensions.<br />
|
||||
Features in the header being included which are declared
|
||||
as having been introduced at or before the specified version,
|
||||
and not being removed until or after the specified version
|
||||
are available.<br />
|
||||
The version consists of five or six digits ...
|
||||
a major number (1-99) followed by a minor number (00-99) and
|
||||
a subminor number (00-00).<br />
|
||||
A major number of 1 indicates the OpenStep specification ...
|
||||
available as the GS_API_OSSPEC preprocessor constant.<br />
|
||||
A major number of 4 indicates the OPENSTEP implementation ...
|
||||
available as the GS_API_OPENSTEP preprocessor constant.<br />
|
||||
A major number of 10 indicates the MacOS-X implementation ...
|
||||
available as the GS_API_MACOSX preprocessor constant.<br />
|
||||
Features in the header file are marked as belonging to different
|
||||
version ranges using the OS_API_VERSION macro.<br />
|
||||
</desc>
|
||||
<term>NO_GNUSTEP</term>
|
||||
<desc>
|
||||
GNUstep specific extensions to the OpenStep and MacOS cocoa
|
||||
APIs are excluded from the headers.
|
||||
APIs are excluded from the headers.<br />
|
||||
This is obsolete .. setting GS_OPENSTEP_V should exclude
|
||||
GNUstep extensions.
|
||||
</desc>
|
||||
<term>STRICT_MACOS_X</term>
|
||||
<desc>
|
||||
Only methods and classes that are part of the MacOS cocoa
|
||||
API are made available in the headers.
|
||||
Only methods and classes that are part of the oriignal MacOS
|
||||
cocoa API are made available in the headers.<br />
|
||||
This is obsolete .. setting GS_OPENSTEP_V to GS_API_MACOSX should
|
||||
do this.
|
||||
</desc>
|
||||
<term>STRICT_OPENSTEP</term>
|
||||
<desc>
|
||||
Only methods and classes that are part of the OpenStep
|
||||
specification are made available in the headers.
|
||||
specification are made available in the headers.<br />
|
||||
This is obsolete .. setting GS_OPENSTEP_V to GS_API_OPENSTEP
|
||||
should do this.
|
||||
</desc>
|
||||
</deflist>
|
||||
<p>
|
||||
|
|
|
@ -32,6 +32,8 @@
|
|||
|
||||
@class NSMutableArray, NSMutableDictionary, NSMutableData, NSData, NSString;
|
||||
|
||||
#if OS_API_VERSION(GS_API_OSSPEC,GS_API_LATEST)
|
||||
|
||||
@interface NSArchiver : NSCoder
|
||||
{
|
||||
@private
|
||||
|
@ -77,14 +79,14 @@
|
|||
- (void) encodeClassName: (NSString*)trueName
|
||||
intoClassName: (NSString*)inArchiveName;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
#if OS_API_VERSION(GS_API_MACOSX,GS_API_LATEST)
|
||||
/* Substituting Objects */
|
||||
- (void) replaceObject: (id)object
|
||||
withObject: (id)newObject;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
|
||||
@interface NSArchiver (GNUstep)
|
||||
|
||||
/*
|
||||
|
@ -186,13 +188,13 @@
|
|||
- (void) decodeClassName: (NSString*)nameInArchive
|
||||
asClassName: (NSString*)trueName;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
#if OS_API_VERSION(GS_API_MACOSX,GS_API_LATEST)
|
||||
/* Substituting objects */
|
||||
- (void) replaceObject: (id)anObject withObject: (id)replacement;
|
||||
#endif
|
||||
@end
|
||||
|
||||
#ifndef NO_GNUSTEP
|
||||
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE) && GS_API_VERSION(1,GS_API_LATEST)
|
||||
@interface NSUnarchiver (GNUstep)
|
||||
|
||||
- (unsigned) cursor;
|
||||
|
@ -218,4 +220,6 @@
|
|||
*/
|
||||
GS_EXPORT NSString * const NSInconsistentArchiveException;
|
||||
|
||||
#endif /* OS_API_VERSION */
|
||||
|
||||
#endif /* __NSArchiver_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
|
|
@ -31,8 +31,10 @@
|
|||
* Check consistency of definitions for system compatibility.
|
||||
*/
|
||||
#if defined(STRICT_OPENSTEP)
|
||||
#define OS_API_VERSION 10000
|
||||
#define NO_GNUSTEP 1
|
||||
#elif defined(STRICT_MACOS_X)
|
||||
#define OS_API_VERSION 100000
|
||||
#define NO_GNUSTEP 1
|
||||
#else
|
||||
#undef NO_GNUSTEP
|
||||
|
@ -41,7 +43,8 @@
|
|||
/*
|
||||
* NB. The version values below must be integers ... by convention these are
|
||||
* made up of two digits each for major, minor and subminor version numbers
|
||||
* (ie each is in the range 00 to 99).
|
||||
* (ie each is in the range 00 to 99 though a leading zero in the major
|
||||
* number is not permitted).
|
||||
* So for a MacOS-X 10.3.9 release the version number would be 100309
|
||||
*
|
||||
* You may define GS_GNUSTEP_V or GS_OPENSTEP_V to ensure that your
|
||||
|
@ -64,6 +67,15 @@
|
|||
#define OS_API_VERSION(ADD,REM) \
|
||||
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM))
|
||||
|
||||
/**
|
||||
* A constant to represent a feature which is not present in any version.
|
||||
* Use this to say a feature is not present in an API.<br />
|
||||
* eg.<br />
|
||||
* #if OS_API_VERSION(GS_API_NONE, GS_API_NONE)<br />
|
||||
* denotes code not present in OpenStep/OPENSTEP/MacOS-X
|
||||
*/
|
||||
#define GS_API_NONE 0
|
||||
|
||||
/**
|
||||
* A constant to represent a feature which is still present in the latest
|
||||
* version. This is the highest possible version number.
|
||||
|
@ -73,12 +85,12 @@
|
|||
/**
|
||||
* The version number of the initial OpenStep specification
|
||||
*/
|
||||
#define GS_API_OSSPEC 000000
|
||||
#define GS_API_OSSPEC 10000
|
||||
|
||||
/**
|
||||
* The version number of the first OPENSTEP implemenation
|
||||
*/
|
||||
#define GS_API_OPENSTEP 040000
|
||||
#define GS_API_OPENSTEP 40000
|
||||
|
||||
/**
|
||||
* The version number of the first MacOS-X implementation
|
||||
|
|
|
@ -2353,20 +2353,46 @@ static NSString *mainFont = nil;
|
|||
NSString *gvdep = [prop objectForKey: @"gvdep"];
|
||||
NSString *ovrem = [prop objectForKey: @"ovrem"];
|
||||
NSString *gvrem = [prop objectForKey: @"gvrem"];
|
||||
const char *str;
|
||||
int maj;
|
||||
int min;
|
||||
int sub;
|
||||
|
||||
if ([ovadd length] > 0)
|
||||
{
|
||||
int add = [ovadd intValue];
|
||||
int dep = [ovdep intValue];
|
||||
int rem = [ovrem intValue];
|
||||
int add;
|
||||
int dep;
|
||||
int rem;
|
||||
|
||||
str = [ovadd UTF8String];
|
||||
if (str != 0 && sscanf(str, "%d.%d.%d", &maj, &min, &sub) == 3)
|
||||
add = maj * 10000 + min * 100 + sub;
|
||||
else
|
||||
add = 0;
|
||||
|
||||
str = [ovdep UTF8String];
|
||||
if (str != 0 && sscanf(str, "%d.%d.%d", &maj, &min, &sub) == 3)
|
||||
dep = maj * 10000 + min * 100 + sub;
|
||||
else
|
||||
dep = 0;
|
||||
|
||||
str = [ovrem UTF8String];
|
||||
if (str != 0 && sscanf(str, "%d.%d.%d", &maj, &min, &sub) == 3)
|
||||
rem = maj * 10000 + min * 100 + sub;
|
||||
else
|
||||
rem = 0;
|
||||
|
||||
[buf appendString: indent];
|
||||
[buf appendString: @"<b>Releases:</b> "];
|
||||
if (add < 4)
|
||||
[buf appendString: @"<b>Availability:</b> "];
|
||||
if (add < GS_API_OSSPEC)
|
||||
{
|
||||
[buf appendString: @"Not in OpenStep/MacOS-X"];
|
||||
}
|
||||
else if (add < GS_API_OPENSTEP)
|
||||
{
|
||||
[buf appendString: @"OpenStep"];
|
||||
}
|
||||
else if (add < 10)
|
||||
else if (add < GS_API_MACOSX)
|
||||
{
|
||||
[buf appendString: @"OPENSTEP "];
|
||||
[buf appendString: ovadd];
|
||||
|
@ -2379,7 +2405,7 @@ static NSString *mainFont = nil;
|
|||
if (dep > add)
|
||||
{
|
||||
[buf appendString: @" deprecated at "];
|
||||
if (add < 10)
|
||||
if (dep < GS_API_MACOSX)
|
||||
{
|
||||
[buf appendString: @"OPENSTEP "];
|
||||
[buf appendString: ovdep];
|
||||
|
@ -2393,7 +2419,7 @@ static NSString *mainFont = nil;
|
|||
if (rem > add)
|
||||
{
|
||||
[buf appendString: @" removed at "];
|
||||
if (add < 10)
|
||||
if (rem < GS_API_MACOSX)
|
||||
{
|
||||
[buf appendString: @"OPENSTEP "];
|
||||
[buf appendString: ovrem];
|
||||
|
@ -2426,7 +2452,7 @@ static NSString *mainFont = nil;
|
|||
else if ([gvadd length] > 0)
|
||||
{
|
||||
[buf appendString: indent];
|
||||
[buf appendString: @"<b>Releases:</b> "];
|
||||
[buf appendString: @"<b>Availability:</b> "];
|
||||
[buf appendString: project];
|
||||
[buf appendString: @" "];
|
||||
[buf appendString: gvadd];
|
||||
|
|
|
@ -2935,7 +2935,6 @@ fail:
|
|||
{
|
||||
BOOL openstep;
|
||||
NSString *ver;
|
||||
int i;
|
||||
|
||||
if ([arg isEqual: @"OS_API_VERSION"] == YES)
|
||||
{
|
||||
|
@ -2976,7 +2975,7 @@ fail:
|
|||
ver = [self parseVersion];
|
||||
if ([ver length] == 0)
|
||||
{
|
||||
ver = @"0.0.0";
|
||||
ver = @"1.0.0";
|
||||
}
|
||||
if (openstep)
|
||||
{
|
||||
|
@ -3365,17 +3364,21 @@ fail:
|
|||
}
|
||||
str = [NSString stringWithCharacters: &buffer[i] length: pos - i];
|
||||
}
|
||||
if ([str isEqualToString: @"GS_API_LATEST"] == YES)
|
||||
if ([str isEqualToString: @"GS_API_NONE"] == YES)
|
||||
{
|
||||
str = @"000000";
|
||||
}
|
||||
else if ([str isEqualToString: @"GS_API_LATEST"] == YES)
|
||||
{
|
||||
str = @"999999";
|
||||
}
|
||||
else if ([str isEqualToString: @"GS_API_OSSPEC"] == YES)
|
||||
{
|
||||
str = @"000000";
|
||||
str = @"010000";
|
||||
}
|
||||
else if ([str isEqualToString: @"GS_API_OPENSTEP"] == YES)
|
||||
{
|
||||
str = @"000400";
|
||||
str = @"040000";
|
||||
}
|
||||
else if ([str isEqualToString: @"GS_API_MACOSX"] == YES)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue