address of this function is used. */
void
-safe_bcopy (from, to, size)
- const char *from;
- char *to;
- int size;
+safe_bcopy (const char *from, char *to, int size)
{
if (size <= 0 || from == to)
return;
POOL, the structure is otherwise zeroed. */
struct glyph_matrix *
-new_glyph_matrix (pool)
- struct glyph_pool *pool;
+new_glyph_matrix (struct glyph_pool *pool)
{
struct glyph_matrix *result;
matrix also frees the glyph memory in this case. */
static void
-free_glyph_matrix (matrix)
- struct glyph_matrix *matrix;
+free_glyph_matrix (struct glyph_matrix *matrix)
{
if (matrix)
{
or a float. */
static int
-margin_glyphs_to_reserve (w, total_glyphs, margin)
- struct window *w;
- int total_glyphs;
- Lisp_Object margin;
+margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin)
{
int n;
leads to screen flickering. */
static void
-adjust_glyph_matrix (w, matrix, x, y, dim)
- struct window *w;
- struct glyph_matrix *matrix;
- int x, y;
- struct dim dim;
+adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y, struct dim dim)
{
int i;
int new_rows;
below). */
static void
-reverse_rows (matrix, start, end)
- struct glyph_matrix *matrix;
- int start, end;
+reverse_rows (struct glyph_matrix *matrix, int start, int end)
{
int i, j;
rotating right. */
void
-rotate_matrix (matrix, first, last, by)
- struct glyph_matrix *matrix;
- int first, last, by;
+rotate_matrix (struct glyph_matrix *matrix, int first, int last, int by)
{
if (by < 0)
{
DELTA_BYTES. */
void
-increment_matrix_positions (matrix, start, end, delta, delta_bytes)
- struct glyph_matrix *matrix;
- int start, end, delta, delta_bytes;
+increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, int delta, int delta_bytes)
{
/* Check that START and END are reasonable values. */
xassert (start >= 0 && start <= matrix->nrows);
ENABLED_P is non-zero, enabled_p flags in rows will be set to 1. */
void
-enable_glyph_matrix_rows (matrix, start, end, enabled_p)
- struct glyph_matrix *matrix;
- int start, end;
- int enabled_p;
+enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p)
{
xassert (start <= end);
xassert (start >= 0 && start < matrix->nrows);
currently present is the flag MATRIX->no_scrolling_p. */
void
-clear_glyph_matrix (matrix)
- struct glyph_matrix *matrix;
+clear_glyph_matrix (struct glyph_matrix *matrix)
{
if (matrix)
{
and recompute their visible height. */
void
-shift_glyph_matrix (w, matrix, start, end, dy)
- struct window *w;
- struct glyph_matrix *matrix;
- int start, end, dy;
+shift_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int start, int end, int dy)
{
int min_y, max_y;
current matrix. */
void
-clear_current_matrices (f)
- register struct frame *f;
+clear_current_matrices (register struct frame *f)
{
/* Clear frame current matrix, if we have one. */
if (f->current_matrix)
/* Clear out all display lines of F for a coming redisplay. */
void
-clear_desired_matrices (f)
- register struct frame *f;
+clear_desired_matrices (register struct frame *f)
{
if (f->desired_matrix)
clear_glyph_matrix (f->desired_matrix);
non-zero clear desired matrices, otherwise clear current matrices. */
static void
-clear_window_matrices (w, desired_p)
- struct window *w;
- int desired_p;
+clear_window_matrices (struct window *w, int desired_p)
{
while (w)
{
static struct glyph_row null_row;
void
-clear_glyph_row (row)
- struct glyph_row *row;
+clear_glyph_row (struct glyph_row *row)
{
struct glyph *p[1 + LAST_AREA];
in window W starting at y-position Y. */
void
-blank_row (w, row, y)
- struct window *w;
- struct glyph_row *row;
- int y;
+blank_row (struct window *w, struct glyph_row *row, int y)
{
int min_y, max_y;
ends. */
void
-increment_row_positions (row, delta, delta_bytes)
- struct glyph_row *row;
- int delta, delta_bytes;
+increment_row_positions (struct glyph_row *row, int delta, int delta_bytes)
{
int area, i;
/* Exchange pointers to glyph memory between glyph rows A and B. */
static INLINE void
-swap_glyph_pointers (a, b)
- struct glyph_row *a, *b;
+swap_glyph_pointers (struct glyph_row *a, struct glyph_row *b)
{
int i;
for (i = 0; i < LAST_AREA + 1; ++i)
that glyph pointers in the structures are left unchanged. */
INLINE void
-copy_row_except_pointers (to, from)
- struct glyph_row *to, *from;
+copy_row_except_pointers (struct glyph_row *to, struct glyph_row *from)
{
struct glyph *pointers[1 + LAST_AREA];
positions in row TO by DELTA/ DELTA_BYTES. */
void
-copy_glyph_row_contents (to, from, delta, delta_bytes)
- struct glyph_row *to, *from;
- int delta, delta_bytes;
+copy_glyph_row_contents (struct glyph_row *to, struct glyph_row *from, int delta, int delta_bytes)
{
int area;
a memory leak. */
static INLINE void
-assign_row (to, from)
- struct glyph_row *to, *from;
+assign_row (struct glyph_row *to, struct glyph_row *from)
{
swap_glyph_pointers (to, from);
copy_row_except_pointers (to, from);
call to this function really clears it. */
void
-prepare_desired_row (row)
- struct glyph_row *row;
+prepare_desired_row (struct glyph_row *row)
{
if (!row->enabled_p)
{
/* Return a hash code for glyph row ROW. */
int
-line_hash_code (row)
- struct glyph_row *row;
+line_hash_code (struct glyph_row *row)
{
int hash = 0;
zero, leading and trailing spaces are ignored. */
static unsigned int
-line_draw_cost (matrix, vpos)
- struct glyph_matrix *matrix;
- int vpos;
+line_draw_cost (struct glyph_matrix *matrix, int vpos)
{
struct glyph_row *row = matrix->rows + vpos;
struct glyph *beg = row->glyphs[TEXT_AREA];
flags of A and B, too. */
static INLINE int
-row_equal_p (w, a, b, mouse_face_p)
- struct window *w;
- struct glyph_row *a, *b;
- int mouse_face_p;
+row_equal_p (struct window *w, struct glyph_row *a, struct glyph_row *b, int mouse_face_p)
{
if (a == b)
return 1;
incremented for each pool allocated. */
static struct glyph_pool *
-new_glyph_pool ()
+new_glyph_pool (void)
{
struct glyph_pool *result;
was passed to free_glyph_pool. */
static void
-free_glyph_pool (pool)
- struct glyph_pool *pool;
+free_glyph_pool (struct glyph_pool *pool)
{
if (pool)
{
re-adjusting window glyph matrices necessary. */
static int
-realloc_glyph_pool (pool, matrix_dim)
- struct glyph_pool *pool;
- struct dim matrix_dim;
+realloc_glyph_pool (struct glyph_pool *pool, struct dim matrix_dim)
{
int needed;
int changed_p;
/* Return the required height of glyph matrices for window W. */
int
-required_matrix_height (w)
- struct window *w;
+required_matrix_height (struct window *w)
{
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (w->frame);
/* Return the required width of glyph matrices for window W. */
int
-required_matrix_width (w)
- struct window *w;
+required_matrix_width (struct window *w)
{
#ifdef HAVE_WINDOW_SYSTEM
struct frame *f = XFRAME (w->frame);
window whose matrices must be allocated/reallocated. */
static void
-allocate_matrices_for_window_redisplay (w)
- struct window *w;
+allocate_matrices_for_window_redisplay (struct window *w)
{
while (w)
{
changes, or its window configuration changes. */
void
-adjust_glyphs (f)
- struct frame *f;
+adjust_glyphs (struct frame *f)
{
/* Block input so that expose events and other events that access
glyph matrices are not processed while we are changing them. */
windows to estimated values. */
static void
-adjust_frame_glyphs_initially ()
+adjust_frame_glyphs_initially (void)
{
struct frame *sf = SELECTED_FRAME ();
struct window *root = XWINDOW (sf->root_window);
/* Allocate/reallocate glyph matrices of a single frame F. */
static void
-adjust_frame_glyphs (f)
- struct frame *f;
+adjust_frame_glyphs (struct frame *f)
{
if (FRAME_WINDOW_P (f))
adjust_frame_glyphs_for_window_redisplay (f);
/* Return 1 if any window in the tree has nonzero window margins. See
the hack at the end of adjust_frame_glyphs_for_frame_redisplay. */
static int
-showing_window_margins_p (w)
- struct window *w;
+showing_window_margins_p (struct window *w)
{
while (w)
{
windows from the frame's current matrix. */
static void
-fake_current_matrices (window)
- Lisp_Object window;
+fake_current_matrices (Lisp_Object window)
{
struct window *w;
a glyph matrix holding the contents of F's current frame matrix. */
static struct glyph_matrix *
-save_current_matrix (f)
- struct frame *f;
+save_current_matrix (struct frame *f)
{
int i;
struct glyph_matrix *saved;
and free memory associated with SAVED. */
static void
-restore_current_matrix (f, saved)
- struct frame *f;
- struct glyph_matrix *saved;
+restore_current_matrix (struct frame *f, struct glyph_matrix *saved)
{
int i;
frame-based redisplay. */
static void
-adjust_frame_glyphs_for_frame_redisplay (f)
- struct frame *f;
+adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
{
struct dim matrix_dim;
int pool_changed_p;
window-based redisplay. */
static void
-adjust_frame_glyphs_for_window_redisplay (f)
- struct frame *f;
+adjust_frame_glyphs_for_window_redisplay (struct frame *f)
{
struct window *w;
eventually without causing trouble). */
static void
-adjust_frame_message_buffer (f)
- struct frame *f;
+adjust_frame_message_buffer (struct frame *f)
{
int size = FRAME_MESSAGE_BUF_SIZE (f) + 1;
/* Re-allocate buffer for decode_mode_spec on frame F. */
static void
-adjust_decode_mode_spec_buffer (f)
- struct frame *f;
+adjust_decode_mode_spec_buffer (struct frame *f)
{
f->decode_mode_spec_buffer
= (char *) xrealloc (f->decode_mode_spec_buffer,
the function is called when F is destroyed. */
void
-free_glyphs (f)
- struct frame *f;
+free_glyphs (struct frame *f)
{
if (f && f->glyphs_initialized_p)
{
the same tree more than once. */
void
-free_window_matrices (w)
- struct window *w;
+free_window_matrices (struct window *w)
{
while (w)
{
explicitly and check that nothing is left allocated. */
void
-check_glyph_memory ()
+check_glyph_memory (void)
{
Lisp_Object tail, frame;
sure not to touch them in this function. */
static void
-build_frame_matrix (f)
- struct frame *f;
+build_frame_matrix (struct frame *f)
{
int i;
matrices. W is the root of a window tree. */
static void
-build_frame_matrix_from_window_tree (matrix, w)
- struct glyph_matrix *matrix;
- struct window *w;
+build_frame_matrix_from_window_tree (struct glyph_matrix *matrix, struct window *w)
{
while (w)
{
preserve_other_columns in the old redisplay. */
static void
-build_frame_matrix_from_leaf_window (frame_matrix, w)
- struct glyph_matrix *frame_matrix;
- struct window *w;
+build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct window *w)
{
struct glyph_matrix *window_matrix;
int window_y, frame_y;
for instance, vertical separators, truncation markers, etc. */
void
-spec_glyph_lookup_face (w, glyph)
- struct window *w;
- GLYPH *glyph;
+spec_glyph_lookup_face (struct window *w, GLYPH *glyph)
{
int lface_id = GLYPH_FACE (*glyph);
/* Convert the glyph's specified face to a realized (cache) face. */
To be called for frame-based redisplay, only. */
static void
-fill_up_glyph_row_with_spaces (row)
- struct glyph_row *row;
+fill_up_glyph_row_with_spaces (struct glyph_row *row)
{
fill_up_glyph_row_area_with_spaces (row, LEFT_MARGIN_AREA);
fill_up_glyph_row_area_with_spaces (row, TEXT_AREA);
frame-based redisplay only. */
static void
-fill_up_glyph_row_area_with_spaces (row, area)
- struct glyph_row *row;
- int area;
+fill_up_glyph_row_area_with_spaces (struct glyph_row *row, int area)
{
if (row->glyphs[area] < row->glyphs[area + 1])
{
reached. In frame matrices only one area, TEXT_AREA, is used. */
static void
-fill_up_frame_row_with_spaces (row, upto)
- struct glyph_row *row;
- int upto;
+fill_up_frame_row_with_spaces (struct glyph_row *row, int upto)
{
int i = row->used[TEXT_AREA];
struct glyph *glyph = row->glyphs[TEXT_AREA];
working on frame matrices or not. */
static INLINE void
-set_frame_matrix_frame (f)
- struct frame *f;
+set_frame_matrix_frame (struct frame *f)
{
frame_matrix_frame = f;
}
operations in window matrices of frame_matrix_frame. */
static INLINE void
-make_current (desired_matrix, current_matrix, row)
- struct glyph_matrix *desired_matrix, *current_matrix;
- int row;
+make_current (struct glyph_matrix *desired_matrix, struct glyph_matrix *current_matrix, int row)
{
struct glyph_row *current_row = MATRIX_ROW (current_matrix, row);
struct glyph_row *desired_row = MATRIX_ROW (desired_matrix, row);
matrices of leaf windows in the window tree rooted at W. */
static void
-mirror_make_current (w, frame_row)
- struct window *w;
- int frame_row;
+mirror_make_current (struct window *w, int frame_row)
{
while (w)
{
the current frame matrix. */
static void
-sync_window_with_frame_matrix_rows (w)
- struct window *w;
+sync_window_with_frame_matrix_rows (struct window *w)
{
struct frame *f = XFRAME (w->frame);
struct glyph_row *window_row, *window_row_end, *frame_row;
row ROW. Value is null if none is found. */
struct window *
-frame_row_to_window (w, row)
- struct window *w;
- int row;
+frame_row_to_window (struct window *w, int row)
{
struct window *found = NULL;
which is empty. */
static void
-mirror_line_dance (w, unchanged_at_top, nlines, copy_from, retained_p)
- struct window *w;
- int unchanged_at_top, nlines;
- int *copy_from;
- char *retained_p;
+mirror_line_dance (struct window *w, int unchanged_at_top, int nlines, int *copy_from, char *retained_p)
{
while (w)
{
function redraw-frame. */
void
-redraw_frame (f)
- struct frame *f;
+redraw_frame (struct frame *f)
{
Lisp_Object frame;
XSETFRAME (frame, f);
visible frames marked as garbaged. */
void
-redraw_garbaged_frames ()
+redraw_garbaged_frames (void)
{
Lisp_Object tail, frame;
Value is non-zero if redisplay was stopped due to pending input. */
int
-update_frame (f, force_p, inhibit_hairy_id_p)
- struct frame *f;
- int force_p;
- int inhibit_hairy_id_p;
+update_frame (struct frame *f, int force_p, int inhibit_hairy_id_p)
{
/* 1 means display has been paused because of pending input. */
int paused_p;
don't stop updating when input is pending. */
static int
-update_window_tree (w, force_p)
- struct window *w;
- int force_p;
+update_window_tree (struct window *w, int force_p)
{
int paused_p = 0;
FORCE_P is non-zero, don't stop updating if input is pending. */
void
-update_single_window (w, force_p)
- struct window *w;
- int force_p;
+update_single_window (struct window *w, int force_p)
{
if (w->must_be_updated_p)
{
overlapped by other rows. YB is bottom-most y-position in W. */
static void
-redraw_overlapped_rows (w, yb)
- struct window *w;
- int yb;
+redraw_overlapped_rows (struct window *w, int yb)
{
int i;
struct frame *f = XFRAME (WINDOW_FRAME (w));
others. YB is bottom-most y-position in W. */
static void
-redraw_overlapping_rows (w, yb)
- struct window *w;
- int yb;
+redraw_overlapping_rows (struct window *w, int yb)
{
int i, bottom_y;
struct glyph_row *row;
which is below what's displayed in the window. */
void
-check_current_matrix_flags (w)
- struct window *w;
+check_current_matrix_flags (struct window *w)
{
int last_seen_p = 0;
int i, yb = window_text_bottom_y (w);
not stop when detecting pending input. */
static int
-update_window (w, force_p)
- struct window *w;
- int force_p;
+update_window (struct window *w, int force_p)
{
struct glyph_matrix *desired_matrix = w->desired_matrix;
int paused_p;
AREA can be either LEFT_MARGIN_AREA or RIGHT_MARGIN_AREA. */
static void
-update_marginal_area (w, area, vpos)
- struct window *w;
- int area, vpos;
+update_marginal_area (struct window *w, int area, int vpos)
{
struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
Value is non-zero if display has changed. */
static int
-update_text_area (w, vpos)
- struct window *w;
- int vpos;
+update_text_area (struct window *w, int vpos)
{
struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos);
struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
changed. */
static int
-update_window_line (w, vpos, mouse_face_overwritten_p)
- struct window *w;
- int vpos, *mouse_face_overwritten_p;
+update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
{
struct glyph_row *current_row = MATRIX_ROW (w->current_matrix, vpos);
struct glyph_row *desired_row = MATRIX_ROW (w->desired_matrix, vpos);
be called from update_window. */
static void
-set_window_cursor_after_update (w)
- struct window *w;
+set_window_cursor_after_update (struct window *w)
{
struct frame *f = XFRAME (w->frame);
struct redisplay_interface *rif = FRAME_RIF (f);
tree rooted at W. */
void
-set_window_update_flags (w, on_p)
- struct window *w;
- int on_p;
+set_window_update_flags (struct window *w, int on_p)
{
while (w)
{
of window W. */
static INLINE struct row_entry *
-add_row_entry (w, row)
- struct window *w;
- struct glyph_row *row;
+add_row_entry (struct window *w, struct glyph_row *row)
{
struct row_entry *entry;
int i = row->hash % row_table_size;
1 if we did scroll. */
static int
-scrolling_window (w, header_line_p)
- struct window *w;
- int header_line_p;
+scrolling_window (struct window *w, int header_line_p)
{
struct glyph_matrix *desired_matrix = w->desired_matrix;
struct glyph_matrix *current_matrix = w->current_matrix;
Value is non-zero if update was stopped due to pending input. */
static int
-update_frame_1 (f, force_p, inhibit_id_p)
- struct frame *f;
- int force_p;
- int inhibit_id_p;
+update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
{
/* Frame matrices to work on. */
struct glyph_matrix *current_matrix = f->current_matrix;
/* Do line insertions/deletions on frame F for frame-based redisplay. */
int
-scrolling (frame)
- struct frame *frame;
+scrolling (struct frame *frame)
{
int unchanged_at_top, unchanged_at_bottom;
int window_size;
which is LEN glyphs long. */
static int
-count_blanks (r, len)
- struct glyph *r;
- int len;
+count_blanks (struct glyph *r, int len)
{
int i;
of STR2. Value is the number of equal glyphs equal at the start. */
static int
-count_match (str1, end1, str2, end2)
- struct glyph *str1, *end1, *str2, *end2;
+count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct glyph *end2)
{
struct glyph *p1 = str1;
struct glyph *p2 = str2;
/* Perform a frame-based update on line VPOS in frame FRAME. */
static void
-update_frame_line (f, vpos)
- struct frame *f;
- int vpos;
+update_frame_line (struct frame *f, int vpos)
{
struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
int tem;
Adjust *X and *Y to character positions. */
Lisp_Object
-buffer_posn_from_coords (w, x, y, pos, object, dx, dy, width, height)
- struct window *w;
- int *x, *y;
- struct display_pos *pos;
- Lisp_Object *object;
- int *dx, *dy;
- int *width, *height;
+buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *pos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
{
struct it it;
Lisp_Object old_current_buffer = Fcurrent_buffer ();
*CHARPOS is set to the position in the string returned. */
Lisp_Object
-mode_line_string (w, part, x, y, charpos, object, dx, dy, width, height)
- struct window *w;
- enum window_part part;
- int *x, *y;
- int *charpos;
- Lisp_Object *object;
- int *dx, *dy;
- int *width, *height;
+mode_line_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
{
struct glyph_row *row;
struct glyph *glyph, *end;
the string returned. */
Lisp_Object
-marginal_area_string (w, part, x, y, charpos, object, dx, dy, width, height)
- struct window *w;
- enum window_part part;
- int *x, *y;
- int *charpos;
- Lisp_Object *object;
- int *dx, *dy;
- int *width, *height;
+marginal_area_string (struct window *w, enum window_part part, int *x, int *y, int *charpos, Lisp_Object *object, int *dx, int *dy, int *width, int *height)
{
struct glyph_row *row = w->current_matrix->rows;
struct glyph *glyph, *end;
#ifdef SIGWINCH
SIGTYPE
-window_change_signal (signalnum) /* If we don't have an argument, */
- int signalnum; /* some compilers complain in signal calls. */
+window_change_signal (int signalnum) /* If we don't have an argument, */
+ /* some compilers complain in signal calls. */
{
int width, height;
int old_errno = errno;
safe to change frame sizes while a redisplay is in progress. */
void
-do_pending_window_change (safe)
- int safe;
+do_pending_window_change (int safe)
{
/* If window_change_signal should have run before, run it now. */
if (redisplaying_p && !safe)
safe to change frame sizes while a redisplay is in progress. */
void
-change_frame_size (f, newheight, newwidth, pretend, delay, safe)
- register struct frame *f;
- int newheight, newwidth, pretend, delay, safe;
+change_frame_size (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe)
{
Lisp_Object tail, frame;
}
static void
-change_frame_size_1 (f, newheight, newwidth, pretend, delay, safe)
- register struct frame *f;
- int newheight, newwidth, pretend, delay, safe;
+change_frame_size_1 (register struct frame *f, int newheight, int newwidth, int pretend, int delay, int safe)
{
int new_frame_total_cols;
int count = SPECPDL_INDEX ();
}
void
-bitch_at_user ()
+bitch_at_user (void)
{
if (noninteractive)
putchar (07);
*/
Lisp_Object
-sit_for (timeout, reading, do_display)
- Lisp_Object timeout;
- int reading, do_display;
+sit_for (Lisp_Object timeout, int reading, int do_display)
{
int sec, usec;
decoding routine to set up variables in the terminal package. */
void
-init_display ()
+init_display (void)
{
char *terminal_type;
***********************************************************************/
void
-syms_of_display ()
+syms_of_display (void)
{
defsubr (&Sredraw_frame);
defsubr (&Sredraw_display);