diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-08-05 19:47:28 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-08-05 19:47:28 +0400 |
commit | 663e2b3f88f9be61399e06dfc0b76700f90c6ca6 (patch) | |
tree | 71e48dfc0079f80f2089b5bdebe991a200d594ed /src/msdos.c | |
parent | 777fe95e05ab77e77e4ecee45382ec64d381c776 (diff) |
Generalize common compile-time constants.
* lisp.h (header_size, bool_header_size, word_size): Now here.
(struct Lisp_Vector): Add comment.
(struct Lisp_Bool_Vector): Move up to define handy constants.
(VECSIZE, PSEUDOVECSIZE): Simplify.
(SAFE_ALLOCA_LISP): Use new constant. Adjust indentation.
* buffer.c, buffer.h, bytecode.c, callint.c, eval.c, fns.c:
* font.c, fontset.c, keyboard.c, keymap.c, macros.c, menu.c:
* msdos.c, w32menu.c, w32term.h, window.c, xdisp.c, xfaces.c:
* xfont.c, xmenu.c: Use word_size where appropriate.
Diffstat (limited to 'src/msdos.c')
-rw-r--r-- | src/msdos.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/msdos.c b/src/msdos.c index 481526d935..93af0d6e26 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -1594,9 +1594,9 @@ IT_set_frame_parameters (struct frame *f, Lisp_Object alist) Lisp_Object tail; int i, j, length = XINT (Flength (alist)); Lisp_Object *parms - = (Lisp_Object *) alloca (length * sizeof (Lisp_Object)); + = (Lisp_Object *) alloca (length * word_size); Lisp_Object *values - = (Lisp_Object *) alloca (length * sizeof (Lisp_Object)); + = (Lisp_Object *) alloca (length * word_size); /* Do we have to reverse the foreground and background colors? */ int reverse = EQ (Fcdr (Fassq (Qreverse, FVAR (f, param_alist))), Qt); int redraw = 0, fg_set = 0, bg_set = 0; @@ -2435,9 +2435,9 @@ and then the scan code. */) { val = Fvector (NUM_RECENT_DOSKEYS, keys); memcpy (XVECTOR (val)->contents, keys + recent_doskeys_index, - (NUM_RECENT_DOSKEYS - recent_doskeys_index) * sizeof (Lisp_Object)); + (NUM_RECENT_DOSKEYS - recent_doskeys_index) * word_size); memcpy (XVECTOR (val)->contents + NUM_RECENT_DOSKEYS - recent_doskeys_index, - keys, recent_doskeys_index * sizeof (Lisp_Object)); + keys, recent_doskeys_index * word_size); return val; } } |