diff options
| author | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
|---|---|---|
| committer | Dan Nicolaescu | 2010-07-04 00:50:25 -0700 |
| commit | 971de7fb158335fbda39525feb2d7776a26bc030 (patch) | |
| tree | 605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/font.c | |
| parent | b8463cbfbe2c5183cf40772df2746e58b787ddeb (diff) | |
| download | emacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip | |
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C.
* src/atimer.c:
* src/bidi.c:
* src/bytecode.c:
* src/callint.c:
* src/callproc.c:
* src/casefiddle.c:
* src/casetab.c:
* src/category.c:
* src/ccl.c:
* src/character.c:
* src/charset.c:
* src/chartab.c:
* src/cmds.c:
* src/coding.c:
* src/composite.c:
* src/data.c:
* src/dbusbind.c:
* src/dired.c:
* src/dispnew.c:
* src/doc.c:
* src/doprnt.c:
* src/ecrt0.c:
* src/editfns.c:
* src/fileio.c:
* src/filelock.c:
* src/filemode.c:
* src/fns.c:
* src/font.c:
* src/fontset.c:
* src/frame.c:
* src/fringe.c:
* src/ftfont.c:
* src/ftxfont.c:
* src/gtkutil.c:
* src/indent.c:
* src/insdel.c:
* src/intervals.c:
* src/keymap.c:
* src/lread.c:
* src/macros.c:
* src/marker.c:
* src/md5.c:
* src/menu.c:
* src/minibuf.c:
* src/prefix-args.c:
* src/print.c:
* src/ralloc.c:
* src/regex.c:
* src/region-cache.c:
* src/scroll.c:
* src/search.c:
* src/sound.c:
* src/strftime.c:
* src/syntax.c:
* src/sysdep.c:
* src/termcap.c:
* src/terminal.c:
* src/terminfo.c:
* src/textprop.c:
* src/tparam.c:
* src/undo.c:
* src/unexelf.c:
* src/window.c:
* src/xfaces.c:
* src/xfns.c:
* src/xfont.c:
* src/xftfont.c:
* src/xgselect.c:
* src/xmenu.c:
* src/xrdb.c:
* src/xselect.c:
* src/xsettings.c:
* src/xsmfns.c:
* src/xterm.c: Likewise.
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 289 |
1 files changed, 78 insertions, 211 deletions
diff --git a/src/font.c b/src/font.c index b92b44a38bc..a1b38eaabe5 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -175,7 +175,7 @@ static struct font_driver_list *font_driver_list; | |||
| 175 | /* Creaters of font-related Lisp object. */ | 175 | /* Creaters of font-related Lisp object. */ |
| 176 | 176 | ||
| 177 | Lisp_Object | 177 | Lisp_Object |
| 178 | font_make_spec () | 178 | font_make_spec (void) |
| 179 | { | 179 | { |
| 180 | Lisp_Object font_spec; | 180 | Lisp_Object font_spec; |
| 181 | struct font_spec *spec | 181 | struct font_spec *spec |
| @@ -187,7 +187,7 @@ font_make_spec () | |||
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | Lisp_Object | 189 | Lisp_Object |
| 190 | font_make_entity () | 190 | font_make_entity (void) |
| 191 | { | 191 | { |
| 192 | Lisp_Object font_entity; | 192 | Lisp_Object font_entity; |
| 193 | struct font_entity *entity | 193 | struct font_entity *entity |
| @@ -202,10 +202,7 @@ font_make_entity () | |||
| 202 | not nil, copy properties from ENTITY to the font-object. If | 202 | not nil, copy properties from ENTITY to the font-object. If |
| 203 | PIXELSIZE is positive, set the `size' property to PIXELSIZE. */ | 203 | PIXELSIZE is positive, set the `size' property to PIXELSIZE. */ |
| 204 | Lisp_Object | 204 | Lisp_Object |
| 205 | font_make_object (size, entity, pixelsize) | 205 | font_make_object (int size, Lisp_Object entity, int pixelsize) |
| 206 | int size; | ||
| 207 | Lisp_Object entity; | ||
| 208 | int pixelsize; | ||
| 209 | { | 206 | { |
| 210 | Lisp_Object font_object; | 207 | Lisp_Object font_object; |
| 211 | struct font *font | 208 | struct font *font |
| @@ -245,10 +242,7 @@ static int num_font_drivers; | |||
| 245 | STR. */ | 242 | STR. */ |
| 246 | 243 | ||
| 247 | Lisp_Object | 244 | Lisp_Object |
| 248 | font_intern_prop (str, len, force_symbol) | 245 | font_intern_prop (char *str, int len, int force_symbol) |
| 249 | char *str; | ||
| 250 | int len; | ||
| 251 | int force_symbol; | ||
| 252 | { | 246 | { |
| 253 | int i; | 247 | int i; |
| 254 | Lisp_Object tem; | 248 | Lisp_Object tem; |
| @@ -290,9 +284,7 @@ font_intern_prop (str, len, force_symbol) | |||
| 290 | /* Return a pixel size of font-spec SPEC on frame F. */ | 284 | /* Return a pixel size of font-spec SPEC on frame F. */ |
| 291 | 285 | ||
| 292 | static int | 286 | static int |
| 293 | font_pixel_size (f, spec) | 287 | font_pixel_size (FRAME_PTR f, Lisp_Object spec) |
| 294 | FRAME_PTR f; | ||
| 295 | Lisp_Object spec; | ||
| 296 | { | 288 | { |
| 297 | #ifdef HAVE_WINDOW_SYSTEM | 289 | #ifdef HAVE_WINDOW_SYSTEM |
| 298 | Lisp_Object size = AREF (spec, FONT_SIZE_INDEX); | 290 | Lisp_Object size = AREF (spec, FONT_SIZE_INDEX); |
| @@ -327,10 +319,7 @@ font_pixel_size (f, spec) | |||
| 327 | VAL is an integer. */ | 319 | VAL is an integer. */ |
| 328 | 320 | ||
| 329 | int | 321 | int |
| 330 | font_style_to_value (prop, val, noerror) | 322 | font_style_to_value (enum font_property_index prop, Lisp_Object val, int noerror) |
| 331 | enum font_property_index prop; | ||
| 332 | Lisp_Object val; | ||
| 333 | int noerror; | ||
| 334 | { | 323 | { |
| 335 | Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); | 324 | Lisp_Object table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); |
| 336 | int len = ASIZE (table); | 325 | int len = ASIZE (table); |
| @@ -395,10 +384,7 @@ font_style_to_value (prop, val, noerror) | |||
| 395 | } | 384 | } |
| 396 | 385 | ||
| 397 | Lisp_Object | 386 | Lisp_Object |
| 398 | font_style_symbolic (font, prop, for_face) | 387 | font_style_symbolic (Lisp_Object font, enum font_property_index prop, int for_face) |
| 399 | Lisp_Object font; | ||
| 400 | enum font_property_index prop; | ||
| 401 | int for_face; | ||
| 402 | { | 388 | { |
| 403 | Lisp_Object val = AREF (font, prop); | 389 | Lisp_Object val = AREF (font, prop); |
| 404 | Lisp_Object table, elt; | 390 | Lisp_Object table, elt; |
| @@ -424,8 +410,7 @@ extern Lisp_Object find_font_encoding (Lisp_Object); | |||
| 424 | of the font. REPERTORY is a charset symbol or nil. */ | 410 | of the font. REPERTORY is a charset symbol or nil. */ |
| 425 | 411 | ||
| 426 | Lisp_Object | 412 | Lisp_Object |
| 427 | find_font_encoding (fontname) | 413 | find_font_encoding (Lisp_Object fontname) |
| 428 | Lisp_Object fontname; | ||
| 429 | { | 414 | { |
| 430 | Lisp_Object tail, elt; | 415 | Lisp_Object tail, elt; |
| 431 | 416 | ||
| @@ -448,9 +433,7 @@ find_font_encoding (fontname) | |||
| 448 | REGISTRY is available, return 0. Otherwise return -1. */ | 433 | REGISTRY is available, return 0. Otherwise return -1. */ |
| 449 | 434 | ||
| 450 | int | 435 | int |
| 451 | font_registry_charsets (registry, encoding, repertory) | 436 | font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct charset **repertory) |
| 452 | Lisp_Object registry; | ||
| 453 | struct charset **encoding, **repertory; | ||
| 454 | { | 437 | { |
| 455 | Lisp_Object val; | 438 | Lisp_Object val; |
| 456 | int encoding_id, repertory_id; | 439 | int encoding_id, repertory_id; |
| @@ -516,8 +499,7 @@ static Lisp_Object font_prop_validate_spacing (Lisp_Object, Lisp_Object); | |||
| 516 | static int get_font_prop_index (Lisp_Object); | 499 | static int get_font_prop_index (Lisp_Object); |
| 517 | 500 | ||
| 518 | static Lisp_Object | 501 | static Lisp_Object |
| 519 | font_prop_validate_symbol (prop, val) | 502 | font_prop_validate_symbol (Lisp_Object prop, Lisp_Object val) |
| 520 | Lisp_Object prop, val; | ||
| 521 | { | 503 | { |
| 522 | if (STRINGP (val)) | 504 | if (STRINGP (val)) |
| 523 | val = Fintern (val, Qnil); | 505 | val = Fintern (val, Qnil); |
| @@ -530,8 +512,7 @@ font_prop_validate_symbol (prop, val) | |||
| 530 | 512 | ||
| 531 | 513 | ||
| 532 | static Lisp_Object | 514 | static Lisp_Object |
| 533 | font_prop_validate_style (style, val) | 515 | font_prop_validate_style (Lisp_Object style, Lisp_Object val) |
| 534 | Lisp_Object style, val; | ||
| 535 | { | 516 | { |
| 536 | enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX | 517 | enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX |
| 537 | : EQ (style, QCslant) ? FONT_SLANT_INDEX | 518 | : EQ (style, QCslant) ? FONT_SLANT_INDEX |
| @@ -565,16 +546,14 @@ font_prop_validate_style (style, val) | |||
| 565 | } | 546 | } |
| 566 | 547 | ||
| 567 | static Lisp_Object | 548 | static Lisp_Object |
| 568 | font_prop_validate_non_neg (prop, val) | 549 | font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val) |
| 569 | Lisp_Object prop, val; | ||
| 570 | { | 550 | { |
| 571 | return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0) | 551 | return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0) |
| 572 | ? val : Qerror); | 552 | ? val : Qerror); |
| 573 | } | 553 | } |
| 574 | 554 | ||
| 575 | static Lisp_Object | 555 | static Lisp_Object |
| 576 | font_prop_validate_spacing (prop, val) | 556 | font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val) |
| 577 | Lisp_Object prop, val; | ||
| 578 | { | 557 | { |
| 579 | if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL)) | 558 | if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL)) |
| 580 | return val; | 559 | return val; |
| @@ -595,8 +574,7 @@ font_prop_validate_spacing (prop, val) | |||
| 595 | } | 574 | } |
| 596 | 575 | ||
| 597 | static Lisp_Object | 576 | static Lisp_Object |
| 598 | font_prop_validate_otf (prop, val) | 577 | font_prop_validate_otf (Lisp_Object prop, Lisp_Object val) |
| 599 | Lisp_Object prop, val; | ||
| 600 | { | 578 | { |
| 601 | Lisp_Object tail, tmp; | 579 | Lisp_Object tail, tmp; |
| 602 | int i; | 580 | int i; |
| @@ -667,8 +645,7 @@ struct | |||
| 667 | already known property. */ | 645 | already known property. */ |
| 668 | 646 | ||
| 669 | static int | 647 | static int |
| 670 | get_font_prop_index (key) | 648 | get_font_prop_index (Lisp_Object key) |
| 671 | Lisp_Object key; | ||
| 672 | { | 649 | { |
| 673 | int i; | 650 | int i; |
| 674 | 651 | ||
| @@ -683,9 +660,7 @@ get_font_prop_index (key) | |||
| 683 | signal an error. The value is VAL or the regularized one. */ | 660 | signal an error. The value is VAL or the regularized one. */ |
| 684 | 661 | ||
| 685 | static Lisp_Object | 662 | static Lisp_Object |
| 686 | font_prop_validate (idx, prop, val) | 663 | font_prop_validate (int idx, Lisp_Object prop, Lisp_Object val) |
| 687 | int idx; | ||
| 688 | Lisp_Object prop, val; | ||
| 689 | { | 664 | { |
| 690 | Lisp_Object validated; | 665 | Lisp_Object validated; |
| 691 | 666 | ||
| @@ -710,8 +685,7 @@ font_prop_validate (idx, prop, val) | |||
| 710 | keeping the sorting order. Don't check the validity of VAL. */ | 685 | keeping the sorting order. Don't check the validity of VAL. */ |
| 711 | 686 | ||
| 712 | Lisp_Object | 687 | Lisp_Object |
| 713 | font_put_extra (font, prop, val) | 688 | font_put_extra (Lisp_Object font, Lisp_Object prop, Lisp_Object val) |
| 714 | Lisp_Object font, prop, val; | ||
| 715 | { | 689 | { |
| 716 | Lisp_Object extra = AREF (font, FONT_EXTRA_INDEX); | 690 | Lisp_Object extra = AREF (font, FONT_EXTRA_INDEX); |
| 717 | Lisp_Object slot = (NILP (extra) ? Qnil : assq_no_quit (prop, extra)); | 691 | Lisp_Object slot = (NILP (extra) ? Qnil : assq_no_quit (prop, extra)); |
| @@ -799,8 +773,7 @@ enum xlfd_field_mask | |||
| 799 | -1. */ | 773 | -1. */ |
| 800 | 774 | ||
| 801 | static int | 775 | static int |
| 802 | parse_matrix (p) | 776 | parse_matrix (char *p) |
| 803 | char *p; | ||
| 804 | { | 777 | { |
| 805 | double matrix[4]; | 778 | double matrix[4]; |
| 806 | char *end; | 779 | char *end; |
| @@ -822,9 +795,7 @@ parse_matrix (p) | |||
| 822 | field position by its contents. */ | 795 | field position by its contents. */ |
| 823 | 796 | ||
| 824 | static int | 797 | static int |
| 825 | font_expand_wildcards (field, n) | 798 | font_expand_wildcards (Lisp_Object *field, int n) |
| 826 | Lisp_Object field[XLFD_LAST_INDEX]; | ||
| 827 | int n; | ||
| 828 | { | 799 | { |
| 829 | /* Copy of FIELD. */ | 800 | /* Copy of FIELD. */ |
| 830 | Lisp_Object tmp[XLFD_LAST_INDEX]; | 801 | Lisp_Object tmp[XLFD_LAST_INDEX]; |
| @@ -1058,9 +1029,7 @@ font_check_xlfd_parse (Lisp_Object font, char *name) | |||
| 1058 | a fully specified XLFD. */ | 1029 | a fully specified XLFD. */ |
| 1059 | 1030 | ||
| 1060 | int | 1031 | int |
| 1061 | font_parse_xlfd (name, font) | 1032 | font_parse_xlfd (char *name, Lisp_Object font) |
| 1062 | char *name; | ||
| 1063 | Lisp_Object font; | ||
| 1064 | { | 1033 | { |
| 1065 | int len = strlen (name); | 1034 | int len = strlen (name); |
| 1066 | int i, j, n; | 1035 | int i, j, n; |
| @@ -1242,11 +1211,7 @@ font_parse_xlfd (name, font) | |||
| 1242 | 0, use PIXEL_SIZE instead. */ | 1211 | 0, use PIXEL_SIZE instead. */ |
| 1243 | 1212 | ||
| 1244 | int | 1213 | int |
| 1245 | font_unparse_xlfd (font, pixel_size, name, nbytes) | 1214 | font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes) |
| 1246 | Lisp_Object font; | ||
| 1247 | int pixel_size; | ||
| 1248 | char *name; | ||
| 1249 | int nbytes; | ||
| 1250 | { | 1215 | { |
| 1251 | char *f[XLFD_REGISTRY_INDEX + 1]; | 1216 | char *f[XLFD_REGISTRY_INDEX + 1]; |
| 1252 | Lisp_Object val; | 1217 | Lisp_Object val; |
| @@ -1389,9 +1354,7 @@ font_unparse_xlfd (font, pixel_size, name, nbytes) | |||
| 1389 | This function tries to guess which format it is. */ | 1354 | This function tries to guess which format it is. */ |
| 1390 | 1355 | ||
| 1391 | int | 1356 | int |
| 1392 | font_parse_fcname (name, font) | 1357 | font_parse_fcname (char *name, Lisp_Object font) |
| 1393 | char *name; | ||
| 1394 | Lisp_Object font; | ||
| 1395 | { | 1358 | { |
| 1396 | char *p, *q; | 1359 | char *p, *q; |
| 1397 | char *size_beg = NULL, *size_end = NULL; | 1360 | char *size_beg = NULL, *size_end = NULL; |
| @@ -1648,11 +1611,7 @@ font_parse_fcname (name, font) | |||
| 1648 | FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ | 1611 | FONT_SIZE_INDEX of FONT is 0, use PIXEL_SIZE instead. */ |
| 1649 | 1612 | ||
| 1650 | int | 1613 | int |
| 1651 | font_unparse_fcname (font, pixel_size, name, nbytes) | 1614 | font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes) |
| 1652 | Lisp_Object font; | ||
| 1653 | int pixel_size; | ||
| 1654 | char *name; | ||
| 1655 | int nbytes; | ||
| 1656 | { | 1615 | { |
| 1657 | Lisp_Object family, foundry; | 1616 | Lisp_Object family, foundry; |
| 1658 | Lisp_Object tail, val; | 1617 | Lisp_Object tail, val; |
| @@ -1771,11 +1730,7 @@ font_unparse_fcname (font, pixel_size, name, nbytes) | |||
| 1771 | size. */ | 1730 | size. */ |
| 1772 | 1731 | ||
| 1773 | int | 1732 | int |
| 1774 | font_unparse_gtkname (font, f, name, nbytes) | 1733 | font_unparse_gtkname (Lisp_Object font, struct frame *f, char *name, int nbytes) |
| 1775 | Lisp_Object font; | ||
| 1776 | struct frame *f; | ||
| 1777 | char *name; | ||
| 1778 | int nbytes; | ||
| 1779 | { | 1734 | { |
| 1780 | char *p; | 1735 | char *p; |
| 1781 | int len = 1; | 1736 | int len = 1; |
| @@ -1858,9 +1813,7 @@ font_unparse_gtkname (font, f, name, nbytes) | |||
| 1858 | 0. Otherwise return -1. */ | 1813 | 0. Otherwise return -1. */ |
| 1859 | 1814 | ||
| 1860 | static int | 1815 | static int |
| 1861 | font_parse_name (name, font) | 1816 | font_parse_name (char *name, Lisp_Object font) |
| 1862 | char *name; | ||
| 1863 | Lisp_Object font; | ||
| 1864 | { | 1817 | { |
| 1865 | if (name[0] == '-' || index (name, '*') || index (name, '?')) | 1818 | if (name[0] == '-' || index (name, '*') || index (name, '?')) |
| 1866 | return font_parse_xlfd (name, font); | 1819 | return font_parse_xlfd (name, font); |
| @@ -1873,8 +1826,7 @@ font_parse_name (name, font) | |||
| 1873 | part. */ | 1826 | part. */ |
| 1874 | 1827 | ||
| 1875 | void | 1828 | void |
| 1876 | font_parse_family_registry (family, registry, font_spec) | 1829 | font_parse_family_registry (Lisp_Object family, Lisp_Object registry, Lisp_Object font_spec) |
| 1877 | Lisp_Object family, registry, font_spec; | ||
| 1878 | { | 1830 | { |
| 1879 | int len; | 1831 | int len; |
| 1880 | char *p0, *p1; | 1832 | char *p0, *p1; |
| @@ -2229,8 +2181,7 @@ static Lisp_Object font_sort_entities (Lisp_Object, Lisp_Object, | |||
| 2229 | extern Lisp_Object Vface_font_rescale_alist; | 2181 | extern Lisp_Object Vface_font_rescale_alist; |
| 2230 | 2182 | ||
| 2231 | static double | 2183 | static double |
| 2232 | font_rescale_ratio (font_entity) | 2184 | font_rescale_ratio (Lisp_Object font_entity) |
| 2233 | Lisp_Object font_entity; | ||
| 2234 | { | 2185 | { |
| 2235 | Lisp_Object tail, elt; | 2186 | Lisp_Object tail, elt; |
| 2236 | Lisp_Object name = Qnil; | 2187 | Lisp_Object name = Qnil; |
| @@ -2277,8 +2228,7 @@ static int sort_shift_bits[FONT_SIZE_INDEX + 1]; | |||
| 2277 | SPEC_PROP. */ | 2228 | SPEC_PROP. */ |
| 2278 | 2229 | ||
| 2279 | static unsigned | 2230 | static unsigned |
| 2280 | font_score (entity, spec_prop) | 2231 | font_score (Lisp_Object entity, Lisp_Object *spec_prop) |
| 2281 | Lisp_Object entity, *spec_prop; | ||
| 2282 | { | 2232 | { |
| 2283 | unsigned score = 0; | 2233 | unsigned score = 0; |
| 2284 | int i; | 2234 | int i; |
| @@ -2352,8 +2302,7 @@ struct font_sort_data | |||
| 2352 | /* The comparison function for qsort. */ | 2302 | /* The comparison function for qsort. */ |
| 2353 | 2303 | ||
| 2354 | static int | 2304 | static int |
| 2355 | font_compare (d1, d2) | 2305 | font_compare (const void *d1, const void *d2) |
| 2356 | const void *d1, *d2; | ||
| 2357 | { | 2306 | { |
| 2358 | const struct font_sort_data *data1 = d1; | 2307 | const struct font_sort_data *data1 = d1; |
| 2359 | const struct font_sort_data *data2 = d2; | 2308 | const struct font_sort_data *data2 = d2; |
| @@ -2381,9 +2330,7 @@ font_compare (d1, d2) | |||
| 2381 | such a case. */ | 2330 | such a case. */ |
| 2382 | 2331 | ||
| 2383 | static Lisp_Object | 2332 | static Lisp_Object |
| 2384 | font_sort_entities (list, prefer, frame, best_only) | 2333 | font_sort_entities (Lisp_Object list, Lisp_Object prefer, Lisp_Object frame, int best_only) |
| 2385 | Lisp_Object list, prefer, frame; | ||
| 2386 | int best_only; | ||
| 2387 | { | 2334 | { |
| 2388 | Lisp_Object prefer_prop[FONT_SPEC_MAX]; | 2335 | Lisp_Object prefer_prop[FONT_SPEC_MAX]; |
| 2389 | int len, maxlen, i; | 2336 | int len, maxlen, i; |
| @@ -2488,8 +2435,7 @@ font_sort_entities (list, prefer, frame, best_only) | |||
| 2488 | function with font_sort_order after setting up it. */ | 2435 | function with font_sort_order after setting up it. */ |
| 2489 | 2436 | ||
| 2490 | void | 2437 | void |
| 2491 | font_update_sort_order (order) | 2438 | font_update_sort_order (int *order) |
| 2492 | int *order; | ||
| 2493 | { | 2439 | { |
| 2494 | int i, shift_bits; | 2440 | int i, shift_bits; |
| 2495 | 2441 | ||
| @@ -2509,8 +2455,7 @@ font_update_sort_order (order) | |||
| 2509 | } | 2455 | } |
| 2510 | 2456 | ||
| 2511 | static int | 2457 | static int |
| 2512 | font_check_otf_features (script, langsys, features, table) | 2458 | font_check_otf_features (Lisp_Object script, Lisp_Object langsys, Lisp_Object features, Lisp_Object table) |
| 2513 | Lisp_Object script, langsys, features, table; | ||
| 2514 | { | 2459 | { |
| 2515 | Lisp_Object val; | 2460 | Lisp_Object val; |
| 2516 | int negative; | 2461 | int negative; |
| @@ -2584,8 +2529,7 @@ font_check_otf (Lisp_Object spec, Lisp_Object otf_capability) | |||
| 2584 | specification SPEC. */ | 2529 | specification SPEC. */ |
| 2585 | 2530 | ||
| 2586 | int | 2531 | int |
| 2587 | font_match_p (spec, font) | 2532 | font_match_p (Lisp_Object spec, Lisp_Object font) |
| 2588 | Lisp_Object spec, font; | ||
| 2589 | { | 2533 | { |
| 2590 | Lisp_Object prop[FONT_SPEC_MAX], *props; | 2534 | Lisp_Object prop[FONT_SPEC_MAX], *props; |
| 2591 | Lisp_Object extra, font_extra; | 2535 | Lisp_Object extra, font_extra; |
| @@ -2708,9 +2652,7 @@ static void font_clear_cache (FRAME_PTR, Lisp_Object, | |||
| 2708 | struct font_driver *); | 2652 | struct font_driver *); |
| 2709 | 2653 | ||
| 2710 | static void | 2654 | static void |
| 2711 | font_prepare_cache (f, driver) | 2655 | font_prepare_cache (FRAME_PTR f, struct font_driver *driver) |
| 2712 | FRAME_PTR f; | ||
| 2713 | struct font_driver *driver; | ||
| 2714 | { | 2656 | { |
| 2715 | Lisp_Object cache, val; | 2657 | Lisp_Object cache, val; |
| 2716 | 2658 | ||
| @@ -2732,9 +2674,7 @@ font_prepare_cache (f, driver) | |||
| 2732 | 2674 | ||
| 2733 | 2675 | ||
| 2734 | static void | 2676 | static void |
| 2735 | font_finish_cache (f, driver) | 2677 | font_finish_cache (FRAME_PTR f, struct font_driver *driver) |
| 2736 | FRAME_PTR f; | ||
| 2737 | struct font_driver *driver; | ||
| 2738 | { | 2678 | { |
| 2739 | Lisp_Object cache, val, tmp; | 2679 | Lisp_Object cache, val, tmp; |
| 2740 | 2680 | ||
| @@ -2755,9 +2695,7 @@ font_finish_cache (f, driver) | |||
| 2755 | 2695 | ||
| 2756 | 2696 | ||
| 2757 | static Lisp_Object | 2697 | static Lisp_Object |
| 2758 | font_get_cache (f, driver) | 2698 | font_get_cache (FRAME_PTR f, struct font_driver *driver) |
| 2759 | FRAME_PTR f; | ||
| 2760 | struct font_driver *driver; | ||
| 2761 | { | 2699 | { |
| 2762 | Lisp_Object val = driver->get_cache (f); | 2700 | Lisp_Object val = driver->get_cache (f); |
| 2763 | Lisp_Object type = driver->type; | 2701 | Lisp_Object type = driver->type; |
| @@ -2773,10 +2711,7 @@ font_get_cache (f, driver) | |||
| 2773 | static int num_fonts; | 2711 | static int num_fonts; |
| 2774 | 2712 | ||
| 2775 | static void | 2713 | static void |
| 2776 | font_clear_cache (f, cache, driver) | 2714 | font_clear_cache (FRAME_PTR f, Lisp_Object cache, struct font_driver *driver) |
| 2777 | FRAME_PTR f; | ||
| 2778 | Lisp_Object cache; | ||
| 2779 | struct font_driver *driver; | ||
| 2780 | { | 2715 | { |
| 2781 | Lisp_Object tail, elt; | 2716 | Lisp_Object tail, elt; |
| 2782 | Lisp_Object tail2, entity; | 2717 | Lisp_Object tail2, entity; |
| @@ -2830,9 +2765,7 @@ static Lisp_Object scratch_font_spec, scratch_font_prefer; | |||
| 2830 | extern Lisp_Object Vface_ignored_fonts; | 2765 | extern Lisp_Object Vface_ignored_fonts; |
| 2831 | 2766 | ||
| 2832 | Lisp_Object | 2767 | Lisp_Object |
| 2833 | font_delete_unmatched (vec, spec, size) | 2768 | font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size) |
| 2834 | Lisp_Object vec, spec; | ||
| 2835 | int size; | ||
| 2836 | { | 2769 | { |
| 2837 | Lisp_Object entity, val; | 2770 | Lisp_Object entity, val; |
| 2838 | enum font_property_index prop; | 2771 | enum font_property_index prop; |
| @@ -2905,8 +2838,7 @@ font_delete_unmatched (vec, spec, size) | |||
| 2905 | same font-driver. */ | 2838 | same font-driver. */ |
| 2906 | 2839 | ||
| 2907 | Lisp_Object | 2840 | Lisp_Object |
| 2908 | font_list_entities (frame, spec) | 2841 | font_list_entities (Lisp_Object frame, Lisp_Object spec) |
| 2909 | Lisp_Object frame, spec; | ||
| 2910 | { | 2842 | { |
| 2911 | FRAME_PTR f = XFRAME (frame); | 2843 | FRAME_PTR f = XFRAME (frame); |
| 2912 | struct font_driver_list *driver_list = f->font_driver_list; | 2844 | struct font_driver_list *driver_list = f->font_driver_list; |
| @@ -2982,9 +2914,7 @@ font_list_entities (frame, spec) | |||
| 2982 | font-related attributes. */ | 2914 | font-related attributes. */ |
| 2983 | 2915 | ||
| 2984 | static Lisp_Object | 2916 | static Lisp_Object |
| 2985 | font_matching_entity (f, attrs, spec) | 2917 | font_matching_entity (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) |
| 2986 | FRAME_PTR f; | ||
| 2987 | Lisp_Object *attrs, spec; | ||
| 2988 | { | 2918 | { |
| 2989 | struct font_driver_list *driver_list = f->font_driver_list; | 2919 | struct font_driver_list *driver_list = f->font_driver_list; |
| 2990 | Lisp_Object ftype, size, entity; | 2920 | Lisp_Object ftype, size, entity; |
| @@ -3032,10 +2962,7 @@ font_matching_entity (f, attrs, spec) | |||
| 3032 | opened font object. */ | 2962 | opened font object. */ |
| 3033 | 2963 | ||
| 3034 | static Lisp_Object | 2964 | static Lisp_Object |
| 3035 | font_open_entity (f, entity, pixel_size) | 2965 | font_open_entity (FRAME_PTR f, Lisp_Object entity, int pixel_size) |
| 3036 | FRAME_PTR f; | ||
| 3037 | Lisp_Object entity; | ||
| 3038 | int pixel_size; | ||
| 3039 | { | 2966 | { |
| 3040 | struct font_driver_list *driver_list; | 2967 | struct font_driver_list *driver_list; |
| 3041 | Lisp_Object objlist, size, val, font_object; | 2968 | Lisp_Object objlist, size, val, font_object; |
| @@ -3111,9 +3038,7 @@ font_open_entity (f, entity, pixel_size) | |||
| 3111 | /* Close FONT_OBJECT that is opened on frame F. */ | 3038 | /* Close FONT_OBJECT that is opened on frame F. */ |
| 3112 | 3039 | ||
| 3113 | void | 3040 | void |
| 3114 | font_close_object (f, font_object) | 3041 | font_close_object (FRAME_PTR f, Lisp_Object font_object) |
| 3115 | FRAME_PTR f; | ||
| 3116 | Lisp_Object font_object; | ||
| 3117 | { | 3042 | { |
| 3118 | struct font *font = XFONT_OBJECT (font_object); | 3043 | struct font *font = XFONT_OBJECT (font_object); |
| 3119 | 3044 | ||
| @@ -3134,10 +3059,7 @@ font_close_object (f, font_object) | |||
| 3134 | FONT is a font-entity and it must be opened to check. */ | 3059 | FONT is a font-entity and it must be opened to check. */ |
| 3135 | 3060 | ||
| 3136 | int | 3061 | int |
| 3137 | font_has_char (f, font, c) | 3062 | font_has_char (FRAME_PTR f, Lisp_Object font, int c) |
| 3138 | FRAME_PTR f; | ||
| 3139 | Lisp_Object font; | ||
| 3140 | int c; | ||
| 3141 | { | 3063 | { |
| 3142 | struct font *fontp; | 3064 | struct font *fontp; |
| 3143 | 3065 | ||
| @@ -3172,9 +3094,7 @@ font_has_char (f, font, c) | |||
| 3172 | /* Return the glyph ID of FONT_OBJECT for character C. */ | 3094 | /* Return the glyph ID of FONT_OBJECT for character C. */ |
| 3173 | 3095 | ||
| 3174 | unsigned | 3096 | unsigned |
| 3175 | font_encode_char (font_object, c) | 3097 | font_encode_char (Lisp_Object font_object, int c) |
| 3176 | Lisp_Object font_object; | ||
| 3177 | int c; | ||
| 3178 | { | 3098 | { |
| 3179 | struct font *font; | 3099 | struct font *font; |
| 3180 | 3100 | ||
| @@ -3187,8 +3107,7 @@ font_encode_char (font_object, c) | |||
| 3187 | /* Return the name of FONT_OBJECT. */ | 3107 | /* Return the name of FONT_OBJECT. */ |
| 3188 | 3108 | ||
| 3189 | Lisp_Object | 3109 | Lisp_Object |
| 3190 | font_get_name (font_object) | 3110 | font_get_name (Lisp_Object font_object) |
| 3191 | Lisp_Object font_object; | ||
| 3192 | { | 3111 | { |
| 3193 | font_assert (FONT_OBJECT_P (font_object)); | 3112 | font_assert (FONT_OBJECT_P (font_object)); |
| 3194 | return AREF (font_object, FONT_NAME_INDEX); | 3113 | return AREF (font_object, FONT_NAME_INDEX); |
| @@ -3198,8 +3117,7 @@ font_get_name (font_object) | |||
| 3198 | /* Return the specification of FONT_OBJECT. */ | 3117 | /* Return the specification of FONT_OBJECT. */ |
| 3199 | 3118 | ||
| 3200 | Lisp_Object | 3119 | Lisp_Object |
| 3201 | font_get_spec (font_object) | 3120 | font_get_spec (Lisp_Object font_object) |
| 3202 | Lisp_Object font_object; | ||
| 3203 | { | 3121 | { |
| 3204 | Lisp_Object spec = font_make_spec (); | 3122 | Lisp_Object spec = font_make_spec (); |
| 3205 | int i; | 3123 | int i; |
| @@ -3216,8 +3134,7 @@ font_get_spec (font_object) | |||
| 3216 | could not be parsed by font_parse_name, return Qnil. */ | 3134 | could not be parsed by font_parse_name, return Qnil. */ |
| 3217 | 3135 | ||
| 3218 | Lisp_Object | 3136 | Lisp_Object |
| 3219 | font_spec_from_name (font_name) | 3137 | font_spec_from_name (Lisp_Object font_name) |
| 3220 | Lisp_Object font_name; | ||
| 3221 | { | 3138 | { |
| 3222 | Lisp_Object spec = Ffont_spec (0, NULL); | 3139 | Lisp_Object spec = Ffont_spec (0, NULL); |
| 3223 | 3140 | ||
| @@ -3231,9 +3148,7 @@ font_spec_from_name (font_name) | |||
| 3231 | 3148 | ||
| 3232 | 3149 | ||
| 3233 | void | 3150 | void |
| 3234 | font_clear_prop (attrs, prop) | 3151 | font_clear_prop (Lisp_Object *attrs, enum font_property_index prop) |
| 3235 | Lisp_Object *attrs; | ||
| 3236 | enum font_property_index prop; | ||
| 3237 | { | 3152 | { |
| 3238 | Lisp_Object font = attrs[LFACE_FONT_INDEX]; | 3153 | Lisp_Object font = attrs[LFACE_FONT_INDEX]; |
| 3239 | 3154 | ||
| @@ -3284,9 +3199,7 @@ font_clear_prop (attrs, prop) | |||
| 3284 | } | 3199 | } |
| 3285 | 3200 | ||
| 3286 | void | 3201 | void |
| 3287 | font_update_lface (f, attrs) | 3202 | font_update_lface (FRAME_PTR f, Lisp_Object *attrs) |
| 3288 | FRAME_PTR f; | ||
| 3289 | Lisp_Object *attrs; | ||
| 3290 | { | 3203 | { |
| 3291 | Lisp_Object spec; | 3204 | Lisp_Object spec; |
| 3292 | 3205 | ||
| @@ -3333,9 +3246,7 @@ font_update_lface (f, attrs) | |||
| 3333 | supports C and matches best with ATTRS and PIXEL_SIZE. */ | 3246 | supports C and matches best with ATTRS and PIXEL_SIZE. */ |
| 3334 | 3247 | ||
| 3335 | static Lisp_Object | 3248 | static Lisp_Object |
| 3336 | font_select_entity (frame, entities, attrs, pixel_size, c) | 3249 | font_select_entity (Lisp_Object frame, Lisp_Object entities, Lisp_Object *attrs, int pixel_size, int c) |
| 3337 | Lisp_Object frame, entities, *attrs; | ||
| 3338 | int pixel_size, c; | ||
| 3339 | { | 3250 | { |
| 3340 | Lisp_Object font_entity; | 3251 | Lisp_Object font_entity; |
| 3341 | Lisp_Object prefer; | 3252 | Lisp_Object prefer; |
| @@ -3380,11 +3291,7 @@ font_select_entity (frame, entities, attrs, pixel_size, c) | |||
| 3380 | character that the entity must support. */ | 3291 | character that the entity must support. */ |
| 3381 | 3292 | ||
| 3382 | Lisp_Object | 3293 | Lisp_Object |
| 3383 | font_find_for_lface (f, attrs, spec, c) | 3294 | font_find_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec, int c) |
| 3384 | FRAME_PTR f; | ||
| 3385 | Lisp_Object *attrs; | ||
| 3386 | Lisp_Object spec; | ||
| 3387 | int c; | ||
| 3388 | { | 3295 | { |
| 3389 | Lisp_Object work; | 3296 | Lisp_Object work; |
| 3390 | Lisp_Object frame, entities, val; | 3297 | Lisp_Object frame, entities, val; |
| @@ -3534,11 +3441,7 @@ font_find_for_lface (f, attrs, spec, c) | |||
| 3534 | 3441 | ||
| 3535 | 3442 | ||
| 3536 | Lisp_Object | 3443 | Lisp_Object |
| 3537 | font_open_for_lface (f, entity, attrs, spec) | 3444 | font_open_for_lface (FRAME_PTR f, Lisp_Object entity, Lisp_Object *attrs, Lisp_Object spec) |
| 3538 | FRAME_PTR f; | ||
| 3539 | Lisp_Object entity; | ||
| 3540 | Lisp_Object *attrs; | ||
| 3541 | Lisp_Object spec; | ||
| 3542 | { | 3445 | { |
| 3543 | int size; | 3446 | int size; |
| 3544 | 3447 | ||
| @@ -3581,9 +3484,7 @@ font_open_for_lface (f, entity, attrs, spec) | |||
| 3581 | font-object. */ | 3484 | font-object. */ |
| 3582 | 3485 | ||
| 3583 | Lisp_Object | 3486 | Lisp_Object |
| 3584 | font_load_for_lface (f, attrs, spec) | 3487 | font_load_for_lface (FRAME_PTR f, Lisp_Object *attrs, Lisp_Object spec) |
| 3585 | FRAME_PTR f; | ||
| 3586 | Lisp_Object *attrs, spec; | ||
| 3587 | { | 3488 | { |
| 3588 | Lisp_Object entity, name; | 3489 | Lisp_Object entity, name; |
| 3589 | 3490 | ||
| @@ -3613,9 +3514,7 @@ font_load_for_lface (f, attrs, spec) | |||
| 3613 | /* Make FACE on frame F ready to use the font opened for FACE. */ | 3514 | /* Make FACE on frame F ready to use the font opened for FACE. */ |
| 3614 | 3515 | ||
| 3615 | void | 3516 | void |
| 3616 | font_prepare_for_face (f, face) | 3517 | font_prepare_for_face (FRAME_PTR f, struct face *face) |
| 3617 | FRAME_PTR f; | ||
| 3618 | struct face *face; | ||
| 3619 | { | 3518 | { |
| 3620 | if (face->font->driver->prepare_face) | 3519 | if (face->font->driver->prepare_face) |
| 3621 | face->font->driver->prepare_face (f, face); | 3520 | face->font->driver->prepare_face (f, face); |
| @@ -3625,9 +3524,7 @@ font_prepare_for_face (f, face) | |||
| 3625 | /* Make FACE on frame F stop using the font opened for FACE. */ | 3524 | /* Make FACE on frame F stop using the font opened for FACE. */ |
| 3626 | 3525 | ||
| 3627 | void | 3526 | void |
| 3628 | font_done_for_face (f, face) | 3527 | font_done_for_face (FRAME_PTR f, struct face *face) |
| 3629 | FRAME_PTR f; | ||
| 3630 | struct face *face; | ||
| 3631 | { | 3528 | { |
| 3632 | if (face->font->driver->done_face) | 3529 | if (face->font->driver->done_face) |
| 3633 | face->font->driver->done_face (f, face); | 3530 | face->font->driver->done_face (f, face); |
| @@ -3639,9 +3536,7 @@ font_done_for_face (f, face) | |||
| 3639 | font is found, return Qnil. */ | 3536 | font is found, return Qnil. */ |
| 3640 | 3537 | ||
| 3641 | Lisp_Object | 3538 | Lisp_Object |
| 3642 | font_open_by_spec (f, spec) | 3539 | font_open_by_spec (FRAME_PTR f, Lisp_Object spec) |
| 3643 | FRAME_PTR f; | ||
| 3644 | Lisp_Object spec; | ||
| 3645 | { | 3540 | { |
| 3646 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; | 3541 | Lisp_Object attrs[LFACE_VECTOR_SIZE]; |
| 3647 | 3542 | ||
| @@ -3665,9 +3560,7 @@ font_open_by_spec (f, spec) | |||
| 3665 | found, return Qnil. */ | 3560 | found, return Qnil. */ |
| 3666 | 3561 | ||
| 3667 | Lisp_Object | 3562 | Lisp_Object |
| 3668 | font_open_by_name (f, name) | 3563 | font_open_by_name (FRAME_PTR f, char *name) |
| 3669 | FRAME_PTR f; | ||
| 3670 | char *name; | ||
| 3671 | { | 3564 | { |
| 3672 | Lisp_Object args[2]; | 3565 | Lisp_Object args[2]; |
| 3673 | Lisp_Object spec, ret; | 3566 | Lisp_Object spec, ret; |
| @@ -3697,9 +3590,7 @@ font_open_by_name (f, name) | |||
| 3697 | (e.g. syms_of_xfont). */ | 3590 | (e.g. syms_of_xfont). */ |
| 3698 | 3591 | ||
| 3699 | void | 3592 | void |
| 3700 | register_font_driver (driver, f) | 3593 | register_font_driver (struct font_driver *driver, FRAME_PTR f) |
| 3701 | struct font_driver *driver; | ||
| 3702 | FRAME_PTR f; | ||
| 3703 | { | 3594 | { |
| 3704 | struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; | 3595 | struct font_driver_list *root = f ? f->font_driver_list : font_driver_list; |
| 3705 | struct font_driver_list *prev, *list; | 3596 | struct font_driver_list *prev, *list; |
| @@ -3727,8 +3618,7 @@ register_font_driver (driver, f) | |||
| 3727 | } | 3618 | } |
| 3728 | 3619 | ||
| 3729 | void | 3620 | void |
| 3730 | free_font_driver_list (f) | 3621 | free_font_driver_list (FRAME_PTR f) |
| 3731 | FRAME_PTR f; | ||
| 3732 | { | 3622 | { |
| 3733 | struct font_driver_list *list, *next; | 3623 | struct font_driver_list *list, *next; |
| 3734 | 3624 | ||
| @@ -3750,9 +3640,7 @@ free_font_driver_list (f) | |||
| 3750 | F. */ | 3640 | F. */ |
| 3751 | 3641 | ||
| 3752 | Lisp_Object | 3642 | Lisp_Object |
| 3753 | font_update_drivers (f, new_drivers) | 3643 | font_update_drivers (FRAME_PTR f, Lisp_Object new_drivers) |
| 3754 | FRAME_PTR f; | ||
| 3755 | Lisp_Object new_drivers; | ||
| 3756 | { | 3644 | { |
| 3757 | Lisp_Object active_drivers = Qnil; | 3645 | Lisp_Object active_drivers = Qnil; |
| 3758 | struct font_driver *driver; | 3646 | struct font_driver *driver; |
| @@ -3843,10 +3731,7 @@ font_update_drivers (f, new_drivers) | |||
| 3843 | } | 3731 | } |
| 3844 | 3732 | ||
| 3845 | int | 3733 | int |
| 3846 | font_put_frame_data (f, driver, data) | 3734 | font_put_frame_data (FRAME_PTR f, struct font_driver *driver, void *data) |
| 3847 | FRAME_PTR f; | ||
| 3848 | struct font_driver *driver; | ||
| 3849 | void *data; | ||
| 3850 | { | 3735 | { |
| 3851 | struct font_data_list *list, *prev; | 3736 | struct font_data_list *list, *prev; |
| 3852 | 3737 | ||
| @@ -3880,9 +3765,7 @@ font_put_frame_data (f, driver, data) | |||
| 3880 | 3765 | ||
| 3881 | 3766 | ||
| 3882 | void * | 3767 | void * |
| 3883 | font_get_frame_data (f, driver) | 3768 | font_get_frame_data (FRAME_PTR f, struct font_driver *driver) |
| 3884 | FRAME_PTR f; | ||
| 3885 | struct font_driver *driver; | ||
| 3886 | { | 3769 | { |
| 3887 | struct font_data_list *list; | 3770 | struct font_data_list *list; |
| 3888 | 3771 | ||
| @@ -3901,12 +3784,7 @@ font_get_frame_data (f, driver) | |||
| 3901 | STRING. */ | 3784 | STRING. */ |
| 3902 | 3785 | ||
| 3903 | Lisp_Object | 3786 | Lisp_Object |
| 3904 | font_at (c, pos, face, w, string) | 3787 | font_at (int c, EMACS_INT pos, struct face *face, struct window *w, Lisp_Object string) |
| 3905 | int c; | ||
| 3906 | EMACS_INT pos; | ||
| 3907 | struct face *face; | ||
| 3908 | struct window *w; | ||
| 3909 | Lisp_Object string; | ||
| 3910 | { | 3788 | { |
| 3911 | FRAME_PTR f; | 3789 | FRAME_PTR f; |
| 3912 | int multibyte; | 3790 | int multibyte; |
| @@ -3988,11 +3866,7 @@ font_at (c, pos, face, w, string) | |||
| 3988 | It is assured that the current buffer (or STRING) is multibyte. */ | 3866 | It is assured that the current buffer (or STRING) is multibyte. */ |
| 3989 | 3867 | ||
| 3990 | Lisp_Object | 3868 | Lisp_Object |
| 3991 | font_range (pos, limit, w, face, string) | 3869 | font_range (EMACS_INT pos, EMACS_INT *limit, struct window *w, struct face *face, Lisp_Object string) |
| 3992 | EMACS_INT pos, *limit; | ||
| 3993 | struct window *w; | ||
| 3994 | struct face *face; | ||
| 3995 | Lisp_Object string; | ||
| 3996 | { | 3870 | { |
| 3997 | EMACS_INT pos_byte, ignore; | 3871 | EMACS_INT pos_byte, ignore; |
| 3998 | int c; | 3872 | int c; |
| @@ -4535,8 +4409,7 @@ DEFUN ("clear-font-cache", Fclear_font_cache, Sclear_font_cache, 0, 0, 0, | |||
| 4535 | 4409 | ||
| 4536 | 4410 | ||
| 4537 | void | 4411 | void |
| 4538 | font_fill_lglyph_metrics (glyph, font_object) | 4412 | font_fill_lglyph_metrics (Lisp_Object glyph, Lisp_Object font_object) |
| 4539 | Lisp_Object glyph, font_object; | ||
| 4540 | { | 4413 | { |
| 4541 | struct font *font = XFONT_OBJECT (font_object); | 4414 | struct font *font = XFONT_OBJECT (font_object); |
| 4542 | unsigned code; | 4415 | unsigned code; |
| @@ -5118,9 +4991,7 @@ If the named font is not yet loaded, return nil. */) | |||
| 5118 | build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry)) | 4991 | build_style_table ((TBL), sizeof TBL / sizeof (struct table_entry)) |
| 5119 | 4992 | ||
| 5120 | static Lisp_Object | 4993 | static Lisp_Object |
| 5121 | build_style_table (entry, nelement) | 4994 | build_style_table (const struct table_entry *entry, int nelement) |
| 5122 | struct table_entry *entry; | ||
| 5123 | int nelement; | ||
| 5124 | { | 4995 | { |
| 5125 | int i, j; | 4996 | int i, j; |
| 5126 | Lisp_Object table, elt; | 4997 | Lisp_Object table, elt; |
| @@ -5150,9 +5021,7 @@ static Lisp_Object Vfont_log_deferred; | |||
| 5150 | opening), ARG is the argument for the action, and RESULT is the | 5021 | opening), ARG is the argument for the action, and RESULT is the |
| 5151 | result of the action. */ | 5022 | result of the action. */ |
| 5152 | void | 5023 | void |
| 5153 | font_add_log (action, arg, result) | 5024 | font_add_log (char *action, Lisp_Object arg, Lisp_Object result) |
| 5154 | char *action; | ||
| 5155 | Lisp_Object arg, result; | ||
| 5156 | { | 5025 | { |
| 5157 | Lisp_Object tail, val; | 5026 | Lisp_Object tail, val; |
| 5158 | int i; | 5027 | int i; |
| @@ -5238,9 +5107,7 @@ font_add_log (action, arg, result) | |||
| 5238 | as font_add_log. */ | 5107 | as font_add_log. */ |
| 5239 | 5108 | ||
| 5240 | void | 5109 | void |
| 5241 | font_deferred_log (action, arg, result) | 5110 | font_deferred_log (char *action, Lisp_Object arg, Lisp_Object result) |
| 5242 | char *action; | ||
| 5243 | Lisp_Object arg, result; | ||
| 5244 | { | 5111 | { |
| 5245 | if (EQ (Vfont_log, Qt)) | 5112 | if (EQ (Vfont_log, Qt)) |
| 5246 | return; | 5113 | return; |
| @@ -5249,17 +5116,17 @@ font_deferred_log (action, arg, result) | |||
| 5249 | ASET (Vfont_log_deferred, 2, result); | 5116 | ASET (Vfont_log_deferred, 2, result); |
| 5250 | } | 5117 | } |
| 5251 | 5118 | ||
| 5252 | extern void syms_of_ftfont (); | 5119 | extern void syms_of_ftfont (void); |
| 5253 | extern void syms_of_xfont (); | 5120 | extern void syms_of_xfont (void); |
| 5254 | extern void syms_of_xftfont (); | 5121 | extern void syms_of_xftfont (void); |
| 5255 | extern void syms_of_ftxfont (); | 5122 | extern void syms_of_ftxfont (void); |
| 5256 | extern void syms_of_bdffont (); | 5123 | extern void syms_of_bdffont (void); |
| 5257 | extern void syms_of_w32font (); | 5124 | extern void syms_of_w32font (void); |
| 5258 | extern void syms_of_atmfont (); | 5125 | extern void syms_of_atmfont (void); |
| 5259 | extern void syms_of_nsfont (); | 5126 | extern void syms_of_nsfont (void); |
| 5260 | 5127 | ||
| 5261 | void | 5128 | void |
| 5262 | syms_of_font () | 5129 | syms_of_font (void) |
| 5263 | { | 5130 | { |
| 5264 | sort_shift_bits[FONT_TYPE_INDEX] = 0; | 5131 | sort_shift_bits[FONT_TYPE_INDEX] = 0; |
| 5265 | sort_shift_bits[FONT_SLANT_INDEX] = 2; | 5132 | sort_shift_bits[FONT_SLANT_INDEX] = 2; |
| @@ -5446,7 +5313,7 @@ EMACS_FONT_LOG is set. Otherwise, it is set to t. */); | |||
| 5446 | } | 5313 | } |
| 5447 | 5314 | ||
| 5448 | void | 5315 | void |
| 5449 | init_font () | 5316 | init_font (void) |
| 5450 | { | 5317 | { |
| 5451 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; | 5318 | Vfont_log = egetenv ("EMACS_FONT_LOG") ? Qnil : Qt; |
| 5452 | } | 5319 | } |