#ifndef lint
static char *RCSid = "$Header: /usr/brule/guest/empire/empire/emprcs/lib/update/removewants.c,v 2.1 1995/10/11 03:05:54 empire Exp $";
#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;

	for (cn = 0; natp=getnatp(cn); cn++) {
		if ((natp->nat_stat & STAT_INUSE) &&
		    (natp->nat_update & WUPD_WANT) == 0){
			natp->nat_missed++;
		}
		natp->nat_update = natp->nat_stat & ~WUPD_WANT;
	}
	return 0;
}
#endif /* DEMANDUPDATE */
