From c11dd7b318e74b891e66e105cbd631b01eb060d3 Mon Sep 17 00:00:00 2001 From: helge Date: Sat, 23 Apr 2005 17:12:10 +0000 Subject: [PATCH] fixed gcc 4.0 warnings git-svn-id: http://svn.opengroupware.org/SOPE/trunk@763 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-xml/DOM/ChangeLog | 4 ++ sope-xml/DOM/DOMAttribute.m | 12 +++--- sope-xml/DOM/DOMCDATASection.m | 6 +-- sope-xml/DOM/DOMCharacterData.m | 2 +- sope-xml/DOM/DOMComment.m | 6 +-- sope-xml/DOM/DOMDocument.m | 48 +++++++++++++--------- sope-xml/DOM/DOMDocumentType.m | 6 +-- sope-xml/DOM/DOMElement.m | 43 +++++++++++--------- sope-xml/DOM/DOMEntity.m | 8 ++-- sope-xml/DOM/DOMEntityReference.m | 4 +- sope-xml/DOM/DOMNode.m | 20 ++++----- sope-xml/DOM/DOMNodeWithChildren.m | 18 +++++---- sope-xml/DOM/DOMNotation.m | 12 +++--- sope-xml/DOM/DOMProcessingInstruction.m | 8 ++-- sope-xml/DOM/DOMProtocols.h | 54 +++++++++++-------------- sope-xml/DOM/DOMText.m | 6 +-- sope-xml/DOM/DOMTreeWalker.h | 15 +++---- sope-xml/DOM/DOMTreeWalker.m | 28 ++++++------- sope-xml/DOM/DOMXMLOutputter.h | 9 ++++- sope-xml/DOM/DOMXMLOutputter.m | 2 +- sope-xml/DOM/Version | 2 +- sope-xml/SaxObjC/ChangeLog | 4 ++ sope-xml/SaxObjC/SaxMethodCallHandler.m | 4 +- sope-xml/SaxObjC/Version | 2 +- 24 files changed, 173 insertions(+), 150 deletions(-) diff --git a/sope-xml/DOM/ChangeLog b/sope-xml/DOM/ChangeLog index c1429193..149a3c42 100644 --- a/sope-xml/DOM/ChangeLog +++ b/sope-xml/DOM/ChangeLog @@ -1,3 +1,7 @@ +2005-04-23 Helge Hess + + * fixed loads of @protocol related gcc 4.0 warnings (v4.5.14) + 2004-12-14 Marcus Mueller * DOM.xcode: minor cleanup diff --git a/sope-xml/DOM/DOMAttribute.m b/sope-xml/DOM/DOMAttribute.m index 7baf1767..24d9a08e 100644 --- a/sope-xml/DOM/DOMAttribute.m +++ b/sope-xml/DOM/DOMAttribute.m @@ -56,10 +56,10 @@ /* attributes */ -- (id)ownerElement { +- (IDOMElement)ownerElement { return self->element; } -- (id)ownerDocument { +- (IDOMDocument)ownerDocument { return [[self ownerElement] ownerDocument]; } @@ -146,17 +146,17 @@ return DOM_ATTRIBUTE_NODE; } -- (id)attributes { +- (id)attributes { return nil; } -- (id)parentNode { +- (id)parentNode { return nil; } -- (id)nextSibling { +- (id)nextSibling { return nil; } -- (id)previousSibling { +- (id)previousSibling { return nil; } diff --git a/sope-xml/DOM/DOMCDATASection.m b/sope-xml/DOM/DOMCDATASection.m index cdba8d2a..4a3716cc 100644 --- a/sope-xml/DOM/DOMCDATASection.m +++ b/sope-xml/DOM/DOMCDATASection.m @@ -35,14 +35,14 @@ - (BOOL)hasChildNodes { return NO; } -- (id)childNodes { +- (id)childNodes { return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { return nil; } -- (id)attributes { +- (id)attributes { return nil; } diff --git a/sope-xml/DOM/DOMCharacterData.m b/sope-xml/DOM/DOMCharacterData.m index d09f294c..decf705a 100644 --- a/sope-xml/DOM/DOMCharacterData.m +++ b/sope-xml/DOM/DOMCharacterData.m @@ -99,7 +99,7 @@ /* the node's parent was deallocated */ self->parent = nil; } -- (id)parentNode { +- (id)parentNode { return self->parent; } diff --git a/sope-xml/DOM/DOMComment.m b/sope-xml/DOM/DOMComment.m index 040ceaef..6cd88fbf 100644 --- a/sope-xml/DOM/DOMComment.m +++ b/sope-xml/DOM/DOMComment.m @@ -35,14 +35,14 @@ - (BOOL)hasChildNodes { return NO; } -- (id)childNodes { +- (id)childNodes { return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { return nil; } -- (id)attributes { +- (id)attributes { return nil; } diff --git a/sope-xml/DOM/DOMDocument.m b/sope-xml/DOM/DOMDocument.m index 5e9c664e..005fdd25 100644 --- a/sope-xml/DOM/DOMDocument.m +++ b/sope-xml/DOM/DOMDocument.m @@ -109,14 +109,14 @@ /* attributes */ -- (id)doctype { +- (id)doctype { return self->doctype; } - (DOMImplementation *)implementation { return self->dom; } -- (id)documentElement { +- (id)documentElement { id children; unsigned i, count; @@ -152,23 +152,23 @@ return DOM_DOCUMENT_NODE; } -- (id)attributes { +- (id)attributes { return nil; } -- (DOMDocument *)ownerDocument { +- (IDOMDocument)ownerDocument { return nil; } -- (id)parentNode { +- (id)parentNode { /* document cannot be nested */ return nil; } -- (id)nextSibling { +- (id)nextSibling { /* document cannot be nested */ return nil; } -- (id)previousSibling { +- (id)previousSibling { /* document cannot be nested */ return nil; } @@ -196,7 +196,7 @@ [(NSMutableArray *)[_walker context] addObject:node]; } -- (id)getElementsByTagName:(NSString *)_tagName { +- (id)getElementsByTagName:(NSString *)_tagName { /* introduced in DOM2, should return a *live* list ! */ NSMutableArray *array; DOMNodePreorderWalker *walker; @@ -232,12 +232,14 @@ return [[array copy] autorelease]; } -- (id)getElementsByTagName:(NSString *)_tagName namespaceURI:(NSString *)_uri { +- (id)getElementsByTagName:(NSString *)_tagName + namespaceURI:(NSString *)_uri +{ [self doesNotRecognizeSelector:_cmd]; return nil; } -- (id)getElementById:(NSString *)_eid { +- (id)getElementById:(NSString *)_eid { /* Introduced in DOM2 @@ -283,14 +285,16 @@ return [self->dom domEntityReferenceClass]; } -- (id)createElement:(NSString *)_tagName { +- (id)createElement:(NSString *)_tagName { id elem; elem = [[[self domElementClass] alloc] initWithTagName:_tagName]; return [elem autorelease]; } -- (id)createElement:(NSString *)_tagName namespaceURI:(NSString *)_uri { +- (id)createElement:(NSString *)_tagName + namespaceURI:(NSString *)_uri +{ id elem; elem = [[[self domElementNSClass] alloc] @@ -298,29 +302,31 @@ return [elem autorelease]; } -- (id)createDocumentFragment { +- (id)createDocumentFragment { id elem; elem = [[[self domDocumentFragmentClass] alloc] init]; return [elem autorelease]; } -- (id)createTextNode:(NSString *)_data { +- (id)createTextNode:(NSString *)_data { id elem; elem = [[[self domTextNodeClass] alloc] initWithString:_data]; return [elem autorelease]; } -- (id)createComment:(NSString *)_data { +- (id)createComment:(NSString *)_data { id elem; elem = [[[self domCommentClass] alloc] initWithString:_data]; return [elem autorelease]; } -- (id)createCDATASection:(NSString *)_data { +- (id)createCDATASection:(NSString *)_data { id elem; elem = [[[self domCDATAClass] alloc] initWithString:_data]; return [elem autorelease]; } -- (id)createProcessingInstruction:(NSString *)_target data:(NSString *)_data { +- (id)createProcessingInstruction: + (NSString *)_target data:(NSString *)_data +{ id elem; elem = [[[self domProcessingInstructionClass] alloc] @@ -328,14 +334,16 @@ return [elem autorelease]; } -- (id)createAttribute:(NSString *)_name { +- (id)createAttribute:(NSString *)_name { id elem; elem = [[[self domAttributeClass] alloc] initWithName:_name]; return [elem autorelease]; } -- (id)createAttribute:(NSString *)_name namespaceURI:(NSString *)_uri { +- (id)createAttribute:(NSString *)_name + namespaceURI:(NSString *)_uri +{ id elem; elem = [[[self domAttributeNSClass] alloc] @@ -343,7 +351,7 @@ return [elem autorelease]; } -- (id)createEntityReference:(NSString *)_name { +- (id)createEntityReference:(NSString *)_name { id elem; elem = [[[self domEntityReferenceClass] alloc] initWithName:_name]; return [elem autorelease]; diff --git a/sope-xml/DOM/DOMDocumentType.m b/sope-xml/DOM/DOMDocumentType.m index 3558c881..aec8878a 100644 --- a/sope-xml/DOM/DOMDocumentType.m +++ b/sope-xml/DOM/DOMDocumentType.m @@ -66,11 +66,11 @@ - (BOOL)hasChildNodes { return NO; } -- (id)childNodes { +- (id)childNodes { return nil; } -- (id)attributes { +- (id)attributes { return nil; } @@ -84,7 +84,7 @@ /* the node's parent was deallocated */ self->parent = nil; } -- (id)parentNode { +- (id)parentNode { return self->parent; } diff --git a/sope-xml/DOM/DOMElement.m b/sope-xml/DOM/DOMElement.m index 7d7890d9..9712f3f1 100644 --- a/sope-xml/DOM/DOMElement.m +++ b/sope-xml/DOM/DOMElement.m @@ -130,7 +130,7 @@ static NSNull *null = nil; [(NSMutableArray *)[_walker context] addObject:node]; } -- (id)getElementsByTagName:(NSString *)_tagName { +- (id)getElementsByTagName:(NSString *)_tagName { /* introduced in DOM2, should return a *live* list ! */ NSMutableArray *array; DOMNodePreorderWalker *walker; @@ -165,7 +165,9 @@ static NSNull *null = nil; [walker release]; walker = nil; return [[array copy] autorelease]; } -- (id)getElementsByTagName:(NSString *)_tagName namespaceURI:(NSString *)_uri { +- (id)getElementsByTagName:(NSString *)_tagName + namespaceURI:(NSString *)_uri +{ // TODO: implement [self doesNotRecognizeSelector:_cmd]; return nil; @@ -336,7 +338,7 @@ static NSNull *null = nil; return [[self attributeNode:_localName namespaceURI:_ns] value]; } -- (id)setAttributeNodeNS:(id)_attrNode { +- (id)setAttributeNodeNS:(id)_attrNode { id key, oldNode; if (_attrNode == nil) @@ -364,7 +366,7 @@ static NSNull *null = nil; withObject:_attrNode]; [self->keyToAttribute setObject:_attrNode forKey:key]; - [_attrNode _domNodeRegisterParentNode:self]; + [(id)_attrNode _domNodeRegisterParentNode:self]; [self _attributeSetChanged]; return _attrNode; @@ -378,7 +380,7 @@ static NSNull *null = nil; [self->keyToAttribute setObject:_attrNode forKey:key]; [self->attributes addObject:_attrNode]; - [_attrNode _domNodeRegisterParentNode:self]; + [(id)_attrNode _domNodeRegisterParentNode:self]; [self _attributeSetChanged]; // NSLog(@"added attr %@, elem %@", _attrNode, self); @@ -398,7 +400,7 @@ static NSNull *null = nil; [self removeAttributeNodeNS:node]; } -- (id)removeAttributeNodeNS:(id)_attrNode { +- (id)removeAttributeNodeNS:(id)_attrNode { id key, oldNode; if (_attrNode == nil) @@ -425,7 +427,7 @@ static NSNull *null = nil; [self->keyToAttribute removeObjectForKey:key]; [self->attributes removeObjectIdenticalTo:_attrNode]; - [_attrNode _domNodeForgetParentNode:self]; + [(id)_attrNode _domNodeForgetParentNode:self]; [self _attributeSetChanged]; return _attrNode; @@ -435,11 +437,11 @@ static NSNull *null = nil; return nil; } -- (id)setAttributeNode:(id)_attrNode { +- (id)setAttributeNode:(id)_attrNode { [self doesNotRecognizeSelector:_cmd]; return nil; } -- (id)removeAttributeNode:(id)_attrNode { +- (id)removeAttributeNode:(id)_attrNode { [self doesNotRecognizeSelector:_cmd]; return nil; } @@ -474,7 +476,7 @@ static NSNull *null = nil; return DOM_ELEMENT_NODE; } -- (id)attributes { +- (id)attributes { /* returns a named-node-map */ if (self->attrNodeMap == nil) { self->attrNodeMap = @@ -493,7 +495,7 @@ static NSNull *null = nil; /* the node's parent was deallocated */ self->parent = nil; } -- (id)parentNode { +- (id)parentNode { return self->parent; } @@ -576,7 +578,7 @@ static NSString *_XNSLocalName(NSString *_name) { return [self->element _attributeNodeAtIndex:_idx]; } -- (id)namedItem:(NSString *)_name { +- (IDOMNode)namedItem:(NSString *)_name { NSString *nsuri; _checkValid(self); @@ -585,11 +587,13 @@ static NSString *_XNSLocalName(NSString *_name) { return [self->element attributeNode:_name]; } -- (id)setNamedItem:(id)_node { +- (IDOMNode)setNamedItem:(IDOMNode)_node { _checkValid(self); - return [self->element setAttributeNode:_node]; + + // TODO: is the cast correct? + return [self->element setAttributeNode:(id)_node]; } -- (id)removeNamedItem:(NSString *)_name { +- (IDOMNode)removeNamedItem:(NSString *)_name { NSString *nsuri; id node; @@ -608,14 +612,15 @@ static NSString *_XNSLocalName(NSString *_name) { /* DOM2 access */ -- (id)namedItem:(NSString *)_name namespaceURI:(NSString *)_uri { +- (IDOMNode)namedItem:(NSString *)_name namespaceURI:(NSString *)_uri { return [self->element attributeNode:_name namespaceURI:_uri]; } -- (id)setNamedItemNS:(id)_node { +- (IDOMNode)setNamedItemNS:(IDOMNode)_node { _checkValid(self); - return [self->element setAttributeNodeNS:_node]; + // TODO: is the cast correct? + return [self->element setAttributeNodeNS:(id)_node]; } -- (id)removeNamedItem:(NSString *)_name namespaceURI:(NSString *)_uri { +- (IDOMNode)removeNamedItem:(NSString *)_name namespaceURI:(NSString *)_uri { id node; _checkValid(self); diff --git a/sope-xml/DOM/DOMEntity.m b/sope-xml/DOM/DOMEntity.m index 9ab13183..51510665 100644 --- a/sope-xml/DOM/DOMEntity.m +++ b/sope-xml/DOM/DOMEntity.m @@ -60,19 +60,19 @@ } } -- (id)attributes { +- (id)attributes { return nil; } /* parent node */ -- (id)parentNode { +- (id)parentNode { return nil; } -- (id)nextSibling { +- (id)nextSibling { return nil; } -- (id)previousSibling { +- (id)previousSibling { return nil; } diff --git a/sope-xml/DOM/DOMEntityReference.m b/sope-xml/DOM/DOMEntityReference.m index 669b96b0..fe0a8aca 100644 --- a/sope-xml/DOM/DOMEntityReference.m +++ b/sope-xml/DOM/DOMEntityReference.m @@ -37,7 +37,7 @@ return DOM_ENTITY_REFERENCE_NODE; } -- (id)attributes { +- (id)attributes { return nil; } @@ -51,7 +51,7 @@ /* the node's parent was deallocated */ self->parent = nil; } -- (id)parentNode { +- (id)parentNode { return self->parent; } diff --git a/sope-xml/DOM/DOMNode.m b/sope-xml/DOM/DOMNode.m index 9b8f6e5a..5f541f8b 100644 --- a/sope-xml/DOM/DOMNode.m +++ b/sope-xml/DOM/DOMNode.m @@ -93,7 +93,7 @@ NSString *DOMNodeValue(id _node) { /* owner */ -- (DOMDocument *)ownerDocument { +- (IDOMDocument)ownerDocument { id node; for (node = [self parentNode]; node; node = [node parentNode]) { @@ -144,7 +144,7 @@ NSString *DOMNodeValue(id _node) { /* element attributes */ -- (id)attributes { +- (id)attributes { /* returns a NamedNodeList */ return [self subclassResponsibility:_cmd]; } @@ -155,20 +155,20 @@ NSString *DOMNodeValue(id _node) { return NO; } -- (id)removeChild:(id)_node { +- (id)removeChild:(id)_node { return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { return nil; } /* navigation */ -- (id)parentNode { +- (id)parentNode { return [self subclassResponsibility:_cmd]; } -- (id)previousSibling { +- (id)previousSibling { DOMNode *parent; if ((parent = (DOMNode *)[self parentNode]) == nil) return nil; @@ -176,7 +176,7 @@ NSString *DOMNodeValue(id _node) { if (![parent respondsToSelector:@selector(_domNodeBeforeNode:)]) return nil; return [parent _domNodeBeforeNode:self]; } -- (id)nextSibling { +- (id)nextSibling { DOMNode *parent; if ((parent = (DOMNode *)[self parentNode]) == nil) return nil; @@ -185,16 +185,16 @@ NSString *DOMNodeValue(id _node) { return [parent _domNodeAfterNode:self]; } -- (id)childNodes { +- (id)childNodes { return nil; } - (BOOL)hasChildNodes { return NO; } -- (id)firstChild { +- (id)firstChild { return nil; } -- (id)lastChild { +- (id)lastChild { return nil; } diff --git a/sope-xml/DOM/DOMNodeWithChildren.m b/sope-xml/DOM/DOMNodeWithChildren.m index f47bd877..ec6fc853 100644 --- a/sope-xml/DOM/DOMNodeWithChildren.m +++ b/sope-xml/DOM/DOMNodeWithChildren.m @@ -44,19 +44,21 @@ /* navigation */ -- (id)childNodes { +- (id)childNodes { [self _ensureChildNodes]; - return self->childNodes; + + /* casting NSMutableArray to DOMNodeList */ + return (id)self->childNodes; } - (BOOL)hasChildNodes { return [self->childNodes count] > 0 ? YES : NO; } -- (id)firstChild { +- (id)firstChild { return [self->childNodes count] > 0 ? [self->childNodes objectAtIndex:0] : nil; } -- (id)lastChild { +- (id)lastChild { unsigned count; return (count = [self->childNodes count]) > 0 @@ -66,7 +68,7 @@ /* modification */ -- (id)removeChild:(id)_node { +- (id)removeChild:(id)_node { unsigned idx; if (self->childNodes == nil) @@ -79,12 +81,12 @@ [[_node retain] autorelease]; [self->childNodes removeObjectAtIndex:idx]; - [_node _domNodeForgetParentNode:self]; + [(id)_node _domNodeForgetParentNode:self]; return _node; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { if (_node == nil) /* adding a 'nil' node ?? */ return nil; @@ -121,7 +123,7 @@ [self _ensureChildNodes]; [self->childNodes addObject:_node]; - [_node _domNodeRegisterParentNode:self]; + [(id)_node _domNodeRegisterParentNode:self]; } /* return the node 'added' */ diff --git a/sope-xml/DOM/DOMNotation.m b/sope-xml/DOM/DOMNotation.m index 96a1c359..0cb1ca50 100644 --- a/sope-xml/DOM/DOMNotation.m +++ b/sope-xml/DOM/DOMNotation.m @@ -33,26 +33,26 @@ - (BOOL)hasChildNodes { return NO; } -- (id)childNodes { +- (id)childNodes { return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { return nil; } -- (id)attributes { +- (id)attributes { return nil; } /* parent node */ -- (id)parentNode { +- (id)parentNode { return nil; } -- (id)nextSibling { +- (id)nextSibling { return nil; } -- (id)previousSibling { +- (id)previousSibling { return nil; } diff --git a/sope-xml/DOM/DOMProcessingInstruction.m b/sope-xml/DOM/DOMProcessingInstruction.m index 99ca09e0..8b5fb440 100644 --- a/sope-xml/DOM/DOMProcessingInstruction.m +++ b/sope-xml/DOM/DOMProcessingInstruction.m @@ -59,7 +59,7 @@ return DOM_PROCESSING_INSTRUCTION_NODE; } -- (id)attributes { +- (id)attributes { return nil; } @@ -70,11 +70,11 @@ /* PI's have no children ! */ return NO; } -- (id)childNodes { +- (id)childNodes { /* PI's have no children ! */ return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { /* PI's have no children ! */ return nil; } @@ -89,7 +89,7 @@ /* the node's parent was deallocated */ self->parent = nil; } -- (id)parentNode { +- (id)parentNode { return self->parent; } diff --git a/sope-xml/DOM/DOMProtocols.h b/sope-xml/DOM/DOMProtocols.h index 180a8351..ef84547f 100644 --- a/sope-xml/DOM/DOMProtocols.h +++ b/sope-xml/DOM/DOMProtocols.h @@ -45,12 +45,26 @@ typedef enum { DOM_TEXT_NODE = 12 } DOMNodeType; +// TODO: find out which GCC version started to have forward protocols decls ... +//#define HAVE_FORWARD_PROTOCOLS 1 + #if HAVE_FORWARD_PROTOCOLS @protocol DOMNode; @protocol DOMAttr, DOMCDATASection, DOMComment, DOMDocumentFragment; @protocol DOMDocument, DOMDocumentType, DOMElement, DOMEntity; @protocol DOMEntityReference, DOMNotation, DOMProcessingInstruction; @protocol DOMText; + +// NOTE: _ONLY_ use those defines for forward declarations! + +#define IDOMNode id +#define IDOMDocument id +#define IDOMElement id + +#else +#define IDOMNode id +#define IDOMDocument id +#define IDOMElement id #endif @protocol DOMNodeList @@ -65,29 +79,15 @@ typedef enum { - (unsigned)length; - (id)objectAtIndex:(unsigned)_idx; // returns the proper attribute node -#if HAVE_FORWARD_PROTOCOLS -- (id)namedItem:(NSString *)_name; -- (id)setNamedItem:(id)_node; -- (id)removeNamedItem:(NSString *)_name; +- (IDOMNode)namedItem:(NSString *)_name; +- (IDOMNode)setNamedItem:(IDOMNode)_node; +- (IDOMNode)removeNamedItem:(NSString *)_name; /* DOM2 access */ -- (id)namedItem:(NSString *)_name - namespaceURI:(NSString *)_uri; -- (id)setNamedItemNS:(id)_node; -- (id)removeNamedItem:(NSString *)_name - namespaceURI:(NSString *)_uri; -#else -- (id)namedItem:(NSString *)_name; -- (id)setNamedItem:(id)_node; -- (id)removeNamedItem:(NSString *)_name; - -/* DOM2 access */ - -- (id)namedItem:(NSString *)_name namespaceURI:(NSString *)_uri; -- (id)setNamedItemNS:(id)_node; -- (id)removeNamedItem:(NSString *)_name namespaceURI:(NSString *)_uri; -#endif +- (IDOMNode)namedItem:(NSString *)_name namespaceURI:(NSString *)_uri; +- (IDOMNode)setNamedItemNS:(IDOMNode)_node; +- (IDOMNode)removeNamedItem:(NSString *)_name namespaceURI:(NSString *)_uri; @end /* DOMNamedNodeMap */ @@ -124,11 +124,7 @@ typedef enum { /* owner */ -#if HAVE_FORWARD_PROTOCOLS -- (id)ownerDocument; -#else -- (id)ownerDocument; -#endif +- (IDOMDocument)ownerDocument; @end /* DOMNode */ @@ -144,11 +140,7 @@ typedef enum { /* owner */ -#if HAVE_FORWARD_PROTOCOLS -- (id)ownerElement; -#else -- (id)ownerElement; -#endif +- (IDOMElement)ownerElement; @end /* DOMAttr */ @@ -162,7 +154,7 @@ typedef enum { - (void)appendData:(NSString *)_data; - (void)insertData:(NSString *)_data offset:(unsigned)_offset; - (void)deleteData:(unsigned)_offset count:(unsigned)_count; -- (void)replaceData:(unsigned)_offset count:(unsigned)_count with:(NSString *)_s; +- (void)replaceData:(unsigned)_offs count:(unsigned)_count with:(NSString *)_s; @end /* DOMCharacterData */ diff --git a/sope-xml/DOM/DOMText.m b/sope-xml/DOM/DOMText.m index 406b3064..26821308 100644 --- a/sope-xml/DOM/DOMText.m +++ b/sope-xml/DOM/DOMText.m @@ -39,14 +39,14 @@ - (BOOL)hasChildNodes { return NO; } -- (id)childNodes { +- (id)childNodes { return nil; } -- (id)appendChild:(id)_node { +- (id)appendChild:(id)_node { return nil; } -- (id)attributes { +- (id)attributes { return nil; } diff --git a/sope-xml/DOM/DOMTreeWalker.h b/sope-xml/DOM/DOMTreeWalker.h index 12ea6b24..70c062cb 100644 --- a/sope-xml/DOM/DOMTreeWalker.h +++ b/sope-xml/DOM/DOMTreeWalker.h @@ -23,6 +23,7 @@ #define __DOMTreeWalker_H__ #import +#include @class NSArray; @@ -50,14 +51,14 @@ /* operations */ -- (id)parentNode; -- (id)firstChild; -- (id)lastChild; -- (id)previousSibling; -- (id)nextSibling; +- (id)parentNode; +- (id)firstChild; +- (id)lastChild; +- (id)previousSibling; +- (id)nextSibling; -- (id)previousNode; -- (id)nextNode; +- (id)previousNode; +- (id)nextNode; @end diff --git a/sope-xml/DOM/DOMTreeWalker.m b/sope-xml/DOM/DOMTreeWalker.m index 5884e6f8..b8954d6f 100644 --- a/sope-xml/DOM/DOMTreeWalker.m +++ b/sope-xml/DOM/DOMTreeWalker.m @@ -188,10 +188,10 @@ return [a objectAtIndex:(count - 1)]; } -- (id)_visibleParentNode { - id node; +- (id)_visibleParentNode { + id node; - for (node = [[self currentNode] parentNode]; node; node = [node parentNode]) { + for (node = [[self currentNode] parentNode]; node; node =[node parentNode]) { if ([self _isVisibleNode:node]) return node; @@ -202,8 +202,8 @@ return nil; } -- (id)_nextVisibleSibling { - id node; +- (id)_nextVisibleSibling { + id node; for (node = [[self currentNode] nextSibling]; node; @@ -213,8 +213,8 @@ } return nil; } -- (id)_previousVisibleSibling { - id node; +- (id)_previousVisibleSibling { + id node; for (node = [[self currentNode] previousSibling]; node; @@ -227,7 +227,7 @@ /* operations */ -- (id)parentNode { +- (id)parentNode { id parent; if ((parent = [self _visibleParentNode])) { @@ -238,7 +238,7 @@ return nil; } -- (id)firstChild { +- (id)firstChild { if ([self _hasVisibleChildren]) { id child; @@ -250,7 +250,7 @@ return nil; } -- (id)lastChild { +- (id)lastChild { if ([self _hasVisibleChildren]) { id child; @@ -262,7 +262,7 @@ return nil; } -- (id)previousSibling { +- (id)previousSibling { id node; if ((node = [self _previousVisibleSibling])) { @@ -273,7 +273,7 @@ return nil; } -- (id)nextSibling { +- (id)nextSibling { id node; if ((node = [self _nextVisibleSibling])) { @@ -284,11 +284,11 @@ return nil; } -- (id)previousNode { +- (id)previousNode { [self doesNotRecognizeSelector:_cmd]; return nil; } -- (id)nextNode { +- (id)nextNode { [self doesNotRecognizeSelector:_cmd]; return nil; } diff --git a/sope-xml/DOM/DOMXMLOutputter.h b/sope-xml/DOM/DOMXMLOutputter.h index 467dd789..addc2d44 100644 --- a/sope-xml/DOM/DOMXMLOutputter.h +++ b/sope-xml/DOM/DOMXMLOutputter.h @@ -23,6 +23,13 @@ #define __DOMXMLOutputter_H__ #import +#include + +/* + DOMXMLOutputter + + Class to generate a text representation of an DOM node to stdout. +*/ @class NSMutableArray; @@ -32,7 +39,7 @@ unsigned indent; } -- (void)outputNode:(id)_node to:(id)_target; +- (void)outputNode:(id)_node to:(id)_target; - (void)outputDocument:(id)_document to:(id)_target; @end diff --git a/sope-xml/DOM/DOMXMLOutputter.m b/sope-xml/DOM/DOMXMLOutputter.m index 894d76e6..bc369b85 100644 --- a/sope-xml/DOM/DOMXMLOutputter.m +++ b/sope-xml/DOM/DOMXMLOutputter.m @@ -303,7 +303,7 @@ break; } } -- (void)outputNodeList:(id)_nodeList to:(id)_target { +- (void)outputNodeList:(id)_nodeList to:(id)_target { id children; unsigned i, count; diff --git a/sope-xml/DOM/Version b/sope-xml/DOM/Version index 36c1074d..a6180019 100644 --- a/sope-xml/DOM/Version +++ b/sope-xml/DOM/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=13 +SUBMINOR_VERSION:=14 diff --git a/sope-xml/SaxObjC/ChangeLog b/sope-xml/SaxObjC/ChangeLog index fae76d19..5576e110 100644 --- a/sope-xml/SaxObjC/ChangeLog +++ b/sope-xml/SaxObjC/ChangeLog @@ -1,3 +1,7 @@ +2005-04-23 Helge Hess + + * SaxMethodCallHandler.m: fixed a gcc 4.0 warning (v4.5.50) + 2005-03-23 Marcus Mueller * SaxObjectDecoder.m: fixed remaining leaks (v4.5.49) diff --git a/sope-xml/SaxObjC/SaxMethodCallHandler.m b/sope-xml/SaxObjC/SaxMethodCallHandler.m index cbed76df..85ed9e4b 100644 --- a/sope-xml/SaxObjC/SaxMethodCallHandler.m +++ b/sope-xml/SaxObjC/SaxMethodCallHandler.m @@ -144,7 +144,7 @@ static inline void _selAddEscaped(SaxMethodCallHandler *self, NSString *_s) { if ((len = [_s cStringLength]) == 0) return; - cstr = [_s cString]; + cstr = (const unsigned char *)[_s cString]; for (i = 0; i < len; i++) { register unsigned char c = cstr[i]; @@ -177,7 +177,7 @@ static inline void _selAddEscaped(SaxMethodCallHandler *self, NSString *_s) { } buf[j] = '\0'; - s = [[NSString alloc] initWithCString:buf length:j]; + s = [[NSString alloc] initWithCString:(char *)buf length:j]; [self->selName appendString:s]; [s release]; } diff --git a/sope-xml/SaxObjC/Version b/sope-xml/SaxObjC/Version index 704a8fa2..f7227d67 100644 --- a/sope-xml/SaxObjC/Version +++ b/sope-xml/SaxObjC/Version @@ -1,3 +1,3 @@ # version file -SUBMINOR_VERSION:=49 +SUBMINOR_VERSION:=50 -- 2.39.5