]> err.no Git - sope/commitdiff
use %p for pointer formats
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 18:51:41 +0000 (18:51 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 3 Jul 2006 18:51:41 +0000 (18:51 +0000)
fixed gcc 4.1 warnings
minor improvs

git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1281 e4a50df8-12e2-0310-a44c-efbce7f8a7e3

32 files changed:
sope-xml/DOM/ChangeLog
sope-xml/DOM/DOMAttribute.m
sope-xml/DOM/DOMElement.m
sope-xml/DOM/DOMNode.m
sope-xml/DOM/DOMProcessingInstruction.m
sope-xml/DOM/DOMQueryPathExpression.m
sope-xml/DOM/DOMSaxHandler.m
sope-xml/DOM/DOMXMLOutputter.m
sope-xml/DOM/NSObject+QPEval.m
sope-xml/DOM/Version
sope-xml/STXSaxDriver/ChangeLog
sope-xml/STXSaxDriver/ExtraSTX/StructuredText.m
sope-xml/STXSaxDriver/Model/StructuredTextBodyElement.m
sope-xml/STXSaxDriver/Model/StructuredTextHeader.m
sope-xml/STXSaxDriver/STXSaxDriver.m
sope-xml/STXSaxDriver/Version
sope-xml/SaxObjC/ChangeLog
sope-xml/SaxObjC/SaxAttributes.m
sope-xml/SaxObjC/Version
sope-xml/XmlRpc/ChangeLog
sope-xml/XmlRpc/Version
sope-xml/XmlRpc/XmlRpcDecoder.m
sope-xml/XmlRpc/XmlRpcMethodCall.m
sope-xml/XmlRpc/XmlRpcMethodResponse.m
sope-xml/XmlRpc/XmlRpcSaxHandler.m
sope-xml/libxmlSAXDriver/ChangeLog
sope-xml/libxmlSAXDriver/Version
sope-xml/libxmlSAXDriver/libxmlDocSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlHTMLSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlSAXDriver.m
sope-xml/libxmlSAXDriver/libxmlSAXLocator.m
sope-xml/samples/rssparse.m

index 9012be97ec36c62d6d3f18d7d74ca9e2d530e1fa..70511cbbce765865d1ddb50e3da5c060492aa7dd 100644 (file)
@@ -1,3 +1,7 @@
+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)
index bccd18b99687f35b41c03bac13139efd331b4906..98376fc58117fb28c7dd44d0b314e87453abb170 100644 (file)
 /* description */
 
 - (NSString *)description {
-  return [NSString stringWithFormat:@"<0x%08X[%@]: {%@}%@%s '%@'>",
+  return [NSString stringWithFormat:@"<0x%p[%@]: {%@}%@%s '%@'>",
                      self, NSStringFromClass([self class]),
                      self->namespaceURI,
                      [self name],
index cbd6eeb44671f67fb2a97edee95b71be52342254..ed23183eeb21ddfb891c18cdeb9719b24b76ba25 100644 (file)
@@ -507,7 +507,7 @@ static NSNull *null = nil;
 
 - (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],
@@ -785,7 +785,7 @@ static NSString *_XNSLocalName(NSString *_name) {
   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"];
index d7e6c4e003b7f399361928debee3f4bd51386d91..621efec38ffd5cf5cd0f214cd872523fe1213bb4 100644 (file)
@@ -209,7 +209,7 @@ NSString *DOMNodeValue(id _node) {
 
 - (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],
index 8efe4a05e768b612376212ce1e7062bce4aa7d7b..18824745cb16334f07913922772a2d122b1f9d9e 100644 (file)
@@ -96,7 +96,7 @@
 /* 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]];
 }
index 48e92f800d2b56ae202b0643740a2a26143de740..f6b93a13248ae2df7e5d16a4da53a8af18be4d49 100644 (file)
       
       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];
index 40757cfd97c77a96f9130790c4f044f95681de21..3e952169ac09fadeb9e391195e2ff25f8c3688b2 100644 (file)
@@ -200,7 +200,7 @@ static BOOL printErrors = NO;
     r = [_rawName rangeOfString:@":"];
     nsPrefix = (r.length > 0)
       ? [_rawName substringToIndex:r.location]
-      : nil;
+      : (NSString *)nil;
   }
   else
     nsPrefix = nil;
index bc369b85059065c041050d909a356dbaaa1d5f20..2715849fe548e2be0066324046d34d49bbc05c86 100644 (file)
 
 - (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;
     
index 1be5e8c4d2695f5c15b1835b786bef46b4abbda4..40566788832b776f648928b221051c6c139d2190 100644 (file)
   else {
   }
   
-  NSLog(@"0x%08X<%@> eval QP '%@': %@", self, NSStringFromClass([self class]),
+  NSLog(@"0x%p<%@> eval QP '%@': %@", self, NSStringFromClass([self class]),
         _pc, result);
   
   return result;
index e6164a36d31bcdc93f0bccb35e5dad297afcda67..6cc7ab753bff8515a8a7457fb4ad788a7caac9db 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=21
+SUBMINOR_VERSION:=22
index 24bd2f97d9e493bf0facc7760bda599cb38dc285..34ebc679dbec0bba93b9b8d07cd153ac0e6e6841 100644 (file)
@@ -1,3 +1,7 @@
+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)
index 25323e273b8e4adc7bb9e3ee3414da55dcfcb5b7..25742a57fc15fee35f118fb5978d1a9a25657bb7 100644 (file)
   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)
index 0b2b48e80ce131c05a82d81fd7d8ce1665302cf8..76e55c6c35c76e4ab37c2766f383f9c991ebdc15 100644 (file)
@@ -80,7 +80,7 @@ static BOOL debugOn = NO;
   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);
   
@@ -956,13 +956,13 @@ static BOOL debugOn = NO;
   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])];
   }
   
index b6fd54ecee25eaa123d19dbc9345692907d95d50..5ff49293ccc7efc45edd6b7133e0f9808a0e15e8 100644 (file)
@@ -62,7 +62,7 @@
   NSMutableString *ms;
   
   ms = [NSMutableString stringWithCapacity:128];
-  [ms appendFormat:@"<0x%08X[%@]:", self, NSStringFromClass([self class])];
+  [ms appendFormat:@"<0x%p[%@]:", self, NSStringFromClass([self class])];
 
   /* header specific */
 
@@ -75,7 +75,7 @@
     [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])];
   }
   
index dd7a18daf9c54cff5763dd932f63a0925daafb5b..bfb2379e1efceae7123349f866697ef2a6819b3c 100644 (file)
@@ -452,15 +452,17 @@ static BOOL debugOn = NO;
     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;
   }
@@ -474,14 +476,16 @@ static BOOL debugOn = NO;
     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;
   }
@@ -505,15 +509,16 @@ static BOOL debugOn = NO;
     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;
index bb0b16a80143fa419b213c81b50635ef73e0f6fe..35b388e61b8aefafa0dd48e9a2c9bab3d6150c3d 100644 (file)
@@ -2,4 +2,4 @@
 
 MAJOR_VERSION=4
 MINOR_VERSION=5
-SUBMINOR_VERSION:=13
+SUBMINOR_VERSION:=14
index 7b4843a4f9d7899cddd6e5bec82cae0eafc46bc9..7a8a5d4cba040dc1570cb152feb037210bb39261 100644 (file)
@@ -1,3 +1,11 @@
+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
index 380fa5b6a19f7e5c3bbf3e6d1c6423388f48df61..261b42a396a900b5c4a6c9e165bd545bfa1852f7 100644 (file)
@@ -94,9 +94,9 @@
   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];
 }
 
index 4096e97f616ffa96e10b45a5b277725b2d0ffbd7..31494853fc6418695cfabaf78b7d27ee87f6e96d 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=57
+SUBMINOR_VERSION:=58
index 7e3c01b207f93cf364b7a7d747a7277e6fcb28bb..3ba1f8a2abf36497b959a8e50062d84aa6f054c1 100644 (file)
@@ -1,3 +1,7 @@
+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,
index e2240cc25161ed605f29d198669ff88775a47fbb..59de9cb5b8a326d7fb546efacdae06684348d203 100644 (file)
@@ -1,3 +1,3 @@
 # version file
 
-SUBMINOR_VERSION:=27
+SUBMINOR_VERSION:=28
index e2cc643ad488ccf26c5a9199d5c3ed2bdd41c031..4965f4f4236531b00532e438807171ad943196d6 100644 (file)
@@ -112,7 +112,7 @@ static BOOL  doDebug         = NO;
         xmlDecl = [_string substringFromIndex:(r.location + 10)];
         r = [xmlDecl rangeOfString:@"'"];
         xmlDecl = r.length == 0
-          ? nil
+          ? (NSString *)nil
           : [xmlDecl substringToIndex:r.location];
       }
       else {
@@ -121,7 +121,7 @@ static BOOL  doDebug         = NO;
           xmlDecl = [_string substringFromIndex:(r.location + 10)];
           r = [xmlDecl rangeOfString:@"\""];
           xmlDecl = r.length == 0
-            ? nil
+            ? (NSString *)nil
             : [xmlDecl substringToIndex:r.location];
         }
         else
@@ -350,7 +350,7 @@ static BOOL  doDebug         = NO;
   
   return ([result isKindOfClass:[XmlRpcMethodCall class]])
     ? result
-    : nil;
+    : (XmlRpcMethodCall *)nil;
 }
 
 - (XmlRpcMethodResponse *)decodeMethodResponse {
@@ -371,7 +371,7 @@ static BOOL  doDebug         = NO;
   
   return [result isKindOfClass:[XmlRpcMethodResponse class]]
     ? result
-    : nil;
+    : (XmlRpcMethodResponse *)nil;
 }
 
 - (id)_decodeObject:(XmlRpcValue *)_value {
index 241e1773ec9ec26df7eacd360a91d6ea0a01252e..5ffe77f12668ef64e890ab9c380e776048ed15ce 100644 (file)
 - (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]];
index 22b29cdf54060d707b97cae25b49147e0f89ca25..7e0bde6f4200704e367d019e6fff46ff4631f8b7 100644 (file)
   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];
index 9bb863fd1f6cba92d01f2242929333fd0924de51..c67712fa6ea6d8776bfd1c41ac88cacef41d5331 100644 (file)
@@ -246,8 +246,8 @@ static BOOL  doDebug         = NO;
   [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];
@@ -534,8 +534,8 @@ static BOOL  doDebug         = NO;
   [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];
index 8642e41b26c515bbf1513427ca6821b5d4716079..387c2f3d435d60008d5bf93a71dfa5828cd9db4b 100644 (file)
@@ -1,3 +1,11 @@
+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)
index 02c5970d5aa5094f3b3597e6564224af0fbb7080..d20c0852da0d904e3c8b08e21e15baf29e07e01b 100644 (file)
@@ -1,3 +1,3 @@
 # version
 
-SUBMINOR_VERSION:=23
+SUBMINOR_VERSION:=24
index d5ec3f97e6a64004bf497fab25f22abc370af56f..06b1c7954fdefbdfca8164a65d81eb84a03a99aa 100644 (file)
@@ -237,7 +237,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     NSData *data;
 
     data = [_source isFileURL]
-      ? [NSData dataWithContentsOfMappedFile:[_source path]]
+      ? (NSData *)[NSData dataWithContentsOfMappedFile:[_source path]]
       : [_source resourceDataUsingCache:YES];
     
     [self _parseFromData:data systemId:[_source absoluteString]];
@@ -248,14 +248,15 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     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];
   }
@@ -332,7 +333,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
 
     nsuri = (attribute->ns != NULL)
       ? xmlCharsToString(attribute->ns->href)
-      : nil;
+      : (NSString *)nil;
     
     [attributes addAttribute:name
                 uri:nsuri
@@ -512,7 +513,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
   tagName = xmlCharsToString(node->name);
   nsuri = (node->ns != NULL)
     ? xmlCharsToString(node->ns->href)
-    : nil;
+    : (NSString *)nil;
   
   attrs = [self processAttributes:node->properties];
   
index 77fc04b03fad453e46791ac69d3faece5a7ccde9..265987e901cce520750486b5ddd8ea291bd1dec5 100644 (file)
@@ -331,7 +331,7 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     NSData *data;
 
     data = [_source isFileURL]
-      ? [NSData dataWithContentsOfMappedFile:[_source path]]
+      ? (NSData *)[NSData dataWithContentsOfMappedFile:[_source path]]
       : [_source resourceDataUsingCache:YES];
     
     [self _parseFromData:data systemId:[_source absoluteString]];
@@ -342,14 +342,15 @@ static void setLocator(void *udata, xmlSAXLocatorPtr _locator);
     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];
   }
index 5388b6e965bd68664e47b7ca3f03f0c35d819ef8..d12055fee3cfa3daeda8cacdd42d02618d33a08b 100644 (file)
@@ -87,7 +87,7 @@ static libxmlSAXDriver *activeDriver = nil; // THREAD
 
 #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);\
     }\
@@ -96,7 +96,7 @@ static libxmlSAXDriver *activeDriver = nil; // THREAD
 #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); } }
 
@@ -355,7 +355,7 @@ static xmlSAXHandler saxHandler = {
       r = [xmlDecl rangeOfString:@"'"];
       xmlDecl = (r.length > 0)
         ? [xmlDecl substringToIndex:r.location]
-        : nil;
+        : (NSString *)nil;
     }
     else {
       r = [xmlDecl rangeOfString:@"encoding=\""];
@@ -364,7 +364,7 @@ static xmlSAXHandler saxHandler = {
         r = [xmlDecl rangeOfString:@"\""];
         xmlDecl = r.length > 0
           ? [xmlDecl substringToIndex:r.location]
-          : nil;
+          : (NSString *)nil;
       }
       else
         xmlDecl = nil;
@@ -414,14 +414,15 @@ static xmlSAXHandler saxHandler = {
     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;
@@ -468,7 +469,7 @@ static xmlSAXHandler saxHandler = {
       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;
@@ -544,14 +545,15 @@ static int mfclose(void *f) {
       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;
@@ -579,13 +581,14 @@ static int mfclose(void *f) {
 #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];
@@ -891,7 +894,7 @@ static void _startDocument(libxmlSAXDriver *self) {
   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";
index e0b9505fa8bd0ca3d8606449746e2377609c427b..9765e9f137a27e75c10a8425e89482f7c34a6c06 100644 (file)
@@ -71,7 +71,7 @@
 /* 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]];
index fb41a93005f02e2e988679130426d0359b0c1354..d7079f27b7c5380386fdb6120c8001933a7d0b44 100644 (file)
@@ -78,7 +78,7 @@
 
 - (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];