mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Merged from baseline.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/NibCompatibility@22884 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aa248d3860
commit
b464e5a838
33 changed files with 3591 additions and 215 deletions
93
ChangeLog
93
ChangeLog
|
@ -3,6 +3,99 @@
|
|||
* Source/NSKeyedUnarchiver.m: Added private method replaceObject:
|
||||
withObject:.
|
||||
|
||||
2006-05-09 Nicolas Roard <nicolas@roard.com>
|
||||
|
||||
* Source/NSSortDescriptor.m: use -valueForKeyPath: instead
|
||||
of -valueForKey:. Patch from Saso Kiselkov <diablos@manga.sk>.
|
||||
|
||||
2006-05-09 Dr. H. Nikolaus Schaller
|
||||
|
||||
* Source/GNUmakefile:
|
||||
* Source/NSPredicate.m:
|
||||
* Headers/Foundation/NSCompoundPredicate.h:
|
||||
* Headers/Foundation/NSComparisonPredicate.h:
|
||||
* Headers/Foundation/NSPredicate.h:
|
||||
* Headers/Foundation/NSExpression.h:
|
||||
* Headers/Foundation/Foundation.h:
|
||||
Basic implementation of NSPredicate and related classes.
|
||||
|
||||
2006-05-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* configure.ac: Check for bfd stuff for stacktrace support.
|
||||
* Source/NSException.m: incorporate code by Lloyd Dupont and Wim
|
||||
Oudshoorn to add a stack trace to a raised exception. Cleaned up
|
||||
and made to conform to coding standards. Rewrote code to build
|
||||
list of binary files from NSBundle.
|
||||
EXPERIMENTAL! Turn this on by building with STACKTRACE defined
|
||||
|
||||
2006-05-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSBundle.m: ignore profile/debug extensions in library name
|
||||
when looking for library bundles.
|
||||
|
||||
2006-05-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Resources/Languages/Esperanto: New language file.
|
||||
* Resources/Esperanto.lproj/Localizable.string: New string
|
||||
translations. Patch by Ingolf Jandt <i.jandt@web.de>.
|
||||
* Resources/Languages/Korean: New language file.
|
||||
* Resources/Korean.lproj/Localizable.string: New string
|
||||
translations. Patch by Hwang YunSong <hys545@dreamwiz.com>.
|
||||
* Resources/GNUmakefile: Added new languages.
|
||||
|
||||
2006-05-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Headers/Foundation/NSBundle.h: fix type of _bundleClasses
|
||||
* Source/NSBundle.m: Try to make bundles for libraries behave as
|
||||
well as possible with respect to the code in the libraries.
|
||||
Rather depends on the Info.plist in the resource directory
|
||||
specifying an NSPrincipalClass so that we can look up that
|
||||
class at runtime and determine the file it came from.
|
||||
Added documentation to mmake it clear that this is not
|
||||
reliable (eg impossible for static or non-existent libraries).
|
||||
|
||||
2006-04-30 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Source/NSString: Define _GNU_SOURCE to make protoype of fwprintf
|
||||
visible.
|
||||
|
||||
2006-04-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSKeyedUnarchiver.m: Fix decoding of NSNull objects.
|
||||
* Source/Additions/GSXML.m: Ensure that calls to parse documents
|
||||
handle the success/failure value returned. Improve exception info.
|
||||
|
||||
2006-04-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURL.m: Fix error unescaping uppercase hex digits.
|
||||
|
||||
2006-04-26 Saso Kiselkov
|
||||
|
||||
* Headers/Foundation/NSException.h: Support native exceptions.
|
||||
|
||||
2006-04-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate.m: Correction to millisecond fix ... for
|
||||
bug #16426
|
||||
* Resources/GNUmakefile: Fix installation of Ukrainian language.
|
||||
* Source/NSProcessInfo.m: Always use UTF16 args on mingw32.
|
||||
|
||||
2006-04-26 Hubert Chan
|
||||
|
||||
* config/config.align.c: force compiler not to optimise away the
|
||||
code being tested ... fixes bug #16342
|
||||
|
||||
2006-04-26 Marcus Muller
|
||||
|
||||
* Source/NSKeyValueCoding.m: Fix bug #16386
|
||||
|
||||
2006-04-26 Sergii Stoian <stoyan255@ukr.net>
|
||||
|
||||
* Resources/Languages/Russian: Updates and fixes
|
||||
* Resources/Languages/Ukrainian: New file
|
||||
* Resources/Languages/UkrainianRussian: Removed wrong file
|
||||
|
||||
>>>>>>> .merge-right.r22881
|
||||
2006-04-24 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSCalendarDate.m: Avoid a couple of minor rounding errors
|
||||
|
|
|
@ -19,7 +19,8 @@
|
|||
#
|
||||
# You should have received a copy of the GNU 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
|
||||
#
|
||||
|
||||
# This usually happens when you source GNUstep.sh, then run ./configure,
|
||||
|
|
|
@ -39,6 +39,9 @@
|
|||
/* Define if this constant is defined */
|
||||
#undef HANDLE_LONG_LONG_MAX
|
||||
|
||||
/* Define to 1 if you have the <bfd.h> header file. */
|
||||
#undef HAVE_BFD_H
|
||||
|
||||
/* Define to 1 if you have the <callback.h> header file. */
|
||||
#undef HAVE_CALLBACK_H
|
||||
|
||||
|
@ -94,6 +97,9 @@
|
|||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#undef HAVE_INET_PTON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -109,12 +115,18 @@
|
|||
/* Define to 1 if you have the <langinfo.h> header file. */
|
||||
#undef HAVE_LANGINFO_H
|
||||
|
||||
/* Define to 1 if you have the `bfd' library (-lbfd). */
|
||||
#undef HAVE_LIBBFD
|
||||
|
||||
/* Define to 1 if you have the <libc.h> header file. */
|
||||
#undef HAVE_LIBC_H
|
||||
|
||||
/* Define to 1 if you have the `dl' library (-ldl). */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define to 1 if you have the `iberty' library (-liberty). */
|
||||
#undef HAVE_LIBIBERTY
|
||||
|
||||
/* Define to 1 if you have the `kvm' library (-lkvm). */
|
||||
#undef HAVE_LIBKVM
|
||||
|
||||
|
@ -442,9 +454,11 @@
|
|||
first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define as `__inline' if that's what the C compiler calls it, or to nothing
|
||||
if it is not supported. */
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
#undef inline
|
||||
#endif
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
||||
#undef size_t
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
#include <Foundation/NSCharacterSet.h>
|
||||
#include <Foundation/NSClassDescription.h>
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSComparisonPredicate.h>
|
||||
#include <Foundation/NSCompoundPredicate.h>
|
||||
#include <Foundation/NSConnection.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
#include <Foundation/NSDateFormatter.h>
|
||||
|
@ -53,6 +55,7 @@
|
|||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSError.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSExpression.h>
|
||||
#include <Foundation/NSFileHandle.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSFormatter.h>
|
||||
|
@ -75,6 +78,7 @@
|
|||
#include <Foundation/NSPortCoder.h>
|
||||
#include <Foundation/NSPortMessage.h>
|
||||
#include <Foundation/NSPortNameServer.h>
|
||||
#include <Foundation/NSPredicate.h>
|
||||
#include <Foundation/NSProcessInfo.h>
|
||||
#include <Foundation/NSProtocolChecker.h>
|
||||
#include <Foundation/NSProxy.h>
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
@class NSString;
|
||||
@class NSArray;
|
||||
@class NSDictionary;
|
||||
@class NSMutableArray;
|
||||
@class NSMutableDictionary;
|
||||
|
||||
/**
|
||||
|
@ -91,15 +92,15 @@ GS_EXPORT NSString* const NSLoadedClasses;
|
|||
*/
|
||||
@interface NSBundle : NSObject
|
||||
{
|
||||
NSString *_path;
|
||||
NSArray *_bundleClasses;
|
||||
Class _principalClass;
|
||||
NSDictionary *_infoDict;
|
||||
NSString *_path;
|
||||
NSMutableArray *_bundleClasses;
|
||||
Class _principalClass;
|
||||
NSDictionary *_infoDict;
|
||||
NSMutableDictionary *_localizations;
|
||||
unsigned _bundleType;
|
||||
BOOL _codeLoaded;
|
||||
unsigned _version;
|
||||
NSString *_frameworkVersion;
|
||||
unsigned _bundleType;
|
||||
BOOL _codeLoaded;
|
||||
unsigned _version;
|
||||
NSString *_frameworkVersion;
|
||||
}
|
||||
|
||||
/** Return an array enumerating all the bundles in the application. This
|
||||
|
|
97
Headers/Foundation/NSComparisonPredicate.h
Normal file
97
Headers/Foundation/NSComparisonPredicate.h
Normal file
|
@ -0,0 +1,97 @@
|
|||
/* Interface for NSComparisonPredicate for GNUStep
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Dr. H. Nikolaus Schaller
|
||||
Created: 2005
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __NSComparisonPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSComparisonPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <Foundation/NSExpression.h>
|
||||
#include <Foundation/NSPredicate.h>
|
||||
|
||||
typedef enum _NSComparisonPredicateModifier
|
||||
{
|
||||
NSDirectPredicateModifier=0,
|
||||
NSAllPredicateModifier,
|
||||
NSAnyPredicateModifier,
|
||||
} NSComparisonPredicateModifier;
|
||||
|
||||
typedef enum _NSComparisonPredicateOptions
|
||||
{
|
||||
NSCaseInsensitivePredicateOption=0x01,
|
||||
NSDiacriticInsensitivePredicateOption=0x02,
|
||||
} NSComparisonPredicateOptions;
|
||||
|
||||
typedef enum _NSPredicateOperatorType
|
||||
{
|
||||
NSLessThanPredicateOperatorType = 0,
|
||||
NSLessThanOrEqualToPredicateOperatorType,
|
||||
NSGreaterThanPredicateOperatorType,
|
||||
NSGreaterThanOrEqualToPredicateOperatorType,
|
||||
NSEqualToPredicateOperatorType,
|
||||
NSNotEqualToPredicateOperatorType,
|
||||
NSMatchesPredicateOperatorType,
|
||||
NSLikePredicateOperatorType,
|
||||
NSBeginsWithPredicateOperatorType,
|
||||
NSEndsWithPredicateOperatorType,
|
||||
NSInPredicateOperatorType,
|
||||
NSCustomSelectorPredicateOperatorType
|
||||
} NSPredicateOperatorType;
|
||||
|
||||
@interface NSComparisonPredicate : NSPredicate
|
||||
{
|
||||
NSComparisonPredicateModifier _modifier;
|
||||
SEL _selector;
|
||||
unsigned _options;
|
||||
NSPredicateOperatorType _type;
|
||||
@public
|
||||
NSExpression *_left;
|
||||
NSExpression *_right;
|
||||
}
|
||||
|
||||
+ (NSPredicate *) predicateWithLeftExpression: (NSExpression *)left
|
||||
rightExpression: (NSExpression *)right
|
||||
customSelector: (SEL)sel;
|
||||
+ (NSPredicate *) predicateWithLeftExpression: (NSExpression *)left
|
||||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (unsigned) opts;
|
||||
|
||||
- (NSComparisonPredicateModifier) comparisonPredicateModifier;
|
||||
- (SEL) customSelector;
|
||||
- (NSPredicate *) initWithLeftExpression: (NSExpression *)left
|
||||
rightExpression: (NSExpression *)right
|
||||
customSelector: (SEL)sel;
|
||||
- (id) initWithLeftExpression: (NSExpression *)left
|
||||
rightExpression: (NSExpression *)right
|
||||
modifier: (NSComparisonPredicateModifier)modifier
|
||||
type: (NSPredicateOperatorType)type
|
||||
options: (unsigned) opts;
|
||||
- (NSExpression *) leftExpression;
|
||||
- (unsigned) options;
|
||||
- (NSPredicateOperatorType) predicateOperatorType;
|
||||
- (NSExpression *) rightExpression;
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
50
Headers/Foundation/NSCompoundPredicate.h
Normal file
50
Headers/Foundation/NSCompoundPredicate.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* Interface for NSCompoundPredicate for GNUStep
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Dr. H. Nikolaus Schaller
|
||||
Created: 2005
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __NSCompoundPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSCompoundPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <Foundation/NSPredicate.h>
|
||||
|
||||
typedef enum _NSCompoundPredicateType
|
||||
{
|
||||
NSNotPredicateType = 0,
|
||||
NSAndPredicateType,
|
||||
NSOrPredicateType
|
||||
} NSCompoundPredicateType;
|
||||
|
||||
@interface NSCompoundPredicate : NSPredicate
|
||||
|
||||
+ (NSPredicate *) andPredicateWithSubpredicates: (NSArray *)list;
|
||||
+ (NSPredicate *) notPredicateWithSubpredicate: (NSPredicate *)predicate;
|
||||
+ (NSPredicate *) orPredicateWithSubpredicates: (NSArray *)list;
|
||||
|
||||
- (NSCompoundPredicateType) compoundPredicateType;
|
||||
- (id) initWithType: (NSCompoundPredicateType)type
|
||||
subpredicates: (NSArray *)list;
|
||||
- (NSArray *) subpredicates;
|
||||
|
||||
@end
|
||||
#endif
|
||||
|
|
@ -254,11 +254,22 @@ GS_EXPORT NSUncaughtExceptionHandler *_NSUncaughtExceptionHandler;
|
|||
resources allocated in the routine, possibly case on the error code
|
||||
and perform special processing, and default to RERAISE the error to
|
||||
the next handler. Within the scope of the handler, a local variable
|
||||
called exception holds information about the exception raised.
|
||||
called "localException" holds information about the exception raised.
|
||||
|
||||
It is illegal to exit the first block of code by any other means than
|
||||
NS_VALRETURN, NS_VOIDRETURN, or just falling out the bottom.
|
||||
*/
|
||||
#ifdef _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
# define NS_DURING @try {
|
||||
# define NS_HANDLER } @catch (NSException * localException) {
|
||||
# define NS_ENDHANDLER }
|
||||
|
||||
# define NS_VALRETURN(val) return (val)
|
||||
# define NS_VALUERETURN(object, id) return (object)
|
||||
# define NS_VOIDRETURN return
|
||||
|
||||
#else // _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
/** Private support routine. Do not call directly. */
|
||||
GS_EXPORT void _NSAddHandler( NSHandler *handler );
|
||||
|
@ -287,6 +298,8 @@ GS_EXPORT void _NSRemoveHandler( NSHandler *handler );
|
|||
#define NS_VOIDRETURN do { _NSRemoveHandler(&NSLocalHandler); \
|
||||
return; } while (0)
|
||||
|
||||
#endif // _NATIVE_OBJC_EXCEPTIONS
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
/* Assertion Handling */
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
|
63
Headers/Foundation/NSExpression.h
Normal file
63
Headers/Foundation/NSExpression.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/* Interface for NSExpression for GNUStep
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Dr. H. Nikolaus Schaller
|
||||
Created: 2005
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __NSExpression_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSExpression_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <Foundation/NSPredicate.h>
|
||||
|
||||
@class NSMutableDictionary;
|
||||
|
||||
typedef enum _NSExpressionType
|
||||
{
|
||||
NSConstantValueExpressionType=0,
|
||||
NSEvaluatedObjectExpressionType,
|
||||
NSVariableExpressionType,
|
||||
NSKeyPathExpressionType,
|
||||
NSFunctionExpressionType
|
||||
} NSExpressionType;
|
||||
|
||||
@interface NSExpression : NSObject <NSCoding, NSCopying>
|
||||
|
||||
+ (NSExpression *) expressionForConstantValue: (id)obj;
|
||||
+ (NSExpression *) expressionForEvaluatedObject;
|
||||
+ (NSExpression *) expressionForFunction: (NSString *)name
|
||||
arguments: (NSArray *)args;
|
||||
+ (NSExpression *) expressionForKeyPath: (NSString *)path;
|
||||
+ (NSExpression *) expressionForVariable: (NSString *)string;
|
||||
|
||||
- (NSArray *) arguments;
|
||||
- (id) constantValue;
|
||||
- (NSExpressionType) expressionType;
|
||||
- (id) expressionValueWithObject: (id)object
|
||||
context: (NSMutableDictionary *)context;
|
||||
- (NSString *) function;
|
||||
- (id) initWithExpressionType: (NSExpressionType) type;
|
||||
- (NSString *) keyPath;
|
||||
- (NSExpression *) operand;
|
||||
- (NSString *) variable;
|
||||
|
||||
@end
|
||||
#endif /* __NSExpression_h_GNUSTEP_BASE_INCLUDE */
|
||||
|
50
Headers/Foundation/NSPredicate.h
Normal file
50
Headers/Foundation/NSPredicate.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
/* Interface for NSPredicate for GNUStep
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
|
||||
Written by: Dr. H. Nikolaus Schaller
|
||||
Created: 2005
|
||||
|
||||
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.
|
||||
*/
|
||||
|
||||
#ifndef __NSPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
#define __NSPredicate_h_GNUSTEP_BASE_INCLUDE
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#include <Foundation/NSArray.h>
|
||||
|
||||
@interface NSPredicate : NSObject <NSCoding, NSCopying>
|
||||
|
||||
+ (NSPredicate *) predicateWithFormat: (NSString *)format, ...;
|
||||
+ (NSPredicate *) predicateWithFormat: (NSString *)format
|
||||
argumentArray: (NSArray *)args;
|
||||
+ (NSPredicate *) predicateWithFormat: (NSString *)format
|
||||
arguments: (va_list)args;
|
||||
+ (NSPredicate *) predicateWithValue: (BOOL)value;
|
||||
|
||||
- (BOOL) evaluateWithObject: (id)object;
|
||||
- (NSString *) predicateFormat;
|
||||
- (NSPredicate *) predicateWithSubstitutionVariables: (NSDictionary *)variables;
|
||||
|
||||
@end
|
||||
|
||||
@interface NSArray (NSPredicate)
|
||||
- (NSArray *) filteredArrayUsingPredicate: (NSPredicate *)predicate;
|
||||
@end
|
||||
|
||||
#endif /* __NSPredicate_h_GNUSTEP_BASE_INCLUDE */
|
34
Resources/Esperanto.lproj/Localizable.strings
Normal file
34
Resources/Esperanto.lproj/Localizable.strings
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* Esperanto string encodings */
|
||||
GSUndefinedEncoding = "nekonata";
|
||||
NSProprietaryStringEncoding = "Installaĵo-dependa";
|
||||
NSASCIIStringEncoding = "7 bita ASCII";
|
||||
NSNonLossyASCIIStringEncoding = "senperda ASCII (7bita)";
|
||||
NSMacOSRomanStringEncoding = "MacOS Roman";
|
||||
NSNEXTSTEPStringEncoding = "NEXTSTEP";
|
||||
NSSymbolStringEncoding = "Adobe Symbol";
|
||||
NSWindowsCP1251StringEncoding = "Windows kirila (CP1251)";
|
||||
NSWindowsCP1252StringEncoding = "Windows latin-1 (CP1252)";
|
||||
NSWindowsCP1253StringEncoding = "Windows greka (CP1253)";
|
||||
NSWindowsCP1254StringEncoding = "Windows turka (CP1254)";
|
||||
NSWindowsCP1250StringEncoding = "Windows latin-2 (CP1250)";
|
||||
NSISOLatin1StringEncoding = "ISO Latin-1 Okcidenteŭropa (ISO-8859-1)";
|
||||
NSISOLatin2StringEncoding = "ISO Latin-2 Orieneŭropa (ISO-8859-2)";
|
||||
NSISOLatin3StringEncoding = "ISO Latin-3 Sudeŭropa (ISO-8859-3)";
|
||||
NSISOLatin4StringEncoding = "ISO Latin-4 Nordeŭropa (ISO-8859-4)";
|
||||
NSISOLatin5StringEncoding = "ISO Latin-5 Turka (ISO-8859-9)";
|
||||
NSISOLatin6StringEncoding = "ISO Latin-6 Norda (ISO-8859-10)";
|
||||
NSISOLatin7StringEncoding = "ISO Latin-7 Balta (ISO-8859-13)";
|
||||
NSISOLatin8StringEncoding = "ISO Latin-8 Kelta (ISO-8859-14)";
|
||||
NSISOLatin9StringEncoding = "ISO Latin-9 Okcidenteŭropa (nova) (ISO-8859-15)";
|
||||
NSISOCyrillicStringEncoding = "Kirila (ISO-8859-5)";
|
||||
NSISOArabicStringEncoding = "Araba (ISO-8859-6)";
|
||||
NSISOGreekStringEncoding = "Greka (ISO-8859-7)";
|
||||
NSISOHebrewStringEncoding = "Hebrea (ISO-8859-8)";
|
||||
NSUTF7StringEncoding = "Unikodo UTF-7 (RFC 2152)";
|
||||
NSUTF8StringEncoding = "Unikodo UTF-8";
|
||||
NSUnicodeStringEncoding = "Unikodo UTF-16";
|
||||
NSKOI8RStringEncoding = "Kirila KOI8-R (Rusa)";
|
||||
NSJapaneseEUCStringEncoding = "Japana EUC";
|
||||
NSShiftJISStringEncoding = "Japana Shift-JIS";
|
||||
NSISO2022JPStringEncoding = "Japana JIS (7 bits) (ISO 2022)";
|
||||
NSGB2312StringEncoding = "Simpligita ĉina GB2312";
|
|
@ -28,7 +28,8 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
|
||||
RESOURCE_SET_NAME = base-resources
|
||||
base-resources_RESOURCE_FILES_INSTALL_DIR = Library/Libraries/Resources/gnustep-base
|
||||
base-resources_LANGUAGES = English German French Italian TraditionalChinese Spanish
|
||||
base-resources_LANGUAGES = English German French Italian TraditionalChinese \
|
||||
Spanish Esperanto Korean
|
||||
base-resources_LOCALIZED_RESOURCE_FILES = Localizable.strings
|
||||
base-resources_RESOURCE_DIRS = Languages
|
||||
base-resources_RESOURCE_FILES = $(LANGUAGE_INSTALL_FILES)
|
||||
|
@ -44,8 +45,9 @@ Languages/Russian \
|
|||
Languages/Spanish \
|
||||
Languages/TraditionalChinese \
|
||||
Languages/Slovak \
|
||||
Languages/UkraineRussian
|
||||
|
||||
Languages/Ukrainian \
|
||||
Languages/Esperanto \
|
||||
Languages/Korean
|
||||
LANGUAGE_INSTALL_FILES = $(LANGUAGE_FILES) Languages/Locale.aliases \
|
||||
Languages/Locale.encodings
|
||||
|
||||
|
|
34
Resources/Korean.lproj/Localizable.strings
Normal file
34
Resources/Korean.lproj/Localizable.strings
Normal file
|
@ -0,0 +1,34 @@
|
|||
/* KOREAN string encodings */
|
||||
GSUndefinedEncoding = "알 수 없음";
|
||||
NSProprietaryStringEncoding = "국제화-명세서";
|
||||
NSASCIIStringEncoding = "7 bit 아스키";
|
||||
NSNonLossyASCIIStringEncoding = "비손실 아스키 (7 bit)";
|
||||
NSMacOSRomanStringEncoding = "MacOS 로마어";
|
||||
NSNEXTSTEPStringEncoding = "넥스트 스텝";
|
||||
NSSymbolStringEncoding = "아도비 심벌";
|
||||
NSWindowsCP1251StringEncoding = "윈도우즈 키릴 (CP1251)";
|
||||
NSWindowsCP1252StringEncoding = "윈도우즈 라틴-1 (CP1252)";
|
||||
NSWindowsCP1253StringEncoding = "윈도우즈 그리스 (CP1253)";
|
||||
NSWindowsCP1254StringEncoding = "윈도우즈 터키 (CP1254)";
|
||||
NSWindowsCP1250StringEncoding = "윈도우즈 라틴-2 (CP1250)";
|
||||
NSISOLatin1StringEncoding = "ISO 라틴-1 서유럽 (ISO-8859-1)";
|
||||
NSISOLatin2StringEncoding = "ISO 라틴-2 동유럽 (ISO-8859-2)";
|
||||
NSISOLatin3StringEncoding = "ISO 라틴-3 남유럽 (ISO-8859-3)";
|
||||
NSISOLatin4StringEncoding = "ISO 라틴-4 북유럽 (ISO-8859-4)";
|
||||
NSISOLatin5StringEncoding = "ISO 라틴-5 터키 (ISO-8859-9)";
|
||||
NSISOLatin6StringEncoding = "ISO 라틴-6 북유럽 (ISO-8859-10)";
|
||||
NSISOLatin7StringEncoding = "ISO 라틴-7 발트 (ISO-8859-13)";
|
||||
NSISOLatin8StringEncoding = "ISO 라틴-8 켈트 (ISO-8859-14)";
|
||||
NSISOLatin9StringEncoding = "ISO 라틴-9 서유럽 (새로운) (ISO-8859-15)";
|
||||
NSISOCyrillicStringEncoding = "키릴 (ISO-8859-5)";
|
||||
NSISOArabicStringEncoding = "아랍어 (ISO-8859-6)";
|
||||
NSISOGreekStringEncoding = "그리스어 (ISO-8859-7)";
|
||||
NSISOHebrewStringEncoding = "헤브류어 (ISO-8859-8)";
|
||||
NSUTF7StringEncoding = "유니코드 UTF-7 (RFC 2152)";
|
||||
NSUTF8StringEncoding = "유니코드 UTF-8";
|
||||
NSUnicodeStringEncoding = "유니코드 UTF-16";
|
||||
NSKOI8RStringEncoding = "키릴 KOI8-R (러시아어)";
|
||||
NSJapaneseEUCStringEncoding = "일본어 EUC";
|
||||
NSShiftJISStringEncoding = "일본어 Shift-JIS";
|
||||
NSISO2022JPStringEncoding = "일본어 JIS (7 bits) (ISO 2022)";
|
||||
NSGB2312StringEncoding = "중국어 간체 GB2312";
|
37
Resources/Languages/Esperanto
Normal file
37
Resources/Languages/Esperanto
Normal file
|
@ -0,0 +1,37 @@
|
|||
/* Esperanto */
|
||||
{
|
||||
NSLanguageName = "Esperanto";
|
||||
NSLanguageCode = ESP;
|
||||
NSFormalName = "Esperanto";
|
||||
|
||||
NSCurrencySymbol = "$";
|
||||
NSPositiveCurrencyFormatString = "$9,999.00";
|
||||
NSNegativeCurrencyFormatString = "$-9,999.00";
|
||||
NSInternationalCurrencyString = "USD";
|
||||
|
||||
NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
|
||||
NSDecimalSeparator = ".";
|
||||
NSThousandsSeparator = ",";
|
||||
|
||||
NSAMPMDesignation = (AM, PM);
|
||||
NSDateFormatString = "%A, %B %d, %Y";
|
||||
NSDateTimeOrdering = DMYH;
|
||||
NSEarlierTimeDesignations = ("anta\U016d", lasta, pasinta, "anta\U016da");
|
||||
NSHourNameDesignations = ((0, noktomeze), (12, tagmeze), (10, matene), (14, posttagmeze), (19, vespere));
|
||||
NSLaterTimeDesignations = (nekste);
|
||||
NSMonthNameArray = (Januaro, Februaro, Marto, Aprilo, Majo, Junio, Julio, "A\U016dgusto", Septembro, Oktobro, Novembro, Decembro);
|
||||
NSNextDayDesignations = ("morga\U016d");
|
||||
NSNextNextDayDesignations = ("venontan tagon");
|
||||
NSPriorDayDesignations = ("hiera\U016d");
|
||||
NSShortDateFormatString = "%d/%m/%Y";
|
||||
NSShortMonthNameArray = (Jan, Feb, Mar, Apr, May, Jun, Jul, "A\U016dg", Sep, Okt, Nov, Dec);
|
||||
NSShortTimeDateFormatString = "%da %b %Y %H:%M";
|
||||
NSShortWeekDayNameArray = (Dim, Lun, Mar, Mer, "\U0134au", Ven, Sab);
|
||||
NSThisDayDesignations = ("hodia\U016d");
|
||||
NSTimeDateFormatString = "%a %da %b %Y %H:%M:%S %z";
|
||||
NSTimeFormatString = "%H:%M:%S";
|
||||
NSWeekDayNameArray = ("Diman\U0109o", Lundo, Marto, Merkredo, "\U0134audo", Vendredo, Sabato);
|
||||
NSYearMonthWeekDesignations = (jaro, monato, semajno);
|
||||
}
|
||||
|
||||
|
37
Resources/Languages/Korean
Normal file
37
Resources/Languages/Korean
Normal file
|
@ -0,0 +1,37 @@
|
|||
/* English */
|
||||
{
|
||||
NSLanguageName = "한국어";
|
||||
NSLanguageCode = KOR;
|
||||
NSFormalName = "한국어";
|
||||
|
||||
NSCurrencySymbol = "₩";
|
||||
NSPositiveCurrencyFormatString = "₩9,999.00";
|
||||
NSNegativeCurrencyFormatString = "₩-9,999.00";
|
||||
NSInternationalCurrencyString = "원";
|
||||
|
||||
NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
|
||||
NSDecimalSeparator = ".";
|
||||
NSThousandsSeparator = ",";
|
||||
|
||||
NSAMPMDesignation = (오전, 오후);
|
||||
NSDateFormatString = " %Y, %B %d, %A";
|
||||
NSDateTimeOrdering = DMYH;
|
||||
NSEarlierTimeDesignations = (이전, 마지막, 지나간, 이전);
|
||||
NSHourNameDesignations = ((0, 한 밤중), (12, 한 낮, 점심), (10, 아침), (14, 오후, (19, 저녁));
|
||||
NSLaterTimeDesignations = (다음);
|
||||
NSMonthNameArray = (1월, 2월, 3월, 4월, 5월, 6월, 7월, 8월, 9월, 10월, 11월, 12월);
|
||||
NSNextDayDesignations = (내일);
|
||||
NSNextNextDayDesignations = (다음 날);
|
||||
NSPriorDayDesignations = (어제);
|
||||
NSShortDateFormatString = "%Y/%m/%d/";
|
||||
NSShortMonthNameArray = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
|
||||
NSShortTimeDateFormatString = "%d %b, %Y %H:%M";
|
||||
NSShortWeekDayNameArray = (일, 월, 화, 수, 목, 금, 토);
|
||||
NSThisDayDesignations = (오늘);
|
||||
NSTimeDateFormatString = "%a %b %d %H:%M:%S %z %Y";
|
||||
NSTimeFormatString = "%H:%M:%S";
|
||||
NSWeekDayNameArray = (일요일, 월요일, 화요일, 수요일, 목요일, 금요일, 토요일);
|
||||
NSYearMonthWeekDesignations = (년, 월, 일);
|
||||
}
|
||||
|
||||
|
|
@ -4,34 +4,34 @@
|
|||
NSLanguageCode = RU;
|
||||
NSFormalName = "Russian";
|
||||
|
||||
NSCurrencySymbol = "\u0440\u0443\u0431";
|
||||
NSPositiveCurrencyFormatString = "9,999.00 \u0440\u0443\u0431";
|
||||
NSNegativeCurrencyFormatString = "-9,999.00 \u0440\u0443\u0431";
|
||||
NSCurrencySymbol = "\U0440\U0443\U0431";
|
||||
NSPositiveCurrencyFormatString = "9 999,00 \U0440\U0443\U0431";
|
||||
NSNegativeCurrencyFormatString = "-9 999,00 \U0440\U0443\U0431";
|
||||
NSInternationalCurrencyString = "RUR";
|
||||
|
||||
NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
|
||||
NSDecimalSeparator = ".";
|
||||
NSThousandsSeparator = ",";
|
||||
NSDecimalSeparator = ",";
|
||||
NSThousandsSeparator = " ";
|
||||
|
||||
NSAMPMDesignation = (AM, PM);
|
||||
NSDateFormatString = "%A, %d %B, %Y";
|
||||
NSDateTimeOrdering = DMYH;
|
||||
NSEarlierTimeDesignations = ("\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439", "\u043f\u0440\u043e\u0448\u043b\u044b\u0439", "\u043c\u0438\u043d\u0443\u0432\u0448\u0438\u0439", "\u0442\u043e\u043c\u0443 \u043d\u0430\u0437\u0430\u0434");
|
||||
NSHourNameDesignations = ((0, "\u043f\u043e\u043b\u043d\u043e\u0447\u044c"), (12, "\u043f\u043e\u043b\u0434\u0435\u043d\u044c"), (10, "\u0443\u0442\u0440\u043e"), (14, "\u043e\u0431\u0435\u0434"), (19, "\u0443\u0436\u0438\u043d"));
|
||||
NSLaterTimeDesignations = ("\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439");
|
||||
NSMonthNameArray = ("\u042f\u043d\u0432\u0430\u0440\u044c", "\u0424\u0435\u0432\u0440\u0430\u043b\u044c", "\u041c\u0430\u0440\u0442", "\u0410\u043f\u0440\u0435\u043b\u044c", "\u041c\u0430\u0439", "\u0418\u044e\u043d\u044c", "\u0418\u044e\u043b\u044c", "\u0410\u0432\u0433\u0443\u0441\u0442", "\u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c", "\u041e\u043a\u0442\u044f\u0431\u0440\u044c", "\u041d\u043e\u044f\u0431\u0440\u044c", "\u0414\u0435\u043a\u0430\u0431\u0440\u044c");
|
||||
NSNextDayDesignations = ("\u0437\u0430\u0432\u0442\u0440\u0430");
|
||||
NSNextNextDayDesignations = ("\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430");
|
||||
NSPriorDayDesignations = ("\u0432\u0447\u0435\u0440\u0430");
|
||||
NSEarlierTimeDesignations = ("\U043f\U0440\U0435\U0434\U044b\U0434\U0443\U0449\U0438\U0439", "\U043f\U0440\U043e\U0448\U043b\U044b\U0439", "\U043c\U0438\U043d\U0443\U0432\U0448\U0438\U0439", "\U0442\U043e\U043c\U0443 \U043d\U0430\U0437\U0430\U0434");
|
||||
NSHourNameDesignations = ((0, "\U043f\U043e\U043b\U043d\U043e\U0447\U044c"), (12, "\U043f\U043e\U043b\U0434\U0435\U043d\U044c"), (10, "\U0443\U0442\U0440\U043e"), (14, "\U043e\U0431\U0435\U0434"), (19, "\U0432\U0435\U0447\U0435\U0440"));
|
||||
NSLaterTimeDesignations = ("\U0441\U043b\U0435\U0434\U0443\U044e\U0449\U0438\U0439");
|
||||
NSMonthNameArray = ("\U042f\U043d\U0432\U0430\U0440\U044c", "\U0424\U0435\U0432\U0440\U0430\U043b\U044c", "\U041c\U0430\U0440\U0442", "\U0410\U043f\U0440\U0435\U043b\U044c", "\U041c\U0430\U0439", "\U0418\U044e\U043d\U044c", "\U0418\U044e\U043b\U044c", "\U0410\U0432\U0433\U0443\U0441\U0442", "\U0421\U0435\U043d\U0442\U044f\U0431\U0440\U044c", "\U041e\U043a\U0442\U044f\U0431\U0440\U044c", "\U041d\U043e\U044f\U0431\U0440\U044c", "\U0414\U0435\U043a\U0430\U0431\U0440\U044c");
|
||||
NSNextDayDesignations = ("\U0437\U0430\U0432\U0442\U0440\U0430");
|
||||
NSNextNextDayDesignations = ("\U043f\U043e\U0441\U043b\U0435\U0437\U0430\U0432\U0442\U0440\U0430");
|
||||
NSPriorDayDesignations = ("\U0432\U0447\U0435\U0440\U0430");
|
||||
NSShortDateFormatString = "%d/%m/%Y";
|
||||
NSShortMonthNameArray = ("\u042f\u043d\u0432", "\u0424\u0435\u0432", "\u041c\u0430\u0440", "\u0410\u043f\u0440", "\u041c\u0430\u0439", "\u0418\u044e\u043d", "\u0418\u044e\u043b", "\u0410\u0432\u0433", "\u0421\u0435\u043d", "\u041e\u043a\u0442", "\u041d\u043e\u044f", "\u0414\u0435\u043a");
|
||||
NSShortMonthNameArray = ("\U042f\U043d\U0432", "\U0424\U0435\U0432", "\U041c\U0430\U0440", "\U0410\U043f\U0440", "\U041c\U0430\U0439", "\U0418\U044e\U043d", "\U0418\U044e\U043b", "\U0410\U0432\U0433", "\U0421\U0435\U043d", "\U041e\U043a\U0442", "\U041d\U043e\U044f", "\U0414\U0435\U043a");
|
||||
NSShortTimeDateFormatString = "%d %b, %Y %H:%M";
|
||||
NSShortWeekDayNameArray = ("\u0412\u043e\u0441", "\u041f\u043e\u043d", "\u0412\u0442", "\u0421\u0440\u0434", "\u0427\u0442\u0432", "\u041f\u044f\u0442", "\u0421\u0443\u0431");
|
||||
NSThisDayDesignations = ("\u0441\u0435\u0433\u043e\u0434\u043d\u044f");
|
||||
NSShortWeekDayNameArray = ("\U0412\U043e\U0441", "\U041f\U043e\U043d", "\U0412\U0442", "\U0421\U0440\U0434", "\U0427\U0442\U0432", "\U041f\U044f\U0442", "\U0421\U0443\U0431");
|
||||
NSThisDayDesignations = ("\U0441\U0435\U0433\U043e\U0434\U043d\U044f");
|
||||
NSTimeDateFormatString = "%a %d %b %H:%M:%S %z %Y";
|
||||
NSTimeFormatString = "%H:%M:%S";
|
||||
NSWeekDayNameArray = ("\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435", "\u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a", "\u0412\u0442\u043e\u0440\u043d\u0438\u043a", "\u0421\u0440\u0435\u0434\u0430", "\u0427\u0435\u0442\u0432\u0435\u0440\u0433", "\u041f\u044f\u0442\u043d\u0438\u0446\u0430", "\u0421\u0443\u0431\u0431\u043e\u0442\u0430");
|
||||
NSYearMonthWeekDesignations = ("\u0433\u043e\u0434", "\u043c\u0435\u0441\u044f\u0446", "\u043d\u0435\u0434\u0435\u043b\u044f");
|
||||
NSWeekDayNameArray = ("\U0412\U043e\U0441\U043a\U0440\U0435\U0441\U0435\U043d\U044c\U0435", "\U041f\U043e\U043d\U0435\U0434\U0435\U043b\U044c\U043d\U0438\U043a", "\U0412\U0442\U043e\U0440\U043d\U0438\U043a", "\U0421\U0440\U0435\U0434\U0430", "\U0427\U0435\U0442\U0432\U0435\U0440\U0433", "\U041f\U044f\U0442\U043d\U0438\U0446\U0430", "\U0421\U0443\U0431\U0431\U043e\U0442\U0430");
|
||||
NSYearMonthWeekDesignations = ("\U0433\U043e\U0434", "\U043c\U0435\U0441\U044f\U0446", "\U043d\U0435\U0434\U0435\U043b\U044f");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
/* Ukrainian */
|
||||
{
|
||||
NSLanguageName = "Ukrainian";
|
||||
NSLanguageCode = UK;
|
||||
NSFormalName = "Ukrainian";
|
||||
|
||||
NSCurrencySymbol = "\u0433\u0440\u043d";
|
||||
NSPositiveCurrencyFormatString = "9,999.00 \u0433\u0440\u043d";
|
||||
NSNegativeCurrencyFormatString = "-9,999.00 \u0433\u0440\u043d";
|
||||
NSInternationalCurrencyString = "UAH";
|
||||
|
||||
NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
|
||||
NSDecimalSeparator = ".";
|
||||
NSThousandsSeparator = ",";
|
||||
|
||||
NSAMPMDesignation = (AM, PM);
|
||||
NSDateFormatString = "%A, %d %B, %Y";
|
||||
NSDateTimeOrdering = DMYH;
|
||||
NSEarlierTimeDesignations = ("\u043f\u043e\u043f\u0435\u0440\u0435\u0434\u043d\u2555\u0439", "\u043c\u0438\u043d\u0443\u043b\u0438\u0439", "\u043c\u0438\u043d\u0443\u043b\u0438\u0439", "\u0442\u043e\u043c\u0443");
|
||||
NSHourNameDesignations = ((0, "\u043f\u043e\u043b\u0443\u043d\u2555\u0447"), (12, "\u043f\u043e\u043b\u0443\u0434\u0435\u043d\u044c"), (10, "\u0440\u0430\u043d\u043e\u043a"), (14, "\u043e\u0431\u2555\u0434"), (19, "\u0432\u0435\u0447\u2555\u0440"));
|
||||
NSLaterTimeDesignations = ("\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0438\u0439");
|
||||
NSMonthNameArray = ("\u0421\u2555\u0447\u0435\u043d\u044c", "\u041b\u044e\u0442\u0438\u0439", "\u0411\u0435\u0440\u0435\u0437\u0435\u043d\u044c", "\u041a\u0432\u2555\u0442\u0435\u043d\u044c", "\u0422\u0440\u0430\u0432\u0435\u043d\u044c", "\u0427\u0435\u0440\u0432\u0435\u043d\u044c", "\u041b\u0438\u043f\u0435\u043d\u044c", "\u0421\u0435\u0440\u043f\u0435\u043d\u044c", "\u0412\u0435\u0440\u0435\u0441\u0435\u043d\u044c", "\u0416\u043e\u0432\u0442\u0435\u043d\u044c", "\u041b\u0438\u0441\u0442\u043e\u043f\u0430\u0434", "\u0413\u0440\u0443\u0434\u0435\u043d\u044c");
|
||||
NSNextDayDesignations = ("\u0437\u0430\u0432\u0442\u0440\u0430");
|
||||
NSNextNextDayDesignations = ("\u043f\u2555\u0441\u043b\u044f\u0437\u0430\u0432\u0442\u0440\u0430");
|
||||
NSPriorDayDesignations = ("\u0432\u0447\u043e\u0440\u0430");
|
||||
NSShortDateFormatString = "%d/%m/%Y";
|
||||
NSShortMonthNameArray = ("\u0421\u2555\u0447", "\u041b\u044e\u0442", "\u0411\u0435\u0440", "\u041a\u0432\u2555", "\u0422\u0440\u0430", "\u0427\u0435\u0440", "\u041b\u0438\u043f", "\u0421\u0435\u0440", "\u0412\u0435\u0440", "\u0416\u043e\u0432", "\u041b\u0438\u0441", "\u0413\u0440\u0443");
|
||||
NSShortTimeDateFormatString = "%d %b, %Y %H:%M";
|
||||
NSShortWeekDayNameArray = ("\u041d\u0434\u043b", "\u041f\u043d\u0434", "\u0412\u0442\u0440", "\u0421\u0440\u0434", "\u0427\u0442\u0432", "\u041f\u0442\u043d", "\u0421\u0431\u0442");
|
||||
NSThisDayDesignations = ("\u0441\u044c\u043e\u0433\u043e\u0434\u043d\u2555");
|
||||
NSTimeDateFormatString = "%a %d %b %H:%M:%S %z %Y";
|
||||
NSTimeFormatString = "%H:%M:%S";
|
||||
NSWeekDayNameArray = ("\u041d\u0435\u0434\u2555\u043b\u044f", "\u041f\u043e\u043d\u0435\u0434\u2555\u043b\u043e\u043a", "\u0412\u2555\u0432\u0442\u043e\u0440\u043e\u043a", "\u0421\u0435\u0440\u0435\u0434\u0430", "\u0427\u0435\u0442\u0432\u0435\u0440", "\u041f'\u044f\u0442\u043d\u0438\u0446\u044f", "\u0421\u0443\u0431\u043e\u0442\u0430");
|
||||
NSYearMonthWeekDesignations = ("\u0440\u2555\u043a", "\u043c\u2555\u0441\u044f\u0446\u044c", "\u0442\u0438\u0436\u0434\u0435\u043d\u044c");
|
||||
}
|
||||
|
36
Resources/Languages/Ukrainian
Normal file
36
Resources/Languages/Ukrainian
Normal file
|
@ -0,0 +1,36 @@
|
|||
/* Ukrainian */
|
||||
{
|
||||
NSLanguageName = "Ukrainian";
|
||||
NSLanguageCode = UA;
|
||||
NSFormalName = "Ukrainian";
|
||||
|
||||
NSCurrencySymbol = "\U0433\U0440\U043d.";
|
||||
NSPositiveCurrencyFormatString = "9 999,00 \U0433\U0440\U043d.";
|
||||
NSNegativeCurrencyFormatString = "-9 999,00 \U0433\U0440\U043d.";
|
||||
NSInternationalCurrencyString = "UAH";
|
||||
|
||||
NSDecimalDigits = ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9");
|
||||
NSDecimalSeparator = ",";
|
||||
NSThousandsSeparator = " ";
|
||||
|
||||
NSAMPMDesignation = (AM, PM);
|
||||
NSDateFormatString = "%A, %d %B, %Y";
|
||||
NSDateTimeOrdering = DMYH;
|
||||
NSEarlierTimeDesignations = ("\U043f\U043e\U043f\U0435\U0440\U0435\U0434\U043d\U2555\U0439", "\U043c\U0438\U043d\U0443\U043b\U0438\U0439", "\U043c\U0438\U043d\U0443\U043b\U0438\U0439", "\U0442\U043e\U043c\U0443");
|
||||
NSHourNameDesignations = ((0, "\U043f\U043e\U043b\U0443\U043d\U2555\U0447"), (12, "\U043f\U043e\U043b\U0443\U0434\U0435\U043d\U044c"), (10, "\U0440\U0430\U043d\U043e\U043a"), (14, "\U043e\U0431\U2555\U0434"), (19, "\U0432\U0435\U0447\U2555\U0440"));
|
||||
NSLaterTimeDesignations = ("\U043d\U0430\U0441\U0442\U0443\U043f\U043d\U0438\U0439");
|
||||
NSMonthNameArray = ("\U0421\U2555\U0447\U0435\U043d\U044c", "\U041b\U044e\U0442\U0438\U0439", "\U0411\U0435\U0440\U0435\U0437\U0435\U043d\U044c", "\U041a\U0432\U2555\U0442\U0435\U043d\U044c", "\U0422\U0440\U0430\U0432\U0435\U043d\U044c", "\U0427\U0435\U0440\U0432\U0435\U043d\U044c", "\U041b\U0438\U043f\U0435\U043d\U044c", "\U0421\U0435\U0440\U043f\U0435\U043d\U044c", "\U0412\U0435\U0440\U0435\U0441\U0435\U043d\U044c", "\U0416\U043e\U0432\U0442\U0435\U043d\U044c", "\U041b\U0438\U0441\U0442\U043e\U043f\U0430\U0434", "\U0413\U0440\U0443\U0434\U0435\U043d\U044c");
|
||||
NSNextDayDesignations = ("\U0437\U0430\U0432\U0442\U0440\U0430");
|
||||
NSNextNextDayDesignations = ("\U043f\U2555\U0441\U043b\U044f\U0437\U0430\U0432\U0442\U0440\U0430");
|
||||
NSPriorDayDesignations = ("\U0432\U0447\U043e\U0440\U0430");
|
||||
NSShortDateFormatString = "%d/%m/%Y";
|
||||
NSShortMonthNameArray = ("\U0421\U2555\U0447", "\U041b\U044e\U0442", "\U0411\U0435\U0440", "\U041a\U0432\U2555", "\U0422\U0440\U0430", "\U0427\U0435\U0440", "\U041b\U0438\U043f", "\U0421\U0435\U0440", "\U0412\U0435\U0440", "\U0416\U043e\U0432", "\U041b\U0438\U0441", "\U0413\U0440\U0443");
|
||||
NSShortTimeDateFormatString = "%d %b, %Y %H:%M";
|
||||
NSShortWeekDayNameArray = ("\U041d\U0434\U043b", "\U041f\U043d\U0434", "\U0412\U0442\U0440", "\U0421\U0440\U0434", "\U0427\U0442\U0432", "\U041f\U0442\U043d", "\U0421\U0431\U0442");
|
||||
NSThisDayDesignations = ("\U0441\U044c\U043e\U0433\U043e\U0434\U043d\U2555");
|
||||
NSTimeDateFormatString = "%a %d %b %H:%M:%S %z %Y";
|
||||
NSTimeFormatString = "%H:%M:%S";
|
||||
NSWeekDayNameArray = ("\U041d\U0435\U0434\U2555\U043b\U044f", "\U041f\U043e\U043d\U0435\U0434\U2555\U043b\U043e\U043a", "\U0412\U2555\U0432\U0442\U043e\U0440\U043e\U043a", "\U0421\U0435\U0440\U0435\U0434\U0430", "\U0427\U0435\U0442\U0432\U0435\U0440", "\U041f'\U044f\U0442\U043d\U0438\U0446\U044f", "\U0421\U0443\U0431\U043e\U0442\U0430");
|
||||
NSYearMonthWeekDesignations = ("\U0440\U2555\U043a", "\U043c\U2555\U0441\U044f\U0446\U044c", "\U0442\U0438\U0436\U0434\U0435\U043d\U044c");
|
||||
}
|
||||
|
|
@ -23,7 +23,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>The XML and HTML parsing system</title>
|
||||
<chapter>
|
||||
|
@ -3861,13 +3862,18 @@ static BOOL warned = NO; if (warned == NO) { warned = YES; NSLog(@"WARNING, use
|
|||
GSXMLParser *ssParser;
|
||||
GSXMLDocument *ss;
|
||||
|
||||
newdoc = nil;
|
||||
xmlParser = [GSXMLParser parserWithData: xmlData];
|
||||
[xmlParser parse];
|
||||
xml = [xmlParser document];
|
||||
ssParser = [GSXMLParser parserWithData: xsltStylesheet];
|
||||
[ssParser parse];
|
||||
ss = [ssParser document];
|
||||
newdoc = [xml xsltTransform: ss params: params];
|
||||
if ([xmlParser parse] == YES)
|
||||
{
|
||||
xml = [xmlParser document];
|
||||
ssParser = [GSXMLParser parserWithData: xsltStylesheet];
|
||||
if ([ssParser parse] == YES)
|
||||
{
|
||||
ss = [ssParser document];
|
||||
newdoc = [xml xsltTransform: ss params: params];
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -4951,19 +4957,23 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
{
|
||||
GSXPathContext *ctx = nil;
|
||||
GSXPathNodeSet *ns = nil;
|
||||
GSXMLParser *parser = nil;
|
||||
NSString *method;
|
||||
|
||||
[params removeAllObjects];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
GSXMLParser *parser = [GSXMLParser parserWithData: request];
|
||||
GSXMLDocument *doc = nil;
|
||||
|
||||
parser = [GSXMLParser parserWithData: request];
|
||||
[parser substituteEntities: YES];
|
||||
[parser parse];
|
||||
doc = [parser document];
|
||||
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
|
||||
[parser saveMessages: YES];
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
doc = [parser document];
|
||||
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -4973,7 +4983,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
if (ctx == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Bad Request: parse failed"];
|
||||
format: @"Bad Request: parse failed (%@)", [parser messages]];
|
||||
}
|
||||
|
||||
ns = (GSXPathNodeSet*)[ctx evaluateExpression: @"//methodCall/methodName"];
|
||||
|
@ -5022,19 +5032,23 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
{
|
||||
GSXPathContext *ctx = nil;
|
||||
GSXPathNodeSet *ns = nil;
|
||||
GSXMLParser *parser = nil;
|
||||
id fault = nil;
|
||||
|
||||
[params removeAllObjects];
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
GSXMLParser *parser = [GSXMLParser parserWithData: response];
|
||||
GSXMLDocument *doc = nil;
|
||||
|
||||
parser = [GSXMLParser parserWithData: response];
|
||||
[parser substituteEntities: YES];
|
||||
[parser parse];
|
||||
doc = [parser document];
|
||||
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
|
||||
[parser saveMessages: YES];
|
||||
if ([parser parse] == YES)
|
||||
{
|
||||
doc = [parser document];
|
||||
ctx = AUTORELEASE([[GSXPathContext alloc] initWithDocument: doc]);
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
|
@ -5044,7 +5058,7 @@ static void indentation(unsigned level, NSMutableString *str)
|
|||
if (ctx == nil)
|
||||
{
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"Bad Response: parse failed"];
|
||||
format: @"Bad Request: parse failed (%@)", [parser messages]];
|
||||
}
|
||||
|
||||
ns = (GSXPathNodeSet*)[ctx evaluateExpression:
|
||||
|
|
|
@ -202,6 +202,7 @@ NSPort.m \
|
|||
NSPortCoder.m \
|
||||
NSPortMessage.m \
|
||||
NSPortNameServer.m \
|
||||
NSPredicate.m \
|
||||
NSProcessInfo.m \
|
||||
NSPropertyList.m \
|
||||
NSProtocolChecker.m \
|
||||
|
@ -279,6 +280,8 @@ NSCalendarDate.h \
|
|||
NSCharacterSet.h \
|
||||
NSClassDescription.h \
|
||||
NSCoder.h \
|
||||
NSComparisonPredicate.h \
|
||||
NSCompoundPredicate.h \
|
||||
NSConnection.h \
|
||||
NSData.h \
|
||||
NSDate.h \
|
||||
|
@ -293,6 +296,7 @@ NSDistributedNotificationCenter.h \
|
|||
NSEnumerator.h \
|
||||
NSError.h \
|
||||
NSException.h \
|
||||
NSExpression.h \
|
||||
NSFileHandle.h \
|
||||
NSFileManager.h \
|
||||
NSFormatter.h \
|
||||
|
@ -319,6 +323,7 @@ NSPort.h \
|
|||
NSPortCoder.h \
|
||||
NSPortMessage.h \
|
||||
NSPortNameServer.h \
|
||||
NSPredicate.h \
|
||||
NSProcessInfo.h \
|
||||
NSPropertyList.h \
|
||||
NSProtocolChecker.h \
|
||||
|
|
|
@ -64,7 +64,10 @@
|
|||
@end
|
||||
|
||||
typedef enum {
|
||||
NSBUNDLE_BUNDLE = 1, NSBUNDLE_APPLICATION, NSBUNDLE_FRAMEWORK
|
||||
NSBUNDLE_BUNDLE = 1,
|
||||
NSBUNDLE_APPLICATION,
|
||||
NSBUNDLE_FRAMEWORK,
|
||||
NSBUNDLE_LIBRARY
|
||||
} bundle_t;
|
||||
|
||||
/* Class variables - We keep track of all the bundles */
|
||||
|
@ -378,7 +381,6 @@ _find_framework(NSString *name)
|
|||
@interface NSBundle (Private)
|
||||
+ (NSString *) _absolutePathOfExecutable: (NSString *)path;
|
||||
+ (void) _addFrameworkFromClass: (Class)frameworkClass;
|
||||
- (NSArray *) _bundleClasses;
|
||||
+ (NSString*) _gnustep_target_cpu;
|
||||
+ (NSString*) _gnustep_target_dir;
|
||||
+ (NSString*) _gnustep_target_os;
|
||||
|
@ -604,7 +606,7 @@ _find_framework(NSString *name)
|
|||
|
||||
value = [NSValue valueWithNonretainedObject: class];
|
||||
|
||||
[(NSMutableArray *)[bundle _bundleClasses] addObject: value];
|
||||
[bundle->_bundleClasses addObject: value];
|
||||
|
||||
fmClasses++;
|
||||
}
|
||||
|
@ -620,17 +622,12 @@ _find_framework(NSString *name)
|
|||
*/
|
||||
if (_loadingBundle != nil && _loadingBundle != bundle)
|
||||
{
|
||||
[(NSMutableArray *)[_loadingBundle _bundleClasses]
|
||||
removeObjectsInArray: [bundle _bundleClasses]];
|
||||
[_loadingBundle->_bundleClasses
|
||||
removeObjectsInArray: bundle->_bundleClasses];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (NSArray *) _bundleClasses
|
||||
{
|
||||
return _bundleClasses;
|
||||
}
|
||||
|
||||
+ (NSString*) _gnustep_target_cpu
|
||||
{
|
||||
return gnustep_target_cpu;
|
||||
|
@ -662,6 +659,10 @@ _find_framework(NSString *name)
|
|||
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
@defs(NSBundle)
|
||||
} *bptr;
|
||||
|
||||
void
|
||||
_bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
||||
{
|
||||
|
@ -695,14 +696,14 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
}
|
||||
|
||||
/* Store classes (but don't store categories) */
|
||||
[(NSMutableArray *)[_loadingBundle _bundleClasses] addObject:
|
||||
[NSValue valueWithNonretainedObject: (id)theClass]];
|
||||
[((bptr)_loadingBundle)->_bundleClasses addObject:
|
||||
[NSValue valueWithNonretainedObject: (id)theClass]];
|
||||
}
|
||||
|
||||
|
||||
@implementation NSBundle
|
||||
|
||||
+ (void)initialize
|
||||
+ (void) initialize
|
||||
{
|
||||
if (self == [NSBundle class])
|
||||
{
|
||||
|
@ -992,9 +993,10 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
*/
|
||||
+ (NSBundle *) bundleForClass: (Class)aClass
|
||||
{
|
||||
void* key;
|
||||
NSBundle* bundle;
|
||||
void *key;
|
||||
NSBundle *bundle;
|
||||
NSMapEnumerator enumerate;
|
||||
|
||||
if (!aClass)
|
||||
return nil;
|
||||
|
||||
|
@ -1004,7 +1006,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
while (NSNextMapEnumeratorPair(&enumerate, &key, (void **)&bundle))
|
||||
{
|
||||
int i, j;
|
||||
NSArray *bundleClasses = [bundle _bundleClasses];
|
||||
NSArray *bundleClasses = bundle->_bundleClasses;
|
||||
BOOL found = NO;
|
||||
|
||||
j = [bundleClasses count];
|
||||
|
@ -1020,13 +1022,51 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
bundle = nil;
|
||||
}
|
||||
[load_lock unlock];
|
||||
if (!bundle)
|
||||
|
||||
if (bundle == nil)
|
||||
{
|
||||
/* Is it in the main bundle? */
|
||||
/* Is it in the main bundle or a library? */
|
||||
if (class_is_class(aClass))
|
||||
bundle = [self mainBundle];
|
||||
{
|
||||
NSString *lib;
|
||||
|
||||
/*
|
||||
* Take the path to the binary containing the class and
|
||||
* convert it to the format for a library name as used
|
||||
* for obtaining a library resource bundle.
|
||||
*/
|
||||
lib = objc_get_symbol_path (aClass, NULL);
|
||||
if ([lib isEqual: ExecutablePath()] == YES)
|
||||
{
|
||||
lib = nil; // In program, not library.
|
||||
}
|
||||
|
||||
/*
|
||||
* Get the library bundle ... if there wasn't one
|
||||
* then we will assume the class was in the program
|
||||
* executable and return the mainBundle instead.
|
||||
*/
|
||||
bundle = [NSBundle bundleForLibrary: lib];
|
||||
if (bundle == nil)
|
||||
{
|
||||
bundle = [self mainBundle];
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the class to the list of classes known to be in
|
||||
* the library or executable. We didn't find it there
|
||||
* to start with, so we know it's safe to add now.
|
||||
*/
|
||||
if (bundle->_bundleClasses == nil)
|
||||
{
|
||||
bundle->_bundleClasses
|
||||
= [[NSMutableArray alloc] initWithCapacity: 2];
|
||||
}
|
||||
[bundle->_bundleClasses addObject:
|
||||
[NSValue valueWithNonretainedObject: aClass]];
|
||||
}
|
||||
}
|
||||
[load_lock unlock];
|
||||
|
||||
return bundle;
|
||||
}
|
||||
|
@ -1132,7 +1172,13 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) bundlePath
|
||||
- (NSString*) description
|
||||
{
|
||||
return [[super description] stringByAppendingFormat:
|
||||
@" <%@>%@", [self bundlePath], [self isLoaded] ? @" (loaded)" : @""];
|
||||
}
|
||||
|
||||
- (NSString*) bundlePath
|
||||
{
|
||||
return _path;
|
||||
}
|
||||
|
@ -1162,6 +1208,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
BOOL found = NO;
|
||||
|
||||
theClass = NSClassFromString(className);
|
||||
[load_lock lock];
|
||||
j = [_bundleClasses count];
|
||||
|
||||
for (i = 0; i < j && found == NO; i++)
|
||||
|
@ -1173,6 +1220,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
found = YES;
|
||||
}
|
||||
}
|
||||
[load_lock unlock];
|
||||
|
||||
if (found == NO)
|
||||
{
|
||||
|
@ -1185,39 +1233,38 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
- (Class) principalClass
|
||||
{
|
||||
NSString* class_name;
|
||||
NSString *class_name;
|
||||
|
||||
if (_principalClass)
|
||||
{
|
||||
return _principalClass;
|
||||
}
|
||||
|
||||
class_name = [[self infoDictionary] objectForKey: @"NSPrincipalClass"];
|
||||
|
||||
if (self == _mainBundle || self == _gnustep_bundle)
|
||||
{
|
||||
_codeLoaded = YES;
|
||||
if (class_name)
|
||||
{
|
||||
_principalClass = NSClassFromString(class_name);
|
||||
}
|
||||
return _principalClass;
|
||||
}
|
||||
|
||||
if ([self load] == NO)
|
||||
{
|
||||
return Nil;
|
||||
}
|
||||
|
||||
class_name = [[self infoDictionary] objectForKey: @"NSPrincipalClass"];
|
||||
|
||||
if (class_name)
|
||||
{
|
||||
_principalClass = NSClassFromString(class_name);
|
||||
}
|
||||
|
||||
if (!_principalClass && [_bundleClasses count])
|
||||
else if (self == _gnustep_bundle)
|
||||
{
|
||||
_principalClass = [[_bundleClasses objectAtIndex: 0]
|
||||
nonretainedObjectValue];
|
||||
_principalClass = [NSObject class];
|
||||
}
|
||||
|
||||
if (_principalClass == nil)
|
||||
{
|
||||
[load_lock lock];
|
||||
if (_principalClass == nil && [_bundleClasses count] > 0)
|
||||
{
|
||||
_principalClass = [[_bundleClasses objectAtIndex: 0]
|
||||
nonretainedObjectValue];
|
||||
}
|
||||
[load_lock unlock];
|
||||
}
|
||||
return _principalClass;
|
||||
}
|
||||
|
@ -1232,11 +1279,12 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
- (BOOL) load
|
||||
{
|
||||
if (self == _mainBundle || self == _gnustep_bundle)
|
||||
if (self == _mainBundle || self ->_bundleType == NSBUNDLE_LIBRARY)
|
||||
{
|
||||
_codeLoaded = YES;
|
||||
return YES;
|
||||
}
|
||||
|
||||
[load_lock lock];
|
||||
|
||||
if (!_codeLoaded)
|
||||
|
@ -1253,7 +1301,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return NO;
|
||||
}
|
||||
_loadingBundle = self;
|
||||
_bundleClasses = RETAIN([NSMutableArray arrayWithCapacity: 2]);
|
||||
_bundleClasses = [[NSMutableArray alloc] initWithCapacity: 2];
|
||||
_loadingFrameworks = RETAIN([NSMutableArray arrayWithCapacity: 2]);
|
||||
|
||||
/* This code is executed twice if a class linked in the bundle call a
|
||||
|
@ -1295,8 +1343,8 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
classEnumerator = [_bundleClasses objectEnumerator];
|
||||
while ((class = [classEnumerator nextObject]) != nil)
|
||||
{
|
||||
[classNames addObject: NSStringFromClass([class
|
||||
nonretainedObjectValue])];
|
||||
[classNames addObject:
|
||||
NSStringFromClass([class nonretainedObjectValue])];
|
||||
}
|
||||
|
||||
[load_lock unlock];
|
||||
|
@ -1615,7 +1663,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return dict;
|
||||
}
|
||||
|
||||
- (NSArray *)localizations
|
||||
- (NSArray *) localizations
|
||||
{
|
||||
NSString *locale;
|
||||
NSArray *localizations;
|
||||
|
@ -1633,7 +1681,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return [array makeImmutableCopyOnFail: NO];
|
||||
}
|
||||
|
||||
- (NSArray *)preferredLocalizations
|
||||
- (NSArray *) preferredLocalizations
|
||||
{
|
||||
return [NSBundle preferredLocalizationsFromArray: [self localizations]];
|
||||
}
|
||||
|
@ -1796,6 +1844,10 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
{
|
||||
return ExecutablePath();
|
||||
}
|
||||
if (self->_bundleType == NSBUNDLE_LIBRARY)
|
||||
{
|
||||
return objc_get_symbol_path ([self principalClass], NULL);
|
||||
}
|
||||
object = [[self infoDictionary] objectForKey: @"NSExecutable"];
|
||||
if (object == nil || [object length] == 0)
|
||||
{
|
||||
|
@ -1884,7 +1936,7 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
return _infoDict;
|
||||
}
|
||||
|
||||
- (NSString *)builtInPlugInsPath
|
||||
- (NSString *) builtInPlugInsPath
|
||||
{
|
||||
NSString *version = _frameworkVersion;
|
||||
|
||||
|
@ -1907,17 +1959,17 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
}
|
||||
}
|
||||
|
||||
- (NSString *)bundleIdentifier
|
||||
- (NSString*) bundleIdentifier
|
||||
{
|
||||
return [[self infoDictionary] objectForKey:@"CFBundleIdentifier"];
|
||||
}
|
||||
|
||||
- (unsigned)bundleVersion
|
||||
- (unsigned) bundleVersion
|
||||
{
|
||||
return _version;
|
||||
}
|
||||
|
||||
- (void)setBundleVersion:(unsigned)version
|
||||
- (void) setBundleVersion: (unsigned)version
|
||||
{
|
||||
_version = version;
|
||||
}
|
||||
|
@ -1926,11 +1978,30 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
@implementation NSBundle (GNUstep)
|
||||
|
||||
/** Return a bundle which accesses the first existing directory from the list
|
||||
GNUSTEP_USER_ROOT/Libraries/Resources/libraryName/
|
||||
GNUSTEP_NETWORK_ROOT/Libraries/Resources/libraryName/
|
||||
GNUSTEP_LOCAL_ROOT/Libraries/Resources/libraryName/
|
||||
GNUSTEP_SYSTEM_ROOT/Libraries/Resources/libraryName/
|
||||
/**
|
||||
* <p>Return a bundle which accesses the first existing directory from the list
|
||||
* GNUSTEP_USER_ROOT/Libraries/Resources/libraryName/
|
||||
* GNUSTEP_NETWORK_ROOT/Libraries/Resources/libraryName/
|
||||
* GNUSTEP_LOCAL_ROOT/Libraries/Resources/libraryName/
|
||||
* GNUSTEP_SYSTEM_ROOT/Libraries/Resources/libraryName/<br />
|
||||
* Where libraryName is the name of a library without the <em>lib</em>
|
||||
* prefix or any extensions.
|
||||
* </p>
|
||||
* <p>This method exists to provide resource bundles for libraries and hos no
|
||||
* particular relationship to the library code itsself. The named library
|
||||
* could be a dynamic library linked in to the running program, a static
|
||||
* library (whose code may not even exist on the host machine except where
|
||||
* it is linked in to the program), or even a library which is not linked
|
||||
* into the program at all (eg. where you want to share resources provided
|
||||
* for a library you do not actually use).
|
||||
* </p>
|
||||
* <p>The bundle for the library <em>gnustep-base</em> is a special case ...
|
||||
* for this bundle the -principalClass method returns [NSObject] and the
|
||||
* -executablePath method returns the path to the gnustep-base dynamic
|
||||
* library (if it can be found). As a general rule, library bundles are
|
||||
* not guaranteed to return values for these methods as the library may
|
||||
* not exist on disk.
|
||||
* </p>
|
||||
*/
|
||||
+ (NSBundle *) bundleForLibrary: (NSString *)libraryName
|
||||
{
|
||||
|
@ -1940,7 +2011,32 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
NSString *tail;
|
||||
NSFileManager *fm = [NSFileManager defaultManager];
|
||||
|
||||
if (libraryName == nil)
|
||||
/*
|
||||
* Eliminate any base path or extensions.
|
||||
*/
|
||||
libraryName = [libraryName lastPathComponent];
|
||||
do
|
||||
{
|
||||
libraryName = [libraryName stringByDeletingPathExtension];
|
||||
}
|
||||
while ([[libraryName pathExtension] length] > 0);
|
||||
/*
|
||||
* Discard leading 'lib'
|
||||
*/
|
||||
if ([libraryName hasPrefix: @"lib"] == YES)
|
||||
{
|
||||
libraryName = [libraryName substringFromIndex: 3];
|
||||
}
|
||||
/*
|
||||
* Discard debug/profile library suffix
|
||||
*/
|
||||
if ([libraryName hasSuffix: @"_d"] == YES
|
||||
|| [libraryName hasSuffix: @"_p"] == YES)
|
||||
{
|
||||
libraryName = [libraryName substringToIndex: [libraryName length] - 3];
|
||||
}
|
||||
|
||||
if ([libraryName length] == 0)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
@ -1958,7 +2054,13 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory)
|
|||
|
||||
if ([fm fileExistsAtPath: path isDirectory: &isDir] && isDir)
|
||||
{
|
||||
return [self bundleWithPath: path];
|
||||
NSBundle *b = [self bundleWithPath: path];
|
||||
|
||||
if (b != nil && b->_bundleType == NSBUNDLE_BUNDLE)
|
||||
{
|
||||
b->_bundleType = NSBUNDLE_LIBRARY;
|
||||
}
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ GSTime(int day, int month, int year, int hour, int minute, int second, int mil)
|
|||
a += hour * 3600;
|
||||
a += minute * 60;
|
||||
a += second;
|
||||
a += mil/1000.0;
|
||||
a += ((NSTimeInterval)mil)/1000.0;
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ GSBreakTime(NSTimeInterval when, int *year, int *month, int *day,
|
|||
m = m * 60;
|
||||
c = a - h - m;
|
||||
*second = (int)c;
|
||||
*mil = (int)((a - h - m - c) * 1000.0);
|
||||
*mil = (int)((a - h - m - c) * 1000.0 + 0.5);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1277,7 +1277,7 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
timeZone: tz];
|
||||
if (self != nil)
|
||||
{
|
||||
_seconds_since_ref += ((float)milliseconds) / 1000.0;
|
||||
_seconds_since_ref += ((NSTimeInterval)milliseconds) / 1000.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1897,7 +1897,8 @@ static void Grow(DescriptionInfo *info, unsigned size)
|
|||
s -= (_seconds_since_ref + offset(_time_zone, self));
|
||||
s = fabs(s);
|
||||
s -= floor(s);
|
||||
v = (int)(s * 1000.0);
|
||||
s *= 1000.0;
|
||||
v = (int)(s + 0.5);
|
||||
}
|
||||
Grow(info, 3);
|
||||
info->t[info->offset+2] = (v%10) + '0';
|
||||
|
|
|
@ -18,21 +18,530 @@
|
|||
|
||||
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.
|
||||
|
||||
$Date$ $Revision$
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "GNUstepBase/preface.h"
|
||||
#include <Foundation/NSDebug.h>
|
||||
#include <Foundation/NSBundle.h>
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSString.h"
|
||||
#include "Foundation/NSArray.h"
|
||||
#include "Foundation/NSCoder.h"
|
||||
#include "Foundation/NSNull.h"
|
||||
#include "Foundation/NSThread.h"
|
||||
#include "Foundation/NSDictionary.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* Turn off STACKTRACE if we don't have bfd support for it.
|
||||
*/
|
||||
#if !(defined(HAVE_BFD_H) && defined(HAVE_LIBBFD) && defined(HAVE_LIBIBERTY))
|
||||
#if defined(STACKTRACE)
|
||||
#undef STACKTRACE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(STACKTRACE)
|
||||
|
||||
// GSStackTrace inspired by FYStackTrace.m
|
||||
// created by Wim Oudshoorn on Mon 11-Apr-2006
|
||||
// reworked by Lloyd Dupont @ NovaMind.com on 4-May-2006
|
||||
|
||||
#include <bfd.h>
|
||||
|
||||
@class GSBinaryFileInfo;
|
||||
|
||||
@interface GSFunctionInfo : NSObject
|
||||
{
|
||||
void *_address;
|
||||
NSString *_fileName;
|
||||
NSString *_functionName;
|
||||
int _lineNo;
|
||||
GSBinaryFileInfo *_module;
|
||||
}
|
||||
- (void*) address;
|
||||
- (NSString *) fileName;
|
||||
- (NSString *) function;
|
||||
- (id) initWithModule: (GSBinaryFileInfo*)module
|
||||
address: (void*)address
|
||||
file: (NSString*)file
|
||||
function: (NSString*)function
|
||||
line: (int)lineNo;
|
||||
- (int) lineNumber;
|
||||
- (GSBinaryFileInfo*) module;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface GSBinaryFileInfo : NSObject
|
||||
{
|
||||
NSString *_filename;
|
||||
bfd *_abfd;
|
||||
asymbol **_symbols;
|
||||
long _symbolCount;
|
||||
}
|
||||
- (NSString *) filename;
|
||||
- (GSFunctionInfo *) functionForAddress: (void*) address;
|
||||
- (id) initWithBinaryFile: (NSString *)filename;
|
||||
- (id) init; // return info for the current executing process
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface GSStackTrace : NSObject
|
||||
{
|
||||
NSMutableArray *frames;
|
||||
}
|
||||
+ (GSStackTrace*) currentStack;
|
||||
/*
|
||||
* Add some module information to the stack trace information
|
||||
* only symbols from the current process's file, GNUstep base library,
|
||||
* GNUstep gui library, and any bundles containing code are loaded.
|
||||
* All other symbols should be manually added
|
||||
*/
|
||||
+ (BOOL) loadModule: (NSString *)filename;
|
||||
|
||||
- (NSString*) description;
|
||||
- (NSEnumerator*) enumerator;
|
||||
- (GSFunctionInfo*) frameAt: (unsigned)index;
|
||||
- (unsigned) frameCount;
|
||||
- (NSEnumerator*) reverseEnumerator;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation GSFunctionInfo
|
||||
|
||||
- (void*) address
|
||||
{
|
||||
return _address;
|
||||
}
|
||||
|
||||
- (oneway void) dealloc
|
||||
{
|
||||
[_module release];
|
||||
_module = nil;
|
||||
[_fileName release];
|
||||
_fileName = nil;
|
||||
[_functionName release];
|
||||
_functionName = nil;
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) description
|
||||
{
|
||||
return [NSString stringWithFormat: @"(%@: %p) %@ %@: %d",
|
||||
[_module filename], _address, _functionName, _fileName, _lineNo];
|
||||
}
|
||||
|
||||
- (NSString *) fileName
|
||||
{
|
||||
return _fileName;
|
||||
}
|
||||
|
||||
- (NSString *) function
|
||||
{
|
||||
return _functionName;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) initWithModule: (GSBinaryFileInfo*)module
|
||||
address: (void*)address
|
||||
file: (NSString*)file
|
||||
function: (NSString*)function
|
||||
line: (int)lineNo
|
||||
{
|
||||
_module = [module retain];
|
||||
_address = address;
|
||||
_fileName = [file retain];
|
||||
_functionName = [function retain];
|
||||
_lineNo = lineNo;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (int) lineNumber
|
||||
{
|
||||
return _lineNo;
|
||||
}
|
||||
|
||||
- (GSBinaryFileInfo *) module
|
||||
{
|
||||
return _module;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
|
||||
@implementation GSBinaryFileInfo
|
||||
|
||||
+ (GSBinaryFileInfo*) infoWithBinaryFile: (NSString *)filename
|
||||
{
|
||||
return [[[self alloc] initWithBinaryFile: filename] autorelease];
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
static BOOL first = YES;
|
||||
|
||||
if (first == NO)
|
||||
{
|
||||
return;
|
||||
}
|
||||
first = NO;
|
||||
bfd_init ();
|
||||
}
|
||||
|
||||
- (oneway void) dealloc
|
||||
{
|
||||
[_filename release];
|
||||
_filename = nil;
|
||||
if (_abfd)
|
||||
{
|
||||
bfd_close (_abfd);
|
||||
_abfd = NULL;
|
||||
}
|
||||
if (_symbols)
|
||||
{
|
||||
free (_symbols);
|
||||
_symbols = NULL;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) filename
|
||||
{
|
||||
return _filename;
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
NSString *processName;
|
||||
|
||||
processName = [[[NSProcessInfo processInfo] arguments] objectAtIndex: 0];
|
||||
return [self initWithBinaryFile: processName];
|
||||
}
|
||||
|
||||
- (id) initWithBinaryFile: (NSString *)filename
|
||||
{
|
||||
int neededSpace;
|
||||
|
||||
// 1st initialize the bfd
|
||||
if ([filename length] == 0)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: No File");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
_filename = [filename copy];
|
||||
_abfd = bfd_openr ([filename cString], NULL);
|
||||
if (!_abfd)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: No Binary Info");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
if (!bfd_check_format_matches (_abfd, bfd_object, NULL))
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: BFD format object error");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
// second read the symbols from it
|
||||
if (!(bfd_get_file_flags (_abfd) & HAS_SYMS))
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: BFD does not contain any symbols");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
neededSpace = bfd_get_symtab_upper_bound (_abfd);
|
||||
if (neededSpace < 0)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: BFD error while deducing needed space");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
if (neededSpace == 0)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: BFD no space for symbols needed");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
_symbols = malloc (neededSpace);
|
||||
if (!_symbols)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: Can't malloc buffer");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
_symbolCount = bfd_canonicalize_symtab (_abfd, _symbols);
|
||||
if (_symbolCount < 0)
|
||||
{
|
||||
NSLog (@"GSBinaryFileInfo: BFD error while reading symbols");
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
struct SearchAddressStruct
|
||||
{
|
||||
void *theAddress;
|
||||
GSBinaryFileInfo *module;
|
||||
asymbol **symbols;
|
||||
GSFunctionInfo *theInfo;
|
||||
};
|
||||
|
||||
static void find_address (bfd *abfd, asection *section,
|
||||
struct SearchAddressStruct *info)
|
||||
{
|
||||
bfd_vma address;
|
||||
bfd_vma vma;
|
||||
unsigned size;
|
||||
const char *fileName;
|
||||
const char *functionName;
|
||||
unsigned line = 0;
|
||||
|
||||
if (info->theInfo)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!(bfd_get_section_flags (abfd, section) & SEC_ALLOC))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
address = (bfd_vma) info->theAddress;
|
||||
|
||||
vma = bfd_get_section_vma (abfd, section);
|
||||
size = bfd_get_section_size (section);
|
||||
if (address < vma || address >= vma + size)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (bfd_find_nearest_line (abfd, section, info->symbols,
|
||||
address - vma, &fileName, &functionName, &line))
|
||||
{
|
||||
GSFunctionInfo *fi;
|
||||
|
||||
fi = [GSFunctionInfo alloc];
|
||||
fi = [fi initWithModule: info->module
|
||||
address: info->theAddress
|
||||
file: [NSString stringWithCString: fileName]
|
||||
function: [NSString stringWithCString: functionName]
|
||||
line: line];
|
||||
[fi autorelease];
|
||||
info->theInfo = fi;
|
||||
}
|
||||
}
|
||||
|
||||
- (GSFunctionInfo *) functionForAddress: (void*) address
|
||||
{
|
||||
struct SearchAddressStruct searchInfo = { address, self, _symbols, nil };
|
||||
|
||||
bfd_map_over_sections (_abfd,
|
||||
(void (*) (bfd *, asection *, void *)) find_address, &searchInfo);
|
||||
return searchInfo.theInfo;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
// this method automatically load the current process + GNUstep base & gui.
|
||||
static NSMutableDictionary *GetStackModules()
|
||||
{
|
||||
static NSMutableDictionary *stackModules = nil;
|
||||
|
||||
if (stackModules == nil)
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSBundle *bundle;
|
||||
|
||||
stackModules = [NSMutableDictionary new];
|
||||
|
||||
/*
|
||||
* Try to ensure we have the main, base and gui library bundles.
|
||||
*/
|
||||
[NSBundle mainBundle];
|
||||
[NSBundle bundleForClass: [NSObject class]];
|
||||
[NSBundle bundleForClass: NSClassFromString(@"NSView")];
|
||||
|
||||
/*
|
||||
* Add file info for all bundles with code.
|
||||
*/
|
||||
enumerator = [[NSBundle allBundles] objectEnumerator];
|
||||
while ((bundle = [enumerator nextObject]) != nil)
|
||||
{
|
||||
if ([bundle load] == YES)
|
||||
{
|
||||
[GSStackTrace loadModule: [bundle executablePath]];
|
||||
}
|
||||
}
|
||||
}
|
||||
return stackModules;
|
||||
}
|
||||
|
||||
@implementation GSStackTrace : NSObject
|
||||
|
||||
static NSNull *null = nil;
|
||||
|
||||
+ (GSStackTrace*) currentStack
|
||||
{
|
||||
return [[[GSStackTrace alloc] init] autorelease];
|
||||
}
|
||||
|
||||
+ (void) initialize
|
||||
{
|
||||
null = RETAIN([NSNull null]);
|
||||
}
|
||||
|
||||
// initialize stack trace info
|
||||
+ (BOOL) loadModule: (NSString *)filename
|
||||
{
|
||||
if ([filename length] > 0)
|
||||
{
|
||||
NSMutableDictionary *modules = GetStackModules();
|
||||
|
||||
if ([modules objectForKey: filename] == nil)
|
||||
{
|
||||
GSBinaryFileInfo *module;
|
||||
|
||||
module = [GSBinaryFileInfo infoWithBinaryFile: filename];
|
||||
if (module != nil)
|
||||
{
|
||||
[modules setObject: module forKey: filename];
|
||||
}
|
||||
else
|
||||
{
|
||||
[modules setObject: null forKey: filename];
|
||||
}
|
||||
}
|
||||
if ([modules objectForKey: filename] != null)
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (oneway void) dealloc
|
||||
{
|
||||
[frames release];
|
||||
frames = nil;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
NSMutableString *result = [NSMutableString string];
|
||||
int i;
|
||||
int n;
|
||||
|
||||
n = [frames count];
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
GSFunctionInfo *line = [frames objectAtIndex: i];
|
||||
|
||||
[result appendFormat: @"%3d: %@\n", i, line];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
- (NSEnumerator*) enumerator
|
||||
{
|
||||
return [frames objectEnumerator];
|
||||
}
|
||||
|
||||
- (GSFunctionInfo*) frameAt: (unsigned)index
|
||||
{
|
||||
return [frames objectAtIndex: index];
|
||||
}
|
||||
|
||||
- (unsigned) frameCount
|
||||
{
|
||||
return [frames count];
|
||||
}
|
||||
|
||||
// grab the current stack
|
||||
// this MAX_FRAME comes from NSDebug.h which warn only 100 frames are available
|
||||
#define MAX_FRAME 100
|
||||
- (id) init
|
||||
{
|
||||
NSArray *modules;
|
||||
int i;
|
||||
int j;
|
||||
int n;
|
||||
int m;
|
||||
|
||||
frames = [[NSMutableArray alloc] init];
|
||||
modules = [GetStackModules() allValues];
|
||||
n = NSCountFrames();
|
||||
m = [modules count];
|
||||
|
||||
for (i = 0; i < n && i < MAX_FRAME; i++)
|
||||
{
|
||||
GSFunctionInfo *aFrame = nil;
|
||||
void *address = NSReturnAddress(i);
|
||||
|
||||
for (j = 0; j < m; j++)
|
||||
{
|
||||
GSBinaryFileInfo *bfi = [modules objectAtIndex: j];
|
||||
|
||||
if ((id)bfi != (id)null)
|
||||
{
|
||||
aFrame = [bfi functionForAddress: address];
|
||||
if (aFrame)
|
||||
{
|
||||
[frames addObject: aFrame];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// not found (?!), add an 'unknown' function
|
||||
if (!aFrame)
|
||||
{
|
||||
aFrame = [GSFunctionInfo alloc];
|
||||
[aFrame initWithModule: nil
|
||||
address: address
|
||||
file: nil
|
||||
function: nil
|
||||
line: 0];
|
||||
[aFrame autorelease];
|
||||
[frames addObject: aFrame];
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (NSEnumerator*) reverseEnumerator
|
||||
{
|
||||
return [frames reverseObjectEnumerator];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif /* STACKTRACE */
|
||||
|
||||
|
||||
|
||||
|
||||
NSString* const NSGenericException
|
||||
= @"NSGenericException";
|
||||
|
||||
|
@ -141,9 +650,37 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
|||
|
||||
- (void) raise
|
||||
{
|
||||
#ifndef _NATIVE_OBJC_EXCEPTIONS
|
||||
NSThread *thread;
|
||||
NSHandler *handler;
|
||||
#endif
|
||||
|
||||
#if defined(STACKTRACE)
|
||||
if ([_e_info objectForKey: @"GSStackTraceKey"] == nil)
|
||||
{
|
||||
NSMutableDictionary *m;
|
||||
|
||||
if (_e_info == nil)
|
||||
{
|
||||
_e_info = m = [NSMutableDictionary new];
|
||||
}
|
||||
else if ([_e_info isKindOfClass: [NSMutableDictionary class]] == YES)
|
||||
{
|
||||
m = (NSMutableDictionary*)_e_info;
|
||||
}
|
||||
else
|
||||
{
|
||||
m = [_e_info mutableCopy];
|
||||
RELEASE(_e_info);
|
||||
_e_info = m;
|
||||
}
|
||||
[m setObject: [GSStackTrace currentStack] forKey: @"GSStackTraceKey"];
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _NATIVE_OBJC_EXCEPTIONS
|
||||
@throw self;
|
||||
#else
|
||||
thread = GSCurrentThread();
|
||||
handler = thread->_exception_handler;
|
||||
if (handler == NULL)
|
||||
|
@ -185,6 +722,7 @@ _NSFoundationUncaughtExceptionHandler (NSException *exception)
|
|||
thread->_exception_handler = handler->next;
|
||||
handler->exception = self;
|
||||
longjmp(handler->jumpState, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
- (NSString*) name
|
||||
|
|
|
@ -341,6 +341,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
if ([self methodForSelector: @selector(handleTakeValue:forUnboundKey:)] != o)
|
||||
{
|
||||
[self handleTakeValue: anObject forUnboundKey: aKey];
|
||||
return;
|
||||
}
|
||||
|
||||
dict = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
|
@ -624,7 +625,7 @@ static id ValueForKey(NSObject *self, const char *key, unsigned size)
|
|||
NSNull *null = [NSNull null];
|
||||
NSString *key;
|
||||
|
||||
GSOnceMLog(@"This method is deprecated, use -setValue:forKeyPath:");
|
||||
GSOnceMLog(@"This method is deprecated, use -setValuesForKeysWithDictionary:");
|
||||
while ((key = [enumerator nextObject]) != nil)
|
||||
{
|
||||
id obj = [aDictionary objectForKey: key];
|
||||
|
|
|
@ -45,6 +45,11 @@
|
|||
#include <Foundation/NSKeyedArchiver.h>
|
||||
#undef _IN_NSKEYEDUNARCHIVER_M
|
||||
|
||||
@interface NilMarker: NSObject
|
||||
@end
|
||||
@implementation NilMarker
|
||||
@end
|
||||
|
||||
/**
|
||||
* An unarchiving error has occurred.
|
||||
*/
|
||||
|
@ -247,7 +252,7 @@ static NSMapTable globalClassMap = 0;
|
|||
|
||||
if (obj == nil)
|
||||
{
|
||||
// Record NSNull marker for decoded object.
|
||||
// Record NilMarker for decoded object.
|
||||
o = GSIArrayItemAtIndex(_objMap, 0).obj;
|
||||
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)o, index);
|
||||
}
|
||||
|
@ -793,7 +798,7 @@ static NSMapTable globalClassMap = 0;
|
|||
count = [_objects count];
|
||||
GSIArrayInitWithZoneAndCapacity(_objMap, _zone, count);
|
||||
// Add marker for nil object
|
||||
GSIArrayAddItem(_objMap, (GSIArrayItem)((id)[NSNull null]));
|
||||
GSIArrayAddItem(_objMap, (GSIArrayItem)((id)[NilMarker class]));
|
||||
// Add markers for unencoded objects.
|
||||
for (i = 1; i < count; i++)
|
||||
{
|
||||
|
|
1867
Source/NSPredicate.m
Normal file
1867
Source/NSPredicate.m
Normal file
File diff suppressed because it is too large
Load diff
|
@ -267,69 +267,68 @@ _gnu_process_args(int argc, char *argv[], char *env[])
|
|||
_gnu_processName = [arg0 lastPathComponent];
|
||||
IF_NO_GC(RETAIN(_gnu_processName));
|
||||
|
||||
|
||||
/* Copy the argument list */
|
||||
if (argv)
|
||||
{
|
||||
NSString *str;
|
||||
NSMutableSet *mySet;
|
||||
id obj_argv[argc];
|
||||
int added = 1;
|
||||
|
||||
mySet = [NSMutableSet new];
|
||||
|
||||
/* Copy the zero'th argument to the argument list */
|
||||
obj_argv[0] = arg0;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
str = [NSString stringWithCString: argv[i]];
|
||||
|
||||
if ([str hasPrefix: @"--GNU-Debug="])
|
||||
[mySet addObject: [str substringFromIndex: 12]];
|
||||
else
|
||||
obj_argv[added++] = str;
|
||||
}
|
||||
|
||||
IF_NO_GC(RELEASE(_gnu_arguments));
|
||||
_gnu_arguments = [[NSArray alloc] initWithObjects: obj_argv count: added];
|
||||
IF_NO_GC(RELEASE(_debug_set));
|
||||
_debug_set = mySet;
|
||||
RELEASE(arg0);
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
// It appears that in some versions of mingw32 __argv is no longer supported
|
||||
// However GetCommandLine always works. Perhaps this should be the default case
|
||||
// as it is unicode.
|
||||
else
|
||||
{
|
||||
unichar **argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
NSString *str;
|
||||
NSMutableSet *mySet;
|
||||
id obj_argv[argc];
|
||||
int added = 1;
|
||||
|
||||
mySet = [NSMutableSet new];
|
||||
|
||||
/* Copy the zero'th argument to the argument list */
|
||||
obj_argv[0] = arg0;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
str = [NSString stringWithCharacters: argvw[i] length: wcslen(argvw[i])];
|
||||
if ([str hasPrefix: @"--GNU-Debug="])
|
||||
[mySet addObject: [str substringFromIndex: 12]];
|
||||
else
|
||||
obj_argv[added++] = str;
|
||||
}
|
||||
|
||||
IF_NO_GC(RELEASE(_gnu_arguments));
|
||||
_gnu_arguments = [[NSArray alloc] initWithObjects: obj_argv count: added];
|
||||
IF_NO_GC(RELEASE(_debug_set));
|
||||
_debug_set = mySet;
|
||||
RELEASE(arg0);
|
||||
}
|
||||
{
|
||||
unichar **argvw = CommandLineToArgvW(GetCommandLineW(), &argc);
|
||||
NSString *str;
|
||||
NSMutableSet *mySet;
|
||||
id obj_argv[argc];
|
||||
int added = 1;
|
||||
|
||||
mySet = [NSMutableSet new];
|
||||
|
||||
/* Copy the zero'th argument to the argument list */
|
||||
obj_argv[0] = arg0;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
str = [NSString stringWithCharacters: argvw[i] length: wcslen(argvw[i])];
|
||||
if ([str hasPrefix: @"--GNU-Debug="])
|
||||
{
|
||||
[mySet addObject: [str substringFromIndex: 12]];
|
||||
}
|
||||
else
|
||||
{
|
||||
obj_argv[added++] = str;
|
||||
}
|
||||
}
|
||||
|
||||
IF_NO_GC(RELEASE(_gnu_arguments));
|
||||
_gnu_arguments = [[NSArray alloc] initWithObjects: obj_argv count: added];
|
||||
IF_NO_GC(RELEASE(_debug_set));
|
||||
_debug_set = mySet;
|
||||
RELEASE(arg0);
|
||||
}
|
||||
#else
|
||||
if (argv)
|
||||
{
|
||||
NSString *str;
|
||||
NSMutableSet *mySet;
|
||||
id obj_argv[argc];
|
||||
int added = 1;
|
||||
|
||||
mySet = [NSMutableSet new];
|
||||
|
||||
/* Copy the zero'th argument to the argument list */
|
||||
obj_argv[0] = arg0;
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
str = [NSString stringWithCString: argv[i]];
|
||||
|
||||
if ([str hasPrefix: @"--GNU-Debug="])
|
||||
[mySet addObject: [str substringFromIndex: 12]];
|
||||
else
|
||||
obj_argv[added++] = str;
|
||||
}
|
||||
|
||||
IF_NO_GC(RELEASE(_gnu_arguments));
|
||||
_gnu_arguments = [[NSArray alloc] initWithObjects: obj_argv count: added];
|
||||
IF_NO_GC(RELEASE(_debug_set));
|
||||
_debug_set = mySet;
|
||||
RELEASE(arg0);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Copy the evironment list */
|
||||
|
|
|
@ -23,10 +23,11 @@
|
|||
|
||||
#include "Foundation/NSSortDescriptor.h"
|
||||
|
||||
#include "Foundation/NSString.h"
|
||||
#include "Foundation/NSBundle.h"
|
||||
#include "Foundation/NSCoder.h"
|
||||
#include "Foundation/NSException.h"
|
||||
#include "Foundation/NSBundle.h"
|
||||
#include "Foundation/NSKeyValueCoding.h"
|
||||
#include "Foundation/NSString.h"
|
||||
|
||||
@implementation NSSortDescriptor
|
||||
|
||||
|
@ -89,8 +90,8 @@
|
|||
- (NSComparisonResult) compareObject: (id) object1 toObject: (id) object2
|
||||
{
|
||||
NSComparisonResult result;
|
||||
id comparedKey1 = [object1 valueForKey: _key],
|
||||
comparedKey2 = [object2 valueForKey: _key];
|
||||
id comparedKey1 = [object1 valueForKeyPath: _key],
|
||||
comparedKey2 = [object2 valueForKeyPath: _key];
|
||||
|
||||
result = (NSComparisonResult) [comparedKey1 performSelector: _selector
|
||||
withObject: comparedKey2];
|
||||
|
|
|
@ -43,6 +43,11 @@
|
|||
Limited choice of default encodings.
|
||||
*/
|
||||
|
||||
/* Needed for visiblity of fwprintf prototype. */
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
|
|
@ -410,7 +410,7 @@ static void unescape(const char *from, char * to)
|
|||
{
|
||||
c = *from - '0';
|
||||
}
|
||||
else if (*from <= 'A')
|
||||
else if (*from <= 'F')
|
||||
{
|
||||
c = *from - 'A' + 10;
|
||||
}
|
||||
|
@ -433,7 +433,7 @@ static void unescape(const char *from, char * to)
|
|||
{
|
||||
c |= *from - '0';
|
||||
}
|
||||
else if (*from <= 'A')
|
||||
else if (*from <= 'F')
|
||||
{
|
||||
c |= *from - 'A' + 10;
|
||||
}
|
||||
|
|
|
@ -15,5 +15,7 @@ int main ()
|
|||
int ival = 3;
|
||||
*(short *)(buf+1) = sval;
|
||||
*(int *)(buf+1) = ival;
|
||||
buf[0] = 0;
|
||||
puts (buf); /* force compiler not to optimise out the above assignments */
|
||||
exit (0);
|
||||
}
|
||||
|
|
299
configure
vendored
299
configure
vendored
|
@ -9693,6 +9693,305 @@ fi
|
|||
done
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These headers/functions needed for stacktrace in NSException.m
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
for ac_header in bfd.h
|
||||
do
|
||||
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
else
|
||||
# Is the header compilable?
|
||||
echo "$as_me:$LINENO: checking $ac_header usability" >&5
|
||||
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
$ac_includes_default
|
||||
#include <$ac_header>
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_header_compiler=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_compiler=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
|
||||
echo "${ECHO_T}$ac_header_compiler" >&6
|
||||
|
||||
# Is the header present?
|
||||
echo "$as_me:$LINENO: checking $ac_header presence" >&5
|
||||
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <$ac_header>
|
||||
_ACEOF
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
|
||||
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } >/dev/null; then
|
||||
if test -s conftest.err; then
|
||||
ac_cpp_err=$ac_c_preproc_warn_flag
|
||||
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
|
||||
else
|
||||
ac_cpp_err=
|
||||
fi
|
||||
else
|
||||
ac_cpp_err=yes
|
||||
fi
|
||||
if test -z "$ac_cpp_err"; then
|
||||
ac_header_preproc=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_header_preproc=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_ext
|
||||
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
|
||||
echo "${ECHO_T}$ac_header_preproc" >&6
|
||||
|
||||
# So? What about this header?
|
||||
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
|
||||
yes:no: )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
|
||||
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
|
||||
ac_header_preproc=yes
|
||||
;;
|
||||
no:yes:* )
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
|
||||
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
|
||||
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
|
||||
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
|
||||
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
|
||||
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
|
||||
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
|
||||
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
|
||||
(
|
||||
cat <<\_ASBOX
|
||||
## ------------------------------------------ ##
|
||||
## Report this to the AC_PACKAGE_NAME lists. ##
|
||||
## ------------------------------------------ ##
|
||||
_ASBOX
|
||||
) |
|
||||
sed "s/^/$as_me: WARNING: /" >&2
|
||||
;;
|
||||
esac
|
||||
echo "$as_me:$LINENO: checking for $ac_header" >&5
|
||||
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
|
||||
if eval "test \"\${$as_ac_Header+set}\" = set"; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
eval "$as_ac_Header=\$ac_header_preproc"
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
|
||||
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
|
||||
|
||||
fi
|
||||
if test `eval echo '${'$as_ac_Header'}'` = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for dyn_string_append in -liberty" >&5
|
||||
echo $ECHO_N "checking for dyn_string_append in -liberty... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_iberty_dyn_string_append+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-liberty $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char dyn_string_append ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
dyn_string_append ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_iberty_dyn_string_append=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_iberty_dyn_string_append=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_iberty_dyn_string_append" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_iberty_dyn_string_append" >&6
|
||||
if test $ac_cv_lib_iberty_dyn_string_append = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBIBERTY 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-liberty $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "$as_me:$LINENO: checking for bfd_openr in -lbfd" >&5
|
||||
echo $ECHO_N "checking for bfd_openr in -lbfd... $ECHO_C" >&6
|
||||
if test "${ac_cv_lib_bfd_bfd_openr+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lbfd $LIBS"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
builtin and then its argument prototype would still apply. */
|
||||
char bfd_openr ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
bfd_openr ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_cv_lib_bfd_bfd_openr=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_cv_lib_bfd_bfd_openr=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
LIBS=$ac_check_lib_save_LIBS
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ac_cv_lib_bfd_bfd_openr" >&5
|
||||
echo "${ECHO_T}$ac_cv_lib_bfd_bfd_openr" >&6
|
||||
if test $ac_cv_lib_bfd_bfd_openr = yes; then
|
||||
cat >>confdefs.h <<_ACEOF
|
||||
#define HAVE_LIBBFD 1
|
||||
_ACEOF
|
||||
|
||||
LIBS="-lbfd $LIBS"
|
||||
|
||||
fi
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These headers/functions needed by NSLog.m
|
||||
#--------------------------------------------------------------------
|
||||
|
|
|
@ -770,6 +770,13 @@ fi
|
|||
AC_CHECK_HEADERS(sys/socket.h netinet/in.h)
|
||||
dnl AC_REPLACE_FUNCS(recvfrom)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These headers/functions needed for stacktrace in NSException.m
|
||||
#--------------------------------------------------------------------
|
||||
AC_CHECK_HEADERS(bfd.h)
|
||||
AC_CHECK_LIB(iberty, dyn_string_append)
|
||||
AC_CHECK_LIB(bfd, bfd_openr)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# These headers/functions needed by NSLog.m
|
||||
#--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue