diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 20 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/casetab.c | 9 | ||||
| -rw-r--r-- | src/category.c | 8 | ||||
| -rw-r--r-- | src/character.c | 4 | ||||
| -rw-r--r-- | src/coding.c | 5 | ||||
| -rw-r--r-- | src/decompress.c | 7 | ||||
| -rw-r--r-- | src/syntax.c | 6 | ||||
| -rw-r--r-- | src/xdisp.c | 4 |
9 files changed, 29 insertions, 36 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 70d722a02a4..e4dcfffa02f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,23 @@ | |||
| 1 | 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Fix recovering from possible decompression error. Since | ||
| 4 | insert_from_gap doesn't always move point, we can't use PT as | ||
| 5 | the position where the partially decompressed data ends, and | ||
| 6 | should count how may bytes was produced so far. | ||
| 7 | * decompress.c (struct decompress_unwind_data): Add nbytes member. | ||
| 8 | (unwind_decompress): Really delete partially uncompressed data. | ||
| 9 | (Fzlib_decompress_region): Take decompressed data size into account. | ||
| 10 | |||
| 11 | 2013-08-26 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 12 | |||
| 13 | * syntax.c (init_syntax_once): Adjust comment and do an early | ||
| 14 | initialization of Qchar_table_extra_slots just once... | ||
| 15 | * casetab.c (init_casetab_once): | ||
| 16 | * category.c (init_category_once): | ||
| 17 | * character.c (syms_of_character): | ||
| 18 | * coding.c (syms_of_coding): | ||
| 19 | * xdisp.c (syms_of_xdisp): ...and omit it here. | ||
| 20 | |||
| 1 | 2013-08-24 Eli Zaretskii <eliz@gnu.org> | 21 | 2013-08-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 22 | ||
| 3 | * xdisp.c (get_next_display_element): Don't apply to characters | 23 | * xdisp.c (get_next_display_element): Don't apply to characters |
diff --git a/src/alloc.c b/src/alloc.c index 81742e1ffc1..70a23488613 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -2805,7 +2805,7 @@ vector_nbytes (struct Lisp_Vector *v) | |||
| 2805 | static void | 2805 | static void |
| 2806 | sweep_vectors (void) | 2806 | sweep_vectors (void) |
| 2807 | { | 2807 | { |
| 2808 | struct vector_block *block = vector_blocks, **bprev = &vector_blocks; | 2808 | struct vector_block *block, **bprev = &vector_blocks; |
| 2809 | struct large_vector *lv, **lvprev = &large_vectors; | 2809 | struct large_vector *lv, **lvprev = &large_vectors; |
| 2810 | struct Lisp_Vector *vector, *next; | 2810 | struct Lisp_Vector *vector, *next; |
| 2811 | 2811 | ||
diff --git a/src/casetab.c b/src/casetab.c index 5f3c8db2869..b6b1c99c39f 100644 --- a/src/casetab.c +++ b/src/casetab.c | |||
| @@ -247,15 +247,8 @@ init_casetab_once (void) | |||
| 247 | { | 247 | { |
| 248 | register int i; | 248 | register int i; |
| 249 | Lisp_Object down, up, eqv; | 249 | Lisp_Object down, up, eqv; |
| 250 | DEFSYM (Qcase_table, "case-table"); | ||
| 251 | |||
| 252 | /* Intern this now in case it isn't already done. | ||
| 253 | Setting this variable twice is harmless. | ||
| 254 | But don't staticpro it here--that is done in alloc.c. */ | ||
| 255 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 256 | 250 | ||
| 257 | /* Now we are ready to set up this property, so we can | 251 | DEFSYM (Qcase_table, "case-table"); |
| 258 | create char tables. */ | ||
| 259 | Fput (Qcase_table, Qchar_table_extra_slots, make_number (3)); | 252 | Fput (Qcase_table, Qchar_table_extra_slots, make_number (3)); |
| 260 | 253 | ||
| 261 | down = Fmake_char_table (Qcase_table, Qnil); | 254 | down = Fmake_char_table (Qcase_table, Qnil); |
diff --git a/src/category.c b/src/category.c index 30ffbd0890f..b28978fb721 100644 --- a/src/category.c +++ b/src/category.c | |||
| @@ -460,14 +460,6 @@ init_category_once (void) | |||
| 460 | { | 460 | { |
| 461 | /* This has to be done here, before we call Fmake_char_table. */ | 461 | /* This has to be done here, before we call Fmake_char_table. */ |
| 462 | DEFSYM (Qcategory_table, "category-table"); | 462 | DEFSYM (Qcategory_table, "category-table"); |
| 463 | |||
| 464 | /* Intern this now in case it isn't already done. | ||
| 465 | Setting this variable twice is harmless. | ||
| 466 | But don't staticpro it here--that is done in alloc.c. */ | ||
| 467 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 468 | |||
| 469 | /* Now we are ready to set up this property, so we can | ||
| 470 | create category tables. */ | ||
| 471 | Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2)); | 463 | Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2)); |
| 472 | 464 | ||
| 473 | Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil); | 465 | Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil); |
diff --git a/src/character.c b/src/character.c index 1bde2364e37..6fefb6e8824 100644 --- a/src/character.c +++ b/src/character.c | |||
| @@ -1072,10 +1072,6 @@ A char-table for width (columns) of each character. */); | |||
| 1072 | doc: /* Char table of script symbols. | 1072 | doc: /* Char table of script symbols. |
| 1073 | It has one extra slot whose value is a list of script symbols. */); | 1073 | It has one extra slot whose value is a list of script symbols. */); |
| 1074 | 1074 | ||
| 1075 | /* Intern this now in case it isn't already done. | ||
| 1076 | Setting this variable twice is harmless. | ||
| 1077 | But don't staticpro it here--that is done in alloc.c. */ | ||
| 1078 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 1079 | DEFSYM (Qchar_script_table, "char-script-table"); | 1075 | DEFSYM (Qchar_script_table, "char-script-table"); |
| 1080 | Fput (Qchar_script_table, Qchar_table_extra_slots, make_number (1)); | 1076 | Fput (Qchar_script_table, Qchar_table_extra_slots, make_number (1)); |
| 1081 | Vchar_script_table = Fmake_char_table (Qchar_script_table, Qnil); | 1077 | Vchar_script_table = Fmake_char_table (Qchar_script_table, Qnil); |
diff --git a/src/coding.c b/src/coding.c index 5b637627763..c10fb375672 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -10814,11 +10814,6 @@ syms_of_coding (void) | |||
| 10814 | Fput (Qcoding_system_error, Qerror_message, | 10814 | Fput (Qcoding_system_error, Qerror_message, |
| 10815 | build_pure_c_string ("Invalid coding system")); | 10815 | build_pure_c_string ("Invalid coding system")); |
| 10816 | 10816 | ||
| 10817 | /* Intern this now in case it isn't already done. | ||
| 10818 | Setting this variable twice is harmless. | ||
| 10819 | But don't staticpro it here--that is done in alloc.c. */ | ||
| 10820 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 10821 | |||
| 10822 | DEFSYM (Qtranslation_table, "translation-table"); | 10817 | DEFSYM (Qtranslation_table, "translation-table"); |
| 10823 | Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (2)); | 10818 | Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (2)); |
| 10824 | DEFSYM (Qtranslation_table_id, "translation-table-id"); | 10819 | DEFSYM (Qtranslation_table_id, "translation-table-id"); |
diff --git a/src/decompress.c b/src/decompress.c index c49f39a8ba1..dc9f4b72d93 100644 --- a/src/decompress.c +++ b/src/decompress.c | |||
| @@ -85,7 +85,7 @@ init_zlib_functions (void) | |||
| 85 | 85 | ||
| 86 | struct decompress_unwind_data | 86 | struct decompress_unwind_data |
| 87 | { | 87 | { |
| 88 | ptrdiff_t old_point, start; | 88 | ptrdiff_t old_point, start, nbytes; |
| 89 | z_stream *stream; | 89 | z_stream *stream; |
| 90 | }; | 90 | }; |
| 91 | 91 | ||
| @@ -97,7 +97,7 @@ unwind_decompress (void *ddata) | |||
| 97 | 97 | ||
| 98 | /* Delete any uncompressed data already inserted on error. */ | 98 | /* Delete any uncompressed data already inserted on error. */ |
| 99 | if (data->start) | 99 | if (data->start) |
| 100 | del_range (data->start, PT); | 100 | del_range (data->start, data->start + data->nbytes); |
| 101 | 101 | ||
| 102 | /* Put point where it was, or if the buffer has shrunk because the | 102 | /* Put point where it was, or if the buffer has shrunk because the |
| 103 | compressed data is bigger than the uncompressed, at | 103 | compressed data is bigger than the uncompressed, at |
| @@ -173,7 +173,7 @@ This function can be called only in unibyte buffers. */) | |||
| 173 | unwind_data.start = iend; | 173 | unwind_data.start = iend; |
| 174 | unwind_data.stream = &stream; | 174 | unwind_data.stream = &stream; |
| 175 | unwind_data.old_point = PT; | 175 | unwind_data.old_point = PT; |
| 176 | 176 | unwind_data.nbytes = 0; | |
| 177 | record_unwind_protect_ptr (unwind_decompress, &unwind_data); | 177 | record_unwind_protect_ptr (unwind_decompress, &unwind_data); |
| 178 | 178 | ||
| 179 | /* Insert the decompressed data at the end of the compressed data. */ | 179 | /* Insert the decompressed data at the end of the compressed data. */ |
| @@ -201,6 +201,7 @@ This function can be called only in unibyte buffers. */) | |||
| 201 | pos_byte += avail_in - stream.avail_in; | 201 | pos_byte += avail_in - stream.avail_in; |
| 202 | decompressed = avail_out - stream.avail_out; | 202 | decompressed = avail_out - stream.avail_out; |
| 203 | insert_from_gap (decompressed, decompressed, 0); | 203 | insert_from_gap (decompressed, decompressed, 0); |
| 204 | unwind_data.nbytes += decompressed; | ||
| 204 | QUIT; | 205 | QUIT; |
| 205 | } | 206 | } |
| 206 | while (inflate_status == Z_OK); | 207 | while (inflate_status == Z_OK); |
diff --git a/src/syntax.c b/src/syntax.c index f5b37303a4a..31eb86faed8 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -3486,9 +3486,9 @@ init_syntax_once (void) | |||
| 3486 | /* This has to be done here, before we call Fmake_char_table. */ | 3486 | /* This has to be done here, before we call Fmake_char_table. */ |
| 3487 | DEFSYM (Qsyntax_table, "syntax-table"); | 3487 | DEFSYM (Qsyntax_table, "syntax-table"); |
| 3488 | 3488 | ||
| 3489 | /* Intern_C_String this now in case it isn't already done. | 3489 | /* This variable is DEFSYMed in alloc.c and not initialized yet, so |
| 3490 | Setting this variable twice is harmless. | 3490 | intern it here. NOTE: you must guarantee that init_syntax_once |
| 3491 | But don't staticpro it here--that is done in alloc.c. */ | 3491 | is called before all other users of this variable. */ |
| 3492 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | 3492 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); |
| 3493 | 3493 | ||
| 3494 | /* Create objects which can be shared among syntax tables. */ | 3494 | /* Create objects which can be shared among syntax tables. */ |
diff --git a/src/xdisp.c b/src/xdisp.c index 3879fa37242..ee85c355b3e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -29985,10 +29985,6 @@ cursor shapes. */); | |||
| 29985 | DEFSYM (Qzero_width, "zero-width"); | 29985 | DEFSYM (Qzero_width, "zero-width"); |
| 29986 | 29986 | ||
| 29987 | DEFSYM (Qglyphless_char_display, "glyphless-char-display"); | 29987 | DEFSYM (Qglyphless_char_display, "glyphless-char-display"); |
| 29988 | /* Intern this now in case it isn't already done. | ||
| 29989 | Setting this variable twice is harmless. | ||
| 29990 | But don't staticpro it here--that is done in alloc.c. */ | ||
| 29991 | Qchar_table_extra_slots = intern_c_string ("char-table-extra-slots"); | ||
| 29992 | Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); | 29988 | Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); |
| 29993 | 29989 | ||
| 29994 | DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display, | 29990 | DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display, |