aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2016-12-12 14:27:35 -0800
committerPaul Eggert2016-12-12 14:27:35 -0800
commita41ded87b318ce3cbeb0ba3624bcb83ae3b8a437 (patch)
tree02ae5860fd214689f9397c5d4a04dd71b524c3ac /src
parent3c655230d2517d091d6af9835031cbc5d665dccb (diff)
downloademacs-a41ded87b318ce3cbeb0ba3624bcb83ae3b8a437.tar.gz
emacs-a41ded87b318ce3cbeb0ba3624bcb83ae3b8a437.zip
Use C99 syntax for font drivers
Problem reported by Daniel Colascione in: http://lists.gnu.org/archive/html/emacs-devel/2016-12/msg00515.html * src/ftcrfont.c (ftcrfont_driver): * src/ftfont.c (ftfont_driver): * src/ftxfont.c (ftxfont_driver): * src/macfont.m (macfont_driver): * src/nsfont.m (nsfont_driver): * src/xfont.c (xfont_driver): * src/xftfont.c (xftfont_driver): Use C99 syntax, not the old GNU C syntax.
Diffstat (limited to 'src')
-rw-r--r--src/ftcrfont.c36
-rw-r--r--src/ftfont.c34
-rw-r--r--src/ftxfont.c38
-rw-r--r--src/macfont.m30
-rw-r--r--src/nsfont.m24
-rw-r--r--src/xfont.c26
-rw-r--r--src/xftfont.c46
7 files changed, 117 insertions, 117 deletions
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index f62b40f41c4..67b43b63499 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -280,30 +280,30 @@ ftcrfont_draw (struct glyph_string *s,
280 280
281struct font_driver const ftcrfont_driver = 281struct font_driver const ftcrfont_driver =
282 { 282 {
283 type: LISPSYM_INITIALLY (Qftcr), 283 .type = LISPSYM_INITIALLY (Qftcr),
284 get_cache: ftfont_get_cache, 284 .get_cache = ftfont_get_cache,
285 list: ftcrfont_list, 285 .list = ftcrfont_list,
286 match: ftcrfont_match, 286 .match = ftcrfont_match,
287 list_family: ftfont_list_family, 287 .list_family = ftfont_list_family,
288 open: ftcrfont_open, 288 .open = ftcrfont_open,
289 close: ftcrfont_close, 289 .close = ftcrfont_close,
290 has_char: ftfont_has_char, 290 .has_char = ftfont_has_char,
291 encode_char: ftfont_encode_char, 291 .encode_char = ftfont_encode_char,
292 text_extents: ftcrfont_text_extents, 292 .text_extents = ftcrfont_text_extents,
293 draw: ftcrfont_draw, 293 .draw = ftcrfont_draw,
294 get_bitmap: ftfont_get_bitmap, 294 .get_bitmap = ftfont_get_bitmap,
295 anchor_point: ftfont_anchor_point, 295 .anchor_point = ftfont_anchor_point,
296#ifdef HAVE_LIBOTF 296#ifdef HAVE_LIBOTF
297 otf_capability: ftfont_otf_capability, 297 .otf_capability = ftfont_otf_capability,
298#endif 298#endif
299#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 299#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
300 shape: ftfont_shape, 300 .shape = ftfont_shape,
301#endif 301#endif
302#ifdef HAVE_OTF_GET_VARIATION_GLYPHS 302#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
303 get_variation_glyphs: ftfont_variation_glyphs, 303 .get_variation_glyphs = ftfont_variation_glyphs,
304#endif 304#endif
305 filter_properties: ftfont_filter_properties, 305 .filter_properties = ftfont_filter_properties,
306 combining_capability: ftfont_combining_capability, 306 .combining_capability = ftfont_combining_capability,
307 }; 307 };
308 308
309void 309void
diff --git a/src/ftfont.c b/src/ftfont.c
index 768b524f0a6..bcc10c45fba 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -2697,29 +2697,29 @@ ftfont_combining_capability (struct font *font)
2697static struct font_driver const ftfont_driver = 2697static struct font_driver const ftfont_driver =
2698 { 2698 {
2699 /* We can't draw a text without device dependent functions. */ 2699 /* We can't draw a text without device dependent functions. */
2700 type: LISPSYM_INITIALLY (Qfreetype), 2700 .type = LISPSYM_INITIALLY (Qfreetype),
2701 get_cache: ftfont_get_cache, 2701 .get_cache = ftfont_get_cache,
2702 list: ftfont_list, 2702 .list = ftfont_list,
2703 match: ftfont_match, 2703 .match = ftfont_match,
2704 list_family: ftfont_list_family, 2704 .list_family = ftfont_list_family,
2705 open: ftfont_open, 2705 .open = ftfont_open,
2706 close: ftfont_close, 2706 .close = ftfont_close,
2707 has_char: ftfont_has_char, 2707 .has_char = ftfont_has_char,
2708 encode_char: ftfont_encode_char, 2708 .encode_char = ftfont_encode_char,
2709 text_extents: ftfont_text_extents, 2709 .text_extents = ftfont_text_extents,
2710 get_bitmap: ftfont_get_bitmap, 2710 .get_bitmap = ftfont_get_bitmap,
2711 anchor_point: ftfont_anchor_point, 2711 .anchor_point = ftfont_anchor_point,
2712#ifdef HAVE_LIBOTF 2712#ifdef HAVE_LIBOTF
2713 otf_capability: ftfont_otf_capability, 2713 .otf_capability = ftfont_otf_capability,
2714#endif 2714#endif
2715#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 2715#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
2716 shape: ftfont_shape, 2716 .shape = ftfont_shape,
2717#endif 2717#endif
2718#ifdef HAVE_OTF_GET_VARIATION_GLYPHS 2718#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
2719 get_variation_glyphs: ftfont_variation_glyphs, 2719 .get_variation_glyphs = ftfont_variation_glyphs,
2720#endif 2720#endif
2721 filter_properties: ftfont_filter_properties, 2721 .filter_properties = ftfont_filter_properties,
2722 combining_capability: ftfont_combining_capability, 2722 .combining_capability = ftfont_combining_capability,
2723 }; 2723 };
2724 2724
2725void 2725void
diff --git a/src/ftxfont.c b/src/ftxfont.c
index d8792ac27bd..d1632e3c9ac 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -342,31 +342,31 @@ ftxfont_end_for_frame (struct frame *f)
342struct font_driver const ftxfont_driver = 342struct font_driver const ftxfont_driver =
343 { 343 {
344 /* We can't draw a text without device dependent functions. */ 344 /* We can't draw a text without device dependent functions. */
345 type: LISPSYM_INITIALLY (Qftx), 345 .type = LISPSYM_INITIALLY (Qftx),
346 get_cache: ftfont_get_cache, 346 .get_cache = ftfont_get_cache,
347 list: ftxfont_list, 347 .list = ftxfont_list,
348 match: ftxfont_match, 348 .match = ftxfont_match,
349 list_family: ftfont_list_family, 349 .list_family = ftfont_list_family,
350 open: ftxfont_open, 350 .open = ftxfont_open,
351 close: ftxfont_close, 351 .close = ftxfont_close,
352 has_char: ftfont_has_char, 352 .has_char = ftfont_has_char,
353 encode_char: ftfont_encode_char, 353 .encode_char = ftfont_encode_char,
354 text_extents: ftfont_text_extents, 354 .text_extents = ftfont_text_extents,
355 draw: ftxfont_draw, 355 .draw = ftxfont_draw,
356 get_bitmap: ftfont_get_bitmap, 356 .get_bitmap = ftfont_get_bitmap,
357 anchor_point: ftfont_anchor_point, 357 .anchor_point = ftfont_anchor_point,
358#ifdef HAVE_LIBOTF 358#ifdef HAVE_LIBOTF
359 otf_capability: ftfont_otf_capability, 359 .otf_capability = ftfont_otf_capability,
360#endif 360#endif
361 end_for_frame: ftxfont_end_for_frame, 361 .end_for_frame = ftxfont_end_for_frame,
362#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 362#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
363 shape: ftfont_shape, 363 .shape = ftfont_shape,
364#endif 364#endif
365#ifdef HAVE_OTF_GET_VARIATION_GLYPHS 365#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
366 get_variation_glyphs: ftfont_variation_glyphs, 366 .get_variation_glyphs = ftfont_variation_glyphs,
367#endif 367#endif
368 filter_properties: ftfont_filter_properties, 368 .filter_properties = ftfont_filter_properties,
369 combining_capability: ftfont_combining_capability, 369 .combining_capability = ftfont_combining_capability,
370 }; 370 };
371 371
372void 372void
diff --git a/src/macfont.m b/src/macfont.m
index b2f3dff3097..855b3fe7f7a 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1663,21 +1663,21 @@ static void macfont_filter_properties (Lisp_Object, Lisp_Object);
1663 1663
1664static struct font_driver const macfont_driver = 1664static struct font_driver const macfont_driver =
1665 { 1665 {
1666 type: LISPSYM_INITIALLY (Qmac_ct), 1666 .type = LISPSYM_INITIALLY (Qmac_ct),
1667 get_cache: macfont_get_cache, 1667 .get_cache = macfont_get_cache,
1668 list: macfont_list, 1668 .list = macfont_list,
1669 match: macfont_match, 1669 .match = macfont_match,
1670 list_family: macfont_list_family, 1670 .list_family = macfont_list_family,
1671 free_entity: macfont_free_entity, 1671 .free_entity = macfont_free_entity,
1672 open: macfont_open, 1672 .open = macfont_open,
1673 close: macfont_close, 1673 .close = macfont_close,
1674 has_char: macfont_has_char, 1674 .has_char = macfont_has_char,
1675 encode_char: macfont_encode_char, 1675 .encode_char = macfont_encode_char,
1676 text_extents: macfont_text_extents, 1676 .text_extents = macfont_text_extents,
1677 draw: macfont_draw, 1677 .draw = macfont_draw,
1678 shape: macfont_shape, 1678 .shape = macfont_shape,
1679 get_variation_glyphs: macfont_variation_glyphs, 1679 .get_variation_glyphs = macfont_variation_glyphs,
1680 filter_properties: macfont_filter_properties, 1680 .filter_properties = macfont_filter_properties,
1681 }; 1681 };
1682 1682
1683static Lisp_Object 1683static Lisp_Object
diff --git a/src/nsfont.m b/src/nsfont.m
index d14c362eddf..757b217597a 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1485,18 +1485,18 @@ ns_dump_glyphstring (struct glyph_string *s)
1485 1485
1486struct font_driver const nsfont_driver = 1486struct font_driver const nsfont_driver =
1487 { 1487 {
1488 type: LISPSYM_INITIALLY (Qns), 1488 .type = LISPSYM_INITIALLY (Qns),
1489 case_sensitive: true, 1489 .case_sensitive = true,
1490 get_cache: nsfont_get_cache, 1490 .get_cache = nsfont_get_cache,
1491 list: nsfont_list, 1491 .list = nsfont_list,
1492 match: nsfont_match, 1492 .match = nsfont_match,
1493 list_family: nsfont_list_family, 1493 .list_family = nsfont_list_family,
1494 open: nsfont_open, 1494 .open = nsfont_open,
1495 close: nsfont_close, 1495 .close = nsfont_close,
1496 has_char: nsfont_has_char, 1496 .has_char = nsfont_has_char,
1497 encode_char: nsfont_encode_char, 1497 .encode_char = nsfont_encode_char,
1498 text_extents: nsfont_text_extents, 1498 .text_extents = nsfont_text_extents,
1499 draw: nsfont_draw, 1499 .draw = nsfont_draw,
1500 }; 1500 };
1501 1501
1502void 1502void
diff --git a/src/xfont.c b/src/xfont.c
index 5999f6715cc..09ca6282c7f 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -1079,19 +1079,19 @@ xfont_check (struct frame *f, struct font *font)
1079 1079
1080struct font_driver const xfont_driver = 1080struct font_driver const xfont_driver =
1081 { 1081 {
1082 type: LISPSYM_INITIALLY (Qx), 1082 .type = LISPSYM_INITIALLY (Qx),
1083 get_cache: xfont_get_cache, 1083 .get_cache = xfont_get_cache,
1084 list: xfont_list, 1084 .list = xfont_list,
1085 match: xfont_match, 1085 .match = xfont_match,
1086 list_family: xfont_list_family, 1086 .list_family = xfont_list_family,
1087 open: xfont_open, 1087 .open = xfont_open,
1088 close: xfont_close, 1088 .close = xfont_close,
1089 prepare_face: xfont_prepare_face, 1089 .prepare_face = xfont_prepare_face,
1090 has_char: xfont_has_char, 1090 .has_char = xfont_has_char,
1091 encode_char: xfont_encode_char, 1091 .encode_char = xfont_encode_char,
1092 text_extents: xfont_text_extents, 1092 .text_extents = xfont_text_extents,
1093 draw: xfont_draw, 1093 .draw = xfont_draw,
1094 check: xfont_check, 1094 .check = xfont_check,
1095 }; 1095 };
1096 1096
1097void 1097void
diff --git a/src/xftfont.c b/src/xftfont.c
index 74f5ec66e74..7f0e3c6ceb5 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -752,35 +752,35 @@ xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object,
752struct font_driver const xftfont_driver = 752struct font_driver const xftfont_driver =
753 { 753 {
754 /* We can't draw a text without device dependent functions. */ 754 /* We can't draw a text without device dependent functions. */
755 type: LISPSYM_INITIALLY (Qxft), 755 .type = LISPSYM_INITIALLY (Qxft),
756 get_cache: xfont_get_cache, 756 .get_cache = xfont_get_cache,
757 list: xftfont_list, 757 .list = xftfont_list,
758 match: xftfont_match, 758 .match = xftfont_match,
759 list_family: ftfont_list_family, 759 .list_family = ftfont_list_family,
760 open: xftfont_open, 760 .open = xftfont_open,
761 close: xftfont_close, 761 .close = xftfont_close,
762 prepare_face: xftfont_prepare_face, 762 .prepare_face = xftfont_prepare_face,
763 done_face: xftfont_done_face, 763 .done_face = xftfont_done_face,
764 has_char: xftfont_has_char, 764 .has_char = xftfont_has_char,
765 encode_char: xftfont_encode_char, 765 .encode_char = xftfont_encode_char,
766 text_extents: xftfont_text_extents, 766 .text_extents = xftfont_text_extents,
767 draw: xftfont_draw, 767 .draw = xftfont_draw,
768 get_bitmap: ftfont_get_bitmap, 768 .get_bitmap = ftfont_get_bitmap,
769 anchor_point: ftfont_anchor_point, 769 .anchor_point = ftfont_anchor_point,
770#ifdef HAVE_LIBOTF 770#ifdef HAVE_LIBOTF
771 otf_capability: ftfont_otf_capability, 771 .otf_capability = ftfont_otf_capability,
772#endif 772#endif
773 end_for_frame: xftfont_end_for_frame, 773 .end_for_frame = xftfont_end_for_frame,
774#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF 774#if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
775 shape: xftfont_shape, 775 .shape = xftfont_shape,
776#endif 776#endif
777#ifdef HAVE_OTF_GET_VARIATION_GLYPHS 777#ifdef HAVE_OTF_GET_VARIATION_GLYPHS
778 get_variation_glyphs: ftfont_variation_glyphs, 778 .get_variation_glyphs = ftfont_variation_glyphs,
779#endif 779#endif
780 filter_properties: ftfont_filter_properties, 780 .filter_properties = ftfont_filter_properties,
781 cached_font_ok: xftfont_cached_font_ok, 781 .cached_font_ok = xftfont_cached_font_ok,
782 combining_capability: ftfont_combining_capability, 782 .combining_capability = ftfont_combining_capability,
783 drop_xrender_surfaces: xftfont_drop_xrender_surfaces, 783 .drop_xrender_surfaces = xftfont_drop_xrender_surfaces,
784 }; 784 };
785 785
786void 786void