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
		
			
				
	
	
		
			68 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			68 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
/* DEC	*MultiplyAscii(pDst,pSrc1,pSrc2)
 | 
						|
 *
 | 
						|
 * ARGUMENT
 | 
						|
 *	pDst is	a poiter to the	destination DEC	structure
 | 
						|
 *	pSrc1 is a pointer to source1 ASCII string
 | 
						|
 *	pSrc2 is a pointer to source2 ASCII string
 | 
						|
 *
 | 
						|
 * DESCRIPTION
 | 
						|
 *	Multiplies the value in	pSrc1 (ASCII) to the value in pSrc2 (ASCII)
 | 
						|
 *	and puts the result in pDst DEC	structure
 | 
						|
 *
 | 
						|
 * SIDE	EFFECTS
 | 
						|
 *	On error, the dest structure is	undetermined.
 | 
						|
 *
 | 
						|
 * RETURNS
 | 
						|
 *	Returns	a pointer to the dest structure	on success,
 | 
						|
 *   otherwise returns a GM_NULL(a C false). On	error, the error
 | 
						|
 *   is	in wGMError, unless an error was already there.
 | 
						|
 *
 | 
						|
 * POSSIBLE ERROR CODES
 | 
						|
 *
 | 
						|
 *	GM_NULLSTRING
 | 
						|
 *	GM_NOMEMORY
 | 
						|
 *	GM_CNVRE
 | 
						|
 *	GM_CNVRW
 | 
						|
 *	GM_NAN
 | 
						|
 *	GM_OVERFLOW
 | 
						|
 *	GM_UNDERFLOW
 | 
						|
 *
 | 
						|
 * AUTHOR
 | 
						|
 *   Andy Anderson	20-Feb-87
 | 
						|
 *   Copyright (C) 1987-1990 Greenleaf Software	Inc.  All rights reserved.
 | 
						|
 *
 | 
						|
 * MODIFICATIONS
 | 
						|
 *
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
#include <stdio.h>
 | 
						|
#include "gm.h"
 | 
						|
#include "gmsystem.h"
 | 
						|
 | 
						|
DEC	*MultiplyAscii(pDst,pSrc1,pSrc2)
 | 
						|
DEC	*pDst;
 | 
						|
char	*pSrc1,*pSrc2;
 | 
						|
{
 | 
						|
	DEC	dtmp1,dtmp2;
 | 
						|
	DEC	*ps1,*ps2,*pd;
 | 
						|
 | 
						|
	_MacStart(GM_MULSTR);
 | 
						|
 | 
						|
	ps1=&dtmp1;
 | 
						|
	ps2=&dtmp2;
 | 
						|
 | 
						|
	   /* convert ascii to DEC */
 | 
						|
	ps1=ConvAsciiToDecimal(ps1,pSrc1);
 | 
						|
	if (!ps1)
 | 
						|
		_MacRet(GM_NULL);
 | 
						|
 | 
						|
	ps2=ConvAsciiToDecimal(ps2,pSrc2);
 | 
						|
	if (!ps2)
 | 
						|
		_MacRet(GM_NULL);
 | 
						|
 | 
						|
	pd = MultiplyDecimal(pDst,ps1,ps2);
 | 
						|
 | 
						|
	_MacRet(pd);
 | 
						|
}
 |