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
This commit is contained in:
rfm 2006-10-09 17:21:51 +00:00
parent 074ef7dc68
commit 1cc4c5712a
6 changed files with 42 additions and 68 deletions

View file

@ -1,3 +1,13 @@
2006-10-09 Richard Frith-Macdonald <rfm@gnu.org>
* 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 <rfm@gnu.org>
* Source/Additions/GSObjCRuntime.m:

View file

@ -79,7 +79,6 @@ endif
# The GNU source files
GNU_MFILES = \
GSCompatibility.m \
GSLocale.m \
preface.m \
mframe.m

View file

@ -1,62 +0,0 @@
/** Runtime MacOSX compatibility functionality
Copyright (C) 2000 Free Software Foundation, Inc.
Written by: Richard Frith-Macdonald <rfm@gnu.org>
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 <math.h>
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
}

View file

@ -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

View file

@ -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*);

View file

@ -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.
<title>NSGeometry class reference</title>
$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 */