/* DEC *SubtractUnsLongFromDecimal(pDst,pSrc1,l) * * ARGUMENT * pDst is a pointer to the destination DEC structure. * pSrc1 is a ptr to the source1 DEC structure. * l is the unsigned long to be added to pSrc1 * * DESCRIPTION * Subtracts the value 'l' from pSrc1 and puts the result in * dest DEC structure. * * SIDE EFFECTS * On overflow, the dest structure is indeterminate. * * RETURNS * Returns a pointer to the dest structure unless overflow, * when it returns a GM_NULL. On error, the error * is in wGMError, unless an error was already there. * * POSSIBLE ERROR CODES * * GM_NULLPOINTER * GM_OVERFLOW * * AUTHOR * Andy Anderson 08-JUL-1987 1500 * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * */ #include #include "gm.h" #include "gmsystem.h" DEC *SubtractUnsLongFromDecimal(pDst,pSrc1,l) DEC *pDst,*pSrc1; unsigned long l; { DEC s2, *pSrc2=&s2, *pd; _MacStart(GM_SUBULD); /* Convert the unsigned long to a DEC int */ (void) ConvUnsLongToDecimal(pSrc2,l); pd = SubtractDecimal(pDst,pSrc1,pSrc2); _MacRet(pd); }