diff options
Diffstat (limited to 'bin/stty')
-rw-r--r-- | bin/stty/Makefile | 3 | ||||
-rw-r--r-- | bin/stty/Makefile.depend | 2 | ||||
-rw-r--r-- | bin/stty/cchar.c | 8 | ||||
-rw-r--r-- | bin/stty/extern.h | 3 | ||||
-rw-r--r-- | bin/stty/gfmt.c | 8 | ||||
-rw-r--r-- | bin/stty/key.c | 8 | ||||
-rw-r--r-- | bin/stty/modes.c | 10 | ||||
-rw-r--r-- | bin/stty/print.c | 9 | ||||
-rw-r--r-- | bin/stty/stty.1 | 34 | ||||
-rw-r--r-- | bin/stty/stty.c | 14 | ||||
-rw-r--r-- | bin/stty/stty.h | 3 | ||||
-rw-r--r-- | bin/stty/util.c | 8 |
12 files changed, 33 insertions, 77 deletions
diff --git a/bin/stty/Makefile b/bin/stty/Makefile index b10b8951b487..1b81c938f8b3 100644 --- a/bin/stty/Makefile +++ b/bin/stty/Makefile @@ -1,6 +1,3 @@ -# @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD$ - PACKAGE=runtime PROG= stty SRCS= cchar.c gfmt.c key.c modes.c print.c stty.c util.c diff --git a/bin/stty/Makefile.depend b/bin/stty/Makefile.depend index 6cfaab1c3644..6ef78fac5cbf 100644 --- a/bin/stty/Makefile.depend +++ b/bin/stty/Makefile.depend @@ -1,8 +1,6 @@ -# $FreeBSD$ # Autogenerated - do NOT edit! DIRDEPS = \ - gnu/lib/csu \ include \ include/xlocale \ lib/${CSU_DIR} \ diff --git a/bin/stty/cchar.c b/bin/stty/cchar.c index ecefbb2bc8f3..4a65d1b518d5 100644 --- a/bin/stty/cchar.c +++ b/bin/stty/cchar.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)cchar.c 8.5 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <err.h> diff --git a/bin/stty/extern.h b/bin/stty/extern.h index 88b58890f7d1..b6029396445f 100644 --- a/bin/stty/extern.h +++ b/bin/stty/extern.h @@ -25,9 +25,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#)extern.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD$ */ int c_cchars(const void *, const void *); diff --git a/bin/stty/gfmt.c b/bin/stty/gfmt.c index 12ed2a2d3500..fbd21382dd82 100644 --- a/bin/stty/gfmt.c +++ b/bin/stty/gfmt.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)gfmt.c 8.6 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <err.h> diff --git a/bin/stty/key.c b/bin/stty/key.c index 4514a0ea1c04..6e8f635ac237 100644 --- a/bin/stty/key.c +++ b/bin/stty/key.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)key.c 8.3 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <err.h> diff --git a/bin/stty/modes.c b/bin/stty/modes.c index 5cd3061aa449..d63b958680de 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)modes.c 8.3 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <string.h> #include "stty.h" @@ -128,6 +120,8 @@ static const struct modes imodes[] = { { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index a76cd46b765e..d7ab2abbcf14 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <stddef.h> @@ -129,6 +121,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt) put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 67a32c089150..4f0126dde275 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -29,10 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)stty.1 8.4 (Berkeley) 4/18/94 -.\" $FreeBSD$ -.\" -.Dd May 24, 2022 +.Dd September 27, 2022 .Dt STTY 1 .Os .Sh NAME @@ -225,6 +222,9 @@ if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. +.It Cm iutf8 Pq Fl iutf8 +Assume that input characters are UTF-8 encoded. Setting this flag +causes backspace to properly delete multibyte characters in canonical mode. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. @@ -594,6 +594,32 @@ Same as the control character Same as the control character .Cm reprint . .El +.Sh INTERACTION WITH JOB CONTROL +Modifications to the terminal settings are treated by job control +(see +.Xr termios 4 ) +same as writes. +When the +.Nm +utility is executing in a background process group, +such attempts result in the kernel sending the +.Dv SIGTTOU +signal and stopping the process until its group is returned +to foreground. +The non-blocking open of the terminal device with the +.Fl f +option to +.Nm +does not affect the behavior. +If it is desirable to modify the settings from the background, +.Xr sh 1 +users might utilize the following idiom: +.Bd -literal +(trap '' TTOU; stty -f /dev/tty sane) +.Ed +.Pp +Note that changing terminal settings for a running foreground +job that is not prepared for it might cause inconsistencies. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO diff --git a/bin/stty/stty.c b/bin/stty/stty.c index 9aa2f51aa81f..38834aaccea0 100644 --- a/bin/stty/stty.c +++ b/bin/stty/stty.c @@ -27,20 +27,6 @@ * SUCH DAMAGE. */ -#if 0 -#ifndef lint -static char const copyright[] = -"@(#) Copyright (c) 1989, 1991, 1993, 1994\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)stty.c 8.3 (Berkeley) 4/2/94"; -#endif /* not lint */ -#endif -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <ctype.h> diff --git a/bin/stty/stty.h b/bin/stty/stty.h index d48ccaa20b6e..64ad2945cfa9 100644 --- a/bin/stty/stty.h +++ b/bin/stty/stty.h @@ -25,9 +25,6 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * @(#)stty.h 8.1 (Berkeley) 5/31/93 - * $FreeBSD$ */ #include <sys/ioctl.h> diff --git a/bin/stty/util.c b/bin/stty/util.c index 19898ba9805f..4077ee354f8e 100644 --- a/bin/stty/util.c +++ b/bin/stty/util.c @@ -27,14 +27,6 @@ * SUCH DAMAGE. */ -#ifndef lint -#if 0 -static char sccsid[] = "@(#)util.c 8.3 (Berkeley) 4/2/94"; -#endif -#endif /* not lint */ -#include <sys/cdefs.h> -__FBSDID("$FreeBSD$"); - #include <sys/types.h> #include <sys/stat.h> |