mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Based on patches by Philip Moetteli
<Philip.Moetteli@tele2.ch>. * Headers/Additions/GNUstepBase/GSCategories.h: Added NSKoreanEUCEncoding. * Headers/Additions/GNUstepBase/GSLock.h * Headers/Additions/GNUstepBase/GSLocale.h: Guard includes for NeXT_Foundation_LIBRARY. * Source/Additions/GSLock.m: Include GNUstepBase/GNUstep.h. * Headers/Additions/GNUstepBase/GSCategories.h * Headers/Foundation/NSString.h: (+[NSString stringWithFormat:arguments:]): Move declaration to GSCategories. * Source/NSString.m * Source/Additions/GSCategories.m: (+[NSString stringWithFormat:arguments:]): Move implementation to Additions. * macosx/config.h: Define HAVE_WCHAR_H. * macosx/gnustep.pbproj/project.pbxproj: Added GSLock files. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18072 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7050e421c7
commit
a3601643a6
10 changed files with 83 additions and 11 deletions
20
ChangeLog
20
ChangeLog
|
@ -1,3 +1,23 @@
|
|||
2003-11-10 David Ayers <d.ayers@inode.at>
|
||||
|
||||
Based on patches by Philip Moetteli <Philip.Moetteli@tele2.ch>.
|
||||
* Headers/Additions/GNUstepBase/GSCategories.h: Added
|
||||
NSKoreanEUCEncoding.
|
||||
* Headers/Additions/GNUstepBase/GSLock.h
|
||||
* Headers/Additions/GNUstepBase/GSLocale.h: Guard includes for
|
||||
NeXT_Foundation_LIBRARY.
|
||||
* Source/Additions/GSLock.m: Include GNUstepBase/GNUstep.h.
|
||||
* Headers/Additions/GNUstepBase/GSCategories.h
|
||||
* Headers/Foundation/NSString.h:
|
||||
(+[NSString stringWithFormat:arguments:]): Move declaration to
|
||||
GSCategories.
|
||||
* Source/NSString.m
|
||||
* Source/Additions/GSCategories.m:
|
||||
(+[NSString stringWithFormat:arguments:]): Move implementation to
|
||||
Additions.
|
||||
* macosx/config.h: Define HAVE_WCHAR_H.
|
||||
* macosx/gnustep.pbproj/project.pbxproj: Added GSLock files.
|
||||
|
||||
2003-11-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSUserDefaults.m: Only obtain distributed lock for reading
|
||||
|
|
|
@ -158,7 +158,8 @@ typedef enum _NSGNUstepStringEncoding
|
|||
NSGB2312StringEncoding = 56,
|
||||
NSUTF7StringEncoding = 64, // RFC 2152
|
||||
NSGSM0338StringEncoding, // GSM (mobile phone) default alphabet
|
||||
NSBIG5StringEncoding // Traditional chinese
|
||||
NSBIG5StringEncoding, // Traditional chinese
|
||||
NSKoreanEUCEncoding
|
||||
} NSGNUstepStringEncoding;
|
||||
|
||||
|
||||
|
@ -187,6 +188,8 @@ typedef enum _NSGNUstepStringEncoding
|
|||
@end
|
||||
|
||||
@interface NSString (GSCategories)
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
- (NSString*) stringByDeletingPrefix: (NSString*)prefix;
|
||||
- (NSString*) stringByDeletingSuffix: (NSString*)suffix;
|
||||
- (NSString*) stringByTrimmingLeadSpaces;
|
||||
|
|
|
@ -25,7 +25,12 @@
|
|||
#ifndef __GSLocale_H_
|
||||
#define __GSLocale_H_
|
||||
|
||||
#ifndef NeXT_Foundation_LIBRARY
|
||||
#include <Foundation/NSString.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
#include "GSObjCRuntime.h"
|
||||
|
||||
@class NSDictionary;
|
||||
|
||||
|
|
|
@ -27,7 +27,11 @@
|
|||
#ifndef INCLUDED_GS_LOCK_H
|
||||
#define INCLUDED_GS_LOCK_H
|
||||
|
||||
#ifndef NeXT_Foundation_LIBRARY
|
||||
#include <Foundation/NSLock.h>
|
||||
#else
|
||||
#include <Foundation/Foundation.h>
|
||||
#endif
|
||||
|
||||
@class NSNotification;
|
||||
|
||||
|
|
|
@ -251,8 +251,6 @@ enum {
|
|||
- (NSArray*) stringsByAppendingPaths: (NSArray*)paths;
|
||||
+ (NSString*) localizedStringWithFormat: (NSString*) format, ...;
|
||||
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
+ (id) stringWithString: (NSString*) aString;
|
||||
+ (id) stringWithContentsOfURL: (NSURL*)url;
|
||||
+ (id) stringWithUTF8String: (const char*)bytes;
|
||||
|
@ -372,6 +370,8 @@ extern struct objc_class _NSConstantStringClassReference;
|
|||
@end
|
||||
|
||||
@interface NSString (GSCategories)
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList;
|
||||
- (NSString*) stringByDeletingPrefix: (NSString*)prefix;
|
||||
- (NSString*) stringByDeletingSuffix: (NSString*)suffix;
|
||||
- (NSString*) stringByTrimmingLeadSpaces;
|
||||
|
|
|
@ -617,6 +617,16 @@ static void MD5Transform (unsigned long buf[4], unsigned long const in[16])
|
|||
*/
|
||||
@implementation NSString (GSCategories)
|
||||
|
||||
/**
|
||||
* Returns an autoreleased string initialized with -initWithFormat:arguments:.
|
||||
*/
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithFormat: format arguments: argList]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string formed by removing the prefix string from the
|
||||
* receiver. Raises an exception if the prefix is not present.
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSThread.h>
|
||||
#include "GNUstepBase/GSLock.h"
|
||||
#include "GNUstepBase/GNUstep.h"
|
||||
|
||||
/**
|
||||
* This implements a class which, when used in single-threaded mode,
|
||||
|
|
|
@ -563,14 +563,6 @@ handle_printf_atsign (FILE *stream,
|
|||
return ret;
|
||||
}
|
||||
|
||||
+ (id) stringWithFormat: (NSString*)format
|
||||
arguments: (va_list)argList
|
||||
{
|
||||
return AUTORELEASE([[self allocWithZone: NSDefaultMallocZone()]
|
||||
initWithFormat: format arguments: argList]);
|
||||
}
|
||||
|
||||
|
||||
// Initializing Newly Allocated Strings
|
||||
|
||||
/** <init />
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
#define NeXT_Foundation_LIBRARY 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_WCHAR_H
|
||||
#define HAVE_WCHAR_H 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
#define HAVE_STRERROR 1
|
||||
#endif
|
||||
|
|
|
@ -212,6 +212,7 @@
|
|||
556FFDEE03EC36E500000001,
|
||||
555FEDB803EC450500000001,
|
||||
555112B403FEC81600000001,
|
||||
EFEFAC3D055D9BC400B39730,
|
||||
);
|
||||
isa = PBXHeadersBuildPhase;
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -239,6 +240,7 @@
|
|||
555112B803FEC83800000001,
|
||||
55AB58310408CDFC00000001,
|
||||
55AB58320408CDFD00000001,
|
||||
EFEFAC3F055D9BF400B39730,
|
||||
);
|
||||
isa = PBXSourcesBuildPhase;
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
@ -303,6 +305,7 @@
|
|||
55CF466003E367A500000001,
|
||||
55CF466103E367A500000001,
|
||||
55CF466203E367A500000001,
|
||||
EFEFAC3E055D9BF400B39730,
|
||||
55CF466303E367A500000001,
|
||||
55CF466503E367A500000001,
|
||||
55CF466603E367A500000001,
|
||||
|
@ -741,6 +744,7 @@
|
|||
children = (
|
||||
556FFD3103EC36E500000001,
|
||||
556FFD3603EC36E500000001,
|
||||
EFEFAC3C055D9BC400B39730,
|
||||
556FFD3703EC36E500000001,
|
||||
556FFD3803EC36E500000001,
|
||||
556FFD4003EC36E500000001,
|
||||
|
@ -1741,6 +1745,35 @@
|
|||
//EF2
|
||||
//EF3
|
||||
//EF4
|
||||
EFEFAC3C055D9BC400B39730 = {
|
||||
expectedFileType = sourcecode.c.h;
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
path = GSLock.h;
|
||||
refType = 4;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EFEFAC3D055D9BC400B39730 = {
|
||||
fileRef = EFEFAC3C055D9BC400B39730;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
EFEFAC3E055D9BF400B39730 = {
|
||||
expectedFileType = sourcecode.c.objc;
|
||||
fileEncoding = 30;
|
||||
isa = PBXFileReference;
|
||||
name = GSLock.m;
|
||||
path = Additions/GSLock.m;
|
||||
refType = 4;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EFEFAC3F055D9BF400B39730 = {
|
||||
fileRef = EFEFAC3E055D9BF400B39730;
|
||||
isa = PBXBuildFile;
|
||||
settings = {
|
||||
};
|
||||
};
|
||||
EFF06DE3054E5BDA002EC6F5 = {
|
||||
containerPortal = 0867D690FE84028FC02AAC07;
|
||||
isa = PBXContainerItemProxy;
|
||||
|
|
Loading…
Reference in a new issue