diff options
| author | Gerd Möllmann | 2025-01-29 08:34:43 +0100 |
|---|---|---|
| committer | Gerd Möllmann | 2025-01-30 05:41:12 +0100 |
| commit | 7aacefba6bfe4c0e658f09d2ac7f025f9a9a827f (patch) | |
| tree | 2b73b2bdc772dd95954ce178cdd52f7140682003 /src | |
| parent | 6cf479931d1adc03661116ef827f77fdc615db22 (diff) | |
| download | emacs-7aacefba6bfe4c0e658f09d2ac7f025f9a9a827f.tar.gz emacs-7aacefba6bfe4c0e658f09d2ac7f025f9a9a827f.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index 6571761b7a9..913b860df1e 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -139,11 +139,6 @@ static int glyph_pool_count; | |||
| 139 | 139 | ||
| 140 | #ifdef GLYPH_DEBUG | 140 | #ifdef GLYPH_DEBUG |
| 141 | 141 | ||
| 142 | static int window_to_frame_vpos (struct window *, int); | ||
| 143 | static int window_to_frame_hpos (struct window *, int); | ||
| 144 | #define WINDOW_TO_FRAME_VPOS(W, VPOS) window_to_frame_vpos (W, VPOS) | ||
| 145 | #define WINDOW_TO_FRAME_HPOS(W, HPOS) window_to_frame_hpos (W, HPOS) | ||
| 146 | |||
| 147 | /* One element of the ring buffer containing redisplay history | 142 | /* One element of the ring buffer containing redisplay history |
| 148 | information. */ | 143 | information. */ |
| 149 | 144 | ||
| @@ -235,11 +230,6 @@ DEFUN ("dump-redisplay-history", Fdump_redisplay_history, | |||
| 235 | } | 230 | } |
| 236 | 231 | ||
| 237 | 232 | ||
| 238 | #else /* not GLYPH_DEBUG */ | ||
| 239 | |||
| 240 | #define WINDOW_TO_FRAME_VPOS(W, VPOS) ((VPOS) + WINDOW_TOP_EDGE_LINE (W)) | ||
| 241 | #define WINDOW_TO_FRAME_HPOS(W, HPOS) ((HPOS) + WINDOW_LEFT_EDGE_COL (W)) | ||
| 242 | |||
| 243 | #endif /* GLYPH_DEBUG */ | 233 | #endif /* GLYPH_DEBUG */ |
| 244 | 234 | ||
| 245 | 235 | ||
| @@ -3167,8 +3157,6 @@ check_matrix_pointers (struct glyph_matrix *window_matrix, | |||
| 3167 | VPOS and HPOS translations | 3157 | VPOS and HPOS translations |
| 3168 | **********************************************************************/ | 3158 | **********************************************************************/ |
| 3169 | 3159 | ||
| 3170 | #ifdef GLYPH_DEBUG | ||
| 3171 | |||
| 3172 | /* Translate vertical position VPOS which is relative to window W to a | 3160 | /* Translate vertical position VPOS which is relative to window W to a |
| 3173 | vertical position relative to W's frame. */ | 3161 | vertical position relative to W's frame. */ |
| 3174 | 3162 | ||
| @@ -3195,9 +3183,6 @@ window_to_frame_hpos (struct window *w, int hpos) | |||
| 3195 | return hpos; | 3183 | return hpos; |
| 3196 | } | 3184 | } |
| 3197 | 3185 | ||
| 3198 | #endif /* GLYPH_DEBUG */ | ||
| 3199 | |||
| 3200 | |||
| 3201 | 3186 | ||
| 3202 | /********************************************************************** | 3187 | /********************************************************************** |
| 3203 | Redrawing Frames | 3188 | Redrawing Frames |
| @@ -3879,8 +3864,8 @@ abs_cursor_pos (struct frame *f, int *x, int *y) | |||
| 3879 | a new cursor position has been computed. */ | 3864 | a new cursor position has been computed. */ |
| 3880 | && w->cursor.vpos < WINDOW_TOTAL_LINES (w)) | 3865 | && w->cursor.vpos < WINDOW_TOTAL_LINES (w)) |
| 3881 | { | 3866 | { |
| 3882 | int wx = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); | 3867 | int wx = window_to_frame_hpos (w, w->cursor.hpos); |
| 3883 | int wy = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 3868 | int wy = window_to_frame_vpos (w, w->cursor.vpos); |
| 3884 | 3869 | ||
| 3885 | wx += max (0, w->left_margin_cols); | 3870 | wx += max (0, w->left_margin_cols); |
| 3886 | 3871 | ||
| @@ -5664,8 +5649,8 @@ tty_set_cursor (struct frame *f) | |||
| 5664 | a new cursor position has been computed. */ | 5649 | a new cursor position has been computed. */ |
| 5665 | && w->cursor.vpos < WINDOW_TOTAL_LINES (w)) | 5650 | && w->cursor.vpos < WINDOW_TOTAL_LINES (w)) |
| 5666 | { | 5651 | { |
| 5667 | int x = WINDOW_TO_FRAME_HPOS (w, w->cursor.hpos); | 5652 | int x = window_to_frame_hpos (w, w->cursor.hpos); |
| 5668 | int y = WINDOW_TO_FRAME_VPOS (w, w->cursor.vpos); | 5653 | int y = window_to_frame_vpos (w, w->cursor.vpos); |
| 5669 | 5654 | ||
| 5670 | x += max (0, w->left_margin_cols); | 5655 | x += max (0, w->left_margin_cols); |
| 5671 | cursor_to (f, y, x); | 5656 | cursor_to (f, y, x); |