/* Updating of data structures for redisplay.
- Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 1997
+ Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 97, 1998
Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <stdio.h>
#include <ctype.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "lisp.h"
#include "termchar.h"
#include "termopts.h"
#include "indent.h"
#include "intervals.h"
#include "blockinput.h"
+#include "process.h"
+#include "keyboard.h"
/* I don't know why DEC Alpha OSF1 fail to compile this file if we
include the following file. */
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
+#define minmax(floor, val, ceil) \
+ ((val) < (floor) ? (floor) : (val) > (ceil) ? (ceil) : (val))
/* Get number of chars of output now in the buffer of a stdio stream.
This ought to be built in in stdio, but it isn't.
return Qnil;
}
+void
redraw_frame (f)
FRAME_PTR f;
{
int empty;
{
register int i;
- register width = FRAME_WINDOW_WIDTH (frame);
- register height = FRAME_HEIGHT (frame);
+ register int width = FRAME_WINDOW_WIDTH (frame);
+ register int height = FRAME_HEIGHT (frame);
register struct frame_glyphs *new
= (struct frame_glyphs *) xmalloc (sizeof (struct frame_glyphs));
/* cancel_line eliminates any request to display a line at position `vpos' */
+void
cancel_line (vpos, frame)
int vpos;
register FRAME_PTR frame;
FRAME_DESIRED_GLYPHS (frame)->enable[vpos] = 0;
}
+void
clear_frame_records (frame)
register FRAME_PTR frame;
{
into the FRAME_DESIRED_GLYPHS (frame) from the FRAME_PHYS_GLYPHS (frame)
so that update_frame will not change those columns. */
+void
preserve_other_columns (w)
struct window *w;
{
for internal consistency. We cannot check that they are "right";
we can only look for something nonsensical. */
+void
verify_charstarts (w)
struct window *w;
{
cancel the columns of that window, so that when the window is
displayed over again get_display_line will not complain. */
+void
cancel_my_columns (w)
struct window *w;
{
register int i;
int pause;
int preempt_count = baud_rate / 2400 + 1;
- extern input_pending;
+ extern int input_pending;
#ifdef HAVE_WINDOW_SYSTEM
register int downto, leftmost;
#endif
}
while (row > top && col == 0);
- if (col >= FRAME_WINDOW_WIDTH (f))
+ /* Make sure COL is not out of range. */
+ if (col >= FRAME_CURSOR_X_LIMIT (f))
{
- col = 0;
+ /* If we have another row, advance cursor into it. */
if (row < FRAME_HEIGHT (f) - 1)
- row++;
+ {
+ col = FRAME_LEFT_SCROLL_BAR_WIDTH (f);
+ row++;
+ }
+ /* Otherwise move it back in range. */
+ else
+ col = FRAME_CURSOR_X_LIMIT (f) - 1;
}
}
}
else
cursor_to (FRAME_CURSOR_Y (f),
- max (min (FRAME_CURSOR_X (f),
- FRAME_WINDOW_WIDTH (f) - 1), 0));
+ minmax (0, FRAME_CURSOR_X (f),
+ FRAME_CURSOR_X_LIMIT (f) - 1));
}
update_end (f);
extern void scrolling_1 ();
+int
scrolling (frame)
FRAME_PTR frame;
{
olen = nlen - (nsp - osp);
}
cursor_to (vpos, osp);
- insert_glyphs ((char *)0, nsp - osp);
+ insert_glyphs ((GLYPH *) 0, nsp - osp);
}
olen += nsp - osp;
/* Do any change in frame size that was requested by a signal. */
+void
do_pending_window_change ()
{
/* If window_change_signal should have run before, run it now. */
redisplay. Since this tries to resize windows, we can't call it
from a signal handler. */
+void
change_frame_size (f, newheight, newwidth, pretend, delay)
register FRAME_PTR f;
- int newheight, newwidth, pretend;
+ int newheight, newwidth, pretend, delay;
{
Lisp_Object tail, frame;
FRAME_HEIGHT (frame) = newheight;
SET_FRAME_WIDTH (frame, newwidth);
- if (FRAME_CURSOR_X (frame) >= FRAME_WINDOW_WIDTH (frame))
- FRAME_CURSOR_X (frame) = FRAME_WINDOW_WIDTH (frame) - 1;
+ if (FRAME_CURSOR_X (frame) >= FRAME_CURSOR_X_LIMIT (frame))
+ FRAME_CURSOR_X (frame) = FRAME_CURSOR_X_LIMIT (frame) - 1;
if (FRAME_CURSOR_Y (frame) >= FRAME_HEIGHT (frame))
FRAME_CURSOR_Y (frame) = FRAME_HEIGHT (frame) - 1;
{
/* ??? Perhaps we should do something special for multibyte strings here. */
CHECK_STRING (string, 0);
- fwrite (XSTRING (string)->data, 1, XSTRING (string)->size_byte, stdout);
+ fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)), stdout);
fflush (stdout);
if (termscript)
{
- fwrite (XSTRING (string)->data, 1, XSTRING (string)->size_byte, termscript);
+ fwrite (XSTRING (string)->data, 1, STRING_BYTES (XSTRING (string)),
+ termscript);
fflush (termscript);
}
return Qnil;
return Qnil;
}
+void
bitch_at_user ()
{
if (noninteractive)
/* Then invoke its decoding routine to set up variables
in the terminal package */
+void
init_display ()
{
#ifdef HAVE_X_WINDOWS
#endif /* SIGWINCH */
}
\f
+void
syms_of_display ()
{
defsubr (&Sredraw_frame);