]> err.no Git - sope/commitdiff
removed some libFoundation dependencies, cleaned up
authorhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 6 Sep 2004 20:21:23 +0000 (20:21 +0000)
committerhelge <helge@e4a50df8-12e2-0310-a44c-efbce7f8a7e3>
Mon, 6 Sep 2004 20:21:23 +0000 (20:21 +0000)
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

13 files changed:
sope-appserver/NGObjWeb/NGHttp/common.h
sope-appserver/NGXmlRpc/common.h
sope-appserver/SoOFS/common.h
sope-appserver/WOXML/common.h
sope-core/NGStreams/ChangeLog
sope-core/NGStreams/NGByteBuffer.m
sope-core/NGStreams/NGCharBuffer.m
sope-core/NGStreams/NGLocalSocketAddress.m
sope-core/NGStreams/Version
sope-gdl1/PostgreSQL/ChangeLog
sope-gdl1/PostgreSQL/EOAttribute+PostgreSQL72.m
sope-gdl1/PostgreSQL/Version
sope-gdl1/PostgreSQL/common.h

index 88d41be9aa95e235a574356ce4527d0a3019b230..9a3de0613cc00adebc69577f04a3df351b11676d 100644 (file)
@@ -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__
 #import <Foundation/Foundation.h>
 #import <Foundation/NSHost.h>
 #import <Foundation/NSUtilities.h>
+
 #include <NGExtensions/NGExtensions.h>
 #include <NGStreams/NGStreams.h>
 #include <NGStreams/NGNet.h>
 #include <NGMime/NGMime.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  include <Foundation/exceptions/GeneralExceptions.h>
-#endif
-
 #endif /* __NGHttp_common_H__ */
index 8bc83a4ec9b6dc037d23eac386de3c7a7b1231c0..b3cfd2ecefb38ec80c29ca612f40668ac168285b 100644 (file)
@@ -21,9 +21,7 @@
 
 #import <Foundation/Foundation.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  import <Foundation/exceptions/GeneralExceptions.h>
-#elif NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY
+#if NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY
 #  include <NGExtensions/NGObjectMacros.h>
 #  include <NGExtensions/NSString+Ext.h>
 #endif
index 79d301e867a593f4aea61fc377dd02aedf72ff27..a3868ca9797767bed8d1f5436dd7bb743a80de31 100644 (file)
@@ -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
   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 <Foundation/Foundation.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  import <Foundation/exceptions/GeneralExceptions.h>
-#elif NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY
+#if NeXT_Foundation_LIBRARY || APPLE_FOUNDATION_LIBRARY
 #  include <NGExtensions/NGObjectMacros.h>
 #  include <NGExtensions/NSString+Ext.h>
 #endif
index 47a9c0af747ad7fafe1c96ea2c06b21c01c06c19..d24345e8148c1729b937160dd4a12e362796d799 100644 (file)
@@ -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__
index 967e4f3b92230a17eee293fe300082718cf8038d..c4d946b0fa16debc1c1933bd30d0dfef86635c93 100644 (file)
@@ -1,3 +1,9 @@
+2004-09-06  Helge Hess  <helge.hess@opengroupware.org>
+
+       * 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  <helge.hess@opengroupware.org>
 
        * added hack to install the project in FHS locations - the library,
index bec356a102a68ff499122bae2355775d7d01259d..8499ff38f9805d896117494cd69b991014d9144a 100644 (file)
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.
 */
-// $Id$
 
 #include "NGByteBuffer.h"
 #include "common.h"
 #include <sys/time.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  include <extensions/exceptions/GeneralExceptions.h>
-#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) {
index 6db0023463b980e56d1e08cae39502ad3af5cd73..e720c08cd880d687e4170cea181025ca3ed840d0 100644 (file)
   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 <extensions/exceptions/GeneralExceptions.h>
-#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) {
index 3b92b3ac741e150eff06f0b43f60b48056669a0d..888b0009746b7fcd894d4e92cd0149c4fdc285ac 100644 (file)
@@ -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__)
 
 #include "NGLocalSocketDomain.h"
 #import <Foundation/NSString.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  include <extensions/exceptions/GeneralExceptions.h>
-#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;
     }
index 492dc7cb753021c71a68ca8b60b3079430d8da79..332a1c4c906875f6b4d7a1d1a0a8e26eac729b0d 100644 (file)
@@ -1,3 +1,3 @@
 # $Id: Version 4 2004-08-20 17:04:31Z helge $
 
-SUBMINOR_VERSION:=44
+SUBMINOR_VERSION:=45
index 38c1ef1bb005dfa60209cf7c07f75c74dcdb36eb..5bf6a9c405fcbdbc3fb5dfa90c8f88d11b5693ab 100644 (file)
@@ -1,3 +1,8 @@
+2004-09-06  Helge Hess  <helge.hess@opengroupware.org>
+
+       * EOAttribute+PostgreSQL72.m: use same exception handling on all
+         Foundations (v1.1.37)
+
 2004-08-29  Helge Hess  <helge.hess@opengroupware.org>
        
        * added hack to install the project in FHS locations - the DB adaptor
index 0a68fb360c50efba3744cd245b045281d2ed7178..6a005fb0db71402e39b3d945c86e9b3c12aa2f02 100644 (file)
@@ -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
   }
 }
 
index 90614ef6c54d1c76ba894e58a0c106ba5df8ee04..bf873749e63714019fbda48fd1eadd96f7e5fcd1 100644 (file)
@@ -1,3 +1,3 @@
 # $Id: Version 1 2004-08-20 10:38:46Z znek $
 
-SUBMINOR_VERSION:=36
+SUBMINOR_VERSION:=37
index 875ce389a8145a5b9e63dd24972269e3ceb4449f..6d86f5c3c603b2e78da4c0abcb18df33f66f2a9c 100644 (file)
@@ -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)
 
 
 #import <Foundation/Foundation.h>
 
-#if LIB_FOUNDATION_LIBRARY
-#  import <Foundation/exceptions/GeneralExceptions.h>
-#else
+#if !LIB_FOUNDATION_LIBRARY
 #  include <NGExtensions/NGObjectMacros.h>
 #  include <NGExtensions/NSString+Ext.h>
 #endif
 
-#import <GDLAccess/GDLAccess.h>
+#include <GDLAccess/GDLAccess.h>
 
 #endif /* ___PostgreSQL_common_H___ */