diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2019-07-08 06:07:11 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2019-07-08 06:07:11 +0000 |
commit | f93b62903a20648ab4328443b88495da81f70909 (patch) | |
tree | 6a870996cc04dca9a1ae3dbbc334b4c2a1385711 /Build/source/texk/web2c/luatexdir/tex/texfileio.c | |
parent | 54d39e16610eee4dde770b0a6b569203c79abde8 (diff) |
sync with luatex rev.7174: luatex and luahbtex and jit variants
git-svn-id: svn://tug.org/texlive/trunk@51577 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/texfileio.c')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texfileio.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/texfileio.c b/Build/source/texk/web2c/luatexdir/tex/texfileio.c index 143e694e1ba..2c37ada75e9 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texfileio.c +++ b/Build/source/texk/web2c/luatexdir/tex/texfileio.c @@ -332,14 +332,13 @@ boolean lua_a_open_in(alpha_file * f, char *fn, int n) boolean lua_a_open_out(alpha_file * f, char *fn, int n) { boolean test; - str_number fnam; + char *fnam = NULL; int callback_id; boolean ret = false; callback_id = callback_defined(find_write_file_callback); if (callback_id > 0) { - fnam = 0; - test = run_callback(callback_id, "dS->s", n, fn, &fnam); - if ((test) && (fnam != 0) && (str_length(fnam) > 0)) { + test = run_callback(callback_id, "dS->R", n, fn, &fnam); + if ((test) && (fnam != NULL) && (strlen(fnam) > 0)) { /*tex There is no message here because if that is needed the macro @@ -347,7 +346,8 @@ boolean lua_a_open_out(alpha_file * f, char *fn, int n) messaging is left to \LUA\ then. */ - ret = open_outfile(f, fn, FOPEN_W_MODE); + ret = open_outfile(f, fnam, FOPEN_W_MODE); + free(fnam); } } else { if (openoutnameok(fn)) { @@ -371,15 +371,15 @@ boolean lua_a_open_out(alpha_file * f, char *fn, int n) boolean lua_b_open_out(alpha_file * f, char *fn) { boolean test; - str_number fnam; + char *fnam = NULL; int callback_id; boolean ret = false; callback_id = callback_defined(find_output_file_callback); if (callback_id > 0) { - fnam = 0; - test = run_callback(callback_id, "S->s", fn, &fnam); - if ((test) && (fnam != 0) && (str_length(fnam) > 0)) { - ret = open_outfile(f, fn, FOPEN_WBIN_MODE); + test = run_callback(callback_id, "S->R", fn, &fnam); + if ((test) && (fnam != NULL) && (strlen(fnam) > 0)) { + ret = open_outfile(f, fnam, FOPEN_WBIN_MODE); + free(fnam); } } else { if (openoutnameok(fn)) { @@ -937,7 +937,7 @@ void open_log_file(void) /*tex should be done always */ flush_loggable_info(); /*tex should be done always */ - selector = old_setting + 2; + selector = old_setting + 2; } /*tex |