diff --git a/ChangeLog b/ChangeLog index 9779f4555..1d72c80e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +Sat Jan 3 14:05:32 1998 Scott Christley + + * confdefs.h: Delete transient file. + + * src/include/Foundation.h: New file. + * src/include/NSEnumerator.h: New file. + * src/GNUmakefile: Install new header files. + * src/include/NSUtilities.h: Move NSEnumerator interface + to NSEnumerator.h file. + + * src/NSObject.m (-copyWithZone:): Eliminate semicolon. + + * Fix memory allocation function usage. (As reported by + Matthias Klose ). + * src/Connection.m (-_service_forwardForProxy:): Use + function instead of function pointer. + * src/Decoder.m (-decodeClass, -decodeSelectorWithName:): Likewise. + * src/Invocation.m (-initWithReturnType:): Likewise. + (-_initArgframeFrom:withType:retainArgs:): Likewise. + (-_deallocArgFrame): Likewise. + * src/NSAutoreleasePool.m (-reallyDealloc): Likewise. + * src/NSConnection.m (-_service_forwardForProxy:): Likewise. + * src/TextCStream.m (-decodeValueOfCType:at:withName:): Likewise. + * src/include/objc-gnu2next.h (list_cons): Likewise. + (list_remove_head, list_free): Likewise. + * src/include/preface.h.in (OBJC_FREE): Likewise. + Fri Jan 2 13:04:53 1998 Adam Fedor * doc/Makefile.postamble: Generate html,texi from tmpl.texi files. diff --git a/Headers/gnustep/base/Foundation.h b/Headers/gnustep/base/Foundation.h new file mode 100644 index 000000000..39b35f804 --- /dev/null +++ b/Headers/gnustep/base/Foundation.h @@ -0,0 +1,48 @@ +/* + Global include file for the GNUstep Base Library. + + Copyright (C) 1997 Free Software Foundation, Inc. + + Written by: Scott Christley + Date: Sep 1997 + + This file is part of the GNUstep Base Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __Foundation_h_GNUSTEP_BASE_INCLUDE +#define __Foundation_h_GNUSTEP_BASE_INCLUDE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif /* __Foundation_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSEnumerator.h b/Headers/gnustep/base/NSEnumerator.h new file mode 100644 index 000000000..0855fc7b2 --- /dev/null +++ b/Headers/gnustep/base/NSEnumerator.h @@ -0,0 +1,35 @@ +/* + NSEnumerator.h + + Copyright (C) 1998 Free Software Foundation, Inc. + + Author: Scott Christley + Date: January 1998 + + This file is part of the GNUstep Base Library. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef __NSEnumerator_h_GNUSTEP_BASE_INCLUDE +#define __NSEnumerator_h_GNUSTEP_BASE_INCLUDE + +#include + +@interface NSEnumerator : NSObject +- (id) nextObject; +@end + +#endif /* __NSEnumerator_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/NSUtilities.h b/Headers/gnustep/base/NSUtilities.h index f5d4d8a46..399a2cc76 100644 --- a/Headers/gnustep/base/NSUtilities.h +++ b/Headers/gnustep/base/NSUtilities.h @@ -24,10 +24,9 @@ #ifndef __NSUtilties_h_GNUSTEP_BASE_INCLUDE #define __NSUtilties_h_GNUSTEP_BASE_INCLUDE -#include - -@interface NSEnumerator : NSObject -- (id) nextObject; -@end +#include +#include +#include +#include #endif /* __NSUtilties_h_GNUSTEP_BASE_INCLUDE */ diff --git a/Headers/gnustep/base/objc-gnu2next.h b/Headers/gnustep/base/objc-gnu2next.h index 10a94963f..8571a39c6 100644 --- a/Headers/gnustep/base/objc-gnu2next.h +++ b/Headers/gnustep/base/objc-gnu2next.h @@ -164,7 +164,7 @@ list_cons(void* head, struct objc_list* tail) { struct objc_list* cell; - cell = (struct objc_list*)(*objc_malloc)(sizeof(struct objc_list)); + cell = (struct objc_list*)objc_malloc(sizeof(struct objc_list)); cell->head = head; cell->tail = tail; return cell; @@ -209,11 +209,11 @@ list_remove_head(struct objc_list** list) { struct objc_list* tail = (*list)->tail; /* fetch next */ *(*list) = *tail;/* copy next to list head */ - (*objc_free)(tail);/* free next */ + objc_free(tail);/* free next */ } else/* only one element in list */ { - (*objc_free)(*list); + objc_free(*list); (*list) = 0; } } @@ -265,7 +265,7 @@ list_free(struct objc_list* list) if(list) { list_free(list->tail); - (*objc_free)(list); + objc_free(list); } } diff --git a/Headers/gnustep/base/preface.h.in b/Headers/gnustep/base/preface.h.in index 5791c5c32..7c5ba6d51 100644 --- a/Headers/gnustep/base/preface.h.in +++ b/Headers/gnustep/base/preface.h.in @@ -95,7 +95,7 @@ extern const char o_NeXT_cc_version[]; ((VAR) = (TYPE *) objc_realloc ((VAR), (unsigned)(NUM)*sizeof(TYPE))) #define OBJC_CALLOC(VAR, TYPE, NUM) \ ((VAR) = (TYPE *) objc_calloc ((unsigned)(NUM), sizeof(TYPE))) -#define OBJC_FREE(PTR) (*objc_free)((PTR)) +#define OBJC_FREE(PTR) objc_free (PTR) #ifndef MAX #define MAX(a,b) \ diff --git a/Source/Connection.m b/Source/Connection.m index b05a0b499..ba682a1f5 100644 --- a/Source/Connection.m +++ b/Source/Connection.m @@ -763,7 +763,7 @@ static int messages_received_count; NS_ENDHANDLER; if (forward_type) - (*objc_free) (forward_type); + objc_free (forward_type); } - (Proxy*) rootProxy diff --git a/Source/Decoder.m b/Source/Decoder.m index 745d85c42..96d71015a 100644 --- a/Source/Decoder.m +++ b/Source/Decoder.m @@ -413,7 +413,7 @@ static id dummyObject; fprintf(stderr, "Decoder decoding registered class xref %u\n", xref); } - (*objc_free) (class_name); + objc_free (class_name); break; } default: @@ -496,8 +496,8 @@ static id dummyObject; fprintf(stderr, "Decoder decoding registered sel xref %u\n", xref); } - (*objc_free)(sel_name); - (*objc_free)(sel_types); + objc_free(sel_name); + objc_free(sel_types); break; } default: diff --git a/Source/GNUmakefile b/Source/GNUmakefile index 99c76137a..99e375a3c 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -382,6 +382,7 @@ NSCallBacks.h \ tzfile.h BASE_HEADERS = \ +Foundation/Foundation.h \ Foundation/byte_order.h \ Foundation/DistributedObjects.h \ Foundation/NSArchiver.h \ @@ -401,6 +402,7 @@ Foundation/NSDebug.h \ Foundation/NSDictionary.h \ Foundation/NSDistantObject.h \ Foundation/NSDistributedLock.h \ +Foundation/NSEnumerator.h \ Foundation/NSException.h \ Foundation/NSFileHandle.h \ Foundation/NSFileManager.h \ diff --git a/Source/Invocation.m b/Source/Invocation.m index 5c1a1ba75..c21ecfb5d 100644 --- a/Source/Invocation.m +++ b/Source/Invocation.m @@ -65,7 +65,7 @@ { /* Work around bug in objc_sizeof_type; it doesn't handle void type */ return_size = objc_sizeof_type (enc); - return_value = (*objc_calloc) (1, return_size); + return_value = objc_calloc (1, return_size); } else { @@ -329,9 +329,9 @@ my_method_get_next_argument (arglist_t argframe, /* allocate the argframe */ stack_argsize = types_get_size_of_stack_arguments (type); reg_argsize = types_get_size_of_register_arguments(type); - argframe = (arglist_t) (*objc_calloc) (1 ,sizeof(char*) + reg_argsize); + argframe = (arglist_t) objc_calloc (1 ,sizeof(char*) + reg_argsize); if (stack_argsize) - argframe->arg_ptr = (*objc_calloc) (1, stack_argsize); + argframe->arg_ptr = objc_calloc (1, stack_argsize); else argframe->arg_ptr = 0; @@ -461,8 +461,8 @@ my_method_get_next_argument (arglist_t argframe, if (argframe) { if (argframe->arg_ptr) - (*objc_free) (argframe->arg_ptr); - (*objc_free) (argframe); + objc_free (argframe->arg_ptr); + objc_free (argframe); } } diff --git a/Source/NSAutoreleasePool.m b/Source/NSAutoreleasePool.m index 2e77aab4a..7ad44fd96 100644 --- a/Source/NSAutoreleasePool.m +++ b/Source/NSAutoreleasePool.m @@ -343,7 +343,7 @@ pop_pool_from_cache (struct autorelease_thread_vars *tv) for (a = _released_head; a; ) { void *n = a->next; - (*objc_free) (a); + objc_free (a); a = n; } [super dealloc]; diff --git a/Source/NSConnection.m b/Source/NSConnection.m index 844ec329c..96d498632 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -1247,7 +1247,7 @@ static int messages_received_count; NS_ENDHANDLER; if (forward_type) - (*objc_free) (forward_type); + objc_free (forward_type); } - (void) _service_rootObject: rmc diff --git a/Source/NSObject.m b/Source/NSObject.m index 3525c6c45..c7b6ea1f9 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -149,7 +149,7 @@ extraRefCount (id anObject) return [[self alloc] init]; } -- copyWithZone:(NSZone *)zone; +- copyWithZone:(NSZone *)zone { return NSCopyObject (self, 0, zone); } diff --git a/Source/TextCStream.m b/Source/TextCStream.m index a8efcc11a..75ebe1301 100644 --- a/Source/TextCStream.m +++ b/Source/TextCStream.m @@ -332,7 +332,7 @@ if (debug_textcoder) \ freeWhenDone: YES] autorelease]; else - (*objc_free) (tmpname); + objc_free (tmpname); } diff --git a/confdefs.h b/confdefs.h deleted file mode 100644 index 8b1378917..000000000 --- a/confdefs.h +++ /dev/null @@ -1 +0,0 @@ -