

/*
 *	Polytechnic UNIX accounting Package - Program: zapfiles.c
 *
 *	Author:	John Buck
 *	Polytechnic Institute NY, September 1981
 *
 *	Program Description:
 *		Zeros the specified accounting files given on command line.
 *
 */





#include	"hsubs.h"
#include	"actrecs.h"

char	buf[512];


main(c,v)
char **v;
{
	register fd;

	while(--c){
		v++;
		if((fd = creat(*v, 0600)) == -1){
			printf("ERROR FROM ZAPFILES -- CANT OPEN %s\n", *v);
			continue;
		}
		lseek(fd, (long)(NHENT)*AREAD-512L, 0);
		write(fd, buf, 512);
		close(fd);
	}
}
