/* DEC	*FractionDecimal(pDst,pSrc)
 *
 * ARGUMENT
 *	DEC*	pDst	ptr to the destination DEC structure.
 *	DEC*	pSrc	ptr to the source DEC structure.
 *
 * DESCRIPTION
 *	Sets pDst to the fractional part of pSrc.
 *
 * SIDE	EFFECTS
 *	None.
 *
 * RETURNS
 *	Returns	a pointer to the DEC structure unless pSrc is null.
 *
 * POSSIBLE ERROR CODES
 *
 *	GM_NULLPOINTER
 *
 * AUTHOR
 *  Andy Anderson   13-JAN-1987	 17:20
 *   Copyright (C) 1987-1990 Greenleaf Software	Inc.  All rights reserved.
 *
 * MODIFICATIONS
 *
 */

#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"

DEC	*FractionDecimal(pDst,pSrc)
DEC	*pDst,*pSrc;
{
	DEC	dtemp, *temp=&dtemp;

	_MacStart(GM_DFRACT);
	_MacInVarD(pSrc);
	_MacOutVarD(pDst);

	(void) _TruncateDec80Bit(temp, pSrc, 0);
	(void) _SubDec80Bit(pDst, pSrc,	temp);

	_MacRet(pDst);
}