Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti i sorgenti per Greenleaf Math Library (gfm.dll) git-svn-id: svn://10.65.10.50/trunk@10079 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			59 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
| /* DEC	*MultiplyDecimalByLong(pDst,pSrc1,pSrc2);
 | |
|  *
 | |
|  * ARGUMENT
 | |
|  *	DEC	*pDst;
 | |
|  *	DEC	*pSrc1;
 | |
|  *	long	pSrc2;
 | |
|  *
 | |
|  * DESCRIPTION
 | |
|  *	Multiplies pSrc1 times ConvLongToDecimal(pSrc2)	& puts it into pDst.
 | |
|  *  pSrc1 and pSrc2 remain unchanged. Note that	we always call the
 | |
|  *  _MulDec80Bit() routine to do the actual multiply, sign chking, etc.
 | |
|  *
 | |
|  * SIDE	EFFECTS
 | |
|  *	*pDst is indeterminate on error.
 | |
|  *
 | |
|  * RETURNS
 | |
|  *	Returns	pointer	to pDst	if successful, otherwise a GM_NULL. The
 | |
|  *   type error	(GMOVERFLOW, GMUNDERFLOW, GMNOMEMORY) 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*	MultiplyDecimalByLong(pDst,pSrc1,pSrc2)
 | |
| DEC	*pDst,*pSrc1;
 | |
| long	pSrc2;
 | |
| {
 | |
| 
 | |
| 	DEC	temp1,*tp1,*pd;
 | |
| 
 | |
| 	_MacStart(GM_MULLD);
 | |
| 
 | |
| 	/* init	default	pointer	*/
 | |
| 	tp1=&temp1;
 | |
| 
 | |
| 	/* convert the long first, then	call the multiply routine */
 | |
| 	(void) ConvLongToDecimal(tp1,pSrc2);
 | |
| 
 | |
| 	pd = MultiplyDecimal(pDst,pSrc1,tp1);
 | |
| 
 | |
| 	_MacRet(pd);
 | |
| 
 | |
| }
 | |
| 
 |