[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116073: Fix Cygwin w32 build broken by last commit
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r116073: Fix Cygwin w32 build broken by last commit in w32font.c. |
Date: |
Sun, 19 Jan 2014 15:43:34 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116073
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2014-01-19 17:42:48 +0200
message:
Fix Cygwin w32 build broken by last commit in w32font.c.
src/w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
(get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
[!WINDOWSNT]: These functions are no longer compiled on Cygwin;
they are replaced by macros that expand into direct calls to the
corresponding functions from GDI32.DLL.
(globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
variables in the Cygwin build, they are unused.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/w32font.c w32font.c-20091113204419-o5vbwnq5f7feedwu-8545
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-01-19 13:26:21 +0000
+++ b/src/ChangeLog 2014-01-19 15:42:48 +0000
@@ -1,3 +1,13 @@
+2014-01-19 Eli Zaretskii <address@hidden>
+
+ * w32font.c (w32_load_unicows_or_gdi32, get_outline_metrics_w)
+ (get_text_metrics_w, get_glyph_outline_w, get_char_width_32_w)
+ [!WINDOWSNT]: These functions are no longer compiled on Cygwin;
+ they are replaced by macros that expand into direct calls to the
+ corresponding functions from GDI32.DLL.
+ (globals_of_w32font) [WINDOWSNT]: Don't initialize g_b_* static
+ variables in the Cygwin build, they are unused.
+
2014-01-19 K. Handa <address@hidden>
* composite.c (composition_update_it): Fix previous change.
=== modified file 'src/w32font.c'
--- a/src/w32font.c 2014-01-18 11:46:22 +0000
+++ b/src/w32font.c 2014-01-19 15:42:48 +0000
@@ -147,6 +147,8 @@
style variations if the font name is not specified. */
static void list_all_matching_fonts (struct font_callback_data *);
+#ifdef WINDOWSNT
+
static BOOL g_b_init_get_outline_metrics_w;
static BOOL g_b_init_get_text_metrics_w;
static BOOL g_b_init_get_glyph_outline_w;
@@ -244,8 +246,8 @@
lpvBuffer, lpmat2);
}
-static DWORD WINAPI get_char_width_32_w (HDC hdc, UINT uFirstChar,
- UINT uLastChar, LPINT lpBuffer)
+static DWORD WINAPI
+get_char_width_32_w (HDC hdc, UINT uFirstChar, UINT uLastChar, LPINT lpBuffer)
{
static GetCharWidth32W_Proc s_pfn_Get_Char_Width_32W = NULL;
HMODULE hm_unicows = NULL;
@@ -261,6 +263,18 @@
return s_pfn_Get_Char_Width_32W (hdc, uFirstChar, uLastChar, lpBuffer);
}
+#else /* Cygwin */
+
+/* Cygwin doesn't support Windows 9X, and links against GDI32.DLL, so
+ it can just call these functions directly. */
+#define get_outline_metrics_w(h,d,o) GetOutlineTextMetricsW(h,d,o)
+#define get_text_metrics_w(h,t) GetTextMetricsW(h,t)
+#define get_glyph_outline_w(h,uc,f,gm,b,v,m) \
+ GetGlyphOutlineW(h,uc,f,gm,b,v,m)
+#define get_char_width_32_w(h,fc,lc,b) GetCharWidth32W(h,fc,lc,b)
+
+#endif /* Cygwin */
+
static int
memq_no_quit (Lisp_Object elt, Lisp_Object list)
{
@@ -2717,8 +2731,10 @@
void
globals_of_w32font (void)
{
+#ifdef WINDOWSNT
g_b_init_get_outline_metrics_w = 0;
g_b_init_get_text_metrics_w = 0;
g_b_init_get_glyph_outline_w = 0;
g_b_init_get_char_width_32_w = 0;
+#endif
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116073: Fix Cygwin w32 build broken by last commit in w32font.c.,
Eli Zaretskii <=