Am 12.06.2005 um 07:06 schrieb Stephen Deasey:
For much of the command parsing, I think something like this is fine: int opt; static CONST char *opts[] = { "cleanup", "list", "create", "put", "get", NULL }; enum { CCleanupIdx, CListIdx, CCreateIdx, CPutIdx, CGetIdx }; if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0, &opt) != TCL_OK) { return TCL_ERROR; }
Yes. Indeed. We should gradually go and fix those. I will do that while walking thru. You can do as well if at the right place. Zoran