diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-07-20 07:00:05 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2011-07-20 07:00:05 +0000 |
commit | 89755f7344de571c4b1b7c68e90de39363a4d1ff (patch) | |
tree | d735587f7030f0536272048df7a4b53cefc133a4 /Build/source/texk/ps2pkm | |
parent | 713aef9b071ca2b5dd68d014e99897f0e5e2036c (diff) |
libs/t1lib + texk/ps2pkm: bug fix and update
git-svn-id: svn://tug.org/texlive/trunk@23187 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ps2pkm')
-rw-r--r-- | Build/source/texk/ps2pkm/ChangeLog | 16 | ||||
-rw-r--r-- | Build/source/texk/ps2pkm/Makefile.am | 3 | ||||
-rw-r--r-- | Build/source/texk/ps2pkm/Makefile.in | 1 | ||||
-rwxr-xr-x | Build/source/texk/ps2pkm/configure | 32 | ||||
-rw-r--r-- | Build/source/texk/ps2pkm/type1.c | 22 |
5 files changed, 48 insertions, 26 deletions
diff --git a/Build/source/texk/ps2pkm/ChangeLog b/Build/source/texk/ps2pkm/ChangeLog index 3b590e8e3b8..2d52629781f 100644 --- a/Build/source/texk/ps2pkm/ChangeLog +++ b/Build/source/texk/ps2pkm/ChangeLog @@ -1,3 +1,19 @@ +2011-07-19 Peter Breitenlohner <peb@mppmu.mpg.de> + + * type1.c [FABS, CEIL, FLOOR]: Use routines from libm, the + evaluation order of tmpx in the original macros is undefined + by the C-standard! + (ComputeStem): Fix `ambiguous else' bug (also present in t1lib + 5.1.2, compare libXfont 1.3.x from XOrg-7.4). + +2011-07-18 Peter Breitenlohner <peb@mppmu.mpg.de> + + * type1.c (PSFakePop): Non-void function should return a value. + Reported by Jack Howarth <howarth@bromo.med.uc.edu> + Patch from Akira, [tex-live] Sun, 17 Jul 2011 22:39:30. + + * Makefile.am (AM_CFLAGS): Prepare for compiler warnings. + 2011-05-27 Peter Breitenlohner <peb@mppmu.mpg.de> * README: Fixed a typo. diff --git a/Build/source/texk/ps2pkm/Makefile.am b/Build/source/texk/ps2pkm/Makefile.am index e4c04941895..bc8d5da2cf6 100644 --- a/Build/source/texk/ps2pkm/Makefile.am +++ b/Build/source/texk/ps2pkm/Makefile.am @@ -1,12 +1,13 @@ ## Makefile.am for the TeX Live subdirectory texk/ps2pkm/ ## -## Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(KPATHSEA_INCLUDES) AM_CPPFLAGS = -DUNIX -DKPATHSEA +AM_CFLAGS = #$(WARNING_CFLAGS) bin_PROGRAMS = mag pfb2pfa pk2bm ps2pk diff --git a/Build/source/texk/ps2pkm/Makefile.in b/Build/source/texk/ps2pkm/Makefile.in index fe99d4bf2bc..b29ae63f07c 100644 --- a/Build/source/texk/ps2pkm/Makefile.in +++ b/Build/source/texk/ps2pkm/Makefile.in @@ -271,6 +271,7 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 INCLUDES = $(KPATHSEA_INCLUDES) AM_CPPFLAGS = -DUNIX -DKPATHSEA +AM_CFLAGS = #$(WARNING_CFLAGS) mag_SOURCES = \ basics.c \ basics.h \ diff --git a/Build/source/texk/ps2pkm/configure b/Build/source/texk/ps2pkm/configure index a8ced9b6342..0c58dbb7928 100755 --- a/Build/source/texk/ps2pkm/configure +++ b/Build/source/texk/ps2pkm/configure @@ -758,8 +758,7 @@ CFLAGS LDFLAGS LIBS CPPFLAGS -CPP -CPPFLAGS' +CPP' # Initialize some variables set by options. @@ -12447,39 +12446,42 @@ $as_echo_n "checking what warning flags to pass to the C compiler... " >&6; } if ${kpse_cv_warning_cflags+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$enable_compiler_warnings" = xno; then + if test "x$GCC" = xyes; then kpse_cv_warning_cflags= -elif test "x$GCC" = xyes; then +if test "x$enable_compiler_warnings" != xno; then kpse_cv_warning_cflags="-Wimplicit -Wreturn-type" -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wdeclaration-after-statement" ;; #( *) : ;; esac -case `$CC -dumpversion` in #( + case `$CC -dumpversion` in #( 3.[234].* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wno-unknown-pragmas" ;; #( *) : ;; esac -if test "x$enable_compiler_warnings" != xmin; then - kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" - if test "x$enable_compiler_warnings" != xyes; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" - case `$CC -dumpversion` in #( + if test "x$enable_compiler_warnings" != xmin; then + kpse_cv_warning_cflags="-Wall -Wunused $kpse_cv_warning_cflags" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wmissing-prototypes -Wmissing-declarations" + if test "x$enable_compiler_warnings" != xyes; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wparentheses -Wswitch -Wtrigraphs -Wpointer-arith" + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wcast-qual -Wcast-align -Wwrite-strings" + case `$CC -dumpversion` in #( 3.4.* | 4.*) : kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wold-style-definition" ;; #( *) : ;; esac - if test "x$enable_compiler_warnings" != xmax; then - kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + if test "x$enable_compiler_warnings" != xmax; then + kpse_cv_warning_cflags="$kpse_cv_warning_cflags -Wshadow" + fi fi fi fi +elif test "x$enable_compiler_warnings" = xno; then + kpse_cv_warning_cflags= else kpse_cv_warning_cflags= # FIXME: warning flags for non-GNU C compilers fi diff --git a/Build/source/texk/ps2pkm/type1.c b/Build/source/texk/ps2pkm/type1.c index 409ff2dcb54..fbab1aee7bf 100644 --- a/Build/source/texk/ps2pkm/type1.c +++ b/Build/source/texk/ps2pkm/type1.c @@ -107,14 +107,12 @@ typedef struct xobject xobject; /*****************/ /* Useful macros */ /*****************/ -static DOUBLE tmpx; /* Store macro argument in tmpx to avoid re-evaluation */ -static LONG tmpi; /* Store converted value in tmpi to avoid re-evaluation */ -#define FABS(x) (((tmpx = (x)) < 0.0) ? -tmpx : tmpx) +#define FABS(x) fabs(x) -#define CEIL(x) (((tmpi = (LONG) (tmpx = (x))) < tmpx) ? ++tmpi : tmpi) +#define CEIL(x) ceil(x) -#define FLOOR(x) (((tmpi = (LONG) (tmpx = (x))) > tmpx) ? --tmpi : tmpi) +#define FLOOR(x) floor(x) #define ROUND(x) FLOOR((x) + 0.5) @@ -127,6 +125,8 @@ int currentchar = -1; /* for error reporting */ #define Error {errflag = TRUE; return;} #define Error0(errmsg) { CC; IfTrace0(TRUE, errmsg); Error;} + +#define Error01(errmsg) { CC; IfTrace0(TRUE, errmsg); errflag = TRUE; return -1.0;} #define Error1(errmsg,arg) { CC; IfTrace1(TRUE, errmsg, arg); Error;} @@ -477,10 +477,10 @@ int stemno; if (unitpixels < blues->BlueScale) suppressovershoot = TRUE; else - if (alignmentzones[i].topzone) + if (alignmentzones[i].topzone) { if (stemtop >= alignmentzones[i].bottomy + blues->BlueShift) enforceovershoot = TRUE; - else + } else if (stembottom <= alignmentzones[i].topy - blues->BlueShift) enforceovershoot = TRUE; @@ -519,20 +519,22 @@ int stemno; it falls at least one pixel beyond the flat position. */ if (enforceovershoot) - if (overshoot < onepixel) + if (overshoot < onepixel) { if (alignmentzones[i].topzone) stemshift += onepixel - overshoot; else stemshift -= onepixel - overshoot; + } /* SUPPRESS overshoot by aligning the stem to the alignment zone's flat position. */ - if (suppressovershoot) + if (suppressovershoot) { if (alignmentzones[i].topzone) stemshift -= overshoot; else stemshift += overshoot; + } } /************************************************************/ @@ -780,7 +782,7 @@ static void PSFakePush(Num) static DOUBLE PSFakePop () { if (PSFakeTop >= 0) return(PSFakeStack[PSFakeTop--]); - else Error0("PSFakePop : Stack empty\n"); + else Error01("PSFakePop : Stack empty\n"); /*NOTREACHED*/ } |