aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acidtypes
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/acidtypes')
-rw-r--r--src/cmd/acidtypes/type.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 5449077a..56dc33ed 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -343,6 +343,13 @@ typecmp(Type *t, Type *u)
if(i)
return i;
+ if(t->ty == Aggr){
+ if(t->n > u->n)
+ return -1;
+ if(t->n < u->n)
+ return 1;
+ }
+
if(t->name || t->suename)
return 0;
@@ -445,7 +452,7 @@ ttt=ttt->sub;
case Pointer:
ttt = defer(tt->sub);
if(ttt && ttt->ty == Aggr)
- Bprint(b, "\tprint(indent, \"%s\t%s(\", addr.%s, \")\\n\");\n",
+ Bprint(b, "\tprint(indent, \"%s\t(%s)\", addr.%s, \"\\n\");\n",
name, nameof(ttt, 1), name);
else
goto base;