comparison src/fileio.c @ 177:84c21eb4fc40

updated for version 7.0054
author vimboss
date Mon, 28 Feb 2005 22:44:58 +0000
parents 8c60f65311fa
children 7fd70926e2e1
comparison
equal deleted inserted replaced
176:df9a1e1ffecd 177:84c21eb4fc40
1331 1331
1332 /* 1332 /*
1333 * If there is conversion error or not enough room try using 1333 * If there is conversion error or not enough room try using
1334 * another conversion. 1334 * another conversion.
1335 */ 1335 */
1336 if ((iconv(iconv_fd, (void *)&fromp, &from_size, &top, &to_size) 1336 while ((iconv(iconv_fd, (void *)&fromp, &from_size,
1337 &top, &to_size)
1337 == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) 1338 == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL)
1338 || from_size > CONV_RESTLEN) 1339 || from_size > CONV_RESTLEN)
1339 goto rewind_retry; 1340 {
1341 if (!keep_dest_enc)
1342 goto rewind_retry;
1343 /* Ignore a byte and try again. */
1344 ++fromp;
1345 --from_size;
1346 *top++ = '?';
1347 --to_size;
1348 }
1340 1349
1341 if (from_size > 0) 1350 if (from_size > 0)
1342 { 1351 {
1343 /* Some remaining characters, keep them for the next 1352 /* Some remaining characters, keep them for the next
1344 * round. */ 1353 * round. */