/src/ghostpdl/pdf/pdf_dict.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright (C) 2018-2024 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., 39 Mesa Street, Suite 108A, San Francisco, |
13 | | CA 94129, USA, for further information. |
14 | | */ |
15 | | |
16 | | /* dictionary handling for the PDF interpreter */ |
17 | | |
18 | | #ifndef PDF_DICTIONARY_FUNCTIONS |
19 | | #define PDF_DICTIONARY_FUNCTIONS |
20 | | |
21 | 2.14M | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } zpdfops.c:pdfi_dict_entries Line | Count | Source | 21 | 129k | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: ghostpdf.c:pdfi_dict_entries Unexecuted instantiation: pdf_dict.c:pdfi_dict_entries Unexecuted instantiation: pdf_xref.c:pdfi_dict_entries Unexecuted instantiation: pdf_int.c:pdfi_dict_entries Unexecuted instantiation: pdf_file.c:pdfi_dict_entries pdf_colour.c:pdfi_dict_entries Line | Count | Source | 21 | 18.4k | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: pdf_pattern.c:pdfi_dict_entries Unexecuted instantiation: pdf_gstate.c:pdfi_dict_entries Unexecuted instantiation: pdf_image.c:pdfi_dict_entries Unexecuted instantiation: pdf_page.c:pdfi_dict_entries pdf_annot.c:pdfi_dict_entries Line | Count | Source | 21 | 777 | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
pdf_mark.c:pdfi_dict_entries Line | Count | Source | 21 | 7.99k | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: pdf_font.c:pdfi_dict_entries Unexecuted instantiation: pdf_font0.c:pdfi_dict_entries Unexecuted instantiation: pdf_font1.c:pdfi_dict_entries Unexecuted instantiation: pdf_font1C.c:pdfi_dict_entries Unexecuted instantiation: pdf_fontps.c:pdfi_dict_entries Unexecuted instantiation: pdf_font3.c:pdfi_dict_entries Unexecuted instantiation: pdf_fontTT.c:pdfi_dict_entries Unexecuted instantiation: pdf_font11.c:pdfi_dict_entries Unexecuted instantiation: pdf_cmap.c:pdfi_dict_entries Unexecuted instantiation: pdf_fmap.c:pdfi_dict_entries Unexecuted instantiation: pdf_shading.c:pdfi_dict_entries Unexecuted instantiation: pdf_func.c:pdfi_dict_entries Unexecuted instantiation: pdf_trans.c:pdfi_dict_entries pdf_optcontent.c:pdfi_dict_entries Line | Count | Source | 21 | 1.66k | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
pdf_check.c:pdfi_dict_entries Line | Count | Source | 21 | 1.98M | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: pdf_sec.c:pdfi_dict_entries pdf_deref.c:pdfi_dict_entries Line | Count | Source | 21 | 958 | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: pdf_repair.c:pdfi_dict_entries pdf_obj.c:pdfi_dict_entries Line | Count | Source | 21 | 6.93k | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
pdf_doc.c:pdfi_dict_entries Line | Count | Source | 21 | 720 | static inline uint64_t pdfi_dict_entries(pdf_dict *d) { return d->entries; } |
Unexecuted instantiation: pdf_fapi.c:pdfi_dict_entries |
22 | | |
23 | | int pdfi_dict_get_common(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o, bool cache); |
24 | | static inline int pdfi_dict_get(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o) |
25 | 53.8M | { |
26 | 53.8M | return pdfi_dict_get_common(ctx, d, Key, o, true); |
27 | 53.8M | } Unexecuted instantiation: zpdfops.c:pdfi_dict_get Line | Count | Source | 25 | 37.1k | { | 26 | 37.1k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 37.1k | } |
Line | Count | Source | 25 | 48.1M | { | 26 | 48.1M | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 48.1M | } |
Unexecuted instantiation: pdf_xref.c:pdfi_dict_get Unexecuted instantiation: pdf_int.c:pdfi_dict_get Line | Count | Source | 25 | 13.7k | { | 26 | 13.7k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 13.7k | } |
pdf_colour.c:pdfi_dict_get Line | Count | Source | 25 | 18.4k | { | 26 | 18.4k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 18.4k | } |
Unexecuted instantiation: pdf_pattern.c:pdfi_dict_get pdf_gstate.c:pdfi_dict_get Line | Count | Source | 25 | 421k | { | 26 | 421k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 421k | } |
pdf_image.c:pdfi_dict_get Line | Count | Source | 25 | 1.89M | { | 26 | 1.89M | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 1.89M | } |
Line | Count | Source | 25 | 317k | { | 26 | 317k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 317k | } |
pdf_annot.c:pdfi_dict_get Line | Count | Source | 25 | 287 | { | 26 | 287 | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 287 | } |
Line | Count | Source | 25 | 297 | { | 26 | 297 | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 297 | } |
Line | Count | Source | 25 | 638k | { | 26 | 638k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 638k | } |
pdf_font0.c:pdfi_dict_get Line | Count | Source | 25 | 224k | { | 26 | 224k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 224k | } |
pdf_font1.c:pdfi_dict_get Line | Count | Source | 25 | 1.10M | { | 26 | 1.10M | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 1.10M | } |
pdf_font1C.c:pdfi_dict_get Line | Count | Source | 25 | 10.9k | { | 26 | 10.9k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 10.9k | } |
Unexecuted instantiation: pdf_fontps.c:pdfi_dict_get pdf_font3.c:pdfi_dict_get Line | Count | Source | 25 | 33.4k | { | 26 | 33.4k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 33.4k | } |
pdf_fontTT.c:pdfi_dict_get Line | Count | Source | 25 | 56.0k | { | 26 | 56.0k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 56.0k | } |
pdf_font11.c:pdfi_dict_get Line | Count | Source | 25 | 2.54k | { | 26 | 2.54k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 2.54k | } |
Unexecuted instantiation: pdf_cmap.c:pdfi_dict_get Line | Count | Source | 25 | 29.9k | { | 26 | 29.9k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 29.9k | } |
pdf_shading.c:pdfi_dict_get Line | Count | Source | 25 | 171k | { | 26 | 171k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 171k | } |
Unexecuted instantiation: pdf_func.c:pdfi_dict_get pdf_trans.c:pdfi_dict_get Line | Count | Source | 25 | 15.5k | { | 26 | 15.5k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 15.5k | } |
Unexecuted instantiation: pdf_optcontent.c:pdfi_dict_get Unexecuted instantiation: pdf_check.c:pdfi_dict_get Line | Count | Source | 25 | 1.19k | { | 26 | 1.19k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 1.19k | } |
Unexecuted instantiation: pdf_deref.c:pdfi_dict_get Unexecuted instantiation: pdf_repair.c:pdfi_dict_get Unexecuted instantiation: pdf_obj.c:pdfi_dict_get Line | Count | Source | 25 | 173k | { | 26 | 173k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 173k | } |
Line | Count | Source | 25 | 558k | { | 26 | 558k | return pdfi_dict_get_common(ctx, d, Key, o, true); | 27 | 558k | } |
|
28 | | |
29 | | static inline int pdfi_dict_get_nocache(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o) |
30 | 0 | { |
31 | 0 | return pdfi_dict_get_common(ctx, d, Key, o, false); |
32 | 0 | } Unexecuted instantiation: zpdfops.c:pdfi_dict_get_nocache Unexecuted instantiation: ghostpdf.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_dict.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_xref.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_int.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_file.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_colour.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_pattern.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_gstate.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_image.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_page.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_annot.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_mark.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font0.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font1.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font1C.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_fontps.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font3.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_fontTT.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_font11.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_cmap.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_fmap.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_shading.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_func.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_trans.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_optcontent.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_check.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_sec.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_deref.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_repair.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_obj.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_doc.c:pdfi_dict_get_nocache Unexecuted instantiation: pdf_fapi.c:pdfi_dict_get_nocache |
33 | | |
34 | | |
35 | | void pdfi_free_dict(pdf_obj *o); |
36 | | int pdfi_dict_delete_pair(pdf_context *ctx, pdf_dict *d, pdf_name *n); |
37 | | int pdfi_dict_delete(pdf_context *ctx, pdf_dict *d, const char *str); |
38 | | int pdfi_dict_alloc(pdf_context *ctx, uint64_t size, pdf_dict **d); |
39 | | int pdfi_dict_from_stack(pdf_context *ctx, uint32_t indirect_num, uint32_t indirect_gen, bool convert_string_keys); |
40 | | int pdfi_dict_known(pdf_context *ctx, pdf_dict *d, const char *Key, bool *known); |
41 | | int pdfi_dict_known_by_key(pdf_context *ctx, pdf_dict *d, pdf_name *Key, bool *known); |
42 | | int pdfi_dict_knownget(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o); |
43 | | int pdfi_dict_knownget_type(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj_type type, pdf_obj **o); |
44 | | int pdfi_dict_knownget_type_no_store_R(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj_type type, pdf_obj **o); |
45 | | int pdfi_dict_knownget_number(pdf_context *ctx, pdf_dict *d, const char *Key, double *f); |
46 | | int pdfi_dict_knownget_bool(pdf_context *ctx, pdf_dict *d, const char *Key, bool *b); |
47 | | int pdfi_merge_dicts(pdf_context *ctx, pdf_dict *target, pdf_dict *source); |
48 | | int pdfi_dict_put_obj(pdf_context *ctx, pdf_dict *d, pdf_obj *Key, pdf_obj *value, bool replace); |
49 | | int pdfi_dict_put_unchecked(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj *value); |
50 | | int pdfi_dict_put(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj *value); |
51 | | int pdfi_dict_put_int(pdf_context *ctx, pdf_dict *d, const char *Key, int64_t value); |
52 | | int pdfi_dict_put_bool(pdf_context *ctx, pdf_dict *d, const char *Key, bool value); |
53 | | int pdfi_dict_put_name(pdf_context *ctx, pdf_dict *d, const char *Key, const char *name); |
54 | | int pdfi_dict_get2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, pdf_obj **o); |
55 | | int pdfi_dict_get_no_deref(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); |
56 | | int pdfi_dict_get_by_key(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); |
57 | | int pdfi_dict_get_no_store_R_key(pdf_context *ctx, pdf_dict *d, const pdf_name *Key, pdf_obj **o); |
58 | | int pdfi_dict_get_no_store_R(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj **o); |
59 | | int pdfi_dict_get_type2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, pdf_obj_type type, pdf_obj **o); |
60 | | int pdfi_dict_get_type(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj_type t, pdf_obj **o); |
61 | | int pdfi_dict_get_type_no_store_R(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_obj_type type, pdf_obj **o); |
62 | | int pdfi_dict_get_ref(pdf_context *ctx, pdf_dict *d, const char *Key, pdf_indirect_ref **o); |
63 | | int pdfi_dict_get_int2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, int64_t *i); |
64 | | int pdfi_dict_get_int(pdf_context *ctx, pdf_dict *d, const char *Key, int64_t *i); |
65 | | int pdfi_dict_get_int_def(pdf_context *ctx, pdf_dict *d, const char *Key, int64_t *i, int64_t def_val); |
66 | | int pdfi_dict_get_bool2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, bool *val); |
67 | | int pdfi_dict_get_bool(pdf_context *ctx, pdf_dict *d, const char *Key, bool *val); |
68 | | int pdfi_dict_get_number(pdf_context *ctx, pdf_dict *d, const char *Key, double *f); |
69 | | int pdfi_dict_get_number2(pdf_context *ctx, pdf_dict *d, const char *Key1, const char *Key2, double *f); |
70 | | int fill_domain_from_dict(pdf_context *ctx, float *parray, int size, pdf_dict *dict); |
71 | | int fill_float_array_from_dict(pdf_context *ctx, float *parray, int size, pdf_dict *dict, const char *Key); |
72 | | int fill_bool_array_from_dict(pdf_context *ctx, bool *parray, int size, pdf_dict *dict, const char *Key); |
73 | | int fill_matrix_from_dict(pdf_context *ctx, float *parray, pdf_dict *dict); |
74 | | int pdfi_make_float_array_from_dict(pdf_context *ctx, float **parray, pdf_dict *dict, const char *Key); |
75 | | int pdfi_make_int_array_from_dict(pdf_context *ctx, int **parray, pdf_dict *dict, const char *Key); |
76 | | int pdfi_dict_copy(pdf_context *ctx, pdf_dict *target, pdf_dict *source); |
77 | | int pdfi_dict_next(pdf_context *ctx, pdf_dict *d, pdf_obj **Key, pdf_obj **Value, uint64_t *index); |
78 | | int pdfi_dict_first(pdf_context *ctx, pdf_dict *d, pdf_obj **Key, pdf_obj **Value, uint64_t *index); |
79 | | int pdfi_dict_key_next(pdf_context *ctx, pdf_dict *d, pdf_obj **Key, uint64_t *index); |
80 | | int pdfi_dict_key_first(pdf_context *ctx, pdf_dict *d, pdf_obj **Key, uint64_t *index); |
81 | | |
82 | | int pdfi_dict_from_obj(pdf_context *ctx, pdf_obj *obj, pdf_dict **dict); |
83 | | int64_t pdfi_stream_length(pdf_context *ctx, pdf_stream *stream); |
84 | | gs_offset_t pdfi_stream_offset(pdf_context *ctx, pdf_stream *stream); |
85 | | pdf_stream *pdfi_stream_parent(pdf_context *ctx, pdf_stream *stream); |
86 | | void pdfi_set_stream_parent(pdf_context *ctx, pdf_stream *stream, pdf_stream *parent); |
87 | | void pdfi_clear_stream_parent(pdf_context *ctx, pdf_stream *stream); |
88 | | #endif |