diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-14 03:34:50 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2018-09-14 03:34:50 +0000 |
commit | 00653d612add044de9f941c7b2c562bebe60d1e8 (patch) | |
tree | 46f2e9aa6440270f015d3e9d3d17f4d4ed709691 /Build/source/texk/dvipdfm-x/pdfobj.c | |
parent | fb833e57545c4b4d76e01406904fdfd83f057447 (diff) |
Cleanup. Remove duplicated code. Reorganize global variables. (S. Hirata)
git-svn-id: svn://tug.org/texlive/trunk@48663 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/dvipdfm-x/pdfobj.c')
-rw-r--r-- | Build/source/texk/dvipdfm-x/pdfobj.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/Build/source/texk/dvipdfm-x/pdfobj.c b/Build/source/texk/dvipdfm-x/pdfobj.c index 1a08f64e578..54a6337848e 100644 --- a/Build/source/texk/dvipdfm-x/pdfobj.c +++ b/Build/source/texk/dvipdfm-x/pdfobj.c @@ -33,6 +33,7 @@ #include "mem.h" #include "error.h" #include "mfileio.h" +#include "dpxconf.h" #include "dpxutil.h" #include "pdflimits.h" #include "pdfencrypt.h" @@ -250,7 +251,6 @@ static void release_dict (pdf_dict *dict); static void write_stream (pdf_stream *stream, FILE *file); static void release_stream (pdf_stream *stream); -static int verbose = 0; static char compression_level = 9; static char compression_use_predictor = 1; @@ -274,6 +274,12 @@ pdf_set_compression (int level) return; } +FILE * +pdf_get_output_file (void) +{ + return pdf_output_file; +} + void pdf_set_use_predictor (int bval) { @@ -315,18 +321,6 @@ pdf_check_version (int major, int minor) return (pdf_version >= major*10+minor) ? 0 : -1; } -int -pdf_obj_get_verbose(void) -{ - return verbose; -} - -void -pdf_obj_set_verbose(void) -{ - verbose++; -} - static pdf_obj *current_objstm = NULL; static int do_objstm; @@ -537,7 +531,7 @@ pdf_out_flush (void) #if !defined(LIBDPX) MESG("\n"); #endif /* !LIBDPX */ - if (verbose) { + if (dpx_conf.verbose_level > 0) { if (compression_level > 0) { MESG("Compression saved %ld bytes%s\n", compression_saved, pdf_version < 15 ? ". Try \"-V 1.5\" for better compression" : ""); @@ -548,6 +542,7 @@ pdf_out_flush (void) #endif /* !LIBDPX */ MFCLOSE(pdf_output_file); + pdf_output_file = NULL; } #if defined(PDFOBJ_DEBUG) { @@ -579,6 +574,7 @@ pdf_error_cleanup (void) */ if (pdf_output_file) MFCLOSE(pdf_output_file); + pdf_output_file = NULL; } |