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
		
			
				
	
	
		
			63 lines
		
	
	
		
			976 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			976 B
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
| /* char	*FunctionName(dst, num);
 | |
|  *
 | |
|  * ARGUMENT
 | |
|  *	char	*pDst;
 | |
|  *	int	num;
 | |
|  *
 | |
|  * DESCRIPTION
 | |
|  *	This function copies the string	name corresponding to a	given
 | |
|  *   function number into dst.	dst must be character array allocated to have
 | |
|  *   at	least 32 characters.
 | |
|  *
 | |
|  * SIDE	EFFECTS
 | |
|  *	None.
 | |
|  *
 | |
|  * RETURNS
 | |
|  *	dst if successful, otherwise NULL.
 | |
|  *
 | |
|  * POSSIBLE Function CODES
 | |
|  *
 | |
|  *	GM_NULLSTRING
 | |
|  *	GM_ARGVAL
 | |
|  *
 | |
|  * AUTHOR
 | |
|  *	Jared Levy
 | |
|  *   Copyright (C) 1988-1990 Greenleaf Software	Inc.  All rights reserved.
 | |
|  *
 | |
|  * MODIFICATIONS
 | |
|  *
 | |
|  *
 | |
|  */
 | |
| #include <stdio.h>
 | |
| #include <string.h>
 | |
| #include "gmsystem.h"
 | |
| #include "gmfname.h"
 | |
| 
 | |
| char	*FunctionName(dst, num)
 | |
| char	*dst;
 | |
| int	num;
 | |
| {
 | |
| 	int	err;
 | |
| 
 | |
| 	_MacStart(GM_FUNNAME);
 | |
| 
 | |
| 	if (!dst)  {
 | |
| 		_MacErr(GM_NULLSTRING);
 | |
| 		_MacRet(NULL);
 | |
| 	}
 | |
| 
 | |
| 	if (num==0)  {
 | |
| 		_MacDCopy(dst, "None");
 | |
| 		_MacRet(dst);
 | |
| 	}
 | |
| 
 | |
| 	err = num - GM_FN_BASE;
 | |
| 	if (err<0 || err>GM_FN_NUM)  {
 | |
| 		_MacErr(GM_ARGVAL);
 | |
| 		_MacRet(NULL);
 | |
| 	}
 | |
| 
 | |
| 	strcpy(dst, fnames[err]);
 | |
| 	_MacRet(dst);
 | |
| }
 |