Line | |
---|
1 | |
---|
2 | #ifndef RPOP_H |
---|
3 | #define RPOP_H |
---|
4 | |
---|
5 | #ifdef __cplusplus |
---|
6 | extern "C" { |
---|
7 | #endif |
---|
8 | |
---|
9 | /* |
---|
10 | *--------------------------------------------------------------------------- |
---|
11 | * |
---|
12 | * Rp_OpSpec -- |
---|
13 | * |
---|
14 | * Structure to specify a set of operations for a Tcl command. |
---|
15 | * This is passed to the Rp_GetOpFromObj procedure to look |
---|
16 | * for a function pointer associated with the operation name. |
---|
17 | * |
---|
18 | *--------------------------------------------------------------------------- |
---|
19 | */ |
---|
20 | typedef struct { |
---|
21 | const char *name; /* Name of operation */ |
---|
22 | int minChars; /* Minimum # characters to disambiguate */ |
---|
23 | void *proc; |
---|
24 | int minArgs; /* Minimum # args required */ |
---|
25 | int maxArgs; /* Maximum # args required */ |
---|
26 | const char *usage; /* Usage message */ |
---|
27 | } Rp_OpSpec; |
---|
28 | |
---|
29 | typedef enum { |
---|
30 | RP_OP_ARG0, /* Op is the first argument. */ |
---|
31 | RP_OP_ARG1, /* Op is the second argument. */ |
---|
32 | RP_OP_ARG2, /* Op is the third argument. */ |
---|
33 | RP_OP_ARG3, /* Op is the fourth argument. */ |
---|
34 | RP_OP_ARG4 /* Op is the fifth argument. */ |
---|
35 | |
---|
36 | } Rp_OpIndex; |
---|
37 | |
---|
38 | #define RP_OP_BINARY_SEARCH 0 |
---|
39 | #define RP_OP_LINEAR_SEARCH 1 |
---|
40 | |
---|
41 | extern void *Rp_GetOpFromObj _ANSI_ARGS_((Tcl_Interp *interp, |
---|
42 | int nSpecs, Rp_OpSpec *specs, int operPos, int objc, |
---|
43 | Tcl_Obj *const *objv, int flags)); |
---|
44 | |
---|
45 | #ifdef __cplusplus |
---|
46 | } |
---|
47 | #endif |
---|
48 | #endif /*RPOBJ_H*/ |
---|
Note: See
TracBrowser
for help on using the repository browser.