diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2013-03-26 14:04:02 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2013-03-26 14:04:02 +0000 |
commit | 3d1de2b4f8e0a51f19167302028e318dc0f56c8c (patch) | |
tree | 471dd7b51af7764c592d83654fa0d59118b2815d /Build/source/texk/xdvipdfmx/src/dvipdfmx.c | |
parent | 4f821208419552839a9bf7eb9eb85d03127aa38e (diff) |
Apply speed up patch for dvipdfmx by N. Tsuchimura.
git-svn-id: svn://tug.org/texlive/trunk@29512 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/dvipdfmx.c')
-rw-r--r-- | Build/source/texk/xdvipdfmx/src/dvipdfmx.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c index 376a9308a5d..932237574d3 100644 --- a/Build/source/texk/xdvipdfmx/src/dvipdfmx.c +++ b/Build/source/texk/xdvipdfmx/src/dvipdfmx.c @@ -89,6 +89,11 @@ static int really_quiet = 0; */ static int pdfdecimaldigits = 2; +/* Image cache life in hours */ +/* 0 means erase all old images and leave new images */ +/* -1 means erase all old images and also erase new images */ +static int image_cache_life = 48; + /* Encryption */ static int do_encryption = 0; static unsigned key_bits = 40; @@ -186,6 +191,9 @@ usage (int exit_code) fprintf (stdout, "\t\tAnd negative values replace old values.\n"); fprintf (stdout, "-D template\tPS->PDF conversion command line template [none]\n"); fprintf (stdout, "-E \t\tAlways try to embed fonts, regardless of licensing flags.\n"); + fprintf (stdout, "-I number\tImage cache life in hours [48]\n"); + fprintf (stdout, " \t 0: erase all old images and leave new images\n"); + fprintf (stdout, " \t-1: erase all old images and also erase new images\n"); fprintf (stdout, "-K number\tEncryption key length [40]\n"); fprintf (stdout, "-O number\tSet maximum depth of open bookmark items [0]\n"); fprintf (stdout, "-P number\tSet permission flags for PDF encryption [0x003C]\n"); @@ -524,6 +532,11 @@ do_args (int argc, char *argv[]) POP_ARG(); } break; + case 'I': + CHECK_ARG(1, "image cache life in hours"); + image_cache_life = (unsigned) atoi(argv[1]); + POP_ARG(); + break; case 'S': do_encryption = 1; break; @@ -865,6 +878,7 @@ main (int argc, char *argv[]) kpse_set_program_enabled(kpse_pk_format, true, kpse_src_texmf_cnf); #endif pdf_font_set_dpi(font_dpi); + dpx_delete_old_cache(image_cache_life); if (dvi_filename == NULL) { if (verbose) |