Mercurial > emacs
comparison src/coding.c @ 107174:e98bd64897e0
Fix handling of CODING_RESULT_INSUFFICIENT_DST.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 18 Feb 2010 11:27:25 +0900 |
| parents | dfc03b454687 |
| children | 9b814b3ee348 |
comparison
equal
deleted
inserted
replaced
| 107172:0d1117b6ae66 | 107174:e98bd64897e0 |
|---|---|
| 990 case CODING_RESULT_INTERRUPT: | 990 case CODING_RESULT_INTERRUPT: |
| 991 Vlast_code_conversion_error = Qinterrupted; | 991 Vlast_code_conversion_error = Qinterrupted; |
| 992 break; | 992 break; |
| 993 case CODING_RESULT_INSUFFICIENT_MEM: | 993 case CODING_RESULT_INSUFFICIENT_MEM: |
| 994 Vlast_code_conversion_error = Qinsufficient_memory; | 994 Vlast_code_conversion_error = Qinsufficient_memory; |
| 995 break; | |
| 996 case CODING_RESULT_INSUFFICIENT_DST: | |
| 997 /* Don't record this error in Vlast_code_conversion_error | |
| 998 because it happens just temporarily and is resolved when the | |
| 999 whole conversion is finished. */ | |
| 995 break; | 1000 break; |
| 996 case CODING_RESULT_SUCCESS: | 1001 case CODING_RESULT_SUCCESS: |
| 997 break; | 1002 break; |
| 998 default: | 1003 default: |
| 999 Vlast_code_conversion_error = intern ("Unknown error"); | 1004 Vlast_code_conversion_error = intern ("Unknown error"); |
| 7863 { | 7868 { |
| 7864 destination = xrealloc (destination, coding->produced); | 7869 destination = xrealloc (destination, coding->produced); |
| 7865 if (! destination) | 7870 if (! destination) |
| 7866 { | 7871 { |
| 7867 record_conversion_result (coding, | 7872 record_conversion_result (coding, |
| 7868 CODING_RESULT_INSUFFICIENT_DST); | 7873 CODING_RESULT_INSUFFICIENT_MEM); |
| 7869 unbind_to (count, Qnil); | 7874 unbind_to (count, Qnil); |
| 7870 return; | 7875 return; |
| 7871 } | 7876 } |
| 7872 if (BEGV < GPT && GPT < BEGV + coding->produced_char) | 7877 if (BEGV < GPT && GPT < BEGV + coding->produced_char) |
| 7873 move_gap_both (BEGV, BEGV_BYTE); | 7878 move_gap_both (BEGV, BEGV_BYTE); |
