Lines Matching defs:info
80 struct taginfo *info, *link;
86 info = tnf->tag_table[i];
87 while (info) {
89 link = info->link;
91 if (info->slotinfo)
92 free(info->slotinfo);
94 free(info);
96 info = link;
111 * Get info for supplied tag
117 struct taginfo *bucket, *info;
120 for (info = bucket; info; info = info->link)
121 if (info->tag == tag)
122 return (info); /* found it */
129 * Get info for supplied record
139 struct taginfo *info;
151 if ((info = tnf->tag_directory[index]) != NULL)
152 return (info);
154 info = _tnf_get_info(tnf, _tnf_get_tag(tnf, record));
156 return ((tnf->tag_directory[index] = info));
171 struct taginfo *info, *bucket;
175 info = (struct taginfo *)calloc(1, sizeof (struct taginfo));
178 info->tnf = tnf;
179 info->tag = tag;
180 info->name = _tnf_get_name(tnf, tag);
181 info->props = _tnf_get_props(tnf, tag);
182 info->kind = _tnf_get_kind(tnf, tag);
183 info->size = _tnf_get_storage_size(tnf, tag);
184 info->align = _tnf_get_align(tnf, tag);
189 info->link = bucket;
190 tnf->tag_table[hash] = info;
192 /* Ensure meta info is available */
194 info->meta = _tnf_get_info(tnf, meta);
197 * Initialize info
201 if (INFO_DERIVED(info))
202 return (init_derived_info(tnf, tag, info));
203 else if (INFO_STRUCT(info))
204 return (init_struct_info(tnf, tag, info));
205 else if (INFO_ARRAY(info))
206 return (init_array_info(tnf, tag, info));
207 else if (INFO_SCALAR(info))
208 return (init_scalar_info(tnf, tag, info));
210 return (init_abstract_info(tnf, tag, info));
215 * Initialize info for an abstract tag
220 init_abstract_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
222 if (INFO_SCALAR(info) || INFO_DERIVED(info) ||
223 INFO_STRUCT(info) || INFO_ARRAY(info))
225 if (info->size == (size_t)-1)
227 return (info);
231 * Initialize info for a derived tag
235 init_derived_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
239 if (!INFO_DERIVED(info))
244 info->base = _tnf_get_info(tnf, base_tag);
246 return (info);
250 * Initialize info for a scalar tag
255 init_scalar_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
257 if ((!INFO_SCALAR(info)) ||
258 (INFO_DERIVED(info) || INFO_ARRAY(info) || INFO_STRUCT(info)))
260 if (info->size == (size_t)-1)
265 return (info);
269 * Initialize info for a struct tag
273 init_struct_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
275 if ((!INFO_STRUCT(info)) ||
276 (INFO_DERIVED(info) || INFO_ARRAY(info) || INFO_SCALAR(info)))
278 if (info->size == (size_t)-1)
282 init_slots(tnf, tag, info);
284 return (info);
288 * Initialize info for an array tag
292 init_array_info(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
297 if ((!INFO_ARRAY(info)) ||
298 (INFO_DERIVED(info) || INFO_STRUCT(info) || INFO_SCALAR(info)))
302 defeat = (strcmp(info->name, TNF_N_ARRAY) == 0);
305 if (!(INFO_TAGGED(info) && (info->size == (size_t)-1)))
310 info->hdrsize = _tnf_get_header_size(tnf, tag);
312 if (info->hdrsize != sizeof (struct tnf_array_hdr))
317 init_slots(tnf, tag, info);
319 /* Get info for element type */
324 info->base = elt_tag ? _tnf_get_info(tnf, elt_tag): NULL;
326 return (info);
334 init_slots(TNF *tnf, tnf_ref32_t *tag, struct taginfo *info)
399 info->slotinfo = slotinfo;