aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1998-04-09 17:21:02 +0000
committerKarl Heuer1998-04-09 17:21:02 +0000
commitceafe86b40fd5ad9a91a15b2f12fcaf7f03bd41d (patch)
tree63556e7ad2c27d29820d190f92f0cf7e60f4da15 /src
parent09522567d8c4ef6a6c6735f83a9a0126eb95d5dc (diff)
downloademacs-ceafe86b40fd5ad9a91a15b2f12fcaf7f03bd41d.tar.gz
emacs-ceafe86b40fd5ad9a91a15b2f12fcaf7f03bd41d.zip
(minmax): New macro.
(update_frame): Use it.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index 5bb97150b77..8eb3d95dd9b 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -64,6 +64,8 @@ Boston, MA 02111-1307, USA. */
64 64
65#define max(a, b) ((a) > (b) ? (a) : (b)) 65#define max(a, b) ((a) > (b) ? (a) : (b))
66#define min(a, b) ((a) < (b) ? (a) : (b)) 66#define min(a, b) ((a) < (b) ? (a) : (b))
67#define minmax(floor, val, ceil) \
68 ((val) < (floor) ? (floor) : (val) > (ceil) ? (ceil) : (val))
67 69
68/* Get number of chars of output now in the buffer of a stdio stream. 70/* Get number of chars of output now in the buffer of a stdio stream.
69 This ought to be built in in stdio, but it isn't. 71 This ought to be built in in stdio, but it isn't.
@@ -1357,8 +1359,7 @@ update_frame (f, force, inhibit_hairy_id)
1357 } 1359 }
1358 else 1360 else
1359 cursor_to (FRAME_CURSOR_Y (f), 1361 cursor_to (FRAME_CURSOR_Y (f),
1360 max (min (FRAME_CURSOR_X (f), 1362 minmax (0, FRAME_CURSOR_X (f), FRAME_WINDOW_WIDTH (f) - 1));
1361 FRAME_WINDOW_WIDTH (f) - 1), 0));
1362 } 1363 }
1363 1364
1364 update_end (f); 1365 update_end (f);