Mercurial > vim
comparison src/fileio.c @ 375:f14cbd913415 v7.0097
updated for version 7.0097
author | vimboss |
---|---|
date | Wed, 29 Jun 2005 22:40:58 +0000 |
parents | 644578c9e219 |
children | 289b19a6f2ed |
comparison
equal
deleted
inserted
replaced
374:575dacb554d8 | 375:f14cbd913415 |
---|---|
1342 while ((iconv(iconv_fd, (void *)&fromp, &from_size, | 1342 while ((iconv(iconv_fd, (void *)&fromp, &from_size, |
1343 &top, &to_size) | 1343 &top, &to_size) |
1344 == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) | 1344 == (size_t)-1 && ICONV_ERRNO != ICONV_EINVAL) |
1345 || from_size > CONV_RESTLEN) | 1345 || from_size > CONV_RESTLEN) |
1346 { | 1346 { |
1347 if (!keep_dest_enc && can_retry) | |
1348 goto rewind_retry; | |
1347 if (!keep_dest_enc) | 1349 if (!keep_dest_enc) |
1348 goto rewind_retry; | 1350 conv_error = TRUE; |
1351 | |
1349 /* Ignore a byte and try again. */ | 1352 /* Ignore a byte and try again. */ |
1350 ++fromp; | 1353 ++fromp; |
1351 --from_size; | 1354 --from_size; |
1352 *top++ = '?'; | 1355 *top++ = '?'; |
1353 --to_size; | 1356 --to_size; |
1759 # ifdef USE_ICONV | 1762 # ifdef USE_ICONV |
1760 if (iconv_fd != (iconv_t)-1) | 1763 if (iconv_fd != (iconv_t)-1) |
1761 conv_error = TRUE; | 1764 conv_error = TRUE; |
1762 else | 1765 else |
1763 # endif | 1766 # endif |
1767 if (illegal_byte == 0) /* Keep the first linenr */ | |
1764 { | 1768 { |
1765 char_u *s; | 1769 char_u *s; |
1766 | 1770 |
1767 /* Estimate the line number. */ | 1771 /* Estimate the line number. */ |
1768 illegal_byte = curbuf->b_ml.ml_line_count - linecnt + 1; | 1772 illegal_byte = curbuf->b_ml.ml_line_count - linecnt + 1; |