zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: -M option for ttyctl
Date: Mon, 8 Jan 1996 06:23:17 +0000 (GMT)	[thread overview]
Message-ID: <16994.199601080623@stone.dcs.warwick.ac.uk> (raw)

-----BEGIN PGP SIGNED MESSAGE-----

This simple patch adds the previously discussed -M option to ttyctl.  I
intend to add -M to all builtins for which it is meaningful.

 -zefram

      *** 1.4	1996/01/07 03:53:14
      --- Src/builtin.c	1996/01/08 06:05:18
      ***************
      *** 5191,5202 ****
        int
        bin_ttyctl(char *name, char **argv, char *ops, int func)
        {
      !     if (!ops['@'])
      ! 	printf("tty is %sfrozen\n", ttyfrozen ? "" : "not ");
      !     else if (ops['f'])
        	ttyfrozen = 1;
      !     else
        	ttyfrozen = 0;
            return 0;
        }
        
      --- 5191,5207 ----
        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['M'])
      + 	printf("ttyctl -%c\n", ttyfrozen ? 'f' : 'u');
      +     else
      + 	printf("tty is %sfrozen\n", ttyfrozen ? "" : "not ");
            return 0;
        }
        
      *** 1.2	1996/01/07 02:09:24
      --- Src/hashtable.h	1996/01/08 05:58:54
      ***************
      *** 304,310 ****
            {NULL, "source", 0, 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", 0, bin_times, 0, 0, 0, NULL, NULL},
            {NULL, "trap", 0, bin_trap, 0, -1, 0, NULL, NULL},
            {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL},
      --- 304,310 ----
            {NULL, "source", 0, 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, "fuM", NULL},
            {NULL, "times", 0, bin_times, 0, 0, 0, NULL, NULL},
            {NULL, "trap", 0, bin_trap, 0, -1, 0, NULL, NULL},
            {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL},
      *** 1.2	1996/01/07 02:09:24
      --- Doc/zshbuiltins.man	1996/01/08 06:17:20
      ***************
      *** 852,866 ****
        \fBtrue\fP
        Do nothing and return an exit code of 0.
        .TP
      ! \fBttyctl\fP \-\fBfu\fP
        The \-\fBf\fP option freezes the tty, and \-\fBu\fP 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
        size of the screen; the shell will
        simply reset the settings to their previous values as soon as each
      ! command exits or is suspended.  Thus, \fBstty\fP and similar programs have
      ! no effect when the tty is frozen. Without options it reports whether the
      ! terminal is frozen or not.
        .TP
        \fBtype\fP
        Same as \fBwhence\fP \-\fBv\fP.
      --- 852,867 ----
        \fBtrue\fP
        Do nothing and return an exit code of 0.
        .TP
      ! \fBttyctl\fP \-\fBfuM\fP
        The \-\fBf\fP option freezes the tty, and \-\fBu\fP 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
        size of the screen; the shell will
        simply reset the settings to their previous values as soon as each
      ! command exits or is suspended.  Thus, \fIstty\fR(1) and similar programs have
      ! no effect when the tty is frozen.  Without options it reports whether the
      ! terminal is frozen or not; with the \-\fBM\fP option alone it reports this
      ! in the form of a \fBttyctl\fP command.
        .TP
        \fBtype\fP
        Same as \fBwhence\fP \-\fBv\fP.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQCVAgUBMPC4FXD/+HJTpU/hAQEBngQApoVL19C6s2HZ80WWzxSNuEUwQH/bLH6p
R3VZh3dsmw65fieZ4pPPg0HpK7ZQ3plfOFnVjLtv3nLo/XmQu8wnGVW2zbrZLkUB
OQk1cryj1+7OllRW/KjA2eNVNx1Xuz/LhFl/j9MvGSfmKWZJfPVI0odpdlj7sEMj
Ky4GJngpfQM=
=bEzj
-----END PGP SIGNATURE-----


                 reply	other threads:[~1996-01-08  6:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=16994.199601080623@stone.dcs.warwick.ac.uk \
    --to=a.main@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).