Richard Frith-Macdonald schrieb:
> Author: rfm
> Date: Sat Aug 12 17:21:39 2006
> New Revision: 23262
>
> URL: http://svn.gna.org/viewcvs/gnustep?rev=23262&view=rev
> Log:
> replace call to deprecated function
>
> Modified:
> libs/base/trunk/Source/GSFormat.m
>
Removing the use of the deprecated function is definitely good! But I
think replacements that continue to do a character by character
processing like:
***************
*** 1783,1789 ****
string_malloced = 1;
for (slen = 0; slen < len; slen++)
! string[slen] = encode_chartouni(str[slen], enc);
}
else
{
--- 1784,1798 ----
string_malloced = 1;
for (slen = 0; slen < len; slen++)
! {
! unsigned int size = 1;
! unsigned char c = str[slen];
! unichar u = 0;
! unichar *dst = &u;
!
! GSToUnicode(&dst, &size, &c, 1, enc, 0, 0);
! string[slen] = u;
! }
}
else
{
seem wrong for the multibyte case (besides the fact that they seem
inefficient).
I think in the long run we want to call GSToUnicode with a larger buffer
and the full C-string. Maybe we can mark these with some FIXME comment
until we have time to deal with them properly.
Cheers,
David
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs