Some tidyups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@7456 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-09-10 05:34:31 +00:00
parent 635a92d35d
commit 51f94716fb
3 changed files with 13 additions and 7 deletions

View file

@ -1,3 +1,11 @@
2000-09-08 Richard Frith-Macdonald <rfm@gnu.org>
* 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 <rfm@gnu.org>
* Source/NSGString.m: Removed obsolete methods and added range checks.

View file

@ -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

View file

@ -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;
}