diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2015-01-20 16:42:29 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2015-02-17 16:36:10 +0100 |
commit | 681039767f2ccc72e236246178893eb0989169c9 (patch) | |
tree | 2eccad54c5b5bc964335dc97fe5b0fec8449d16e /include | |
parent | 76a09166ddbe5b741f54f0fd203f2135e5b532c3 (diff) | |
download | mupdf-681039767f2ccc72e236246178893eb0989169c9.tar.xz |
Rename fz_close_* and fz_free_* to fz_drop_*.
Rename fz_close to fz_drop_stream.
Rename fz_close_archive to fz_drop_archive.
Rename fz_close_output to fz_drop_output.
Rename fz_free_* to fz_drop_*.
Rename pdf_free_* to pdf_drop_*.
Rename xps_free_* to xps_drop_*.
Diffstat (limited to 'include')
30 files changed, 60 insertions, 61 deletions
diff --git a/include/mupdf/cbz.h b/include/mupdf/cbz.h index 5c0f9a66..7aebe3f2 100644 --- a/include/mupdf/cbz.h +++ b/include/mupdf/cbz.h @@ -28,7 +28,7 @@ cbz_document *cbz_open_document(fz_context *ctx, const char *filename); filename to locate the document to open. Increments the reference count of the stream. See fz_open_file, fz_open_file_w or fz_open_fd for opening a stream, and - fz_close for closing an open stream. + fz_drop_stream for closing an open stream. */ cbz_document *cbz_open_document_with_stream(fz_context *ctx, fz_stream *file); diff --git a/include/mupdf/fitz/colorspace.h b/include/mupdf/fitz/colorspace.h index 1572211f..7cd6aba5 100644 --- a/include/mupdf/fitz/colorspace.h +++ b/include/mupdf/fitz/colorspace.h @@ -84,7 +84,7 @@ fz_colorspace *fz_new_colorspace(fz_context *ctx, char *name, int n); fz_colorspace *fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsigned char *lookup); fz_colorspace *fz_keep_colorspace(fz_context *ctx, fz_colorspace *colorspace); void fz_drop_colorspace(fz_context *ctx, fz_colorspace *colorspace); -void fz_free_colorspace_imp(fz_context *ctx, fz_storable *colorspace); +void fz_drop_colorspace_imp(fz_context *ctx, fz_storable *colorspace); void fz_convert_color(fz_context *ctx, fz_colorspace *dsts, float *dstv, fz_colorspace *srcs, const float *srcv); diff --git a/include/mupdf/fitz/compressed-buffer.h b/include/mupdf/fitz/compressed-buffer.h index 384a7744..5139b90d 100644 --- a/include/mupdf/fitz/compressed-buffer.h +++ b/include/mupdf/fitz/compressed-buffer.h @@ -76,6 +76,6 @@ struct fz_compressed_buffer_s fz_buffer *buffer; }; -void fz_free_compressed_buffer(fz_context *ctx, fz_compressed_buffer *buf); +void fz_drop_compressed_buffer(fz_context *ctx, fz_compressed_buffer *buf); #endif diff --git a/include/mupdf/fitz/context.h b/include/mupdf/fitz/context.h index dc134511..79406942 100644 --- a/include/mupdf/fitz/context.h +++ b/include/mupdf/fitz/context.h @@ -131,7 +131,7 @@ enum { The global state contains an exception stack, resource store, etc. Most functions in MuPDF take a context argument to be - able to reference the global state. See fz_free_context for + able to reference the global state. See fz_drop_context for freeing an allocated context. alloc: Supply a custom memory allocator through a set of @@ -176,7 +176,7 @@ fz_context *fz_new_context_imp(fz_alloc_context *alloc, fz_locks_context *locks, fz_context *fz_clone_context(fz_context *ctx); /* - fz_free_context: Free a context and its global state. + fz_drop_context: Free a context and its global state. The context and all of its global state is freed, and any buffered warnings are flushed (see fz_flush_warnings). If NULL @@ -184,7 +184,7 @@ fz_context *fz_clone_context(fz_context *ctx); Does not throw exceptions. */ -void fz_free_context(fz_context *ctx); +void fz_drop_context(fz_context *ctx); /* fz_aa_level: Get the number of bits of antialiasing we are @@ -410,7 +410,7 @@ struct fz_warn_context_s fz_context *fz_clone_context_internal(fz_context *ctx); void fz_new_aa_context(fz_context *ctx); -void fz_free_aa_context(fz_context *ctx); +void fz_drop_aa_context(fz_context *ctx); void fz_copy_aa_context(fz_context *dst, fz_context *src); void fz_new_document_handler_context(fz_context *ctx); diff --git a/include/mupdf/fitz/device.h b/include/mupdf/fitz/device.h index ef27cd5d..4fdf2e43 100644 --- a/include/mupdf/fitz/device.h +++ b/include/mupdf/fitz/device.h @@ -100,7 +100,7 @@ struct fz_device_s int flags; void *user; - void (*free_user)(fz_device *); + void (*drop_user)(fz_device *); fz_context *ctx; void (*rebind)(fz_device *); @@ -171,9 +171,9 @@ void fz_end_tile(fz_device *dev); fz_device *fz_new_device(fz_context *ctx, void *user); /* - fz_free_device: Free a devices of any type and its resources. + fz_drop_device: Free a devices of any type and its resources. */ -void fz_free_device(fz_device *dev); +void fz_drop_device(fz_device *dev); /* fz_enable_device_hints : Enable hints in a device. @@ -304,7 +304,7 @@ fz_device *fz_new_test_device(fz_context *ctx, int *is_color, float threshold); for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling - fz_free_device. + fz_drop_device. */ fz_device *fz_new_draw_device(fz_context *ctx, fz_pixmap *dest); @@ -315,7 +315,7 @@ fz_device *fz_new_draw_device(fz_context *ctx, fz_pixmap *dest); for how to obtain a pixmap. The pixmap is not cleared by the draw device, see fz_clear_pixmap* for how to clear it prior to calling fz_new_draw_device. Free the device by calling - fz_free_device. + fz_drop_device. clip: Bounding box to restrict any marking operations of the draw device. diff --git a/include/mupdf/fitz/display-list.h b/include/mupdf/fitz/display-list.h index 080ca5b5..269e8f9f 100644 --- a/include/mupdf/fitz/display-list.h +++ b/include/mupdf/fitz/display-list.h @@ -40,7 +40,7 @@ fz_display_list *fz_new_display_list(fz_context *ctx); display list can later be reused to render a page many times without having to re-interpret the page from the document file for each rendering. Once the device is no longer needed, free - it with fz_free_device. + it with fz_drop_device. list: A display list that the list device takes ownership of. */ diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h index cc078044..f1a0a663 100644 --- a/include/mupdf/fitz/document.h +++ b/include/mupdf/fitz/document.h @@ -147,7 +147,7 @@ int fz_authenticate_password(fz_document *doc, const char *password); /* fz_load_outline: Load the hierarchical document outline. - Should be freed by fz_free_outline. + Should be freed by fz_drop_outline. */ fz_outline *fz_load_outline(fz_document *doc); diff --git a/include/mupdf/fitz/filter.h b/include/mupdf/fitz/filter.h index d8a6729f..534ed34f 100644 --- a/include/mupdf/fitz/filter.h +++ b/include/mupdf/fitz/filter.h @@ -28,6 +28,6 @@ fz_stream *fz_open_predict(fz_stream *chain, int predictor, int columns, int col fz_stream *fz_open_jbig2d(fz_stream *chain, fz_jbig2_globals *globals); fz_jbig2_globals *fz_load_jbig2_globals(fz_context *ctx, unsigned char *data, int size); -void fz_free_jbig2_globals_imp(fz_context *ctx, fz_storable *globals); +void fz_drop_jbig2_globals_imp(fz_context *ctx, fz_storable *globals); #endif diff --git a/include/mupdf/fitz/hash.h b/include/mupdf/fitz/hash.h index f70e9693..c56c9d13 100644 --- a/include/mupdf/fitz/hash.h +++ b/include/mupdf/fitz/hash.h @@ -12,7 +12,7 @@ typedef struct fz_hash_table_s fz_hash_table; fz_hash_table *fz_new_hash_table(fz_context *ctx, int initialsize, int keylen, int lock); void fz_empty_hash(fz_context *ctx, fz_hash_table *table); -void fz_free_hash(fz_context *ctx, fz_hash_table *table); +void fz_drop_hash(fz_context *ctx, fz_hash_table *table); void *fz_hash_find(fz_context *ctx, fz_hash_table *table, const void *key); void *fz_hash_insert(fz_context *ctx, fz_hash_table *table, const void *key, void *val); diff --git a/include/mupdf/fitz/image.h b/include/mupdf/fitz/image.h index 22d87988..3d40cb1d 100644 --- a/include/mupdf/fitz/image.h +++ b/include/mupdf/fitz/image.h @@ -57,7 +57,7 @@ fz_image *fz_new_image_from_pixmap(fz_context *ctx, fz_pixmap *pixmap, fz_image fz_image *fz_new_image_from_data(fz_context *ctx, unsigned char *data, int len); fz_image *fz_new_image_from_buffer(fz_context *ctx, fz_buffer *buffer); fz_pixmap *fz_image_get_pixmap(fz_context *ctx, fz_image *image, int w, int h); -void fz_free_image(fz_context *ctx, fz_storable *image); +void fz_drop_image_imp(fz_context *ctx, fz_storable *image); fz_pixmap *fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_image *image, int indexed, int l2factor, int native_l2factor); fz_pixmap *fz_expand_indexed_pixmap(fz_context *ctx, fz_pixmap *src); diff --git a/include/mupdf/fitz/link.h b/include/mupdf/fitz/link.h index 47648a4c..586a5aa2 100644 --- a/include/mupdf/fitz/link.h +++ b/include/mupdf/fitz/link.h @@ -173,6 +173,6 @@ fz_link *fz_keep_link(fz_context *ctx, fz_link *link); */ void fz_drop_link(fz_context *ctx, fz_link *link); -void fz_free_link_dest(fz_context *ctx, fz_link_dest *dest); +void fz_drop_link_dest(fz_context *ctx, fz_link_dest *dest); #endif diff --git a/include/mupdf/fitz/outline.h b/include/mupdf/fitz/outline.h index 48718be7..6a3ca81a 100644 --- a/include/mupdf/fitz/outline.h +++ b/include/mupdf/fitz/outline.h @@ -55,12 +55,12 @@ void fz_print_outline_xml(fz_context *ctx, fz_output *out, fz_outline *outline); void fz_print_outline(fz_context *ctx, fz_output *out, fz_outline *outline); /* - fz_free_outline: Free hierarchical outline. + fz_drop_outline: Free hierarchical outline. Free an outline obtained from fz_load_outline. Does not throw exceptions. */ -void fz_free_outline(fz_context *ctx, fz_outline *outline); +void fz_drop_outline(fz_context *ctx, fz_outline *outline); #endif diff --git a/include/mupdf/fitz/output.h b/include/mupdf/fitz/output.h index 5bbf3d92..8398f83a 100644 --- a/include/mupdf/fitz/output.h +++ b/include/mupdf/fitz/output.h @@ -60,13 +60,13 @@ int fz_write(fz_output *out, const void *data, int len); void fz_putc(fz_output *out, char c); /* - fz_close_output: Close a previously opened fz_output stream. + fz_drop_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_with_file are NOT closed. */ -void fz_close_output(fz_output *); +void fz_drop_output(fz_output *); void fz_rebind_output(fz_output *, fz_context *ctx); diff --git a/include/mupdf/fitz/pixmap.h b/include/mupdf/fitz/pixmap.h index 800effd0..c8d64dd1 100644 --- a/include/mupdf/fitz/pixmap.h +++ b/include/mupdf/fitz/pixmap.h @@ -267,8 +267,7 @@ void fz_convert_pixmap(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src); free_samples: Is zero when an application has provided its own buffer for pixel data through fz_new_pixmap_with_bbox_and_data. - If not zero the buffer will be freed when fz_drop_pixmap is - called for the pixmap. + If non-zero the buffer will be freed along with the the pixmap. */ struct fz_pixmap_s { @@ -281,7 +280,7 @@ struct fz_pixmap_s int free_samples; }; -void fz_free_pixmap_imp(fz_context *ctx, fz_storable *pix); +void fz_drop_pixmap_imp(fz_context *ctx, fz_storable *pix); void fz_copy_pixmap_rect(fz_context *ctx, fz_pixmap *dest, fz_pixmap *src, const fz_irect *r); void fz_premultiply_pixmap(fz_context *ctx, fz_pixmap *pix); @@ -293,7 +292,7 @@ fz_pixmap *fz_scale_pixmap(fz_context *ctx, fz_pixmap *src, float x, float y, fl typedef struct fz_scale_cache_s fz_scale_cache; fz_scale_cache *fz_new_scale_cache(fz_context *ctx); -void fz_free_scale_cache(fz_context *ctx, fz_scale_cache *cache); +void fz_drop_scale_cache(fz_context *ctx, fz_scale_cache *cache); fz_pixmap *fz_scale_pixmap_cached(fz_context *ctx, fz_pixmap *src, float x, float y, float w, float h, const fz_irect *clip, fz_scale_cache *cache_x, fz_scale_cache *cache_y); void fz_subsample_pixmap(fz_context *ctx, fz_pixmap *tile, int factor); diff --git a/include/mupdf/fitz/shade.h b/include/mupdf/fitz/shade.h index 3cd43bd7..aa7061b9 100644 --- a/include/mupdf/fitz/shade.h +++ b/include/mupdf/fitz/shade.h @@ -74,7 +74,7 @@ struct fz_shade_s fz_shade *fz_keep_shade(fz_context *ctx, fz_shade *shade); void fz_drop_shade(fz_context *ctx, fz_shade *shade); -void fz_free_shade_imp(fz_context *ctx, fz_storable *shade); +void fz_drop_shade_imp(fz_context *ctx, fz_storable *shade); fz_rect *fz_bound_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_rect *r); void fz_paint_shade(fz_context *ctx, fz_shade *shade, const fz_matrix *ctm, fz_pixmap *dest, const fz_irect *bbox); diff --git a/include/mupdf/fitz/store.h b/include/mupdf/fitz/store.h index f954e3b8..b40aa89a 100644 --- a/include/mupdf/fitz/store.h +++ b/include/mupdf/fitz/store.h @@ -27,16 +27,16 @@ typedef struct fz_storable_s fz_storable; -typedef void (fz_store_free_fn)(fz_context *, fz_storable *); +typedef void (fz_store_drop_fn)(fz_context *, fz_storable *); struct fz_storable_s { int refs; - fz_store_free_fn *free; + fz_store_drop_fn *drop; }; -#define FZ_INIT_STORABLE(S_,RC,FREE) \ +#define FZ_INIT_STORABLE(S_,RC,DROP) \ do { fz_storable *S = &(S_)->storable; S->refs = (RC); \ - S->free = (FREE); \ + S->drop = (DROP); \ } while (0) void *fz_keep_storable(fz_context *, fz_storable *); @@ -62,7 +62,7 @@ typedef struct fz_store_hash_s fz_store_hash; struct fz_store_hash_s { - fz_store_free_fn *free; + fz_store_drop_fn *drop; union { struct @@ -138,7 +138,7 @@ void *fz_store_item(fz_context *ctx, void *key, void *val, unsigned int itemsize /* fz_find_item: Find an item within the store. - free: The function used to free the value (to ensure we get a value + drop: The function used to free the value (to ensure we get a value of the correct type). key: The key to use to index the item. @@ -148,21 +148,21 @@ void *fz_store_item(fz_context *ctx, void *key, void *val, unsigned int itemsize Returns NULL for not found, otherwise returns a pointer to the value indexed by key to which a reference has been taken. */ -void *fz_find_item(fz_context *ctx, fz_store_free_fn *free, void *key, fz_store_type *type); +void *fz_find_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, fz_store_type *type); /* fz_remove_item: Remove an item from the store. If an item indexed by the given key exists in the store, remove it. - free: The function used to free the value (to ensure we get a value + drop: The function used to free the value (to ensure we get a value of the correct type). key: The key to use to find the item to remove. type: Functions used to manipulate the key. */ -void fz_remove_item(fz_context *ctx, fz_store_free_fn *free, void *key, fz_store_type *type); +void fz_remove_item(fz_context *ctx, fz_store_drop_fn *drop, void *key, fz_store_type *type); /* fz_empty_store: Evict everything from the store. diff --git a/include/mupdf/fitz/stream.h b/include/mupdf/fitz/stream.h index fb3ef932..624060f3 100644 --- a/include/mupdf/fitz/stream.h +++ b/include/mupdf/fitz/stream.h @@ -10,7 +10,7 @@ directions. Streams are reference counted, so references must be dropped - by a call to fz_close. + by a call to fz_drop_stream. Only the data between rp and wp is valid. */ @@ -91,7 +91,7 @@ fz_stream *fz_open_buffer(fz_context *ctx, fz_buffer *buf); fz_stream *fz_open_leecher(fz_stream *chain, fz_buffer *buf); /* - fz_close: Close an open stream. + fz_drop_stream: Close an open stream. Drops a reference for the stream. Once no references remain the stream will be closed, as will any file descriptor the @@ -99,7 +99,7 @@ fz_stream *fz_open_leecher(fz_stream *chain, fz_buffer *buf); Does not throw exceptions. */ -void fz_close(fz_stream *stm); +void fz_drop_stream(fz_stream *stm); /* fz_tell: return the current reading position within a stream diff --git a/include/mupdf/fitz/structured-text.h b/include/mupdf/fitz/structured-text.h index f325bf21..da67a864 100644 --- a/include/mupdf/fitz/structured-text.h +++ b/include/mupdf/fitz/structured-text.h @@ -202,7 +202,7 @@ fz_rect *fz_text_char_bbox(fz_rect *bbox, fz_text_span *span, int idx); is used. */ fz_text_sheet *fz_new_text_sheet(fz_context *ctx); -void fz_free_text_sheet(fz_context *ctx, fz_text_sheet *sheet); +void fz_drop_text_sheet(fz_context *ctx, fz_text_sheet *sheet); /* fz_new_text_page: Create an empty text page. @@ -211,7 +211,7 @@ void fz_free_text_sheet(fz_context *ctx, fz_text_sheet *sheet); lines and spans of text on the page. */ fz_text_page *fz_new_text_page(fz_context *ctx); -void fz_free_text_page(fz_context *ctx, fz_text_page *page); +void fz_drop_text_page(fz_context *ctx, fz_text_page *page); void fz_analyze_text(fz_context *ctx, fz_text_sheet *sheet, fz_text_page *page); diff --git a/include/mupdf/fitz/tree.h b/include/mupdf/fitz/tree.h index f2cc4848..0b299e27 100644 --- a/include/mupdf/fitz/tree.h +++ b/include/mupdf/fitz/tree.h @@ -17,7 +17,7 @@ void *fz_tree_lookup(fz_context *ctx, fz_tree *node, const char *key); */ fz_tree *fz_tree_insert(fz_context *ctx, fz_tree *root, const char *key, void *value); -void fz_free_tree(fz_context *ctx, fz_tree *node, void (*freefunc)(fz_context *ctx, void *value)); +void fz_drop_tree(fz_context *ctx, fz_tree *node, void (*dropfunc)(fz_context *ctx, void *value)); void fz_debug_tree(fz_context *ctx, fz_tree *root); diff --git a/include/mupdf/fitz/unzip.h b/include/mupdf/fitz/unzip.h index dd9fb856..290cc16b 100644 --- a/include/mupdf/fitz/unzip.h +++ b/include/mupdf/fitz/unzip.h @@ -14,7 +14,7 @@ fz_archive *fz_open_archive_with_stream(fz_context *ctx, fz_stream *file); int fz_has_archive_entry(fz_context *ctx, fz_archive *zip, const char *name); fz_stream *fz_open_archive_entry(fz_context *ctx, fz_archive *zip, const char *entry); fz_buffer *fz_read_archive_entry(fz_context *ctx, fz_archive *zip, const char *entry); -void fz_close_archive(fz_context *ctx, fz_archive *ar); +void fz_drop_archive(fz_context *ctx, fz_archive *ar); void fz_rebind_archive(fz_archive *zip, fz_context *ctx); diff --git a/include/mupdf/fitz/xml.h b/include/mupdf/fitz/xml.h index 8006fa07..7e226f71 100644 --- a/include/mupdf/fitz/xml.h +++ b/include/mupdf/fitz/xml.h @@ -60,9 +60,9 @@ char *fz_xml_att(fz_xml *item, const char *att); char *fz_xml_text(fz_xml *item); /* - fz_free_xml: Free the XML node and all its children and siblings. + fz_drop_xml: Free the XML node and all its children and siblings. */ -void fz_free_xml(fz_context *doc, fz_xml *item); +void fz_drop_xml(fz_context *doc, fz_xml *item); /* fz_detach_xml: Detach a node from the tree, unlinking it from its parent. diff --git a/include/mupdf/img.h b/include/mupdf/img.h index 4c10b0d3..d7612cca 100644 --- a/include/mupdf/img.h +++ b/include/mupdf/img.h @@ -28,7 +28,7 @@ image_document *image_open_document(fz_context *ctx, const char *filename); filename to locate the document to open. Increments the reference count of the stream. See fz_open_file, fz_open_file_w or fz_open_fd for opening a stream, and - fz_close for closing an open stream. + fz_drop_stream for closing an open stream. */ image_document *image_open_document_with_stream(fz_context *ctx, fz_stream *file); diff --git a/include/mupdf/pdf/annot.h b/include/mupdf/pdf/annot.h index e3243186..6586eb3e 100644 --- a/include/mupdf/pdf/annot.h +++ b/include/mupdf/pdf/annot.h @@ -81,7 +81,7 @@ fz_link *pdf_load_link_annots(pdf_document *, pdf_obj *annots, const fz_matrix * void pdf_transform_annot(pdf_annot *annot); void pdf_load_annots(pdf_document *, pdf_page *page, pdf_obj *annots); void pdf_update_annot(pdf_document *, pdf_annot *annot); -void pdf_free_annot(fz_context *ctx, pdf_annot *link); +void pdf_drop_annot(fz_context *ctx, pdf_annot *link); /* pdf_create_annot: create a new annotation of the specified type on the diff --git a/include/mupdf/pdf/cmap.h b/include/mupdf/pdf/cmap.h index b4080b8e..a8079b67 100644 --- a/include/mupdf/pdf/cmap.h +++ b/include/mupdf/pdf/cmap.h @@ -58,7 +58,7 @@ struct pdf_cmap_s pdf_cmap *pdf_new_cmap(fz_context *ctx); pdf_cmap *pdf_keep_cmap(fz_context *ctx, pdf_cmap *cmap); void pdf_drop_cmap(fz_context *ctx, pdf_cmap *cmap); -void pdf_free_cmap_imp(fz_context *ctx, fz_storable *cmap); +void pdf_drop_cmap_imp(fz_context *ctx, fz_storable *cmap); unsigned int pdf_cmap_size(fz_context *ctx, pdf_cmap *cmap); int pdf_cmap_wmode(fz_context *ctx, pdf_cmap *cmap); diff --git a/include/mupdf/pdf/crypt.h b/include/mupdf/pdf/crypt.h index 9e3c4c94..c3d6dd8d 100644 --- a/include/mupdf/pdf/crypt.h +++ b/include/mupdf/pdf/crypt.h @@ -6,7 +6,7 @@ */ pdf_crypt *pdf_new_crypt(fz_context *ctx, pdf_obj *enc, pdf_obj *id); -void pdf_free_crypt(fz_context *ctx, pdf_crypt *crypt); +void pdf_drop_crypt(fz_context *ctx, pdf_crypt *crypt); void pdf_crypt_obj(fz_context *ctx, pdf_crypt *crypt, pdf_obj *obj, int num, int gen); void pdf_crypt_buffer(fz_context *ctx, pdf_crypt *crypt, fz_buffer *buf, int num, int gen); @@ -33,7 +33,7 @@ typedef struct pdf_designated_name_s } pdf_designated_name; -void pdf_free_designated_name(pdf_designated_name *dn); +void pdf_drop_designated_name(pdf_designated_name *dn); pdf_signer *pdf_read_pfx(fz_context *ctx, const char *sigfile, const char *password); diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index f3d67d7e..ef060776 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -82,7 +82,7 @@ pdf_document *pdf_open_document(fz_context *ctx, const char *filename); filename to locate the PDF document to open. Increments the reference count of the stream. See fz_open_file, fz_open_file_w or fz_open_fd for opening a stream, and - fz_close for closing an open stream. + fz_drop_stream for closing an open stream. */ pdf_document *pdf_open_document_with_stream(fz_context *ctx, fz_stream *file); diff --git a/include/mupdf/pdf/page.h b/include/mupdf/pdf/page.h index c1b690b6..a265828b 100644 --- a/include/mupdf/pdf/page.h +++ b/include/mupdf/pdf/page.h @@ -32,11 +32,11 @@ fz_link *pdf_load_links(pdf_document *doc, pdf_page *page); fz_rect *pdf_bound_page(pdf_document *doc, pdf_page *page, fz_rect *); /* - pdf_free_page: Frees a page and its resources. + pdf_drop_page: Frees a page and its resources. Does not throw exceptions. */ -void pdf_free_page(pdf_document *doc, pdf_page *page); +void pdf_drop_page(pdf_document *doc, pdf_page *page); /* pdf_run_page: Interpret a loaded page and render it on a device. diff --git a/include/mupdf/pdf/resource.h b/include/mupdf/pdf/resource.h index 0b090705..3828f5a1 100644 --- a/include/mupdf/pdf/resource.h +++ b/include/mupdf/pdf/resource.h @@ -5,8 +5,8 @@ * PDF interface to store */ void pdf_store_item(fz_context *ctx, pdf_obj *key, void *val, unsigned int itemsize); -void *pdf_find_item(fz_context *ctx, fz_store_free_fn *free, pdf_obj *key); -void pdf_remove_item(fz_context *ctx, fz_store_free_fn *free, pdf_obj *key); +void *pdf_find_item(fz_context *ctx, fz_store_drop_fn *drop, pdf_obj *key); +void pdf_remove_item(fz_context *ctx, fz_store_drop_fn *drop, pdf_obj *key); /* * Functions, Colorspaces, Shadings and Images diff --git a/include/mupdf/tiff.h b/include/mupdf/tiff.h index 1304e4b2..99942a55 100644 --- a/include/mupdf/tiff.h +++ b/include/mupdf/tiff.h @@ -28,7 +28,7 @@ tiff_document *tiff_open_document(fz_context *ctx, const char *filename); filename to locate the document to open. Increments the reference count of the stream. See fz_open_file, fz_open_file_w or fz_open_fd for opening a stream, and - fz_close for closing an open stream. + fz_drop_stream for closing an open stream. */ tiff_document *tiff_open_document_with_stream(fz_context *ctx, fz_stream *file); diff --git a/include/mupdf/xps.h b/include/mupdf/xps.h index 48574931..76b1028b 100644 --- a/include/mupdf/xps.h +++ b/include/mupdf/xps.h @@ -28,7 +28,7 @@ xps_document *xps_open_document(fz_context *ctx, const char *filename); filename to locate the document to open. Increments the reference count of the stream. See fz_open_file, fz_open_file_w or fz_open_fd for opening a stream, and - fz_close for closing an open stream. + fz_drop_stream for closing an open stream. */ xps_document *xps_open_document_with_stream(fz_context *ctx, fz_stream *file); @@ -47,7 +47,7 @@ xps_page *xps_load_page(xps_document *doc, int number); fz_rect *xps_bound_page(xps_document *doc, xps_page *page, fz_rect *rect); void xps_run_page(xps_document *doc, xps_page *page, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie); fz_link *xps_load_links(xps_document *doc, xps_page *page); -void xps_free_page(xps_document *doc, xps_page *page); +void xps_drop_page(xps_document *doc, xps_page *page); fz_outline *xps_load_outline(xps_document *doc); @@ -77,7 +77,7 @@ struct xps_part_s int xps_has_part(xps_document *doc, char *partname); xps_part *xps_read_part(xps_document *doc, char *partname); -void xps_free_part(xps_document *doc, xps_part *part); +void xps_drop_part(xps_document *doc, xps_part *part); /* * Document structure. @@ -114,7 +114,7 @@ struct xps_target_s void xps_read_page_list(xps_document *doc); void xps_print_page_list(xps_document *doc); -void xps_free_page_list(xps_document *doc); +void xps_drop_page_list(xps_document *doc); int xps_lookup_link_target(xps_document *doc, char *target_uri); void xps_add_link(xps_document *doc, const fz_rect *area, char *base_uri, char *target_uri); @@ -168,7 +168,7 @@ struct xps_resource_s }; xps_resource * xps_parse_resource_dictionary(xps_document *doc, char *base_uri, fz_xml *root); -void xps_free_resource_dictionary(xps_document *doc, xps_resource *dict); +void xps_drop_resource_dictionary(xps_document *doc, xps_resource *dict); void xps_resolve_resource_reference(xps_document *doc, xps_resource *dict, char **attp, fz_xml **tagp, char **urip); void xps_print_resource_dictionary(xps_resource *dict); |