|
@@ -7,7 +7,7 @@ static char *kwd[] =
|
|
"$local", "$loop", "$return", "$tail", "$then",
|
|
"$local", "$loop", "$return", "$tail", "$then",
|
|
"$union", "$whatis", "$while",
|
|
"$union", "$whatis", "$while",
|
|
};
|
|
};
|
|
-static char picklestr[] = "\tbp = pickle(bp, ep, un, ";
|
|
|
|
|
|
+static char picklestr[] = "\tpickle(s, un, ";
|
|
|
|
|
|
static char*
|
|
static char*
|
|
pmap(char *s)
|
|
pmap(char *s)
|
|
@@ -153,10 +153,10 @@ picklemember(Type *t, long off)
|
|
if(s1 == S)
|
|
if(s1 == S)
|
|
break;
|
|
break;
|
|
if(s == S) {
|
|
if(s == S) {
|
|
- Bprint(&outbuf, "\tbp = pickle_%s(bp, ep, un, (%s*)((char*)addr+%ld+_i*%ld));\n",
|
|
|
|
|
|
+ Bprint(&outbuf, "\tpickle_%s(s, un, (%s*)((char*)addr+%ld+_i*%ld));\n",
|
|
pmap(s1->name), pmap(s1->name), t->offset+off, t->width);
|
|
pmap(s1->name), pmap(s1->name), t->offset+off, t->width);
|
|
} else {
|
|
} else {
|
|
- Bprint(&outbuf, "\tbp = pickle_%s(bp, ep, un, &addr->%s);\n",
|
|
|
|
|
|
+ Bprint(&outbuf, "\tpickle_%s(s, un, &addr->%s);\n",
|
|
pmap(s1->name), pmap(s->name));
|
|
pmap(s1->name), pmap(s->name));
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
@@ -195,10 +195,10 @@ pickletype(Type *t)
|
|
goto asmstr;
|
|
goto asmstr;
|
|
an = pmap(s->name);
|
|
an = pmap(s->name);
|
|
|
|
|
|
- Bprint(&outbuf, "uchar*\npickle_%s(uchar *bp, uchar *ep, int un, %s *addr)\n{\n\tint _i = 0;\n\n\tUSED(_i);\n", an, an);
|
|
|
|
|
|
+ Bprint(&outbuf, "void\npickle_%s(void *s, int un, %s *addr)\n{\n\tint _i = 0;\n\n\tUSED(_i);\n", an, an);
|
|
for(l = t->link; l != T; l = l->down)
|
|
for(l = t->link; l != T; l = l->down)
|
|
picklemember(l, 0);
|
|
picklemember(l, 0);
|
|
- Bprint(&outbuf, "\treturn bp;\n}\n\n");
|
|
|
|
|
|
+ Bprint(&outbuf, "}\n\n");
|
|
break;
|
|
break;
|
|
asmstr:
|
|
asmstr:
|
|
if(s == S)
|
|
if(s == S)
|