2001-12-17 14:31:42 +00:00
|
|
|
/** Runtime MacOSX compatibility functionality
|
2000-09-13 12:32:19 +00:00
|
|
|
Copyright (C) 2000 Free Software Foundation, Inc.
|
2005-02-22 11:22:44 +00:00
|
|
|
|
2005-11-06 13:53:40 +00:00
|
|
|
Written by: Richard Frith-Macdonald <rfm@gnu.org>
|
2000-09-20 14:02:03 +00:00
|
|
|
Date: August 2000
|
2005-02-22 11:22:44 +00:00
|
|
|
|
2000-09-13 12:32:19 +00:00
|
|
|
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.
|
2005-02-22 11:22:44 +00:00
|
|
|
|
2000-09-13 12:32:19 +00:00
|
|
|
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.
|
2005-02-22 11:22:44 +00:00
|
|
|
|
2000-09-13 12:32:19 +00:00
|
|
|
You should have received a copy of the GNU Library General Public
|
|
|
|
License along with this library; if not, write to the Free
|
2005-05-22 03:32:16 +00:00
|
|
|
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA.
|
2005-02-22 11:22:44 +00:00
|
|
|
*/
|
2000-09-13 12:32:19 +00:00
|
|
|
|
2003-06-07 01:24:41 +00:00
|
|
|
#include "config.h"
|
|
|
|
#include "Foundation/Foundation.h"
|
|
|
|
#include "Foundation/NSDebug.h"
|
2000-09-13 12:32:19 +00:00
|
|
|
|
2002-03-13 09:58:43 +00:00
|
|
|
#include "GSPrivate.h"
|
2001-11-10 17:31:39 +00:00
|
|
|
|
2002-11-10 09:29:45 +00:00
|
|
|
@class GSMutableString;
|
|
|
|
|
2000-09-22 04:20:52 +00:00
|
|
|
#ifndef HAVE_RINT
|
|
|
|
#include <math.h>
|
|
|
|
static double rint(double a)
|
|
|
|
{
|
|
|
|
return (floor(a+0.5));
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2000-09-13 12:32:19 +00:00
|
|
|
/*
|
|
|
|
* Runtime MacOS-X compatibility flags.
|
|
|
|
*/
|
|
|
|
|
2002-11-09 07:00:37 +00:00
|
|
|
BOOL GSMacOSXCompatibleGeometry(void)
|
2000-09-13 12:32:19 +00:00
|
|
|
{
|
2001-11-10 17:31:39 +00:00
|
|
|
if (GSUserDefaultsFlag(GSOldStyleGeometry) == YES)
|
|
|
|
return NO;
|
|
|
|
return GSUserDefaultsFlag(GSMacOSXCompatible);
|
2000-09-13 12:32:19 +00:00
|
|
|
}
|
|
|
|
|
2002-11-09 07:00:37 +00:00
|
|
|
BOOL GSMacOSXCompatiblePropertyLists(void)
|
2000-09-13 12:32:19 +00:00
|
|
|
{
|
2005-11-05 05:58:43 +00:00
|
|
|
#if defined(HAVE_LIBXML)
|
2001-11-10 17:31:39 +00:00
|
|
|
if (GSUserDefaultsFlag(NSWriteOldStylePropertyLists) == YES)
|
|
|
|
return NO;
|
|
|
|
return GSUserDefaultsFlag(GSMacOSXCompatible);
|
2005-11-05 05:58:43 +00:00
|
|
|
#else
|
|
|
|
return NO;
|
|
|
|
#endif
|
2000-09-13 12:32:19 +00:00
|
|
|
}
|
|
|
|
|