zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu
Subject: -L option for ttyctl
Date: Sat, 22 Mar 1997 16:37:04 GMT	[thread overview]
Message-ID: <13372.199703221637@stone.dcs.warwick.ac.uk> (raw)

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


             reply	other threads:[~1997-03-22 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-22 16:37 Zefram [this message]
1997-03-22 17:42 ` Zoltan Hidvegi
1997-03-22 17:55   ` Zefram
1997-03-22 18:18     ` Zefram
1997-03-22 18:27   ` Bart Schaefer
1997-03-22 18:55     ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13372.199703221637@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).