/*
 * 5799-WZQ (C) COPYRIGHT = NONE
 * LICENSED MATERIALS - PROPERTY OF IBM
 */
/* $Header:DISPOSE.c 12.0$ */
/* $ACIS:DISPOSE.c 12.0$ */
/* $Source: /ibm/acis/usr/src/usr.lib/libpc/RCS/DISPOSE.c,v $ */

#ifndef lint
static char *rcsid = "$Header:DISPOSE.c 12.0$";
#endif

/* Copyright (c) 1979 Regents of the University of California */

static char sccsid[] = "@(#)DISPOSE.c 1.3 6/10/81";

#include	"h00vars.h"

DISPOSE(var, siz)
	register char	**var;	/* pointer to pointer being deallocated */
	long		siz;	/* sizeof(bletch) */
{
	register int size = siz;

	if (*var == 0 || *var + size > _maxptr || *var < _minptr) {
		ERROR("Pointer value out of legal range\n", 0);
		return;
	}
	free(*var);
	if (*var == _minptr)
		_minptr += size;
	if (*var + size == _maxptr)
		_maxptr -= size;
	*var = (char *)(0);
}
