From 08630261b8151f78d1c5c725f93712f1d5b13314 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Wed, 25 Mar 2015 06:19:09 +0000 Subject: luatexdir/tex/texfileio.w: Sync with the upstream. git-svn-id: svn://tug.org/texlive/trunk@36621 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/luatexdir/tex/texfileio.w | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.w b/Build/source/texk/web2c/luatexdir/tex/texfileio.w index 4d50504386c..76ae365f735 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texfileio.w +++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.w @@ -326,6 +326,7 @@ boolean lua_a_open_in(alpha_file * f, char *fn, int n) return ret; } + @ @c boolean lua_a_open_out(alpha_file * f, char *fn, int n) { @@ -338,16 +339,26 @@ boolean lua_a_open_out(alpha_file * f, char *fn, int n) fnam = 0; test = run_callback(callback_id, "dS->s", n, fn, &fnam); if ((test) && (fnam != 0) && (str_length(fnam) > 0)) { + /* There is no message here because if that is needed the macro package */ + /* should do that in the callback code. As elsewhere, messaging is left */ + /* to lua then. */ ret = open_outfile(f, fn, FOPEN_W_MODE); } } else { if (openoutnameok(fn)) { - ret = open_out_or_pipe(f, fn, FOPEN_W_MODE); + if (n > 0 && selector != term_only) { + /* This message to the log is for downward compatibility with other tex's */ + /* as there are scripts out there that act on this message. An alternative */ + /* is to let a macro package write an explicit message. */ + fprintf(log_file,"\n\\openout%i = %s\n",n-1,fn); + } + ret = open_out_or_pipe(f, fn, FOPEN_W_MODE); } } return ret; } + @ @c boolean lua_b_open_out(alpha_file * f, char *fn) { -- cgit v1.2.3