campo-sirio/gfm/dabs.c

48 lines
763 B
C
Raw Normal View History

/* DEC *AbsoluteDecimal(pDst,pSrc1);
*
* ARGUMENT
* DEC *pDst,*pSrc1;
*
* DESCRIPTION
* Returns the absolute value of pSrc1 in pDst.
*
* SIDE EFFECTS
* None.
*
* RETURNS
* Returns pDst if successful, and returns GM_NULL on error.
*
* AUTHOR
* Andy Anderson 27-JAN-1987 19:00
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
*
* POSSIBLE ERROR CODES
*
* GM_NULLPOINTER
*
* MODIFICATIONS
*
*/
#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"
DEC *AbsoluteDecimal(pDst,pSrc)
DEC *pDst,*pSrc;
{
_MacStart( GM_DABS );
_MacInVar(pSrc,GM_NULL);
_MacOutVar(pDst,GM_NULL);
/* Then check for negative number */
_MacDCopy(pDst,pSrc);
if (_MacIsDecN(pSrc)) {
_MacDChgs(pDst);
}
_MacRet(pDst);
}