summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1999-02-24 05:36:09 +0000
committermillert <millert@openbsd.org>1999-02-24 05:36:09 +0000
commitca6fa85b8599042c6270a4399e5049da04b34980 (patch)
tree6b3005d705c35fe8dbc7091d614a36ab0a65ed67
parentadd release kernels and friends (diff)
downloadwireguard-openbsd-ca6fa85b8599042c6270a4399e5049da04b34980.tar.xz
wireguard-openbsd-ca6fa85b8599042c6270a4399e5049da04b34980.zip
ncurses-990213
-rw-r--r--lib/libcurses/curses.h4
-rw-r--r--lib/libcurses/curses.priv.h6
-rw-r--r--lib/libcurses/tinfo/setbuf.c15
3 files changed, 18 insertions, 7 deletions
diff --git a/lib/libcurses/curses.h b/lib/libcurses/curses.h
index eabb2cee83f..d3be128caa2 100644
--- a/lib/libcurses/curses.h
+++ b/lib/libcurses/curses.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: curses.h,v 1.18 1999/02/11 00:09:36 millert Exp $ */
+/* $OpenBSD: curses.h,v 1.19 1999/02/24 05:36:09 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -50,7 +50,7 @@
/* These are defined only in curses.h, and are used for conditional compiles */
#define NCURSES_VERSION_MAJOR 4
#define NCURSES_VERSION_MINOR 2
-#define NCURSES_VERSION_PATCH 990206
+#define NCURSES_VERSION_PATCH 990213
/* This is defined in more than one ncurses header, for identification */
#undef NCURSES_VERSION
diff --git a/lib/libcurses/curses.priv.h b/lib/libcurses/curses.priv.h
index 34a90d8554e..c09a0a1db58 100644
--- a/lib/libcurses/curses.priv.h
+++ b/lib/libcurses/curses.priv.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: curses.priv.h,v 1.11 1999/01/18 19:07:18 millert Exp $ */
+/* $OpenBSD: curses.priv.h,v 1.12 1999/02/24 05:36:10 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -35,7 +35,7 @@
/*
- * $From: curses.priv.h,v 1.126 1999/01/03 01:00:41 tom Exp $
+ * $From: curses.priv.h,v 1.127 1999/02/09 23:24:52 tom Exp $
*
* curses.priv.h
*
@@ -704,6 +704,8 @@ extern void _nc_update_screensize(void);
/* scroll indices */
extern int *_nc_oldnums;
+#define USE_SETBUF_0 0
+
#define NC_BUFFERED(flag) \
if ((SP->_buffered != 0) != flag) \
_nc_set_buffer(SP->_ofp, flag)
diff --git a/lib/libcurses/tinfo/setbuf.c b/lib/libcurses/tinfo/setbuf.c
index 03a8c896ba0..677873b6da2 100644
--- a/lib/libcurses/tinfo/setbuf.c
+++ b/lib/libcurses/tinfo/setbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: setbuf.c,v 1.1 1999/01/18 19:10:22 millert Exp $ */
+/* $OpenBSD: setbuf.c,v 1.2 1999/02/24 05:36:11 millert Exp $ */
/****************************************************************************
* Copyright (c) 1998 Free Software Foundation, Inc. *
@@ -44,7 +44,7 @@
#include <curses.priv.h>
-MODULE_ID("$From: setbuf.c,v 1.2 1998/12/13 03:48:09 tom Exp $")
+MODULE_ID("$From: setbuf.c,v 1.4 1999/02/10 03:15:09 tom Exp $")
/*
* If the output file descriptor is connected to a tty (the typical case) it
@@ -97,7 +97,9 @@ MODULE_ID("$From: setbuf.c,v 1.2 1998/12/13 03:48:09 tom Exp $")
* itself, which is certainly no improvement.
*
* Just in case it does not work well on a particular system, the calls to
- * change buffering are all via the macro NC_BUFFERED.
+ * change buffering are all via the macro NC_BUFFERED. Some implementations
+ * do indeed get confused by changing setbuf on/off, and will overrun the
+ * buffer. So we disable this by default (there may yet be a workaround).
*/
void _nc_set_buffer(FILE *ofp, bool buffered)
{
@@ -118,9 +120,16 @@ void _nc_set_buffer(FILE *ofp, bool buffered)
SP->_setbuf = buf_ptr;
/* Don't try to free this! */
}
+#if !USE_SETBUF_0
+ else return;
+#endif
} else {
+#if !USE_SETBUF_0
+ return;
+#else
buf_len = 0;
buf_ptr = 0;
+#endif
}
#if HAVE_SETVBUF