From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6428 invoked from network); 22 Mar 1997 16:41:12 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 22 Mar 1997 16:41:12 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA14060; Sat, 22 Mar 1997 11:34:23 -0500 (EST) Resent-Date: Sat, 22 Mar 1997 11:34:23 -0500 (EST) Date: Sat, 22 Mar 1997 16:37:04 GMT From: Zefram Message-Id: <13372.199703221637@stone.dcs.warwick.ac.uk> Subject: -L option for ttyctl X-Patch: 221 Resent-Message-ID: <"roqlY3.0.dR3.Ee0Dp"@euclid> To: zsh-workers@math.gatech.edu Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3016 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- This is an updated form of patch 719, which didn't get into the baseline at the time. -zefram *** Doc/Zsh/builtins.yo 1997/03/20 03:53:46 1.10 --- Doc/Zsh/builtins.yo 1997/03/22 14:11:08 *************** *** 980,986 **** ) findex(ttyctl) cindex(tty, freezing) ! item(tt(ttyctl) tt(-fu))( The tt(-f) option freezes the tty, and tt(-u) unfreezes it. When the tty is frozen, no changes made to the tty settings by external programs will be honored by the shell, except for changes in the --- 980,986 ---- ) findex(ttyctl) cindex(tty, freezing) ! item(tt(ttyctl) tt(-fuL))( The tt(-f) option freezes the tty, and tt(-u) unfreezes it. When the tty is frozen, no changes made to the tty settings by external programs will be honored by the shell, except for changes in the *************** *** 988,994 **** simply reset the settings to their previous values as soon as each command exits or is suspended. Thus, tt(stty) and similar programs have no effect when the tty is frozen. Without options it reports whether the ! terminal is frozen or not. ) findex(type) item(tt(type) [ tt(-fpam) ] var(name) ...)( --- 988,995 ---- simply reset the settings to their previous values as soon as each command exits or is suspended. Thus, tt(stty) and similar programs have no effect when the tty is frozen. Without options it reports whether the ! terminal is frozen or not; the (-L) option causes this report to be in the ! form of a tt(ttyctl) command to reproduce the current state. ) findex(type) item(tt(type) [ tt(-fpam) ] var(name) ...)( *** Src/builtin.c 1997/03/22 01:55:35 1.64 --- Src/builtin.c 1997/03/22 14:06:49 *************** *** 3390,3399 **** int bin_ttyctl(char *name, char **argv, char *ops, int func) { ! if (ops['f']) ttyfrozen = 1; else if (ops['u']) ttyfrozen = 0; else printf("tty is %sfrozen\n", ttyfrozen ? "" : "not "); return 0; --- 3390,3404 ---- int bin_ttyctl(char *name, char **argv, char *ops, int func) { ! if(ops['f'] && ops['u']) { ! zerrnam(name, "illegal combination of options", NULL, 0); ! return 1; ! } else if (ops['f']) ttyfrozen = 1; else if (ops['u']) ttyfrozen = 0; + else if(ops['L']) + printf("ttyctl -%c\n", ttyfrozen ? 'f' : 'u'); else printf("tty is %sfrozen\n", ttyfrozen ? "" : "not "); return 0; *** Src/hashtable.h 1997/03/22 07:00:55 1.28 --- Src/hashtable.h 1997/03/22 14:07:00 *************** *** 330,336 **** {NULL, "source", BINF_PSPECIAL, bin_dot, 1, -1, 0, NULL, NULL}, {NULL, "suspend", 0, bin_suspend, 0, 0, 0, "f", NULL}, {NULL, "test", 0, bin_test, 0, -1, BIN_TEST, NULL, NULL}, ! {NULL, "ttyctl", 0, bin_ttyctl, 0, 0, 0, "fu", NULL}, {NULL, "times", BINF_PSPECIAL, bin_times, 0, 0, 0, NULL, NULL}, {NULL, "trap", BINF_PSPECIAL, bin_trap, 0, -1, 0, NULL, NULL}, {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL}, --- 330,336 ---- {NULL, "source", BINF_PSPECIAL, bin_dot, 1, -1, 0, NULL, NULL}, {NULL, "suspend", 0, bin_suspend, 0, 0, 0, "f", NULL}, {NULL, "test", 0, bin_test, 0, -1, BIN_TEST, NULL, NULL}, ! {NULL, "ttyctl", 0, bin_ttyctl, 0, 0, 0, "fuL", NULL}, {NULL, "times", BINF_PSPECIAL, bin_times, 0, 0, 0, NULL, NULL}, {NULL, "trap", BINF_PSPECIAL, bin_trap, 0, -1, 0, NULL, NULL}, {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL}, -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: ascii iQCVAwUBMzPqBHD/+HJTpU/hAQHM6QQAqDtRpXdl74bRtlPadq6Abd8RonZpzWO2 927KiFfSMxYxmVn9O3U28QH98mU8EwnYAVTfJZwiP54WLrB+VOvwe2pQqhFJKYaO 0c5GdKszido64EH4fWkthjU4K9HMjwoieFiH9XQ1capPSPd4j7/3oA9Joi6bvqtG JVtir4x5V2E= =VsMO -----END PGP SIGNATURE-----