diff options
| author | Mattias EngdegÄrd | 2019-07-09 16:44:24 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2019-07-09 17:34:44 +0200 |
| commit | ec723406476c818ab8f1da926e70668e36206289 (patch) | |
| tree | 0ef190b2ba7ec005b361bdc446018d081bb07d6b /src | |
| parent | 1a1b5f9802577a09317dd036ccefba4222702f4f (diff) | |
| download | emacs-ec723406476c818ab8f1da926e70668e36206289.tar.gz emacs-ec723406476c818ab8f1da926e70668e36206289.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/font.c | 8 | ||||
| -rw-r--r-- | src/font.h | 10 | ||||
| -rw-r--r-- | src/ftcrfont.c | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 2 | ||||
| -rw-r--r-- | src/ftxfont.c | 2 | ||||
| -rw-r--r-- | src/macfont.m | 2 | ||||
| -rw-r--r-- | src/nsfont.m | 2 | ||||
| -rw-r--r-- | src/xfont.c | 2 | ||||
| -rw-r--r-- | src/xftfont.c | 2 |
9 files changed, 13 insertions, 19 deletions
diff --git a/src/font.c b/src/font.c index ffd50644930..5b10fb2a158 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/>. */ | |||
| 44 | #include TERM_HEADER | 44 | #include TERM_HEADER |
| 45 | #endif /* HAVE_WINDOW_SYSTEM */ | 45 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 46 | 46 | ||
| 47 | /* Avoid macro definition of `open' in generated lib/fcntl.h to mess up | ||
| 48 | use of it as a struct member. */ | ||
| 49 | #ifndef WINDOWSNT | ||
| 50 | #undef open | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #define DEFAULT_ENCODING Qiso8859_1 | 47 | #define DEFAULT_ENCODING Qiso8859_1 |
| 54 | 48 | ||
| 55 | /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ | 49 | /* 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) | |||
| 2908 | width and height. */ | 2902 | width and height. */ |
| 2909 | for (psize = pixel_size; ; psize++) | 2903 | for (psize = pixel_size; ; psize++) |
| 2910 | { | 2904 | { |
| 2911 | font_object = driver_list->driver->open (f, entity, psize); | 2905 | font_object = driver_list->driver->open_font (f, entity, psize); |
| 2912 | if (NILP (font_object)) | 2906 | if (NILP (font_object)) |
| 2913 | return Qnil; | 2907 | return Qnil; |
| 2914 | font = XFONT_OBJECT (font_object); | 2908 | font = XFONT_OBJECT (font_object); |
diff --git a/src/font.h b/src/font.h index 3387878ad30..e59fc1d1b25 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -58,7 +58,7 @@ INLINE_HEADER_BEGIN | |||
| 58 | Lisp object encapsulating "struct font". This corresponds to | 58 | Lisp object encapsulating "struct font". This corresponds to |
| 59 | an opened font. | 59 | an opened font. |
| 60 | 60 | ||
| 61 | Note: Only the method `open' of a font-driver can create this | 61 | Note: Only the method `open_font' of a font-driver can create this |
| 62 | object, and it should never be modified by Lisp. */ | 62 | object, and it should never be modified by Lisp. */ |
| 63 | 63 | ||
| 64 | 64 | ||
| @@ -594,9 +594,9 @@ struct font_driver | |||
| 594 | :weight, :slant, :width, :size, :dpi, :spacing, :avgwidth. If | 594 | :weight, :slant, :width, :size, :dpi, :spacing, :avgwidth. If |
| 595 | the font is scalable, :size and :avgwidth must be 0. | 595 | the font is scalable, :size and :avgwidth must be 0. |
| 596 | 596 | ||
| 597 | The `open' method of the same font-backend is called with one of | 597 | The `open_font' method of the same font-backend is called with one of |
| 598 | the returned font-entities. If the backend needs additional | 598 | the returned font-entities. If the backend needs additional |
| 599 | information to be used in `open' method, this method can add any | 599 | information to be used in `open_font' method, this method can add any |
| 600 | Lispy value using the property :font-entity to the entities. | 600 | Lispy value using the property :font-entity to the entities. |
| 601 | 601 | ||
| 602 | This and the following `match' are the only APIs that allocate | 602 | This and the following `match' are the only APIs that allocate |
| @@ -623,8 +623,8 @@ struct font_driver | |||
| 623 | 623 | ||
| 624 | /* Open a font specified by FONT_ENTITY on frame F. If the font is | 624 | /* Open a font specified by FONT_ENTITY on frame F. If the font is |
| 625 | scalable, open it with PIXEL_SIZE. */ | 625 | scalable, open it with PIXEL_SIZE. */ |
| 626 | Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity, | 626 | Lisp_Object (*open_font) (struct frame *f, Lisp_Object font_entity, |
| 627 | int pixel_size); | 627 | int pixel_size); |
| 628 | 628 | ||
| 629 | /* Close FONT. NOTE: this can be called by GC. */ | 629 | /* Close FONT. NOTE: this can be called by GC. */ |
| 630 | void (*close) (struct font *font); | 630 | void (*close) (struct font *font); |
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 93786212160..24a4242c89b 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c | |||
| @@ -576,7 +576,7 @@ struct font_driver const ftcrfont_driver = | |||
| 576 | .list = ftcrfont_list, | 576 | .list = ftcrfont_list, |
| 577 | .match = ftcrfont_match, | 577 | .match = ftcrfont_match, |
| 578 | .list_family = ftfont_list_family, | 578 | .list_family = ftfont_list_family, |
| 579 | .open = ftcrfont_open, | 579 | .open_font = ftcrfont_open, |
| 580 | .close = ftcrfont_close, | 580 | .close = ftcrfont_close, |
| 581 | .has_char = ftcrfont_has_char, | 581 | .has_char = ftcrfont_has_char, |
| 582 | .encode_char = ftcrfont_encode_char, | 582 | .encode_char = ftcrfont_encode_char, |
diff --git a/src/ftfont.c b/src/ftfont.c index a80e2fb5c4b..52a3b388498 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -3039,7 +3039,7 @@ static struct font_driver const ftfont_driver = | |||
| 3039 | .list = ftfont_list, | 3039 | .list = ftfont_list, |
| 3040 | .match = ftfont_match, | 3040 | .match = ftfont_match, |
| 3041 | .list_family = ftfont_list_family, | 3041 | .list_family = ftfont_list_family, |
| 3042 | .open = ftfont_open, | 3042 | .open_font = ftfont_open, |
| 3043 | .close = ftfont_close, | 3043 | .close = ftfont_close, |
| 3044 | .has_char = ftfont_has_char, | 3044 | .has_char = ftfont_has_char, |
| 3045 | .encode_char = ftfont_encode_char, | 3045 | .encode_char = ftfont_encode_char, |
diff --git a/src/ftxfont.c b/src/ftxfont.c index ae7d1a5a9b5..81b72555908 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -335,7 +335,7 @@ struct font_driver const ftxfont_driver = | |||
| 335 | .list = ftxfont_list, | 335 | .list = ftxfont_list, |
| 336 | .match = ftxfont_match, | 336 | .match = ftxfont_match, |
| 337 | .list_family = ftfont_list_family, | 337 | .list_family = ftfont_list_family, |
| 338 | .open = ftxfont_open, | 338 | .open_font = ftxfont_open, |
| 339 | .close = ftxfont_close, | 339 | .close = ftxfont_close, |
| 340 | .has_char = ftfont_has_char, | 340 | .has_char = ftfont_has_char, |
| 341 | .encode_char = ftfont_encode_char, | 341 | .encode_char = ftfont_encode_char, |
diff --git a/src/macfont.m b/src/macfont.m index 2b7f963fd61..26a4a553503 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -1663,7 +1663,7 @@ static struct font_driver macfont_driver = | |||
| 1663 | .match = macfont_match, | 1663 | .match = macfont_match, |
| 1664 | .list_family = macfont_list_family, | 1664 | .list_family = macfont_list_family, |
| 1665 | .free_entity = macfont_free_entity, | 1665 | .free_entity = macfont_free_entity, |
| 1666 | .open = macfont_open, | 1666 | .open_font = macfont_open, |
| 1667 | .close = macfont_close, | 1667 | .close = macfont_close, |
| 1668 | .has_char = macfont_has_char, | 1668 | .has_char = macfont_has_char, |
| 1669 | .encode_char = macfont_encode_char, | 1669 | .encode_char = macfont_encode_char, |
diff --git a/src/nsfont.m b/src/nsfont.m index e22a954e63f..df582024bdc 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -1491,7 +1491,7 @@ struct font_driver const nsfont_driver = | |||
| 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_font = 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, |
diff --git a/src/xfont.c b/src/xfont.c index 9a8417b12d4..f6cd2eda5f5 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -1106,7 +1106,7 @@ struct font_driver const xfont_driver = | |||
| 1106 | .list = xfont_list, | 1106 | .list = xfont_list, |
| 1107 | .match = xfont_match, | 1107 | .match = xfont_match, |
| 1108 | .list_family = xfont_list_family, | 1108 | .list_family = xfont_list_family, |
| 1109 | .open = xfont_open, | 1109 | .open_font = xfont_open, |
| 1110 | .close = xfont_close, | 1110 | .close = xfont_close, |
| 1111 | .prepare_face = xfont_prepare_face, | 1111 | .prepare_face = xfont_prepare_face, |
| 1112 | .has_char = xfont_has_char, | 1112 | .has_char = xfont_has_char, |
diff --git a/src/xftfont.c b/src/xftfont.c index 74add58007d..3ce4b15da81 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -643,7 +643,7 @@ struct font_driver const xftfont_driver = | |||
| 643 | .list = xftfont_list, | 643 | .list = xftfont_list, |
| 644 | .match = xftfont_match, | 644 | .match = xftfont_match, |
| 645 | .list_family = ftfont_list_family, | 645 | .list_family = ftfont_list_family, |
| 646 | .open = xftfont_open, | 646 | .open_font = xftfont_open, |
| 647 | .close = xftfont_close, | 647 | .close = xftfont_close, |
| 648 | .prepare_face = xftfont_prepare_face, | 648 | .prepare_face = xftfont_prepare_face, |
| 649 | .done_face = xftfont_done_face, | 649 | .done_face = xftfont_done_face, |