mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 16:50:42 +00:00
Tweak old style property list output format. tab, cr, nl characters in a
quoteed string should not need escaping, thoiugh escaped versions need to be understood on input. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19768 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9bcaae0c5c
commit
af7d306481
2 changed files with 16 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-07-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSPropertyList.m: don't escape tab,cr,lf in output of old
|
||||||
|
style property lists.
|
||||||
|
|
||||||
2004-07-21 David Ayers <d.ayers@inode.at>
|
2004-07-21 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Source/Additions/GSObjCRuntime.m
|
* Source/Additions/GSObjCRuntime.m
|
||||||
|
|
|
@ -1237,11 +1237,14 @@ PString(NSString *obj, NSMutableData *output)
|
||||||
{
|
{
|
||||||
switch (*from)
|
switch (*from)
|
||||||
{
|
{
|
||||||
case '\a':
|
|
||||||
case '\b':
|
|
||||||
case '\t':
|
case '\t':
|
||||||
case '\r':
|
case '\r':
|
||||||
case '\n':
|
case '\n':
|
||||||
|
len++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '\a':
|
||||||
|
case '\b':
|
||||||
case '\v':
|
case '\v':
|
||||||
case '\f':
|
case '\f':
|
||||||
case '\\':
|
case '\\':
|
||||||
|
@ -1277,11 +1280,14 @@ PString(NSString *obj, NSMutableData *output)
|
||||||
{
|
{
|
||||||
switch (*from)
|
switch (*from)
|
||||||
{
|
{
|
||||||
|
case '\t':
|
||||||
|
case '\r':
|
||||||
|
case '\n':
|
||||||
|
*ptr++ = *from;
|
||||||
|
break;
|
||||||
|
|
||||||
case '\a': *ptr++ = '\\'; *ptr++ = 'a'; break;
|
case '\a': *ptr++ = '\\'; *ptr++ = 'a'; break;
|
||||||
case '\b': *ptr++ = '\\'; *ptr++ = 'b'; break;
|
case '\b': *ptr++ = '\\'; *ptr++ = 'b'; break;
|
||||||
case '\t': *ptr++ = '\\'; *ptr++ = 't'; break;
|
|
||||||
case '\r': *ptr++ = '\\'; *ptr++ = 'r'; break;
|
|
||||||
case '\n': *ptr++ = '\\'; *ptr++ = 'n'; break;
|
|
||||||
case '\v': *ptr++ = '\\'; *ptr++ = 'v'; break;
|
case '\v': *ptr++ = '\\'; *ptr++ = 'v'; break;
|
||||||
case '\f': *ptr++ = '\\'; *ptr++ = 'f'; break;
|
case '\f': *ptr++ = '\\'; *ptr++ = 'f'; break;
|
||||||
case '\\': *ptr++ = '\\'; *ptr++ = '\\'; break;
|
case '\\': *ptr++ = '\\'; *ptr++ = '\\'; break;
|
||||||
|
|
Loading…
Reference in a new issue