From: helge Date: Mon, 6 Sep 2004 20:21:23 +0000 (+0000) Subject: removed some libFoundation dependencies, cleaned up X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08add04c6b46b4b2cefd7007688dd1ce72d6af0e;p=sope removed some libFoundation dependencies, cleaned up exception handling to use the same code on all Foundations git-svn-id: http://svn.opengroupware.org/SOPE/trunk@115 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- diff --git a/sope-appserver/NGObjWeb/NGHttp/common.h b/sope-appserver/NGObjWeb/NGHttp/common.h index 88d41be9..9a3de061 100644 --- a/sope-appserver/NGObjWeb/NGHttp/common.h +++ b/sope-appserver/NGObjWeb/NGHttp/common.h @@ -1,7 +1,7 @@ /* - Copyright (C) 2000-2003 SKYRIX Software AG + Copyright (C) 2000-2004 SKYRIX Software AG - This file is part of OGo + This file is part of OpenGroupware.org. OGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #ifndef __NGHttp_common_H__ #define __NGHttp_common_H__ @@ -32,13 +31,10 @@ #import #import #import + #include #include #include #include -#if LIB_FOUNDATION_LIBRARY -# include -#endif - #endif /* __NGHttp_common_H__ */ diff --git a/sope-appserver/NGXmlRpc/common.h b/sope-appserver/NGXmlRpc/common.h index 8bc83a4e..b3cfd2ec 100644 --- a/sope-appserver/NGXmlRpc/common.h +++ b/sope-appserver/NGXmlRpc/common.h @@ -21,9 +21,7 @@ #import -#if LIB_FOUNDATION_LIBRARY -# import -#elif NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY +#if NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY # include # include #endif diff --git a/sope-appserver/SoOFS/common.h b/sope-appserver/SoOFS/common.h index 79d301e8..a3868ca9 100644 --- a/sope-appserver/SoOFS/common.h +++ b/sope-appserver/SoOFS/common.h @@ -1,7 +1,7 @@ /* - Copyright (C) 2000-2003 SKYRIX Software AG + Copyright (C) 2000-2004 SKYRIX Software AG - This file is part of OGo + This file is part of OpenGroupware.org. OGo is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the @@ -18,13 +18,10 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id: common.h 4 2004-08-20 17:04:31Z helge $ #import -#if LIB_FOUNDATION_LIBRARY -# import -#elif NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY +#if NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY # include # include #endif diff --git a/sope-appserver/WOXML/common.h b/sope-appserver/WOXML/common.h index 47a9c0af..d24345e8 100644 --- a/sope-appserver/WOXML/common.h +++ b/sope-appserver/WOXML/common.h @@ -18,7 +18,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #ifndef __WOXML_common_H__ #define __WOXML_common_H__ diff --git a/sope-core/NGStreams/ChangeLog b/sope-core/NGStreams/ChangeLog index 967e4f3b..c4d946b0 100644 --- a/sope-core/NGStreams/ChangeLog +++ b/sope-core/NGStreams/ChangeLog @@ -1,3 +1,9 @@ +2004-09-06 Helge Hess + + * NGByteBuffer.m, NGLocalSocketAddress.m, NGCharBuffer.m: fixed + exception handling to be the same on all Foundation libraries + (v4.3.45) + 2004-08-29 Helge Hess * added hack to install the project in FHS locations - the library, diff --git a/sope-core/NGStreams/NGByteBuffer.m b/sope-core/NGStreams/NGByteBuffer.m index bec356a1..8499ff38 100644 --- a/sope-core/NGStreams/NGByteBuffer.m +++ b/sope-core/NGStreams/NGByteBuffer.m @@ -18,16 +18,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ #include "NGByteBuffer.h" #include "common.h" #include -#if LIB_FOUNDATION_LIBRARY -# include -#endif - typedef struct NGByteBufferLA { unsigned char byte; char isEOF:1; @@ -72,15 +67,8 @@ static Class DataStreamClass = Nil; unsigned size = 0; if (_la < 1) { -#if LIB_FOUNDATION_LIBRARY - [[[RangeException alloc] - initWithReason:@"lookahead depth is less than one" - size:1 index:_la] - raise]; -#else [NSException raise:NSRangeException format:@"lookahead depth is less than one (%d)", _la]; -#endif } // Find first power of 2 >= to requested size @@ -183,17 +171,9 @@ static Class DataStreamClass = Nil; *(&idx) = (_la + self->headIdx) & self->sizeLessOne; if (_la > self->sizeLessOne) { -#if LIB_FOUNDATION_LIBRARY - [[[RangeException alloc] - initWithReason:@"tried to look ahead too far" - size:self->bufLen - index:_la] - raise]; -#else [NSException raise:NSRangeException format:@"tried to look ahead too far (la=%d, max=%d)", _la, self->bufLen]; -#endif } if (self->wasEOF) { diff --git a/sope-core/NGStreams/NGCharBuffer.m b/sope-core/NGStreams/NGCharBuffer.m index 6db00234..e720c08c 100644 --- a/sope-core/NGStreams/NGCharBuffer.m +++ b/sope-core/NGStreams/NGCharBuffer.m @@ -18,15 +18,11 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: NGCharBuffer.m 4 2004-08-20 17:04:31Z helge $ #include "NGCharBuffer.h" #include "common.h" -#if LIB_FOUNDATION_LIBRARY -# include -#endif - typedef struct NGCharBufferLA { unichar character; char isEOF:1; @@ -44,15 +40,8 @@ typedef struct NGCharBufferLA { int size = 0; if (_la < 1) { -#if LIB_FOUNDATION_LIBRARY - [[[RangeException alloc] - initWithReason:@"LA is less than one" - size:1 index:_la] - raise]; -#else [NSException raise:NSRangeException format:@"lookahead depth is less than one (%d)", _la]; -#endif } // Find first power of 2 >= to requested size @@ -107,7 +96,7 @@ typedef struct NGCharBufferLA { return character; } -// LA +/* LA */ - (int)la:(int)_la { int result = -1; @@ -116,17 +105,9 @@ typedef struct NGCharBufferLA { idx = *(&idx); if (_la > self->sizeLessOne) { -#if LIB_FOUNDATION_LIBRARY - [[[RangeException alloc] - initWithReason:@"LA out of bounds" - size:self->bufLen - index:_la] - raise]; -#else [NSException raise:NSRangeException format:@"tried to look ahead too far (la=%d, max=%d)", _la, self->bufLen]; -#endif } if (self->wasEOF) { diff --git a/sope-core/NGStreams/NGLocalSocketAddress.m b/sope-core/NGStreams/NGLocalSocketAddress.m index 3b92b3ac..888b0009 100644 --- a/sope-core/NGStreams/NGLocalSocketAddress.m +++ b/sope-core/NGStreams/NGLocalSocketAddress.m @@ -18,7 +18,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -// $Id$ +// $Id: NGLocalSocketAddress.m 4 2004-08-20 17:04:31Z helge $ #if !defined(WIN32) || defined(__CYGWIN32__) @@ -27,10 +27,6 @@ #include "NGLocalSocketDomain.h" #import -#if LIB_FOUNDATION_LIBRARY -# include -#endif - #include "config.h" #if defined(__APPLE__) || defined(__FreeBSD__) @@ -85,13 +81,8 @@ static NSString *socketDirectoryPath = @"/tmp"; sizeof(((struct sockaddr_un *)self->address)->sun_path), [_path cStringLength], _path); -#if LIB_FOUNDATION_LIBRARY - [[[InvalidArgumentException alloc] initWithReason: - @"path to long as local domain socket address !"] raise]; -#else [NSException raise:NSInvalidArgumentException format:@"path to long as local domain socket address !"]; -#endif [self release]; return nil; } diff --git a/sope-core/NGStreams/Version b/sope-core/NGStreams/Version index 492dc7cb..332a1c4c 100644 --- a/sope-core/NGStreams/Version +++ b/sope-core/NGStreams/Version @@ -1,3 +1,3 @@ # $Id: Version 4 2004-08-20 17:04:31Z helge $ -SUBMINOR_VERSION:=44 +SUBMINOR_VERSION:=45 diff --git a/sope-gdl1/PostgreSQL/ChangeLog b/sope-gdl1/PostgreSQL/ChangeLog index 38c1ef1b..5bf6a9c4 100644 --- a/sope-gdl1/PostgreSQL/ChangeLog +++ b/sope-gdl1/PostgreSQL/ChangeLog @@ -1,3 +1,8 @@ +2004-09-06 Helge Hess + + * EOAttribute+PostgreSQL72.m: use same exception handling on all + Foundations (v1.1.37) + 2004-08-29 Helge Hess * added hack to install the project in FHS locations - the DB adaptor diff --git a/sope-gdl1/PostgreSQL/EOAttribute+PostgreSQL72.m b/sope-gdl1/PostgreSQL/EOAttribute+PostgreSQL72.m index 0a68fb36..6a005fb0 100644 --- a/sope-gdl1/PostgreSQL/EOAttribute+PostgreSQL72.m +++ b/sope-gdl1/PostgreSQL/EOAttribute+PostgreSQL72.m @@ -208,19 +208,11 @@ static NSString *PGSQL_TIMESTAMP_FORMAT = @"%Y-%m-%d %H:%M:%S%z"; else { NSLog(@"%s: invalid argument %@", __PRETTY_FUNCTION__, _type); -#if LIB_FOUNDATION_LIBRARY - [InvalidArgumentException raise:@"InvalidArgumentException" - format: - @"invalid PostgreSQL72 type %@ passed to " - @"-loadValueClassForExternalPostgreSQLType:", - _type]; -#else [NSException raise:@"InvalidArgumentException" format: @"invalid PostgreSQL72 type %@ passed to " @"-loadValueClassForExternalPostgreSQLType:", _type]; -#endif } } diff --git a/sope-gdl1/PostgreSQL/Version b/sope-gdl1/PostgreSQL/Version index 90614ef6..bf873749 100644 --- a/sope-gdl1/PostgreSQL/Version +++ b/sope-gdl1/PostgreSQL/Version @@ -1,3 +1,3 @@ # $Id: Version 1 2004-08-20 10:38:46Z znek $ -SUBMINOR_VERSION:=36 +SUBMINOR_VERSION:=37 diff --git a/sope-gdl1/PostgreSQL/common.h b/sope-gdl1/PostgreSQL/common.h index 875ce389..6d86f5c3 100644 --- a/sope-gdl1/PostgreSQL/common.h +++ b/sope-gdl1/PostgreSQL/common.h @@ -1,8 +1,8 @@ /* common.h - Copyright (C) 1999 MDlink online service center GmbH and Helge Hess Copyright (C) 2000-2004 SKYRIX Software AG and Helge Hess + Copyright (C) 1999 MDlink online service center GmbH and Helge Hess Author: Helge Hess (helge.hess@opengroupware.org) @@ -35,13 +35,11 @@ #import -#if LIB_FOUNDATION_LIBRARY -# import -#else +#if !LIB_FOUNDATION_LIBRARY # include # include #endif -#import +#include #endif /* ___PostgreSQL_common_H___ */