summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mupdf/fitz/buffer.h')
-rw-r--r--include/mupdf/fitz/buffer.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/mupdf/fitz/buffer.h b/include/mupdf/fitz/buffer.h
index 1a8eb80c..a616fa86 100644
--- a/include/mupdf/fitz/buffer.h
+++ b/include/mupdf/fitz/buffer.h
@@ -36,13 +36,13 @@ void fz_drop_buffer(fz_context *ctx, fz_buffer *buf);
Returns length of stream.
*/
-int fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **data);
+size_t fz_buffer_storage(fz_context *ctx, fz_buffer *buf, unsigned char **data);
struct fz_buffer_s
{
int refs;
unsigned char *data;
- int cap, len;
+ size_t cap, len;
int unused_bits;
int shared;
};
@@ -55,7 +55,7 @@ struct fz_buffer_s
Returns pointer to new buffer. Throws exception on allocation
failure.
*/
-fz_buffer *fz_new_buffer(fz_context *ctx, int capacity);
+fz_buffer *fz_new_buffer(fz_context *ctx, size_t capacity);
/*
fz_new_buffer_from_data: Create a new buffer with existing data.
@@ -70,17 +70,17 @@ fz_buffer *fz_new_buffer(fz_context *ctx, int capacity);
Returns pointer to new buffer. Throws exception on allocation
failure.
*/
-fz_buffer *fz_new_buffer_from_data(fz_context *ctx, unsigned char *data, int size);
+fz_buffer *fz_new_buffer_from_data(fz_context *ctx, unsigned char *data, size_t size);
/*
fz_new_buffer_from_shared_data: Like fz_new_buffer, but does not take ownership.
*/
-fz_buffer *fz_new_buffer_from_shared_data(fz_context *ctx, const char *data, int size);
+fz_buffer *fz_new_buffer_from_shared_data(fz_context *ctx, const char *data, size_t size);
/*
fz_new_buffer_from_base64: Create a new buffer with data decoded from a base64 input string.
*/
-fz_buffer *fz_new_buffer_from_base64(fz_context *ctx, const char *data, int size);
+fz_buffer *fz_new_buffer_from_base64(fz_context *ctx, const char *data, size_t size);
/*
fz_resize_buffer: Ensure that a buffer has a given capacity,
@@ -92,7 +92,7 @@ fz_buffer *fz_new_buffer_from_base64(fz_context *ctx, const char *data, int size
of the buffer contents is smaller than capacity, it is truncated.
*/
-void fz_resize_buffer(fz_context *ctx, fz_buffer *buf, int capacity);
+void fz_resize_buffer(fz_context *ctx, fz_buffer *buf, size_t capacity);
/*
fz_grow_buffer: Make some space within a buffer (i.e. ensure that
@@ -127,15 +127,15 @@ void fz_append_buffer(fz_context *ctx, fz_buffer *buf, fz_buffer *extra);
fz_buffer_print_pdfstring: Print a string using PDF syntax and escapes.
The buffer will grow as required.
*/
-void fz_write_buffer(fz_context *ctx, fz_buffer *buf, const void *data, int len);
+void fz_write_buffer(fz_context *ctx, fz_buffer *buf, const void *data, size_t len);
void fz_write_buffer_byte(fz_context *ctx, fz_buffer *buf, int val);
void fz_write_buffer_rune(fz_context *ctx, fz_buffer *buf, int val);
void fz_write_buffer_int32_le(fz_context *ctx, fz_buffer *buf, int x);
void fz_write_buffer_int16_le(fz_context *ctx, fz_buffer *buf, int x);
void fz_write_buffer_bits(fz_context *ctx, fz_buffer *buf, int val, int bits);
void fz_write_buffer_pad(fz_context *ctx, fz_buffer *buf);
-int fz_buffer_printf(fz_context *ctx, fz_buffer *buffer, const char *fmt, ...);
-int fz_buffer_vprintf(fz_context *ctx, fz_buffer *buffer, const char *fmt, va_list args);
+size_t fz_buffer_printf(fz_context *ctx, fz_buffer *buffer, const char *fmt, ...);
+size_t fz_buffer_vprintf(fz_context *ctx, fz_buffer *buffer, const char *fmt, va_list args);
void fz_buffer_print_pdf_string(fz_context *ctx, fz_buffer *buffer, const char *text);
#endif