summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/web2c/mplibdir/ChangeLog6
-rw-r--r--Build/source/texk/web2c/mplibdir/mp.w13
-rw-r--r--Build/source/texk/web2c/mplibdir/mpost.w21
-rw-r--r--Build/source/texk/web2c/mplibdir/pngout.w9
4 files changed, 36 insertions, 13 deletions
diff --git a/Build/source/texk/web2c/mplibdir/ChangeLog b/Build/source/texk/web2c/mplibdir/ChangeLog
index 8137cb2599d..9d26c780e61 100644
--- a/Build/source/texk/web2c/mplibdir/ChangeLog
+++ b/Build/source/texk/web2c/mplibdir/ChangeLog
@@ -1,6 +1,10 @@
+2014-01-30 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * mp.w, mpost.w, pngout.w: Import from MetaPost trunk.
+
2014-01-29 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
- * mpost.w, mp.w: Imported from MetaPost trunk.
+ * mpost.w, mp.w: Import from MetaPost trunk.
2014-01-17 Peter Breitenlohner <peb@mppmu.mpg.de>
diff --git a/Build/source/texk/web2c/mplibdir/mp.w b/Build/source/texk/web2c/mplibdir/mp.w
index 682acaaeb54..b41734d5fa7 100644
--- a/Build/source/texk/web2c/mplibdir/mp.w
+++ b/Build/source/texk/web2c/mplibdir/mp.w
@@ -1,4 +1,4 @@
-% $Id: mp.w 1932 2014-01-29 15:33:50Z taco $
+% $Id: mp.w 1935 2014-01-30 09:30:56Z taco $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -163,6 +163,8 @@ typedef struct MP_instance {
#include "mpmath.h" /* internal header */
#include "mpmathdouble.h" /* internal header */
#include "mpstrings.h" /* internal header */
+extern char *pixman_version_string(void);
+extern const char *zlibVersion(void);
extern font_number mp_read_font_info (MP mp, char *fname); /* tfmin.w */
@h @<Declarations@>;
@<Basic printing procedures@>;
@@ -20787,6 +20789,8 @@ boolean mp_open_mem_name (MP mp) {
}
s = (mp->find_file) (mp, s, "r", mp_filetype_program);
xfree(mp->name_of_file);
+ if (s == NULL)
+ return false;
mp->name_of_file = xstrdup(s);
mp->mem_file = (mp->open_file) (mp, s, "r", mp_filetype_program);
free (s);
@@ -29739,13 +29743,16 @@ int mp_finish (MP mp) {
char *mp_metapost_version (void) {
return mp_strdup (metapost_version);
}
-
+void mp_show_library_versions (void) {
+ fprintf(stdout, "Compiled with cairo %s, pixman %s\n", cairo_version_string(), pixman_version_string());
+ fprintf(stdout, "Compiled with libpng %s, zlib %s\n\n", PNG_LIBPNG_VER_STRING, zlibVersion());
+}
@ @<Exported function headers@>=
int mp_run (MP mp);
int mp_execute (MP mp, char *s, size_t l);
int mp_finish (MP mp);
-char *mp_metapost_version (void);
+char *mp_metapost_version (void);void mp_show_library_versions (void);
@ @<Put each...@>=
mp_primitive (mp, "end", mp_stop, 0);
diff --git a/Build/source/texk/web2c/mplibdir/mpost.w b/Build/source/texk/web2c/mplibdir/mpost.w
index ab444e20f9c..3782201a773 100644
--- a/Build/source/texk/web2c/mplibdir/mpost.w
+++ b/Build/source/texk/web2c/mplibdir/mpost.w
@@ -1,4 +1,4 @@
-% $Id: mpost.w 1931 2014-01-29 12:19:20Z taco $
+% $Id: mpost.w 1935 2014-01-30 09:30:56Z taco $
%
% This file is part of MetaPost;
% the MetaPost program is in the public domain.
@@ -942,9 +942,9 @@ static struct option dvitomp_options[]
{
char *s = mp_metapost_version();
if (dvitomp_only)
- fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "This is dvitomp %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
else
- fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "This is MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
mpost_xfree(s);
fprintf(stdout,
"\n"
@@ -989,9 +989,9 @@ fprintf(stdout,
{
char *s = mp_metapost_version();
if (dvitomp_only)
- fprintf(stdout, "This is dvitomp %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "This is dvitomp %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
else
- fprintf(stdout, "This is MetaPost %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "This is MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
mpost_xfree(s);
fprintf(stdout,
"\n"
@@ -1016,9 +1016,9 @@ fprintf(stdout,
{
char *s = mp_metapost_version();
if (dvitomp_only)
- fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "dvitomp (MetaPost) %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
else
- fprintf(stdout, "MetaPost %s" WEB2CVERSION "\n", s);
+ fprintf(stdout, "MetaPost %s" WEB2CVERSION " (%s)\n", s, kpathsea_version_string);
fprintf(stdout,
"The MetaPost source code in the public domain.\n"
"MetaPost also uses code available under the\n"
@@ -1028,9 +1028,12 @@ fprintf(stdout,
"For more information about these matters, see the file\n"
"COPYING.LESSER or <http://gnu.org/licenses/lgpl.html>.\n"
"Original author of MetaPost: John Hobby.\n"
-"Author of the CWEB MetaPost: Taco Hoekwater.\n"
+"Author of the CWEB MetaPost: Taco Hoekwater.\n\n"
);
mpost_xfree(s);
+ if (!dvitomp_only) {
+ mp_show_library_versions();
+ }
exit(EXIT_SUCCESS);
}
@@ -1095,11 +1098,13 @@ static int setup_var (int def, const char *var_name, boolean nokpse) {
options->banner = mpost_xmalloc(strlen(banner)+
strlen(mpversion)+
#ifndef NATIVE_TEXLIVE_BUILD
+ strlen(WEB2CVERSION)+
strlen(kpsebanner_start)+
strlen(kpathsea_version_string)+
strlen(kpsebanner_stop)+1);
strcpy (options->banner, banner);
strcat (options->banner, mpversion);
+ strcat (options->banner, WEB2CVERSION);
strcat (options->banner, kpsebanner_start);
strcat (options->banner, kpathsea_version_string);
strcat (options->banner, kpsebanner_stop);
diff --git a/Build/source/texk/web2c/mplibdir/pngout.w b/Build/source/texk/web2c/mplibdir/pngout.w
index c4ce4d82567..7255baec115 100644
--- a/Build/source/texk/web2c/mplibdir/pngout.w
+++ b/Build/source/texk/web2c/mplibdir/pngout.w
@@ -340,13 +340,19 @@ boolean mp_is_curved(mp_gr_knot p, mp_gr_knot q) {
}
-@ @c
+@ Cairo does not want to draw a path that consists of only a moveto,
+so make sure there is some kind of line even for single-pair paths.
+@c
static void mp_png_path_out (MP mp, mp_gr_knot h) {
mp_gr_knot p, q; /* for scanning the path */
+ int steps = 0;
cairo_move_to (mp->png->cr, gr_x_coord(h),gr_y_coord(h));
p=h;
do {
if ( gr_right_type(p)==mp_endpoint ) {
+ if (steps==0) {
+ cairo_line_to (mp->png->cr, gr_x_coord(p),gr_y_coord(p));
+ }
return;
}
q=gr_next_knot(p);
@@ -358,6 +364,7 @@ static void mp_png_path_out (MP mp, mp_gr_knot h) {
cairo_line_to (mp->png->cr, gr_x_coord(q),gr_y_coord(q));
}
p=q;
+ steps++;
} while (p!=h);
}