Lines Matching refs:rtdp
43 static char *soudef(char *cp, enum type type, struct tdesc **rtdp);
44 static void enumdef(char *cp, struct tdesc **rtdp);
55 static void tagdecl(char *cp, struct tdesc **rtdp, int h, char *w);
56 static char *tdefdecl(char *cp, int h, struct tdesc **rtdp);
57 static char *intrinsic(char *cp, struct tdesc **rtdp);
58 static char *arraydef(char *cp, struct tdesc **rtdp);
357 tagdecl(char *cp, struct tdesc **rtdp, int h, char *w) in tagdecl() argument
360 if ((*rtdp = lookup(h)) != NULL) { in tagdecl()
362 if ((*rtdp)->name != NULL && in tagdecl()
363 strcmp((*rtdp)->name, w) != 0) { in tagdecl()
369 tdp->data.tdesc = *rtdp; in tagdecl()
372 ((*rtdp)->name != NULL) ? in tagdecl()
373 (*rtdp)->name : "anon", h); in tagdecl()
374 } else if ((*rtdp)->name == NULL) { in tagdecl()
375 (*rtdp)->name = w; in tagdecl()
376 addhash(*rtdp, h); in tagdecl()
380 *rtdp = malloc(sizeof (**rtdp)); in tagdecl()
381 (*rtdp)->name = w; in tagdecl()
382 addhash(*rtdp, h); in tagdecl()
387 soudef(cp, STRUCT, rtdp); in tagdecl()
390 soudef(cp, UNION, rtdp); in tagdecl()
393 enumdef(cp, rtdp); in tagdecl()
402 tdefdecl(char *cp, int h, struct tdesc **rtdp) in tdefdecl() argument
420 cp = intrinsic(cp, rtdp); in tdefdecl()
426 cp = intrinsic(cp, rtdp); in tdefdecl()
434 cp = tdefdecl(cp, h2, rtdp); in tdefdecl()
437 ntdp->data.tdesc = *rtdp; in tdefdecl()
440 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
441 (*rtdp)->type = TYPEOF; in tdefdecl()
442 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
451 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
452 (*rtdp)->type = POINTER; in tdefdecl()
453 (*rtdp)->size = model->pointersize; in tdefdecl()
454 (*rtdp)->name = "pointer"; in tdefdecl()
455 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
459 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
460 (*rtdp)->type = FUNCTION; in tdefdecl()
461 (*rtdp)->size = model->pointersize; in tdefdecl()
462 (*rtdp)->name = "function"; in tdefdecl()
463 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
469 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
470 (*rtdp)->type = ARRAY; in tdefdecl()
471 (*rtdp)->name = "array"; in tdefdecl()
472 cp = arraydef(cp, rtdp); in tdefdecl()
479 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
480 (*rtdp)->type = FORWARD; in tdefdecl()
481 (*rtdp)->name = w; in tdefdecl()
485 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
486 (*rtdp)->type = VOLATILE; in tdefdecl()
487 (*rtdp)->size = 0; in tdefdecl()
488 (*rtdp)->name = "volatile"; in tdefdecl()
489 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
493 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
494 (*rtdp)->type = CONST; in tdefdecl()
495 (*rtdp)->size = 0; in tdefdecl()
496 (*rtdp)->name = "const"; in tdefdecl()
497 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
510 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
511 (*rtdp)->type = INTRINSIC; in tdefdecl()
512 (*rtdp)->name = "void"; in tdefdecl()
513 (*rtdp)->size = 0; in tdefdecl()
515 cp = tdefdecl(cp, h2, rtdp); in tdefdecl()
518 ntdp->data.tdesc = *rtdp; in tdefdecl()
522 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
523 (*rtdp)->type = TYPEOF; in tdefdecl()
524 (*rtdp)->data.tdesc = ntdp; in tdefdecl()
531 *rtdp = malloc(sizeof (**rtdp)); in tdefdecl()
532 (*rtdp)->name = NULL; in tdefdecl()
533 cp = soudef(cp, (type == 'u') ? UNION : STRUCT, rtdp); in tdefdecl()
542 intrinsic(char *cp, struct tdesc **rtdp) in intrinsic() argument
553 *rtdp = tdp; in intrinsic()
558 soudef(char *cp, enum type type, struct tdesc **rtdp) in soudef() argument
566 (*rtdp)->size = size; in soudef()
567 (*rtdp)->type = type; /* s or u */ in soudef()
579 (*rtdp)->name ? (*rtdp)->name : "(anonsou)", in soudef()
580 (*rtdp)->size); in soudef()
582 next_pp = &((*rtdp)->data.members.forw); /* head for forward linklist */ in soudef()
620 (*rtdp)->data.members.back = prev_p; /* head for backward linklist */ in soudef()
643 arraydef(char *cp, struct tdesc **rtdp) in arraydef() argument
652 (*rtdp)->data.ardef = malloc(sizeof (struct ardef)); in arraydef()
653 (*rtdp)->data.ardef->indices = malloc(sizeof (struct element)); in arraydef()
654 (*rtdp)->data.ardef->indices->index_type = lookup(h); in arraydef()
662 (*rtdp)->data.ardef->indices->range_start = start; in arraydef()
663 (*rtdp)->data.ardef->indices->range_end = end; in arraydef()
669 (*rtdp)->data.ardef->contents = tdp; in arraydef()
675 (*rtdp)->data.ardef->contents = tdp; in arraydef()
679 cp = tdefdecl(cp, h, &((*rtdp)->data.ardef->contents)); in arraydef()
684 enumdef(char *cp, struct tdesc **rtdp) in enumdef() argument
689 (*rtdp)->type = ENUM; in enumdef()
690 (*rtdp)->data.emem = NULL; in enumdef()
692 prev = &((*rtdp)->data.emem); in enumdef()
701 (*rtdp)->name ? (*rtdp)->name : "(anon enum)", in enumdef()