summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2013-04-26 13:18:26 +0100
committerRobin Watts <robin.watts@artifex.com>2013-04-26 14:42:56 +0100
commitb8be39cfeb201af4dac4bff4aa32b0db4d588917 (patch)
treed187ef52750da427298485f272a1a3364846ddc2 /fitz
parenta20d6a58ebc6c60ff44f0f385cf399ee6fca55bf (diff)
downloadmupdf-b8be39cfeb201af4dac4bff4aa32b0db4d588917.tar.xz
Rename functions for consistency.
Rename fz_new_output_buffer to be fz_new_output_with_buffer. Rename fz_new_output_file to be fz_new_output_with_file. This is more consistent with other functions such as fz_new_pixmap_with_data.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/dev_text.c2
-rw-r--r--fitz/fitz.h12
-rw-r--r--fitz/res_pixmap.c2
-rw-r--r--fitz/stm_output.c4
4 files changed, 10 insertions, 10 deletions
diff --git a/fitz/dev_text.c b/fitz/dev_text.c
index b1347637..05f52e4c 100644
--- a/fitz/dev_text.c
+++ b/fitz/dev_text.c
@@ -1178,7 +1178,7 @@ fz_print_text_page_html(fz_context *ctx, fz_output *out, fz_text_page *page)
{
fz_pixmap *pix = fz_image_get_pixmap(ctx, image->image, image->image->w, image->image->h);
fz_buffer *buf = fz_new_buffer(ctx, 1024);
- fz_output *out2 = fz_new_output_buffer(ctx, buf);
+ fz_output *out2 = fz_new_output_with_buffer(ctx, buf);
fz_output_pixmap_to_png(ctx, pix, out2, 0);
fz_close_output(out2);
fz_printf(out, "image/png;base64,");
diff --git a/fitz/fitz.h b/fitz/fitz.h
index 853e7482..8822437b 100644
--- a/fitz/fitz.h
+++ b/fitz/fitz.h
@@ -2109,18 +2109,18 @@ struct fz_output_s
};
/*
- fz_new_output_file: Open an output stream onto a FILE *.
+ fz_new_output_with_file: Open an output stream onto a FILE *.
The stream does NOT take ownership of the FILE *.
*/
-fz_output *fz_new_output_file(fz_context *, FILE *);
+fz_output *fz_new_output_with_file(fz_context *, FILE *);
/*
- fz_new_output_buffer: Open an output stream onto a buffer.
+ fz_new_output_with_buffer: Open an output stream onto a buffer.
The stream doesn NOT take ownership of the buffer.
*/
-fz_output *fz_new_output_buffer(fz_context *, fz_buffer *);
+fz_output *fz_new_output_with_buffer(fz_context *, fz_buffer *);
/*
fz_printf: fprintf equivalent for output streams.
@@ -2141,8 +2141,8 @@ void fz_output_pixmap_to_png(fz_context *ctx, fz_pixmap *pixmap, fz_output *out,
fz_close_output: Close a previously opened fz_output stream.
Note: whether or not this closes the underlying output method is
- method dependent. FILE * streams created by fz_new_output_file are
- NOT closed.
+ method dependent. FILE * streams created by fz_new_output_with_file
+ are NOT closed.
*/
void fz_close_output(fz_output *);
diff --git a/fitz/res_pixmap.c b/fitz/res_pixmap.c
index fa58c56a..12d5956e 100644
--- a/fitz/res_pixmap.c
+++ b/fitz/res_pixmap.c
@@ -574,7 +574,7 @@ fz_write_png(fz_context *ctx, fz_pixmap *pixmap, char *filename, int savealpha)
fz_try(ctx)
{
- fz_output_pixmap_to_png(ctx, pixmap, fz_new_output_file(ctx, fp), savealpha);
+ fz_output_pixmap_to_png(ctx, pixmap, fz_new_output_with_file(ctx, fp), savealpha);
}
fz_always(ctx)
{
diff --git a/fitz/stm_output.c b/fitz/stm_output.c
index 534b3fa1..7b5fb05a 100644
--- a/fitz/stm_output.c
+++ b/fitz/stm_output.c
@@ -17,7 +17,7 @@ file_write(fz_output *out, const void *buffer, int count)
}
fz_output *
-fz_new_output_file(fz_context *ctx, FILE *file)
+fz_new_output_with_file(fz_context *ctx, FILE *file)
{
fz_output *out = fz_malloc_struct(ctx, fz_output);
out->ctx = ctx;
@@ -80,7 +80,7 @@ buffer_write(fz_output *out, const void *data, int len)
}
fz_output *
-fz_new_output_buffer(fz_context *ctx, fz_buffer *buf)
+fz_new_output_with_buffer(fz_context *ctx, fz_buffer *buf)
{
fz_output *out = fz_malloc_struct(ctx, fz_output);
out->ctx = ctx;