Patch by David relson

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@10051 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2001-06-01 16:27:06 +00:00
parent 7e2c22b549
commit bca95dce07
2 changed files with 38 additions and 34 deletions

View file

@ -1,3 +1,7 @@
2001-06-01 Richard Frith-Macdonald <rfm@gnu.uk>
* Source/NSString.m: Patch by David Relson applied
2001-06-01 Richard Frith-Macdonald <rfm@gnu.uk> 2001-06-01 Richard Frith-Macdonald <rfm@gnu.uk>
Optimisations suggested by Guenther Fuerthaller Optimisations suggested by Guenther Fuerthaller

View file

@ -1796,7 +1796,9 @@ handle_printf_atsign (FILE *stream,
} }
} }
else else
{
start++; start++;
}
*startIndex = start; *startIndex = start;
} }
} }
@ -1824,22 +1826,19 @@ handle_printf_atsign (FILE *stream,
if (done) if (done)
break; break;
} }
if (end < len) if (lineEndIndex)
{ {
if ((*caiImp)(self, caiSel, end) == (unichar)0x000D) if (end < len
&& ((*caiImp)(self, caiSel, end) == (unichar)0x000D)
&& ((*caiImp)(self, caiSel, end+1) == (unichar)0x000A))
{ {
if ((*caiImp)(self, caiSel, end+1) == (unichar)0x000A)
*lineEndIndex = end+1; *lineEndIndex = end+1;
else
*lineEndIndex = end;
} }
else else
{
*lineEndIndex = end; *lineEndIndex = end;
} }
else
*lineEndIndex = end;
} }
if (contentsEndIndex) if (contentsEndIndex)
{ {
if (end < len) if (end < len)
@ -1854,6 +1853,7 @@ handle_printf_atsign (FILE *stream,
} }
} }
} }
}
// Changing Case // Changing Case