-/* Calculate what line insertion or deletion to do, and do it,
- Copyright (C) 1985, 1986, 1990, 1993, 1994, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Calculate what line insertion or deletion to do, and do it
+
+Copyright (C) 1985-1986, 1990, 1993-1994, 2001-2011
+ Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <config.h>
#include <stdio.h>
-#include <string.h>
#include <setjmp.h>
#include "lisp.h"
#include "termchar.h"
int free_at_end)
{
register int i, j;
- int frame_lines = FRAME_LINES (frame);
+ EMACS_INT frame_lines = FRAME_LINES (frame);
register struct matrix_elt *p, *p1;
register int cost, cost1;
/* Discourage long scrolls on fast lines.
Don't scroll nearly a full frame height unless it saves
at least 1/4 second. */
- int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame));
+ int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame)));
if (baud_rate <= 0)
extra_cost = 1;
for (k = 0; k < window_size; ++k)
copy_from[k] = -1;
-#define CHECK_BOUNDS \
+#if GLYPH_DEBUG
+# define CHECK_BOUNDS \
do \
{ \
int k; \
|| (copy_from[k] >= 0 && copy_from[k] < window_size)); \
} \
while (0);
+#endif
/* When j is advanced, this corresponds to deleted lines.
When i is advanced, this corresponds to inserted lines. */
int free_at_end)
{
register int i, j;
- int frame_lines = FRAME_LINES (frame);
+ EMACS_INT frame_lines = FRAME_LINES (frame);
register struct matrix_elt *p, *p1;
register int cost, cost1, delta;
/* Discourage long scrolls on fast lines.
Don't scroll nearly a full frame height unless it saves
at least 1/4 second. */
- int extra_cost = baud_rate / (10 * 4 * FRAME_LINES (frame));
+ int extra_cost = (int) (baud_rate / (10 * 4 * FRAME_LINES (frame)));
if (baud_rate <= 0)
extra_cost = 1;
\f
/* Return a measure of the cost of moving the lines starting with vpos
FROM, up to but not including vpos TO, down by AMOUNT lines (AMOUNT
- may be negative). These are the same arguments that might be given
- to scroll_frame_lines to perform this scrolling. */
+ may be negative). */
int
scroll_cost (FRAME_PTR frame, int from, int to, int amount)
{
/* Compute how many lines, at bottom of frame,
will not be involved in actual motion. */
- int limit = to;
- int offset;
- int height = FRAME_LINES (frame);
+ EMACS_INT limit = to;
+ EMACS_INT offset;
+ EMACS_INT height = FRAME_LINES (frame);
if (amount == 0)
return 0;
static void
line_ins_del (FRAME_PTR frame, int ov1, int pf1, int ovn, int pfn, register int *ov, register int *mf)
{
- register int i;
- register int frame_lines = FRAME_LINES (frame);
+ register EMACS_INT i;
+ register EMACS_INT frame_lines = FRAME_LINES (frame);
register int insert_overhead = ov1 * 10;
register int next_insert_cost = ovn * 10;
FRAME_DELETE_COST (frame), FRAME_DELETEN_COST (frame),
coefficient);
}
-
-/* arch-tag: cdb7149c-48e7-4793-a948-2786c8e45485
- (do not change this comment) */