rem: int  status = TCL_OK; Tcl_DString     ds;
add: int  status;
context: NsTclServerCmd(ClientData dummy, Tcl_Interp *interp, int argc, char **argv){    char buf[100];    int  status = TCL_OK;    Tcl_DString     ds;    if (argc < 2) {        Tcl_AppendResult(interp, "wrong # args: should be \"",            argv[0], " command ?args?\"", NULL);        return TCL_ERROR;    }    if (STREQ(argv[1], "urlstats")) {	return UrlStats(dummy, interp, argc, argv);    }    Ns_MutexLock(&lock);    if (STREQ(argv[1], "waiting")) {        sprintf(interp->result, "%d", waitingConns);    } else if (STREQ(argv[1], "keepalive")) {        sprintf(interp->result, "%d", nsconf.keepalive.npending);    } else if (STREQ(argv[1], "stats")) {	SprintfStats(&globalStats, interp->result);    } else if (STREQ(argv[1], "connections")) {        sprintf(interp->result, "%d", nextConnId);    } else if (STREQ(argv[1], "threads")) {        sprintf(buf, "min %d", nsconf.serv.minthreads);        Tcl_AppendElement(interp, buf);        sprintf(buf, "max %d", nsconf.serv.maxthreads);        Tcl_AppendElement(interp, buf);        sprintf(buf, "current %d", currentThreads);        Tcl_AppendElement(interp, buf);        sprintf(buf, "idle %d", idleThreads);        Tcl_AppendElement(interp, buf);        sprintf(buf, "stopping 0");        Tcl_AppendElement(interp, buf);    } else if (STREQ(argv[1], "active") ||    	       STREQ(argv[1], "queued") ||	       STREQ(argv[1], "all")) {    	Tcl_DStringInit(&ds);    	if (argv[1][0] == 'a') {	    AppendConnList(&ds, firstActiveConnPtr, "running");	}	if (argv[1][1] != 'c') {	    AppendConnList(&ds, firstWaitConnPtr, "queued");	}        Tcl_DStringResult(interp, &ds);    } else {        Tcl_AppendResult(interp, "unknown command \"",            argv[1], "\": should be "            "active, "            "waiting, "            "connections, "            "stats, "            "urlstats, "            "or threads", NULL);        status = TCL_ERROR;    }    Ns_MutexUnlock(&lock);    return status;}