aboutsummaryrefslogtreecommitdiffstats
path: root/src/fontset.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-08-05 19:47:28 +0400
committerDmitry Antipov2012-08-05 19:47:28 +0400
commit663e2b3f88f9be61399e06dfc0b76700f90c6ca6 (patch)
tree71e48dfc0079f80f2089b5bdebe991a200d594ed /src/fontset.c
parent777fe95e05ab77e77e4ecee45382ec64d381c776 (diff)
downloademacs-663e2b3f88f9be61399e06dfc0b76700f90c6ca6.tar.gz
emacs-663e2b3f88f9be61399e06dfc0b76700f90c6ca6.zip
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/fontset.c')
-rw-r--r--src/fontset.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fontset.c b/src/fontset.c
index 858a2e3cd3b..7ea1deeaecb 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -429,7 +429,7 @@ reorder_font_vector (Lisp_Object font_group, struct font *font)
429 } 429 }
430 430
431 if (score_changed) 431 if (score_changed)
432 qsort (XVECTOR (vec)->contents, size, sizeof (Lisp_Object), 432 qsort (XVECTOR (vec)->contents, size, word_size,
433 fontset_compare_rfontdef); 433 fontset_compare_rfontdef);
434 XSETCAR (font_group, make_number (charset_ordered_list_tick)); 434 XSETCAR (font_group, make_number (charset_ordered_list_tick));
435} 435}
@@ -1893,7 +1893,7 @@ format is the same as above. */)
1893 1893
1894 /* Recode fontsets realized on FRAME from the base fontset FONTSET 1894 /* Recode fontsets realized on FRAME from the base fontset FONTSET
1895 in the table `realized'. */ 1895 in the table `realized'. */
1896 realized[0] = alloca (sizeof (Lisp_Object) * ASIZE (Vfontset_table)); 1896 realized[0] = alloca (word_size * ASIZE (Vfontset_table));
1897 for (i = j = 0; i < ASIZE (Vfontset_table); i++) 1897 for (i = j = 0; i < ASIZE (Vfontset_table); i++)
1898 { 1898 {
1899 elt = FONTSET_FROM_ID (i); 1899 elt = FONTSET_FROM_ID (i);
@@ -1904,7 +1904,7 @@ format is the same as above. */)
1904 } 1904 }
1905 realized[0][j] = Qnil; 1905 realized[0][j] = Qnil;
1906 1906
1907 realized[1] = alloca (sizeof (Lisp_Object) * ASIZE (Vfontset_table)); 1907 realized[1] = alloca (word_size * ASIZE (Vfontset_table));
1908 for (i = j = 0; ! NILP (realized[0][i]); i++) 1908 for (i = j = 0; ! NILP (realized[0][i]); i++)
1909 { 1909 {
1910 elt = FONTSET_DEFAULT (realized[0][i]); 1910 elt = FONTSET_DEFAULT (realized[0][i]);