Version/availability corrections.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23804 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-10-09 18:32:11 +00:00
parent 995dcc589d
commit 88059a4e6a
15 changed files with 223 additions and 316 deletions

View file

@ -76,138 +76,8 @@ NSAutoreleasePool *(X) = [NSAutoreleasePool new]
#define NSLocalizedStaticString(X, Y) X
/*
* Check consistency of definitions for system compatibility.
*/
#if defined(STRICT_OPENSTEP)
#define GS_OPENSTEP_V 010000
#define NO_GNUSTEP 1
#elif defined(STRICT_MACOS_X)
#define GS_OPENSTEP_V 100000
#define NO_GNUSTEP 1
#else
#undef NO_GNUSTEP
#endif
#include <GNUstepBase/GSVersionMacros.h>
/*
* NB. The version values below must be integers ... by convention these are
* made up of two digits each for major, minor and subminor version numbers
* (ie each is in the range 00 to 99 though a leading zero in the major
* number is not permitted).
* So for a MacOS-X 10.3.9 release the version number would be 100309
*
* You may define GS_GNUSTEP_V or GS_OPENSTEP_V to ensure that your
* program only 'sees' the specified varsion of the API.
*/
/**
* <p>Macro to check a defined GNUstep version number (GS_GNUSTEP_V) against
* the supplied arguments. Returns true if no GNUstep version is specified,
* or if ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* </p>
* <p>NB. If you are changing the API (eg adding a new feature) you need
* to control the visibility io the new header file code using<br />
* <code>#if GS_API_VERSION(ADD,GS_API_LATEST)</code><br />
* where <code>ADD</code> is the version number of the next minor
* release after the most recent one.<br />
* As a general principle you should <em>not</em> change the API with
* changing subminor version numbers ... as that tends to confuse
* people (though Apple has sometimes done it).
* </p>
*/
#define GS_API_VERSION(ADD,REM) \
(!defined(GS_GNUSTEP_V) || (GS_GNUSTEP_V >= ADD && GS_GNUSTEP_V < REM))
/**
* <p>Macro to check a defined OpenStep/OPENSTEP/MacOS-X version against the
* supplied arguments. Returns true if no version is specified, or if
* ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="GS_API_VERSION">GS_API_VERSION</ref>
* </p>
*/
#define OS_API_VERSION(ADD,REM) \
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM))
/**
* A constant which is the lowest possible version number (0) so that
* when used as the removal version (second argument of the GS_API_VERSION
* or OS_API_VERSION macro) represents a feature which is not present in
* any version.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_NONE, GS_API_NONE)<br />
* denotes code not present in OpenStep/OPENSTEP/MacOS-X
*/
#define GS_API_NONE 0
/**
* A constant to represent a feature which is still present in the latest
* version. This is the highest possible version number.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_LATEST 999999
/**
* The version number of the initial OpenStep specification.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OSSPEC, GS_API_LATEST)<br />
* denotes code present from the OpenStep specification onwards.
*/
#define GS_API_OSSPEC 10000
/**
* The version number of the first OPENSTEP implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OPENSTEP, GS_API_LATEST)<br />
* denotes code present from the initial OPENSTEP version onwards.
*/
#define GS_API_OPENSTEP 40000
/**
* The version number of the first MacOS-X implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_MACOSX 100000
#else
#include <Foundation/NSObject.h>
#endif /* GNUSTEP */
#endif /* __GNUSTEP_GNUSTEP_H_INCLUDED_ */

View file

@ -48,11 +48,14 @@
#include "GNUstepBase/preface.h"
#include "GNUstepBase/GSObjCRuntime.h"
#include "GNUstepBase/GNUstep.h"
#include "GNUstepBase/GSVersionMacros.h"
#if defined(__cplusplus)
extern "C" {
#endif
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
@class NSMutableSet;
@ -335,9 +338,6 @@ GS_EXPORT void NSDecimalFromComponents(NSDecimal *result,
GS_EXPORT BOOL GSDebugSet(NSString *level);
GS_EXPORT NSString *GetEncodingName(NSStringEncoding availableEncodingValue);
GS_EXPORT NSString *GSEncodingName(NSStringEncoding availableEncodingValue);
GS_EXPORT NSThread *GSCurrentThread(void);
GS_EXPORT NSMutableDictionary *GSCurrentThreadDictionary(void);
@ -346,6 +346,8 @@ GS_EXPORT NSString *GSDebugMethodMsg(id obj, SEL sel, const char *file,
GS_EXPORT NSString *GSDebugFunctionMsg(const char *func, const char *file,
int line, NSString *fmt);
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}
#endif

View file

@ -30,6 +30,7 @@
#include "GNUstepBase/preface.h"
#include "GNUstepBase/GSObjCRuntime.h"
#include "GNUstepBase/GNUstep.h"
#include "GNUstepBase/GSVersionMacros.h"
#warning "deprecated header ... will be removed in a later release"

View file

@ -28,6 +28,8 @@
extern "C" {
#endif
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
/* To easily un-inline functions for debugging */
#ifndef INLINE
#define INLINE inline
@ -550,6 +552,8 @@ GSIArrayCopyWithZone(GSIArray array, NSZone *zone)
return new;
}
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}
#endif

View file

@ -30,6 +30,8 @@
extern "C" {
#endif
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
/* To easily un-inline functions for debugging */
#ifndef INLINE
#define INLINE inline
@ -924,6 +926,8 @@ GSIMapInitWithZoneAndCapacity(GSIMapTable map, NSZone *zone, size_t capacity)
GSIMapMoreNodes(map, capacity);
}
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}
#endif

View file

@ -40,6 +40,8 @@
extern "C" {
#endif
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
@class NSArray;
@class NSMutableArray;
@class NSData;
@ -229,6 +231,8 @@ extern "C" {
- (void) setIsHttp;
@end
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}
#endif

View file

@ -0,0 +1,158 @@
/* GNUstep.h - macros for managing API versioning
Copyright (C) 2006 Free Software Foundation, Inc.
Written by: Richard Frith-Macdonald <rfm@gnu.org>
Date: Oct, October 2006
This file is part of GNUstep.
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 02110-1301, USA.
*/
#ifndef __GNUSTEP_GSVERSIONMACROS_H_INCLUDED_
#define __GNUSTEP_GSVERSIONMACROS_H_INCLUDED_
/*
* Check consistency of definitions for system compatibility.
*/
#if defined(STRICT_OPENSTEP)
#define GS_OPENSTEP_V 010000
#define NO_GNUSTEP 1
#elif defined(STRICT_MACOS_X)
#define GS_OPENSTEP_V 100000
#define NO_GNUSTEP 1
#else
#undef NO_GNUSTEP
#endif
/*
* NB. The version values below must be integers ... by convention these are
* made up of two digits each for major, minor and subminor version numbers
* (ie each is in the range 00 to 99 though a leading zero in the major
* number is not permitted).
* So for a MacOS-X 10.3.9 release the version number would be 100309
*
* You may define GS_GNUSTEP_V or GS_OPENSTEP_V to ensure that your
* program only 'sees' the specified varsion of the API.
*/
/**
* <p>Macro to check a defined GNUstep version number (GS_GNUSTEP_V) against
* the supplied arguments. Returns true if no GNUstep version is specified,
* or if ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* </p>
* <p>NB. If you are changing the API (eg adding a new feature) you need
* to control the visibility io the new header file code using<br />
* <code>#if GS_API_VERSION(ADD,GS_API_LATEST)</code><br />
* where <code>ADD</code> is the version number of the next minor
* release after the most recent one.<br />
* As a general principle you should <em>not</em> change the API with
* changing subminor version numbers ... as that tends to confuse
* people (though Apple has sometimes done it).
* </p>
*/
#define GS_API_VERSION(ADD,REM) \
(!defined(GS_GNUSTEP_V) || (GS_GNUSTEP_V >= ADD && GS_GNUSTEP_V < REM))
/**
* <p>Macro to check a defined OpenStep/OPENSTEP/MacOS-X version against the
* supplied arguments. Returns true if no version is specified, or if
* ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="GS_API_VERSION">GS_API_VERSION</ref>
* </p>
*/
#define OS_API_VERSION(ADD,REM) \
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM))
/**
* A constant which is the lowest possible version number (0) so that
* when used as the removal version (second argument of the GS_API_VERSION
* or OS_API_VERSION macro) represents a feature which is not present in
* any version.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_NONE, GS_API_NONE)<br />
* denotes code not present in OpenStep/OPENSTEP/MacOS-X
*/
#define GS_API_NONE 0
/**
* A constant to represent a feature which is still present in the latest
* version. This is the highest possible version number.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_LATEST 999999
/**
* The version number of the initial OpenStep specification.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OSSPEC, GS_API_LATEST)<br />
* denotes code present from the OpenStep specification onwards.
*/
#define GS_API_OSSPEC 10000
/**
* The version number of the first OPENSTEP implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OPENSTEP, GS_API_LATEST)<br />
* denotes code present from the initial OPENSTEP version onwards.
*/
#define GS_API_OPENSTEP 40000
/**
* The version number of the first MacOS-X implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_MACOSX 100000
#endif /* __GNUSTEP_GSVERSIONMACROS_H_INCLUDED_ */

View file

@ -47,8 +47,7 @@
extern "C" {
#endif
#ifndef STRICT_MACOS_X
#ifndef STRICT_OPENSTEP
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
@class GSXMLAttribute;
@class GSXMLDocument;
@ -744,9 +743,7 @@ extern "C" {
- (void) completedXMLRPC: (GSXMLRPC*)sender;
@end
#endif /* STRICT_MACOS_X */
#endif /* STRICT_OPENSTEP */
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}

View file

@ -34,10 +34,11 @@
#include <Foundation/NSString.h> /* For string encodings */
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
/*
* Private API used internally by NSString etc.
*/
#ifndef NO_GNUSTEP
#include "GSObjCRuntime.h"
#if defined(__cplusplus)
@ -79,6 +80,6 @@ GS_EXPORT BOOL GSToUnicode(unichar **dst, unsigned int *size,
}
#endif
#endif
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#endif /* __Unicode_h_OBJECTS_INCLUDE */

View file

@ -29,11 +29,14 @@
#define __behavior_h_GNUSTEP_BASE_INCLUDE
#include <GNUstepBase/GSObjCRuntime.h>
#include <GNUstepBase/GSVersionMacros.h>
#if defined(__cplusplus)
extern "C" {
#endif
#if OS_API_VERSION(GS_API_NONE,GS_API_NONE)
/* Call this method from CLASS's +initialize method to add a behavior
to CLASS. A "behavior" is like a protocol with an implementation.
@ -61,6 +64,8 @@ GS_EXPORT void behavior_class_add_methods (Class class,
/* Set to non-zero if you want debugging messages on stderr. */
GS_EXPORT void behavior_set_debug(int i);
#endif /* OS_API_VERSION(GS_API_NONE,GS_API_NONE) */
#if defined(__cplusplus)
}
#endif

View file

@ -32,135 +32,7 @@
extern "C" {
#endif
/*
* Check consistency of definitions for system compatibility.
*/
#if defined(STRICT_OPENSTEP)
#define GS_OPENSTEP_V 010000
#define NO_GNUSTEP 1
#elif defined(STRICT_MACOS_X)
#define GS_OPENSTEP_V 100000
#define NO_GNUSTEP 1
#else
#undef NO_GNUSTEP
#endif
/*
* NB. The version values below must be integers ... by convention these are
* made up of two digits each for major, minor and subminor version numbers
* (ie each is in the range 00 to 99 though a leading zero in the major
* number is not permitted).
* So for a MacOS-X 10.3.9 release the version number would be 100309
*
* You may define GS_GNUSTEP_V or GS_OPENSTEP_V to ensure that your
* program only 'sees' the specified varsion of the API.
*/
/**
* <p>Macro to check a defined GNUstep version number (GS_GNUSTEP_V) against
* the supplied arguments. Returns true if no GNUstep version is specified,
* or if ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* </p>
* <p>NB. If you are changing the API (eg adding a new feature) you need
* to control the visibility io the new header file code using<br />
* <code>#if GS_API_VERSION(ADD,GS_API_LATEST)</code><br />
* where <code>ADD</code> is the version number of the next minor
* release after the most recent one.<br />
* As a general principle you should <em>not</em> change the API with
* changing subminor version numbers ... as that tends to confuse
* people (though Apple has sometimes done it).
* </p>
*/
#define GS_API_VERSION(ADD,REM) \
(!defined(GS_GNUSTEP_V) || (GS_GNUSTEP_V >= ADD && GS_GNUSTEP_V < REM))
/**
* <p>Macro to check a defined OpenStep/OPENSTEP/MacOS-X version against the
* supplied arguments. Returns true if no version is specified, or if
* ADD &lt;= version &lt; REM, where ADD is the version
* number at which a feature guarded by the macro was introduced and
* REM is the version number at which it was removed.
* </p>
* <p>The version number arguments are six digit integers where the first
* two digits are the major version number, the second two are the minor
* version number and the last two are the subminor number (all left padded
* with a zero where necessary). However, for convenience you can also
* use any of several predefined constants ...
* <ref type="macro" id="GS_API_NONE">GS_API_NONE</ref>,
* <ref type="macro" id="GS_API_LATEST">GS_API_LATEST</ref>,
* <ref type="macro" id="GS_API_OSSPEC">GS_API_OSSPEC</ref>,
* <ref type="macro" id="GS_API_OPENSTEP">GS_API_OPENSTEP</ref>,
* <ref type="macro" id="GS_API_MACOSX">GS_API_MACOSX</ref>
* </p>
* <p>Also see <ref type="macro" id="GS_API_VERSION">GS_API_VERSION</ref>
* </p>
*/
#define OS_API_VERSION(ADD,REM) \
(!defined(GS_OPENSTEP_V) || (GS_OPENSTEP_V >= ADD && GS_OPENSTEP_V < REM))
/**
* A constant which is the lowest possible version number (0) so that
* when used as the removal version (second argument of the GS_API_VERSION
* or OS_API_VERSION macro) represents a feature which is not present in
* any version.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_NONE, GS_API_NONE)<br />
* denotes code not present in OpenStep/OPENSTEP/MacOS-X
*/
#define GS_API_NONE 0
/**
* A constant to represent a feature which is still present in the latest
* version. This is the highest possible version number.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_LATEST 999999
/**
* The version number of the initial OpenStep specification.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OSSPEC, GS_API_LATEST)<br />
* denotes code present from the OpenStep specification onwards.
*/
#define GS_API_OSSPEC 10000
/**
* The version number of the first OPENSTEP implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_OPENSTEP, GS_API_LATEST)<br />
* denotes code present from the initial OPENSTEP version onwards.
*/
#define GS_API_OPENSTEP 40000
/**
* The version number of the first MacOS-X implementation.<br />
* eg.<br />
* #if <ref type="macro" id="OS_API_VERSION">OS_API_VERSION</ref>
* (GS_API_MACOSX, GS_API_LATEST)<br />
* denotes code present from the initial MacOS-X version onwards.
*/
#define GS_API_MACOSX 100000
#include <GNUstepBase/GSVersionMacros.h>
#include <Foundation/NSObjCRuntime.h>
#include <GNUstepBase/preface.h>

View file

@ -28,17 +28,6 @@
#include "GNUstepBase/GSCategories.h"
#include "GNUstepBase/GCObject.h"
NSString *GetEncodingName(NSStringEncoding availableEncodingValue)
{
// Deprecated
return GSEncodingName(availableEncodingValue);
}
NSString *GSEncodingName(NSStringEncoding availableEncodingValue)
{
return (NSString *)CFStringGetNameOfEncoding(CFStringConvertNSStringEncodingToEncoding(availableEncodingValue));
}
NSThread *GSCurrentThread()
{
return [NSThread currentThread];
@ -51,7 +40,7 @@ NSMutableDictionary *GSCurrentThreadDictionary()
NSArray *NSStandardLibraryPaths()
{
return NSSearchPathForDirectoriesInDomains(NSAllLibrariesDirectory,
return NSSearchPathForDirectoriesInDomains(NSAllLibrariesDirectory,
NSAllDomainsMask, YES);
}
@ -69,28 +58,28 @@ void NSDecimalFromComponents(NSDecimal *result,
NSString*
GSDebugMethodMsg(id obj, SEL sel, const char *file, int line, NSString *fmt)
{
NSString *message;
Class cls = (Class)obj;
char c = '+';
NSString *message;
Class cls = (Class)obj;
char c = '+';
if ([obj isInstance] == YES)
if ([obj isInstance] == YES)
{
c = '-';
cls = [obj class];
c = '-';
cls = [obj class];
}
message = [NSString stringWithFormat: @"File %s: %d. In [%@ %c%@] %@",
file, line, NSStringFromClass(cls), c, NSStringFromSelector(sel), fmt];
return message;
message = [NSString stringWithFormat: @"File %s: %d. In [%@ %c%@] %@",
file, line, NSStringFromClass(cls), c, NSStringFromSelector(sel), fmt];
return message;
}
NSString*
GSDebugFunctionMsg(const char *func, const char *file, int line, NSString *fmt)
{
NSString *message;
NSString *message;
message = [NSString stringWithFormat: @"File %s: %d. In %s %@",
file, line, func, fmt];
return message;
message = [NSString stringWithFormat: @"File %s: %d. In %s %@",
file, line, func, fmt];
return message;
}
@implementation NSArray (GSCompatibility)
@ -364,23 +353,23 @@ BOOL GSDebugSet(NSString *level)
- (NSMutableSet *) debugSet
// Derived from GNUStep's
{
if (_debug_set == nil){
int argc = [[self arguments] count];
NSMutableSet *mySet;
int i;
if (_debug_set == nil)
{
int argc = [[self arguments] count];
NSMutableSet *mySet;
int i;
mySet = [NSMutableSet new];
for (i = 0; i < argc; i++)
{
NSString *str = [[self arguments] objectAtIndex:i];
mySet = [NSMutableSet new];
for (i = 0; i < argc; i++)
{
NSString *str = [[self arguments] objectAtIndex:i];
if ([str hasPrefix: @"--GNU-Debug="])
[mySet addObject: [str substringFromIndex: 12]];
}
_debug_set = mySet;
if ([str hasPrefix: @"--GNU-Debug="])
[mySet addObject: [str substringFromIndex: 12]];
}
_debug_set = mySet;
}
return _debug_set;
return _debug_set;
}
@end
@ -395,15 +384,15 @@ BOOL GSDebugSet(NSString *level)
*/
- (BOOL) boolValue
{
if ([self caseInsensitiveCompare: @"YES"] == NSOrderedSame)
if ([self caseInsensitiveCompare: @"YES"] == NSOrderedSame)
{
return YES;
}
if ([self caseInsensitiveCompare: @"true"] == NSOrderedSame)
if ([self caseInsensitiveCompare: @"true"] == NSOrderedSame)
{
return YES;
}
return [self intValue] != 0 ? YES : NO;
return [self intValue] != 0 ? YES : NO;
}
- (NSString*) substringFromRange:(NSRange)range
@ -417,13 +406,13 @@ BOOL GSDebugSet(NSString *level)
- (retval_t) returnFrame:(arglist_t)args
{
#warning (stephane@sente.ch) Not implemented
return (retval_t)[self notImplemented:_cmd];
return (retval_t)[self notImplemented:_cmd];
}
- (id) initWithArgframe:(arglist_t)args selector:(SEL)selector
{
#warning (stephane@sente.ch) Not implemented
return [self notImplemented:_cmd];
return [self notImplemented:_cmd];
}
@end

View file

@ -269,7 +269,7 @@ GSObjCVariableNames(id obj)
/**
* Gets the value from an instance variable in obj<br />
* This function performs no checking ... you should use it only where
* you are providing information from a call to GSFindVariable()
* you are providing information from a call to GSObjCFindVariable()
* and you know that the data area provided is the correct size.
*/
void

View file

@ -132,7 +132,6 @@ GSMime.h \
GSObjCRuntime.h \
GSUnion.h \
GSXML.h \
GSFunctions.h \
behavior.h \
Unicode.h \
GCObject.h \

View file

@ -107,6 +107,7 @@ win32-def.top \
libgnustep-base.def
ADD_HEADERS = \
GSVersionMacros.h \
GSObjCRuntime.h \
GSCategories.h \
GSFileHandle.h \