Mercurial > emacs
changeset 9974:5cda62e4222a
(Fcurrent_window_configuration): Use allocate_vectorlike and VECSIZE.
(SAVE_WINDOW_DATA_SIZE): Macro deleted.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 16 Nov 1994 06:17:13 +0000 |
parents | 1d5a908f201e |
children | e21b0674f37c |
files | src/window.c |
diffstat | 1 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.c Wed Nov 16 05:59:53 1994 +0000 +++ b/src/window.c Wed Nov 16 06:17:13 1994 +0000 @@ -2751,14 +2751,6 @@ Lisp_Object saved_windows; }; -/* Arg to Fmake_vector */ -#define SAVE_WINDOW_DATA_SIZE \ - ((sizeof (struct save_window_data) \ - - (sizeof (struct Lisp_Vector) \ - /* Don't count the contents member of the struct Lisp_Vector */ \ - - sizeof (Lisp_Object))) \ - / sizeof (Lisp_Object)) - /* This is saved as a Lisp_Vector */ struct saved_window { @@ -3138,6 +3130,7 @@ register Lisp_Object tem; register int n_windows; register struct save_window_data *data; + register struct Lisp_Vector *vec; register int i; FRAME_PTR f; @@ -3150,8 +3143,12 @@ } n_windows = count_windows (XWINDOW (FRAME_ROOT_WINDOW (f))); - data = ((struct save_window_data *) - XVECTOR (Fmake_vector (make_number (SAVE_WINDOW_DATA_SIZE), Qnil))); + vec = allocate_vectorlike (VECSIZE (struct save_window_data)); + for (i = 0; i < VECSIZE (struct save_window_data); i++) + vec->contents[i] = Qnil; + vec->size = VECSIZE (struct save_window_data); + data = (struct save_window_data *)vec; + XSETFASTINT (data->frame_width, FRAME_WIDTH (f)); XSETFASTINT (data->frame_height, FRAME_HEIGHT (f)); XSETFASTINT (data->frame_menu_bar_lines, FRAME_MENU_BAR_LINES (f));