Diff
Not logged in

Differences From Artifact [398f5435ff]:

To Artifact [1d8264541a]:


1
2
3
4
5


6
7
8
9
10
11
12
1
2
3


4
5
6
7
8
9
10
11
12



-
-
+
+








 /* ==================================================================

    FILE: "/disk01/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Mon Sep 20 02:20:33 1999 (joze)"
    FILE: "/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Tue Sep 21 21:19:35 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

193
194
195
196
197
198
199
200

201
202
203
204
205
206

207
208
209
210
211
212
213
193
194
195
196
197
198
199

200
201
202
203
204
205

206
207
208
209
210
211
212
213







-
+





-
+







{
    int i, obj_idx, status;
    Tcl_Obj** objv = (Tcl_Obj**) MALLOC((argc + 1) * sizeof(Tcl_Obj *));

    static char *subCmds[] = {
        "read", "initialize", "write", "add", "complete",
        "customcompleter", "builtincompleter", "eofchar",
		"reset-terminal",
		"reset-terminal", "bell",
        (char *) NULL
    };
    enum SubCmdIdx {
        TCLRL_READ, TCLRL_INITIALIZE, TCLRL_WRITE, TCLRL_ADD, TCLRL_COMPLETE,
        TCLRL_CUSTOMCOMPLETER, TCLRL_BUILTINCOMPLETER, TCLRL_EOFCHAR,
		TCLRL_RESET_TERMINAL
		TCLRL_RESET_TERMINAL, TCLRL_BELL
    };


    Tcl_ResetResult(interp); /* clear the result space */

    for (i = 0;  i < argc;  i++) {
        Tcl_Obj* objPtr = Tcl_NewStringObj(argv[i], -1);
394
395
396
397
398
399
400








401
402
403
404
405
406
407
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415







+
+
+
+
+
+
+
+







				rl_reset_terminal(Tcl_GetStringFromObj(objv[2], (int*) NULL));
#ifdef CLEANUP_AFER_SIGNAL
            } else {
				rl_cleanup_after_signal();
#endif
			}
            break;

        case TCLRL_BELL:
			/*
			 * ring the terminal bell obeying the current
			 * settings -- audible or visible.
			 */
			ding();
			break;

        default:
            goto BAD_COMMAND;
            /* NOTREACHED */
            break;
    }