diff options
author | Karl Heuer <kwzh@gnu.org> | 1994-11-16 06:17:13 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1994-11-16 06:17:13 +0000 |
commit | 899b847c4a52a572b5222725a6e5d648ff87536f (patch) | |
tree | 2092505166b31993ea44062c37beb45f7803dbd0 /src/window.c | |
parent | 47c506b4da5abd2bcff278c38ef893850d4e9afd (diff) | |
download | emacs-899b847c4a52a572b5222725a6e5d648ff87536f.tar.gz |
(Fcurrent_window_configuration): Use allocate_vectorlike and VECSIZE.
(SAVE_WINDOW_DATA_SIZE): Macro deleted.
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/window.c b/src/window.c index 0ede40c2402..23c7c479421 100644 --- a/src/window.c +++ b/src/window.c @@ -2751,14 +2751,6 @@ struct save_window_data 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 @@ redirection (see `redirect-frame-focus').") 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 @@ redirection (see `redirect-frame-focus').") } 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)); |