/src/ghostpdl/pdf/pdf_array.h
Line | Count | Source |
1 | | /* Copyright (C) 2018-2022 Artifex Software, Inc. |
2 | | All Rights Reserved. |
3 | | |
4 | | This software is provided AS-IS with no warranty, either express or |
5 | | implied. |
6 | | |
7 | | This software is distributed under license and may not be copied, |
8 | | modified or distributed except as expressly authorized under the terms |
9 | | of the license contained in the file LICENSE in this distribution. |
10 | | |
11 | | Refer to licensing information at http://www.artifex.com or contact |
12 | | Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, |
13 | | CA 94945, U.S.A., +1(415)492-9861, for further information. |
14 | | */ |
15 | | |
16 | | /* array handling for the PDF interpreter */ |
17 | | |
18 | | #ifndef PDF_ARRAY_FUNCTIONS |
19 | | #define PDF_ARRAY_FUNCTIONS |
20 | | |
21 | 38.1M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } zpdfops.c:pdfi_array_size Line | Count | Source | 21 | 472k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
Unexecuted instantiation: ghostpdf.c:pdfi_array_size pdf_dict.c:pdfi_array_size Line | Count | Source | 21 | 174k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_array.c:pdfi_array_size Line | Count | Source | 21 | 650k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_xref.c:pdfi_array_size Line | Count | Source | 21 | 21.0k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
Unexecuted instantiation: pdf_int.c:pdfi_array_size pdf_file.c:pdfi_array_size Line | Count | Source | 21 | 52.6k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_colour.c:pdfi_array_size Line | Count | Source | 21 | 45.4k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_pattern.c:pdfi_array_size Line | Count | Source | 21 | 395 | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_gstate.c:pdfi_array_size Line | Count | Source | 21 | 688k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_image.c:pdfi_array_size Line | Count | Source | 21 | 13.9k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_page.c:pdfi_array_size Line | Count | Source | 21 | 402k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_annot.c:pdfi_array_size Line | Count | Source | 21 | 562k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_mark.c:pdfi_array_size Line | Count | Source | 21 | 7.28k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_font.c:pdfi_array_size Line | Count | Source | 21 | 2.95M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
Unexecuted instantiation: pdf_font0.c:pdfi_array_size pdf_font1.c:pdfi_array_size Line | Count | Source | 21 | 14.1M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
Unexecuted instantiation: pdf_font1C.c:pdfi_array_size Unexecuted instantiation: pdf_fontps.c:pdfi_array_size Unexecuted instantiation: pdf_font3.c:pdfi_array_size Unexecuted instantiation: pdf_fontTT.c:pdfi_array_size Unexecuted instantiation: pdf_font11.c:pdfi_array_size Unexecuted instantiation: pdf_fmap.c:pdfi_array_size pdf_text.c:pdfi_array_size Line | Count | Source | 21 | 11.9M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_shading.c:pdfi_array_size Line | Count | Source | 21 | 49 | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_func.c:pdfi_array_size Line | Count | Source | 21 | 3.81k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_trans.c:pdfi_array_size Line | Count | Source | 21 | 1.18k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_optcontent.c:pdfi_array_size Line | Count | Source | 21 | 36.1k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_check.c:pdfi_array_size Line | Count | Source | 21 | 1.08M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
Unexecuted instantiation: pdf_sec.c:pdfi_array_size pdf_deref.c:pdfi_array_size Line | Count | Source | 21 | 98.0k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_obj.c:pdfi_array_size Line | Count | Source | 21 | 115k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_doc.c:pdfi_array_size Line | Count | Source | 21 | 275k | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
pdf_fapi.c:pdfi_array_size Line | Count | Source | 21 | 4.39M | static inline uint64_t pdfi_array_size(pdf_array *a) { return a->size; } |
|
22 | | |
23 | | int pdfi_array_fetch(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o, bool setref, bool cache); |
24 | | /* The object returned by pdfi_array_get has its reference count incremented by 1 to |
25 | | * indicate the reference now held by the caller, in **o. |
26 | | */ |
27 | | static int inline pdfi_array_get(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o) |
28 | 98.3M | { |
29 | 98.3M | return pdfi_array_fetch(ctx, a, index, o, true, true); |
30 | 98.3M | } Unexecuted instantiation: zpdfops.c:pdfi_array_get Unexecuted instantiation: ghostpdf.c:pdfi_array_get pdf_dict.c:pdfi_array_get Line | Count | Source | 28 | 28.5k | { | 29 | 28.5k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 28.5k | } |
pdf_array.c:pdfi_array_get Line | Count | Source | 28 | 35.0M | { | 29 | 35.0M | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 35.0M | } |
Unexecuted instantiation: pdf_xref.c:pdfi_array_get Unexecuted instantiation: pdf_int.c:pdfi_array_get pdf_file.c:pdfi_array_get Line | Count | Source | 28 | 1.97k | { | 29 | 1.97k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 1.97k | } |
pdf_colour.c:pdfi_array_get Line | Count | Source | 28 | 48.5k | { | 29 | 48.5k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 48.5k | } |
pdf_pattern.c:pdfi_array_get Line | Count | Source | 28 | 64 | { | 29 | 64 | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 64 | } |
pdf_gstate.c:pdfi_array_get Line | Count | Source | 28 | 55 | { | 29 | 55 | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 55 | } |
Unexecuted instantiation: pdf_image.c:pdfi_array_get Unexecuted instantiation: pdf_page.c:pdfi_array_get Unexecuted instantiation: pdf_annot.c:pdfi_array_get pdf_mark.c:pdfi_array_get Line | Count | Source | 28 | 14.3k | { | 29 | 14.3k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 14.3k | } |
pdf_font.c:pdfi_array_get Line | Count | Source | 28 | 45.0M | { | 29 | 45.0M | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 45.0M | } |
pdf_font0.c:pdfi_array_get Line | Count | Source | 28 | 139k | { | 29 | 139k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 139k | } |
Unexecuted instantiation: pdf_font1.c:pdfi_array_get pdf_font1C.c:pdfi_array_get Line | Count | Source | 28 | 154k | { | 29 | 154k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 154k | } |
Unexecuted instantiation: pdf_fontps.c:pdfi_array_get pdf_font3.c:pdfi_array_get Line | Count | Source | 28 | 9.06k | { | 29 | 9.06k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 9.06k | } |
pdf_fontTT.c:pdfi_array_get Line | Count | Source | 28 | 6.50M | { | 29 | 6.50M | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 6.50M | } |
Unexecuted instantiation: pdf_font11.c:pdfi_array_get Unexecuted instantiation: pdf_fmap.c:pdfi_array_get pdf_text.c:pdfi_array_get Line | Count | Source | 28 | 10.9M | { | 29 | 10.9M | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 10.9M | } |
pdf_shading.c:pdfi_array_get Line | Count | Source | 28 | 4 | { | 29 | 4 | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 4 | } |
Unexecuted instantiation: pdf_func.c:pdfi_array_get Unexecuted instantiation: pdf_trans.c:pdfi_array_get pdf_optcontent.c:pdfi_array_get Line | Count | Source | 28 | 19.6k | { | 29 | 19.6k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 19.6k | } |
Unexecuted instantiation: pdf_check.c:pdfi_array_get Unexecuted instantiation: pdf_sec.c:pdfi_array_get Unexecuted instantiation: pdf_deref.c:pdfi_array_get Unexecuted instantiation: pdf_obj.c:pdfi_array_get Line | Count | Source | 28 | 1.09k | { | 29 | 1.09k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 1.09k | } |
pdf_fapi.c:pdfi_array_get Line | Count | Source | 28 | 358k | { | 29 | 358k | return pdfi_array_fetch(ctx, a, index, o, true, true); | 30 | 358k | } |
|
31 | | |
32 | | static int inline pdfi_array_get_nocache(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o) |
33 | 13.5k | { |
34 | 13.5k | return pdfi_array_fetch(ctx, a, index, o, true, false); |
35 | 13.5k | } Unexecuted instantiation: zpdfops.c:pdfi_array_get_nocache Unexecuted instantiation: ghostpdf.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_dict.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_array.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_xref.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_int.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_file.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_colour.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_pattern.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_gstate.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_image.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_page.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_annot.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_mark.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font0.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font1.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font1C.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_fontps.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font3.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_fontTT.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_font11.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_fmap.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_text.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_shading.c:pdfi_array_get_nocache pdf_func.c:pdfi_array_get_nocache Line | Count | Source | 33 | 13.5k | { | 34 | 13.5k | return pdfi_array_fetch(ctx, a, index, o, true, false); | 35 | 13.5k | } |
Unexecuted instantiation: pdf_trans.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_optcontent.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_check.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_sec.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_deref.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_obj.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_doc.c:pdfi_array_get_nocache Unexecuted instantiation: pdf_fapi.c:pdfi_array_get_nocache |
36 | | |
37 | | void pdfi_free_array(pdf_obj *o); |
38 | | int pdfi_array_alloc(pdf_context *ctx, uint64_t size, pdf_array **a); |
39 | | int pdfi_array_from_stack(pdf_context *ctx, uint32_t indirect_num, uint32_t indirect_gen); |
40 | | int pdfi_array_get_no_deref(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o); |
41 | | int pdfi_array_get_no_store_R(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o); |
42 | | int pdfi_array_get_type(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj_type t, pdf_obj **o); |
43 | | int pdfi_array_get_int(pdf_context *ctx, pdf_array *a, uint64_t index, int64_t *i); |
44 | | int pdfi_array_get_number(pdf_context *ctx, pdf_array *a, uint64_t index, double *f); |
45 | | int pdfi_array_put(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj *o); |
46 | | int pdfi_array_put_int(pdf_context *ctx, pdf_array *a, uint64_t index, int64_t val); |
47 | | int pdfi_array_put_real(pdf_context *ctx, pdf_array *a, uint64_t index, double val); |
48 | | |
49 | | bool pdfi_array_known(pdf_context *ctx, pdf_array *a, pdf_obj *, int *index); |
50 | | |
51 | | void pdfi_normalize_rect(pdf_context *ctx, gs_rect *rect); |
52 | | int pdfi_array_to_gs_rect(pdf_context *ctx, pdf_array *array, gs_rect *rect); |
53 | | int pdfi_gs_rect_to_array(pdf_context *ctx, gs_rect *rect, pdf_array **new_array); |
54 | | int pdfi_array_to_gs_matrix(pdf_context *ctx, pdf_array *array, gs_matrix *matrix); |
55 | | int pdfi_array_to_num_array(pdf_context *ctx, pdf_array *array, double *out, int start, int size); |
56 | | void pdfi_bbox_transform(pdf_context *ctx, gs_rect *bbox, gs_matrix *matrix); |
57 | | |
58 | | int pdfi_array_fetch_recursing(pdf_context *ctx, pdf_array *a, uint64_t index, pdf_obj **o, bool setref, bool cache); |
59 | | |
60 | | #endif |