Replace two macros with functions in dispnew.c (bug#75056)
* src/dispnew.c (WINDOW_TO_FRAME_VPOS, WINDOW_TO_FRAME_VPOS): Macros removed. (window_to_frame_vpos, window_to_frame_vpos): Always define, and use them instead of the removed macros.
This commit is contained in:
parent
6cf479931d
commit
7aacefba6b
1 changed files with 4 additions and 19 deletions
|
@ -139,11 +139,6 @@ static int glyph_pool_count;
|
|||
|
||||
#ifdef GLYPH_DEBUG
|
||||
|
||||
static int window_to_frame_vpos (struct window *, int);
|
||||
static int window_to_frame_hpos (struct window *, int);
|
||||
#define WINDOW_TO_FRAME_VPOS(W, VPOS) window_to_frame_vpos (W, VPOS)
|
||||
#define WINDOW_TO_FRAME_HPOS(W, HPOS) window_to_frame_hpos (W, HPOS)
|
||||
|
||||
/* One element of the ring buffer containing redisplay history
|
||||
information. */
|
||||
|
||||
|
@ -235,11 +230,6 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history,
|
|||
}
|
||||
|
||||
|
||||
#else /* not GLYPH_DEBUG */
|
||||
|
||||
#define WINDOW_TO_FRAME_VPOS(W, VPOS) ((VPOS) + WINDOW_TOP_EDGE_LINE (W))
|
||||
#define WINDOW_TO_FRAME_HPOS(W, HPOS) ((HPOS) + WINDOW_LEFT_EDGE_COL (W))
|
||||
|
||||
#endif /* GLYPH_DEBUG */
|
||||
|
||||
|
||||
|
@ -3167,8 +3157,6 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
|
|||
VPOS and HPOS translations
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef GLYPH_DEBUG
|
||||
|
||||
/* Translate vertical position VPOS which is relative to window W to a
|
||||
vertical position relative to W's frame. */
|
||||
|
||||
|
@ -3195,9 +3183,6 @@ window_to_frame_hpos (struct window *w, int hpos)
|
|||
return hpos;
|
||||
}
|
||||
|
||||
#endif /* GLYPH_DEBUG */
|
||||
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
Redrawing Frames
|
||||
|
@ -3879,8 +3864,8 @@ abs_cursor_pos (struct frame *f, int *x, int *y)
|
|||
a new cursor position has been computed. */
|
||||
&& w->cursor.vpos < WINDOW_TOTAL_LINES (w))
|
||||
{
|
||||
int wx = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
|
||||
int wy = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
|
||||
int wx = window_to_frame_hpos (w, w->cursor.hpos);
|
||||
int wy = window_to_frame_vpos (w, w->cursor.vpos);
|
||||
|
||||
wx += max (0, w->left_margin_cols);
|
||||
|
||||
|
@ -5664,8 +5649,8 @@ tty_set_cursor (struct frame *f)
|
|||
a new cursor position has been computed. */
|
||||
&& w->cursor.vpos < WINDOW_TOTAL_LINES (w))
|
||||
{
|
||||
int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos);
|
||||
int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos);
|
||||
int x = window_to_frame_hpos (w, w->cursor.hpos);
|
||||
int y = window_to_frame_vpos (w, w->cursor.vpos);
|
||||
|
||||
x += max (0, w->left_margin_cols);
|
||||
cursor_to (f, y, x);
|
||||
|
|
Loading…
Add table
Reference in a new issue