/*
 * 5799-WZQ (C) COPYRIGHT IBM CORPORATION 1986,1987,1988
 * LICENSED MATERIALS - PROPERTY OF IBM
 * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
 */
/* $Header:swapround.c 12.0$ */
/* $ACIS:swapround.c 12.0$ */
/* $Source: /ibm/acis/usr/src/lib/libc/ca/gen/RCS/swapround.c,v $ */

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

#include <machine/fp.h>
#include <ieee.h>

ROUNDDIR swapround(new)		/* SWAPROUND sets a new rounding mode and    */
ROUNDDIR new;			/*	returns the previous one	     */
{
    ROUNDDIR old;

	old = fptestround();			/* find current mode */
	fpsetround(new);			/* set new mode */
	return(old);				/* return old mode  */
}
