summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/utils
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2014-03-15 12:21:15 +0000
committerTaco Hoekwater <taco@elvenkind.com>2014-03-15 12:21:15 +0000
commita22d9897afbabdd07f13d2bc5c7c5b9c5865ab53 (patch)
tree70829ffa23329ca4c04efa8da7a18cfe9c44a1f4 /Build/source/texk/web2c/luatexdir/utils
parent5909dbd7ee4290cc486c9c12e4ef0b2bfb9067d4 (diff)
here is luatex 0.79.0
git-svn-id: svn://tug.org/texlive/trunk@33180 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/utils')
-rw-r--r--Build/source/texk/web2c/luatexdir/utils/utils.w31
1 files changed, 17 insertions, 14 deletions
diff --git a/Build/source/texk/web2c/luatexdir/utils/utils.w b/Build/source/texk/web2c/luatexdir/utils/utils.w
index cf63c479097..10b4c5c687f 100644
--- a/Build/source/texk/web2c/luatexdir/utils/utils.w
+++ b/Build/source/texk/web2c/luatexdir/utils/utils.w
@@ -20,7 +20,7 @@
@ @c
static const char _svn_version[] =
- "$Id: utils.w 4720 2014-01-02 16:06:16Z taco $"
+ "$Id: utils.w 4882 2014-03-14 12:56:21Z taco $"
"$URL: https://foundry.supelec.fr/svn/luatex/trunk/source/texk/web2c/luatexdir/utils/utils.w $";
@ @c
@@ -40,6 +40,7 @@ static const char _svn_version[] =
#include "lua/luatex-api.h" /* for ptexbanner */
#include "png.h"
+#include "mplib.h"
/* POPPLER_VERSION is defined in poppler-config.h for poppler from
* the TeX Live tree, or in the Makefile for an installed version. */
@@ -48,7 +49,7 @@ static const char _svn_version[] =
@ @c
#define check_nprintf(size_get, size_want) \
if ((unsigned)(size_get) >= (unsigned)(size_want)) \
- pdftex_fail ("snprintf failed: file %s, line %d", __FILE__, __LINE__);
+ luatex_fail ("snprintf failed: file %s, line %d", __FILE__, __LINE__);
char *cur_file_name = NULL;
static char print_buf[PRINTF_BUF_SIZE];
@@ -114,7 +115,7 @@ void make_subset_tag(fd_entry * fd)
aa = avl_probe(st_tree, fd->subset_tag);
assert(aa != NULL);
if (j > 2)
- pdftex_warn
+ luatex_warn
("\nmake_subset_tag(): subset-tag collision, resolved in round %d.\n",
j);
}
@@ -131,7 +132,7 @@ void tex_printf(const char *fmt, ...)
va_end(args);
}
-@ |pdftex_fail| may be called when a buffer overflow has happened/is
+@ |luatex_fail| may be called when a buffer overflow has happened/is
happening, therefore may not call mktexstring. However, with the
current implementation it appears that error messages are misleading,
possibly because pool overflows are detected too late.
@@ -141,7 +142,7 @@ void tex_printf(const char *fmt, ...)
@c
__attribute__ ((noreturn, format(printf, 1, 2)))
-void pdftex_fail(const char *fmt, ...)
+void luatex_fail(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
@@ -171,7 +172,7 @@ void pdftex_fail(const char *fmt, ...)
pdftex.web!
@c
__attribute__ ((format(printf, 1, 2)))
-void pdftex_warn(const char *fmt, ...)
+void luatex_warn(const char *fmt, ...)
{
int old_selector = selector;
va_list args;
@@ -192,7 +193,7 @@ void pdftex_warn(const char *fmt, ...)
@ @c
void garbage_warning(void)
{
- pdftex_warn("dangling objects discarded, no output file produced.");
+ luatex_warn("dangling objects discarded, no output file produced.");
remove_pdffile(static_pdf);
}
@@ -225,7 +226,7 @@ void make_pdftex_banner(void)
size_t xfwrite(void *ptr, size_t size, size_t nmemb, FILE * stream)
{
if (fwrite(ptr, size, nmemb, stream) != nmemb)
- pdftex_fail("fwrite() failed");
+ luatex_fail("fwrite() failed");
return nmemb;
}
@@ -233,7 +234,7 @@ size_t xfwrite(void *ptr, size_t size, size_t nmemb, FILE * stream)
int xfflush(FILE * stream)
{
if (fflush(stream) != 0)
- pdftex_fail("fflush() failed (%s)", strerror(errno));
+ luatex_fail("fflush() failed (%s)", strerror(errno));
return 0;
}
@@ -242,7 +243,7 @@ int xgetc(FILE * stream)
{
int c = getc(stream);
if (c < 0 && c != EOF)
- pdftex_fail("getc() failed (%s)", strerror(errno));
+ luatex_fail("getc() failed (%s)", strerror(errno));
return c;
}
@@ -251,7 +252,7 @@ int xputc(int c, FILE * stream)
{
int i = putc(c, stream);
if (i < 0)
- pdftex_fail("putc() failed (%s)", strerror(errno));
+ luatex_fail("putc() failed (%s)", strerror(errno));
return i;
}
@@ -264,7 +265,7 @@ scaled ext_xn_over_d(scaled x, scaled n, scaled d)
else
r -= 0.5;
if (r >= (double) max_integer || r <= -(double) max_integer)
- pdftex_warn("arithmetic: number too big");
+ luatex_warn("arithmetic: number too big");
return (scaled) r;
}
@@ -346,11 +347,13 @@ void initversionstring(char **versions)
const_string fmt =
"Compiled with libpng %s; using %s\n"
"Compiled with zlib %s; using %s\n"
- "Compiled with poppler version %s\n";
+ "Compiled with poppler version %s\n"
+ "Compiled with mplib version %s\n";
size_t len = strlen(fmt)
+ strlen(PNG_LIBPNG_VER_STRING) + strlen(png_libpng_ver)
+ strlen(ZLIB_VERSION) + strlen(zlib_version)
+ strlen(POPPLER_VERSION)
+ + strlen(mp_metapost_version())
+ 1;
/* len will be more than enough, because of the placeholder chars in fmt
@@ -358,7 +361,7 @@ void initversionstring(char **versions)
*versions = xmalloc(len);
sprintf(*versions, fmt,
PNG_LIBPNG_VER_STRING, png_libpng_ver,
- ZLIB_VERSION, zlib_version, POPPLER_VERSION);
+ ZLIB_VERSION, zlib_version, POPPLER_VERSION, mp_metapost_version());
}
@ @c