Lines Matching +full:is +full:- +full:decoded +full:- +full:cs

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
31 * Code cleanup, bug-fix and extension
32 * by Tatsumi Hosokawa <hosokawa@mt.cs.keio.ac.jp>
118 * free_cis - delete cis entry.
127 tlist = tl->next; in freecis()
128 while ((tp = tl->tuples) != 0) { in freecis()
129 tl->tuples = tp->next; in freecis()
130 free(tp->data); in freecis()
175 * The processing of tuples is as follows:
176 * - Read tuples at attribute memory, offset 0.
177 * - If a CIS_END is the first tuple, look for
180 * - If a long link tuple was encountered, execute the long
182 * - If a no-link tuple was seen, terminate processing.
183 * - If no no-link tuple exists, and no long link tuple
186 * - If a long link tuple is found in any list, then process
187 * it. Only one link is allowed per list.
211 if (tp == NULL || tp->length != 4) in read_tuples()
214 offs = (uint32_t)tpl32(tp->data); in read_tuples()
224 last_tl->next = tl; in read_tuples()
239 tlist->next = read_one_tuplelist(fd, 0, 0); in read_tuples()
257 for (tl = tlist; tl; tl = tl->next) in read_one_tuplelist()
258 if (tl->offs == offs && tl->flags == (flags & MDF_ATTR)) in read_one_tuplelist()
261 tl->offs = offs; in read_one_tuplelist()
262 tl->flags = flags & MDF_ATTR; in read_one_tuplelist()
276 tp->code = code; in read_one_tuplelist()
289 * A length of 255 is invalid, all others are valid. Treat a in read_one_tuplelist()
292 * end of the CIS eventually sees an area that's not decoded and in read_one_tuplelist()
303 * or the length is illegal. in read_one_tuplelist()
306 if (tinfo == NULL || (tinfo->length != LENGTH_ANY && tinfo->length > length)) { in read_one_tuplelist()
310 tp->length = length; in read_one_tuplelist()
313 tp->data = xmalloc(length); in read_one_tuplelist()
314 if (read(fd, tp->data, length) != length) in read_one_tuplelist()
319 last_tp->next = tp; in read_one_tuplelist()
320 if (tl->tuples == NULL) { in read_one_tuplelist()
321 tl->tuples = tp; in read_one_tuplelist()
322 tp->next = NULL; in read_one_tuplelist()
355 * find_tuple_in_list - find a tuple within a
363 for (tp = tl->tuples; tp; tp = tp->next) in find_tuple_in_list()
364 if (tp->code == code) in find_tuple_in_list()
377 for (tp = tuple_info; tp->name; tp++) in get_tuple_info()
378 if (tp->code == code) in get_tuple_info()
390 return (tp->name); in tuple_name()