Lines Matching defs:ds
30 static void dttstat(Dtstat_t* ds, Dtlink_t* root, int depth, int* level)
32 static void dttstat(ds,root,depth,level)
33 Dtstat_t* ds;
40 dttstat(ds,root->left,depth+1,level);
42 dttstat(ds,root->right,depth+1,level);
43 if(depth > ds->dt_n)
44 ds->dt_n = depth;
50 static void dthstat(reg Dtdata_t* data, Dtstat_t* ds, reg int* count)
52 static void dthstat(data, ds, count)
54 Dtstat_t* ds;
68 { ds->dt_n += 1;
69 if(n > ds->dt_max)
70 ds->dt_max = n;
76 int dtstat(reg Dt_t* dt, Dtstat_t* ds, int all)
78 int dtstat(dt, ds, all)
80 Dtstat_t* ds;
89 ds->dt_n = ds->dt_max = 0;
90 ds->dt_count = NIL(int*);
91 ds->dt_size = dtsize(dt);
92 ds->dt_meth = dt->data->type&DT_METHODS;
98 { dthstat(dt->data,ds,NIL(int*));
99 if(ds->dt_max+1 > Size)
102 if(!(Count = (int*)malloc((ds->dt_max+1)*sizeof(int))) )
104 Size = ds->dt_max+1;
106 for(i = ds->dt_max; i >= 0; --i)
108 dthstat(dt->data,ds,Count);
112 { dttstat(ds,dt->data->here,0,NIL(int*));
113 if(ds->dt_n+1 > Size)
116 if(!(Count = (int*)malloc((ds->dt_n+1)*sizeof(int))) )
118 Size = ds->dt_n+1;
121 for(i = ds->dt_n; i >= 0; --i)
123 dttstat(ds,dt->data->here,0,Count);
124 for(i = ds->dt_n; i >= 0; --i)
125 if(Count[i] > ds->dt_max)
126 ds->dt_max = Count[i];
129 ds->dt_count = Count;