From d7651856b96fd96c5b57ee31cff87674435f9f6d Mon Sep 17 00:00:00 2001 From: fedor Date: Mon, 12 Jan 2004 19:42:18 +0000 Subject: [PATCH] Minor changes for baseadd compilation and compiler warnings. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18394 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 14 ++++++++++++++ Source/Additions/GSLock.m | 1 + Source/Additions/GSObjCRuntime.m | 4 ++++ Source/Additions/GSXML.m | 11 ++++++++++- Source/Makefile.preamble | 1 + Tools/AGSHtml.m | 6 +++--- Tools/AGSOutput.m | 2 +- 7 files changed, 34 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c010e67ba..753e94802 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2004-01-12 Adam Fedor + + * Source/Makefile.preamble: Add library depends for baseadd + * Source/Additions/GSLock.m: Include GSCategories. + * Source/Additions/GSObjCRuntime.m: Define -methodForSelector: + since Apple doesn't. + * Source/Additions/GSXML.m: Idem as well as GSXPathObject method. + Change warnings varialbe to NSHashTable*. + + * Tools/AGSHtml.m ([AGSHtml -outputNode:to:]): Change name + of block variable to avoid clash + * Tools/AGSOutput.m ([AGSOutput -split:]): Initialize local vars. + Changes suggested by Stephane Corthesy. + 2003-12-20 Sheldon Gill * Source/NSProcessInfo.m (+load): Fix coding standard violations. diff --git a/Source/Additions/GSLock.m b/Source/Additions/GSLock.m index d34685b1c..948dacfe0 100644 --- a/Source/Additions/GSLock.m +++ b/Source/Additions/GSLock.m @@ -31,6 +31,7 @@ #include #include "GNUstepBase/GSLock.h" #include "GNUstepBase/GNUstep.h" +#include "GNUstepBase/GSCategories.h" /** * This implements a class which, when used in single-threaded mode, diff --git a/Source/Additions/GSObjCRuntime.m b/Source/Additions/GSObjCRuntime.m index de84aa882..33720482e 100644 --- a/Source/Additions/GSObjCRuntime.m +++ b/Source/Additions/GSObjCRuntime.m @@ -53,6 +53,10 @@ @class NSNull; +@interface NSObject (MissingFromMacOSX) +- (IMP) methodForSelector: (SEL)aSelector; +@end + /** Deprecated ... use GSObjCFindVariable() */ BOOL GSFindInstanceVariable(id obj, const char *name, diff --git a/Source/Additions/GSXML.m b/Source/Additions/GSXML.m index bae1c4c0a..2decfd723 100644 --- a/Source/Additions/GSXML.m +++ b/Source/Additions/GSXML.m @@ -119,6 +119,15 @@ static xmlParserInputPtr loadEntityFunction(const unsigned char *url, const unsigned char *eid, xmlParserCtxtPtr ctxt); +@interface NSObject (MissingFromMacOSX) +- (IMP) methodForSelector: (SEL)aSelector; +@end + +@interface GSXPathObject(Private) ++ (id) _newWithNativePointer: (xmlXPathObject *)lib + context: (GSXPathContext *)context; +@end + @interface GSXMLDocument (GSPrivate) - (id) _initFrom: (void*)data parent: (id)p ownsLib: (BOOL)f; @end @@ -1643,7 +1652,7 @@ static NSMapTable *nodeNames = 0; */ @implementation GSXMLParser -static NSMapTable *warnings = 0; +static NSHashTable *warnings = 0; static NSString *endMarker = @"At end of incremental parse"; diff --git a/Source/Makefile.preamble b/Source/Makefile.preamble index a2178b309..250fedc36 100644 --- a/Source/Makefile.preamble +++ b/Source/Makefile.preamble @@ -79,6 +79,7 @@ libgnustep-base_LIBRARIES_DEPEND_UPON += -lobjc endif ifeq ($(shared),yes) libgnustep-base_LIBRARIES_DEPEND_UPON += $(CONFIG_SYSTEM_LIBS) +libgnustep-baseadd_LIBRARIES_DEPEND_UPON += $(CONFIG_SYSTEM_LIBS) endif # diff --git a/Tools/AGSHtml.m b/Tools/AGSHtml.m index bb6586c8b..ea429186b 100644 --- a/Tools/AGSHtml.m +++ b/Tools/AGSHtml.m @@ -1574,13 +1574,13 @@ static NSMutableSet *textNodes = nil; } else if ([name isEqual: @"protocol"] == YES) { - NSString *name = [prop objectForKey: @"name"]; + NSString *value = [prop objectForKey: @"name"]; - unit = [NSString stringWithFormat: @"(%@)", name]; + unit = [NSString stringWithFormat: @"(%@)", value]; [buf appendString: indent]; [buf appendString: @"

"]; [buf appendString: - [self makeAnchor: unit ofType: @"protocol" name: name]]; + [self makeAnchor: unit ofType: @"protocol" name: value]]; [buf appendString: @"

\n"]; [self outputUnit: node to: buf]; unit = nil; diff --git a/Tools/AGSOutput.m b/Tools/AGSOutput.m index b06813ece..bea5abdf9 100644 --- a/Tools/AGSOutput.m +++ b/Tools/AGSOutput.m @@ -1843,7 +1843,7 @@ static BOOL snuggleStart(NSString *t) unsigned ePos = r.location; NSString *cName = nil; NSString *mName = nil; - unichar c; + unichar c = 0; BOOL isProtocol = NO; if (pos < ePos