more removal of deprecated function calls

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23263 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-08-12 16:33:39 +00:00
parent 2718157417
commit 3c1a4c536f
2 changed files with 18 additions and 20 deletions

View file

@ -4177,7 +4177,8 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
encoding: internalEncoding];
}
u = [aString characterAtIndex: l];
GSFromUnicode(&dst, &size, &u, 1, internalEncoding, 0, 0);
GSFromUnicode(&dst, &size, &u, 1,
internalEncoding, 0, GSUniStrict);
}
}
else
@ -4247,7 +4248,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
}
u = [aString characterAtIndex: l];
d = _contents.c + l;
GSFromUnicode(&d, &s, &u, 1, internalEncoding, 0, 0);
GSFromUnicode(&d, &s, &u, 1, internalEncoding, 0, GSUniStrict);
}
else
{

View file

@ -2813,7 +2813,6 @@ handle_printf_atsign (FILE *stream,
|| (encoding == NSISOCyrillicStringEncoding)
|| (encoding == NSISOThaiStringEncoding))
{
char t;
unsigned char *buff;
buff = (unsigned char*)NSZoneMalloc(NSDefaultMallocZone(), len+1);
@ -2821,12 +2820,13 @@ handle_printf_atsign (FILE *stream,
{
for (count = 0; count < len; count++)
{
t = encode_unitochar((*caiImp)(self, caiSel, count), encoding);
if (t)
{
buff[count] = t;
}
else
unichar u = (*caiImp)(self, caiSel, count);
unsigned size = 1;
unsigned char *dst = buff + count;
// We know this is a single byte encoding
if (GSFromUnicode(&dst, &size, &u, 1, encoding, 0, GSUniStrict)
== NO)
{
NSZoneFree(NSDefaultMallocZone(), buff);
return nil;
@ -2837,18 +2837,15 @@ handle_printf_atsign (FILE *stream,
{
for (count = 0; count < len; count++)
{
t = encode_unitochar((*caiImp)(self, caiSel, count), encoding);
if (t)
unichar u = (*caiImp)(self, caiSel, count);
unsigned size = 1;
unsigned char *dst = buff + count;
// We know this is a single byte encoding
if (GSFromUnicode(&dst, &size, &u, 1, encoding, 0, 0) == NO)
{
buff[count] = t;
}
else
{
/* xxx should handle decomposed characters */
/* OpenStep documentation is unclear on what to do
* if there is no simple replacement for character
*/
buff[count] = '*';
NSZoneFree(NSDefaultMallocZone(), buff);
return nil;
}
}
}