Mercurial > emacs
changeset 110562:ea50a897140e
Fix int/EMACS_INT use in process.c and term.c.
term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT
for buffer positions.
process.c (read_process_output, send_process)
(Fprocess_send_region, status_notify): Use EMACS_INT for buffer
and string positions and size.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 25 Sep 2010 08:31:15 -0400 |
parents | 93141d34a175 |
children | 5b5c2cab9a6a |
files | src/ChangeLog src/process.c src/term.c |
diffstat | 3 files changed, 28 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sat Sep 25 14:04:35 2010 +0200 +++ b/src/ChangeLog Sat Sep 25 08:31:15 2010 -0400 @@ -1,5 +1,12 @@ 2010-09-25 Eli Zaretskii <eliz@gnu.org> + * term.c (fast_find_position, term_mouse_highlight): Use EMACS_INT + for buffer positions. + + * process.c (read_process_output, send_process) + (Fprocess_send_region, status_notify): Use EMACS_INT for buffer + and string positions and size. + * print.c (print_object, print_string, strout): Use EMACS_INT for string indices.
--- a/src/process.c Sat Sep 25 14:04:35 2010 +0200 +++ b/src/process.c Sat Sep 25 08:31:15 2010 -0400 @@ -5075,7 +5075,7 @@ char *chars; register Lisp_Object outstream; register struct Lisp_Process *p = XPROCESS (proc); - register int opoint; + register EMACS_INT opoint; struct coding_system *coding = proc_decode_coding_system[channel]; int carryover = p->decoding_carryover; int readmax = 4096; @@ -5265,10 +5265,10 @@ else if (!NILP (p->buffer) && !NILP (XBUFFER (p->buffer)->name)) { Lisp_Object old_read_only; - int old_begv, old_zv; - int old_begv_byte, old_zv_byte; - int before, before_byte; - int opoint_byte; + EMACS_INT old_begv, old_zv; + EMACS_INT old_begv_byte, old_zv_byte; + EMACS_INT before, before_byte; + EMACS_INT opoint_byte; Lisp_Object text; struct buffer *b; @@ -5405,11 +5405,11 @@ static void send_process (volatile Lisp_Object proc, const unsigned char *volatile buf, - volatile int len, volatile Lisp_Object object) + volatile EMACS_INT len, volatile Lisp_Object object) { /* Use volatile to protect variables from being clobbered by longjmp. */ struct Lisp_Process *p = XPROCESS (proc); - int rv; + EMACS_INT rv; struct coding_system *coding; struct gcpro gcpro1; SIGTYPE (*volatile old_sigpipe) (int); @@ -5466,8 +5466,8 @@ coding->dst_object = Qt; if (BUFFERP (object)) { - int from_byte, from, to; - int save_pt, save_pt_byte; + EMACS_INT from_byte, from, to; + EMACS_INT save_pt, save_pt_byte; struct buffer *cur = current_buffer; set_buffer_internal (XBUFFER (object)); @@ -5519,7 +5519,7 @@ process_sent_to = proc; while (len > 0) { - int this = len; + EMACS_INT this = len; /* Send this batch, using one or more write calls. */ while (this > 0) @@ -5653,7 +5653,7 @@ (Lisp_Object process, Lisp_Object start, Lisp_Object end) { Lisp_Object proc; - int start1, end1; + EMACS_INT start1, end1; proc = get_process (process); validate_region (&start, &end); @@ -6594,8 +6594,8 @@ { Lisp_Object tem; struct buffer *old = current_buffer; - int opoint, opoint_byte; - int before, before_byte; + EMACS_INT opoint, opoint_byte; + EMACS_INT before, before_byte; /* Avoid error if buffer is deleted (probably that's why the process is dead, too) */
--- a/src/term.c Sat Sep 25 14:04:35 2010 +0200 +++ b/src/term.c Sat Sep 25 08:31:15 2010 -0400 @@ -2618,9 +2618,10 @@ If POS is after end of W, return end of last line in W. - taken from msdos.c */ static int -fast_find_position (struct window *w, int pos, int *hpos, int *vpos) +fast_find_position (struct window *w, EMACS_INT pos, int *hpos, int *vpos) { - int i, lastcol, line_start_position, maybe_next_line_p = 0; + int i, lastcol, maybe_next_line_p = 0; + EMACS_INT line_start_position; int yb = window_text_bottom_y (w); struct glyph_row *row = MATRIX_ROW (w->current_matrix, 0), *best_row = row; @@ -2658,7 +2659,7 @@ for (i = 0; i < row->used[TEXT_AREA]; i++) { struct glyph *glyph = row->glyphs[TEXT_AREA] + i; - int charpos; + EMACS_INT charpos; charpos = glyph->charpos; if (charpos == pos) @@ -2719,7 +2720,8 @@ && XFASTINT (w->last_modified) == BUF_MODIFF (b) && XFASTINT (w->last_overlay_modified) == BUF_OVERLAY_MODIFF (b)) { - int pos, i, nrows = w->current_matrix->nrows; + int i, nrows = w->current_matrix->nrows; + EMACS_INT pos; struct glyph_row *row; struct glyph *glyph; @@ -2763,7 +2765,8 @@ /* Check for mouse-face. */ { Lisp_Object mouse_face, overlay, position, *overlay_vec; - int noverlays, obegv, ozv; + int noverlays; + EMACS_INT obegv, ozv; struct buffer *obuf; /* If we get an out-of-range value, return now; avoid an error. */