aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/acidtypes
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-06-09 14:55:34 +0000
committerrsc <devnull@localhost>2004-06-09 14:55:34 +0000
commitdf7993f9c93b0fc5f4292f50df8b0949614967b5 (patch)
tree796453a1f973a978ec61fbfc9bb4605bcf23f874 /src/cmd/acidtypes
parent3d991901316747fa00d754b2e93f71a41adb9d33 (diff)
downloadplan9port-df7993f9c93b0fc5f4292f50df8b0949614967b5.tar.gz
plan9port-df7993f9c93b0fc5f4292f50df8b0949614967b5.tar.bz2
plan9port-df7993f9c93b0fc5f4292f50df8b0949614967b5.zip
handle opaque structs better
Diffstat (limited to 'src/cmd/acidtypes')
-rw-r--r--src/cmd/acidtypes/type.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 56dc33ed..309629de 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -315,6 +315,8 @@ nilstrcmp(char *a, char *b)
return strcmp(a, b);
}
+int careaboutaggrcount;
+
static int
typecmp(Type *t, Type *u)
{
@@ -343,7 +345,7 @@ typecmp(Type *t, Type *u)
if(i)
return i;
- if(t->ty == Aggr){
+ if(careaboutaggrcount && t->ty == Aggr){
if(t->n > u->n)
return -1;
if(t->n < u->n)
@@ -547,7 +549,9 @@ printtypes(Biobuf *b)
for(tl=alltypes; tl; tl=tl->tl)
all[n++] = tl->hd;
+ careaboutaggrcount = 1;
qsort(all, n, sizeof(all[0]), qtypecmp);
+ careaboutaggrcount = 0;
nn = 0;
for(i=0; i<n; i++){