Lines Matching refs:tdp
53 static void addhash(struct tdesc *tdp, int num);
54 static void tagadd(char *w, int h, struct tdesc *tdp);
167 struct tdesc *tdp; in parseline() local
224 cp = tdefdecl(cp, h, &tdp); in parseline()
225 addhash(tdp, h); /* for *(x,y) types */ in parseline()
227 tdp = malloc(sizeof (*tdp)); in parseline()
228 tdp->type = TYPEOF; in parseline()
229 tdp->name = (w != NULL) ? strdup(w) : NULL; in parseline()
230 tdp->data.tdesc = ntdp; in parseline()
231 addhash(tdp, h); /* for *(x,y) types */ in parseline()
240 tagdecl(cp, &tdp, h, w); in parseline()
242 tdefdecl(cp, h, &tdp); in parseline()
243 tagadd(w, h, tdp); in parseline()
254 struct tdesc *tdp = hash_table[hash]; in lookup() local
256 while (tdp != NULL) { in lookup()
257 if (tdp->id == h) in lookup()
258 return (tdp); in lookup()
259 tdp = tdp->hash; in lookup()
338 tagadd(char *w, int h, struct tdesc *tdp) in tagadd() argument
342 tdp->name = w; in tagadd()
344 addhash(tdp, h); in tagadd()
345 else if (otdp != tdp) { in tagadd()
351 tdp->name ? tdp->name : "NULL", in tagadd()
352 tdp->type, tdp->id / 1000, tdp->id % 1000); in tagadd()
364 struct tdesc *tdp; in tagdecl() local
366 tdp = malloc(sizeof (*tdp)); in tagdecl()
367 tdp->name = strdup(w); in tagdecl()
368 tdp->type = TYPEOF; in tagdecl()
369 tdp->data.tdesc = *rtdp; in tagdecl()
370 addhash(tdp, h); /* for *(x,y) types */ in tagdecl()
544 struct tdesc *tdp; in intrinsic() local
548 tdp = malloc(sizeof (*tdp)); in intrinsic()
549 tdp->type = INTRINSIC; in intrinsic()
550 tdp->size = size; in intrinsic()
551 tdp->name = NULL; in intrinsic()
553 *rtdp = tdp; in intrinsic()
563 struct tdesc *tdp; in soudef() local
600 tdp = lookup(h); in soudef()
601 if (tdp == NULL) { /* not in hash list */ in soudef()
605 cp = tdefdecl(cp, h, &tdp); in soudef()
606 addhash(tdp, h); in soudef()
612 w ? w : "anon", h, tdp->name ? tdp->name : "anon"); in soudef()
615 mlp->fdesc = tdp; in soudef()
667 tdp = lookup(contents_type); in arraydef()
668 if (tdp != NULL) { in arraydef()
669 (*rtdp)->data.ardef->contents = tdp; in arraydef()
673 cp = tdefdecl(cp + 1, h, &tdp); in arraydef()
674 addhash(tdp, h); /* for *(x,y) types */ in arraydef()
675 (*rtdp)->data.ardef->contents = tdp; in arraydef()
715 addhash(struct tdesc *tdp, int num) in addhash() argument
727 tdp->id = num; in addhash()
728 tdp->hash = hash_table[hash]; in addhash()
729 hash_table[hash] = tdp; in addhash()
733 if (tdp->name != NULL) { in addhash()
734 ttdp = lookupname(tdp->name); in addhash()
736 hash = compute_sum(tdp->name); in addhash()
737 tdp->next = name_table[hash]; in addhash()
738 name_table[hash] = tdp; in addhash()
752 struct tdesc *tdp, *ttdp = NULL; in lookupname() local
754 for (tdp = name_table[hash]; tdp != NULL; tdp = tdp->next) { in lookupname()
755 if (tdp->name != NULL && strcmp(tdp->name, name) == 0) { in lookupname()
756 if (tdp->type == STRUCT || tdp->type == UNION || in lookupname()
757 tdp->type == ENUM || tdp->type == INTRINSIC) in lookupname()
758 return (tdp); in lookupname()
759 if (tdp->type == TYPEOF) in lookupname()
760 ttdp = tdp; in lookupname()