Lots of gsdoc updates

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@11148 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-10-15 14:42:56 +00:00
parent 91e8e0a6ea
commit 3d357aba9f
11 changed files with 664 additions and 121 deletions

View file

@ -169,6 +169,7 @@ GSMime.m \
GSSet.m \
GSString.m \
GSValue.m \
GSXML.m \
NSAttributedString.m \
NSArchiver.m \
NSArray.m \
@ -246,10 +247,6 @@ NSZone.m \
externs.m \
objc-load.m
ifeq ($(HAVE_LIBXML),1)
BASE_MFILES += GSXML.m
endif
ifeq ($(WITH_FFI),libffi)
GNU_MFILES += cifframe.m
BASE_MFILES += GSFFIInvocation.m
@ -282,6 +279,7 @@ tzfile.h
FOUNDATION_HEADERS = \
Foundation.h \
GSMime.h \
GSXML.h \
NSArchiver.h \
NSArray.h \
NSAttributedString.h \
@ -351,10 +349,6 @@ objc-load.h \
NSURL.h \
NSURLHandle.h
ifeq ($(HAVE_LIBXML),1)
FOUNDATION_HEADERS += GSXML.h
endif
UNICODE_HEADERS = \
unicode/caseconv.h \
unicode/cop.h \

View file

@ -28,6 +28,8 @@
#include <config.h>
#ifdef HAVE_LIBXML
#include <Foundation/GSXML.h>
#include <Foundation/NSData.h>
#include <Foundation/NSValue.h>
@ -2134,3 +2136,64 @@ fatalErrorFunction(void *ctx, const char *msg, ...)
}
}
@end
#else
#include <Foundation/NSObjCRuntime.h>
#include <Foundation/NSCoder.h>
/*
* Build dummy implementations of the classes if libxml is not available
*/
@interface GSXMLDummy : NSObject
@end
@interface GSXMLAttribute : GSXMLDummy
@end
@interface GSXMLDocument : GSXMLDummy
@end
@interface GSXMLHandler : GSXMLDummy
@end
@interface GSXMLNamespace : GSXMLDummy
@end
@interface GSXMLNode : GSXMLDummy
@end
@interface GSSAXHandler : GSXMLDummy
@end
@implementation GSXMLDummy
+ (id) allocWithZone: (NSZone*)z
{
NSLog(@"Not built with libxml ... %@ unusable in %@",
NSStringFromClass(self), NSStringFromSelector(_cmd));
return nil;
}
- (id) init
{
NSLog(@"Not built with libxml ... %@ unusable in %@",
NSStringFromClass([self class]), NSStringFromSelector(_cmd));
RELEASE(self);
return nil;
}
- (id) initWithCoder: (NSCoder*)aCoder
{
NSLog(@"Not built with libxml ... %@ unusable in %@",
NSStringFromClass([self class]), NSStringFromSelector(_cmd));
RELEASE(self);
return nil;
}
@end
@implementation GSXMLAttribute
@end
@implementation GSXMLDocument
@end
@implementation GSXMLHandler
@end
@implementation GSXMLNamespace
@end
@implementation GSXMLNode
@end
@implementation GSSAXHandler
@end
#endif

View file

@ -28,16 +28,26 @@
@implementation NSEnumerator
- (NSArray *)allObjects
- (NSArray*) allObjects
{
NSMutableArray *array;
id obj;
NSMutableArray *array;
id obj;
SEL nsel;
IMP nimp;
SEL asel;
IMP aimp;
array = [NSMutableArray arrayWithCapacity:10];
array = [NSMutableArray arrayWithCapacity: 10];
while((obj = [self nextObject]))
[array addObject:obj];
nsel = @selector(nextObject);
nimp = [self methodForSelector: nsel];
asel = @selector(addObject:);
aimp = [array methodForSelector: asel];
while ((obj = (*nimp)(self, nsel)) != nil)
{
(*aimp)(array, asel, obj);
}
return array;
}