From 0deff55b4e208b1a90b0ff2c2d8cdea737c7d3da Mon Sep 17 00:00:00 2001 From: richard Date: Sun, 10 Sep 2000 05:34:31 +0000 Subject: [PATCH] Some tidyups git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7456 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 8 ++++++++ Headers/gnustep/base/NSDistributedNotificationCenter.h | 6 +++--- Source/NSAttributedString.m | 6 ++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6243823e2..e8449efb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-09-08 Richard Frith-Macdonald + + * Source/NSAttributedString.m: Make -description produce output in + same format as MacOS-X + * Source/NSDistributedNotificationCenter.m: update method return + types for macOS-X complience. + * Headers/base/NSDistributedNotificationCenter.h: ditto. + 2000-09-08 Richard Frith-Macdonald * Source/NSGString.m: Removed obsolete methods and added range checks. diff --git a/Headers/gnustep/base/NSDistributedNotificationCenter.h b/Headers/gnustep/base/NSDistributedNotificationCenter.h index 13ece7e16..2d502a069 100644 --- a/Headers/gnustep/base/NSDistributedNotificationCenter.h +++ b/Headers/gnustep/base/NSDistributedNotificationCenter.h @@ -41,14 +41,14 @@ typedef enum { GS_EXPORT NSString *NSLocalNotificationCenterType; -@interface NSDistributedNotificationCenter : NSObject +@interface NSDistributedNotificationCenter : NSNotificationCenter { NSRecursiveLock *_centerLock; /* For thread safety. */ id _remote; /* Proxy for center. */ BOOL _suspended; /* Is delivery suspended? */ } -+ (id) defaultCenter; -+ (id) notificationCenterForType: (NSString*)type; ++ (NSNotificationCenter*) defaultCenter; ++ (NSNotificationCenter*) notificationCenterForType: (NSString*)type; - (void) addObserver: (id)anObserver selector: (SEL)aSelector diff --git a/Source/NSAttributedString.m b/Source/NSAttributedString.m index 1319db60a..18c6acc0d 100644 --- a/Source/NSAttributedString.m +++ b/Source/NSAttributedString.m @@ -190,14 +190,12 @@ static Class NSMutableAttributedString_concrete_class; NSDictionary *attrs; NSMutableString *desc; - desc = AUTORELEASE([[super description] mutableCopy]); - [desc appendFormat: @" Length: %u", length]; + desc = [[NSMutableString alloc] init]; while (index < length && (attrs = [self attributesAtIndex: index effectiveRange: &r]) != nil) { index = NSMaxRange(r); - [desc appendFormat: @"\nRange: %@ Chars:'%@' Attrs: %@", - NSStringFromRange(r), [string substringFromRange: r], attrs]; + [desc appendFormat: @"%@%@", [string substringFromRange: r], attrs]; } return desc; }