From 995dcc589d98e338ff2c8aabf9f3ea51d3af68fc Mon Sep 17 00:00:00 2001 From: Richard Frith-MacDonald Date: Mon, 9 Oct 2006 17:21:51 +0000 Subject: [PATCH] Slim down gloabl symbols a little. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23803 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 10 +++++++ Source/GNUmakefile | 1 - Source/GSCompatibility.m | 62 ---------------------------------------- Source/NSArray.m | 12 +++++++- Source/NSDictionary.m | 12 +++++++- Source/NSGeometry.m | 13 +++++++-- 6 files changed, 42 insertions(+), 68 deletions(-) delete mode 100644 Source/GSCompatibility.m diff --git a/ChangeLog b/ChangeLog index 273de05a5..8410ae254 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-10-09 Richard Frith-Macdonald + + * Source/GSCompatibility.m: Removed ... no longer used + * Source/GNUmakefile: Remove GSCompatibility.m + * Source/NSGeometry.m: + * Source/NSArray.m: + * Source/NSDictionary.m: + Update to get rid of a couple of functions which were not really + needed, slimming down global symbols a bit more. + 2006-10-09 Richard Frith-Macdonald * Source/Additions/GSObjCRuntime.m: diff --git a/Source/GNUmakefile b/Source/GNUmakefile index dbe15ba71..cd2d2d8c5 100644 --- a/Source/GNUmakefile +++ b/Source/GNUmakefile @@ -79,7 +79,6 @@ endif # The GNU source files GNU_MFILES = \ -GSCompatibility.m \ GSLocale.m \ preface.m \ mframe.m diff --git a/Source/GSCompatibility.m b/Source/GSCompatibility.m deleted file mode 100644 index 11d971650..000000000 --- a/Source/GSCompatibility.m +++ /dev/null @@ -1,62 +0,0 @@ -/** Runtime MacOSX compatibility functionality - Copyright (C) 2000 Free Software Foundation, Inc. - - Written by: Richard Frith-Macdonald - Date: August 2000 - - This file is part of the GNUstep Base Library. - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02111 USA. - */ - -#include "config.h" -#include "Foundation/Foundation.h" -#include "Foundation/NSDebug.h" - -#include "GSPrivate.h" - -@class GSMutableString; - -#ifndef HAVE_RINT -#include -static double rint(double a) -{ - return (floor(a+0.5)); -} -#endif - -/* - * Runtime MacOS-X compatibility flags. - */ - -BOOL GSMacOSXCompatibleGeometry(void) -{ - if ([_GSPrivate userDefaultsFlag: GSOldStyleGeometry] == YES) - return NO; - return [_GSPrivate userDefaultsFlag: GSMacOSXCompatible]; -} - -BOOL GSMacOSXCompatiblePropertyLists(void) -{ -#if defined(HAVE_LIBXML) - if ([_GSPrivate userDefaultsFlag: NSWriteOldStylePropertyLists] == YES) - return NO; - return [_GSPrivate userDefaultsFlag: GSMacOSXCompatible]; -#else - return NO; -#endif -} - diff --git a/Source/NSArray.m b/Source/NSArray.m index 5d3227c76..e3804374b 100644 --- a/Source/NSArray.m +++ b/Source/NSArray.m @@ -50,7 +50,17 @@ #include "GNUstepBase/GSCategories.h" #include "GSPrivate.h" -extern BOOL GSMacOSXCompatiblePropertyLists(void); +static BOOL GSMacOSXCompatiblePropertyLists(void) +{ +#if defined(HAVE_LIBXML) + if ([_GSPrivate userDefaultsFlag: NSWriteOldStylePropertyLists] == YES) + return NO; + return [_GSPrivate userDefaultsFlag: GSMacOSXCompatible]; +#else + return NO; +#endif +} + extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*); @interface NSArrayEnumerator : NSEnumerator diff --git a/Source/NSDictionary.m b/Source/NSDictionary.m index 533638d89..fd0df12b5 100644 --- a/Source/NSDictionary.m +++ b/Source/NSDictionary.m @@ -45,6 +45,17 @@ #include "GNUstepBase/GSCategories.h" #include "GSPrivate.h" +static BOOL GSMacOSXCompatiblePropertyLists(void) +{ +#if defined(HAVE_LIBXML) + if ([_GSPrivate userDefaultsFlag: NSWriteOldStylePropertyLists] == YES) + return NO; + return [_GSPrivate userDefaultsFlag: GSMacOSXCompatible]; +#else + return NO; +#endif +} + @class GSDictionary; @interface GSDictionary : NSObject // Help the compiler @end @@ -52,7 +63,6 @@ @interface GSMutableDictionary : NSObject // Help the compiler @end -extern BOOL GSMacOSXCompatiblePropertyLists(void); extern void GSPropertyListMake(id,NSDictionary*,BOOL,BOOL,unsigned,id*); diff --git a/Source/NSGeometry.m b/Source/NSGeometry.m index fdbb9b190..687e9dd24 100644 --- a/Source/NSGeometry.m +++ b/Source/NSGeometry.m @@ -18,7 +18,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free - * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02111 USA. NSGeometry class reference $Date$ $Revision$ @@ -40,8 +41,7 @@ #include "Foundation/NSGeometry.h" #include "Foundation/NSScanner.h" #include "Foundation/NSNotification.h" - -extern BOOL GSMacOSXCompatibleGeometry(void); // Compatibility mode +#include "GSPrivate.h" static Class NSStringClass = 0; static Class NSScannerClass = 0; @@ -71,6 +71,13 @@ setupCache(void) } } +static BOOL GSMacOSXCompatibleGeometry(void) +{ + if ([_GSPrivate userDefaultsFlag: GSOldStyleGeometry] == YES) + return NO; + return [_GSPrivate userDefaultsFlag: GSMacOSXCompatible]; +} + /**** Function Implementations ***********************************************/ /* Most of these are implemented in the header file as inline functkions */