tsmall bug fixes - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f1ad497719e95974eb7a499b074ccf921ed0d731
(DIR) parent 1be1539ea802a63e508514d7431e9eaead0b0857
(HTM) Author: rsc <devnull@localhost>
Date: Sun, 23 May 2004 23:26:59 +0000
small bug fixes
Diffstat:
M src/cmd/acidtypes/type.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
t@@ -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;
t@@ -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;