From cff8d711c93c262d27b7810cd51966fa7ce0f96e Mon Sep 17 00:00:00 2001 From: CaS Date: Fri, 25 Oct 2002 14:54:35 +0000 Subject: [PATCH] Minor bugfix git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14838 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Tools/AGSParser.m | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) 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;