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.
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;
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;
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);
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));
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)
(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);
{
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) */
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;
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)
&& 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;
/* 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. */