[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r117300: * dispextern.h (struct face) [HAVE_XFT]: If
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] trunk r117300: * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member. |
Date: |
Tue, 10 Jun 2014 03:32:52 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117300
revision-id: address@hidden
parent: address@hidden
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Tue 2014-06-10 07:32:36 +0400
message:
* dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
* font.c (font_done_for_face):
* xface.c (realize_non_ascii_face): Adjust user.
* font.h (struct font_driver): Convert 'prepare_face' to return
void because its return value is never used anyway.
* xfont.c (xfont_prepare_face): Return void.
* xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
(xftfont_done_face): Use xfree.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/dispextern.h
dispextern.h-20091113204419-o5vbwnq5f7feedwu-218
src/font.c font.c-20091113204419-o5vbwnq5f7feedwu-8540
src/font.h font.h-20091113204419-o5vbwnq5f7feedwu-8541
src/xfaces.c xfaces.c-20091113204419-o5vbwnq5f7feedwu-560
src/xfont.c xfont.c-20091113204419-o5vbwnq5f7feedwu-8547
src/xftfont.c xftfont.c-20091113204419-o5vbwnq5f7feedwu-8548
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-06-10 03:13:41 +0000
+++ b/src/ChangeLog 2014-06-10 03:32:36 +0000
@@ -5,6 +5,15 @@
function. Also adjust comment.
* fringe.c, w32term.c, xdisp.c, xterm.c: All users changed.
+ * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.
+ * font.c (font_done_for_face):
+ * xface.c (realize_non_ascii_face): Adjust user.
+ * font.h (struct font_driver): Convert 'prepare_face' to return
+ void because its return value is never used anyway.
+ * xfont.c (xfont_prepare_face): Return void.
+ * xftfont.c (xftfont_prepare_face): Likewise. Use xmalloc.
+ (xftfont_done_face): Use xfree.
+
2014-06-09 Paul Eggert <address@hidden>
Say (accept-process-output P)'s result pertains to P if P is non-nil.
=== modified file 'src/dispextern.h'
--- a/src/dispextern.h 2014-06-10 03:13:41 +0000
+++ b/src/dispextern.h 2014-06-10 03:32:36 +0000
@@ -1716,8 +1716,10 @@
attributes except the font. */
struct face *ascii_face;
+#ifdef HAVE_XFT
/* Extra member that a font-driver uses privately. */
void *extra;
+#endif
};
=== modified file 'src/font.c'
--- a/src/font.c 2014-05-19 07:54:39 +0000
+++ b/src/font.c 2014-06-10 03:32:36 +0000
@@ -3337,7 +3337,6 @@
{
if (face->font->driver->done_face)
face->font->driver->done_face (f, face);
- face->extra = NULL;
}
=== modified file 'src/font.h'
--- a/src/font.h 2014-06-08 18:27:22 +0000
+++ b/src/font.h 2014-06-10 03:32:36 +0000
@@ -564,11 +564,9 @@
/* Close FONT. NOTE: this can be called by GC. */
void (*close) (struct font *font);
- /* Optional (if FACE->extra is not used).
- Prepare FACE for displaying characters by FONT on frame F by
- storing some data in FACE->extra. If successful, return 0.
- Otherwise, return -1. */
- int (*prepare_face) (struct frame *f, struct face *face);
+ /* Prepare FACE for displaying characters by FONT on frame F by
+ storing some data in FACE->extra. */
+ void (*prepare_face) (struct frame *f, struct face *face);
/* Optional.
Done FACE for displaying characters by FACE->font on frame F. */
=== modified file 'src/xfaces.c'
--- a/src/xfaces.c 2014-06-10 03:13:41 +0000
+++ b/src/xfaces.c 2014-06-10 03:32:36 +0000
@@ -5483,7 +5483,6 @@
face = xmalloc (sizeof *face);
*face = *base_face;
face->gc = 0;
- face->extra = NULL;
face->overstrike
= (! NILP (font_object)
&& FONT_WEIGHT_NAME_NUMERIC (face->lface[LFACE_WEIGHT_INDEX]) > 100
=== modified file 'src/xfont.c'
--- a/src/xfont.c 2014-03-03 08:27:58 +0000
+++ b/src/xfont.c 2014-06-10 03:32:36 +0000
@@ -121,7 +121,7 @@
static Lisp_Object xfont_list_family (struct frame *);
static Lisp_Object xfont_open (struct frame *, Lisp_Object, int);
static void xfont_close (struct font *);
-static int xfont_prepare_face (struct frame *, struct face *);
+static void xfont_prepare_face (struct frame *, struct face *);
static int xfont_has_char (Lisp_Object, int);
static unsigned xfont_encode_char (struct font *, int);
static int xfont_text_extents (struct font *, unsigned *, int,
@@ -916,15 +916,13 @@
}
}
-static int
+static void
xfont_prepare_face (struct frame *f, struct face *face)
{
block_input ();
XSetFont (FRAME_X_DISPLAY (f), face->gc,
((struct xfont_info *) face->font)->xfont->fid);
unblock_input ();
-
- return 0;
}
static int
=== modified file 'src/xftfont.c'
--- a/src/xftfont.c 2014-03-03 08:27:58 +0000
+++ b/src/xftfont.c 2014-06-10 03:32:36 +0000
@@ -507,7 +507,7 @@
}
}
-static int
+static void
xftfont_prepare_face (struct frame *f, struct face *face)
{
struct xftface_info *xftface_info;
@@ -517,17 +517,14 @@
if (face != face->ascii_face)
{
face->extra = face->ascii_face->extra;
- return 0;
+ return;
}
#endif
- xftface_info = malloc (sizeof *xftface_info);
- if (! xftface_info)
- return -1;
+ xftface_info = xmalloc (sizeof *xftface_info);
xftfont_get_colors (f, face, face->gc, NULL,
&xftface_info->xft_fg, &xftface_info->xft_bg);
face->extra = xftface_info;
- return 0;
}
static void
@@ -545,7 +542,7 @@
xftface_info = (struct xftface_info *) face->extra;
if (xftface_info)
{
- free (xftface_info);
+ xfree (xftface_info);
face->extra = NULL;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r117300: * dispextern.h (struct face) [HAVE_XFT]: Ifdef 'extra' member.,
Dmitry Antipov <=