summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2018-09-04 19:16:13 +0100
committerRobin Watts <robin.watts@artifex.com>2018-09-16 00:37:13 +0100
commit004c888e06ecd3fa7491e620964019b4b99d9223 (patch)
tree29a8e35341f051cbd2502dac9a0e78398acb8a3a
parent57160d72260914d90171027dfd9402997d221a6d (diff)
downloadmupdf-004c888e06ecd3fa7491e620964019b4b99d9223.tar.xz
GPROOF: Move away from unlink to remove.
This removes the need for unistd.h, which isn't around on VS2005. Also remove unused variable.
-rw-r--r--source/gprf/gprf-doc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index eda94041..370dbd7c 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -4,7 +4,6 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#if FZ_ENABLE_GPRF
/* Choose whether to call gs via an exe or via an API */
@@ -103,7 +102,7 @@ fz_drop_gprf_file(fz_context *ctx, gprf_file *file)
{
if (fz_drop_imp(ctx, file, &file->refs))
{
- unlink(file->filename);
+ remove(file->filename);
fz_free(ctx, file->filename);
fz_free(ctx, file);
}
@@ -588,7 +587,6 @@ generate_page(fz_context *ctx, gprf_page *page)
char *filename;
char *disp_profile = NULL;
char *print_profile = NULL;
- int len;
/* put the page file in the same directory as the gproof file */
fz_snprintf(nameroot, sizeof(nameroot), "gprf_%d_", page->number);
@@ -685,7 +683,7 @@ generate_page(fz_context *ctx, gprf_page *page)
}
fz_catch(ctx)
{
- unlink(filename);
+ remove(filename);
fz_free(ctx, filename);
fz_rethrow(ctx);
}