mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-25 17:51:01 +00:00
Backward compatibility fix for plist output
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13989 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bca42383d0
commit
2f4773d950
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-06-28 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m: Change to quote strings in plist output
|
||||
aggressively (quote characters that don't really need quoting)
|
||||
while still parsing flexibly ... ie handle unquoted strings as
|
||||
long as they don't contain 'special' characters.
|
||||
Fix for Tom Hageman <th@xs4all.nl>
|
||||
|
||||
2002-06-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/AGSParser.m: ([-parseDeclaration:]) Correct wrongly
|
||||
|
|
|
@ -137,6 +137,7 @@ static void setupHexdigits()
|
|||
}
|
||||
|
||||
static NSCharacterSet *quotables = nil;
|
||||
static NSCharacterSet *oldQuotables = nil;
|
||||
static unsigned const char *quotablesBitmapRep = NULL;
|
||||
#define GS_IS_QUOTABLE(X) IS_BIT_SET(quotablesBitmapRep[(X)/8], (X) % 8)
|
||||
|
||||
|
@ -145,7 +146,7 @@ static void setupQuotables()
|
|||
if (quotablesBitmapRep == NULL)
|
||||
{
|
||||
NSMutableCharacterSet *s;
|
||||
NSData *bitmap;
|
||||
NSData *bitmap;
|
||||
|
||||
s = [[NSCharacterSet characterSetWithCharactersInString:
|
||||
@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
|
@ -156,6 +157,13 @@ static void setupQuotables()
|
|||
RELEASE(s);
|
||||
bitmap = RETAIN([quotables bitmapRepresentation]);
|
||||
quotablesBitmapRep = [bitmap bytes];
|
||||
s = [[NSCharacterSet characterSetWithCharactersInString:
|
||||
@"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||
@"abcdefghijklmnopqrstuvwxyz$./_"]
|
||||
mutableCopy];
|
||||
[s invert];
|
||||
oldQuotables = [s copy];
|
||||
RELEASE(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3371,7 +3379,7 @@ handle_printf_atsign (FILE *stream,
|
|||
{
|
||||
setupQuotables();
|
||||
}
|
||||
if ([self rangeOfCharacterFromSet: quotables].length > 0
|
||||
if ([self rangeOfCharacterFromSet: oldQuotables].length > 0
|
||||
|| [self characterAtIndex: 0] == '/')
|
||||
{
|
||||
unichar tmp[length <= 1024 ? length : 0];
|
||||
|
|
Loading…
Reference in a new issue