From ea0e91c52dfd5bc6e13d41791ec5ac8a1bd3bf1a Mon Sep 17 00:00:00 2001 From: Martin Ruckert Date: Wed, 2 Mar 2022 13:20:31 +0000 Subject: HiTeX: Eliminating loop on file with invisible output combined with -no-empty-page git-svn-id: svn://tug.org/texlive/trunk@62338 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/hitexdir/hitex.w | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/web2c/hitexdir/hitex.w b/Build/source/texk/web2c/hitexdir/hitex.w index a81005cf8c3..edb8693273a 100644 --- a/Build/source/texk/web2c/hitexdir/hitex.w +++ b/Build/source/texk/web2c/hitexdir/hitex.w @@ -21149,8 +21149,14 @@ and contribution list are empty, and when the last output was not a static bool its_all_over(void) /*do this when \.{\\end} or \.{\\dump} occurs*/ {@+ if (privileged()) - {@+if ((page_head==page_tail)&&(head==tail)&&(dead_cycles==0)) - {@+return true; + {@+if ((page_head==page_tail)&&(dead_cycles==0)) + {@+pointer p=head; + if (option_no_empty_page) + while (p!=tail) + { if (is_visible(p)) break; + else p=link(p); + } + if (p==tail) return true; } back_input(); /*we will try to end again after ejecting residual material*/ tail_append(new_set_node()); @@ -30913,6 +30919,14 @@ static bool is_visible(pointer p) default: return true; } } + +@ Because we will need this procedure in the |its_all_over| function. +We add a forward declaration + +@= +static bool is_visible(pointer p); + + @ An important feature of the new routine is the call to |hfix_defaults|. It occurs when the first ``visible mark'' is placed in the output. At that point we record the current values of \TeX's -- cgit v1.2.3