#ifndef lint
static char *RCSid = "$Header: /u/dhay/bemp/src3/update/RCS/removewants.c,v 1.1 91/01/14 22:04:45 dhay Exp Locker: dhay $";
#endif

/*
 * removewants.c
 *
 * Remove "I want an update" flags.
 */

#include <stdio.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include "misc.h"
#ifdef DEMANDUPDATE
#include "nat.h"
#include "file.h"

int
update_removewants()
{
	natid   cn;
	struct natstr *natp;
	int	upd, m;

	for (cn = 0; natp=getnatp(cn); cn++) {
		if ((natp->nat_stat & STAT_INUSE) && 
			((natp->nat_update & WUPD_WANT) == 0)){
			m=natp->nat_missed+1;
			NAT_SET(nat_missed, cn, m);
		}
		upd = natp->nat_stat & ~WUPD_WANT;
		NAT_SET(nat_update, cn, upd);
	}
	return 0;
}
#endif DEMANDUPDATE
