Skip to content

Commit

Permalink
Almost all terminals now support hardware tabs so default to OXTABS
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicm committed Mar 12, 2019
1 parent e2baf06 commit 818e463
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
24 changes: 12 additions & 12 deletions etc/gettytab
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions sys/sys/ttydefaults.h
Original file line number Diff line number Diff line change
@@ -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 $ */

/*-
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions usr.bin/tset/tset.c
Original file line number Diff line number Diff line change
@@ -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. *
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 818e463

Please sign in to comment.