diff options
-rw-r--r-- | Build/source/texk/web2c/mplibdir/ChangeLog | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/mplibdir/mp.w | 26 | ||||
-rw-r--r-- | Build/source/texk/web2c/mplibdir/mpost.w | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/mplibdir/svgout.w | 8 |
4 files changed, 28 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog index 63af429bf09..b09739651fc 100644 --- a/Build/source/texk/web2c/mplibdir/ChangeLog +++ b/Build/source/texk/web2c/mplibdir/ChangeLog @@ -1,3 +1,7 @@ +2013-04-05 Taco Hoekwater <taco@luatex.org> + + Import metapost 1.801 (released version) + 2013-03-26 Peter Breitenlohner <peb@mppmu.mpg.de> * mpost.w: First arg of kpse_set_program_name() must be argv[0], diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w index 2b45ad928be..2487ef076a7 100644 --- a/Build/source/texk/web2c/mplibdir/mp.w +++ b/Build/source/texk/web2c/mplibdir/mp.w @@ -1,4 +1,4 @@ -% $Id: mp.w 1892 2013-03-22 10:21:05Z taco $ +% $Id: mp.w 1898 2013-04-05 09:40:19Z taco $ % % This file is part of MetaPost; % the MetaPost program is in the public domain. @@ -73,12 +73,12 @@ undergoes any modifications, so that it will be clear which version of @^extensions to \MP@> @^system dependencies@> -@d default_banner "This is MetaPost, Version 1.800" /* printed when \MP\ starts */ +@d default_banner "This is MetaPost, Version 1.801" /* printed when \MP\ starts */ @d true 1 @d false 0 @<Metapost version header@>= -#define metapost_version "1.800" +#define metapost_version "1.801" @ The external library header for \MP\ is |mplib.h|. It contains a few typedefs and the header defintions for the externally used @@ -14466,10 +14466,22 @@ and~|r| have already been offset by |h|. number_substract(dyout, h->y_coord); } pyth_add (tmp, dxout, dyout); - if (number_zero(tmp)) - mp_confusion (mp, "degenerate spec"); + if (number_zero(tmp)) { + /* |mp_confusion (mp, "degenerate spec");| */ @:this can't happen degerate spec}{\quad degenerate spec@>; - { + /* But apparently, it actually can happen. The test case is this: + + path p; + linejoin := mitered; + p:= (10,0)..(0,10)..(-10,0)..(0,-10)..cycle; + addto currentpicture contour p withpen pensquare; + + The reason for failure here is the addition of |r != q| in revision 1757 + in ``Advance |p| to node |q|, removing any ``dead'' cubics'', which itself + was needed to fix a bug with disappearing knots in a path that was rotated + exactly 45 degrees (luatex.org bug 530). + */ + } else { mp_number r1; new_fraction (r1); make_fraction (r1, dxout, tmp); @@ -33826,7 +33838,7 @@ struct mp_edge_object *mp_gr_export (MP mp, mp_edge_header_node h) { hh->maxx = number_to_double(h->maxx); hh->maxx = (fabs(hh->maxx)<0.00001 ? 0 : hh->maxx); hh->maxy = number_to_double(h->maxy); - hh->maxy = (fabs(hh->maxx)<0.00001 ? 0 : hh->maxy); + hh->maxy = (fabs(hh->maxy)<0.00001 ? 0 : hh->maxy); hh->filename = mp_get_output_file_name (mp); c = round_unscaled (internal_value (mp_char_code)); hh->charcode = c; diff --git a/Build/source/texk/web2c/mplibdir/mpost.w b/Build/source/texk/web2c/mplibdir/mpost.w index a5bc82a8fc5..9d7096c6f4a 100644 --- a/Build/source/texk/web2c/mplibdir/mpost.w +++ b/Build/source/texk/web2c/mplibdir/mpost.w @@ -1,4 +1,4 @@ -% $Id: mpost.w 1767 2012-11-22 09:05:54Z taco $ +% $Id: mpost.w 1895 2013-03-27 11:17:17Z taco $ % % This file is part of MetaPost; % the MetaPost program is in the public domain. diff --git a/Build/source/texk/web2c/mplibdir/svgout.w b/Build/source/texk/web2c/mplibdir/svgout.w index dffcede0c30..64fd4eeff59 100644 --- a/Build/source/texk/web2c/mplibdir/svgout.w +++ b/Build/source/texk/web2c/mplibdir/svgout.w @@ -1,4 +1,4 @@ -% $Id: svgout.w 1892 2013-03-22 10:21:05Z taco $ +% $Id: svgout.w 1897 2013-04-05 08:43:40Z taco $ % % Copyright 2008-2009 Taco Hoekwater. % @@ -805,8 +805,8 @@ static void mp_svg_font_path_out (MP mp, mp_gr_knot h) { @d do_mark(A,B) do { if (mp_chars == NULL) { - mp_chars = mp_xmalloc(mp, mp->font_max, sizeof(int *)); - memset(mp_chars, 0, (mp->font_max * sizeof(int *))); + mp_chars = mp_xmalloc(mp, mp->font_max+1, sizeof(int *)); + memset(mp_chars, 0, ((mp->font_max+1) * sizeof(int *))); } if (mp_chars[(A)] == NULL) { int *glfs = mp_xmalloc(mp, 256, sizeof(int)); @@ -842,7 +842,7 @@ void mp_svg_print_glyph_defs (MP mp, mp_edge_object *h) { } if (mp_chars != NULL) { mp_svg_starttag(mp,"defs"); - for (k=0;k<(int)mp->font_max;k++) { + for (k=0;k<=(int)mp->font_max;k++) { if (mp_chars[k] != NULL ) { double scale; /* the next gives rounding errors */ double ds,dx,sk; |