the output of \.{DVItoMP} is sometimes called an ``\.{MPX}'' file.\r
\r
@ The following parameters can be changed at compile time to extend or\r
-reduce \.{DVItoMP}'s capacity.\r
+reduce \.{DVItoMP}'s capacity. \r
+\r
+TODO: dynamic reallocation\r
\r
@d virtual_space 1000000 /* maximum total bytes of typesetting commands for virtual fonts */\r
@d max_fonts 1000 /* maximum number of distinct fonts per \.{DVI} file */\r
@<Start reading the preamble from a \.{VF} file@>;@/\r
@<Initialize the data structures for the virtual font@>;@/\r
p=mpx_get_byte(mpx);\r
- while ( mpx->p>=fnt_def1 ) { \r
- if ( mpx->p>fnt_def1+3 ) \r
+ while ( p>=fnt_def1 ) { \r
+ if ( p>fnt_def1+3 ) \r
font_abort("Bad VF file for ",f);\r
mpx_define_font(mpx, mpx_first_par(mpx, p));\r
p=mpx_get_byte(mpx);\r
@<Store the character packet in |cmd_buf|@>;\r
p=mpx_get_byte(mpx);\r
}\r
- if ( mpx->p==post ) { \r
+ if ( p==post ) { \r
@<Finish setting up the data structures for the new virtual font@>;\r
mpx->vf_reading=was_vf_reading;\r
return;\r
@.bop occurred before eop@>\r
break;\r
case eop: \r
- if ( mpx->stk_siz!=0 )\r
- bad_dvi("stack not empty at end of page");\r
-@.stack not empty...@>\r
return;\r
break;\r
case push: \r
@<Do initialization required before starting a new page@>;\r
mpx_start_picture(mpx);\r
mpx_do_dvi_commands(mpx);\r
+ if ( mpx->stk_siz!=0 )\r
+ bad_dvi("stack not empty at end of page");\r
+@.stack not empty...@>\r
mpx_stop_picture(mpx);\r
fprintf(mpx->mpxfile,"mpxbreak\n");\r
}\r