rem: idx = 1; if (argc > 2) { for (i = 1; i < argc; ++i) { if (STREQ(argv[1], "-file")) { isfile = 1; ++idx; } else if (STREQ(argv[1], "-string") || STREQ(argv[1], "-local")) { ++idx; } else if (STREQ(argv[1], "-gobal")) { Tcl_AppendResult(interp, "option -global unsupported", TCL_STATIC); return TCL_ERROR; } else { break; }
add: isfile = 0; for (i = 1; i < argc; ++i) { if (STREQ(argv[i], "-global")) { Tcl_SetResult(interp, "option -global unsupported", TCL_STATIC); return TCL_ERROR; } if (STREQ(argv[i], "-file")) { isfile = 1; } else if (!STREQ(argv[i], "-string") && !STREQ(argv[i], "-local")) { break;
context: NsTclAdpParseCmd(ClientData arg, Tcl_Interp *interp, int argc, char **argv){    int         isfile, idx, i;    char       *string;        if (argc < 2) {        Tcl_AppendResult(interp, "wrong # args: should be \"",              argv[0], " ?-file|-string? arg ?arg1 arg2 ...?\"", NULL);        return TCL_ERROR;    }    idx = 1;    if (argc > 2) {	for (i = 1; i < argc; ++i) {	    if (STREQ(argv[1], "-file")) {		isfile = 1;		++idx;	    } else if (STREQ(argv[1], "-string")		    || STREQ(argv[1], "-local")) {		++idx;	    } else if (STREQ(argv[1], "-gobal")) {		Tcl_AppendResult(interp, "option -global unsupported", TCL_STATIC);		return TCL_ERROR;	    } else {		break;	    }	}    }    string = argv[idx++];    argc -= idx;    argv += idx;    if (isfile) {        return NsAdpEval(arg, string, argc, argv);    } else {        return NsAdpSource(arg, string, argc, argv);    }}