From c31c141f3ad5883bca8b01593cc5a16ef14f0b7a Mon Sep 17 00:00:00 2001 From: helge Date: Wed, 21 Jun 2006 19:56:16 +0000 Subject: [PATCH] fixed some gcc4.1 warnings added WebDrive as a user agent git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1276 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 8 ++++++++ sope-appserver/NGObjWeb/NGHttp/NGUrlFormCoder.m | 7 ++++--- .../NGObjWeb/Templates/WOComponentScript.m | 5 +++-- sope-appserver/NGObjWeb/Templates/WOHTMLParser.m | 6 +++--- sope-appserver/NGObjWeb/Version | 2 +- sope-appserver/NGObjWeb/WEClientCapabilities.m | 12 +++++++++++- 6 files changed, 30 insertions(+), 10 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index c4b4db3a..75e9a997 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,11 @@ +2006-06-21 Helge Hess + + * v4.5.236 + + * WEClientCapabilities.m: added WebDrive as a known WebDAV client + + * fixed some gcc 4.1 warnings + 2006-06-11 Helge Hess * v4.5.235 diff --git a/sope-appserver/NGObjWeb/NGHttp/NGUrlFormCoder.m b/sope-appserver/NGObjWeb/NGHttp/NGUrlFormCoder.m index 2e90b8ba..73896bc2 100644 --- a/sope-appserver/NGObjWeb/NGHttp/NGUrlFormCoder.m +++ b/sope-appserver/NGObjWeb/NGHttp/NGUrlFormCoder.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -137,7 +138,7 @@ NGHashMap *NGDecodeUrlFormParameters(const unsigned char *_buffer, pos++; len = _unescapeUrl(&(_buffer[tmp]), (pos - tmp), buffer); - key = len > 0 ? urlStringFromBuffer(buffer, len) : @""; + key = len > 0 ? urlStringFromBuffer(buffer, len) : (NSString *)@""; if (pos < _len) { // value pending NSCAssert(_buffer[pos] == '=', @"invalid parser state .."); @@ -150,7 +151,7 @@ NGHashMap *NGDecodeUrlFormParameters(const unsigned char *_buffer, } len = _unescapeUrl(&(_buffer[tmp]), (pos - tmp), buffer); - value = len > 0 ? urlStringFromBuffer(buffer, len) : @""; + value = len > 0 ? urlStringFromBuffer(buffer, len) : (NSString *)@""; // skip '&' if (_buffer[pos] == '&' || _buffer[pos] == '?') pos++; diff --git a/sope-appserver/NGObjWeb/Templates/WOComponentScript.m b/sope-appserver/NGObjWeb/Templates/WOComponentScript.m index 57dd14ef..86fab87a 100644 --- a/sope-appserver/NGObjWeb/Templates/WOComponentScript.m +++ b/sope-appserver/NGObjWeb/Templates/WOComponentScript.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -69,7 +70,7 @@ tmp = self->scriptParts ? [self->scriptParts arrayByAddingObject:_part] - : [NSArray arrayWithObject:_part]; + : (NSArray *)[NSArray arrayWithObject:_part]; ASSIGN(self->scriptParts, tmp); } diff --git a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m index 1e090e0c..32534525 100644 --- a/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m +++ b/sope-appserver/NGObjWeb/Templates/WOHTMLParser.m @@ -172,7 +172,7 @@ static BOOL useUTF8 = NO; ASSIGN(self->parsingException, exception); - if (exception) { + if (exception != nil) { [self->callback parser:self failedParsingHTMLData:_html exception:exception]; } @@ -181,7 +181,7 @@ static BOOL useUTF8 = NO; finishedParsingHTMLData:_html elements:topLevel]; } - return self->parsingException ? nil : topLevel; + return self->parsingException ? (NSMutableArray *)nil : topLevel; } /* internal parsing */ @@ -581,7 +581,7 @@ static WOElement *_parseHashElement(NSZone *_zone, const unichar *_buffer, [attrs addEntriesFromDictionary:nameDict]; element = [self dynamicElementWithName:name - attributes:(attrs != nil ? attrs : nameDict) + attributes:(attrs != nil ? (NSDictionary *)attrs : nameDict) contentElements:children]; [name release]; name = nil; [nameDict release]; nameDict = nil; diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 2c7d7416..47afd52e 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=235 +SUBMINOR_VERSION:=236 # v4.5.234 requires libDOM v4.5.21 # v4.5.214 requires libNGExtensions v4.5.179 diff --git a/sope-appserver/NGObjWeb/WEClientCapabilities.m b/sope-appserver/NGObjWeb/WEClientCapabilities.m index 99a50878..cdb1c2dc 100644 --- a/sope-appserver/NGObjWeb/WEClientCapabilities.m +++ b/sope-appserver/NGObjWeb/WEClientCapabilities.m @@ -1,5 +1,6 @@ /* - Copyright (C) 2000-2005 SKYRIX Software AG + Copyright (C) 2000-2006 SKYRIX Software AG + Copyright (C) 2006 Helge Hess This file is part of SOPE. @@ -70,6 +71,7 @@ #define WEUA_Goliath 40 #define WEUA_PerlHTTPDAV 41 #define WEUA_Google 42 +#define WEUA_WebDrive 43 #define WEOS_UNKNOWN 0 #define WEOS_WINDOWS 1 @@ -336,6 +338,9 @@ else if (strstr(ua, "Morgul")) { self->browser = WEUA_Morgul; } + else if (strstr(ua, "WebDrive")) { + self->browser = WEUA_WebDrive; + } else if (strstr(ua, "CFNetwork/1.1")) { self->browser = WEUA_CFNetwork; } @@ -450,6 +455,7 @@ case WEUA_Goliath: return @"Goliath"; case WEUA_PerlHTTPDAV: return @"PerlHTTPDAV"; case WEUA_Google: return @"Google"; + case WEUA_WebDrive: return @"WebDrive"; default: return @"unknown"; } } @@ -607,6 +613,7 @@ if (self->browser == WEUA_Morgul) return YES; if (self->browser == WEUA_Goliath) return YES; if (self->browser == WEUA_PerlHTTPDAV) return YES; + if (self->browser == WEUA_WebDrive) return YES; return NO; } @@ -1074,4 +1081,7 @@ static NSString *WEClientDetectorFormName = @"WEClientDetect"; Word 2003 'Microsoft Office Protocol Discovery' + + WebDrive + 'WebDrive 7.10.1475 DAV' */ -- 2.39.5