]> git.eshelyaron.com Git - emacs.git/commitdiff
Use C99 syntax for font drivers
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Dec 2016 22:27:35 +0000 (14:27 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 12 Dec 2016 22:27:35 +0000 (14:27 -0800)
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.

src/ftcrfont.c
src/ftfont.c
src/ftxfont.c
src/macfont.m
src/nsfont.m
src/xfont.c
src/xftfont.c

index f62b40f41c40d12a6cd9fe62e4746410bb250c83..67b43b63499e938216bd825ffe0338ee3feb74ea 100644 (file)
@@ -280,30 +280,30 @@ ftcrfont_draw (struct glyph_string *s,
 
 struct font_driver const ftcrfont_driver =
   {
-  type: LISPSYM_INITIALLY (Qftcr),
-  get_cache: ftfont_get_cache,
-  list: ftcrfont_list,
-  match: ftcrfont_match,
-  list_family: ftfont_list_family,
-  open: ftcrfont_open,
-  close: ftcrfont_close,
-  has_char: ftfont_has_char,
-  encode_char: ftfont_encode_char,
-  text_extents: ftcrfont_text_extents,
-  draw: ftcrfont_draw,
-  get_bitmap: ftfont_get_bitmap,
-  anchor_point: ftfont_anchor_point,
+  .type = LISPSYM_INITIALLY (Qftcr),
+  .get_cache = ftfont_get_cache,
+  .list = ftcrfont_list,
+  .match = ftcrfont_match,
+  .list_family = ftfont_list_family,
+  .open = ftcrfont_open,
+  .close = ftcrfont_close,
+  .has_char = ftfont_has_char,
+  .encode_char = ftfont_encode_char,
+  .text_extents = ftcrfont_text_extents,
+  .draw = ftcrfont_draw,
+  .get_bitmap = ftfont_get_bitmap,
+  .anchor_point = ftfont_anchor_point,
 #ifdef HAVE_LIBOTF
-  otf_capability: ftfont_otf_capability,
+  .otf_capability = ftfont_otf_capability,
 #endif
 #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
-  shape: ftfont_shape,
+  .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-  get_variation_glyphs: ftfont_variation_glyphs,
+  .get_variation_glyphs = ftfont_variation_glyphs,
 #endif
-  filter_properties: ftfont_filter_properties,
-  combining_capability: ftfont_combining_capability,
+  .filter_properties = ftfont_filter_properties,
+  .combining_capability = ftfont_combining_capability,
   };
 
 void
index 768b524f0a6930ef10a1eb9d4e54228e40ee1db1..bcc10c45fba3c00ed93ec3dd9b7fd056c3db14a2 100644 (file)
@@ -2697,29 +2697,29 @@ ftfont_combining_capability (struct font *font)
 static struct font_driver const ftfont_driver =
   {
   /* We can't draw a text without device dependent functions.  */
-  type: LISPSYM_INITIALLY (Qfreetype),
-  get_cache: ftfont_get_cache,
-  list: ftfont_list,
-  match: ftfont_match,
-  list_family: ftfont_list_family,
-  open: ftfont_open,
-  close: ftfont_close,
-  has_char: ftfont_has_char,
-  encode_char: ftfont_encode_char,
-  text_extents: ftfont_text_extents,
-  get_bitmap: ftfont_get_bitmap,
-  anchor_point: ftfont_anchor_point,
+  .type = LISPSYM_INITIALLY (Qfreetype),
+  .get_cache = ftfont_get_cache,
+  .list = ftfont_list,
+  .match = ftfont_match,
+  .list_family = ftfont_list_family,
+  .open = ftfont_open,
+  .close = ftfont_close,
+  .has_char = ftfont_has_char,
+  .encode_char = ftfont_encode_char,
+  .text_extents = ftfont_text_extents,
+  .get_bitmap = ftfont_get_bitmap,
+  .anchor_point = ftfont_anchor_point,
 #ifdef HAVE_LIBOTF
-  otf_capability: ftfont_otf_capability,
+  .otf_capability = ftfont_otf_capability,
 #endif
 #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
-  shape: ftfont_shape,
+  .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-  get_variation_glyphs: ftfont_variation_glyphs,
+  .get_variation_glyphs = ftfont_variation_glyphs,
 #endif
-  filter_properties: ftfont_filter_properties,
-  combining_capability: ftfont_combining_capability,
+  .filter_properties = ftfont_filter_properties,
+  .combining_capability = ftfont_combining_capability,
   };
 
 void
index d8792ac27bd43a86af9a0214833431e22df77b56..d1632e3c9ac7be4396c61caf983e6eed9e69f691 100644 (file)
@@ -342,31 +342,31 @@ ftxfont_end_for_frame (struct frame *f)
 struct font_driver const ftxfont_driver =
   {
   /* We can't draw a text without device dependent functions.  */
-  type: LISPSYM_INITIALLY (Qftx),
-  get_cache: ftfont_get_cache,
-  list: ftxfont_list,
-  match: ftxfont_match,
-  list_family: ftfont_list_family,
-  open: ftxfont_open,
-  close: ftxfont_close,
-  has_char: ftfont_has_char,
-  encode_char: ftfont_encode_char,
-  text_extents: ftfont_text_extents,
-  draw: ftxfont_draw,
-  get_bitmap: ftfont_get_bitmap,
-  anchor_point: ftfont_anchor_point,
+  .type = LISPSYM_INITIALLY (Qftx),
+  .get_cache = ftfont_get_cache,
+  .list = ftxfont_list,
+  .match = ftxfont_match,
+  .list_family = ftfont_list_family,
+  .open = ftxfont_open,
+  .close = ftxfont_close,
+  .has_char = ftfont_has_char,
+  .encode_char = ftfont_encode_char,
+  .text_extents = ftfont_text_extents,
+  .draw = ftxfont_draw,
+  .get_bitmap = ftfont_get_bitmap,
+  .anchor_point = ftfont_anchor_point,
 #ifdef HAVE_LIBOTF
-  otf_capability: ftfont_otf_capability,
+  .otf_capability = ftfont_otf_capability,
 #endif
-  end_for_frame: ftxfont_end_for_frame,
+  .end_for_frame = ftxfont_end_for_frame,
 #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
-  shape: ftfont_shape,
+  .shape = ftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-  get_variation_glyphs: ftfont_variation_glyphs,
+  .get_variation_glyphs = ftfont_variation_glyphs,
 #endif
-  filter_properties: ftfont_filter_properties,
-  combining_capability: ftfont_combining_capability,
+  .filter_properties = ftfont_filter_properties,
+  .combining_capability = ftfont_combining_capability,
   };
 
 void
index b2f3dff30974a3cbe909fb991d4ab6266e9e5d0b..855b3fe7f7aec1ed411c0563bf70d2d9d31c9d0e 100644 (file)
@@ -1663,21 +1663,21 @@ static void macfont_filter_properties (Lisp_Object, Lisp_Object);
 
 static struct font_driver const macfont_driver =
   {
-  type: LISPSYM_INITIALLY (Qmac_ct),
-  get_cache: macfont_get_cache,
-  list: macfont_list,
-  match: macfont_match,
-  list_family: macfont_list_family,
-  free_entity: macfont_free_entity,
-  open: macfont_open,
-  close: macfont_close,
-  has_char: macfont_has_char,
-  encode_char: macfont_encode_char,
-  text_extents: macfont_text_extents,
-  draw: macfont_draw,
-  shape: macfont_shape,
-  get_variation_glyphs: macfont_variation_glyphs,
-  filter_properties: macfont_filter_properties,
+  .type = LISPSYM_INITIALLY (Qmac_ct),
+  .get_cache = macfont_get_cache,
+  .list = macfont_list,
+  .match = macfont_match,
+  .list_family = macfont_list_family,
+  .free_entity = macfont_free_entity,
+  .open = macfont_open,
+  .close = macfont_close,
+  .has_char = macfont_has_char,
+  .encode_char = macfont_encode_char,
+  .text_extents = macfont_text_extents,
+  .draw = macfont_draw,
+  .shape = macfont_shape,
+  .get_variation_glyphs = macfont_variation_glyphs,
+  .filter_properties = macfont_filter_properties,
   };
 
 static Lisp_Object
index d14c362eddffeb0d620fd6b55659fef6eedb61fa..757b217597ac68f35e1c70e6beeb9fd98f71131c 100644 (file)
@@ -1485,18 +1485,18 @@ ns_dump_glyphstring (struct glyph_string *s)
 
 struct font_driver const nsfont_driver =
   {
-  type: LISPSYM_INITIALLY (Qns),
-  case_sensitive: true,
-  get_cache: nsfont_get_cache,
-  list: nsfont_list,
-  match: nsfont_match,
-  list_family: nsfont_list_family,
-  open: nsfont_open,
-  close: nsfont_close,
-  has_char: nsfont_has_char,
-  encode_char: nsfont_encode_char,
-  text_extents: nsfont_text_extents,
-  draw: nsfont_draw,
+  .type = LISPSYM_INITIALLY (Qns),
+  .case_sensitive = true,
+  .get_cache = nsfont_get_cache,
+  .list = nsfont_list,
+  .match = nsfont_match,
+  .list_family = nsfont_list_family,
+  .open = nsfont_open,
+  .close = nsfont_close,
+  .has_char = nsfont_has_char,
+  .encode_char = nsfont_encode_char,
+  .text_extents = nsfont_text_extents,
+  .draw = nsfont_draw,
   };
 
 void
index 5999f6715ccea1fcde343d5d47018879afe5ea31..09ca6282c7fafa4edd06890eb91ef7309c24e164 100644 (file)
@@ -1079,19 +1079,19 @@ xfont_check (struct frame *f, struct font *font)
 
 struct font_driver const xfont_driver =
   {
-  type: LISPSYM_INITIALLY (Qx),
-  get_cache: xfont_get_cache,
-  list: xfont_list,
-  match: xfont_match,
-  list_family: xfont_list_family,
-  open: xfont_open,
-  close: xfont_close,
-  prepare_face: xfont_prepare_face,
-  has_char: xfont_has_char,
-  encode_char: xfont_encode_char,
-  text_extents: xfont_text_extents,
-  draw: xfont_draw,
-  check: xfont_check,
+  .type = LISPSYM_INITIALLY (Qx),
+  .get_cache = xfont_get_cache,
+  .list = xfont_list,
+  .match = xfont_match,
+  .list_family = xfont_list_family,
+  .open = xfont_open,
+  .close = xfont_close,
+  .prepare_face = xfont_prepare_face,
+  .has_char = xfont_has_char,
+  .encode_char = xfont_encode_char,
+  .text_extents = xfont_text_extents,
+  .draw = xfont_draw,
+  .check = xfont_check,
   };
 
 void
index 74f5ec66e74a7d2079f9cfcb19c7280b6b5f155b..7f0e3c6ceb55ce4b6f220977b0fd4f62e40081e0 100644 (file)
@@ -752,35 +752,35 @@ xftfont_cached_font_ok (struct frame *f, Lisp_Object font_object,
 struct font_driver const xftfont_driver =
   {
     /* We can't draw a text without device dependent functions.  */
-  type: LISPSYM_INITIALLY (Qxft),
-  get_cache: xfont_get_cache,
-  list: xftfont_list,
-  match: xftfont_match,
-  list_family: ftfont_list_family,
-  open: xftfont_open,
-  close: xftfont_close,
-  prepare_face: xftfont_prepare_face,
-  done_face: xftfont_done_face,
-  has_char: xftfont_has_char,
-  encode_char: xftfont_encode_char,
-  text_extents: xftfont_text_extents,
-  draw: xftfont_draw,
-  get_bitmap: ftfont_get_bitmap,
-  anchor_point: ftfont_anchor_point,
+  .type = LISPSYM_INITIALLY (Qxft),
+  .get_cache = xfont_get_cache,
+  .list = xftfont_list,
+  .match = xftfont_match,
+  .list_family = ftfont_list_family,
+  .open = xftfont_open,
+  .close = xftfont_close,
+  .prepare_face = xftfont_prepare_face,
+  .done_face = xftfont_done_face,
+  .has_char = xftfont_has_char,
+  .encode_char = xftfont_encode_char,
+  .text_extents = xftfont_text_extents,
+  .draw = xftfont_draw,
+  .get_bitmap = ftfont_get_bitmap,
+  .anchor_point = ftfont_anchor_point,
 #ifdef HAVE_LIBOTF
-  otf_capability: ftfont_otf_capability,
+  .otf_capability = ftfont_otf_capability,
 #endif
-  end_for_frame: xftfont_end_for_frame,
+  .end_for_frame = xftfont_end_for_frame,
 #if defined HAVE_M17N_FLT && defined HAVE_LIBOTF
-  shape: xftfont_shape,
+  .shape = xftfont_shape,
 #endif
 #ifdef HAVE_OTF_GET_VARIATION_GLYPHS
-  get_variation_glyphs: ftfont_variation_glyphs,
+  .get_variation_glyphs = ftfont_variation_glyphs,
 #endif
-  filter_properties: ftfont_filter_properties,
-  cached_font_ok: xftfont_cached_font_ok,
-  combining_capability: ftfont_combining_capability,
-  drop_xrender_surfaces: xftfont_drop_xrender_surfaces,
+  .filter_properties = ftfont_filter_properties,
+  .cached_font_ok = xftfont_cached_font_ok,
+  .combining_capability = ftfont_combining_capability,
+  .drop_xrender_surfaces = xftfont_drop_xrender_surfaces,
   };
 
 void