+2006-07-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * fixed gcc 4.1 warnings, use %p for pointer formats (v4.5.22)
+
2006-06-04 Helge Hess <helge.hess@opengroupware.org>
* DOMElement.m: added missing -localName implementation (v4.5.21)
/* description */
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: {%@}%@%s '%@'>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: {%@}%@%s '%@'>",
self, NSStringFromClass([self class]),
self->namespaceURI,
[self name],
- (NSString *)description {
return [NSString stringWithFormat:
- @"<0x%08X[%@]: name=%@ parent=%@ #attrs=%i #children=%i>",
+ @"<0x%p[%@]: name=%@ parent=%@ #attrs=%i #children=%i>",
self, NSStringFromClass([self class]),
[self nodeName],
[[self parentNode] nodeName],
id attr;
ms = [NSMutableString stringWithCapacity:1024];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
[ms appendFormat:@" element=%@", self->element];
[ms appendString:@" attributes:\n"];
- (NSString *)description {
return [NSString stringWithFormat:
- @"<0x%08X[%@]: name=%@ parent=%@ type=%i #children=%i>",
+ @"<0x%p[%@]: name=%@ parent=%@ type=%i #children=%i>",
self, NSStringFromClass([self class]),
[self nodeName],
[[self parentNode] nodeName],
/* description */
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: target=%@ data='%@'>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: target=%@ data='%@'>",
self, NSStringFromClass([self class]),
[self target], [self data]];
}
ps = ((i - s) > 0)
? [_path substringWithRange:NSMakeRange(s, (i - s))]
- : @"";
+ : (NSString *)@"";
if ((predicate = [self parsePredicateExpression:ps])) {
if (predicates == nil)
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self];
+ [ms appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self];
[ms appendFormat:@" element='%@'", self->elementName];
[ms appendString:self->deep ? @" deep" : @" shallow"];
[ms appendFormat:@" nodeType=%i", self->nodeType];
}
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: keypath='%@'>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: keypath='%@'>",
self, NSStringFromClass([self class]), self->keyPath];
}
}
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: op=%i>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: op=%i>",
self, NSStringFromClass([self class]), self->queryOp];
}
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<%@[0x%08X]: ", NSStringFromClass([self class]), self];
+ [ms appendFormat:@"<%@[0x%p]: ", NSStringFromClass([self class]), self];
[ms appendString:@"sequence="];
[ms appendString:[self->queryPaths description]];
[ms appendString:@">"];
self->uri = [_spec substringToIndex:r.location];
self->uri = ([self->uri length] > 1)
? [self->uri copy]
- : @"*";
+ : (id)@"*";
}
else {
/* usual 'blah' */
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<%@[0x%08X]:", NSStringFromClass([self class]), self];
+ [ms appendFormat:@"<%@[0x%p]:", NSStringFromClass([self class]), self];
[ms appendFormat:@" attrSpec='%@'", self->attrSpec];
if (self->uri)
[ms appendFormat:@" uri='%@'", self->uri];
r = [_rawName rangeOfString:@":"];
nsPrefix = (r.length > 0)
? [_rawName substringToIndex:r.location]
- : nil;
+ : (NSString *)nil;
}
else
nsPrefix = nil;
- (void)pushPrefix:(NSString *)_prefix namespace:(NSString *)_namespace {
[self _checkPrefixStack];
- [self->stack addObject:(_prefix) ? _prefix : @""];
- [self->stack addObject:(_namespace) ? _namespace : @""];
+ [self->stack addObject:(_prefix) ? _prefix : (NSString *)@""];
+ [self->stack addObject:(_namespace) ? _namespace : (NSString *)@""];
}
- (void)popPrefixAndNamespace {
attr = [_attrs objectAtIndex:j];
attrNamespace = [attr namespaceURI];
attrPrefix = [attr prefix];
- attrNamespace = (attrNamespace) ? attrNamespace : @"";
- attrPrefix = (attrPrefix) ? attrPrefix : @"";
+ attrNamespace = (attrNamespace) ? attrNamespace : (NSString *)@"";
+ attrPrefix = (attrPrefix) ? attrPrefix : (NSString *)@"";
if (([attrNamespace length] == 0 && [attrPrefix length] == 0)) continue;
else {
}
- NSLog(@"0x%08X<%@> eval QP '%@': %@", self, NSStringFromClass([self class]),
+ NSLog(@"0x%p<%@> eval QP '%@': %@", self, NSStringFromClass([self class]),
_pc, result);
return result;
# version file
-SUBMINOR_VERSION:=21
+SUBMINOR_VERSION:=22
+2006-07-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * fixed gcc 4.1 warnings, use %p for pointers formats (v4.5.14)
+
2005-08-27 Helge Hess <helge.hess@opengroupware.org>
* added common.h in project subdirs for PCH support (v4.5.13)
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if (self->_text) [ms appendFormat:@" text-len=%d", [self->_text length]];
if (self->_document)
int i, length, start;
if (debugOn)
- NSLog(@"PARSE TEXT: '%@' (delegate=0x%08X)", _str, self->_delegate);
+ NSLog(@"PARSE TEXT: '%@' (delegate=0x%p)", _str, self->_delegate);
_str = [self preprocessText:_str inContext:_ctx];
if (debugOn) NSLog(@" preprocessed: '%@'", _str);
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if (self->_elements)
[ms appendFormat:@" #elements=%d", [self->_elements count]];
if (self->_delegate) {
- [ms appendFormat:@" delegate=0x%08X<%@>",
+ [ms appendFormat:@" delegate=0x%p<%@>",
self->_delegate, NSStringFromClass([(id)self->_delegate class])];
}
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:128];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
/* header specific */
[ms appendFormat:@" #elements=%d", [self->_elements count]];
if (self->_delegate) {
- [ms appendFormat:@" delegate=0x%08X<%@>",
+ [ms appendFormat:@" delegate=0x%p<%@>",
self->_delegate, NSStringFromClass([(id)self->_delegate class])];
}
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _url ? _url : (id)@"<nil>", @"url",
- _sysId ? _sysId : (id)@"<nil>", @"publicId",
- self, @"parser",
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _url ? _url : (NSURL *)@"<nil>", @"url",
+ _sysId ? _sysId : (NSString *)@"<nil>", @"publicId",
+ self, @"parser",
nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"could not retrieve URL content"
userInfo:ui];
+ [ui release]; ui = nil;
+
[self->errorHandler fatalError:e];
return;
}
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _sysId ? _sysId : (id)@"<nil>", @"publicId",
- self, @"parser",
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _sysId ? _sysId : (NSString *)@"<nil>", @"publicId",
+ self, @"parser",
nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"missing source for parsing!"
userInfo:ui];
+ [ui release]; ui = nil;
+
[self->errorHandler fatalError:e];
return;
}
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _source ? _source : @"<nil>", @"source",
- _sysId ? _sysId : @"<nil>", @"publicId",
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _source ? _source : (id)@"<nil>", @"source",
+ _sysId ? _sysId : (NSString *)@"<nil>", @"publicId",
self, @"parser",
nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"can not handle data-source"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
return;
MAJOR_VERSION=4
MINOR_VERSION=5
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14
+2006-07-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * v4.5.58
+
+ * SaxAttributes.m: fixed gcc 4.1 warnings
+
+ * use %p for pointer formats
+
2006-07-02 Helge Hess <helge.hess@opengroupware.org>
* XMLNamespaces.h: added ATOM namespace, gCal namespace, OpenSearch
value:(NSString *)_value
{
[self->names addObject:_localName ? _localName : _rawName];
- [self->uris addObject:_uri ? _uri : @""];
- [self->rawNames addObject:_rawName ? _rawName : @""];
- [self->types addObject:_type ? _type : @"CDATA"];
+ [self->uris addObject:_uri ? _uri : (NSString *)@""];
+ [self->rawNames addObject:_rawName ? _rawName : (NSString *)@""];
+ [self->types addObject:_type ? _type : (NSString *)@"CDATA"];
[self->values addObject:_value];
}
# version file
-SUBMINOR_VERSION:=57
+SUBMINOR_VERSION:=58
+2006-07-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * fixed gcc 4.1 warnings, use %p for pointer formats (v4.5.28)
+
2006-02-26 Marcus Mueller <znek@mulle-kybernetik.com>
* XmlRpcValue.m: fixed stupid bugs in -isException and -isDictionary,
# version file
-SUBMINOR_VERSION:=27
+SUBMINOR_VERSION:=28
xmlDecl = [_string substringFromIndex:(r.location + 10)];
r = [xmlDecl rangeOfString:@"'"];
xmlDecl = r.length == 0
- ? nil
+ ? (NSString *)nil
: [xmlDecl substringToIndex:r.location];
}
else {
xmlDecl = [_string substringFromIndex:(r.location + 10)];
r = [xmlDecl rangeOfString:@"\""];
xmlDecl = r.length == 0
- ? nil
+ ? (NSString *)nil
: [xmlDecl substringToIndex:r.location];
}
else
return ([result isKindOfClass:[XmlRpcMethodCall class]])
? result
- : nil;
+ : (XmlRpcMethodCall *)nil;
}
- (XmlRpcMethodResponse *)decodeMethodResponse {
return [result isKindOfClass:[XmlRpcMethodResponse class]]
? result
- : nil;
+ : (XmlRpcMethodResponse *)nil;
}
- (id)_decodeObject:(XmlRpcValue *)_value {
- (NSString *)description {
NSMutableString *s;
- s = [NSMutableString stringWithFormat:@"<0x%08X[%@]: ",
+ s = [NSMutableString stringWithFormat:@"<0x%p[%@]: ",
self, NSStringFromClass([self class])];
[s appendFormat:@"method=%@", [self methodName]];
[s appendFormat:@" #paras=%d", [self->parameters count]];
NSMutableString *ms;
ms = [NSMutableString stringWithCapacity:64];
- [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if (result)
[ms appendFormat:@" %@", self->result];
[self->dateTime release]; self->dateTime = nil;
tz = ((idx = [_attrs indexOfRawName:@"timeZone"]) != NSNotFound)
- ? [_attrs valueAtIndex:idx]
- : nil;
+ ? (id)[_attrs valueAtIndex:idx]
+ : nil;
if (tz) {
self->timeZone = [[NSTimeZone timeZoneWithAbbreviation:tz] retain];
[self->tagStack addObject:_rawName];
tmp = ((idx = [_attrs indexOfRawName:@"NSObjectClass"]) != NSNotFound)
- ? [_attrs valueAtIndex:idx]
- : nil;
+ ? (id)[_attrs valueAtIndex:idx]
+ : nil;
[self->className autorelease];
self->className = [tmp retain];
+2006-07-03 Helge Hess <helge.hess@opengroupware.org>
+
+ * v4.5.24
+
+ * use %p for pointer formats, fixed gcc 4.1 warnings
+
+ * improved retain-count for exception userInfo dicts
+
2005-11-17 Helge Hess <helge.hess@opengroupware.org>
* properly include string.h to avoid warnings (v4.5.23)
# version
-SUBMINOR_VERSION:=23
+SUBMINOR_VERSION:=24
NSData *data;
data = [_source isFileURL]
- ? [NSData dataWithContentsOfMappedFile:[_source path]]
+ ? (NSData *)[NSData dataWithContentsOfMappedFile:[_source path]]
: [_source resourceDataUsingCache:YES];
[self _parseFromData:data systemId:[_source absoluteString]];
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _source ? _source : @"<nil>", @"source",
- self, @"parser",
- nil];
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _source ? _source : (id)@"<nil>", @"source",
+ self, @"parser",
+ nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"cannot handle data-source"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
}
nsuri = (attribute->ns != NULL)
? xmlCharsToString(attribute->ns->href)
- : nil;
+ : (NSString *)nil;
[attributes addAttribute:name
uri:nsuri
tagName = xmlCharsToString(node->name);
nsuri = (node->ns != NULL)
? xmlCharsToString(node->ns->href)
- : nil;
+ : (NSString *)nil;
attrs = [self processAttributes:node->properties];
NSData *data;
data = [_source isFileURL]
- ? [NSData dataWithContentsOfMappedFile:[_source path]]
+ ? (NSData *)[NSData dataWithContentsOfMappedFile:[_source path]]
: [_source resourceDataUsingCache:YES];
[self _parseFromData:data systemId:[_source absoluteString]];
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _source ? _source : @"<nil>", @"source",
- self, @"parser",
- nil];
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _source ? _source : (id)@"<nil>", @"source",
+ self, @"parser",
+ nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
- reason:@"can't handle data-source"
+ reason:@"can not handle data-source"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
}
#define SETUP_ACTDRIVER \
{ if (activeDriver != nil) { \
- NSLog(@"ERROR(%s): %@ there is an active driver set (0x%08X), " \
+ NSLog(@"ERROR(%s): %@ there is an active driver set (0x%p), " \
@"override!", \
__PRETTY_FUNCTION__, self, activeDriver);\
}\
#define TEARDOWN_ACTDRIVER \
{ if (activeDriver == self) activeDriver = nil; \
else if (activeDriver != nil) { \
- NSLog(@"ERROR(%s): %@ activeDriver global var mixed up 0x%08X, " \
+ NSLog(@"ERROR(%s): %@ activeDriver global var mixed up 0x%p, " \
@"probably a THREAD issue.", \
__PRETTY_FUNCTION__, self, activeDriver); } }
r = [xmlDecl rangeOfString:@"'"];
xmlDecl = (r.length > 0)
? [xmlDecl substringToIndex:r.location]
- : nil;
+ : (NSString *)nil;
}
else {
r = [xmlDecl rangeOfString:@"encoding=\""];
r = [xmlDecl rangeOfString:@"\""];
xmlDecl = r.length > 0
? [xmlDecl substringToIndex:r.location]
- : nil;
+ : (NSString *)nil;
}
else
xmlDecl = nil;
SaxParseException *e;
NSDictionary *ui;
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _source ? _source : @"<nil>", @"source",
- self, @"parser",
- nil];
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _source ? _source : (id)@"<nil>", @"source",
+ self, @"parser",
+ nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"cannot handle data-source"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
return;
SaxParseException *e;
NSDictionary *ui;
- NSLog(@"%s: couldn't create memory parser ctx (src=0x%08X, len=%d) !",
+ NSLog(@"%s: couldn't create memory parser ctx (src=0x%p, len=%d) !",
__PRETTY_FUNCTION__, src, len);
TEARDOWN_ACTDRIVER;
return;
}
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _sysId ? _sysId : @"<nil>", @"systemID",
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _sysId ? _sysId : (NSString *)@"<nil>", @"systemID",
self, @"parser",
nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"cannot handle system-id"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
return;
#if DEBUG
NSLog(@"%s: missing file '%@'", __PRETTY_FUNCTION__, _sysId);
#endif
- ui = [NSDictionary dictionaryWithObjectsAndKeys:
- _sysId ? _sysId : @"<nil>", @"path",
+ ui = [[NSDictionary alloc] initWithObjectsAndKeys:
+ _sysId ? _sysId : (NSString *)@"<nil>", @"path",
self, @"parser",
nil];
e = (id)[SaxParseException exceptionWithName:@"SaxIOException"
reason:@"can't find file"
userInfo:ui];
+ [ui release]; ui = nil;
[self->errorHandler fatalError:e];
[pool release];
static NSDictionary *defNS = nil;
id keys[2], values[2];
- //NSLog(@"start doc 0x%08X", self);
+ //NSLog(@"start doc 0x%p", self);
if (defNS == nil) {
keys[0] = @"xml"; values[0] = @"http://www.w3.org/XML/1998/namespace";
/* description */
- (NSString *)description {
- return [NSString stringWithFormat:@"<0x%08X[%@]: pub=%@ sys=%@ L%i C%i>",
+ return [NSString stringWithFormat:@"<0x%p[%@]: pub=%@ sys=%@ L%i C%i>",
self, NSStringFromClass([self class]),
[self publicId], [self systemId],
[self lineNumber], [self columnNumber]];
- (NSString *)description {
NSMutableString *s = [NSMutableString stringWithCapacity:64];
- [s appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+ [s appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
if (self->title) [s appendFormat:@" title='%@'", self->title];
if (self->link) [s appendFormat:@" link='%@'", self->link];
//[s appendFormat:@" info='%@'", self->info];