rem: if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 1,
add: if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 0,
context: NsTclPoolsObjCmd(ClientData data, Tcl_Interp *interp, int objc, Tcl_Obj **objv){    Pool *poolPtr, savedPool;    char *pool;    int i, val;    static CONST char *opts[] = {        "get", "set", "list", "register", NULL    };    enum {        PGetIdx, PSetIdx, PListIdx, PRegisterIdx    } opt;    static CONST char *cfgs[] = {        "-maxthreads", "-minthreads", "-maxconns", "-timeout", NULL    };    enum {        PCMaxThreadsIdx, PCMinThreadsIdx, PCMaxConnsIdx, PCTimeoutIdx    } cfg;    if (objc < 2) {        Tcl_WrongNumArgs(interp, 1, objv, "option ?args?");        return TCL_ERROR;    }    if (Tcl_GetIndexFromObj(interp, objv[1], opts, "option", 1,                (int *) &opt) != TCL_OK) {        return TCL_ERROR;    }    switch (opt) {    case PListIdx:	return NsTclListPoolsObjCmd(data, interp, objc, objv);        break;    case PGetIdx:        if (objc != 3) {            Tcl_WrongNumArgs(interp, 2, objv, "pool");            return TCL_ERROR;        }        if (GetPool(interp, objv[2], &poolPtr) != TCL_OK) {            return TCL_ERROR;        }        if (PoolResult(interp, poolPtr) != TCL_OK) {            return TCL_ERROR;        }        break;    case PSetIdx:        if (objc < 3 || (((objc - 3) % 2) != 0)) {            Tcl_WrongNumArgs(interp, 2, objv, "limit ?opt val opt val...?");            return TCL_ERROR;        }        pool = Tcl_GetString(objv[2]);	poolPtr = CreatePool(pool);        savedPool = *poolPtr;        for (i = 3; i < objc; i += 2) {            if (Tcl_GetIndexFromObj(interp, objv[i], cfgs, "cfg", 0,                        (int *) &cfg) != TCL_OK ||                     Tcl_GetIntFromObj(interp, objv[i+1], &val) != TCL_OK) {                *poolPtr = savedPool;                return TCL_ERROR;            }            switch (cfg) {            case PCMinThreadsIdx:                poolPtr->threads.min = val;                break;            case PCMaxThreadsIdx:                poolPtr->threads.max = val;                break;            case PCTimeoutIdx:                poolPtr->threads.timeout = val;                break;            case PCMaxConnsIdx:                poolPtr->threads.maxconns = val;                break;            }        }        if (PoolResult(interp, poolPtr) != TCL_OK) {            return TCL_ERROR;        }        break;    case PRegisterIdx:        if (objc != 6) {            Tcl_WrongNumArgs(interp, 2, objv, "pool server method url");            return TCL_ERROR;        }        if (GetPool(interp, objv[2], &poolPtr) != TCL_OK) {            return TCL_ERROR;        }        Ns_UrlSpecificSet(Tcl_GetString(objv[3]),                Tcl_GetString(objv[4]),                Tcl_GetString(objv[5]), poolid, poolPtr, 0, NULL);        break;    }    return TCL_OK;}