emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a41ded8: Use C99 syntax for font drivers


From: Paul Eggert
Subject: [Emacs-diffs] master a41ded8: Use C99 syntax for font drivers
Date: Mon, 12 Dec 2016 22:27:40 +0000 (UTC)

branch: master
commit a41ded87b318ce3cbeb0ba3624bcb83ae3b8a437
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    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.
---
 src/ftcrfont.c |   36 ++++++++++++++++++------------------
 src/ftfont.c   |   34 +++++++++++++++++-----------------
 src/ftxfont.c  |   38 +++++++++++++++++++-------------------
 src/macfont.m  |   30 +++++++++++++++---------------
 src/nsfont.m   |   24 ++++++++++++------------
 src/xfont.c    |   26 +++++++++++++-------------
 src/xftfont.c  |   46 +++++++++++++++++++++++-----------------------
 7 files changed, 117 insertions(+), 117 deletions(-)

diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index f62b40f..67b43b6 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -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
diff --git a/src/ftfont.c b/src/ftfont.c
index 768b524..bcc10c4 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -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
diff --git a/src/ftxfont.c b/src/ftxfont.c
index d8792ac..d1632e3 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -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
diff --git a/src/macfont.m b/src/macfont.m
index b2f3dff..855b3fe 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -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
diff --git a/src/nsfont.m b/src/nsfont.m
index d14c362..757b217 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -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
diff --git a/src/xfont.c b/src/xfont.c
index 5999f67..09ca628 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -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
diff --git a/src/xftfont.c b/src/xftfont.c
index 74f5ec6..7f0e3c6 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]