summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-19 10:25:53 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-09-19 10:25:53 +0000
commit7551b431d08604a8cee8526994adb4b1eea9c81d (patch)
treeb5535f92934f1804372c77b70fc82cfb51464a69
parent8b88c4b87ee3aa920bc9a93d85a4e13ce4afd9c5 (diff)
luaTeX: Avoid const => non-const cast (for WIN32)
git-svn-id: svn://tug.org/texlive/trunk@27737 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/luainit.w5
2 files changed, 8 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index c27bcd4b2a1..8244539940a 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2012-09-19 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lua/luainit.w (parse_options): Avoid cast const => non-const.
+
2012-09-13 Akira Kakuto <kakuto@fuk.kinidai.ac.jp>
* lua/luainit.w (parse_options): allow lualatex "\input" "a b" on
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w
index b4c0607852c..4db90d73b95 100644
--- a/Build/source/texk/web2c/luatexdir/lua/luainit.w
+++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w
@@ -418,7 +418,10 @@ static void parse_options(int argc, char **argv)
else
input_name = xstrdup(sargv[sargc-1]);
sargv[sargc-1] = normalize_quotes(input_name, "argument");
- input_name = (char *)xbasename(input_name);
+ /* Same as
+ input_name = (char *)xbasename(input_name);
+ but without cast const => non-const. */
+ input_name += xbasename(input_name) - input_name;
p = strrchr(input_name, '.');
if (p != NULL && strcasecmp(p, ".tex") == 0)
*p = '\0';