errx(1, tmpfil);
errx(1, "%s", tmpfil);
main(argc, argv)	register char **argv;	int argc;{	register struct quotause *qup, *protoprivs, *curprivs;	u_int id, protoid;	register int quotatype, tmpfd;	char *protoname = NULL;	int ch;	int tflag = 0, pflag = 0;	if (argc < 2)		usage();	if (getuid())		errx(1, strerror(EPERM));	quotatype = USRQUOTA;	while ((ch = getopt(argc, argv, "ugtp:")) != -1) {		switch(ch) {		case 'p':			protoname = optarg;			pflag++;			break;		case 'g':			quotatype = GRPQUOTA;			break;		case 'u':			quotatype = USRQUOTA;			break;		case 't':			tflag++;			break;		default:			usage();		}	}	argc -= optind;	argv += optind;	if (pflag) {		if (getentry(protoname, quotatype, &protoid) == -1)			exit(1);		protoprivs = getprivs(protoid, quotatype);		for (qup = protoprivs; qup; qup = qup->next) {			qup->dqblk.dqb_btime = 0;			qup->dqblk.dqb_itime = 0;		}		while (argc-- > 0) {			if (getentry(*argv++, quotatype, &id) == -1)				continue;			putprivs(id, quotatype, protoprivs);		}		exit(0);	}	if ((tmpfd = mkstemp(tmpfil)) == -1)		errx(1, tmpfil);	if (tflag) {		protoprivs = getprivs(0, quotatype);		if (writetimes(protoprivs, tmpfd, quotatype) == 0) {			unlink(tmpfil);			exit(1);		}		if (editit(tmpfil) && readtimes(protoprivs, tmpfd))			putprivs(0, quotatype, protoprivs);		freeprivs(protoprivs);		unlink(tmpfil);		exit(0);	}	for ( ; argc > 0; argc--, argv++) {		if (getentry(*argv, quotatype, &id) == -1)			continue;		curprivs = getprivs(id, quotatype);		if (writeprivs(curprivs, tmpfd, *argv, quotatype) == 0)			continue;		if (editit(tmpfil) && readprivs(curprivs, tmpfd))			putprivs(id, quotatype, curprivs);		freeprivs(curprivs);	}	close(tmpfd);	unlink(tmpfil);	exit(0);}