summaryrefslogtreecommitdiff
path: root/source/fitz/stream-read.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz/stream-read.c')
-rw-r--r--source/fitz/stream-read.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/fitz/stream-read.c b/source/fitz/stream-read.c
index 2ace7b1f..b499d68f 100644
--- a/source/fitz/stream-read.c
+++ b/source/fitz/stream-read.c
@@ -2,10 +2,10 @@
#define MIN_BOMB (100 << 20)
-int
-fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, int len)
+size_t
+fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, size_t len)
{
- int count, n;
+ size_t count, n;
count = 0;
do
@@ -29,9 +29,9 @@ fz_read(fz_context *ctx, fz_stream *stm, unsigned char *buf, int len)
static unsigned char skip_buf[4096];
-int fz_skip(fz_context *ctx, fz_stream *stm, int len)
+size_t fz_skip(fz_context *ctx, fz_stream *stm, size_t len)
{
- int count, l, total = 0;
+ size_t count, l, total = 0;
while (len)
{
@@ -48,16 +48,16 @@ int fz_skip(fz_context *ctx, fz_stream *stm, int len)
}
fz_buffer *
-fz_read_all(fz_context *ctx, fz_stream *stm, int initial)
+fz_read_all(fz_context *ctx, fz_stream *stm, size_t initial)
{
return fz_read_best(ctx, stm, initial, NULL);
}
fz_buffer *
-fz_read_best(fz_context *ctx, fz_stream *stm, int initial, int *truncated)
+fz_read_best(fz_context *ctx, fz_stream *stm, size_t initial, int *truncated)
{
fz_buffer *buf = NULL;
- int n;
+ size_t n;
fz_var(buf);
@@ -110,7 +110,7 @@ fz_read_best(fz_context *ctx, fz_stream *stm, int initial, int *truncated)
}
char *
-fz_read_line(fz_context *ctx, fz_stream *stm, char *mem, int n)
+fz_read_line(fz_context *ctx, fz_stream *stm, char *mem, size_t n)
{
char *s = mem;
int c = EOF;