summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-03-12 11:01:25 +0000
committernicm <nicm@openbsd.org>2019-03-12 11:01:25 +0000
commit818e463522f2237e9da1be8aa7958dcc8af28fca (patch)
treee47f1fa14bbc52f0b6232e07b5aba6893c221b8f
parentRemove unused uaudioreg.h file. (diff)
downloadwireguard-openbsd-818e463522f2237e9da1be8aa7958dcc8af28fca.tar.xz
wireguard-openbsd-818e463522f2237e9da1be8aa7958dcc8af28fca.zip
Almost all terminals now support hardware tabs so default to OXTABS
off. This makes three changes: adds the ht capability to the standard lines in gettytab(5); removes OXTABS from TTYDEF_OFLAG in ttydefaults.h (the defaults used by pty(4) - diff from martijn); and only sets OXTABS on terminals which lack hts and tbc in tset(1) (from Thomas Dickey upstream). Addresses problems reported by tedu. ok millert
-rw-r--r--etc/gettytab24
-rw-r--r--sys/sys/ttydefaults.h4
-rw-r--r--usr.bin/tset/tset.c4
3 files changed, 16 insertions, 16 deletions
diff --git a/etc/gettytab b/etc/gettytab
index d669131ce9b..56e44ec402e 100644
--- a/etc/gettytab
+++ b/etc/gettytab
@@ -1,4 +1,4 @@
-# $OpenBSD: gettytab,v 1.6 2018/05/02 21:06:14 kettenis Exp $
+# $OpenBSD: gettytab,v 1.7 2019/03/12 11:01:25 nicm Exp $
#
# Most of the table entries here are just copies of the old getty table.
# It is by no means certain, or even likely, that any of them are optimal
@@ -28,27 +28,27 @@ b|std.134|134.5-baud:\
1|std.150|150-baud:\
:ep:nd#1:cd#2:td#1:fd#1:sp#150:ht:nl:lm=\E\72\6\6\17login\72 :
c|std.300|300-baud:\
- :nd#1:cd#1:sp#300:
+ :nd#1:cd#1:sp#300:ht:
d|std.600|600-baud:\
- :nd#1:cd#1:sp#600:
+ :nd#1:cd#1:sp#600:ht:
f|std.1200|1200-baud:\
- :fd#1:sp#1200:
+ :fd#1:sp#1200:ht:
6|std.2400|2400-baud:\
- :sp#2400:
+ :sp#2400:ht:
7|std.4800|4800-baud:\
- :sp#4800:
+ :sp#4800:ht:
2|std.9600|9600-baud:\
- :sp#9600:
+ :sp#9600:ht:
g|std.19200|19200-baud:\
- :sp#19200:
+ :sp#19200:ht:
std.38400|38400-baud:\
- :sp#38400:
+ :sp#38400:ht:
std.57600|57600-baud:\
- :sp#57600:
+ :sp#57600:ht:
std.115200|115200-baud:\
- :sp#115200:
+ :sp#115200:ht:
std.1500000|1500000-baud:\
- :sp#1500000:
+ :sp#1500000:ht:
#
# Dial in rotary tables, speed selection via 'break'
diff --git a/sys/sys/ttydefaults.h b/sys/sys/ttydefaults.h
index f637645a3ea..07ddac23a00 100644
--- a/sys/sys/ttydefaults.h
+++ b/sys/sys/ttydefaults.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ttydefaults.h,v 1.6 2003/06/02 23:28:22 millert Exp $ */
+/* $OpenBSD: ttydefaults.h,v 1.7 2019/03/12 11:01:25 nicm Exp $ */
/* $NetBSD: ttydefaults.h,v 1.8 1996/04/09 20:55:45 cgd Exp $ */
/*-
@@ -47,7 +47,7 @@
* Defaults on "first" open.
*/
#define TTYDEF_IFLAG (BRKINT | ICRNL | IMAXBEL | IXON | IXANY)
-#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
+#define TTYDEF_OFLAG (OPOST | ONLCR)
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#define TTYDEF_SPEED (B9600)
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c
index 82b9d5280ff..49861a22181 100644
--- a/usr.bin/tset/tset.c
+++ b/usr.bin/tset/tset.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tset.c,v 1.39 2015/11/16 03:02:40 deraadt Exp $ */
+/* $OpenBSD: tset.c,v 1.40 2019/03/12 11:01:25 nicm Exp $ */
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
@@ -928,7 +928,7 @@ set_conversions(void)
#endif /* __OBSOLETE__ */
#ifdef OXTABS
/* test used to be tgetflag("pt") */
- if (has_hardware_tabs) /* Print tabs. */
+ if (VALID_STRING(set_tab) && VALID_STRING(clear_all_tabs))
mode.c_oflag &= ~OXTABS;
#endif /* OXTABS */
mode.c_lflag |= (ECHOE | ECHOK);