summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-10 11:40:15 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-08-10 11:40:15 +0000
commit95dedc19c2bf59d7d1c7d1b399184b3650e6c153 (patch)
tree7814231110c3a796e0cf6f316ff6d8cd322dd107 /Build
parente2f40fd22284ccc32d1cade3ce8071e28133c175 (diff)
XeTeX: Reorganize definition of M_PI & Co; drop unused one
git-svn-id: svn://tug.org/texlive/trunk@27365 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/xetexdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp12
-rw-r--r--Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp13
-rw-r--r--Build/source/texk/web2c/xetexdir/numbers.h6
4 files changed, 17 insertions, 20 deletions
diff --git a/Build/source/texk/web2c/xetexdir/ChangeLog b/Build/source/texk/web2c/xetexdir/ChangeLog
index a29c18621f8..ff354e6af45 100644
--- a/Build/source/texk/web2c/xetexdir/ChangeLog
+++ b/Build/source/texk/web2c/xetexdir/ChangeLog
@@ -1,3 +1,9 @@
+2012-08-10 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * XeTeXFontMgr.cpp, XeTeXLayoutInterface.cpp: Always put
+ '#define M_PI' immediately after '#include <math.h>'.
+ * numbers.h: Drop unused definition of M_PI.
+
2012-08-10 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* XeTeX_ext.c: use rewind(f) instead of fseek(f, 0, SEEK_SET)
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp
index 188fc01f73b..7da6829dcb2 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXFontMgr.cpp
@@ -1,7 +1,7 @@
/****************************************************************************\
Part of the XeTeX typesetting system
copyright (c) 1994-2008 by SIL International
- copyright (c) 2009 by Jonathan Kew
+ copyright (c) 2009-2012 by Jonathan Kew
Written by Jonathan Kew
@@ -44,6 +44,10 @@ authorization from the copyright holders.
#include "sfnt.h"
#include <math.h>
+/* apparently M_PI isn't defined by <math.h> under VC++ */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
extern "C" {
extern Fixed loadedfontdesignsize;
@@ -547,12 +551,6 @@ XeTeXFontMgr::getDesignSize(XeTeXFont font)
return 10.0;
}
-#ifdef WIN32
-#ifndef M_PI
-#define M_PI 3.14159265358979323846264
-#endif
-#endif
-
void
XeTeXFontMgr::getOpSizeRecAndStyleFlags(Font* theFont)
{
diff --git a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
index 49c6b923adf..eb566b173e4 100644
--- a/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
+++ b/Build/source/texk/web2c/xetexdir/XeTeXLayoutInterface.cpp
@@ -1,7 +1,7 @@
/****************************************************************************\
Part of the XeTeX typesetting system
copyright (c) 1994-2008 by SIL International
- copyright (c) 2009 by Jonathan Kew
+ copyright (c) 2009-2012 by Jonathan Kew
Written by Jonathan Kew
@@ -56,6 +56,10 @@ authorization from the copyright holders.
#include "unicode/utext.h"
#include <math.h>
+/* apparently M_PI isn't defined by <math.h> under VC++ */
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
struct XeTeXLayoutEngine_rec
/* this is used for both ICU and Graphite, because so much of the font stuff is common;
@@ -194,13 +198,6 @@ void* getFontTablePtr(XeTeXFont font, UInt32 tableTag)
return const_cast<void*>(((XeTeXFontInst*)font)->getFontTable(tableTag));
}
-/* apparently M_PI isn't defined by <math.h> under VC++ */
-#ifdef WIN32
-#ifndef M_PI
-#define M_PI 3.1415926535898
-#endif
-#endif
-
Fixed getSlant(XeTeXFont font)
{
float italAngle = ((XeTeXFontInst*)font)->getItalicAngle();
diff --git a/Build/source/texk/web2c/xetexdir/numbers.h b/Build/source/texk/web2c/xetexdir/numbers.h
index 9e6b2306508..1f61607654e 100644
--- a/Build/source/texk/web2c/xetexdir/numbers.h
+++ b/Build/source/texk/web2c/xetexdir/numbers.h
@@ -2,7 +2,7 @@
This is dvipdfmx, an eXtended version of dvipdfm by Mark A. Wicks.
- Copyright (C) 2002 by Jin-Hwan Cho and Shunsaku Hirata,
+ Copyright (C) 2002, 2012 by Jin-Hwan Cho and Shunsaku Hirata,
the dvipdfmx project team <dvipdfmx@project.ktug.or.kr>
Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
@@ -59,10 +59,6 @@ extern SIGNED_QUAD axboverc (SIGNED_QUAD n1, SIGNED_QUAD n2, SIGNED_QUAD divide)
#define ISODD(n) (((n)/2)*2!=(n))
#define ISEVEN(n) (((n)/2)*2==(n))
-#ifndef M_PI
-# define M_PI (4.0*atan(1.0))
-#endif
-
#define ROUND(n,acc) (floor(((double)n)/(acc)+0.5)*(acc))
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L