summaryrefslogtreecommitdiff
path: root/source/tools/mudraw.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2018-01-29 19:00:49 +0100
committerSebastian Rasmussen <sebras@gmail.com>2018-01-29 19:03:29 +0100
commit148329c60f8ad07886b624b5e9e3d8dfdbbdb98f (patch)
tree57abde801b502c3b76a6556ae5caa65e668c9b0b /source/tools/mudraw.c
parent799631990c2f2bb796490d5ae95554ee0987952a (diff)
downloadmupdf-148329c60f8ad07886b624b5e9e3d8dfdbbdb98f.tar.xz
If drawing to one file per page in mudraw, don't use append mode.
Opening in append mode was used before commit c4d3a9142761a567fce9f66946a917e087c0de67 when the same file was reopened multiple times for formats that support it. Nowadays the files is only opened once anyway so there is no reason to use append mode.
Diffstat (limited to 'source/tools/mudraw.c')
-rw-r--r--source/tools/mudraw.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c
index c9650993..b6b000db 100644
--- a/source/tools/mudraw.c
+++ b/source/tools/mudraw.c
@@ -217,7 +217,6 @@ typedef struct worker_t {
static char *output = NULL;
static fz_output *out = NULL;
static int output_pagenum = 0;
-static int output_append = 0;
static int output_file_per_page = 0;
static char *format = NULL;
@@ -1148,8 +1147,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum)
fz_close_output(ctx, out);
fz_drop_output(ctx, out);
fz_snprintf(text_buffer, sizeof(text_buffer), output, pagenum);
- out = fz_new_output_with_path(ctx, text_buffer, output_append);
- output_append = 1;
+ out = fz_new_output_with_path(ctx, text_buffer, 0);
}
if (bgprint.active)