From 6fcf285e8a0814a459122bbdde5f31fbadded0a8 Mon Sep 17 00:00:00 2001 From: Martin Ruckert Date: Thu, 3 Mar 2022 11:43:31 +0000 Subject: HiTeX: Fixing the -interaction option git-svn-id: svn://tug.org/texlive/trunk@62364 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/hitexdir/hitex.w | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w index 1b143ab0d59..46a2aa79d75 100644 --- a/Build/source/texk/web2c/hitexdir/hitex.w +++ b/Build/source/texk/web2c/hitexdir/hitex.w @@ -1824,7 +1824,9 @@ amounts of user interaction: @= static int @!interaction; /*current level of interaction*/ -@ @=interaction=error_stop_mode; +@ @= +if (interaction_option<0) interaction=error_stop_mode; +else interaction=interaction_option; @ \TeX\ is careful not to call |error| when the print |selector| setting might be unusual. The only possible values of |selector| at the time of @@ -25029,6 +25031,7 @@ tracing_stats=0 @ @= undump(batch_mode, error_stop_mode, interaction); +if (interaction_option>=0) interaction=interaction_option; undump(0, str_ptr, format_ident); undump_int(x); if ((x!=69069)||eof(fmt_file)) goto bad_fmt @@ -33983,9 +33986,8 @@ by this option, and finally the value to store in the flag variable. Besides the flag variables that occur in the table, a few string variables may be set using the options. -The following is a complete list of these variables---except -for the the |interaction| variable of \TeX. -Flag variables are initialized with |-1| to indicate an undefined value; +The following is a complete list of these variables. +Variables are initialized with |-1| to indicate an undefined value; string variables are initialized with |NULL|. @= @@ -33994,6 +33996,7 @@ static int etexp=0; static int ltxp=0; static int parsefirstlinep=-1; static int filelineerrorstylep=-1; +static int interaction_option=-1; static const char *user_progname=NULL, *output_directory=NULL, *c_job_name=NULL; static char *dump_name=NULL;@# int option_no_empty_page=true, option_hyphen_first=true; @@ -34085,15 +34088,17 @@ else if (ARGUMENT_IS("version")){@+ } -@ The ``interaction'' option sets \TeX's |interaction| variable +@ The ``interaction'' option sets the |interaction_option| variable based on its string argument contained in the |optarg| variable. +If defined, the |interaction_option| will be used to set \TeX's +|interaction| variable in the |initialize| and the |undump| functions. @= else @+if (ARGUMENT_IS ("interaction"))@t\2@> { - if (STREQ (optarg, "batchmode")) interaction = batch_mode; - else if (STREQ (optarg, "nonstopmode")) interaction = nonstop_mode; - else if (STREQ (optarg, "scrollmode")) interaction = scroll_mode; - else if (STREQ (optarg, "errorstopmode")) interaction = error_stop_mode; + if (STREQ (optarg, "batchmode")) interaction_option = batch_mode; + else if (STREQ (optarg, "nonstopmode")) interaction_option = nonstop_mode; + else if (STREQ (optarg, "scrollmode")) interaction_option = scroll_mode; + else if (STREQ (optarg, "errorstopmode")) interaction_option = error_stop_mode; else WARNING1 ("Ignoring unknown argument `%s' to --interaction", optarg); } -- cgit v1.2.3