summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/dvi
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2023-12-21 15:14:00 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2023-12-21 15:14:00 +0000
commit197ee1ccea30c4154c82e61dcc9de2be3c32b09c (patch)
treec694a9898eab2988485aebf4d8eee2170166df3c /Build/source/texk/web2c/luatexdir/dvi
parent626909da921cd1f120c0df22a446e1563522f386 (diff)
Sync luatexdir with upstream.
git-svn-id: svn://tug.org/texlive/trunk@69181 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/dvi')
-rw-r--r--Build/source/texk/web2c/luatexdir/dvi/dvigen.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/dvi/dvigen.c b/Build/source/texk/web2c/luatexdir/dvi/dvigen.c
index 684818a7563..f674261b2f4 100644
--- a/Build/source/texk/web2c/luatexdir/dvi/dvigen.c
+++ b/Build/source/texk/web2c/luatexdir/dvi/dvigen.c
@@ -1425,6 +1425,10 @@ void dvi_begin_page(PDF pdf)
void dvi_end_page(PDF pdf)
{
(void) pdf;
+ if (check_dvi_total_pages && total_pages>=65536){
+ print_err(" ==> Fatal error occurred: total_pages>=65536, bad output DVI file produced!");
+ jump_out();
+ }
dvi_out(eop);
}
@@ -1432,7 +1436,8 @@ void dvi_end_page(PDF pdf)
At the end of the program, we must finish things off by writing the post\-amble.
If |total_pages=0|, the \.{DVI} file was never opened. If |total_pages>=65536|,
-the \.{DVI} file will lie. And if |max_push>=65536|, the user deserves whatever
+the \.{DVI} file will lie, and if the option |check_dvi_total_pages| is true, the program abort.
+And if |max_push>=65536|, the user deserves whatever
chaos might ensue.
*/