diff --git a/ChangeLog b/ChangeLog index 432f69e8a..34b023b47 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-22 Richard Frith-Macdonald + + * Tools/AGSParser.m: Avoid duplication of method comments when + parsing the same file as both header and source. + 2002-10-22 Richard Frith-Macdonald * Tools/AGSOutput.m: ([-split:]) In links generated from class and diff --git a/Tools/AGSParser.m b/Tools/AGSParser.m index 5c139cba4..28316743d 100644 --- a/Tools/AGSParser.m +++ b/Tools/AGSParser.m @@ -2484,8 +2484,10 @@ fail: } else if ((exist = [methods objectForKey: token]) != nil) { - NSArray *a0; - NSArray *a1; + NSArray *a0; + NSArray *a1; + NSString *c0; + NSString *c1; /* * Merge info from implementation into existing version. @@ -2519,8 +2521,19 @@ fail: } } - [self appendComment: [method objectForKey: @"Comment"] - to: exist]; + /* + * If the old comment from the header parsing is + * the same as the new comment from the source + * parsing, assume we parsed the same file as both + * source and header ... otherwise append the new + * comment. + */ + c0 = [exist objectForKey: @"Comment"]; + c1 = [method objectForKey: @"Comment"]; + if ([c0 isEqual: c1] == NO) + { + [self appendComment: c1 to: exist]; + } [exist setObject: @"YES" forKey: @"Implemented"]; } break;