thandle opaque structs better - 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 df7993f9c93b0fc5f4292f50df8b0949614967b5
(DIR) parent 3d991901316747fa00d754b2e93f71a41adb9d33
(HTM) Author: rsc <devnull@localhost>
Date: Wed, 9 Jun 2004 14:55:34 +0000
handle opaque structs better
Diffstat:
M src/cmd/acidtypes/type.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
t@@ -315,6 +315,8 @@ nilstrcmp(char *a, char *b)
return strcmp(a, b);
}
+int careaboutaggrcount;
+
static int
typecmp(Type *t, Type *u)
{
t@@ -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)
t@@ -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++){