| 791 | } |
| 792 | |
| 793 | static void declare_argtypes(bucket *bp) |
| 794 | { |
| 795 | char *tags[MAXARGS]; |
| 796 | int args = 0, c; |
| 797 | |
| 798 | if (bp->args >= 0) retyped_warning(bp->name); |
| 799 | cptr++; /* skip open paren */ |
| 800 | for (;;) { |
| 801 | c = nextc(); |
| 802 | if (c == EOF) unexpected_EOF(); |
| 803 | if (c != '<') syntax_error(lineno, line, cptr); |
| 804 | tags[args++] = get_tag(); |
| 805 | c = nextc(); |
| 806 | if (c == ')') break; |
| 807 | if (c == EOF) unexpected_EOF(); } |
| 808 | cptr++; /* skip close paren */ |
| 809 | bp->args = args; |
| 810 | if (!(bp->argnames = NEW2(args, char *))) no_space(); |
| 811 | if (!(bp->argtags = NEW2(args, char *))) no_space(); |
| 812 | while (--args >= 0) { |
| 813 | bp->argtags[args] = tags[args]; |
| 814 | bp->argnames[args] = 0; } |
| 815 | } |
| 816 | |
| 817 | void declare_types() |
| 818 | { |
no test coverage detected