/* DEC *MinimumDecimal(pDst,pSrc1,pSrc2) * * ARGUMENT * DEC *pSrc1,*pSrc2,*pDst; * * DESCRIPTION * Returns the smaller of pSrc1 and pSrc2 in pDst. * * SIDE EFFECTS * None. * * RETURNS * Returns a pointer to pDst if successful * otherwise GM_NULL and sets the global error to GM_NULLPOINTER. * * POSSIBLE ERROR CODES * * GM_NULLPOINTER * * AUTHOR * AA 17-Sep-87 * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * * */ #include #include "gm.h" #include "gmsystem.h" DEC *MinimumDecimal(pDst,pSrc1,pSrc2) DEC *pSrc1,*pSrc2,*pDst; { int i; _MacStart(GM_DMIN); _MacInVarD(pSrc1); _MacInVarD(pSrc2); _MacOutVarD(pDst); i = CompareDecimal(pSrc1,pSrc2); if(i>0) _MacDCopy(pDst,pSrc2); else _MacDCopy(pDst,pSrc1); _MacRet(pDst); }