]> code.delx.au - gnu-emacs/blobdiff - src/w32uniscribe.c
Rework C source files to avoid ^(
[gnu-emacs] / src / w32uniscribe.c
index b1056bc104e0132e4ab7048e99fe28d756344424..ddca5f5ef5287655293bab1d1887097d2ada8287 100644 (file)
@@ -1,12 +1,12 @@
 /* Font backend for the Microsoft W32 Uniscribe API.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,24 +18,22 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-/* Override API version - Uniscribe is only available as standard since
-   Windows 2000, though most users of older systems will have it
+/* Override API version - Uniscribe is only available as standard
+   since Windows 2000, though most users of older systems will have it
    since it installs with Internet Explorer 5.0 and other software.
-   We only enable the feature if it is available, so there is no chance
-   of calling non-existent functions.  */
+   Also, MinGW64 w32api headers by default define OPENTYPE_TAG typedef
+   only if _WIN32_WINNT >= 0x0600.  We only use the affected APIs if
+   they are available, so there is no chance of calling non-existent
+   functions.  */
 #undef _WIN32_WINNT
-#define _WIN32_WINNT 0x500
+#define _WIN32_WINNT 0x0600
 #include <windows.h>
 #include <usp10.h>
 
 #include "lisp.h"
 #include "w32term.h"
 #include "frame.h"
-#include "dispextern.h"
-#include "character.h"
-#include "charset.h"
 #include "composite.h"
-#include "fontset.h"
 #include "font.h"
 #include "w32font.h"
 
@@ -777,7 +775,6 @@ uniscribe_check_otf_1 (HDC context, Lisp_Object script, Lisp_Object lang,
   int max_tags = ARRAYELTS (tags);
   int ntags, i, ret = 0;
   HRESULT rslt;
-  Lisp_Object rest;
 
   *retval = 0;
 
@@ -873,7 +870,6 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
   HDC context;
   HFONT check_font, old_font;
   int i, retval = 0;
-  struct gcpro gcpro1;
 
   /* Check the spec is in the right format.  */
   if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3)
@@ -916,10 +912,6 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
   if (!NILP (lang))
     lang_tag = OTF_TAG (SNAME (lang));
 
-  /* Everything else is contained within otf_spec so should get
-     marked along with it.  */
-  GCPRO1 (otf_spec);
-
   /* Scan GSUB and GPOS tables.  */
   for (i = 0; i < 2; i++)
     {