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
		
			
				
	
	
		
			48 lines
		
	
	
		
			742 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			48 lines
		
	
	
		
			742 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
/* DEC	*ConvLongToDecimal( x, l)
 | 
						|
 *
 | 
						|
 * ARGUMENT
 | 
						|
 *	DEC	*x;
 | 
						|
 *	long	l;
 | 
						|
 *
 | 
						|
 * DESCRIPTION
 | 
						|
 *	Converts long 'l' to a DEC with	implied	decimal	0.
 | 
						|
 *
 | 
						|
 * SIDE	EFFECTS
 | 
						|
 *	x is indeterminate on error.
 | 
						|
 *
 | 
						|
 * RETURNS
 | 
						|
 *	The DEC	if the conversion is successful, and GM_NULL otherwise.
 | 
						|
 *
 | 
						|
 * POSSIBLE ERROR CODES
 | 
						|
 *
 | 
						|
 *	GM_NOMEMORY
 | 
						|
 *
 | 
						|
 * AUTHOR
 | 
						|
 *   Jared Levy		Feb. 9,	1987
 | 
						|
 *   Copyright (C) 1987-1990 Greenleaf Software	Inc.  All rights reserved.
 | 
						|
 *
 | 
						|
 * MODIFICATIONS
 | 
						|
 *
 | 
						|
 */
 | 
						|
 | 
						|
#include <stdio.h>
 | 
						|
#include "gm.h"
 | 
						|
#include "gmsystem.h"
 | 
						|
 | 
						|
DEC	*ConvLongToDecimal( x, l)
 | 
						|
DEC	*x;
 | 
						|
long	l;
 | 
						|
 | 
						|
{
 | 
						|
	_MacStart(GM_LTOD);
 | 
						|
	_MacOutVarD(x);
 | 
						|
 | 
						|
	x->ls.lmsd = 0;
 | 
						|
	x->ls.lsl[1] = 0L;
 | 
						|
	x->ls.lsl[0] = (l<0) ? -l : l;
 | 
						|
	x->ls.lid = 0;
 | 
						|
	x->ls.lattr = (l<0) ? 1	: 0;
 | 
						|
 | 
						|
	_MacRet(x);
 | 
						|
}
 |