2 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
3 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
4 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
5 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
6 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
7 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
8 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
9 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
10 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
11 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
15 #pragma off (unreferenced)
16 static char rcsid[] = "$Id: func.c,v 1.1.1.1 2001-01-19 03:30:15 bradleyb Exp $";
17 #pragma on (unreferenced)
26 static FUNCTION * func_table = NULL;
27 static int func_size = 0;
28 static int initialized = 0;
29 static int func_params[MAX_PARAMS];
36 void func_init( FUNCTION * funtable, int size )
41 func_table = funtable;
58 int (*func_get( char * name, int * numparams ))(void)
62 for (i=0; i<func_size; i++ )
63 if (!strcmpi( name, func_table[i].name ))
65 *numparams = func_table[i].nparams;
66 return func_table[i].cfunction;
72 int func_get_index( char * name )
76 for (i=0; i<func_size; i++ )
77 if (!strcmpi( name, func_table[i].name ))
86 int (*func_nget( int func_number, int * numparams, char **name ))(void)
88 if (func_number < func_size )
90 *name = func_table[func_number].name;
91 *numparams = func_table[func_number].nparams;
92 return func_table[func_number].cfunction;
98 void func_set_param( int n, int value )
100 func_params[n] = value;
103 int func_get_param( int n )
105 return func_params[n];