campo-sirio/gfm/dfract.c
alex ba237a9d91 Patch level : no patch
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll)


git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
2002-02-26 12:19:02 +00:00

46 lines
818 B
C
Executable File

/* 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);
}