Changes from Stevo Crvenkovski. See ChangeLog Mar 23 22:14:21

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-05-03 18:05:21 +00:00
parent 60836e9864
commit 6690dfea9b
5 changed files with 875 additions and 330 deletions

View file

@ -1,5 +1,8 @@
Sat May 3 12:28:48 1997 Andrew McCallum <mccallum@jprc.com>
* examples/Makefile.in (RCS_FILES): Added custom-zone.m.
* examples/custom-zone.m: New file.
* src/NSBundle.m ([NSBundle
+pathForResource:ofType:inDirectory:]): Change it from an instance
method to a class method, in order to conform to spec.
@ -15,6 +18,55 @@ Sat May 3 12:28:48 1997 Andrew McCallum <mccallum@jprc.com>
Use NSBundle's pathForResource:ofType:inDirectory method properly.
(Reported by Stevo Crvenkovski <stevoc@lotus.mpt.com.mk>.)
Sun Mar 23 22:14:21 1997 Stevo Crvenkovski <stevoc@lotus.mpt.com.mk>
* src/NSGString.m: New file Initial implementation of Unicode
* src/include/NSGString.h : New file Interface for NSGString
* src/NSGSequence.m: New file - class that deals with Unicode
composite character sequences
* src/include/NSGSequence.h : New file Interface for NSGSequence
* src/Unicode.m: New file - functions for Unicode
* src/include/Unicode.h : New file
* src/Makefile.in: Added NSGString.m, NSGString.h, NSGSequence.m,
NSGSequence.h, Unicode.m, Unicode.h
* src/NSGCString.m ([NSGCString -length]): Method implemented.
([NSGCString -characterAtIndex]): Changed to work
with encodings
([NSGCString -_baseLength]): private method for
composite character sequences.
([NSGCString -initWithString:]): CString implementation
moved here from NSString.m
* src/NSString.m : Changed NSString_concrete_class to NSGString
and NSMutableString_concrete_class to NSGMutableCString
([NSString +stringWithCharacters]): Method implemented.
([NSString -initWithCharacters:length:]): Method implemented.
([NSString -stringByAppendingString]): changed for Unicode.
([NSString -rangeOfString]): split method into 8 private _search*
methods and implemented full Unicode
([NSString -compare:options:range:]): changed for Unicode.
([NSString -isEqualToString]): changed for Unicode
([NSString -description]): changed.
([NSString -commonPrefixWithString]): changed for Unicode
([NSString -capitalizedString]): changed for Unicode
([NSString -lowercaseString]): changed for Unicode
([NSString -uppercaseString]): changed for Unicode
([NSString -getCString]): changed for Unicode
([NSString -defaultCStringEncoding]): method implemented
([NSString -_baseLength]): private method for composite
sequences.
([NSString -stringWithFormat:]): null terminate buffer.
*src/unicode : New directory - temporary holds data for unicode
functions.
*src/unicode/caseconv.h : New file
*src/unicode/cop.h : New file
*src/unicode/cyrillic.h : New file
*src/unicode/decomp.h : New file
*src/unicode/nextstep.h : New file
Fri Feb 14 08:51:39 1997 Yoo C. Chung <wacko@power1.snu.ac.kr>
* src/NSZone.m: Use [NSString -cStringNoCopy].

View file

@ -55,6 +55,7 @@ typedef enum _NSStringEncoding
NSUTFStringEncoding,
NSISOLatin1StringEncoding,
NSSymbolStringEncoding,
NSCyrillicStringEncoding,
NSNonLossyASCIIStringEncoding
} NSStringEncoding;
@ -194,6 +195,9 @@ typedef enum _NSStringEncoding
- (NSString*) stringByResolvingSymlinksInPath;
- (NSString*) stringByStandardizingPath;
// for methods working with decomposed strings
- (int) _baseLength;
#ifndef STRICT_OPENSTEP
+ (NSString*) localizedStringWithFormat: (NSString*) format, ...;
+ (NSString*) stringWithFormat: (NSString*)format
@ -254,6 +258,7 @@ compiler warning.
@end
/* Because the compiler thinks that @".." strings are NXConstantString's. */
#include <Foundation/NSGString.h>
#include <Foundation/NSGCString.h>
@interface NXConstantString : NSGCString
@end

View file

@ -172,6 +172,7 @@ TcpPort.m \
TextCStream.m \
Time.m \
UdpPort.m \
Unicode.m \
behavior.m \
lex.pl.m \
lex.sf.m \
@ -295,6 +296,7 @@ include/TcpPort.h \
include/TextCStream.h \
include/Time.h \
include/UdpPort.h \
include/Unicode.h \
include/ValueHolding.h \
include/behavior.h \
include/fake-main.h \
@ -378,6 +380,8 @@ NSGCString.m \
NSGData.m \
NSGDictionary.m \
NSGSet.m \
NSGSequence.m \
NSGString.m \
NSHashTable.m \
NSHost.m \
NSInvocation.m \
@ -455,6 +459,8 @@ include/NSGCString.h \
include/NSGData.h \
include/NSGDictionary.h \
include/NSGSet.h \
include/NSGSequence.h \
include/NSGString.h \
include/NSHashTable.h \
include/NSHost.h \
include/NSInvocation.h \

View file

@ -31,6 +31,9 @@
#include <gnustep/base/behavior.h>
/* memcpy(), strlen(), strcmp() are gcc builtin's */
#include <gnustep/base//Unicode.h>
@implementation NSGCString
/* This is the designated initializer for this class. */
@ -111,13 +114,19 @@
return _count;
}
- (unsigned int) length
{
return _count;
}
- (unichar) characterAtIndex: (unsigned int)index
{
/* xxx This should raise an NSException. */
CHECK_INDEX_RANGE_ERROR(index, _count);
return (unichar) _contents_chars[index];
return chartouni(_contents_chars[index]);
}
- (NSString*) substringFromRange: (NSRange)aRange
{
if (aRange.location > _count)
@ -128,6 +137,7 @@
length: aRange.length];
}
// FOR IndexedCollection SUPPORT;
- objectAtIndex: (unsigned)index
@ -136,6 +146,16 @@
return [NSNumber numberWithChar: _contents_chars[index]];
}
- (int) _baseLength
{
return _count;
}
- (id) initWithString: (NSString*)string
{
return [self initWithCString:[string cStringNoCopy]];
}
@end

File diff suppressed because it is too large Load diff