diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex/mainbody.w')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/mainbody.w | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/mainbody.w b/Build/source/texk/web2c/luatexdir/tex/mainbody.w index 030e58024f3..745a1531019 100644 --- a/Build/source/texk/web2c/luatexdir/tex/mainbody.w +++ b/Build/source/texk/web2c/luatexdir/tex/mainbody.w @@ -436,11 +436,17 @@ void main_body(void) while ((iloc < ilimit) && (buffer[iloc] == ' ')) incr(iloc); } - if (pdf_output_option != 0) - int_par(pdf_output_code) = pdf_output_value; - if (pdf_draftmode_option != 0) - pdf_draftmode = static_pdf->draftmode = pdf_draftmode_value; + if (output_mode_option != 0) + int_par(output_mode_code) = output_mode_value; + if (draft_mode_option != 0) { + int_par(draft_mode_code) = draft_mode_value; + } + /* this is specific for the pdf backend */ + if (int_par(draft_mode_code) != 0) { /* should move */ + static_pdf->draftmode = int_par(draft_mode_code); + } pdf_init_map_file((char *) pdftex_map); + /* */ if (end_line_char_inactive) decr(ilimit); else @@ -486,14 +492,10 @@ This program doesn't bother to close the input files that may still be open. @c void close_files_and_terminate(void) { - int k; /* all-purpose index */ int callback_id; PDF pdf = static_pdf; callback_id = callback_defined(stop_run_callback); - /* Finish the extensions */ - for (k = 0; k <= 15; k++) - if (write_open[k]) - lua_a_close_out(write_file[k]); + finalize_write_files(); if (int_par(tracing_stats_code) > 0) { if (callback_id == 0) { /* Output statistics about this job */ @@ -529,24 +531,21 @@ void close_files_and_terminate(void) } } wake_up_terminal(); + /* rubish, these pdf arguments, passed, needs to be fixed, e.g. with a dummy in dvi */ ensure_output_state(pdf, ST_OMODE_FIX); - switch (pdf->o_mode) { + switch (output_mode_used) { case OMODE_NONE: /* during initex run */ break; case OMODE_PDF: if (history == fatal_error_stop) { remove_pdffile(pdf); - print_err - (" ==> Fatal error occurred, no output PDF file produced!"); + print_err(" ==> Fatal error occurred, no output PDF file produced!"); } else finish_pdf_file(pdf, luatex_version, get_luatexrevision()); break; case OMODE_DVI: finish_dvi_file(pdf, luatex_version, get_luatexrevision()); break; - case OMODE_LUA: - finish_lua_file(pdf); - break; default: assert(0); } |