From 1479c557b7a9abb6eea3b2881adae471fedeec4d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Nov 2012 10:39:29 -0800 Subject: [PATCH] * window.c (list4i): Rename from 'quad'. All uses changed. Needed because defines 'quad' on Solaris 10. --- src/ChangeLog | 5 +++ src/window.c | 93 ++++++++++++++++++++++++++------------------------- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index ff3e74d547a..82a2245313f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-11-11 Paul Eggert + + * window.c (list4i): Rename from 'quad'. All uses changed. + Needed because defines 'quad' on Solaris 10. + 2012-11-11 Juanma Barranquero * xdisp.c (start_hourglass) [HAVE_NTGUI]: Add block to silence diff --git a/src/window.c b/src/window.c index 99498642710..09ee20e4b86 100644 --- a/src/window.c +++ b/src/window.c @@ -273,7 +273,7 @@ decode_valid_window (register Lisp_Object window) /* Build a frequently used 4-integer (X Y W H) list. */ static Lisp_Object -quad (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h) +list4i (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h) { return list4 (make_number (x), make_number (y), make_number (w), make_number (h)); @@ -884,8 +884,8 @@ header line, and/or mode line. For the edges of just the text area, use { register struct window *w = decode_valid_window (window); - return quad (WINDOW_LEFT_EDGE_COL (w), WINDOW_TOP_EDGE_LINE (w), - WINDOW_RIGHT_EDGE_COL (w), WINDOW_BOTTOM_EDGE_LINE (w)); + return list4i (WINDOW_LEFT_EDGE_COL (w), WINDOW_TOP_EDGE_LINE (w), + WINDOW_RIGHT_EDGE_COL (w), WINDOW_BOTTOM_EDGE_LINE (w)); } DEFUN ("window-pixel-edges", Fwindow_pixel_edges, Swindow_pixel_edges, 0, 1, 0, @@ -904,8 +904,8 @@ of just the text area, use `window-inside-pixel-edges'. */) { register struct window *w = decode_valid_window (window); - return quad (WINDOW_LEFT_EDGE_X (w), WINDOW_TOP_EDGE_Y (w), - WINDOW_RIGHT_EDGE_X (w), WINDOW_BOTTOM_EDGE_Y (w)); + return list4i (WINDOW_LEFT_EDGE_X (w), WINDOW_TOP_EDGE_Y (w), + WINDOW_RIGHT_EDGE_X (w), WINDOW_BOTTOM_EDGE_Y (w)); } static void @@ -950,10 +950,10 @@ of just the text area, use `window-inside-absolute-pixel-edges'. */) calc_absolute_offset (w, &add_x, &add_y); - return quad (WINDOW_LEFT_EDGE_X (w) + add_x, - WINDOW_TOP_EDGE_Y (w) + add_y, - WINDOW_RIGHT_EDGE_X (w) + add_x, - WINDOW_BOTTOM_EDGE_Y (w) + add_y); + return list4i (WINDOW_LEFT_EDGE_X (w) + add_x, + WINDOW_TOP_EDGE_Y (w) + add_y, + WINDOW_RIGHT_EDGE_X (w) + add_x, + WINDOW_BOTTOM_EDGE_Y (w) + add_y); } DEFUN ("window-inside-edges", Fwindow_inside_edges, Swindow_inside_edges, 0, 1, 0, @@ -972,16 +972,16 @@ display margins, fringes, header line, and/or mode line. */) { register struct window *w = decode_live_window (window); - return quad (WINDOW_BOX_LEFT_EDGE_COL (w) - + WINDOW_LEFT_MARGIN_COLS (w) - + WINDOW_LEFT_FRINGE_COLS (w), - WINDOW_TOP_EDGE_LINE (w) - + WINDOW_HEADER_LINE_LINES (w), - WINDOW_BOX_RIGHT_EDGE_COL (w) - - WINDOW_RIGHT_MARGIN_COLS (w) - - WINDOW_RIGHT_FRINGE_COLS (w), - WINDOW_BOTTOM_EDGE_LINE (w) - - WINDOW_MODE_LINE_LINES (w)); + return list4i ((WINDOW_BOX_LEFT_EDGE_COL (w) + + WINDOW_LEFT_MARGIN_COLS (w) + + WINDOW_LEFT_FRINGE_COLS (w)), + (WINDOW_TOP_EDGE_LINE (w) + + WINDOW_HEADER_LINE_LINES (w)), + (WINDOW_BOX_RIGHT_EDGE_COL (w) + - WINDOW_RIGHT_MARGIN_COLS (w) + - WINDOW_RIGHT_FRINGE_COLS (w)), + (WINDOW_BOTTOM_EDGE_LINE (w) + - WINDOW_MODE_LINE_LINES (w))); } DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, @@ -999,16 +999,16 @@ display margins, fringes, header line, and/or mode line. */) { register struct window *w = decode_live_window (window); - return quad (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w), - WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w), - WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w), - WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w)); + return list4i ((WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w)), + (WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w)), + (WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w)), + (WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w))); } DEFUN ("window-inside-absolute-pixel-edges", @@ -1031,16 +1031,16 @@ display margins, fringes, header line, and/or mode line. */) calc_absolute_offset (w, &add_x, &add_y); - return quad (WINDOW_BOX_LEFT_EDGE_X (w) - + WINDOW_LEFT_MARGIN_WIDTH (w) - + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x, - WINDOW_TOP_EDGE_Y (w) - + WINDOW_HEADER_LINE_HEIGHT (w) + add_y, - WINDOW_BOX_RIGHT_EDGE_X (w) - - WINDOW_RIGHT_MARGIN_WIDTH (w) - - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x, - WINDOW_BOTTOM_EDGE_Y (w) - - WINDOW_MODE_LINE_HEIGHT (w) + add_y); + return list4i ((WINDOW_BOX_LEFT_EDGE_X (w) + + WINDOW_LEFT_MARGIN_WIDTH (w) + + WINDOW_LEFT_FRINGE_WIDTH (w) + add_x), + (WINDOW_TOP_EDGE_Y (w) + + WINDOW_HEADER_LINE_HEIGHT (w) + add_y), + (WINDOW_BOX_RIGHT_EDGE_X (w) + - WINDOW_RIGHT_MARGIN_WIDTH (w) + - WINDOW_RIGHT_FRINGE_WIDTH (w) + add_x), + (WINDOW_BOTTOM_EDGE_Y (w) + - WINDOW_MODE_LINE_HEIGHT (w) + add_y)); } /* Test if the character at column X, row Y is within window W. @@ -1621,7 +1621,7 @@ display row, and VPOS is the row number (0-based) containing POS. */) { Lisp_Object part = Qnil; if (!fully_p) - part = quad (rtop, rbot, rowh, vpos); + part = list4i (rtop, rbot, rowh, vpos); in_window = Fcons (make_number (x), Fcons (make_number (y), part)); } @@ -1687,17 +1687,18 @@ Return nil if window display is not up-to-date. In that case, use if (!WINDOW_WANTS_HEADER_LINE_P (w)) return Qnil; row = MATRIX_HEADER_LINE_ROW (w->current_matrix); - return row->enabled_p ? quad (row->height, 0, 0, 0) : Qnil; + return row->enabled_p ? list4i (row->height, 0, 0, 0) : Qnil; } if (EQ (line, Qmode_line)) { row = MATRIX_MODE_LINE_ROW (w->current_matrix); return (row->enabled_p ? - quad (row->height, - 0, /* not accurate */ - WINDOW_HEADER_LINE_HEIGHT (w) - + window_text_bottom_y (w), 0) + list4i (row->height, + 0, /* not accurate */ + (WINDOW_HEADER_LINE_HEIGHT (w) + + window_text_bottom_y (w)), + 0) : Qnil); } @@ -1727,7 +1728,7 @@ Return nil if window display is not up-to-date. In that case, use found_row: crop = max (0, (row->y + row->height) - max_y); - return quad (row->height + min (0, row->y) - crop, i, row->y, crop); + return list4i (row->height + min (0, row->y) - crop, i, row->y, crop); } DEFUN ("window-dedicated-p", Fwindow_dedicated_p, Swindow_dedicated_p, -- 2.39.2