summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2013-12-10 20:33:52 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2013-12-10 20:33:52 +0000
commitcafac3cdba7c1f82f1cf4f8c1fbaf0f307d954a5 (patch)
tree7786dc5488123ffa230ea00b61e1cd1bef4ffa63
parent9161399ddeec8c9f32f47a1a521da4d510427ec8 (diff)
Disable the USE_OLD_TTY hack that re-encoded termios Bnnn speeds
as sgtty Bnnn speeds. This means ospeed has to grow from short to int to hold all possible values. Bump major version. While there, also fix a bug in _nc_baudrate(). ok nicm@, millert@, deraadt@
-rw-r--r--lib/libcurses/shlib_version2
-rw-r--r--lib/libcurses/termcap.36
-rw-r--r--lib/libcurses/termcap.h6
-rw-r--r--lib/libcurses/tinfo/lib_baudrate.c8
4 files changed, 11 insertions, 11 deletions
diff --git a/lib/libcurses/shlib_version b/lib/libcurses/shlib_version
index 262f3bc13b6..d85251eba7d 100644
--- a/lib/libcurses/shlib_version
+++ b/lib/libcurses/shlib_version
@@ -1,2 +1,2 @@
-major=13
+major=14
minor=0
diff --git a/lib/libcurses/termcap.3 b/lib/libcurses/termcap.3
index ac9d2fea6db..7bdab28b4a1 100644
--- a/lib/libcurses/termcap.3
+++ b/lib/libcurses/termcap.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: termcap.3,v 1.8 2010/01/12 23:21:59 nicm Exp $
+.\" $OpenBSD: termcap.3,v 1.9 2013/12/10 20:33:51 naddy Exp $
.\"
.\"***************************************************************************
.\" Copyright (c) 1998-2006,2007 Free Software Foundation, Inc. *
@@ -28,7 +28,7 @@
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: termcap.3,v 1.8 2010/01/12 23:21:59 nicm Exp $
+.\" $Id: termcap.3,v 1.9 2013/12/10 20:33:51 naddy Exp $
.TH termcap 3 ""
.ds n 5
.SH NAME
@@ -49,7 +49,7 @@
.br
\fBextern char * BC;\fR
.br
-\fBextern short ospeed;\fR
+\fBextern int ospeed;\fR
.sp
\fBint tgetent(char *bp, const char *name);\fR
.br
diff --git a/lib/libcurses/termcap.h b/lib/libcurses/termcap.h
index 2020f138bf3..025e28f388f 100644
--- a/lib/libcurses/termcap.h
+++ b/lib/libcurses/termcap.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: termcap.h,v 1.9 2010/01/12 23:21:59 nicm Exp $ */
+/* $OpenBSD: termcap.h,v 1.10 2013/12/10 20:33:51 naddy Exp $ */
/****************************************************************************
* Copyright (c) 1998,2000 Free Software Foundation, Inc. *
@@ -33,7 +33,7 @@
* and: Eric S. Raymond <esr@snark.thyrsus.com> *
****************************************************************************/
-/* $Id: termcap.h,v 1.9 2010/01/12 23:21:59 nicm Exp $ */
+/* $Id: termcap.h,v 1.10 2013/12/10 20:33:51 naddy Exp $ */
#ifndef NCURSES_TERMCAP_H_incl
#define NCURSES_TERMCAP_H_incl 1
@@ -65,7 +65,7 @@ extern "C"
#define NCURSES_CONST /*nothing*/
#undef NCURSES_OSPEED
-#define NCURSES_OSPEED short
+#define NCURSES_OSPEED int
extern NCURSES_EXPORT_VAR(char) PC;
extern NCURSES_EXPORT_VAR(char *) UP;
diff --git a/lib/libcurses/tinfo/lib_baudrate.c b/lib/libcurses/tinfo/lib_baudrate.c
index a171993945a..fffd5720bd9 100644
--- a/lib/libcurses/tinfo/lib_baudrate.c
+++ b/lib/libcurses/tinfo/lib_baudrate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lib_baudrate.c,v 1.5 2010/01/12 23:22:06 nicm Exp $ */
+/* $OpenBSD: lib_baudrate.c,v 1.6 2013/12/10 20:33:51 naddy Exp $ */
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
@@ -52,7 +52,7 @@
* of the indices up to B115200 fit nicely in a 'short', allowing us to retain
* ospeed's type for compatibility.
*/
-#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if (defined(__FreeBSD__) && (__FreeBSD_version < 700000)) || defined(__NetBSD__)
#undef B0
#undef B50
#undef B75
@@ -82,7 +82,7 @@
#undef USE_OLD_TTY
#endif /* USE_OLD_TTY */
-MODULE_ID("$Id: lib_baudrate.c,v 1.5 2010/01/12 23:22:06 nicm Exp $")
+MODULE_ID("$Id: lib_baudrate.c,v 1.6 2013/12/10 20:33:51 naddy Exp $")
/*
* int
@@ -170,7 +170,7 @@ _nc_baudrate(int OSpeed)
}
}
#if !USE_REENTRANT
- if (OSpeed == last_OSpeed) {
+ if (OSpeed != last_OSpeed) {
last_OSpeed = OSpeed;
last_baudrate = result;
}