summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-11-08 14:58:46 +0000
committerRobin Watts <robin.watts@artifex.com>2017-11-08 14:59:32 +0000
commitdd57e3334404381f94ac082bf16f0fa4833e5b9b (patch)
tree96730b154393d5b8d50e176481989f570ac4ed06
parent148341aff5bdc2678239383001328fa8010f2fe9 (diff)
downloadmupdf-dd57e3334404381f94ac082bf16f0fa4833e5b9b.tar.xz
Use fz_snprintf in preference to snprintf.
If nothing else, this avoids warnings on VS2005.
-rw-r--r--platform/gl/gl-main.c2
-rw-r--r--platform/x11/curl_stream.c2
-rw-r--r--source/tools/pdfextract.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/platform/gl/gl-main.c b/platform/gl/gl-main.c
index 724c9e41..5fc8d9b2 100644
--- a/platform/gl/gl-main.c
+++ b/platform/gl/gl-main.c
@@ -1061,7 +1061,7 @@ static void do_app(void)
static int do_info_line(int x, int y, char *label, char *text)
{
char buf[512];
- snprintf(buf, sizeof buf, "%s: %s", label, text);
+ fz_snprintf(buf, sizeof buf, "%s: %s", label, text);
ui_draw_string(ctx, x, y, buf);
return y + ui.lineheight;
}
diff --git a/platform/x11/curl_stream.c b/platform/x11/curl_stream.c
index e70607d5..05a9b14a 100644
--- a/platform/x11/curl_stream.c
+++ b/platform/x11/curl_stream.c
@@ -305,7 +305,7 @@ fetch_chunk(curl_stream_state *state)
state->complete = 1;
if (state->content_length > 0 && end >= state->content_length)
end = state->content_length-1;
- snprintf(text, 32, "%d-%d", start, end);
+ fz_snprintf(text, 32, "%d-%d", start, end);
curl_easy_setopt(state->handle, CURLOPT_RANGE, text);
ret = curl_easy_perform(state->handle);
if (ret != CURLE_OK)
diff --git a/source/tools/pdfextract.c b/source/tools/pdfextract.c
index c7105613..000210dd 100644
--- a/source/tools/pdfextract.c
+++ b/source/tools/pdfextract.c
@@ -68,7 +68,7 @@ writejpeg(fz_context *ctx, const unsigned char *data, size_t len, const char *fi
char buf[1024];
fz_output *out;
- snprintf(buf, sizeof(buf), "%s.jpg", file);
+ fz_snprintf(buf, sizeof(buf), "%s.jpg", file);
out = fz_new_output_with_path(ctx, buf, 0);
fz_try(ctx)