plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit f1ad497719e95974eb7a499b074ccf921ed0d731
parent 1be1539ea802a63e508514d7431e9eaead0b0857
Author: rsc <devnull@localhost>
Date:   Sun, 23 May 2004 23:26:59 +0000

small bug fixes

Diffstat:
Msrc/cmd/acidtypes/type.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git 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;