mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-01 01:01:03 +00:00
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:
parent
9b1de4c541
commit
ef89bc2679
2 changed files with 18 additions and 20 deletions
|
@ -4177,7 +4177,8 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
||||||
encoding: internalEncoding];
|
encoding: internalEncoding];
|
||||||
}
|
}
|
||||||
u = [aString characterAtIndex: l];
|
u = [aString characterAtIndex: l];
|
||||||
GSFromUnicode(&dst, &size, &u, 1, internalEncoding, 0, 0);
|
GSFromUnicode(&dst, &size, &u, 1,
|
||||||
|
internalEncoding, 0, GSUniStrict);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -4247,7 +4248,7 @@ NSAssert(_flags.free == 1 && _zone != 0, NSInternalInconsistencyException);
|
||||||
}
|
}
|
||||||
u = [aString characterAtIndex: l];
|
u = [aString characterAtIndex: l];
|
||||||
d = _contents.c + l;
|
d = _contents.c + l;
|
||||||
GSFromUnicode(&d, &s, &u, 1, internalEncoding, 0, 0);
|
GSFromUnicode(&d, &s, &u, 1, internalEncoding, 0, GSUniStrict);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -2813,7 +2813,6 @@ handle_printf_atsign (FILE *stream,
|
||||||
|| (encoding == NSISOCyrillicStringEncoding)
|
|| (encoding == NSISOCyrillicStringEncoding)
|
||||||
|| (encoding == NSISOThaiStringEncoding))
|
|| (encoding == NSISOThaiStringEncoding))
|
||||||
{
|
{
|
||||||
char t;
|
|
||||||
unsigned char *buff;
|
unsigned char *buff;
|
||||||
|
|
||||||
buff = (unsigned char*)NSZoneMalloc(NSDefaultMallocZone(), len+1);
|
buff = (unsigned char*)NSZoneMalloc(NSDefaultMallocZone(), len+1);
|
||||||
|
@ -2821,12 +2820,13 @@ handle_printf_atsign (FILE *stream,
|
||||||
{
|
{
|
||||||
for (count = 0; count < len; count++)
|
for (count = 0; count < len; count++)
|
||||||
{
|
{
|
||||||
t = encode_unitochar((*caiImp)(self, caiSel, count), encoding);
|
unichar u = (*caiImp)(self, caiSel, count);
|
||||||
if (t)
|
unsigned size = 1;
|
||||||
{
|
unsigned char *dst = buff + count;
|
||||||
buff[count] = t;
|
|
||||||
}
|
// We know this is a single byte encoding
|
||||||
else
|
if (GSFromUnicode(&dst, &size, &u, 1, encoding, 0, GSUniStrict)
|
||||||
|
== NO)
|
||||||
{
|
{
|
||||||
NSZoneFree(NSDefaultMallocZone(), buff);
|
NSZoneFree(NSDefaultMallocZone(), buff);
|
||||||
return nil;
|
return nil;
|
||||||
|
@ -2837,18 +2837,15 @@ handle_printf_atsign (FILE *stream,
|
||||||
{
|
{
|
||||||
for (count = 0; count < len; count++)
|
for (count = 0; count < len; count++)
|
||||||
{
|
{
|
||||||
t = encode_unitochar((*caiImp)(self, caiSel, count), encoding);
|
unichar u = (*caiImp)(self, caiSel, count);
|
||||||
if (t)
|
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;
|
NSZoneFree(NSDefaultMallocZone(), buff);
|
||||||
}
|
return nil;
|
||||||
else
|
|
||||||
{
|
|
||||||
/* xxx should handle decomposed characters */
|
|
||||||
/* OpenStep documentation is unclear on what to do
|
|
||||||
* if there is no simple replacement for character
|
|
||||||
*/
|
|
||||||
buff[count] = '*';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue