From f1ad497719e95974eb7a499b074ccf921ed0d731 Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 May 2004 23:26:59 +0000 Subject: small bug fixes --- src/cmd/acidtypes/type.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3