• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /* ---- includes ----------------------------------------------------------- */
18 
19 #include "b_BasicEm/Functions.h"
20 #include "b_BitFeatureEm/Feature.h"
21 
22 #include "b_BitFeatureEm/Sequence.h"
23 #include "b_BitFeatureEm/I04Dns2x2Ftr.h"
24 #include "b_BitFeatureEm/I04Tld2x4Ftr.h"
25 #include "b_BitFeatureEm/I04Dns2x4Ftr.h"
26 #include "b_BitFeatureEm/L01Tld2x4Ftr.h"
27 #include "b_BitFeatureEm/L01Dns2x4Ftr.h"
28 #include "b_BitFeatureEm/L04Dns2x4Ftr.h"
29 #include "b_BitFeatureEm/L04Dns3x3Ftr.h"
30 #include "b_BitFeatureEm/L06Dns3x3Ftr.h"
31 #include "b_BitFeatureEm/L06Dns4x4Ftr.h"
32 #include "b_BitFeatureEm/L06DnsNx4x4Ftr.h"
33 #include "b_BitFeatureEm/L01Tld1x1Ftr.h"
34 #include "b_BitFeatureEm/L04Tld2x4Ftr.h"
35 #include "b_BitFeatureEm/L04Dns2x2Ftr.h"
36 
37 /* ------------------------------------------------------------------------- */
38 
39 /* ========================================================================= */
40 /*                                                                           */
41 /* ---- \ghd{ auxiliary functions } ---------------------------------------- */
42 /*                                                                           */
43 /* ========================================================================= */
44 
45 /* ------------------------------------------------------------------------- */
46 
47 /* ========================================================================= */
48 /*                                                                           */
49 /* ---- \ghd{ constructor / destructor } ----------------------------------- */
50 /*                                                                           */
51 /* ========================================================================= */
52 
53 /* ------------------------------------------------------------------------- */
54 
bbf_Feature_init(struct bbs_Context * cpA,struct bbf_Feature * ptrA)55 void bbf_Feature_init( struct bbs_Context* cpA,
56 					   struct bbf_Feature* ptrA )
57 {
58 	ptrA->typeE = 0;
59 	ptrA->patchWidthE = 0;
60 	ptrA->patchHeightE = 0;
61 	ptrA->vpActivityE = NULL;
62 }
63 
64 /* ------------------------------------------------------------------------- */
65 
bbf_Feature_exit(struct bbs_Context * cpA,struct bbf_Feature * ptrA)66 void bbf_Feature_exit( struct bbs_Context* cpA,
67 					   struct bbf_Feature* ptrA )
68 {
69 	ptrA->typeE = 0;
70 	ptrA->patchWidthE = 0;
71 	ptrA->patchHeightE = 0;
72 	ptrA->vpActivityE = NULL;
73 }
74 
75 /* ------------------------------------------------------------------------- */
76 
77 /* ========================================================================= */
78 /*                                                                           */
79 /* ---- \ghd{ operators } -------------------------------------------------- */
80 /*                                                                           */
81 /* ========================================================================= */
82 
83 /* ------------------------------------------------------------------------- */
84 
bbf_Feature_copy(struct bbs_Context * cpA,struct bbf_Feature * ptrA,const struct bbf_Feature * srcPtrA)85 void bbf_Feature_copy( struct bbs_Context* cpA,
86 					   struct bbf_Feature* ptrA,
87 					   const struct bbf_Feature* srcPtrA )
88 {
89 	ptrA->typeE			= srcPtrA->typeE;
90 	ptrA->patchWidthE	= srcPtrA->patchWidthE;
91 	ptrA->patchHeightE	= srcPtrA->patchHeightE;
92 	ptrA->vpActivityE	= srcPtrA->vpActivityE;
93 }
94 
95 /* ------------------------------------------------------------------------- */
96 
bbf_Feature_equal(struct bbs_Context * cpA,const struct bbf_Feature * ptrA,const struct bbf_Feature * srcPtrA)97 flag bbf_Feature_equal( struct bbs_Context* cpA,
98 					    const struct bbf_Feature* ptrA,
99 						const struct bbf_Feature* srcPtrA )
100 {
101 
102 	if( ptrA->typeE			!= srcPtrA->typeE ) return FALSE;
103 	if( ptrA->patchWidthE	!= srcPtrA->patchWidthE ) return FALSE;
104 	if( ptrA->patchHeightE	!= srcPtrA->patchHeightE ) return FALSE;
105 	if( ptrA->vpActivityE	!= srcPtrA->vpActivityE ) return FALSE;
106 	return TRUE;
107 }
108 
109 /* ------------------------------------------------------------------------- */
110 
111 /* ========================================================================= */
112 /*                                                                           */
113 /* ---- \ghd{ query functions } -------------------------------------------- */
114 /*                                                                           */
115 /* ========================================================================= */
116 
117 /* ------------------------------------------------------------------------- */
118 
119 /* ========================================================================= */
120 /*                                                                           */
121 /* ---- \ghd{ modify functions } ------------------------------------------- */
122 /*                                                                           */
123 /* ========================================================================= */
124 
125 /* ------------------------------------------------------------------------- */
126 
127 /* ========================================================================= */
128 /*                                                                           */
129 /* ---- \ghd{ I/O } -------------------------------------------------------- */
130 /*                                                                           */
131 /* ========================================================================= */
132 
133 /* ------------------------------------------------------------------------- */
134 
bbf_Feature_memSize(struct bbs_Context * cpA,const struct bbf_Feature * ptrA)135 uint32 bbf_Feature_memSize( struct bbs_Context* cpA,
136 						    const struct bbf_Feature* ptrA )
137 {
138 	uint32 memSizeL = 0;
139 	memSizeL += bbs_SIZEOF16( ptrA->typeE );
140 	memSizeL += bbs_SIZEOF16( ptrA->patchWidthE );
141 	memSizeL += bbs_SIZEOF16( ptrA->patchHeightE );
142 	return memSizeL;
143 }
144 
145 /* ------------------------------------------------------------------------- */
146 
bbf_Feature_memWrite(struct bbs_Context * cpA,const struct bbf_Feature * ptrA,uint16 * memPtrA)147 uint32 bbf_Feature_memWrite( struct bbs_Context* cpA,
148 							 const struct bbf_Feature* ptrA,
149 							 uint16* memPtrA )
150 {
151 	uint32 memSizeL = bbf_Feature_memSize( cpA, ptrA );
152 	memPtrA += bbs_memWrite32( &ptrA->typeE, memPtrA );
153 	memPtrA += bbs_memWrite32( &ptrA->patchWidthE, memPtrA );
154 	memPtrA += bbs_memWrite32( &ptrA->patchHeightE, memPtrA );
155 	return memSizeL;
156 }
157 
158 /* ------------------------------------------------------------------------- */
159 
bbf_Feature_memRead(struct bbs_Context * cpA,struct bbf_Feature * ptrA,const uint16 * memPtrA)160 uint32 bbf_Feature_memRead( struct bbs_Context* cpA,
161 						    struct bbf_Feature* ptrA,
162 							const uint16* memPtrA )
163 {
164 	if( bbs_Context_error( cpA ) ) return 0;
165 	memPtrA += bbs_memRead32( &ptrA->typeE, memPtrA );
166 	memPtrA += bbs_memRead32( &ptrA->patchWidthE, memPtrA );
167 	memPtrA += bbs_memRead32( &ptrA->patchHeightE, memPtrA );
168 	return bbf_Feature_memSize( cpA, ptrA );
169 }
170 
171 /* ------------------------------------------------------------------------- */
172 
173 /* ========================================================================= */
174 /*                                                                           */
175 /* ---- \ghd{ exec functions } --------------------------------------------- */
176 /*                                                                           */
177 /* ========================================================================= */
178 
179 /* ------------------------------------------------------------------------- */
180 
bbf_featureInit(struct bbs_Context * cpA,struct bbf_Feature * ptrA,enum bbf_FeatureType typeA)181 void bbf_featureInit( struct bbs_Context* cpA,
182 					  struct bbf_Feature* ptrA,
183 					  enum bbf_FeatureType typeA )
184 {
185 	switch( typeA )
186 	{
187 		case bbf_FT_SEQUENCE:		    bbf_Sequence_init( cpA, ( struct bbf_Sequence* )ptrA ); return;
188 		case bbf_FT_I04_DNS_2X2_FTR:    bbf_I04Dns2x2Ftr_init( cpA, ( struct bbf_I04Dns2x2Ftr* )ptrA ); return;
189 		case bbf_FT_I04_TLD_2X4_FTR:    bbf_I04Tld2x4Ftr_init( cpA, ( struct bbf_I04Tld2x4Ftr* )ptrA ); return;
190 		case bbf_FT_I04_DNS_2X4_FTR:    bbf_I04Dns2x4Ftr_init( cpA, ( struct bbf_I04Dns2x4Ftr* )ptrA ); return;
191 		case bbf_FT_L01_TLD_2X4_FTR:    bbf_L01Tld2x4Ftr_init( cpA, ( struct bbf_L01Tld2x4Ftr* )ptrA ); return;
192 		case bbf_FT_L01_DNS_2X4_FTR:    bbf_L01Dns2x4Ftr_init( cpA, ( struct bbf_L01Dns2x4Ftr* )ptrA ); return;
193 		case bbf_FT_L04_DNS_2X4_FTR:    bbf_L04Dns2x4Ftr_init( cpA, ( struct bbf_L04Dns2x4Ftr* )ptrA ); return;
194 		case bbf_FT_L04_DNS_3X3_FTR:    bbf_L04Dns3x3Ftr_init( cpA, ( struct bbf_L04Dns3x3Ftr* )ptrA ); return;
195 		case bbf_FT_L06_DNS_3X3_FTR:    bbf_L06Dns3x3Ftr_init( cpA, ( struct bbf_L06Dns3x3Ftr* )ptrA ); return;
196 		case bbf_FT_L06_DNS_4X4_FTR:    bbf_L06Dns4x4Ftr_init( cpA, ( struct bbf_L06Dns4x4Ftr* )ptrA ); return;
197 		case bbf_FT_L06_DNS_NX4X4_FTR:  bbf_L06DnsNx4x4Ftr_init( cpA, ( struct bbf_L06DnsNx4x4Ftr* )ptrA ); return;
198 		case bbf_FT_L01_TLD_1X1_FTR:    bbf_L01Tld1x1Ftr_init( cpA, ( struct bbf_L01Tld1x1Ftr* )ptrA ); return;
199 		case bbf_FT_L04_TLD_2X4_FTR:    bbf_L04Tld2x4Ftr_init( cpA, ( struct bbf_L04Tld2x4Ftr* )ptrA ); return;
200 		case bbf_FT_L04_DNS_2X2_FTR:    bbf_L04Dns2x2Ftr_init( cpA, ( struct bbf_L04Dns2x2Ftr* )ptrA ); return;
201 
202 		default: bbs_ERROR0( "bbf_featureInit: invalid type" );
203 	}
204 }
205 
206 /* ------------------------------------------------------------------------- */
207 
bbf_featureExit(struct bbs_Context * cpA,struct bbf_Feature * ptrA)208 void bbf_featureExit( struct bbs_Context* cpA,
209 					  struct bbf_Feature* ptrA )
210 {
211 	switch( ptrA->typeE )
212 	{
213 		case bbf_FT_SEQUENCE:		   bbf_Sequence_exit( cpA, ( struct bbf_Sequence* )ptrA ); return;
214 		case bbf_FT_I04_DNS_2X2_FTR:   bbf_I04Dns2x2Ftr_exit( cpA, ( struct bbf_I04Dns2x2Ftr* )ptrA ); return;
215 		case bbf_FT_I04_TLD_2X4_FTR:   bbf_I04Tld2x4Ftr_exit( cpA, ( struct bbf_I04Tld2x4Ftr* )ptrA ); return;
216 		case bbf_FT_I04_DNS_2X4_FTR:   bbf_I04Dns2x4Ftr_exit( cpA, ( struct bbf_I04Dns2x4Ftr* )ptrA ); return;
217 		case bbf_FT_L01_TLD_2X4_FTR:   bbf_L01Tld2x4Ftr_exit( cpA, ( struct bbf_L01Tld2x4Ftr* )ptrA ); return;
218 		case bbf_FT_L01_DNS_2X4_FTR:   bbf_L01Dns2x4Ftr_exit( cpA, ( struct bbf_L01Dns2x4Ftr* )ptrA ); return;
219 		case bbf_FT_L04_DNS_2X4_FTR:   bbf_L04Dns2x4Ftr_exit( cpA, ( struct bbf_L04Dns2x4Ftr* )ptrA ); return;
220 		case bbf_FT_L04_DNS_3X3_FTR:   bbf_L04Dns3x3Ftr_exit( cpA, ( struct bbf_L04Dns3x3Ftr* )ptrA ); return;
221 		case bbf_FT_L06_DNS_3X3_FTR:   bbf_L06Dns3x3Ftr_exit( cpA, ( struct bbf_L06Dns3x3Ftr* )ptrA ); return;
222 		case bbf_FT_L06_DNS_4X4_FTR:   bbf_L06Dns4x4Ftr_exit( cpA, ( struct bbf_L06Dns4x4Ftr* )ptrA ); return;
223 		case bbf_FT_L06_DNS_NX4X4_FTR: bbf_L06DnsNx4x4Ftr_exit( cpA, ( struct bbf_L06DnsNx4x4Ftr* )ptrA ); return;
224 		case bbf_FT_L01_TLD_1X1_FTR:   bbf_L01Tld1x1Ftr_exit( cpA, ( struct bbf_L01Tld1x1Ftr* )ptrA ); return;
225 		case bbf_FT_L04_TLD_2X4_FTR:   bbf_L04Tld2x4Ftr_exit( cpA, ( struct bbf_L04Tld2x4Ftr* )ptrA ); return;
226 		case bbf_FT_L04_DNS_2X2_FTR:   bbf_L04Dns2x2Ftr_exit( cpA, ( struct bbf_L04Dns2x2Ftr* )ptrA ); return;
227 		default: bbs_ERROR0( "bbf_featureExit: invalid type" );
228 	}
229 }
230 
231 /* ------------------------------------------------------------------------- */
232 
bbf_featureMemSize(struct bbs_Context * cpA,const struct bbf_Feature * ptrA)233 uint32 bbf_featureMemSize( struct bbs_Context* cpA,
234 						   const struct bbf_Feature* ptrA )
235 {
236 	switch( ptrA->typeE )
237 	{
238 		case bbf_FT_SEQUENCE:		   return bbf_Sequence_memSize( cpA, ( struct bbf_Sequence* )ptrA );
239 		case bbf_FT_I04_DNS_2X2_FTR:   return bbf_I04Dns2x2Ftr_memSize( cpA, ( struct bbf_I04Dns2x2Ftr* )ptrA );
240 		case bbf_FT_I04_TLD_2X4_FTR:   return bbf_I04Tld2x4Ftr_memSize( cpA, ( struct bbf_I04Tld2x4Ftr* )ptrA );
241 		case bbf_FT_I04_DNS_2X4_FTR:   return bbf_I04Dns2x4Ftr_memSize( cpA, ( struct bbf_I04Dns2x4Ftr* )ptrA );
242 		case bbf_FT_L01_TLD_2X4_FTR:   return bbf_L01Tld2x4Ftr_memSize( cpA, ( struct bbf_L01Tld2x4Ftr* )ptrA );
243 		case bbf_FT_L01_DNS_2X4_FTR:   return bbf_L01Dns2x4Ftr_memSize( cpA, ( struct bbf_L01Dns2x4Ftr* )ptrA );
244 		case bbf_FT_L04_DNS_2X4_FTR:   return bbf_L04Dns2x4Ftr_memSize( cpA, ( struct bbf_L04Dns2x4Ftr* )ptrA );
245 		case bbf_FT_L04_DNS_3X3_FTR:   return bbf_L04Dns3x3Ftr_memSize( cpA, ( struct bbf_L04Dns3x3Ftr* )ptrA );
246 		case bbf_FT_L06_DNS_3X3_FTR:   return bbf_L06Dns3x3Ftr_memSize( cpA, ( struct bbf_L06Dns3x3Ftr* )ptrA );
247 		case bbf_FT_L06_DNS_4X4_FTR:   return bbf_L06Dns4x4Ftr_memSize( cpA, ( struct bbf_L06Dns4x4Ftr* )ptrA );
248 		case bbf_FT_L06_DNS_NX4X4_FTR: return bbf_L06DnsNx4x4Ftr_memSize( cpA, ( struct bbf_L06DnsNx4x4Ftr* )ptrA );
249 		case bbf_FT_L01_TLD_1X1_FTR:   return bbf_L01Tld1x1Ftr_memSize( cpA, ( struct bbf_L01Tld1x1Ftr* )ptrA );
250 		case bbf_FT_L04_TLD_2X4_FTR:   return bbf_L04Tld2x4Ftr_memSize( cpA, ( struct bbf_L04Tld2x4Ftr* )ptrA );
251 		case bbf_FT_L04_DNS_2X2_FTR:   return bbf_L04Dns2x2Ftr_memSize( cpA, ( struct bbf_L04Dns2x2Ftr* )ptrA );
252 		default: bbs_ERROR0( "bbf_featureExit: invalid type" );
253 	}
254 	return 0;
255 }
256 
257 /* ------------------------------------------------------------------------- */
258 
bbf_featureMemWrite(struct bbs_Context * cpA,const struct bbf_Feature * ptrA,uint16 * memPtrA)259 uint32 bbf_featureMemWrite( struct bbs_Context* cpA,
260 						    const struct bbf_Feature* ptrA, uint16* memPtrA )
261 {
262 	switch( ptrA->typeE )
263 	{
264 		case bbf_FT_SEQUENCE:		   return bbf_Sequence_memWrite( cpA, ( struct bbf_Sequence* )ptrA, memPtrA  );
265 		case bbf_FT_I04_DNS_2X2_FTR:   return bbf_I04Dns2x2Ftr_memWrite( cpA, ( struct bbf_I04Dns2x2Ftr* )ptrA, memPtrA );
266 		case bbf_FT_I04_TLD_2X4_FTR:   return bbf_I04Tld2x4Ftr_memWrite( cpA, ( struct bbf_I04Tld2x4Ftr* )ptrA, memPtrA );
267 		case bbf_FT_I04_DNS_2X4_FTR:   return bbf_I04Dns2x4Ftr_memWrite( cpA, ( struct bbf_I04Dns2x4Ftr* )ptrA, memPtrA );
268 		case bbf_FT_L01_TLD_2X4_FTR:   return bbf_L01Tld2x4Ftr_memWrite( cpA, ( struct bbf_L01Tld2x4Ftr* )ptrA, memPtrA );
269 		case bbf_FT_L01_DNS_2X4_FTR:   return bbf_L01Dns2x4Ftr_memWrite( cpA, ( struct bbf_L01Dns2x4Ftr* )ptrA, memPtrA );
270 		case bbf_FT_L04_DNS_2X4_FTR:   return bbf_L04Dns2x4Ftr_memWrite( cpA, ( struct bbf_L04Dns2x4Ftr* )ptrA, memPtrA );
271 		case bbf_FT_L04_DNS_3X3_FTR:   return bbf_L04Dns3x3Ftr_memWrite( cpA, ( struct bbf_L04Dns3x3Ftr* )ptrA, memPtrA );
272 		case bbf_FT_L06_DNS_3X3_FTR:   return bbf_L06Dns3x3Ftr_memWrite( cpA, ( struct bbf_L06Dns3x3Ftr* )ptrA, memPtrA );
273 		case bbf_FT_L06_DNS_4X4_FTR:   return bbf_L06Dns4x4Ftr_memWrite( cpA, ( struct bbf_L06Dns4x4Ftr* )ptrA, memPtrA );
274 		case bbf_FT_L06_DNS_NX4X4_FTR: return bbf_L06DnsNx4x4Ftr_memWrite( cpA, ( struct bbf_L06DnsNx4x4Ftr* )ptrA, memPtrA );
275 		case bbf_FT_L01_TLD_1X1_FTR:   return bbf_L01Tld1x1Ftr_memWrite( cpA, ( struct bbf_L01Tld1x1Ftr* )ptrA, memPtrA );
276 		case bbf_FT_L04_TLD_2X4_FTR:   return bbf_L04Tld2x4Ftr_memWrite( cpA, ( struct bbf_L04Tld2x4Ftr* )ptrA, memPtrA );
277 		case bbf_FT_L04_DNS_2X2_FTR:   return bbf_L04Dns2x2Ftr_memWrite( cpA, ( struct bbf_L04Dns2x2Ftr* )ptrA, memPtrA );
278 		default: bbs_ERROR0( "bbf_featureMemWrite: invalid type" );
279 	}
280 	return 0;
281 }
282 
283 /* ------------------------------------------------------------------------- */
284 
bbf_featureMemRead(struct bbs_Context * cpA,struct bbf_Feature * ptrA,const uint16 * memPtrA,struct bbs_MemTbl * mtpA)285 uint32 bbf_featureMemRead( struct bbs_Context* cpA,
286 						   struct bbf_Feature* ptrA,
287 						   const uint16* memPtrA,
288 						   struct bbs_MemTbl* mtpA )
289 {
290 	switch( ptrA->typeE )
291 	{
292 		case bbf_FT_SEQUENCE:		   return bbf_Sequence_memRead( cpA, ( struct bbf_Sequence* )ptrA, memPtrA, mtpA );
293 		case bbf_FT_I04_DNS_2X2_FTR:   return bbf_I04Dns2x2Ftr_memRead( cpA, ( struct bbf_I04Dns2x2Ftr* )ptrA, memPtrA, mtpA );
294 		case bbf_FT_I04_TLD_2X4_FTR:   return bbf_I04Tld2x4Ftr_memRead( cpA, ( struct bbf_I04Tld2x4Ftr* )ptrA, memPtrA, mtpA );
295 		case bbf_FT_I04_DNS_2X4_FTR:   return bbf_I04Dns2x4Ftr_memRead( cpA, ( struct bbf_I04Dns2x4Ftr* )ptrA, memPtrA, mtpA );
296 		case bbf_FT_L01_TLD_2X4_FTR:   return bbf_L01Tld2x4Ftr_memRead( cpA, ( struct bbf_L01Tld2x4Ftr* )ptrA, memPtrA, mtpA );
297 		case bbf_FT_L01_DNS_2X4_FTR:   return bbf_L01Dns2x4Ftr_memRead( cpA, ( struct bbf_L01Dns2x4Ftr* )ptrA, memPtrA, mtpA );
298 		case bbf_FT_L04_DNS_2X4_FTR:   return bbf_L04Dns2x4Ftr_memRead( cpA, ( struct bbf_L04Dns2x4Ftr* )ptrA, memPtrA, mtpA );
299 		case bbf_FT_L04_DNS_3X3_FTR:   return bbf_L04Dns3x3Ftr_memRead( cpA, ( struct bbf_L04Dns3x3Ftr* )ptrA, memPtrA, mtpA );
300 		case bbf_FT_L06_DNS_3X3_FTR:   return bbf_L06Dns3x3Ftr_memRead( cpA, ( struct bbf_L06Dns3x3Ftr* )ptrA, memPtrA, mtpA );
301 		case bbf_FT_L06_DNS_4X4_FTR:   return bbf_L06Dns4x4Ftr_memRead( cpA, ( struct bbf_L06Dns4x4Ftr* )ptrA, memPtrA, mtpA );
302 		case bbf_FT_L06_DNS_NX4X4_FTR: return bbf_L06DnsNx4x4Ftr_memRead( cpA, ( struct bbf_L06DnsNx4x4Ftr* )ptrA, memPtrA, mtpA );
303 		case bbf_FT_L01_TLD_1X1_FTR:   return bbf_L01Tld1x1Ftr_memRead( cpA, ( struct bbf_L01Tld1x1Ftr* )ptrA, memPtrA, mtpA );
304 		case bbf_FT_L04_TLD_2X4_FTR:   return bbf_L04Tld2x4Ftr_memRead( cpA, ( struct bbf_L04Tld2x4Ftr* )ptrA, memPtrA, mtpA );
305 		case bbf_FT_L04_DNS_2X2_FTR:   return bbf_L04Dns2x2Ftr_memRead( cpA, ( struct bbf_L04Dns2x2Ftr* )ptrA, memPtrA, mtpA );
306 		default: bbs_ERROR0( "bbf_featureMemRead: invalid type" );
307 	}
308 	return 0;
309 }
310 
311 /* ------------------------------------------------------------------------- */
312 
bbf_featureSizeOf16(struct bbs_Context * cpA,enum bbf_FeatureType typeA)313 uint32 bbf_featureSizeOf16( struct bbs_Context* cpA, enum bbf_FeatureType typeA )
314 {
315 	switch( typeA )
316 	{
317 		case bbf_FT_SEQUENCE:		   return bbs_SIZEOF16( struct bbf_Sequence );
318 		case bbf_FT_I04_DNS_2X2_FTR:   return bbs_SIZEOF16( struct bbf_I04Dns2x2Ftr );
319 		case bbf_FT_I04_TLD_2X4_FTR:   return bbs_SIZEOF16( struct bbf_I04Tld2x4Ftr );
320 		case bbf_FT_I04_DNS_2X4_FTR:   return bbs_SIZEOF16( struct bbf_I04Dns2x4Ftr );
321 		case bbf_FT_L01_TLD_2X4_FTR:   return bbs_SIZEOF16( struct bbf_L01Tld2x4Ftr );
322 		case bbf_FT_L01_DNS_2X4_FTR:   return bbs_SIZEOF16( struct bbf_L01Dns2x4Ftr );
323 		case bbf_FT_L04_DNS_2X4_FTR:   return bbs_SIZEOF16( struct bbf_L04Dns2x4Ftr );
324 		case bbf_FT_L04_DNS_3X3_FTR:   return bbs_SIZEOF16( struct bbf_L04Dns3x3Ftr );
325 		case bbf_FT_L06_DNS_3X3_FTR:   return bbs_SIZEOF16( struct bbf_L06Dns3x3Ftr );
326 		case bbf_FT_L06_DNS_4X4_FTR:   return bbs_SIZEOF16( struct bbf_L06Dns4x4Ftr );
327 		case bbf_FT_L06_DNS_NX4X4_FTR: return bbs_SIZEOF16( struct bbf_L06DnsNx4x4Ftr );
328 		case bbf_FT_L01_TLD_1X1_FTR:   return bbs_SIZEOF16( struct bbf_L01Tld1x1Ftr );
329 		case bbf_FT_L04_TLD_2X4_FTR:   return bbs_SIZEOF16( struct bbf_L04Tld2x4Ftr );
330 		case bbf_FT_L04_DNS_2X2_FTR:   return bbs_SIZEOF16( struct bbf_L04Dns2x2Ftr );
331 		default: bbs_ERROR0( "bbf_featureSizeOf16: invalid type" );
332 	}
333 	return 0;
334 }
335 
336 /* ------------------------------------------------------------------------- */
337 
338 /* ========================================================================= */
339 
340