/*	Copyright (c) 1984, 1986, 1987, 1988 AT&T	*/
/*	  All Rights Reserved  	*/

/*	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T	*/
/*	The copyright notice above does not evidence any   	*/
/*	actual or intended publication of such source code.	*/

#ident	"@(#)libc-i386:libc-i386/fp/fpsetsticky.c	1.2"

#include <ieeefp.h>
#include "fp.h"

fp_except
fpsetsticky(newsticky)
fp_except newsticky;
{
	struct _sw87 sw;
	_envbuf87 buf;
	fp_except oldsticky;

	_getsw(sw);
	oldsticky = (fp_except)sw.excp;
	sw.excp = newsticky;
	_putsw(sw, buf);
	return oldsticky;
}
