campo-sirio/gfm/mululd.c

55 lines
1.1 KiB
C
Raw Normal View History

/* DEC *MultiplyDecimalByUnsLong(pDst,pSrc1,pSrc2);
*
* ARGUMENT
* DEC *pDst;
* DEC *pSrc1;
* unsigned long pSrc2;
*
* DESCRIPTION
* Multiplies pSrc1 times ConvUnsLongToDecimal(pSrc2) & puts it
* into pDst. pSrc1 and pSrc2 remain unchanged.
*
* 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_OVERFLOW
*
* AUTHOR
* Andy Anderson 5-Mar-87 17:15
* Copyright (C) 1987-1990 Greenleaf Software Inc. All rights reserved.
*
* MODIFICATIONS
*
*/
#include <stdio.h>
#include "gm.h"
#include "gmsystem.h"
DEC* MultiplyDecimalByUnsLong(pDst,pSrc1,pSrc2)
DEC *pDst,*pSrc1;
unsigned long pSrc2;
{
DEC temp1,*tp1=&temp1,*pd;
_MacStart(GM_MULULD);
/* convert the unsigned long first, then call the multiply routine */
(void) ConvUnsLongToDecimal(tp1,pSrc2);
pd = MultiplyDecimal(pDst,pSrc1,tp1);
_MacRet(pd);
}