A few more string fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13180 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-03-20 22:37:22 +00:00
parent 8275cd6629
commit e7affc80ba
4 changed files with 12 additions and 8 deletions

View file

@ -1621,9 +1621,10 @@ tables:
GROW();
outbuf = (char*)&ptr[dpos];
outbytesleft = (bsize - old) * sizeof(unichar);
outbytesleft += (bsize - old) * sizeof(unichar);
}
rval = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
dpos = (bsize * sizeof(unichar) - outbytesleft) / sizeof(unichar);
if (rval == (size_t)-1)
{
if (errno == E2BIG)
@ -1632,7 +1633,7 @@ tables:
GROW();
outbuf = (char*)&ptr[dpos];
outbytesleft = (bsize - old) * sizeof(unichar);
outbytesleft += (bsize - old) * sizeof(unichar);
}
else
{
@ -1640,7 +1641,6 @@ tables:
break;
}
}
dpos = (bsize * sizeof(unichar) - outbytesleft) / sizeof(unichar);
}
// close the converter
iconv_close(cd);
@ -2141,9 +2141,10 @@ tables:
GROW();
outbuf = (char*)&ptr[dpos];
outbytesleft = (bsize - old);
outbytesleft += (bsize - old);
}
rval = iconv(cd, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
dpos = bsize - outbytesleft;
if (rval == (size_t)-1)
{
if (errno == E2BIG)
@ -2152,7 +2153,7 @@ tables:
GROW();
outbuf = (char*)&ptr[dpos];
outbytesleft = (bsize - old);
outbytesleft += (bsize - old);
}
else if (errno == EILSEQ)
{
@ -2179,7 +2180,6 @@ tables:
break;
}
}
dpos = bsize - outbytesleft;
}
// close the converter
iconv_close(cd);