/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 | 160M | { |
32 | 160M | pdf_num *num = (pdf_num *)obj; |
33 | | |
34 | 160M | switch (pdfi_type_of(num)) { |
35 | 47.1M | case PDF_INT: |
36 | 47.1M | *d = (double)num->value.i; |
37 | 47.1M | break; |
38 | 113M | case PDF_REAL: |
39 | 113M | *d = num->value.d; |
40 | 113M | break; |
41 | 254k | default: |
42 | 254k | return_error(gs_error_typecheck); |
43 | 160M | } |
44 | | |
45 | 160M | return 0; |
46 | 160M | } zpdfops.c:pdfi_obj_to_real Line | Count | Source | 31 | 258k | { | 32 | 258k | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 258k | switch (pdfi_type_of(num)) { | 35 | 0 | case PDF_INT: | 36 | 0 | *d = (double)num->value.i; | 37 | 0 | break; | 38 | 258k | case PDF_REAL: | 39 | 258k | *d = num->value.d; | 40 | 258k | break; | 41 | 0 | default: | 42 | 0 | return_error(gs_error_typecheck); | 43 | 258k | } | 44 | | | 45 | 258k | return 0; | 46 | 258k | } |
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real pdf_dict.c:pdfi_obj_to_real Line | Count | Source | 31 | 1.62M | { | 32 | 1.62M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 1.62M | switch (pdfi_type_of(num)) { | 35 | 1.41M | case PDF_INT: | 36 | 1.41M | *d = (double)num->value.i; | 37 | 1.41M | break; | 38 | 207k | case PDF_REAL: | 39 | 207k | *d = num->value.d; | 40 | 207k | break; | 41 | 71 | default: | 42 | 71 | return_error(gs_error_typecheck); | 43 | 1.62M | } | 44 | | | 45 | 1.62M | return 0; | 46 | 1.62M | } |
pdf_array.c:pdfi_obj_to_real Line | Count | Source | 31 | 14.9M | { | 32 | 14.9M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 14.9M | switch (pdfi_type_of(num)) { | 35 | 12.5M | case PDF_INT: | 36 | 12.5M | *d = (double)num->value.i; | 37 | 12.5M | break; | 38 | 2.31M | case PDF_REAL: | 39 | 2.31M | *d = num->value.d; | 40 | 2.31M | break; | 41 | 947 | default: | 42 | 947 | return_error(gs_error_typecheck); | 43 | 14.9M | } | 44 | | | 45 | 14.9M | return 0; | 46 | 14.9M | } |
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 | 131M | { | 32 | 131M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 131M | switch (pdfi_type_of(num)) { | 35 | 26.2M | case PDF_INT: | 36 | 26.2M | *d = (double)num->value.i; | 37 | 26.2M | break; | 38 | 105M | case PDF_REAL: | 39 | 105M | *d = num->value.d; | 40 | 105M | break; | 41 | 250k | default: | 42 | 250k | return_error(gs_error_typecheck); | 43 | 131M | } | 44 | | | 45 | 131M | return 0; | 46 | 131M | } |
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real pdf_page.c:pdfi_obj_to_real Line | Count | Source | 31 | 637k | { | 32 | 637k | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 637k | switch (pdfi_type_of(num)) { | 35 | 381k | case PDF_INT: | 36 | 381k | *d = (double)num->value.i; | 37 | 381k | break; | 38 | 255k | case PDF_REAL: | 39 | 255k | *d = num->value.d; | 40 | 255k | break; | 41 | 197 | default: | 42 | 197 | return_error(gs_error_typecheck); | 43 | 637k | } | 44 | | | 45 | 636k | return 0; | 46 | 637k | } |
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.20M | { | 32 | 1.20M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 1.20M | switch (pdfi_type_of(num)) { | 35 | 721k | case PDF_INT: | 36 | 721k | *d = (double)num->value.i; | 37 | 721k | break; | 38 | 479k | case PDF_REAL: | 39 | 479k | *d = num->value.d; | 40 | 479k | break; | 41 | 2.89k | default: | 42 | 2.89k | return_error(gs_error_typecheck); | 43 | 1.20M | } | 44 | | | 45 | 1.20M | return 0; | 46 | 1.20M | } |
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 | 10.1M | { | 32 | 10.1M | pdf_num *num = (pdf_num *)obj; | 33 | | | 34 | 10.1M | switch (pdfi_type_of(num)) { | 35 | 5.73M | case PDF_INT: | 36 | 5.73M | *d = (double)num->value.i; | 37 | 5.73M | break; | 38 | 4.45M | case PDF_REAL: | 39 | 4.45M | *d = num->value.d; | 40 | 4.45M | break; | 41 | 103 | default: | 42 | 103 | return_error(gs_error_typecheck); | 43 | 10.1M | } | 44 | | | 45 | 10.1M | return 0; | 46 | 10.1M | } |
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 | 10.1M | { |
51 | 10.1M | pdf_num *num = (pdf_num *)obj; |
52 | | |
53 | 10.1M | switch (pdfi_type_of(num)) { |
54 | 4.20M | case PDF_INT: |
55 | 4.20M | *f = (float)num->value.i; |
56 | 4.20M | break; |
57 | 5.91M | case PDF_REAL: |
58 | 5.91M | *f = (float)num->value.d; |
59 | 5.91M | break; |
60 | 17.5k | default: |
61 | 17.5k | return_error(gs_error_typecheck); |
62 | 10.1M | } |
63 | | |
64 | 10.1M | return 0; |
65 | 10.1M | } 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 | 552k | { | 51 | 552k | pdf_num *num = (pdf_num *)obj; | 52 | | | 53 | 552k | switch (pdfi_type_of(num)) { | 54 | 228k | case PDF_INT: | 55 | 228k | *f = (float)num->value.i; | 56 | 228k | break; | 57 | 313k | case PDF_REAL: | 58 | 313k | *f = (float)num->value.d; | 59 | 313k | break; | 60 | 10.6k | default: | 61 | 10.6k | return_error(gs_error_typecheck); | 62 | 552k | } | 63 | | | 64 | 541k | return 0; | 65 | 552k | } |
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 | 9.58M | { | 51 | 9.58M | pdf_num *num = (pdf_num *)obj; | 52 | | | 53 | 9.58M | switch (pdfi_type_of(num)) { | 54 | 3.97M | case PDF_INT: | 55 | 3.97M | *f = (float)num->value.i; | 56 | 3.97M | break; | 57 | 5.60M | case PDF_REAL: | 58 | 5.60M | *f = (float)num->value.d; | 59 | 5.60M | break; | 60 | 6.85k | default: | 61 | 6.85k | return_error(gs_error_typecheck); | 62 | 9.58M | } | 63 | | | 64 | 9.57M | return 0; | 65 | 9.58M | } |
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 | 8.43M | { |
70 | 8.43M | pdf_num *num = (pdf_num *)obj; |
71 | 8.43M | int64_t tmp; |
72 | | |
73 | 8.43M | switch (pdfi_type_of(num)) { |
74 | 8.39M | case PDF_INT: |
75 | 8.39M | *i = num->value.i; |
76 | 8.39M | break; |
77 | 25.7k | 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 | 25.7k | tmp = (int64_t)num->value.d; |
84 | 25.7k | if ((double)tmp != num->value.d) { |
85 | 15.0k | return_error(gs_error_typecheck); |
86 | 15.0k | } |
87 | 10.7k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); |
88 | 10.7k | *i = tmp; |
89 | 10.7k | break; |
90 | 16.3k | default: |
91 | 16.3k | return_error(gs_error_typecheck); |
92 | 8.43M | } |
93 | | |
94 | 8.40M | return 0; |
95 | 8.43M | } zpdfops.c:pdfi_obj_to_int Line | Count | Source | 69 | 538k | { | 70 | 538k | pdf_num *num = (pdf_num *)obj; | 71 | 538k | int64_t tmp; | 72 | | | 73 | 538k | switch (pdfi_type_of(num)) { | 74 | 538k | case PDF_INT: | 75 | 538k | *i = num->value.i; | 76 | 538k | 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 | 538k | } | 93 | | | 94 | 538k | return 0; | 95 | 538k | } |
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int pdf_dict.c:pdfi_obj_to_int Line | Count | Source | 69 | 5.56M | { | 70 | 5.56M | pdf_num *num = (pdf_num *)obj; | 71 | 5.56M | int64_t tmp; | 72 | | | 73 | 5.56M | switch (pdfi_type_of(num)) { | 74 | 5.55M | case PDF_INT: | 75 | 5.55M | *i = num->value.i; | 76 | 5.55M | break; | 77 | 2.33k | 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.33k | tmp = (int64_t)num->value.d; | 84 | 2.33k | if ((double)tmp != num->value.d) { | 85 | 11 | return_error(gs_error_typecheck); | 86 | 11 | } | 87 | 2.31k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 2.31k | *i = tmp; | 89 | 2.31k | break; | 90 | 621 | default: | 91 | 621 | return_error(gs_error_typecheck); | 92 | 5.56M | } | 93 | | | 94 | 5.56M | return 0; | 95 | 5.56M | } |
pdf_array.c:pdfi_obj_to_int Line | Count | Source | 69 | 70.7k | { | 70 | 70.7k | pdf_num *num = (pdf_num *)obj; | 71 | 70.7k | int64_t tmp; | 72 | | | 73 | 70.7k | switch (pdfi_type_of(num)) { | 74 | 70.6k | case PDF_INT: | 75 | 70.6k | *i = num->value.i; | 76 | 70.6k | 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 | 70.7k | } | 93 | | | 94 | 70.6k | return 0; | 95 | 70.7k | } |
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 | 2.26M | { | 70 | 2.26M | pdf_num *num = (pdf_num *)obj; | 71 | 2.26M | int64_t tmp; | 72 | | | 73 | 2.26M | switch (pdfi_type_of(num)) { | 74 | 2.22M | case PDF_INT: | 75 | 2.22M | *i = num->value.i; | 76 | 2.22M | break; | 77 | 23.4k | 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 | 23.4k | tmp = (int64_t)num->value.d; | 84 | 23.4k | if ((double)tmp != num->value.d) { | 85 | 14.9k | return_error(gs_error_typecheck); | 86 | 14.9k | } | 87 | 8.41k | pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL); | 88 | 8.41k | *i = tmp; | 89 | 8.41k | break; | 90 | 15.6k | default: | 91 | 15.6k | return_error(gs_error_typecheck); | 92 | 2.26M | } | 93 | | | 94 | 2.23M | return 0; | 95 | 2.26M | } |
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 | 37.9k | { |
101 | 37.9k | pdf_buffer *b = (pdf_buffer *)o; |
102 | 37.9k | if (pdfi_type_of(b) != PDF_BUFFER) { |
103 | 0 | return_error(gs_error_typecheck); |
104 | 0 | } |
105 | | |
106 | 37.9k | if (b->data) { |
107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); |
108 | 0 | } |
109 | 37.9k | b->data = data; |
110 | 37.9k | b->length = length; |
111 | 37.9k | return 0; |
112 | 37.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 | 15 | { | 101 | 15 | pdf_buffer *b = (pdf_buffer *)o; | 102 | 15 | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 15 | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 15 | b->data = data; | 110 | 15 | b->length = length; | 111 | 15 | return 0; | 112 | 15 | } |
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 | 22.7k | { | 101 | 22.7k | pdf_buffer *b = (pdf_buffer *)o; | 102 | 22.7k | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 22.7k | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 22.7k | b->data = data; | 110 | 22.7k | b->length = length; | 111 | 22.7k | return 0; | 112 | 22.7k | } |
pdf_font11.c:pdfi_buffer_set_data Line | Count | Source | 100 | 15.2k | { | 101 | 15.2k | pdf_buffer *b = (pdf_buffer *)o; | 102 | 15.2k | if (pdfi_type_of(b) != PDF_BUFFER) { | 103 | 0 | return_error(gs_error_typecheck); | 104 | 0 | } | 105 | | | 106 | 15.2k | if (b->data) { | 107 | | gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)"); | 108 | 0 | } | 109 | 15.2k | b->data = data; | 110 | 15.2k | b->length = length; | 111 | 15.2k | return 0; | 112 | 15.2k | } |
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 |