int percentused;
double percentused;
posixprint(mntbuf, mntsize, maxwidth)	struct statfs *mntbuf;	long mntsize;	int maxwidth;{	int i;	int blocklen;	int blocksize;	char *blockstr;	struct statfs *sfsp;	long used, avail;	int percentused;	if (kflag) {		blocksize = 1024;		blockstr = "1024-blocks";	} else {		blocksize = 512;		blockstr = " 512-blocks";	}	blocklen = strlen(blockstr);	(void)printf(		"%-*.*s %s       Used   Available Capacity Mounted on\n",		maxwidth, maxwidth, "Filesystem", blockstr);	for (i = 0; i < mntsize; i++) {		sfsp = &mntbuf[i];		used = sfsp->f_blocks - sfsp->f_bfree;		avail = sfsp->f_bavail + used;		if (avail == 0)			percentused = 100;		else			percentused = (used * 100 / avail) +			    ((used % avail) ? 1 : 0);		(void) printf ("%-*.*s %*d %10ld %11d %5d%%   %s\n",			maxwidth, maxwidth, sfsp->f_mntfromname,			strlen(blockstr),			fsbtoblk(sfsp->f_blocks, sfsp->f_bsize, blocksize),			fsbtoblk(used, sfsp->f_bsize, blocksize),			fsbtoblk(sfsp->f_bavail, sfsp->f_bsize, blocksize),			percentused, sfsp->f_mntonname);	}}