From 05e05c9035b826378da10058ef59a39a893da0e4 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Mon, 13 Oct 2014 07:32:21 +0000 Subject: LuaTeX: More sync with texmfmp.[ch] git-svn-id: svn://tug.org/texlive/trunk@35366 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/ChangeLog | 4 ++++ Build/source/texk/web2c/luatexdir/luatex.c | 10 ++++------ Build/source/texk/web2c/luatexdir/luatex.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog index 0e55887a980..e52cd2dd724 100644 --- a/Build/source/texk/web2c/luatexdir/ChangeLog +++ b/Build/source/texk/web2c/luatexdir/ChangeLog @@ -1,3 +1,7 @@ +2014-10-13 Peter Breitenlohner + + * luatex.[ch]: More sync with ../texmfmp.h and ../lib/texmfmp.c. + 2014-10-09 Peter Breitenlohner * luatex.c: Apply some code from W32TeX. diff --git a/Build/source/texk/web2c/luatexdir/luatex.c b/Build/source/texk/web2c/luatexdir/luatex.c index 9d02f40a686..c803b5bb319 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.c +++ b/Build/source/texk/web2c/luatexdir/luatex.c @@ -395,7 +395,7 @@ int shell_cmd_is_allowed(const char *cmd, char **safecmd, char **cmdname) 1 if shell escapes are not restricted, hence any command is allowed. 2 if shell escapes are restricted and CMD is allowed. */ -int runsystem(char *cmd) +int runsystem(const char *cmd) { int allow = 0; char *safecmd = NULL; @@ -406,12 +406,10 @@ int runsystem(char *cmd) } /* If restrictedshell == 0, any command is allowed. */ - if (restrictedshell == 0) { + if (restrictedshell == 0) allow = 1; - } else { - const char *thecmd = cmd; - allow = shell_cmd_is_allowed(thecmd, &safecmd, &cmdname); - } + else + allow = shell_cmd_is_allowed(cmd, &safecmd, &cmdname); if (allow == 1) (void) system(cmd); diff --git a/Build/source/texk/web2c/luatexdir/luatex.h b/Build/source/texk/web2c/luatexdir/luatex.h index 5a54c833874..cb205b0314d 100644 --- a/Build/source/texk/web2c/luatexdir/luatex.h +++ b/Build/source/texk/web2c/luatexdir/luatex.h @@ -74,7 +74,7 @@ extern void mk_shellcmdlist(char *); extern void init_shell_escape(void); extern int shell_cmd_is_allowed(const char *cmd, char **safecmd, char **cmdname); -extern int runsystem(char *cmd); +extern int runsystem(const char *cmd); #if defined(WIN32) && !defined(__MINGW32__) && defined(DLLPROC) -- cgit v1.2.3