franz/lam8.c
/* function hashtabstat  : return list of number of members in  each bucket */
function hashtabstat  : return list of number of members in  each bucket
function hashtabstat : return list of number of members in each bucket
lispval Lhashst()
{
	register lispval handy,cur;
	register struct atom *pnt;
	int i,cnt;
	extern int hashtop;
	Savestack(3);
	handy = newdot();
	protect(handy);
	cur = handy;
	for(i = 0; i < hashtop; i++)
	{
	    pnt = hasht[i];
	    for(cnt = 0; pnt != (struct atom *) CNIL ; pnt=pnt->hshlnk , cnt++);
	    cur->d.cdr = newdot();
	    cur = cur->d.cdr;
	    cur->d.car = inewint(cnt);
	}
	cur->d.cdr = nil;
	Restorestack();
	return(handy->d.cdr);
}
lispval Lhashst ( ) { register lispval handy , cur ; register struct atom * pnt ; int i , cnt ; extern int hashtop ; Savestack ( 3 ) ; handy = newdot ( ) ; protect ( handy ) ; cur = handy ; for ( i = 0 ; i < hashtop ; i ++ ) { pnt = hasht [ i ] ; for ( cnt = 0 ; pnt != ( struct atom * ) CNIL ; pnt = pnt -> hshlnk , cnt ++ ) ; cur -> d . cdr = newdot ( ) ; cur = cur -> d . cdr ; cur -> d . car = inewint ( cnt ) ; } cur -> d . cdr = nil ; Restorestack ( ) ; return ( handy -> d . cdr ) ; }
function hashtabstat  : return list of number of members in  each bucket
function hashtabstat : return list of number of members in each bucket