SAX2 fixes and a minor path fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19609 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2004-06-24 09:26:01 +00:00
parent 7a6934a0db
commit 082f9a65f2
3 changed files with 176 additions and 283 deletions

View file

@ -2,6 +2,11 @@
* Source/NSIndexSet.m: Remove some redundant code for clarity. * Source/NSIndexSet.m: Remove some redundant code for clarity.
([containsIndexes:]) implemented. ([containsIndexes:]) implemented.
* Source/NSUser.m: NSSearchPathForDirectoriesInDomains() fix for user
domain developer directory.
* Source/Additions/GSXML.m: SAX2 fixes ... get element attributes
from libxml2 properly. Make SAX2 element start/end methods call old
methods for compatibility. Tidy somewhat, re-enable SAX2 support.
2004-06-22 Adrian Robert <arobert@cogsci.ucsd.edu> 2004-06-22 Adrian Robert <arobert@cogsci.ucsd.edu>

View file

@ -44,6 +44,8 @@
#ifdef HAVE_LIBXML #ifdef HAVE_LIBXML
// #undef HAVE_LIBXML_SAX2_H
#include "GNUstepBase/GSXML.h" #include "GNUstepBase/GSXML.h"
#ifndef NeXT_Foundation_LIBRARY #ifndef NeXT_Foundation_LIBRARY
#include <Foundation/NSData.h> #include <Foundation/NSData.h>
@ -60,8 +62,6 @@
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#endif #endif
#undef HAVE_LIBXML_SAX2_H
/* libxml headers */ /* libxml headers */
#include <libxml/tree.h> #include <libxml/tree.h>
#include <libxml/entities.h> #include <libxml/entities.h>
@ -2641,58 +2641,31 @@ loadEntityFunction(const unsigned char *url, const unsigned char *eid,
static void static void
startDocumentFunction(void *ctx) startDocumentFunction(void *ctx)
{ {
START(startDocument, void, (id,SEL)); NSCAssert(ctx,@"No Context");
[HANDLER startDocument];
if (imp == treeImp)
{
TREEFUN(startDocument, (ctx));
}
else
{
(*imp)(HANDLER, sel);
}
} }
static void static void
endDocumentFunction(void *ctx) endDocumentFunction(void *ctx)
{ {
START(endDocument, void, (id,SEL)); NSCAssert(ctx,@"No Context");
[HANDLER endDocument];
if (imp == treeImp)
{
TREEFUN(endDocument, (ctx));
}
else
{
(*imp)(HANDLER, sel);
}
} }
static int static int
isStandaloneFunction(void *ctx) isStandaloneFunction(void *ctx)
{ {
START(isStandalone, int, (id,SEL)); NSCAssert(ctx,@"No Context");
return [HANDLER isStandalone];
if (imp == treeImp)
{
return TREEFUN(isStandalone, (ctx));
}
else
{
return (*imp)(HANDLER, sel);
}
} }
static int static int
hasInternalSubsetFunction(void *ctx) hasInternalSubsetFunction(void *ctx)
{ {
int has = -1; int has;
START(hasInternalSubset, int, (id,SEL));
if (imp != treeImp) NSCAssert(ctx,@"No Context");
{ has = [HANDLER hasInternalSubset];
has = (*imp)(HANDLER, sel);
}
if (has < 0) if (has < 0)
{ {
has = TREEFUN(hasInternalSubset, (ctx)); has = TREEFUN(hasInternalSubset, (ctx));
@ -2703,13 +2676,10 @@ hasInternalSubsetFunction(void *ctx)
static int static int
hasExternalSubsetFunction(void *ctx) hasExternalSubsetFunction(void *ctx)
{ {
int has = -1; int has;
START(hasExternalSubset, int, (id,SEL));
if (imp != treeImp) NSCAssert(ctx,@"No Context");
{ has = [HANDLER hasExternalSubset];
has = (*imp)(HANDLER, sel);
}
if (has < 0) if (has < 0)
{ {
has = TREEFUN(hasExternalSubset, (ctx)); has = TREEFUN(hasExternalSubset, (ctx));
@ -2721,54 +2691,34 @@ static void
internalSubsetFunction(void *ctx, const unsigned char *name, internalSubsetFunction(void *ctx, const unsigned char *name,
const xmlChar *ExternalID, const xmlChar *SystemID) const xmlChar *ExternalID, const xmlChar *SystemID)
{ {
START(internalSubset:externalID:systemID:, BOOL, (id,SEL,id,id,id)); NSCAssert(ctx,@"No Context");
if (imp == treeImp || (*imp)(HANDLER, sel, UTF8Str(name), [HANDLER internalSubset: UTF8Str(name)
UTF8Str(ExternalID), UTF8Str(SystemID)) == NO) externalID: UTF8Str(ExternalID)
{ systemID: UTF8Str(SystemID)];
TREEFUN(internalSubset, (ctx, name, ExternalID, SystemID));
}
} }
static void static void
externalSubsetFunction(void *ctx, const unsigned char *name, externalSubsetFunction(void *ctx, const unsigned char *name,
const xmlChar *ExternalID, const xmlChar *SystemID) const xmlChar *ExternalID, const xmlChar *SystemID)
{ {
START(externalSubset:externalID:systemID:, BOOL, (id,SEL,id,id,id)); NSCAssert(ctx,@"No Context");
if (imp == treeImp || (*imp)(HANDLER, sel, UTF8Str(name), [HANDLER externalSubset: UTF8Str(name)
UTF8Str(ExternalID), UTF8Str(SystemID)) == NO) externalID: UTF8Str(ExternalID)
{ systemID: UTF8Str(SystemID)];
TREEFUN(externalSubset, (ctx, name, ExternalID, SystemID));
}
} }
static xmlEntityPtr static xmlEntityPtr
getEntityFunction(void *ctx, const unsigned char *name) getEntityFunction(void *ctx, const unsigned char *name)
{ {
START(getEntity:, xmlEntityPtr, (id,SEL,id)); NSCAssert(ctx,@"No Context");
return [HANDLER getEntity: UTF8Str(name)];
if (imp != treeImp)
{
return (*imp)(HANDLER, sel, UTF8Str(name));
}
else
{
return TREEFUN(getEntity, (ctx, name));
}
} }
static xmlEntityPtr static xmlEntityPtr
getParameterEntityFunction(void *ctx, const unsigned char *name) getParameterEntityFunction(void *ctx, const unsigned char *name)
{ {
START(getParameterEntity:, xmlEntityPtr, (id,SEL,id)); NSCAssert(ctx,@"No Context");
return [HANDLER getParameterEntity: UTF8Str(name)];
if (imp != treeImp)
{
return (*imp)(HANDLER, sel, UTF8Str(name));
}
else
{
return TREEFUN(getParameterEntity, (ctx, name));
}
} }
static void static void
@ -2776,17 +2726,12 @@ entityDeclFunction(void *ctx, const unsigned char *name, int type,
const unsigned char *publicId, const unsigned char *systemId, const unsigned char *publicId, const unsigned char *systemId,
unsigned char *content) unsigned char *content)
{ {
START(entityDecl:type:public:system:content:, void, (id,SEL,id,int,id,id,id)); NSCAssert(ctx,@"No Context");
[HANDLER entityDecl: UTF8Str(name)
if (imp != treeImp) type: type
{ public: UTF8Str(publicId)
(*imp)(HANDLER, sel, UTF8Str(name), type, UTF8Str(publicId), system: UTF8Str(systemId)
UTF8Str(systemId), UTF8Str(content)); content: UTF8Str(content)];
}
else
{
TREEFUN(entityDecl, (ctx, name, type, publicId, systemId, content));
}
} }
static void static void
@ -2794,49 +2739,30 @@ attributeDeclFunction(void *ctx, const unsigned char *elem,
const unsigned char *name, int type, int def, const unsigned char *name, int type, int def,
const unsigned char *defaultValue, xmlEnumerationPtr tree) const unsigned char *defaultValue, xmlEnumerationPtr tree)
{ {
START(attributeDecl:name:type:typeDefValue:defaultValue:, void, (id,SEL,id,id,int,int,id)); NSCAssert(ctx,@"No Context");
[HANDLER attributeDecl: UTF8Str(elem)
if (imp != treeImp) name: UTF8Str(name)
{ type: type
(*imp)(HANDLER, sel, UTF8Str(elem), UTF8Str(name), type, def, typeDefValue: def
UTF8Str(defaultValue)); defaultValue: UTF8Str(defaultValue)];
}
else
{
TREEFUN(attributeDecl, (ctx, elem, name, type, def, defaultValue, tree));
}
} }
static void static void
elementDeclFunction(void *ctx, const unsigned char *name, int type, elementDeclFunction(void *ctx, const unsigned char *name, int type,
xmlElementContentPtr content) xmlElementContentPtr content)
{ {
START(elementDecl:type:, void, (id,SEL,id,int)); NSCAssert(ctx,@"No Context");
[HANDLER elementDecl: UTF8Str(name) type: type];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8Str(name), type);
}
else
{
TREEFUN(elementDecl, (ctx, name, type, content));
}
} }
static void static void
notationDeclFunction(void *ctx, const unsigned char *name, notationDeclFunction(void *ctx, const unsigned char *name,
const unsigned char *publicId, const unsigned char *systemId) const unsigned char *publicId, const unsigned char *systemId)
{ {
START(notationDecl:public:system:, void, (id,SEL,id,id, id)); NSCAssert(ctx,@"No Context");
[HANDLER notationDecl: UTF8Str(name)
if (imp != treeImp) public: UTF8Str(publicId)
{ system: UTF8Str(systemId)];
(*imp)(HANDLER, sel, UTF8Str(name), UTF8Str(publicId), UTF8Str(systemId));
}
else
{
TREEFUN(notationDecl, (ctx, name, publicId, systemId));
}
} }
static void static void
@ -2849,63 +2775,36 @@ unparsedEntityDeclFunction(void *ctx, const unsigned char *name,
public: UTF8Str(publicId) public: UTF8Str(publicId)
system: UTF8Str(systemId) system: UTF8Str(systemId)
notationName: UTF8Str(notationName)]; notationName: UTF8Str(notationName)];
{
START(unparsedEntityDecl:public:system:notationName:, void, (id,SEL,id,id,id,id));
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8Str(name), UTF8Str(publicId), UTF8Str(systemId),
UTF8Str(notationName));
}
else
{
TREEFUN(unparsedEntityDecl, (ctx,name,publicId,systemId,notationName));
}
}
} }
static void static void
startElementFunction(void *ctx, const unsigned char *name, startElementFunction(void *ctx, const unsigned char *name,
const unsigned char **atts) const unsigned char **atts)
{ {
START(startElement:attributes:, void, (id,SEL,id,id)); NSMutableDictionary *dict;
if (imp != treeImp) NSCAssert(ctx,@"No Context");
dict = [NSMutableDictionary dictionary];
if (atts != NULL)
{ {
int i; int i = 0;;
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
NSString *key, *obj;
if (atts != NULL) while (atts[i] != NULL)
{ {
for (i = 0; (atts[i] != NULL); i++) NSString *key = UTF8Str(atts[i++]);
{ NSString *obj = UTF8Str(atts[i++]);
key = UTF8Str(atts[i++]);
obj = UTF8Str(atts[i]); [dict setObject: obj forKey: key];
[dict setObject: obj forKey: key];
}
} }
(*imp)(HANDLER, sel, UTF8Str(name), dict);
}
else
{
TREEFUN(startElement, (ctx, name, atts));
} }
[HANDLER startElement: UTF8Str(name)
attributes: dict];
} }
static void static void
endElementFunction(void *ctx, const unsigned char *name) endElementFunction(void *ctx, const unsigned char *name)
{ {
START(endElement:, void, (id,SEL,id)); [HANDLER endElement: UTF8Str(name)];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8Str(name));
}
else
{
TREEFUN(endElement, (ctx, name));
}
} }
#if HAVE_LIBXML_SAX2_H #if HAVE_LIBXML_SAX2_H
@ -2916,137 +2815,85 @@ startElementNsFunction(void *ctx, const unsigned char *name,
int nb_attributes, int nb_defaulted, int nb_attributes, int nb_defaulted,
const unsigned char **atts) const unsigned char **atts)
{ {
START(startElement:prefix:href:attributes:, void, (id,SEL,id,id,id,id)); NSMutableDictionary *dict;
NSString *elem;
if (imp != treeImp) NSCAssert(ctx,@"No Context");
elem = UTF8Str(name);
dict = [NSMutableDictionary dictionary];
if (atts != NULL)
{ {
int i; int i;
NSMutableDictionary *dict = [NSMutableDictionary dictionary]; int j;
NSString *key, *obj;
if (atts != NULL) for (i = j = 0; i < nb_attributes; i++, j += 5)
{ {
for (i = 0; (atts[i] != NULL); i++) NSString *key = UTF8Str(atts[j]);
{ NSString *obj = UTF8StrLen(atts[j+3], atts[j+4]-atts[j+3]);
key = UTF8Str(atts[i++]);
obj = UTF8Str(atts[i]); [dict setObject: obj forKey: key];
[dict setObject: obj forKey: key];
}
} }
(*imp)(HANDLER, sel, UTF8Str(name), UTF8Str(prefix), UTF8Str(href), dict);
}
else
{
xmlSAX2StartElementNs(ctx, name, prefix, href, nb_namespaces, namespaces, nb_attributes, nb_defaulted, atts);
} }
NSLog(@"Start '%@' with %@", elem, dict);
[HANDLER startElement: elem
prefix: UTF8Str(prefix)
href: UTF8Str(href)
attributes: dict];
} }
static void static void
endElementNsFunction(void *ctx, const unsigned char *name, endElementNsFunction(void *ctx, const unsigned char *name,
const unsigned char *prefix, const unsigned char *href) const unsigned char *prefix, const unsigned char *href)
{ {
START(endElement:, void, (id,SEL,id,id,id)); NSCAssert(ctx,@"No Context");
[HANDLER endElement: UTF8Str(name)
if (imp != treeImp) prefix: UTF8Str(prefix)
{ href: UTF8Str(href)];
(*imp)(HANDLER, sel, UTF8Str(name), UTF8Str(prefix), UTF8Str(href));
}
else
{
xmlSAX2EndElementNs(ctx, name, prefix, href);
}
} }
#endif #endif
static void static void
charactersFunction(void *ctx, const unsigned char *ch, int len) charactersFunction(void *ctx, const unsigned char *ch, int len)
{ {
START(characters:, void, (id,SEL,id)); NSCAssert(ctx,@"No Context");
[HANDLER characters: UTF8StrLen(ch, len)];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8StrLen(ch, len));
}
else
{
TREEFUN(characters, (ctx, ch, len));
}
} }
static void static void
referenceFunction(void *ctx, const unsigned char *name) referenceFunction(void *ctx, const unsigned char *name)
{ {
START(reference:, void, (id,SEL,id)); NSCAssert(ctx,@"No Context");
[HANDLER reference: UTF8Str(name)];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8Str(name));
}
else
{
TREEFUN(reference, (ctx, name));
}
} }
static void static void
ignorableWhitespaceFunction(void *ctx, const unsigned char *ch, int len) ignorableWhitespaceFunction(void *ctx, const unsigned char *ch, int len)
{ {
START(ignoreWhitespace:, void, (id,SEL,id)); NSCAssert(ctx,@"No Context");
[HANDLER ignoreWhitespace: UTF8StrLen(ch, len)];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8StrLen(ch, len));
}
else
{
TREEFUN(ignorableWhitespace, (ctx, ch, len));
}
} }
static void static void
processingInstructionFunction(void *ctx, const unsigned char *target, processingInstructionFunction(void *ctx, const unsigned char *target,
const char *data) const char *data)
{ {
START(processInstruction:, void, (id,SEL,id,id)); NSCAssert(ctx,@"No Context");
[HANDLER processInstruction: UTF8Str(target)
if (imp != treeImp) data: UTF8Str(data)];
{
(*imp)(HANDLER, sel, UTF8Str(target), UTF8Str(data));
}
else
{
TREEFUN(processingInstruction, (ctx, target, data));
}
} }
static void static void
cdataBlockFunction(void *ctx, const unsigned char *value, int len) cdataBlockFunction(void *ctx, const unsigned char *value, int len)
{ {
START(cdataBlock:, void, (id,SEL,id)); NSCAssert(ctx,@"No Context");
[HANDLER cdataBlock: [NSData dataWithBytes: value length: len]];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, [NSData dataWithBytes: value length: len]);
}
else
{
TREEFUN(cdataBlock, (ctx, value, len));
}
} }
static void static void
commentFunction(void *ctx, const unsigned char *value) commentFunction(void *ctx, const unsigned char *value)
{ {
START(comment:, void, (id,SEL,id)); NSCAssert(ctx,@"No Context");
[HANDLER comment: UTF8Str(value)];
if (imp != treeImp)
{
(*imp)(HANDLER, sel, UTF8Str(value));
}
else
{
TREEFUN(comment, (ctx, value));
}
} }
static void static void
@ -3195,6 +3042,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
href: (NSString*)href href: (NSString*)href
attributes: (NSMutableDictionary*)elementAttributes attributes: (NSMutableDictionary*)elementAttributes
{ {
[self startElement: elementName attributes: elementAttributes];
} }
/** /**
@ -3211,6 +3059,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
prefix: (NSString*)prefix prefix: (NSString*)prefix
href: (NSString*)href href: (NSString*)href
{ {
[self endElement: elementName];
} }
/** /**
@ -3465,6 +3314,18 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
memcpy(lib, &xmlDefaultSAXHandler, sizeof(xmlSAXHandler)); memcpy(lib, &xmlDefaultSAXHandler, sizeof(xmlSAXHandler));
#define LIB ((xmlSAXHandlerPtr)lib) #define LIB ((xmlSAXHandlerPtr)lib)
#if HAVE_LIBXML_SAX2_H
/*
* We must call xmlSAXVersion() BEFORE setting any functions as it
* sets up default values and would trash our settings.
*/
xmlSAXVersion(LIB, 2); // Set SAX2
LIB->startElementNs = (void*) startElementNsFunction;
LIB->endElementNs = (void*) endElementNsFunction;
#else
LIB->startElement = (void*) startElementFunction;
LIB->endElement = (void*) endElementFunction;
#endif
LIB->internalSubset = (void*) internalSubsetFunction; LIB->internalSubset = (void*) internalSubsetFunction;
LIB->externalSubset = (void*) externalSubsetFunction; LIB->externalSubset = (void*) externalSubsetFunction;
LIB->isStandalone = (void*) isStandaloneFunction; LIB->isStandalone = (void*) isStandaloneFunction;
@ -3478,12 +3339,6 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
LIB->unparsedEntityDecl = (void*) unparsedEntityDeclFunction; LIB->unparsedEntityDecl = (void*) unparsedEntityDeclFunction;
LIB->startDocument = (void*) startDocumentFunction; LIB->startDocument = (void*) startDocumentFunction;
LIB->endDocument = (void*) endDocumentFunction; LIB->endDocument = (void*) endDocumentFunction;
LIB->startElement = (void*) startElementFunction;
LIB->endElement = (void*) endElementFunction;
#if HAVE_LIBXML_SAX2_H
LIB->startElementNs = (void*) startElementNsFunction;
LIB->endElementNs = (void*) endElementNsFunction;
#endif
LIB->reference = (void*) referenceFunction; LIB->reference = (void*) referenceFunction;
LIB->characters = (void*) charactersFunction; LIB->characters = (void*) charactersFunction;
LIB->ignorableWhitespace = (void*) ignorableWhitespaceFunction; LIB->ignorableWhitespace = (void*) ignorableWhitespaceFunction;
@ -3494,9 +3349,6 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
LIB->fatalError = (void*) fatalErrorFunction; LIB->fatalError = (void*) fatalErrorFunction;
LIB->getParameterEntity = (void*) getParameterEntityFunction; LIB->getParameterEntity = (void*) getParameterEntityFunction;
LIB->cdataBlock = (void*) cdataBlockFunction; LIB->cdataBlock = (void*) cdataBlockFunction;
#if HAVE_LIBXML_SAX2_H
xmlSAXVersion(LIB, 2); // Set SAX2
#endif
#undef LIB #undef LIB
return YES; return YES;
} }
@ -3570,6 +3422,7 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
} }
} }
- (BOOL) _initLibXML - (BOOL) _initLibXML
{ {
lib = (xmlSAXHandler*)malloc(sizeof(xmlSAXHandler)); lib = (xmlSAXHandler*)malloc(sizeof(xmlSAXHandler));
@ -3582,9 +3435,44 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
memcpy(lib, &xmlDefaultSAXHandler, sizeof(xmlSAXHandler)); memcpy(lib, &xmlDefaultSAXHandler, sizeof(xmlSAXHandler));
#define LIB ((xmlSAXHandlerPtr)lib) #define LIB ((xmlSAXHandlerPtr)lib)
LIB->warning = (void*) warningFunction; #define SETCB(NAME,SEL) if ([self methodForSelector: @selector(SEL)] != [treeClass instanceMethodForSelector: @selector(SEL)]) LIB->NAME = (void*)NAME ## Function
LIB->error = (void*) errorFunction; #if HAVE_LIBXML_SAX2_H
LIB->fatalError = (void*) fatalErrorFunction; /*
* We must call xmlSAXVersion() BEFORE setting any functions as it
* sets up default values and would trash our settings.
*/
xmlSAXVersion(LIB, 2); // Set SAX2
SETCB(startElementNs, startElement:prefix:href:attributes:);
SETCB(endElementNs, endElement:prefix:href:);
#else
SETCB(startElement, startElement:attributes:);
SETCB(endElement, endElement:);
#endif
SETCB(internalSubset, internalSubset:externalID:systemID:);
SETCB(externalSubset, externalSubset:externalID:systemID:);
SETCB(isStandalone, isStandalone);
SETCB(hasInternalSubset, hasInternalSubset);
SETCB(hasExternalSubset, hasExternalSubset);
SETCB(getEntity, getEntity:);
SETCB(entityDecl, entityDecl:type:public:system:content:);
SETCB(notationDecl, notationDecl:public:);
SETCB(attributeDecl, attributeDecl:name:type:typeDefValue:defaultValue:);
SETCB(elementDecl, elementDecl:type:);
SETCB(unparsedEntityDecl, unparsedEntityDecl:public:system:notationName:);
SETCB(startDocument, startDocument);
SETCB(endDocument, endDocument);
SETCB(reference, reference:);
SETCB(characters, characters:);
SETCB(ignorableWhitespace, ignoreWhitespace:);
SETCB(processingInstruction, processInstruction:data:);
SETCB(comment, comment:);
SETCB(getParameterEntity, getParameterEntity:);
SETCB(cdataBlock, cdataBlock:);
LIB->warning = (void*)warningFunction;
LIB->error = (void*)errorFunction;
LIB->fatalError = (void*)fatalErrorFunction;
#undef LIB #undef LIB
return YES; return YES;
} }
@ -3613,31 +3501,31 @@ fatalErrorFunction(void *ctx, const unsigned char *msg, ...)
memcpy(lib, &htmlDefaultSAXHandler, sizeof(htmlSAXHandler)); memcpy(lib, &htmlDefaultSAXHandler, sizeof(htmlSAXHandler));
#define LIB ((htmlSAXHandlerPtr)lib) #define LIB ((htmlSAXHandlerPtr)lib)
LIB->internalSubset = (void*) internalSubsetFunction; LIB->internalSubset = (void*)internalSubsetFunction;
LIB->externalSubset = (void*) externalSubsetFunction; LIB->externalSubset = (void*)externalSubsetFunction;
LIB->isStandalone = (void*) isStandaloneFunction; LIB->isStandalone = (void*)isStandaloneFunction;
LIB->hasInternalSubset = (void*) hasInternalSubsetFunction; LIB->hasInternalSubset = (void*)hasInternalSubsetFunction;
LIB->hasExternalSubset = (void*) hasExternalSubsetFunction; LIB->hasExternalSubset = (void*)hasExternalSubsetFunction;
LIB->getEntity = (void*) getEntityFunction; LIB->getEntity = (void*)getEntityFunction;
LIB->entityDecl = (void*) entityDeclFunction; LIB->entityDecl = (void*)entityDeclFunction;
LIB->notationDecl = (void*) notationDeclFunction; LIB->notationDecl = (void*)notationDeclFunction;
LIB->attributeDecl = (void*) attributeDeclFunction; LIB->attributeDecl = (void*)attributeDeclFunction;
LIB->elementDecl = (void*) elementDeclFunction; LIB->elementDecl = (void*)elementDeclFunction;
LIB->unparsedEntityDecl = (void*) unparsedEntityDeclFunction; LIB->unparsedEntityDecl = (void*)unparsedEntityDeclFunction;
LIB->startDocument = (void*) startDocumentFunction; LIB->startDocument = (void*)startDocumentFunction;
LIB->endDocument = (void*) endDocumentFunction; LIB->endDocument = (void*)endDocumentFunction;
LIB->startElement = (void*) startElementFunction; LIB->startElement = (void*)startElementFunction;
LIB->endElement = (void*) endElementFunction; LIB->endElement = (void*)endElementFunction;
LIB->reference = (void*) referenceFunction; LIB->reference = (void*)referenceFunction;
LIB->characters = (void*) charactersFunction; LIB->characters = (void*)charactersFunction;
LIB->ignorableWhitespace = (void*) ignorableWhitespaceFunction; LIB->ignorableWhitespace = (void*)ignorableWhitespaceFunction;
LIB->processingInstruction = (void*) processingInstructionFunction; LIB->processingInstruction = (void*)processingInstructionFunction;
LIB->comment = (void*) commentFunction; LIB->comment = (void*)commentFunction;
LIB->warning = (void*) warningFunction; LIB->warning = (void*)warningFunction;
LIB->error = (void*) errorFunction; LIB->error = (void*)errorFunction;
LIB->fatalError = (void*) fatalErrorFunction; LIB->fatalError = (void*)fatalErrorFunction;
LIB->getParameterEntity = (void*) getParameterEntityFunction; LIB->getParameterEntity = (void*)getParameterEntityFunction;
LIB->cdataBlock = (void*) cdataBlockFunction; LIB->cdataBlock = (void*)cdataBlockFunction;
#undef LIB #undef LIB
return YES; return YES;
} }

View file

@ -1037,7 +1037,7 @@ if (domainMask & mask) \
} }
if (directoryKey == NSDeveloperDirectory) if (directoryKey == NSDeveloperDirectory)
{ {
ADD_PATH(NSUserDomainMask, gnustep_local_root, devDir); ADD_PATH(NSUserDomainMask, gnustep_user_root, devDir);
ADD_PATH(NSLocalDomainMask, gnustep_local_root, devDir); ADD_PATH(NSLocalDomainMask, gnustep_local_root, devDir);
ADD_PATH(NSNetworkDomainMask, gnustep_network_root, devDir); ADD_PATH(NSNetworkDomainMask, gnustep_network_root, devDir);
ADD_PATH(NSSystemDomainMask, gnustep_system_root, devDir); ADD_PATH(NSSystemDomainMask, gnustep_system_root, devDir);