diff --git a/ChangeLog b/ChangeLog index 6fd7d7e0d..b08367f1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-05-10 Richard Frith-Macdonald + + * Tools/AGSHtml.h: + * Tools/AGSHtml.m: + * Tools/AGSParser.m: + * Tools/gsdoc-1_0_2.dtd: + Support deprecation version as well as addition/removal. + 2005-05-09 David Ayers * Source/NSPropertyList.m (OAppend): Revert patch from diff --git a/Tools/AGSHtml.h b/Tools/AGSHtml.h index 357da3767..5b56a45be 100644 --- a/Tools/AGSHtml.h +++ b/Tools/AGSHtml.h @@ -26,6 +26,7 @@ @interface AGSHtml : NSObject { + NSString *project; AGSIndex *localRefs; AGSIndex *globalRefs; AGSIndex *projectRefs; diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m index 1cec232f3..c8e77a4e5 100644 --- a/Tools/AGSHtml.m +++ b/Tools/AGSHtml.m @@ -84,6 +84,7 @@ static NSString *mainFont = nil; - (void) dealloc { + RELEASE(project); RELEASE(globalRefs); RELEASE(localRefs); RELEASE(projectRefs); @@ -109,6 +110,8 @@ static NSString *mainFont = nil; - (id) init { indent = [[NSMutableString alloc] initWithCapacity: 64]; + project = RETAIN([[NSUserDefaults standardUserDefaults] + stringForKey: @"Project"]); return self; } @@ -2346,52 +2349,72 @@ static NSString *mainFont = nil; { NSString *ovadd = [prop objectForKey: @"ovadd"]; NSString *gvadd = [prop objectForKey: @"gvadd"]; + NSString *ovdep = [prop objectForKey: @"ovdep"]; + NSString *gvdep = [prop objectForKey: @"gvdep"]; NSString *ovrem = [prop objectForKey: @"ovrem"]; NSString *gvrem = [prop objectForKey: @"gvrem"]; if ([ovadd length] > 0) { int add = [ovadd intValue]; + int dep = [ovdep intValue]; int rem = [ovrem intValue]; [buf appendString: indent]; - [buf appendString: @"Releases:"]; + [buf appendString: @"Releases: "]; if (add < 4) { - [buf appendString: @" OpenStep"]; + [buf appendString: @"OpenStep"]; } else if (add < 10) { - [buf appendString: @" OPENSTEP "]; + [buf appendString: @"OPENSTEP"]; [buf appendString: ovadd]; } else { - [buf appendString: @" MacOS-X "]; + [buf appendString: @"MacOS-X"]; [buf appendString: ovadd]; } + if (dep > add) + { + [buf appendString: @" deprecated at "]; + if (add < 10) + { + [buf appendString: @"OPENSTEP"]; + [buf appendString: ovdep]; + } + else + { + [buf appendString: @"MacOS-X"]; + [buf appendString: ovdep]; + } + } if (rem > add) { [buf appendString: @" removed at "]; - if (add < 4) + if (add < 10) { - [buf appendString: @" OpenStep"]; - } - else if (add < 10) - { - [buf appendString: @" OPENSTEP "]; - [buf appendString: ovadd]; + [buf appendString: @"OPENSTEP"]; + [buf appendString: ovrem]; } else { - [buf appendString: @" MacOS-X "]; - [buf appendString: ovadd]; + [buf appendString: @"MacOS-X"]; + [buf appendString: ovrem]; } } if ([gvadd length] > 0) { - [buf appendString: @", GNUstep "]; + [buf appendString: @", "]; + [buf appendString: project]; + [buf appendString: @" "]; [buf appendString: gvadd]; + if ([gvdep length] > 0) + { + [buf appendString: @" deprecated at "]; + [buf appendString: gvdep]; + } if ([gvrem length] > 0) { [buf appendString: @" removed at "]; @@ -2403,9 +2426,16 @@ static NSString *mainFont = nil; else if ([gvadd length] > 0) { [buf appendString: indent]; - [buf appendString: @"Releases:"]; - [buf appendString: @"GNUstep "]; + [buf appendString: @"Releases: "]; + [buf appendString: project]; + [buf appendString: @" "]; [buf appendString: gvadd]; + if ([gvdep length] > 0) + { + [buf appendString: @" deprecated at "]; + [buf appendString: gvdep]; + } + [buf appendString: @"
\n"]; if ([gvrem length] > 0) { [buf appendString: @" removed at "]; diff --git a/Tools/AGSParser.m b/Tools/AGSParser.m index ec74c1f11..f0416e45e 100644 --- a/Tools/AGSParser.m +++ b/Tools/AGSParser.m @@ -2946,6 +2946,9 @@ fail: return [self skipRemainderOfLine]; } hadOstep = YES; + [top removeObjectForKey: @"ovadd"]; + [top removeObjectForKey: @"ovdep"]; + [top removeObjectForKey: @"ovrem"]; } else if ([arg isEqual: @"GS_API_VERSION"] == YES) { @@ -2956,17 +2959,16 @@ fail: return [self skipRemainderOfLine]; } hadGstep = YES; + [top removeObjectForKey: @"gvadd"]; + [top removeObjectForKey: @"gvdep"]; + [top removeObjectForKey: @"gvrem"]; } else { break; } - while (pos < length - && [spaces characterIsMember: buffer[pos]] == YES) - { - pos++; - } + [self parseSpace: spaces]; if (pos < length && buffer[pos] == '(') { pos++; @@ -2987,11 +2989,7 @@ fail: [top setObject: ver forKey: @"gvadd"]; } - while (pos < length - && [spaces characterIsMember: buffer[pos]] == YES) - { - pos++; - } + [self parseSpace: spaces]; if (pos < length && buffer[pos] == ',') { pos++; @@ -3002,18 +3000,7 @@ fail: ver = @"9999"; } i = [ver intValue]; - if (i == 9999 || [ver isEqualToString: @"NEVER"] == YES) - { - if (openstep) - { - [top removeObjectForKey: @"ovrem"]; - } - else - { - [top removeObjectForKey: @"gvrem"]; - } - } - else + if (i != 9999 && [ver isEqualToString: @"NEVER"] == NO) { ver = [NSString stringWithFormat: @"%d.%d", i/100, i%100]; if (openstep) @@ -3026,21 +3013,37 @@ fail: } } - while (pos < length - && [spaces characterIsMember: buffer[pos]] == YES) + [self parseSpace: spaces]; + if (pos < length && buffer[pos] == ',') { pos++; + ver = [self parseVersion]; + if ([ver length] == 0) + { + ver = @"9999"; + } + i = [ver intValue]; + if (i != 9999 && [ver isEqualToString: @"NEVER"] == NO) + { + ver = [NSString stringWithFormat: @"%d.%d", i/100, i%100]; + if (openstep) + { + [top setObject: ver forKey: @"ovdep"]; + } + else + { + [top setObject: ver forKey: @"gvdep"]; + } + } + [self parseSpace: spaces]; } + if (pos < length && buffer[pos] == ')') { pos++; } - while (pos < length - && [spaces characterIsMember: buffer[pos]] == YES) - { - pos++; - } + [self parseSpace: spaces]; if (pos < length-1 && buffer[pos] == '&' && buffer[pos+1] == '&') { pos += 2; @@ -3058,11 +3061,7 @@ fail: { BOOL isIfDef = [directive isEqual: @"ifdef"]; - while (pos < length - && [spaces characterIsMember: buffer[pos]] == YES) - { - pos++; - } + [self parseSpace: spaces]; if (pos < length && buffer[pos] != '\n') { NSMutableDictionary *top; @@ -3462,6 +3461,10 @@ fail: if (ovadd != nil) { [m appendFormat: @" ovadd=\"%@\"", ovadd]; + if ((s = [top objectForKey: @"ovdep"]) != nil) + { + [m appendFormat: @" ovdep=\"%@\"", s]; + } if ((s = [top objectForKey: @"ovrem"]) != nil) { [m appendFormat: @" ovrem=\"%@\"", s]; @@ -3470,6 +3473,10 @@ fail: if (gvadd != nil) { [m appendFormat: @" gvadd=\"%@\"", gvadd]; + if ((s = [top objectForKey: @"gvdep"]) != nil) + { + [m appendFormat: @" gvdep=\"%@\"", s]; + } if ((s = [top objectForKey: @"gvrem"]) != nil) { [m appendFormat: @" gvrem=\"%@\"", s]; diff --git a/Tools/gsdoc-1_0_2.dtd b/Tools/gsdoc-1_0_2.dtd index b3a33b7b7..006997310 100644 --- a/Tools/gsdoc-1_0_2.dtd +++ b/Tools/gsdoc-1_0_2.dtd @@ -240,11 +240,6 @@ is used to override some information from the same method in the superclass. If factory not set, instance method - - gvadd is the gnustep version at which this was introduced - gvrem is the gnustep version at which this was removed - ovadd is the OpenStep/OPENSTEP/MacOS-X version at which this was introduced - ovrem is the OpenStep/OPENSTEP/MacOS-X version at which this was removed --> @@ -264,42 +261,34 @@ @@ -408,8 +385,10 @@ name CDATA #REQUIRED super CDATA #IMPLIED gvadd CDATA #IMPLIED + gvdep CDATA #IMPLIED gvrem CDATA #IMPLIED ovadd CDATA #IMPLIED + ovdep CDATA #IMPLIED ovrem CDATA #IMPLIED > diff --git a/Tools/gsdoc.gsdoc b/Tools/gsdoc.gsdoc index fa756454c..464f51007 100644 --- a/Tools/gsdoc.gsdoc +++ b/Tools/gsdoc.gsdoc @@ -610,11 +610,13 @@ not need to write GSDoc using these elements, since they can be autogenerated from Objective-C source files and special comments within them. Most of the elements representing parts of the API - have optional attributes ovadd and ovrem which may be used to + have optional attributes ovadd, ovdep and ovrem which may be used to specify the OpenStep/OPENSTEP/MacOS-X versions at which the - documented element was added to or removed from the API, and - gvadd and gvrem which may be used to specify when an elment was - added to or removed from the GNUstep API.
+ documented element was added to, deprecated in, or removed from + the API, Similarly they have gvadd, gvdep and gvrem which may be + used to specify when an elment was added to or removed from + the API of the source code being documented + (eg a gnustep library).
The definition elements are -