mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
Tidying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4498 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3dc03df58a
commit
fde97b451f
3 changed files with 22 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Wed Jun 30 20:55:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
|
* Source/PropList.h: Tidied for garbage collection.
|
||||||
|
* Source/include/Unicode.h: Added missing prototyp.
|
||||||
|
|
||||||
Tue Jun 29 17:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
Tue Jun 29 17:50:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||||
|
|
||||||
Patches by Hai Henningsen
|
Patches by Hai Henningsen
|
||||||
|
|
|
@ -37,5 +37,7 @@ unichar uni_toupper(unichar ch);
|
||||||
unsigned char uni_cop(unichar u);
|
unsigned char uni_cop(unichar u);
|
||||||
BOOL uni_isnonsp(unichar u);
|
BOOL uni_isnonsp(unichar u);
|
||||||
unichar *uni_is_decomp(unichar u);
|
unichar *uni_is_decomp(unichar u);
|
||||||
|
int encode_strtoustr(unichar* u1,const char*s1,int size, NSStringEncoding enc);
|
||||||
|
|
||||||
|
|
||||||
#endif /* __Unicode_h_OBJECTS_INCLUDE */
|
#endif /* __Unicode_h_OBJECTS_INCLUDE */
|
||||||
|
|
|
@ -36,7 +36,7 @@ static void setupHexdigits()
|
||||||
{
|
{
|
||||||
hexdigits = [NSCharacterSet characterSetWithCharactersInString:
|
hexdigits = [NSCharacterSet characterSetWithCharactersInString:
|
||||||
@"0123456789abcdef"];
|
@"0123456789abcdef"];
|
||||||
[hexdigits retain];
|
RETAIN(hexdigits);
|
||||||
hexdigitsImp =
|
hexdigitsImp =
|
||||||
(BOOL(*)(id,SEL,unichar)) [hexdigits methodForSelector: cMemberSel];
|
(BOOL(*)(id,SEL,unichar)) [hexdigits methodForSelector: cMemberSel];
|
||||||
}
|
}
|
||||||
|
@ -50,11 +50,12 @@ static void setupQuotables()
|
||||||
{
|
{
|
||||||
NSMutableCharacterSet *s;
|
NSMutableCharacterSet *s;
|
||||||
|
|
||||||
s = (NSMutableCharacterSet*)[NSMutableCharacterSet
|
s = [[NSCharacterSet characterSetWithCharactersInString:
|
||||||
characterSetWithCharactersInString:
|
@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$./_"]
|
||||||
@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz$./_"];
|
mutableCopy];
|
||||||
[s invert];
|
[s invert];
|
||||||
quotables = [s copy];
|
quotables = [s copy];
|
||||||
|
RELEASE(s);
|
||||||
quotablesImp =
|
quotablesImp =
|
||||||
(BOOL(*)(id,SEL,unichar)) [quotables methodForSelector: cMemberSel];
|
(BOOL(*)(id,SEL,unichar)) [quotables methodForSelector: cMemberSel];
|
||||||
}
|
}
|
||||||
|
@ -66,13 +67,9 @@ static void setupWhitespce()
|
||||||
{
|
{
|
||||||
if (whitespce == nil)
|
if (whitespce == nil)
|
||||||
{
|
{
|
||||||
#if 0
|
whitespce = [NSCharacterSet characterSetWithCharactersInString:
|
||||||
whitespce = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
|
||||||
#else
|
|
||||||
whitespce = [NSMutableCharacterSet characterSetWithCharactersInString:
|
|
||||||
@" \t\r\n\f\b"];
|
@" \t\r\n\f\b"];
|
||||||
#endif
|
RETAIN(whitespce);
|
||||||
[whitespce retain];
|
|
||||||
whitespceImp =
|
whitespceImp =
|
||||||
(BOOL(*)(id,SEL,unichar)) [whitespce methodForSelector: cMemberSel];
|
(BOOL(*)(id,SEL,unichar)) [whitespce methodForSelector: cMemberSel];
|
||||||
}
|
}
|
||||||
|
@ -88,7 +85,9 @@ static Class plDictionary;
|
||||||
static id (*plSet)(id, SEL, id, id);
|
static id (*plSet)(id, SEL, id, id);
|
||||||
static id (*plInit)(id, SEL, void*, unsigned) = 0;
|
static id (*plInit)(id, SEL, void*, unsigned) = 0;
|
||||||
static id (*plAlloc)(Class, SEL, NSZone*);
|
static id (*plAlloc)(Class, SEL, NSZone*);
|
||||||
|
#ifndef GS_WITH_GC
|
||||||
static id (*plAutorelease)(id, SEL);
|
static id (*plAutorelease)(id, SEL);
|
||||||
|
#endif
|
||||||
#if GSPLUNI
|
#if GSPLUNI
|
||||||
static SEL plSel = @selector(initWithCharacters:length:);
|
static SEL plSel = @selector(initWithCharacters:length:);
|
||||||
#else
|
#else
|
||||||
|
@ -104,8 +103,10 @@ static void setupPl(Class c)
|
||||||
[c methodForSelector: @selector(allocWithZone:)];
|
[c methodForSelector: @selector(allocWithZone:)];
|
||||||
plInit = (id (*)(id, SEL, void*, unsigned))
|
plInit = (id (*)(id, SEL, void*, unsigned))
|
||||||
[c instanceMethodForSelector: plSel];
|
[c instanceMethodForSelector: plSel];
|
||||||
|
#ifndef GS_WITH_GC
|
||||||
plAutorelease = (id (*)(id, SEL))
|
plAutorelease = (id (*)(id, SEL))
|
||||||
[c instanceMethodForSelector: @selector(autorelease)];
|
[c instanceMethodForSelector: @selector(autorelease)];
|
||||||
|
#endif
|
||||||
plArray = [NSGMutableArray class];
|
plArray = [NSGMutableArray class];
|
||||||
plAdd = (id (*)(id, SEL, id))
|
plAdd = (id (*)(id, SEL, id))
|
||||||
[plArray instanceMethodForSelector: @selector(addObject:)];
|
[plArray instanceMethodForSelector: @selector(addObject:)];
|
||||||
|
@ -356,7 +357,9 @@ static inline id parseQuotedString(pldata* pld)
|
||||||
}
|
}
|
||||||
obj = (*plAlloc)(plCls, @selector(allocWithZone:), NSDefaultMallocZone());
|
obj = (*plAlloc)(plCls, @selector(allocWithZone:), NSDefaultMallocZone());
|
||||||
obj = (*plInit)(obj, plSel, (void*)chars, pld->pos - start - shrink);
|
obj = (*plInit)(obj, plSel, (void*)chars, pld->pos - start - shrink);
|
||||||
|
#ifndef GS_WITH_GC
|
||||||
(*plAutorelease)(obj, @selector(autorelease));
|
(*plAutorelease)(obj, @selector(autorelease));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
pld->pos++;
|
pld->pos++;
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -376,7 +379,9 @@ static inline id parseUnquotedString(pldata *pld)
|
||||||
}
|
}
|
||||||
obj = (*plAlloc)(plCls, @selector(allocWithZone:), NSDefaultMallocZone());
|
obj = (*plAlloc)(plCls, @selector(allocWithZone:), NSDefaultMallocZone());
|
||||||
obj = (*plInit)(obj, plSel, (void*)&pld->ptr[start], pld->pos-start);
|
obj = (*plInit)(obj, plSel, (void*)&pld->ptr[start], pld->pos-start);
|
||||||
|
#ifndef GS_WITH_GC
|
||||||
(*plAutorelease)(obj, @selector(autorelease));
|
(*plAutorelease)(obj, @selector(autorelease));
|
||||||
|
#endif
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue