diff --git a/ChangeLog b/ChangeLog index fa8f4b571..f75435281 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +Tue Jul 28 12:57:54 1998 Adam Fedor + + * src/GNUmakefile: Remove NEXTSTEP classes. + + * src/NSConcreteNumber [-copy]: Removed. + [-copyWithZone:]: Likewise. + * src/NSNumber: [-copy]: Implement + [-copyWithZone:]: Likewise. + * src/NSDate.m [-copyWithZone:]: Correct implementation. + * src/NSException.m [-copyWithZone:]: Likewise. + * src/NSPort.m: [-copyWithZone:]: Likewise. + * src/NSValue.m: [-copyWithZone:]: Likewise. + Tue Jul 21 09:15:32 1998 Adam Fedor * src/GNUmakefile: Removed redundant classes. diff --git a/Documentation/todo.tmpl.texi b/Documentation/todo.tmpl.texi index d05386b53..6c044a917 100644 --- a/Documentation/todo.tmpl.texi +++ b/Documentation/todo.tmpl.texi @@ -10,6 +10,12 @@ @itemize @bullet +@item Implement Formatter classes (NSDateFormatter, etc) [5] (980722). + +@item Check that every class implements coding (correctly). [2, NSCoder] (980721). + +@item Check that every class implements copying (correctly) - i.e. non-mutable classes should just retain, etc. [1, NSCopying] (980721). + @item Implement [NSDeserializer +deserializePropertyListLazilyFromData:atCursor:length:mutableContainers:] [3 NSProxy] (980712) diff --git a/Source/GNUmakefile b/Source/GNUmakefile index f9ba94e46..3237c4c94 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -460,7 +460,6 @@ unicode/decomp.h \ unicode/nextstep.h HEADERS_INSTALL = $(GNU_HEADERS) \ - $(NEXTSTEP_HEADERS) \ $(BASE_HEADERS) DIST_FILES = \ @@ -470,11 +469,6 @@ DIST_FILES = \ $(GNU_MFILES) \ $(GNU_CFILES) \ $(GNU_OTHER_SRCFILES) \ - $(NEXTSTEP_MFILES) \ - $(NEXTSTEP_CFILES) \ - $(NEXTSTEP_DERIVED_CFILES) \ - $(NEXTSTEP_HEADERS) \ - $(NEXTSTEP_OTHER_SRCFILES) \ $(BASE_MFILES) \ $(BASE_CFILES) \ $(BASE_OTHER_SRCFILES) \ @@ -490,17 +484,16 @@ include/o_map.h \ $(GNUSTEP_TARGET_CPU)/$(GNUSTEP_TARGET_OS)/config.h # The C source files to be compiled -libgnustep-base_C_FILES = $(GNU_CFILES) $(NEXTSTEP_CFILES) \ - $(NEXTSTEP_DERIVED_CFILES) $(BASE_CFILES) +libgnustep-base_C_FILES = $(GNU_CFILES) $(BASE_CFILES) # The Objective-C source files to be compiled -libgnustep-base_OBJC_FILES = $(GNU_MFILES) $(NEXTSTEP_MFILES) \ +libgnustep-base_OBJC_FILES = $(GNU_MFILES) \ $(BASE_MFILES) $(NSVALUE_MFILES) $(NSNUMBER_MFILES) libgnustep-base_HEADER_FILES_DIR = . libgnustep-base_HEADER_FILES_INSTALL_DIR = /gnustep -libgnustep-base_HEADER_FILES = $(NEXTSTEP_HEADERS) $(BASE_HEADERS) +libgnustep-base_HEADER_FILES = $(BASE_HEADERS) -include Makefile.preamble diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index 421d8e5bf..01a9c1178 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -64,5 +64,4 @@ ADDITIONAL_LIB_DIRS = # Additional directories to be created during installation ADDITIONAL_INSTALL_DIRS = $(GNUSTEP_HEADERS)/gnustep/base \ $(GNUSTEP_HEADERS)/gnustep/Foundation \ - $(GNUSTEP_HEADERS)/gnustep/objc \ $(GNUSTEP_HEADERS)/gnustep/unicode \ diff --git a/Source/NSBundle.m b/Source/NSBundle.m index a5647ff6d..67312de72 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -46,23 +46,6 @@ #include /* Needed by sys/stat */ #endif -/* Deal with strchr: */ -#if STDC_HEADERS || HAVE_STRING_H -#include -/* An ANSI string.h and pre-ANSI memory.h might conflict. */ -#if !STDC_HEADERS && HAVE_MEMORY_H -#include -#endif /* not STDC_HEADERS and HAVE_MEMORY_H */ -#define rindex strrchr -#define index strchr -#define bcopy(s, d, n) memcpy ((d), (s), (n)) -#define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) -#define bzero(s, n) memset ((s), 0, (n)) -#else /* not STDC_HEADERS and not HAVE_STRING_H */ -#include -/* memory.h and strings.h conflict on some systems. */ -#endif /* not STDC_HEADERS and not HAVE_STRING_H */ - /* For DIR and diropen() */ #if HAVE_DIRENT_H # include diff --git a/Source/NSConcreteNumber.m b/Source/NSConcreteNumber.m index b968c2f32..fabb5d64e 100644 --- a/Source/NSConcreteNumber.m +++ b/Source/NSConcreteNumber.m @@ -304,21 +304,6 @@ return [super isEqual: o]; } -- (id) copy -{ - return [self copyWithZone: NSDefaultMallocZone()]; -} - -- copyWithZone: (NSZone*)zone -{ - if (NSShouldRetainWithZone(self, zone)) { - return [self retain]; - } - else { - return NSCopyObject(self, 0, zone); - } -} - - (NSString *)descriptionWithLocale: (NSDictionary*)locale { return [NSString stringWithFormat:TYPE_FORMAT, data]; diff --git a/Source/NSDate.m b/Source/NSDate.m index 4affb4e7b..756170246 100644 --- a/Source/NSDate.m +++ b/Source/NSDate.m @@ -154,7 +154,7 @@ if (NSShouldRetainWithZone(self, zone)) return [self retain]; else - return [super copyWithZone: zone]; + return NSCopyObject(self, 0, zone); } - (Class) classForConnectedCoder: aRmc diff --git a/Source/NSException.m b/Source/NSException.m index 634d1ea46..7106e4f44 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -166,7 +166,7 @@ _NSFoundationUncaughtExceptionHandler(NSException *exception) if (NSShouldRetainWithZone(self, zone)) return [self retain]; else - return [[super copyWithZone:zone] deepen]; + return [NSCopyObject(self, 0, zone) deepen]; } diff --git a/Source/NSNotification.m b/Source/NSNotification.m index 3434822ab..4065158cd 100644 --- a/Source/NSNotification.m +++ b/Source/NSNotification.m @@ -23,6 +23,7 @@ #include #include +#include @implementation NSNotification diff --git a/Source/NSNotificationCenter.m b/Source/NSNotificationCenter.m index 78bebf04a..9c0b76654 100644 --- a/Source/NSNotificationCenter.m +++ b/Source/NSNotificationCenter.m @@ -23,7 +23,7 @@ #include #include -#include +#include #include @implementation NSNotificationCenter diff --git a/Source/NSNumber.m b/Source/NSNumber.m index 32ebe545a..6ddfede1c 100644 --- a/Source/NSNumber.m +++ b/Source/NSNumber.m @@ -262,14 +262,17 @@ - (id) copy { - [self subclassResponsibility:_cmd]; - return nil; + return [self retain]; } - copyWithZone: (NSZone*)zone { - [self subclassResponsibility:_cmd]; - return nil; + if (NSShouldRetainWithZone(self, zone)) { + return [self retain]; + } + else { + return NSCopyObject(self, 0, zone); + } } - (NSString*) description diff --git a/Source/NSPort.m b/Source/NSPort.m index cec0279e4..436181e1d 100644 --- a/Source/NSPort.m +++ b/Source/NSPort.m @@ -46,7 +46,7 @@ NSString *NSPortTimeoutException - copyWithZone: (NSZone*)aZone { - return [super copyWithZone:aZone]; + return NSCopyObject(self, 0, zone); } - delegate @@ -56,7 +56,6 @@ NSString *NSPortTimeoutException - (void) encodeWithCoder: (NSCoder*)aCoder { - [super encodeWithCoder: aCoder]; } - init @@ -67,7 +66,6 @@ NSString *NSPortTimeoutException - initWithCoder: (NSCoder*)aCoder { - self = [super initWithCoder: aCoder]; return self; } diff --git a/Source/NSValue.m b/Source/NSValue.m index 44e7000c6..678bf4c79 100644 --- a/Source/NSValue.m +++ b/Source/NSValue.m @@ -90,7 +90,7 @@ - (id)copy { - return [self copyWithZone: NSDefaultMallocZone()]; + return [self retain]; } - (id)copyWithZone:(NSZone *)zone @@ -98,7 +98,7 @@ if (NSShouldRetainWithZone(self, zone)) return [self retain]; else - return [[super copyWithZone:zone] deepen]; + return [NSCopyObject(self, 0, zone) deepen]; } /* Returns the concrete class associated with the type encoding */ diff --git a/Source/NotificationDispatcher.m b/Source/NotificationDispatcher.m index 08aa2b9cd..c018e2c8f 100644 --- a/Source/NotificationDispatcher.m +++ b/Source/NotificationDispatcher.m @@ -558,7 +558,7 @@ static NotificationDispatcher *default_notification_dispatcher = nil; - (void) postNotification: notification { - id notification_name = [notification name]; + id notification_name = [(NSNotification *)notification name]; id notification_object = [notification object]; id nr; LinkedList *nr_list;