From 8c14af6c50a69e0fd17bc8aaca8cea6b269b25cc Mon Sep 17 00:00:00 2001 From: Taco Hoekwater Date: Sun, 27 Jul 2008 13:18:11 +0000 Subject: [PATCH] dvitomp fix from Akira git-svn-id: svn+ssh://scm.foundry.supelec.fr/svn/metapost/mplib/trunk@651 b0617d17-b707-0410-b22c-fd2634e05cc4 --- src/texk/web2c/mpdir/mpxout.w | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/texk/web2c/mpdir/mpxout.w b/src/texk/web2c/mpdir/mpxout.w index caf4915..00c73a4 100644 --- a/src/texk/web2c/mpdir/mpxout.w +++ b/src/texk/web2c/mpdir/mpxout.w @@ -649,7 +649,9 @@ input file. Since \MP\ expects such files to have the extension \.{.MPX}, the output of \.{DVItoMP} is sometimes called an ``\.{MPX}'' file. @ The following parameters can be changed at compile time to extend or -reduce \.{DVItoMP}'s capacity. +reduce \.{DVItoMP}'s capacity. + +TODO: dynamic reallocation @d virtual_space 1000000 /* maximum total bytes of typesetting commands for virtual fonts */ @d max_fonts 1000 /* maximum number of distinct fonts per \.{DVI} file */ @@ -1275,8 +1277,8 @@ static void mpx_in_VF (MPX mpx, integer f) { @;@/ @;@/ p=mpx_get_byte(mpx); - while ( mpx->p>=fnt_def1 ) { - if ( mpx->p>fnt_def1+3 ) + while ( p>=fnt_def1 ) { + if ( p>fnt_def1+3 ) font_abort("Bad VF file for ",f); mpx_define_font(mpx, mpx_first_par(mpx, p)); p=mpx_get_byte(mpx); @@ -1288,7 +1290,7 @@ static void mpx_in_VF (MPX mpx, integer f) { @; p=mpx_get_byte(mpx); } - if ( mpx->p==post ) { + if ( p==post ) { @; mpx->vf_reading=was_vf_reading; return; @@ -1984,9 +1986,6 @@ case bop: @.bop occurred before eop@> break; case eop: - if ( mpx->stk_siz!=0 ) - bad_dvi("stack not empty at end of page"); -@.stack not empty...@> return; break; case push: @@ -2044,6 +2043,9 @@ static int mpx_dvitomp (MPX mpx, char *dviname) { @; mpx_start_picture(mpx); mpx_do_dvi_commands(mpx); + if ( mpx->stk_siz!=0 ) + bad_dvi("stack not empty at end of page"); +@.stack not empty...@> mpx_stop_picture(mpx); fprintf(mpx->mpxfile,"mpxbreak\n"); } -- 2.32.0.93.g670b81a890