Index: src/OFPlugin.m ================================================================== --- src/OFPlugin.m +++ src/OFPlugin.m @@ -22,13 +22,13 @@ #import "OFString.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" #ifdef _WIN32 -#define dlopen(file, mode) LoadLibrary(file) -#define dlsym(handle, symbol) GetProcAddress(handle, symbol) -#define dlclose(handle) FreeLibrary(handle) +# define dlopen(file, mode) LoadLibrary(file) +# define dlsym(handle, symbol) GetProcAddress(handle, symbol) +# define dlclose(handle) FreeLibrary(handle) #endif @implementation OFPlugin + pluginFromFile: (OFString*)path { Index: src/OFXMLElement.h ================================================================== --- src/OFXMLElement.h +++ src/OFXMLElement.h @@ -23,11 +23,11 @@ OFString *namespace; OFString *defaultNamespace; OFMutableArray *attributes; OFMutableDictionary *namespaces; OFMutableArray *children; - OFString *text; + OFString *characters; OFMutableString *comment; } /** * \param name The name for the element @@ -63,24 +63,25 @@ + elementWithName: (OFString*)name namespace: (OFString*)ns stringValue: (OFString*)stringval; /** - * Creates a new element, only consisting of the specified text. + * Creates a new element, only consisting of the specified characters. * - * \param text The text the element represents - * \return A new autoreleased OFXMLElement consisting of the specified text + * \param chars The characters the element represents + * \return A new autoreleased OFXMLElement consisting of the specified + * characters */ -+ elementWithText: (OFString*)text; ++ elementWithCharacters: (OFString*)chars; /** * Creates a new element, only consisting of the specified comment. * * \param comment The comment the element represents * \return A new autoreleased OFXMLElement consisting of the specified comment */ -+ elementWithComment: (OFString*)text; ++ elementWithComment: (OFString*)comment; /** * Initializes an already allocated OFXMLElement with the specified element * name. * @@ -127,25 +128,25 @@ namespace: (OFString*)ns stringValue: (OFString*)stringval; /** * Initializes an already allocated OFXMLElement so that it only consists of the - * specified text. + * specified characters. * - * \param text The text the element represents - * \return An initialized OFXMLElement consisting of the specified text + * \param chars The characters the element represents + * \return An initialized OFXMLElement consisting of the specified characters */ -- initWithText: (OFString*)text; +- initWithCharacters: (OFString*)chars; /** * Initializes an already allocated OFXMLElement so that it only consists of the * specified comment. * * \param comment The comment the element represents * \return An initialized OFXMLElement consisting of the specified comment */ -- initWithComment: (OFString*)text; +- initWithComment: (OFString*)comment; /** * \return A new autoreleased OFString representing the OFXMLElement as an * XML string */ Index: src/OFXMLElement.m ================================================================== --- src/OFXMLElement.m +++ src/OFXMLElement.m @@ -49,13 +49,13 @@ return [[[self alloc] initWithName: name namespace: ns stringValue: stringval] autorelease]; } -+ elementWithText: (OFString*)text ++ elementWithCharacters: (OFString*)chars { - return [[[self alloc] initWithText: text] autorelease]; + return [[[self alloc] initWithCharacters: chars] autorelease]; } + elementWithComment: (OFString*)comment { return [[[self alloc] initWithComment: comment] autorelease]; @@ -99,11 +99,12 @@ name = [name_ copy]; namespace = [ns copy]; if (stringval != nil) { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];; - [self addChild: [OFXMLElement elementWithText: stringval]]; + [self addChild: + [OFXMLElement elementWithCharacters: stringval]]; [pool release]; } namespaces = [[OFMutableDictionary alloc] initWithKeysAndObjects: @"http://www.w3.org/XML/1998/namespace", @"xml", @@ -110,15 +111,15 @@ @"http://www.w3.org/2000/xmlns/", @"xmlns", nil]; return self; } -- initWithText: (OFString*)text_ +- initWithCharacters: (OFString*)chars { self = [super init]; - text = [text_ copy]; + characters = [chars copy]; return self; } - initWithComment: (OFString*)comment_ @@ -140,12 +141,12 @@ OFXMLAttribute **attrs_carray; OFString *ret, *tmp; OFMutableDictionary *all_namespaces; OFString *def_ns; - if (text != nil) - return [text stringByXMLEscaping]; + if (characters != nil) + return [characters stringByXMLEscaping]; if (comment != nil) { OFMutableString *str; str = [OFMutableString stringWithString: @""])