diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/am/libluatex.am | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luainit.w | 15 |
3 files changed, 21 insertions, 5 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index a5cdd2c5aa0..751e19bfc16 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,8 @@ +2012-07-28 Peter Breitenlohner <peb@mppmu.mpg.de> + + * lua/luainit.w (lua_initialize): Avoid using asprintf(). + * utils/utils.w (initversionstring): Avoid using asprintf(). + 2012-07-26 Peter Breitenlohner <peb@mppmu.mpg.de> * lua/loslibext.c os_gettimeofday): Use int64_t (from W32TeX). diff --git a/Build/source/texk/web2c/luatexdir/am/libluatex.am b/Build/source/texk/web2c/luatexdir/am/libluatex.am index 6bc4c2a8727..26e6c50d8db 100644 --- a/Build/source/texk/web2c/luatexdir/am/libluatex.am +++ b/Build/source/texk/web2c/luatexdir/am/libluatex.am @@ -1,6 +1,6 @@ ## texk/web2c/luatexdir/am/libluatex.am: Makefile fragment for libluatex. ## -## Copyright (C) 2009-2011 Peter Breitenlohner <tex-live@tug.org> +## Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org> ## You may freely use, modify and/or distribute this file. ## libluatex @@ -22,7 +22,9 @@ libluatex_web = nodist_libluatex_a_SOURCES = -libluatex_a_SOURCES = luatexdir/luatex.h +libluatex_a_SOURCES = \ + luatexdir/luatex.h \ + luatexdir/luatex-common.h ## from luatexdir/dvi ## diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w index 876b901bd7b..b31b72a218e 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.w +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w @@ -738,9 +738,18 @@ void lua_initialize(int ac, char **av) argc = ac; argv = av; - if (asprintf(&banner, "This is LuaTeX, Version %s-%d" WEB2CVERSION, - luatex_version_string, luatex_date_info) < 0) { - exit(EXIT_FAILURE); + { + const char *fmt = "This is LuaTeX, Version %s-%s" WEB2CVERSION; + size_t len; + char buf[16]; + + sprintf(buf, "%d", luatex_date_info); + len = strlen(fmt) + strlen(luatex_version_string) + strlen(buf) - 3; + + /* len is just enough, because of the placeholder chars in fmt + that get replaced by the arguments. */ + banner = xmalloc(len); + sprintf(banner, fmt, luatex_version_string, buf); } ptexbanner = banner; |