/src/ghostpdl/pdf/pdf_obj.h
Line | Count | Source |
1 | | /* Copyright (C) 2020-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 | | #ifndef PDF_OBJECTS |
17 | | #define PDF_OBJECTS |
18 | | |
19 | | int pdfi_object_alloc(pdf_context *ctx, pdf_obj_type type, unsigned int size, pdf_obj **obj); |
20 | | void pdfi_free_object(pdf_obj *o); |
21 | | int pdfi_obj_to_string(pdf_context *ctx, pdf_obj *obj, byte **data, int *len); |
22 | | int pdfi_obj_dict_to_stream(pdf_context *ctx, pdf_dict *dict, pdf_stream **stream, bool do_convert); |
23 | | int pdfi_get_stream_dict(pdf_context *ctx, pdf_stream *stream, pdf_dict **dict); |
24 | | int pdfi_obj_charstr_to_string(pdf_context *ctx, const char *charstr, pdf_string **string); |
25 | | int pdfi_obj_charstr_to_name(pdf_context *ctx, const char *charstr, pdf_name **name); |
26 | | int pdfi_obj_get_label(pdf_context *ctx, pdf_obj *obj, char **label); |
27 | | int pdfi_num_alloc(pdf_context *ctx, double d, pdf_num **num); |
28 | | |
29 | | static inline int |
30 | | pdfi_obj_to_real(pdf_context *ctx, pdf_obj *obj, double *d) |
31 | 142M | { |
32 | 142M | pdf_num *num = (pdf_num *)obj; |
33 | | |
34 | 142M | switch (pdfi_type_of(num)) { |
35 | 42.6M | case PDF_INT: |
36 | 42.6M | *d = (double)num->value.i; |
37 | 42.6M | break; |
38 | 99.3M | case PDF_REAL: |
39 | 99.3M | *d = num->value.d; |
40 | 99.3M | break; |
41 | 239k | default: |
42 | 239k | return_error(gs_error_typecheck); |
43 | 142M | } |
44 | | |
45 | 141M | return 0; |
46 | 142M | } zpdfops.c:pdfi_obj_to_real Line | Count | Source | 31 | 235k | { | 32 | 235k | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 235k | switch (pdfi_type_of(num)) { | 35 | 0 | case PDF_INT: | 36 | 0 | *d = (double)num->value.i; | 37 | 0 | break; | 38 | 235k | case PDF_REAL: | 39 | 235k | *d = num->value.d; | 40 | 235k | break; | 41 | 0 | default: | 42 | 0 | return_error(gs_error_typecheck); | 43 | 235k | } | 44 | | | 45 | 235k | return 0; | 46 | 235k | } |
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real pdf_dict.c:pdfi_obj_to_real Line | Count | Source | 31 | 1.54M | { | 32 | 1.54M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 1.54M | switch (pdfi_type_of(num)) { | 35 | 1.35M | case PDF_INT: | 36 | 1.35M | *d = (double)num->value.i; | 37 | 1.35M | break; | 38 | 191k | case PDF_REAL: | 39 | 191k | *d = num->value.d; | 40 | 191k | break; | 41 | 75 | default: | 42 | 75 | return_error(gs_error_typecheck); | 43 | 1.54M | } | 44 | | | 45 | 1.54M | return 0; | 46 | 1.54M | } |
pdf_array.c:pdfi_obj_to_real Line | Count | Source | 31 | 13.6M | { | 32 | 13.6M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 13.6M | switch (pdfi_type_of(num)) { | 35 | 11.5M | case PDF_INT: | 36 | 11.5M | *d = (double)num->value.i; | 37 | 11.5M | break; | 38 | 2.09M | case PDF_REAL: | 39 | 2.09M | *d = num->value.d; | 40 | 2.09M | break; | 41 | 933 | default: | 42 | 933 | return_error(gs_error_typecheck); | 43 | 13.6M | } | 44 | | | 45 | 13.6M | return 0; | 46 | 13.6M | } |
Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_real Unexecuted instantiation: pdf_int.c:pdfi_obj_to_real Unexecuted instantiation: pdf_file.c:pdfi_obj_to_real Unexecuted instantiation: pdf_path.c:pdfi_obj_to_real Unexecuted instantiation: pdf_colour.c:pdfi_obj_to_real Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_real Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_real pdf_stack.c:pdfi_obj_to_real Line | Count | Source | 31 | 115M | { | 32 | 115M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 115M | switch (pdfi_type_of(num)) { | 35 | 23.3M | case PDF_INT: | 36 | 23.3M | *d = (double)num->value.i; | 37 | 23.3M | break; | 38 | 92.0M | case PDF_REAL: | 39 | 92.0M | *d = num->value.d; | 40 | 92.0M | break; | 41 | 235k | default: | 42 | 235k | return_error(gs_error_typecheck); | 43 | 115M | } | 44 | | | 45 | 115M | return 0; | 46 | 115M | } |
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real pdf_page.c:pdfi_obj_to_real Line | Count | Source | 31 | 589k | { | 32 | 589k | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 589k | switch (pdfi_type_of(num)) { | 35 | 356k | case PDF_INT: | 36 | 356k | *d = (double)num->value.i; | 37 | 356k | break; | 38 | 233k | case PDF_REAL: | 39 | 233k | *d = num->value.d; | 40 | 233k | break; | 41 | 200 | default: | 42 | 200 | return_error(gs_error_typecheck); | 43 | 589k | } | 44 | | | 45 | 589k | return 0; | 46 | 589k | } |
Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_real Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_real pdf_font.c:pdfi_obj_to_real Line | Count | Source | 31 | 1.13M | { | 32 | 1.13M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 1.13M | switch (pdfi_type_of(num)) { | 35 | 681k | case PDF_INT: | 36 | 681k | *d = (double)num->value.i; | 37 | 681k | break; | 38 | 448k | case PDF_REAL: | 39 | 448k | *d = num->value.d; | 40 | 448k | break; | 41 | 2.75k | default: | 42 | 2.75k | return_error(gs_error_typecheck); | 43 | 1.13M | } | 44 | | | 45 | 1.13M | return 0; | 46 | 1.13M | } |
Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_real Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_real Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_real Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_real Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_real Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_real Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_real Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_real Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_real pdf_text.c:pdfi_obj_to_real Line | Count | Source | 31 | 9.36M | { | 32 | 9.36M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 9.36M | switch (pdfi_type_of(num)) { | 35 | 5.35M | case PDF_INT: | 36 | 5.35M | *d = (double)num->value.i; | 37 | 5.35M | break; | 38 | 4.01M | case PDF_REAL: | 39 | 4.01M | *d = num->value.d; | 40 | 4.01M | break; | 41 | 93 | default: | 42 | 93 | return_error(gs_error_typecheck); | 43 | 9.36M | } | 44 | | | 45 | 9.36M | return 0; | 46 | 9.36M | } |
Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_real Unexecuted instantiation: pdf_func.c:pdfi_obj_to_real Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_real Unexecuted instantiation: pdf_device.c:pdfi_obj_to_real Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_real Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_real Unexecuted instantiation: pdf_check.c:pdfi_obj_to_real Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_real Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_real Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_real Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_real Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_real Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_real Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_real |
47 | | |
48 | | static inline int |
49 | | pdfi_obj_to_float(pdf_context *ctx, pdf_obj *obj, float *f) |
50 | 9.11M | { |
51 | 9.11M | pdf_num *num = (pdf_num *)obj; |
52 | | |
53 | 9.11M | switch (pdfi_type_of(num)) { |
54 | 3.80M | case PDF_INT: |
55 | 3.80M | *f = (float)num->value.i; |
56 | 3.80M | break; |
57 | 5.29M | case PDF_REAL: |
58 | 5.29M | *f = (float)num->value.d; |
59 | 5.29M | break; |
60 | 15.5k | default: |
61 | 15.5k | return_error(gs_error_typecheck); |
62 | 9.11M | } |
63 | | |
64 | 9.10M | return 0; |
65 | 9.11M | } Unexecuted instantiation: zpdfops.c:pdfi_obj_to_float Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_float Unexecuted instantiation: pdf_dict.c:pdfi_obj_to_float Unexecuted instantiation: pdf_array.c:pdfi_obj_to_float Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_float Unexecuted instantiation: pdf_int.c:pdfi_obj_to_float Unexecuted instantiation: pdf_file.c:pdfi_obj_to_float Unexecuted instantiation: pdf_path.c:pdfi_obj_to_float pdf_colour.c:pdfi_obj_to_float Line | Count | Source | 50 | 512k | { | 51 | 512k | pdf_num *num = (pdf_num *)obj; | 52 | | | 53 | 512k | switch (pdfi_type_of(num)) { | 54 | 210k | case PDF_INT: | 55 | 210k | *f = (float)num->value.i; | 56 | 210k | break; | 57 | 292k | case PDF_REAL: | 58 | 292k | *f = (float)num->value.d; | 59 | 292k | break; | 60 | 9.64k | default: | 61 | 9.64k | return_error(gs_error_typecheck); | 62 | 512k | } | 63 | | | 64 | 503k | return 0; | 65 | 512k | } |
Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_float Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_float pdf_stack.c:pdfi_obj_to_float Line | Count | Source | 50 | 8.60M | { | 51 | 8.60M | pdf_num *num = (pdf_num *)obj; | 52 | | | 53 | 8.60M | switch (pdfi_type_of(num)) { | 54 | 3.59M | case PDF_INT: | 55 | 3.59M | *f = (float)num->value.i; | 56 | 3.59M | break; | 57 | 5.00M | case PDF_REAL: | 58 | 5.00M | *f = (float)num->value.d; | 59 | 5.00M | break; | 60 | 5.93k | default: | 61 | 5.93k | return_error(gs_error_typecheck); | 62 | 8.60M | } | 63 | | | 64 | 8.59M | return 0; | 65 | 8.60M | } |
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_float Unexecuted instantiation: pdf_page.c:pdfi_obj_to_float Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_float Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_float Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_float Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_float Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_float Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_float Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_float Unexecuted instantiation: pdf_text.c:pdfi_obj_to_float Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_float Unexecuted instantiation: pdf_func.c:pdfi_obj_to_float Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_float Unexecuted instantiation: pdf_device.c:pdfi_obj_to_float Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_float Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_float Unexecuted instantiation: pdf_check.c:pdfi_obj_to_float Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_float Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_float Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_float Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_float Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_float Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_float Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_float |
66 | | |
67 | | static inline int |
68 | | pdfi_obj_to_int(pdf_context *ctx, pdf_obj *obj, int64_t *i) |
69 | 7.49M | { |
70 | 7.49M | pdf_num *num = (pdf_num *)obj; |
71 | 7.49M | int64_t tmp; |
72 | | |
73 | 7.49M | switch (pdfi_type_of(num)) { |
74 | 7.45M | case PDF_INT: |
75 | 7.45M | *i = num->value.i; |
76 | 7.45M | break; |
77 | 22.5k | case PDF_REAL: |
78 | | /* We shouldn't be given a real here. We will grudgingly accept |
79 | | * (with a warning) an int given as a real, but will error out |
80 | | * otherwise. If we find a case where we need to accept reals |
81 | | * as ints, we'll do a new version of this function called something |
82 | | * like pdfi_obj_real_as_int what will just cast it down. */ |
83 | 22.5k | tmp = (int64_t)num->value.d; |
84 | 22.5k | if ((double)tmp != num->value.d) { |
85 | 12.8k | return_error(gs_error_typecheck); |
86 | 12.8k | } |
87 | 9.62k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); |
88 | 9.62k | *i = tmp; |
89 | 9.62k | break; |
90 | 14.1k | default: |
91 | 14.1k | return_error(gs_error_typecheck); |
92 | 7.49M | } |
93 | | |
94 | 7.46M | return 0; |
95 | 7.49M | } zpdfops.c:pdfi_obj_to_int Line | Count | Source | 69 | 502k | { | 70 | 502k | pdf_num *num = (pdf_num *)obj; | 71 | 502k | int64_t tmp; | 72 | | | 73 | 502k | switch (pdfi_type_of(num)) { | 74 | 502k | case PDF_INT: | 75 | 502k | *i = num->value.i; | 76 | 502k | break; | 77 | 0 | case PDF_REAL: | 78 | | /* We shouldn't be given a real here. We will grudgingly accept | 79 | | * (with a warning) an int given as a real, but will error out | 80 | | * otherwise. If we find a case where we need to accept reals | 81 | | * as ints, we'll do a new version of this function called something | 82 | | * like pdfi_obj_real_as_int what will just cast it down. */ | 83 | 0 | tmp = (int64_t)num->value.d; | 84 | 0 | if ((double)tmp != num->value.d) { | 85 | 0 | return_error(gs_error_typecheck); | 86 | 0 | } | 87 | 0 | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 0 | *i = tmp; | 89 | 0 | break; | 90 | 0 | default: | 91 | 0 | return_error(gs_error_typecheck); | 92 | 502k | } | 93 | | | 94 | 502k | return 0; | 95 | 502k | } |
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int pdf_dict.c:pdfi_obj_to_int Line | Count | Source | 69 | 5.00M | { | 70 | 5.00M | pdf_num *num = (pdf_num *)obj; | 71 | 5.00M | int64_t tmp; | 72 | | | 73 | 5.00M | switch (pdfi_type_of(num)) { | 74 | 5.00M | case PDF_INT: | 75 | 5.00M | *i = num->value.i; | 76 | 5.00M | break; | 77 | 2.14k | case PDF_REAL: | 78 | | /* We shouldn't be given a real here. We will grudgingly accept | 79 | | * (with a warning) an int given as a real, but will error out | 80 | | * otherwise. If we find a case where we need to accept reals | 81 | | * as ints, we'll do a new version of this function called something | 82 | | * like pdfi_obj_real_as_int what will just cast it down. */ | 83 | 2.14k | tmp = (int64_t)num->value.d; | 84 | 2.14k | if ((double)tmp != num->value.d) { | 85 | 9 | return_error(gs_error_typecheck); | 86 | 9 | } | 87 | 2.13k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 2.13k | *i = tmp; | 89 | 2.13k | break; | 90 | 585 | default: | 91 | 585 | return_error(gs_error_typecheck); | 92 | 5.00M | } | 93 | | | 94 | 5.00M | return 0; | 95 | 5.00M | } |
pdf_array.c:pdfi_obj_to_int Line | Count | Source | 69 | 63.5k | { | 70 | 63.5k | pdf_num *num = (pdf_num *)obj; | 71 | 63.5k | int64_t tmp; | 72 | | | 73 | 63.5k | switch (pdfi_type_of(num)) { | 74 | 63.5k | case PDF_INT: | 75 | 63.5k | *i = num->value.i; | 76 | 63.5k | break; | 77 | 0 | case PDF_REAL: | 78 | | /* We shouldn't be given a real here. We will grudgingly accept | 79 | | * (with a warning) an int given as a real, but will error out | 80 | | * otherwise. If we find a case where we need to accept reals | 81 | | * as ints, we'll do a new version of this function called something | 82 | | * like pdfi_obj_real_as_int what will just cast it down. */ | 83 | 0 | tmp = (int64_t)num->value.d; | 84 | 0 | if ((double)tmp != num->value.d) { | 85 | 0 | return_error(gs_error_typecheck); | 86 | 0 | } | 87 | 0 | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 0 | *i = tmp; | 89 | 0 | break; | 90 | 72 | default: | 91 | 72 | return_error(gs_error_typecheck); | 92 | 63.5k | } | 93 | | | 94 | 63.5k | return 0; | 95 | 63.5k | } |
Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_int Unexecuted instantiation: pdf_int.c:pdfi_obj_to_int Unexecuted instantiation: pdf_file.c:pdfi_obj_to_int Unexecuted instantiation: pdf_path.c:pdfi_obj_to_int Unexecuted instantiation: pdf_colour.c:pdfi_obj_to_int Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_int Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_int pdf_stack.c:pdfi_obj_to_int Line | Count | Source | 69 | 1.92M | { | 70 | 1.92M | pdf_num *num = (pdf_num *)obj; | 71 | 1.92M | int64_t tmp; | 72 | | | 73 | 1.92M | switch (pdfi_type_of(num)) { | 74 | 1.88M | case PDF_INT: | 75 | 1.88M | *i = num->value.i; | 76 | 1.88M | break; | 77 | 20.3k | case PDF_REAL: | 78 | | /* We shouldn't be given a real here. We will grudgingly accept | 79 | | * (with a warning) an int given as a real, but will error out | 80 | | * otherwise. If we find a case where we need to accept reals | 81 | | * as ints, we'll do a new version of this function called something | 82 | | * like pdfi_obj_real_as_int what will just cast it down. */ | 83 | 20.3k | tmp = (int64_t)num->value.d; | 84 | 20.3k | if ((double)tmp != num->value.d) { | 85 | 12.8k | return_error(gs_error_typecheck); | 86 | 12.8k | } | 87 | 7.49k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 7.49k | *i = tmp; | 89 | 7.49k | break; | 90 | 13.4k | default: | 91 | 13.4k | return_error(gs_error_typecheck); | 92 | 1.92M | } | 93 | | | 94 | 1.89M | return 0; | 95 | 1.92M | } |
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_int Unexecuted instantiation: pdf_page.c:pdfi_obj_to_int Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_int Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_int Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_int Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_int Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_int Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_int Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_int Unexecuted instantiation: pdf_text.c:pdfi_obj_to_int Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_int Unexecuted instantiation: pdf_func.c:pdfi_obj_to_int Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_int Unexecuted instantiation: pdf_device.c:pdfi_obj_to_int Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_int Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_int Unexecuted instantiation: pdf_check.c:pdfi_obj_to_int Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_int Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_int Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_int Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_int Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_int Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_int Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_int |
96 | | |
97 | | /* NOTE: the buffer object takes ownership of "data" */ |
98 | | static inline int |
99 | | pdfi_buffer_set_data(pdf_obj *o, byte *data, int32_t length) |
100 | 34.9k | { |
101 | 34.9k | pdf_buffer *b = (pdf_buffer *)o; |
102 | 34.9k | if (pdfi_type_of(b) != PDF_BUFFER) { |
103 | 0 | return_error(gs_error_typecheck); |
104 | 0 | } |
105 | | |
106 | 34.9k | if (b->data) { |
107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); |
108 | 0 | } |
109 | 34.9k | b->data = data; |
110 | 34.9k | b->length = length; |
111 | 34.9k | return 0; |
112 | 34.9k | } Unexecuted instantiation: zpdfops.c:pdfi_buffer_set_data Unexecuted instantiation: ghostpdf.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_dict.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_array.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_xref.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_int.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_file.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_path.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_colour.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_pattern.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_gstate.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_stack.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_image.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_page.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_annot.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_mark.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_font.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_font0.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_font1.c:pdfi_buffer_set_data pdf_font1C.c:pdfi_buffer_set_data Line | Count | Source | 100 | 14 | { | 101 | 14 | pdf_buffer *b = (pdf_buffer *)o; | 102 | 14 | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 14 | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 14 | b->data = data; | 110 | 14 | b->length = length; | 111 | 14 | return 0; | 112 | 14 | } |
Unexecuted instantiation: pdf_fontps.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_font3.c:pdfi_buffer_set_data pdf_fontTT.c:pdfi_buffer_set_data Line | Count | Source | 100 | 20.4k | { | 101 | 20.4k | pdf_buffer *b = (pdf_buffer *)o; | 102 | 20.4k | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 20.4k | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 20.4k | b->data = data; | 110 | 20.4k | b->length = length; | 111 | 20.4k | return 0; | 112 | 20.4k | } |
pdf_font11.c:pdfi_buffer_set_data Line | Count | Source | 100 | 14.4k | { | 101 | 14.4k | pdf_buffer *b = (pdf_buffer *)o; | 102 | 14.4k | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 14.4k | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 14.4k | b->data = data; | 110 | 14.4k | b->length = length; | 111 | 14.4k | return 0; | 112 | 14.4k | } |
Unexecuted instantiation: pdf_cmap.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_fmap.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_text.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_shading.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_func.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_trans.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_device.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_misc.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_optcontent.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_check.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_sec.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_utf8.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_deref.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_repair.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_obj.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_doc.c:pdfi_buffer_set_data Unexecuted instantiation: pdf_fapi.c:pdfi_buffer_set_data |
113 | | |
114 | | |
115 | | #endif |