diff options
author | joye <joye> | 2013-08-27 18:44:24 (GMT) |
---|---|---|
committer | joye <joye> | 2013-08-27 18:44:24 (GMT) |
commit | 48974a09f23839821ca95f228fc0f3f53bb1cefa (patch) | |
tree | 9d5cfa1305ef57b69c9b1dd09dc3ffe536c0777d /src/bltOp.h | |
parent | 05d8c009040abfcb5f62644fbb99c8ff453d4519 (diff) | |
download | blt-48974a09f23839821ca95f228fc0f3f53bb1cefa.zip blt-48974a09f23839821ca95f228fc0f3f53bb1cefa.tar.gz blt-48974a09f23839821ca95f228fc0f3f53bb1cefa.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltOp.h')
-rw-r--r-- | src/bltOp.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/bltOp.h b/src/bltOp.h new file mode 100644 index 0000000..5887a46 --- /dev/null +++ b/src/bltOp.h @@ -0,0 +1,37 @@ + +/* + *--------------------------------------------------------------------------- + * + * Blt_OpSpec -- + * + * Structure to specify a set of operations for a TCL command. + * This is passed to the Blt_GetOp procedure to look + * for a function pointer associated with the operation name. + * + *--------------------------------------------------------------------------- + */ +typedef struct { + const char *name; /* Name of operation */ + int minChars; /* Minimum # characters to disambiguate */ + void *proc; + int minArgs; /* Minimum # args required */ + int maxArgs; /* Maximum # args required */ + const char *usage; /* Usage message */ +} Blt_OpSpec; + +typedef enum { + BLT_OP_ARG0, /* Op is the first argument. */ + BLT_OP_ARG1, /* Op is the second argument. */ + BLT_OP_ARG2, /* Op is the third argument. */ + BLT_OP_ARG3, /* Op is the fourth argument. */ + BLT_OP_ARG4 /* Op is the fifth argument. */ + +} Blt_OpIndex; + +#define BLT_OP_BINARY_SEARCH 0 +#define BLT_OP_LINEAR_SEARCH 1 + +BLT_EXTERN void *Blt_GetOpFromObj(Tcl_Interp *interp, int nSpecs, + Blt_OpSpec *specs, int operPos, int objc, Tcl_Obj *const *objv, + int flags); + |