part 2; missing files
R=ken
OCL=28408
CL=28410
listcount(Node *n)
{
int v;
+ Iter s;
v = 0;
- while(n != N) {
+ for(n = listfirst(&s, &n); n != N; n = listnext(&s))
+ v++;
+ return v;
+}
+
+int
+structcount(Type *t)
+{
+ int v;
+ Iter s;
+
+ v = 0;
+ for(t = structfirst(&s, &t); t != T; t = structnext(&s))
v++;
- if(n->op != OLIST)
- break;
- n = n->right;
- }
return v;
}
void defaultlit(Node*, Type*);
void defaultlit2(Node*, Node*);
int listcount(Node*);
+int structcount(Type*);
void addmethod(Node*, Type*, int);
Node* methodname(Node*, Type*);
Sym* methodsym(Sym*, Type*);