Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

-L option for ttyctl



-----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-----



Messages sorted by: Reverse Date, Date, Thread, Author