/* DEC *MaximumDecimal(pDst,pSrc1,pSrc2) * * ARGUMENT * DEC *pSrc1,*pSrc2,*pDst; * * DESCRIPTION * Stores the larger of pSrc1 or 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 * GM_NOMEMORY * * AUTHOR * AA 17-Sep-87 * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * * */ #include #include "gm.h" #include "gmsystem.h" DEC *MaximumDecimal(pDst,pSrc1,pSrc2) DEC *pSrc1,*pSrc2,*pDst; { int i; _MacStart(GM_DMAX); _MacInVarD(pSrc1); _MacInVarD(pSrc2); _MacOutVarD(pDst); i = CompareDecimal(pSrc1,pSrc2); if(i<0) _MacDCopy(pDst,pSrc2); else _MacDCopy(pDst,pSrc1); return(pDst); }