diff options
| author | Eli Zaretskii | 2010-09-24 08:45:09 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2010-09-24 08:45:09 -0400 |
| commit | 145582a02c87f8c0b8be9eba2b95990c8db7e554 (patch) | |
| tree | 12953542dcc04048e9964210bcd96b383a0fbf0e /src | |
| parent | 446470a9f7b12a92652e2b375a8c710cd5d943ab (diff) | |
| download | emacs-145582a02c87f8c0b8be9eba2b95990c8db7e554.tar.gz emacs-145582a02c87f8c0b8be9eba2b95990c8db7e554.zip | |
Fix int/EMACS_INT use in buffer.c.
buffer.c (struct sortvec): Use EMACS_INT for buffer positions.
(struct sortstrlist, overlay_str_len): Use EMACS_INT for string
length.
(advance_to_char_boundary, Fset_buffer_multibyte)
(overlays_at, overlays_in, mouse_face_overlay_overlaps)
(overlay_touches_p, record_overlay_string, overlay_strings)
(recenter_overlay_lists, fix_start_end_in_overlays)
(modify_overlay, Fmove_overlay, report_overlay_modification)
(evaporate_overlays): Use EMACS_INT for buffer positions.
lisp.h (fix_start_end_in_overlays, overlay_touches_p): Adjust
prototypes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/buffer.c | 93 | ||||
| -rw-r--r-- | src/lisp.h | 4 |
3 files changed, 62 insertions, 48 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c0ea0e49819..8c73cf357d9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,18 @@ | |||
| 1 | 2010-09-24 Eli Zaretskii <eliz@gnu.org> | 1 | 2010-09-24 Eli Zaretskii <eliz@gnu.org> |
| 2 | 2 | ||
| 3 | * buffer.c (struct sortvec): Use EMACS_INT for buffer positions. | ||
| 4 | (struct sortstrlist, overlay_str_len): Use EMACS_INT for string | ||
| 5 | length. | ||
| 6 | (advance_to_char_boundary, Fset_buffer_multibyte) | ||
| 7 | (overlays_at, overlays_in, mouse_face_overlay_overlaps) | ||
| 8 | (overlay_touches_p, record_overlay_string, overlay_strings) | ||
| 9 | (recenter_overlay_lists, fix_start_end_in_overlays) | ||
| 10 | (modify_overlay, Fmove_overlay, report_overlay_modification) | ||
| 11 | (evaporate_overlays): Use EMACS_INT for buffer positions. | ||
| 12 | |||
| 13 | * lisp.h (fix_start_end_in_overlays, overlay_touches_p): Adjust | ||
| 14 | prototypes. | ||
| 15 | |||
| 3 | * dispextern.h (struct bidi_saved_info): Use EMACS_INT for buffer | 16 | * dispextern.h (struct bidi_saved_info): Use EMACS_INT for buffer |
| 4 | positions. | 17 | positions. |
| 5 | 18 | ||
diff --git a/src/buffer.c b/src/buffer.c index 84b60779b34..7ac00aa25b4 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -2092,7 +2092,7 @@ validate_region (register Lisp_Object *b, register Lisp_Object *e) | |||
| 2092 | and return the adjusted position. */ | 2092 | and return the adjusted position. */ |
| 2093 | 2093 | ||
| 2094 | static int | 2094 | static int |
| 2095 | advance_to_char_boundary (int byte_pos) | 2095 | advance_to_char_boundary (EMACS_INT byte_pos) |
| 2096 | { | 2096 | { |
| 2097 | int c; | 2097 | int c; |
| 2098 | 2098 | ||
| @@ -2105,7 +2105,7 @@ advance_to_char_boundary (int byte_pos) | |||
| 2105 | { | 2105 | { |
| 2106 | /* We should advance BYTE_POS only when C is a constituent of a | 2106 | /* We should advance BYTE_POS only when C is a constituent of a |
| 2107 | multibyte sequence. */ | 2107 | multibyte sequence. */ |
| 2108 | int orig_byte_pos = byte_pos; | 2108 | EMACS_INT orig_byte_pos = byte_pos; |
| 2109 | 2109 | ||
| 2110 | do | 2110 | do |
| 2111 | { | 2111 | { |
| @@ -2273,7 +2273,7 @@ current buffer is cleared. */) | |||
| 2273 | { | 2273 | { |
| 2274 | struct Lisp_Marker *tail, *markers; | 2274 | struct Lisp_Marker *tail, *markers; |
| 2275 | struct buffer *other; | 2275 | struct buffer *other; |
| 2276 | int begv, zv; | 2276 | EMACS_INT begv, zv; |
| 2277 | int narrowed = (BEG != BEGV || Z != ZV); | 2277 | int narrowed = (BEG != BEGV || Z != ZV); |
| 2278 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); | 2278 | int modified_p = !NILP (Fbuffer_modified_p (Qnil)); |
| 2279 | Lisp_Object old_undo = current_buffer->undo_list; | 2279 | Lisp_Object old_undo = current_buffer->undo_list; |
| @@ -2305,7 +2305,7 @@ current buffer is cleared. */) | |||
| 2305 | 2305 | ||
| 2306 | if (NILP (flag)) | 2306 | if (NILP (flag)) |
| 2307 | { | 2307 | { |
| 2308 | int pos, stop; | 2308 | EMACS_INT pos, stop; |
| 2309 | unsigned char *p; | 2309 | unsigned char *p; |
| 2310 | 2310 | ||
| 2311 | /* Do this first, so it can use CHAR_TO_BYTE | 2311 | /* Do this first, so it can use CHAR_TO_BYTE |
| @@ -2369,8 +2369,8 @@ current buffer is cleared. */) | |||
| 2369 | } | 2369 | } |
| 2370 | else | 2370 | else |
| 2371 | { | 2371 | { |
| 2372 | int pt = PT; | 2372 | EMACS_INT pt = PT; |
| 2373 | int pos, stop; | 2373 | EMACS_INT pos, stop; |
| 2374 | unsigned char *p, *pend; | 2374 | unsigned char *p, *pend; |
| 2375 | 2375 | ||
| 2376 | /* Be sure not to have a multibyte sequence striding over the GAP. | 2376 | /* Be sure not to have a multibyte sequence striding over the GAP. |
| @@ -2386,7 +2386,7 @@ current buffer is cleared. */) | |||
| 2386 | while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--; | 2386 | while (! CHAR_HEAD_P (*p) && p > BEG_ADDR) p--; |
| 2387 | if (LEADING_CODE_P (*p)) | 2387 | if (LEADING_CODE_P (*p)) |
| 2388 | { | 2388 | { |
| 2389 | int new_gpt = GPT_BYTE - (GPT_ADDR - p); | 2389 | EMACS_INT new_gpt = GPT_BYTE - (GPT_ADDR - p); |
| 2390 | 2390 | ||
| 2391 | move_gap_both (new_gpt, new_gpt); | 2391 | move_gap_both (new_gpt, new_gpt); |
| 2392 | } | 2392 | } |
| @@ -2470,8 +2470,8 @@ current buffer is cleared. */) | |||
| 2470 | ZV = chars_in_text (BEG_ADDR, ZV_BYTE - BEG_BYTE) + BEG; | 2470 | ZV = chars_in_text (BEG_ADDR, ZV_BYTE - BEG_BYTE) + BEG; |
| 2471 | 2471 | ||
| 2472 | { | 2472 | { |
| 2473 | int pt_byte = advance_to_char_boundary (PT_BYTE); | 2473 | EMACS_INT pt_byte = advance_to_char_boundary (PT_BYTE); |
| 2474 | int pt; | 2474 | EMACS_INT pt; |
| 2475 | 2475 | ||
| 2476 | if (pt_byte > GPT_BYTE) | 2476 | if (pt_byte > GPT_BYTE) |
| 2477 | pt = chars_in_text (GAP_END_ADDR, pt_byte - GPT_BYTE) + GPT; | 2477 | pt = chars_in_text (GAP_END_ADDR, pt_byte - GPT_BYTE) + GPT; |
| @@ -2642,13 +2642,13 @@ overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr, | |||
| 2642 | int idx = 0; | 2642 | int idx = 0; |
| 2643 | int len = *len_ptr; | 2643 | int len = *len_ptr; |
| 2644 | Lisp_Object *vec = *vec_ptr; | 2644 | Lisp_Object *vec = *vec_ptr; |
| 2645 | int next = ZV; | 2645 | EMACS_INT next = ZV; |
| 2646 | int prev = BEGV; | 2646 | EMACS_INT prev = BEGV; |
| 2647 | int inhibit_storing = 0; | 2647 | int inhibit_storing = 0; |
| 2648 | 2648 | ||
| 2649 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 2649 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 2650 | { | 2650 | { |
| 2651 | int startpos, endpos; | 2651 | EMACS_INT startpos, endpos; |
| 2652 | 2652 | ||
| 2653 | XSETMISC (overlay, tail); | 2653 | XSETMISC (overlay, tail); |
| 2654 | 2654 | ||
| @@ -2699,7 +2699,7 @@ overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr, | |||
| 2699 | 2699 | ||
| 2700 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 2700 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 2701 | { | 2701 | { |
| 2702 | int startpos, endpos; | 2702 | EMACS_INT startpos, endpos; |
| 2703 | 2703 | ||
| 2704 | XSETMISC (overlay, tail); | 2704 | XSETMISC (overlay, tail); |
| 2705 | 2705 | ||
| @@ -2773,22 +2773,23 @@ overlays_at (EMACS_INT pos, int extend, Lisp_Object **vec_ptr, int *len_ptr, | |||
| 2773 | But we still return the total number of overlays. */ | 2773 | But we still return the total number of overlays. */ |
| 2774 | 2774 | ||
| 2775 | static int | 2775 | static int |
| 2776 | overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr, | 2776 | overlays_in (EMACS_INT beg, EMACS_INT end, int extend, |
| 2777 | int *next_ptr, int *prev_ptr) | 2777 | Lisp_Object **vec_ptr, int *len_ptr, |
| 2778 | EMACS_INT *next_ptr, EMACS_INT *prev_ptr) | ||
| 2778 | { | 2779 | { |
| 2779 | Lisp_Object overlay, ostart, oend; | 2780 | Lisp_Object overlay, ostart, oend; |
| 2780 | struct Lisp_Overlay *tail; | 2781 | struct Lisp_Overlay *tail; |
| 2781 | int idx = 0; | 2782 | int idx = 0; |
| 2782 | int len = *len_ptr; | 2783 | int len = *len_ptr; |
| 2783 | Lisp_Object *vec = *vec_ptr; | 2784 | Lisp_Object *vec = *vec_ptr; |
| 2784 | int next = ZV; | 2785 | EMACS_INT next = ZV; |
| 2785 | int prev = BEGV; | 2786 | EMACS_INT prev = BEGV; |
| 2786 | int inhibit_storing = 0; | 2787 | int inhibit_storing = 0; |
| 2787 | int end_is_Z = end == Z; | 2788 | int end_is_Z = end == Z; |
| 2788 | 2789 | ||
| 2789 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 2790 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 2790 | { | 2791 | { |
| 2791 | int startpos, endpos; | 2792 | EMACS_INT startpos, endpos; |
| 2792 | 2793 | ||
| 2793 | XSETMISC (overlay, tail); | 2794 | XSETMISC (overlay, tail); |
| 2794 | 2795 | ||
| @@ -2838,7 +2839,7 @@ overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr, | |||
| 2838 | 2839 | ||
| 2839 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 2840 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 2840 | { | 2841 | { |
| 2841 | int startpos, endpos; | 2842 | EMACS_INT startpos, endpos; |
| 2842 | 2843 | ||
| 2843 | XSETMISC (overlay, tail); | 2844 | XSETMISC (overlay, tail); |
| 2844 | 2845 | ||
| @@ -2897,8 +2898,8 @@ overlays_in (int beg, int end, int extend, Lisp_Object **vec_ptr, int *len_ptr, | |||
| 2897 | int | 2898 | int |
| 2898 | mouse_face_overlay_overlaps (Lisp_Object overlay) | 2899 | mouse_face_overlay_overlaps (Lisp_Object overlay) |
| 2899 | { | 2900 | { |
| 2900 | int start = OVERLAY_POSITION (OVERLAY_START (overlay)); | 2901 | EMACS_INT start = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 2901 | int end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 2902 | EMACS_INT end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 2902 | int n, i, size; | 2903 | int n, i, size; |
| 2903 | Lisp_Object *v, tem; | 2904 | Lisp_Object *v, tem; |
| 2904 | 2905 | ||
| @@ -2924,14 +2925,14 @@ mouse_face_overlay_overlaps (Lisp_Object overlay) | |||
| 2924 | 2925 | ||
| 2925 | /* Fast function to just test if we're at an overlay boundary. */ | 2926 | /* Fast function to just test if we're at an overlay boundary. */ |
| 2926 | int | 2927 | int |
| 2927 | overlay_touches_p (int pos) | 2928 | overlay_touches_p (EMACS_INT pos) |
| 2928 | { | 2929 | { |
| 2929 | Lisp_Object overlay; | 2930 | Lisp_Object overlay; |
| 2930 | struct Lisp_Overlay *tail; | 2931 | struct Lisp_Overlay *tail; |
| 2931 | 2932 | ||
| 2932 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 2933 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 2933 | { | 2934 | { |
| 2934 | int endpos; | 2935 | EMACS_INT endpos; |
| 2935 | 2936 | ||
| 2936 | XSETMISC (overlay ,tail); | 2937 | XSETMISC (overlay ,tail); |
| 2937 | if (!OVERLAYP (overlay)) | 2938 | if (!OVERLAYP (overlay)) |
| @@ -2946,7 +2947,7 @@ overlay_touches_p (int pos) | |||
| 2946 | 2947 | ||
| 2947 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 2948 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 2948 | { | 2949 | { |
| 2949 | int startpos; | 2950 | EMACS_INT startpos; |
| 2950 | 2951 | ||
| 2951 | XSETMISC (overlay, tail); | 2952 | XSETMISC (overlay, tail); |
| 2952 | if (!OVERLAYP (overlay)) | 2953 | if (!OVERLAYP (overlay)) |
| @@ -2964,7 +2965,7 @@ overlay_touches_p (int pos) | |||
| 2964 | struct sortvec | 2965 | struct sortvec |
| 2965 | { | 2966 | { |
| 2966 | Lisp_Object overlay; | 2967 | Lisp_Object overlay; |
| 2967 | int beg, end; | 2968 | EMACS_INT beg, end; |
| 2968 | int priority; | 2969 | int priority; |
| 2969 | }; | 2970 | }; |
| 2970 | 2971 | ||
| @@ -3051,7 +3052,7 @@ struct sortstrlist | |||
| 3051 | struct sortstr *buf; /* An array that expands as needed; never freed. */ | 3052 | struct sortstr *buf; /* An array that expands as needed; never freed. */ |
| 3052 | int size; /* Allocated length of that array. */ | 3053 | int size; /* Allocated length of that array. */ |
| 3053 | int used; /* How much of the array is currently in use. */ | 3054 | int used; /* How much of the array is currently in use. */ |
| 3054 | int bytes; /* Total length of the strings in buf. */ | 3055 | EMACS_INT bytes; /* Total length of the strings in buf. */ |
| 3055 | }; | 3056 | }; |
| 3056 | 3057 | ||
| 3057 | /* Buffers for storing information about the overlays touching a given | 3058 | /* Buffers for storing information about the overlays touching a given |
| @@ -3062,7 +3063,7 @@ static struct sortstrlist overlay_heads, overlay_tails; | |||
| 3062 | static unsigned char *overlay_str_buf; | 3063 | static unsigned char *overlay_str_buf; |
| 3063 | 3064 | ||
| 3064 | /* Allocated length of overlay_str_buf. */ | 3065 | /* Allocated length of overlay_str_buf. */ |
| 3065 | static int overlay_str_len; | 3066 | static EMACS_INT overlay_str_len; |
| 3066 | 3067 | ||
| 3067 | /* A comparison function suitable for passing to qsort. */ | 3068 | /* A comparison function suitable for passing to qsort. */ |
| 3068 | static int | 3069 | static int |
| @@ -3080,7 +3081,7 @@ cmp_for_strings (const void *as1, const void *as2) | |||
| 3080 | static void | 3081 | static void |
| 3081 | record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size) | 3082 | record_overlay_string (struct sortstrlist *ssl, Lisp_Object str, Lisp_Object str2, Lisp_Object pri, int size) |
| 3082 | { | 3083 | { |
| 3083 | int nbytes; | 3084 | EMACS_INT nbytes; |
| 3084 | 3085 | ||
| 3085 | if (ssl->used == ssl->size) | 3086 | if (ssl->used == ssl->size) |
| 3086 | { | 3087 | { |
| @@ -3138,7 +3139,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | |||
| 3138 | { | 3139 | { |
| 3139 | Lisp_Object overlay, window, str; | 3140 | Lisp_Object overlay, window, str; |
| 3140 | struct Lisp_Overlay *ov; | 3141 | struct Lisp_Overlay *ov; |
| 3141 | int startpos, endpos; | 3142 | EMACS_INT startpos, endpos; |
| 3142 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 3143 | int multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| 3143 | 3144 | ||
| 3144 | overlay_heads.used = overlay_heads.bytes = 0; | 3145 | overlay_heads.used = overlay_heads.bytes = 0; |
| @@ -3208,9 +3209,9 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | |||
| 3208 | if (overlay_heads.bytes || overlay_tails.bytes) | 3209 | if (overlay_heads.bytes || overlay_tails.bytes) |
| 3209 | { | 3210 | { |
| 3210 | Lisp_Object tem; | 3211 | Lisp_Object tem; |
| 3211 | int i; | 3212 | EMACS_INT i; |
| 3212 | unsigned char *p; | 3213 | unsigned char *p; |
| 3213 | int total = overlay_heads.bytes + overlay_tails.bytes; | 3214 | EMACS_INT total = overlay_heads.bytes + overlay_tails.bytes; |
| 3214 | 3215 | ||
| 3215 | if (total > overlay_str_len) | 3216 | if (total > overlay_str_len) |
| 3216 | { | 3217 | { |
| @@ -3221,7 +3222,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | |||
| 3221 | p = overlay_str_buf; | 3222 | p = overlay_str_buf; |
| 3222 | for (i = overlay_tails.used; --i >= 0;) | 3223 | for (i = overlay_tails.used; --i >= 0;) |
| 3223 | { | 3224 | { |
| 3224 | int nbytes; | 3225 | EMACS_INT nbytes; |
| 3225 | tem = overlay_tails.buf[i].string; | 3226 | tem = overlay_tails.buf[i].string; |
| 3226 | nbytes = copy_text (SDATA (tem), p, | 3227 | nbytes = copy_text (SDATA (tem), p, |
| 3227 | SBYTES (tem), | 3228 | SBYTES (tem), |
| @@ -3230,7 +3231,7 @@ overlay_strings (EMACS_INT pos, struct window *w, unsigned char **pstr) | |||
| 3230 | } | 3231 | } |
| 3231 | for (i = 0; i < overlay_heads.used; ++i) | 3232 | for (i = 0; i < overlay_heads.used; ++i) |
| 3232 | { | 3233 | { |
| 3233 | int nbytes; | 3234 | EMACS_INT nbytes; |
| 3234 | tem = overlay_heads.buf[i].string; | 3235 | tem = overlay_heads.buf[i].string; |
| 3235 | nbytes = copy_text (SDATA (tem), p, | 3236 | nbytes = copy_text (SDATA (tem), p, |
| 3236 | SBYTES (tem), | 3237 | SBYTES (tem), |
| @@ -3295,7 +3296,7 @@ recenter_overlay_lists (struct buffer *buf, EMACS_INT pos) | |||
| 3295 | if (OVERLAY_POSITION (end) > pos) | 3296 | if (OVERLAY_POSITION (end) > pos) |
| 3296 | { | 3297 | { |
| 3297 | /* OVERLAY needs to be moved. */ | 3298 | /* OVERLAY needs to be moved. */ |
| 3298 | int where = OVERLAY_POSITION (beg); | 3299 | EMACS_INT where = OVERLAY_POSITION (beg); |
| 3299 | struct Lisp_Overlay *other, *other_prev; | 3300 | struct Lisp_Overlay *other, *other_prev; |
| 3300 | 3301 | ||
| 3301 | /* Splice the cons cell TAIL out of overlays_before. */ | 3302 | /* Splice the cons cell TAIL out of overlays_before. */ |
| @@ -3368,7 +3369,7 @@ recenter_overlay_lists (struct buffer *buf, EMACS_INT pos) | |||
| 3368 | if (OVERLAY_POSITION (end) <= pos) | 3369 | if (OVERLAY_POSITION (end) <= pos) |
| 3369 | { | 3370 | { |
| 3370 | /* OVERLAY needs to be moved. */ | 3371 | /* OVERLAY needs to be moved. */ |
| 3371 | int where = OVERLAY_POSITION (end); | 3372 | EMACS_INT where = OVERLAY_POSITION (end); |
| 3372 | struct Lisp_Overlay *other, *other_prev; | 3373 | struct Lisp_Overlay *other, *other_prev; |
| 3373 | 3374 | ||
| 3374 | /* Splice the cons cell TAIL out of overlays_after. */ | 3375 | /* Splice the cons cell TAIL out of overlays_after. */ |
| @@ -3440,7 +3441,7 @@ adjust_overlays_for_delete (EMACS_INT pos, EMACS_INT length) | |||
| 3440 | Such an overlay might even have negative size at this point. | 3441 | Such an overlay might even have negative size at this point. |
| 3441 | If so, we'll make the overlay empty. */ | 3442 | If so, we'll make the overlay empty. */ |
| 3442 | void | 3443 | void |
| 3443 | fix_start_end_in_overlays (register int start, register int end) | 3444 | fix_start_end_in_overlays (register EMACS_INT start, register EMACS_INT end) |
| 3444 | { | 3445 | { |
| 3445 | Lisp_Object overlay; | 3446 | Lisp_Object overlay; |
| 3446 | struct Lisp_Overlay *before_list, *after_list; | 3447 | struct Lisp_Overlay *before_list, *after_list; |
| @@ -3452,7 +3453,7 @@ fix_start_end_in_overlays (register int start, register int end) | |||
| 3452 | current_buffer->overlays_before or overlays_after, depending | 3453 | current_buffer->overlays_before or overlays_after, depending |
| 3453 | which loop we're in. */ | 3454 | which loop we're in. */ |
| 3454 | struct Lisp_Overlay *tail, *parent; | 3455 | struct Lisp_Overlay *tail, *parent; |
| 3455 | int startpos, endpos; | 3456 | EMACS_INT startpos, endpos; |
| 3456 | 3457 | ||
| 3457 | /* This algorithm shifts links around instead of consing and GCing. | 3458 | /* This algorithm shifts links around instead of consing and GCing. |
| 3458 | The loop invariant is that before_list (resp. after_list) is a | 3459 | The loop invariant is that before_list (resp. after_list) is a |
| @@ -3753,7 +3754,7 @@ modify_overlay (struct buffer *buf, EMACS_INT start, EMACS_INT end) | |||
| 3753 | { | 3754 | { |
| 3754 | if (start > end) | 3755 | if (start > end) |
| 3755 | { | 3756 | { |
| 3756 | int temp = start; | 3757 | EMACS_INT temp = start; |
| 3757 | start = end; | 3758 | start = end; |
| 3758 | end = temp; | 3759 | end = temp; |
| 3759 | } | 3760 | } |
| @@ -3844,8 +3845,8 @@ buffer. */) | |||
| 3844 | /* Redisplay where the overlay was. */ | 3845 | /* Redisplay where the overlay was. */ |
| 3845 | if (!NILP (obuffer)) | 3846 | if (!NILP (obuffer)) |
| 3846 | { | 3847 | { |
| 3847 | int o_beg; | 3848 | EMACS_INT o_beg; |
| 3848 | int o_end; | 3849 | EMACS_INT o_end; |
| 3849 | 3850 | ||
| 3850 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3851 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 3851 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3852 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| @@ -3859,7 +3860,7 @@ buffer. */) | |||
| 3859 | else | 3860 | else |
| 3860 | /* Redisplay the area the overlay has just left, or just enclosed. */ | 3861 | /* Redisplay the area the overlay has just left, or just enclosed. */ |
| 3861 | { | 3862 | { |
| 3862 | int o_beg, o_end; | 3863 | EMACS_INT o_beg, o_end; |
| 3863 | 3864 | ||
| 3864 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); | 3865 | o_beg = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 3865 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 3866 | o_end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| @@ -4037,7 +4038,7 @@ end of the buffer. */) | |||
| 4037 | /* Put all the overlays we want in a vector in overlay_vec. | 4038 | /* Put all the overlays we want in a vector in overlay_vec. |
| 4038 | Store the length in len. */ | 4039 | Store the length in len. */ |
| 4039 | noverlays = overlays_in (XINT (beg), XINT (end), 1, &overlay_vec, &len, | 4040 | noverlays = overlays_in (XINT (beg), XINT (end), 1, &overlay_vec, &len, |
| 4040 | (int *) 0, (int *) 0); | 4041 | NULL, NULL); |
| 4041 | 4042 | ||
| 4042 | /* Make a list of them all. */ | 4043 | /* Make a list of them all. */ |
| 4043 | result = Flist (noverlays, overlay_vec); | 4044 | result = Flist (noverlays, overlay_vec); |
| @@ -4280,7 +4281,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, int after, | |||
| 4280 | last_overlay_modification_hooks_used = 0; | 4281 | last_overlay_modification_hooks_used = 0; |
| 4281 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 4282 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 4282 | { | 4283 | { |
| 4283 | int startpos, endpos; | 4284 | EMACS_INT startpos, endpos; |
| 4284 | Lisp_Object ostart, oend; | 4285 | Lisp_Object ostart, oend; |
| 4285 | 4286 | ||
| 4286 | XSETMISC (overlay, tail); | 4287 | XSETMISC (overlay, tail); |
| @@ -4317,7 +4318,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, int after, | |||
| 4317 | 4318 | ||
| 4318 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 4319 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 4319 | { | 4320 | { |
| 4320 | int startpos, endpos; | 4321 | EMACS_INT startpos, endpos; |
| 4321 | Lisp_Object ostart, oend; | 4322 | Lisp_Object ostart, oend; |
| 4322 | 4323 | ||
| 4323 | XSETMISC (overlay, tail); | 4324 | XSETMISC (overlay, tail); |
| @@ -4409,7 +4410,7 @@ evaporate_overlays (EMACS_INT pos) | |||
| 4409 | if (pos <= current_buffer->overlay_center) | 4410 | if (pos <= current_buffer->overlay_center) |
| 4410 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) | 4411 | for (tail = current_buffer->overlays_before; tail; tail = tail->next) |
| 4411 | { | 4412 | { |
| 4412 | int endpos; | 4413 | EMACS_INT endpos; |
| 4413 | XSETMISC (overlay, tail); | 4414 | XSETMISC (overlay, tail); |
| 4414 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); | 4415 | endpos = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 4415 | if (endpos < pos) | 4416 | if (endpos < pos) |
| @@ -4421,7 +4422,7 @@ evaporate_overlays (EMACS_INT pos) | |||
| 4421 | else | 4422 | else |
| 4422 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) | 4423 | for (tail = current_buffer->overlays_after; tail; tail = tail->next) |
| 4423 | { | 4424 | { |
| 4424 | int startpos; | 4425 | EMACS_INT startpos; |
| 4425 | XSETMISC (overlay, tail); | 4426 | XSETMISC (overlay, tail); |
| 4426 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); | 4427 | startpos = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 4427 | if (startpos > pos) | 4428 | if (startpos > pos) |
diff --git a/src/lisp.h b/src/lisp.h index 10ee13f1e4f..98adb427f69 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -3015,10 +3015,10 @@ EXFUN (Foverlay_end, 1); | |||
| 3015 | EXFUN (Foverlay_buffer, 1); | 3015 | EXFUN (Foverlay_buffer, 1); |
| 3016 | extern void adjust_overlays_for_insert (EMACS_INT, EMACS_INT); | 3016 | extern void adjust_overlays_for_insert (EMACS_INT, EMACS_INT); |
| 3017 | extern void adjust_overlays_for_delete (EMACS_INT, EMACS_INT); | 3017 | extern void adjust_overlays_for_delete (EMACS_INT, EMACS_INT); |
| 3018 | extern void fix_start_end_in_overlays (int, int); | 3018 | extern void fix_start_end_in_overlays (EMACS_INT, EMACS_INT); |
| 3019 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, int, | 3019 | extern void report_overlay_modification (Lisp_Object, Lisp_Object, int, |
| 3020 | Lisp_Object, Lisp_Object, Lisp_Object); | 3020 | Lisp_Object, Lisp_Object, Lisp_Object); |
| 3021 | extern int overlay_touches_p (int); | 3021 | extern int overlay_touches_p (EMACS_INT); |
| 3022 | extern Lisp_Object Vbuffer_alist, Vinhibit_read_only; | 3022 | extern Lisp_Object Vbuffer_alist, Vinhibit_read_only; |
| 3023 | EXFUN (Fbuffer_list, 1); | 3023 | EXFUN (Fbuffer_list, 1); |
| 3024 | EXFUN (Fget_buffer, 1); | 3024 | EXFUN (Fget_buffer, 1); |