Lines Matching refs:argv

83 Tcl_IfCmd(dummy, interp, argc, argv)
87 char **argv; /* Argument strings. */
94 * At this point in the loop, argv and argc refer to an expression
103 argv[i-1], "\" argument", (char *) NULL);
106 result = Tcl_ExprBoolean(interp, argv[i], &value);
111 if ((i < argc) && (strcmp(argv[i], "then") == 0)) {
116 argv[i-1], "\" argument", (char *) NULL);
120 return Tcl_Eval(interp, argv[i]);
132 if ((argv[i][0] == 'e') && (strcmp(argv[i], "elseif") == 0)) {
145 if (strcmp(argv[i], "else") == 0) {
154 return Tcl_Eval(interp, argv[i]);
177 Tcl_IncrCmd(dummy, interp, argc, argv)
181 char **argv; /* Argument strings. */
188 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
193 oldString = Tcl_GetVar(interp, argv[1], TCL_LEAVE_ERR_MSG);
207 if (Tcl_GetInt(interp, argv[2], &increment) != TCL_OK) {
215 result = Tcl_SetVar(interp, argv[1], newString, TCL_LEAVE_ERR_MSG);
243 Tcl_JoinCmd(dummy, interp, argc, argv)
247 char **argv; /* Argument strings. */
256 joinString = argv[2];
258 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
263 if (Tcl_SplitList(interp, argv[1], &listArgc, &listArgv) != TCL_OK) {
297 Tcl_LindexCmd(dummy, interp, argc, argv)
301 char **argv; /* Argument strings. */
307 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
311 if ((*argv[2] == 'e') && (strncmp(argv[2], "end", strlen(argv[2])) == 0)) {
316 if (Tcl_GetInt(interp, argv[2], &index) != TCL_OK) {
323 for (p = argv[1] ; index >= 0; index--) {
370 Tcl_LinsertCmd(dummy, interp, argc, argv)
374 char **argv; /* Argument strings. */
380 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
384 if ((*argv[2] == 'e') && (strncmp(argv[2], "end", strlen(argv[2])) == 0)) {
386 } else if (Tcl_GetInt(interp, argv[2], &index) != TCL_OK) {
396 element = argv[1];
397 for (count = 0, p = argv[1]; (count < index) && (*p != 0); count++) {
404 Tcl_AppendResult(interp, argv[1], (char *) NULL);
409 if (element != argv[1]) {
416 Tcl_AppendResult(interp, argv[1], (char *) NULL);
425 Tcl_AppendElement(interp, argv[i]);
458 Tcl_ListCmd(dummy, interp, argc, argv)
462 char **argv; /* Argument strings. */
465 interp->result = Tcl_Merge(argc-1, argv+1);
491 Tcl_LlengthCmd(dummy, interp, argc, argv)
495 char **argv; /* Argument strings. */
501 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
505 for (count = 0, p = argv[1]; *p != 0 ; count++) {
539 Tcl_LrangeCmd(notUsed, interp, argc, argv)
543 char **argv; /* Argument strings. */
550 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
554 if ((*argv[2] == 'e') && (strncmp(argv[2], "end", strlen(argv[2])) == 0)) {
559 if (Tcl_GetInt(interp, argv[2], &first) != TCL_OK) {
566 if ((*argv[3] == 'e') && (strncmp(argv[3], "end", strlen(argv[3])) == 0)) {
569 if (Tcl_GetInt(interp, argv[3], &last) != TCL_OK) {
572 argv[3], "\"", (char *) NULL);
584 for (count = 0, begin = argv[1]; count < first; begin = next, count++) {
646 Tcl_LreplaceCmd(notUsed, interp, argc, argv)
650 char **argv; /* Argument strings. */
656 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
660 if ((*argv[2] == 'e') && (strncmp(argv[2], "end", strlen(argv[2])) == 0)) {
665 if (Tcl_GetInt(interp, argv[2], &first) != TCL_OK) {
667 Tcl_AppendResult(interp, "bad index \"", argv[2],
672 if ((*argv[3] == 'e') && (strncmp(argv[3], "end", strlen(argv[3])) == 0)) {
675 if (Tcl_GetInt(interp, argv[3], &last) != TCL_OK) {
677 Tcl_AppendResult(interp, "bad index \"", argv[3],
691 element = argv[1];
692 for (count = 0, p1 = argv[1]; (count < first) && (*p1 != 0); count++) {
705 argv[2], (char *) NULL);
728 while ((p1 != argv[1]) && (isspace(UCHAR(p1[-1])))
729 && (((p1-1) == argv[1]) || (p1[-2] != '\\'))) {
734 Tcl_AppendResult(interp, argv[1], (char *) NULL);
742 Tcl_AppendElement(interp, argv[i]);
779 Tcl_LsearchCmd(notUsed, interp, argc, argv)
783 char **argv; /* Argument strings. */
794 if (strcmp(argv[1], "-exact") == 0) {
796 } else if (strcmp(argv[1], "-glob") == 0) {
798 } else if (strcmp(argv[1], "-regexp") == 0) {
801 Tcl_AppendResult(interp, "bad search mode \"", argv[1],
806 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
810 if (Tcl_SplitList(interp, argv[argc-2], &listArgc, &listArgv) != TCL_OK) {
818 match = (strcmp(listArgv[i], argv[argc-1]) == 0);
821 match = Tcl_StringMatch(listArgv[i], argv[argc-1]);
824 match = Tcl_RegExpMatch(interp, listArgv[i], argv[argc-1]);
861 Tcl_LsortCmd(notUsed, interp, argc, argv)
865 char **argv; /* Argument strings. */
874 Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
894 length = strlen(argv[i]);
897 Tcl_AppendResult(interp, "bad switch \"", argv[i],
903 c = argv[i][1];
904 if ((c == 'a') && (strncmp(argv[i], "-ascii", length) == 0)) {
906 } else if ((c == 'c') && (strncmp(argv[i], "-command", length) == 0)) {
914 command = argv[i+1];
917 && (strncmp(argv[i], "-decreasing", length) == 0)) {
920 && (strncmp(argv[i], "-increasing", length) == 0)) {
923 && (strncmp(argv[i], "-integer", length) == 0)) {
926 && (strncmp(argv[i], "-real", length) == 0)) {
937 if (Tcl_SplitList(interp, argv[argc-1], &listArgc, &listArgv) != TCL_OK) {