summaryrefslogtreecommitdiff
path: root/source/fitz/output-psd.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-08-17 15:01:09 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-11-01 13:08:56 +0100
commitf595e889b91a674eb94db7ca4d832da54f5194cd (patch)
tree273b4a7cc465477e428d0c628a19a61301baaae0 /source/fitz/output-psd.c
parent2910531c99e80bede06d2f1460459e8f6ce79961 (diff)
downloadmupdf-f595e889b91a674eb94db7ca4d832da54f5194cd.tar.xz
Use int64_t for public file API offsets.
Don't mess with conditional compilation with LARGEFILE -- always expose 64-bit file offsets in our public API.
Diffstat (limited to 'source/fitz/output-psd.c')
-rw-r--r--source/fitz/output-psd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/fitz/output-psd.c b/source/fitz/output-psd.c
index d39051dd..37d51bc8 100644
--- a/source/fitz/output-psd.c
+++ b/source/fitz/output-psd.c
@@ -1,5 +1,7 @@
#include "mupdf/fitz.h"
+#include <string.h>
+
void
fz_save_pixmap_as_psd(fz_context *ctx, fz_pixmap *pixmap, const char *filename)
{
@@ -118,7 +120,7 @@ psd_write_header(fz_context *ctx, fz_band_writer *writer_, const fz_colorspace *
size_t len2;
if (name == NULL)
{
- sprintf(text, "Spot%d", i-4);
+ fz_snprintf(text, sizeof text, "Spot%d", i-4);
name = text;
}
len2 = strlen(name);
@@ -147,7 +149,7 @@ psd_write_header(fz_context *ctx, fz_band_writer *writer_, const fz_colorspace *
char text[32];
if (name == NULL)
{
- sprintf(text, "Spot%d", i-4);
+ fz_snprintf(text, sizeof text, "Spot%d", i-4);
name = text;
}
len2 = strlen(name);
@@ -277,9 +279,9 @@ psd_write_band(fz_context *ctx, fz_band_writer *writer_, int stride, int band_st
fz_write_data(ctx, out, buffer, b - buffer);
b = buffer;
}
- fz_seek_output(ctx, out, plane_inc, FZ_SEEK_CUR);
+ fz_seek_output(ctx, out, plane_inc, SEEK_CUR);
}
- fz_seek_output(ctx, out, w * h * (1-n), FZ_SEEK_CUR);
+ fz_seek_output(ctx, out, w * h * (1-n), SEEK_CUR);
}
static void