/src/ghostpdl/base/ttfmemd.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* Copyright (C) 2001-2023 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 | | |
17 | | |
18 | | /* Memory structure descriptors for the TrueType instruction interpreter. */ |
19 | | |
20 | | #include "ttmisc.h" |
21 | | #include "ttfoutl.h" |
22 | | #include "ttobjs.h" |
23 | | #include "ttfmemd.h" |
24 | | #include "gsstruct.h" |
25 | | |
26 | | gs_public_st_ptrs5(st_TFace, TFace, "TFace", |
27 | | st_TFace_enum_ptrs, st_TFace_reloc_ptrs, |
28 | | r, font, fontProgram, cvtProgram, cvt); |
29 | | |
30 | | gs_public_st_composite(st_TInstance, TInstance, |
31 | | "TInstance", TInstance_enum_ptrs, TInstance_reloc_ptrs); |
32 | | |
33 | | static |
34 | 0 | ENUM_PTRS_BEGIN(TInstance_enum_ptrs) return 0; |
35 | 0 | ENUM_PTR(0, TInstance, face); |
36 | 0 | ENUM_PTR(1, TInstance, FDefs); |
37 | 0 | ENUM_PTR(2, TInstance, IDefs); |
38 | 0 | ENUM_PTR(3, TInstance, codeRangeTable[0].Base); |
39 | 0 | ENUM_PTR(4, TInstance, codeRangeTable[1].Base); |
40 | 0 | ENUM_PTR(5, TInstance, codeRangeTable[2].Base); |
41 | 0 | ENUM_PTR(6, TInstance, cvt); |
42 | 0 | ENUM_PTR(7, TInstance, storage); |
43 | 0 | ENUM_PTRS_END |
44 | | |
45 | 0 | static RELOC_PTRS_WITH(TInstance_reloc_ptrs, TInstance *mptr) |
46 | 0 | RELOC_PTR(TInstance, face); |
47 | 0 | RELOC_PTR(TInstance, FDefs); |
48 | 0 | RELOC_PTR(TInstance, IDefs); |
49 | 0 | RELOC_PTR(TInstance, codeRangeTable[0].Base); |
50 | 0 | RELOC_PTR(TInstance, codeRangeTable[1].Base); |
51 | 0 | RELOC_PTR(TInstance, codeRangeTable[2].Base); |
52 | 0 | RELOC_PTR(TInstance, cvt); |
53 | 0 | RELOC_PTR(TInstance, storage); |
54 | 0 | DISCARD(mptr); |
55 | 0 | RELOC_PTRS_END |
56 | | |
57 | | gs_public_st_composite(st_TExecution_Context, TExecution_Context, |
58 | | "TExecution_Context", TExecution_Context_enum_ptrs, TExecution_Context_reloc_ptrs); |
59 | | |
60 | | static |
61 | 0 | ENUM_PTRS_BEGIN(TExecution_Context_enum_ptrs) return 0; |
62 | 0 | ENUM_PTR(0, TExecution_Context, current_face); |
63 | | /* ENUM_PTR(1, TExecution_Context, code); // local, no gc invocations */ |
64 | 0 | ENUM_PTR(1, TExecution_Context, FDefs); |
65 | 0 | ENUM_PTR(2, TExecution_Context, IDefs); |
66 | | /* ENUM_PTR(4, TExecution_Context, glyphIns); // Never used. */ |
67 | 0 | ENUM_PTR(3, TExecution_Context, callStack); |
68 | 0 | ENUM_PTR(4, TExecution_Context, codeRangeTable[0].Base); |
69 | 0 | ENUM_PTR(5, TExecution_Context, codeRangeTable[1].Base); |
70 | 0 | ENUM_PTR(6, TExecution_Context, codeRangeTable[2].Base); |
71 | 0 | ENUM_PTR(7, TExecution_Context, storage); |
72 | 0 | ENUM_PTR(8, TExecution_Context, stack); |
73 | | /* zp0, // local, no gc invocations */ |
74 | | /* zp1, // local, no gc invocations */ |
75 | | /* zp2, // local, no gc invocations */ |
76 | 0 | ENUM_PTR(9, TExecution_Context, pts.org_x); |
77 | 0 | ENUM_PTR(10, TExecution_Context, pts.org_y); |
78 | 0 | ENUM_PTR(11, TExecution_Context, pts.cur_x); |
79 | 0 | ENUM_PTR(12, TExecution_Context, pts.cur_y); |
80 | 0 | ENUM_PTR(13, TExecution_Context, pts.touch); |
81 | 0 | ENUM_PTR(14, TExecution_Context, pts.contours); |
82 | 0 | ENUM_PTR(15, TExecution_Context, twilight.org_x); |
83 | 0 | ENUM_PTR(16, TExecution_Context, twilight.org_y); |
84 | 0 | ENUM_PTR(17, TExecution_Context, twilight.cur_x); |
85 | 0 | ENUM_PTR(18, TExecution_Context, twilight.cur_y); |
86 | 0 | ENUM_PTR(19, TExecution_Context, twilight.touch); |
87 | 0 | ENUM_PTR(20, TExecution_Context, twilight.contours); |
88 | 0 | ENUM_PTR(21, TExecution_Context, cvt); |
89 | 0 | ENUM_PTR(22, TExecution_Context, memory); |
90 | 0 | ENUM_PTRS_END |
91 | | |
92 | 0 | static RELOC_PTRS_WITH(TExecution_Context_reloc_ptrs, TExecution_Context *mptr) |
93 | 0 | { |
94 | 0 | RELOC_PTR(TExecution_Context, current_face); |
95 | | /* RELOC_PTR(TExecution_Context, code); // local, no gc invocations */ |
96 | 0 | RELOC_PTR(TExecution_Context, FDefs); |
97 | 0 | RELOC_PTR(TExecution_Context, IDefs); |
98 | | /* RELOC_PTR(TExecution_Context, glyphIns); // Never used. */ |
99 | 0 | RELOC_PTR(TExecution_Context, callStack); |
100 | 0 | RELOC_PTR(TExecution_Context, codeRangeTable[0].Base); |
101 | 0 | RELOC_PTR(TExecution_Context, codeRangeTable[1].Base); |
102 | 0 | RELOC_PTR(TExecution_Context, codeRangeTable[2].Base); |
103 | 0 | RELOC_PTR(TExecution_Context, storage); |
104 | 0 | RELOC_PTR(TExecution_Context, stack); |
105 | | /* zp0, // local, no gc invocations */ |
106 | | /* zp1, // local, no gc invocations */ |
107 | | /* zp2, // local, no gc invocations */ |
108 | 0 | RELOC_PTR(TExecution_Context, pts.org_x); |
109 | 0 | RELOC_PTR(TExecution_Context, pts.org_y); |
110 | 0 | RELOC_PTR(TExecution_Context, pts.cur_x); |
111 | 0 | RELOC_PTR(TExecution_Context, pts.cur_y); |
112 | 0 | RELOC_PTR(TExecution_Context, pts.touch); |
113 | 0 | RELOC_PTR(TExecution_Context, pts.contours); |
114 | 0 | RELOC_PTR(TExecution_Context, twilight.org_x); |
115 | 0 | RELOC_PTR(TExecution_Context, twilight.org_y); |
116 | 0 | RELOC_PTR(TExecution_Context, twilight.cur_x); |
117 | 0 | RELOC_PTR(TExecution_Context, twilight.cur_y); |
118 | 0 | RELOC_PTR(TExecution_Context, twilight.touch); |
119 | 0 | RELOC_PTR(TExecution_Context, twilight.contours); |
120 | 0 | RELOC_PTR(TExecution_Context, cvt); |
121 | 0 | RELOC_PTR(TExecution_Context, memory); |
122 | 0 | DISCARD(mptr); |
123 | 0 | } |
124 | 0 | RELOC_PTRS_END |
125 | | |
126 | | gs_public_st_composite(st_ttfFont, ttfFont, |
127 | | "ttfFont", ttfFont_enum_ptrs, ttfFont_reloc_ptrs); |
128 | | |
129 | | static |
130 | 0 | ENUM_PTRS_BEGIN(ttfFont_enum_ptrs) return 0; |
131 | 0 | ENUM_PTR(0, ttfFont, face); |
132 | 0 | ENUM_PTR(1, ttfFont, inst); |
133 | 0 | ENUM_PTR(2, ttfFont, exec); |
134 | 0 | ENUM_PTR(3, ttfFont, tti); |
135 | 0 | ENUM_PTRS_END |
136 | | |
137 | 0 | static RELOC_PTRS_WITH(ttfFont_reloc_ptrs, ttfFont *mptr) |
138 | 0 | RELOC_PTR(ttfFont, face); |
139 | 0 | RELOC_PTR(ttfFont, inst); |
140 | 0 | RELOC_PTR(ttfFont, exec); |
141 | 0 | RELOC_PTR(ttfFont, tti); |
142 | 0 | DISCARD(mptr); |
143 | 0 | RELOC_PTRS_END |
144 | | |
145 | | gs_public_st_ptrs3(st_ttfInterpreter, ttfInterpreter, "ttfInterpreter", |
146 | | st_ttfInterpreter_enum_ptrs, st_ttfInterpreter_reloc_ptrs, |
147 | | exec, usage, ttf_memory); |