[comp.bugs.4bsd] ac bugs ? + FIX

nakayama@ips1.iis.u-tokyo.JUNET (masaya) (12/01/88)

Dear nerworkers.

Don't you have any probrems for summarizing the account of each user ?
My user ID contains 8 characters (nakayama) and we usually get information
as follows.

ips1% ac -p
	root     30.17
	...
	yamamoto131.70
	...
	nakayama351.17
	total   876.05
ips1%

This is not convenient for us.
I find that there are no separator between login name and its account.
And the following patch puts SPACE as separator.

*** ac.c.orig	Sat Jul  2 16:20:27 1983
--- ac.c	Thu Dec  1 10:00:49 1988
***************
*** 175,187 ****
  		if (t>0)
  			ttime += t;
  		if (pflag && ubuf[i].utime > 0) {
! 			printf("\t%-*.*s%6.2f\n", NMAX, NMAX,
  			    ubuf[i].uname, ubuf[i].utime/3600.);
  		}
  	}
  	if (ttime > 0) {
  		pdate();
! 		printf("\ttotal%9.2f\n", ttime/3600.);
  	}
  }
  
--- 175,187 ----
  		if (t>0)
  			ttime += t;
  		if (pflag && ubuf[i].utime > 0) {
! 			printf("\t%-*.*s %6.2f\n", NMAX, NMAX,
  			    ubuf[i].uname, ubuf[i].utime/3600.);
  		}
  	}
  	if (ttime > 0) {
  		pdate();
! 		printf("\ttotal %9.2f\n", ttime/3600.);
  	}
  }
  
########################################################################
Masaya NAKAYAMA @ Institute of Industrial Science, Univ. of Tokyo
E-mail: nakayama%ips1.iis.u-tokyo.junet@relay.cs.net