[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master ec72340: Rename font_driver member open -> open_fon
From: |
Mattias Engdegård |
Subject: |
[Emacs-diffs] master ec72340: Rename font_driver member open -> open_font |
Date: |
Tue, 9 Jul 2019 11:43:45 -0400 (EDT) |
branch: master
commit ec723406476c818ab8f1da926e70668e36206289
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Rename font_driver member open -> open_font
* src/xftfont.c (xftfont_driver):
* src/xfont.c (xfont_driver):
* src/nsfont.m (nsfont_driver):
* src/macfont.m (macfont_driver):
* src/ftxfont.c (ftxfont_driver):
* src/ftfont.c (ftfont_driver):
* src/ftcrfont.c (ftcrfont_driver):
* src/font.h (struct font_driver):
* src/font.c (font_open_entity):
Rename `open' member to `open_font', to avoid clash with preprocessor
define of `open' in lib/fcntl.h and nt/inc/ms-w32.h. Remove earlier
#undef hack.
---
src/font.c | 8 +-------
src/font.h | 10 +++++-----
src/ftcrfont.c | 2 +-
src/ftfont.c | 2 +-
src/ftxfont.c | 2 +-
src/macfont.m | 2 +-
src/nsfont.m | 2 +-
src/xfont.c | 2 +-
src/xftfont.c | 2 +-
9 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/src/font.c b/src/font.c
index ffd5064..5b10fb2 100644
--- a/src/font.c
+++ b/src/font.c
@@ -44,12 +44,6 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include TERM_HEADER
#endif /* HAVE_WINDOW_SYSTEM */
-/* Avoid macro definition of `open' in generated lib/fcntl.h to mess up
- use of it as a struct member. */
-#ifndef WINDOWSNT
-#undef open
-#endif
-
#define DEFAULT_ENCODING Qiso8859_1
/* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */
@@ -2908,7 +2902,7 @@ font_open_entity (struct frame *f, Lisp_Object entity,
int pixel_size)
width and height. */
for (psize = pixel_size; ; psize++)
{
- font_object = driver_list->driver->open (f, entity, psize);
+ font_object = driver_list->driver->open_font (f, entity, psize);
if (NILP (font_object))
return Qnil;
font = XFONT_OBJECT (font_object);
diff --git a/src/font.h b/src/font.h
index 3387878..e59fc1d 100644
--- a/src/font.h
+++ b/src/font.h
@@ -58,7 +58,7 @@ INLINE_HEADER_BEGIN
Lisp object encapsulating "struct font". This corresponds to
an opened font.
- Note: Only the method `open' of a font-driver can create this
+ Note: Only the method `open_font' of a font-driver can create this
object, and it should never be modified by Lisp. */
@@ -594,9 +594,9 @@ struct font_driver
:weight, :slant, :width, :size, :dpi, :spacing, :avgwidth. If
the font is scalable, :size and :avgwidth must be 0.
- The `open' method of the same font-backend is called with one of
+ The `open_font' method of the same font-backend is called with one of
the returned font-entities. If the backend needs additional
- information to be used in `open' method, this method can add any
+ information to be used in `open_font' method, this method can add any
Lispy value using the property :font-entity to the entities.
This and the following `match' are the only APIs that allocate
@@ -623,8 +623,8 @@ struct font_driver
/* Open a font specified by FONT_ENTITY on frame F. If the font is
scalable, open it with PIXEL_SIZE. */
- Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity,
- int pixel_size);
+ Lisp_Object (*open_font) (struct frame *f, Lisp_Object font_entity,
+ int pixel_size);
/* Close FONT. NOTE: this can be called by GC. */
void (*close) (struct font *font);
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 9378621..24a4242 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -576,7 +576,7 @@ struct font_driver const ftcrfont_driver =
.list = ftcrfont_list,
.match = ftcrfont_match,
.list_family = ftfont_list_family,
- .open = ftcrfont_open,
+ .open_font = ftcrfont_open,
.close = ftcrfont_close,
.has_char = ftcrfont_has_char,
.encode_char = ftcrfont_encode_char,
diff --git a/src/ftfont.c b/src/ftfont.c
index a80e2fb..52a3b38 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -3039,7 +3039,7 @@ static struct font_driver const ftfont_driver =
.list = ftfont_list,
.match = ftfont_match,
.list_family = ftfont_list_family,
- .open = ftfont_open,
+ .open_font = ftfont_open,
.close = ftfont_close,
.has_char = ftfont_has_char,
.encode_char = ftfont_encode_char,
diff --git a/src/ftxfont.c b/src/ftxfont.c
index ae7d1a5..81b7255 100644
--- a/src/ftxfont.c
+++ b/src/ftxfont.c
@@ -335,7 +335,7 @@ struct font_driver const ftxfont_driver =
.list = ftxfont_list,
.match = ftxfont_match,
.list_family = ftfont_list_family,
- .open = ftxfont_open,
+ .open_font = ftxfont_open,
.close = ftxfont_close,
.has_char = ftfont_has_char,
.encode_char = ftfont_encode_char,
diff --git a/src/macfont.m b/src/macfont.m
index 2b7f963..26a4a55 100644
--- a/src/macfont.m
+++ b/src/macfont.m
@@ -1663,7 +1663,7 @@ static struct font_driver macfont_driver =
.match = macfont_match,
.list_family = macfont_list_family,
.free_entity = macfont_free_entity,
- .open = macfont_open,
+ .open_font = macfont_open,
.close = macfont_close,
.has_char = macfont_has_char,
.encode_char = macfont_encode_char,
diff --git a/src/nsfont.m b/src/nsfont.m
index e22a954..df58202 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -1491,7 +1491,7 @@ struct font_driver const nsfont_driver =
.list = nsfont_list,
.match = nsfont_match,
.list_family = nsfont_list_family,
- .open = nsfont_open,
+ .open_font = nsfont_open,
.close = nsfont_close,
.has_char = nsfont_has_char,
.encode_char = nsfont_encode_char,
diff --git a/src/xfont.c b/src/xfont.c
index 9a8417b..f6cd2ed 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -1106,7 +1106,7 @@ struct font_driver const xfont_driver =
.list = xfont_list,
.match = xfont_match,
.list_family = xfont_list_family,
- .open = xfont_open,
+ .open_font = xfont_open,
.close = xfont_close,
.prepare_face = xfont_prepare_face,
.has_char = xfont_has_char,
diff --git a/src/xftfont.c b/src/xftfont.c
index 74add58..3ce4b15 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -643,7 +643,7 @@ struct font_driver const xftfont_driver =
.list = xftfont_list,
.match = xftfont_match,
.list_family = ftfont_list_family,
- .open = xftfont_open,
+ .open_font = xftfont_open,
.close = xftfont_close,
.prepare_face = xftfont_prepare_face,
.done_face = xftfont_done_face,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master ec72340: Rename font_driver member open -> open_font,
Mattias Engdegård <=