summaryrefslogtreecommitdiff
path: root/source/fitz/stream-prog.c
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2015-07-29 19:17:04 +0200
committerTor Andersson <tor.andersson@artifex.com>2015-08-20 11:22:56 +0200
commita58eed4ff202ef40c0fec931b2078d711bdd5890 (patch)
treead244badc9371eb56cd7957237edf51ce886ea09 /source/fitz/stream-prog.c
parent041de6423d634965473906c5cf9c7b5480e5ec33 (diff)
downloadmupdf-a58eed4ff202ef40c0fec931b2078d711bdd5890.tar.xz
Remove a few debug functions left behind.
Diffstat (limited to 'source/fitz/stream-prog.c')
-rw-r--r--source/fitz/stream-prog.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/source/fitz/stream-prog.c b/source/fitz/stream-prog.c
index de739c5c..35905e46 100644
--- a/source/fitz/stream-prog.c
+++ b/source/fitz/stream-prog.c
@@ -1,20 +1,6 @@
#include "mupdf/fitz/stream.h"
#include "mupdf/fitz/string.h"
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(NDEBUG)
-#include "windows.h"
-
-static void
-show_progress(int av, int pos)
-{
- char text[80];
- sprintf(text, "Have %d, Want %d\n", av, pos);
- OutputDebugStringA(text);
-}
-#else
-#define show_progress(A,B) do {} while (0)
-#endif
-
/* File stream - progressive reading to simulate http download */
typedef struct prog_state
@@ -48,10 +34,7 @@ static int next_prog(fz_context *ctx, fz_stream *stm, int len)
{
len = av - stm->pos;
if (len <= 0)
- {
- show_progress(av, stm->pos);
fz_throw(ctx, FZ_ERROR_TRYLATER, "Not enough data yet");
- }
}
}
@@ -81,28 +64,19 @@ static void seek_prog(fz_context *ctx, fz_stream *stm, fz_off_t offset, int when
if (ps->available < ps->length)
{
if (whence == SEEK_END)
- {
- show_progress(ps->available, ps->length);
fz_throw(ctx, FZ_ERROR_TRYLATER, "Not enough data to seek to end yet");
- }
}
if (whence == SEEK_CUR)
{
whence = SEEK_SET;
offset += stm->pos;
if (offset > ps->available)
- {
- show_progress(ps->available, offset);
fz_throw(ctx, FZ_ERROR_TRYLATER, "Not enough data to seek (relatively) to offset yet");
- }
}
if (whence == SEEK_SET)
{
if (offset > ps->available)
- {
- show_progress(ps->available, offset);
fz_throw(ctx, FZ_ERROR_TRYLATER, "Not enough data to seek to offset yet");
- }
}
if (fz_fseek(ps->file, offset, whence) != 0)