summaryrefslogtreecommitdiff
path: root/src/include/RegisterKeyedFunction.h
blob: 5be1fdde3123a8a5b54441e5311d8b2872d9542b (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
 /*@@
   @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_

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

#ifdef __cplusplus
extern "C" {
#endif

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

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

#ifdef __cplusplus
}
#endif

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

/* Possible return codes. */

enum RegisterKeyedFunctionErrors {REG_KEYED_FUNCTION_SUCCESS, 
                                  REG_KEYED_FUNCTION_ALREADY_ASSIGNED,
                                  REG_KEYED_FUNCTION_RANGE_ERROR};


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


#endif