/* DEC *DivideDecimalByUnsLong(pDst,pSrc1,ulSrc2); * * ARGUMENT * DEC *pDst; * DEC *pSrc1; * unsigned long ulSrc2; * * DESCRIPTION * Divides pSrc1 by ultod(ulSrc2) & puts it into pDst. * * SIDE EFFECTS * None. * * RETURNS * Returns pointer to pDst if successful, otherwise a GM_NULL. The * type error (GM_OVERFLOW, GM_UNDERFLOW, GM_NOMEMORY) is in wGMError * if wGMError didn't contain a previous error on entry. * * POSSIBLE ERROR CODES * * GM_NULLPOINTER * GM_UNDERFLOW * GM_DIV0 * * AUTHOR * Andy Anderson 5-Mar-87 18:15 * Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved. * * MODIFICATIONS * */ #include #include "gm.h" #include "gmsystem.h" DEC* DivideDecimalByUnsLong(pDst,pSrc1,ulSrc2) DEC *pDst,*pSrc1; unsigned long ulSrc2; { DEC temp1,*tp1,*pd; _MacStart(GM_DIVULD); /* init default pointer */ tp1=&temp1; /* convert the unsigned long first, then call the divide routine */ (void) ConvUnsLongToDecimal(tp1,ulSrc2); pd = DivideDecimal(pDst,pSrc1,tp1); _MacRet(pd); }