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