summaryrefslogtreecommitdiff
path: root/src/include/RegisterKeyedFunction.h
blob: fddecb2da4c6f4eaf0cf609e465b7f21e7a0b51a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
 /*@@
   @header    RegisterKeyedFunction.h
   @date      Tue Sep 29 09:41:49 1998
   @author    Tom Goodale
   @desc 
   Header file for keyed function registration.
   @enddesc 
   @version $Header$
 @@*/

#ifndef _REGISTERKEYEDFUNCTION_H_
#define _REGISTERKEYEDFUNCTION_H_ 1

/*****************************************************/
/* Function prototypes. */

#ifdef __cplusplus
extern "C" 
{
#endif

int RegisterKeyedFunction(void (*array[])(void), 
                          int min, int max, 
                          int key, void (*func)(void));

void  (**(CreateKeyedFunctionArray(int size)))(void);

#ifdef __cplusplus
}
#endif

/*****************************************************/

/* Possible return codes. */

enum RegisterKeyedFunctionErrors {REG_KEYED_FUNCTION_SUCCESS, 
                                  REG_KEYED_FUNCTION_ALREADY_ASSIGNED,
                                  REG_KEYED_FUNCTION_RANGE_ERROR};


/*****************************************************/


#endif