diff options
author | Robin Watts <robin.watts@artifex.com> | 2011-11-15 19:05:59 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2011-11-17 18:32:06 +0000 |
commit | 2be04fd23c9650820fa5abd1196647ccf1b73921 (patch) | |
tree | 0828c91a4154cc8a3d4041db4f64611c43a93a2d /fitz/base_object.c | |
parent | 9b56c6c88522b7ff6c592c93ff8ec33ee158747a (diff) | |
download | mupdf-2be04fd23c9650820fa5abd1196647ccf1b73921.tar.xz |
Bug 692487: Make pdfclean keep internal links where possible.
Take on a (cosmetically tweaked) version of Zenikos patch to allow
pdfclean to keep link destinations that are in preserved pages.
Diffstat (limited to 'fitz/base_object.c')
-rw-r--r-- | fitz/base_object.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fitz/base_object.c b/fitz/base_object.c index 6881fffb..64fafad0 100644 --- a/fitz/base_object.c +++ b/fitz/base_object.c @@ -497,6 +497,18 @@ fz_array_insert(fz_obj *obj, fz_obj *item) } } +int +fz_array_contains(fz_obj *arr, fz_obj *obj) +{ + int i; + + for (i = 0; i < fz_array_len(arr); i++) + if (!fz_objcmp(fz_array_get(arr, i), obj)) + return 1; + + return 0; +} + /* dicts may only have names as keys! */ static int keyvalcmp(const void *ap, const void *bp) |