summaryrefslogtreecommitdiff
path: root/lib/libcurses/lib_initscr.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-12-03 05:21:47 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-12-03 05:21:47 +0000
commit211326e37501ac01a66994a221020b75ab5f63f0 (patch)
tree6d6c7182f1034b1b04c98386a1c3ba44e8accd5f /lib/libcurses/lib_initscr.c
parent7c742f381e7808d0b12c17b534305751f3ebb0cb (diff)
Merge of ncurses-4.1-971129
Diffstat (limited to 'lib/libcurses/lib_initscr.c')
-rw-r--r--lib/libcurses/lib_initscr.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/lib/libcurses/lib_initscr.c b/lib/libcurses/lib_initscr.c
index 8b2b90562cd..4b1bbfc987e 100644
--- a/lib/libcurses/lib_initscr.c
+++ b/lib/libcurses/lib_initscr.c
@@ -1,3 +1,5 @@
+/* $OpenBSD: lib_initscr.c,v 1.3 1997/12/03 05:21:20 millert Exp $ */
+
/***************************************************************************
* COPYRIGHT NOTICE *
@@ -27,42 +29,12 @@
*/
#include <curses.priv.h>
-#include <term.h> /* cur_term */
#if HAVE_SYS_TERMIO_H
#include <sys/termio.h> /* needed for ISC */
#endif
-MODULE_ID("Id: lib_initscr.c,v 1.18 1997/03/08 14:03:59 tom Exp $")
-
-#ifndef ONLCR /* Allows compilation under the QNX 4.2 OS */
-#define ONLCR 0
-#endif
-
-/*
- * SVr4/XSI Curses specify that hardware echo is turned off in initscr, and not
- * restored during the curses session. The library simulates echo in software.
- * (The behavior is unspecified if the application enables hardware echo).
- *
- * The newterm function also initializes terminal settings.
- */
-int _nc_initscr(void)
-{
- /* for extended XPG4 conformance requires cbreak() at this point */
- /* (SVr4 curses does this anyway) */
- cbreak();
-
-#ifdef TERMIOS
- cur_term->Nttyb.c_lflag &= ~(ECHO|ECHONL);
- cur_term->Nttyb.c_iflag &= ~(ICRNL|INLCR|IGNCR);
- cur_term->Nttyb.c_oflag &= ~(ONLCR);
-#else
- cur_term->Nttyb.sg_flags &= ~(ECHO|CRMOD);
-#endif
- if ((SET_TTY(cur_term->Filedes, &cur_term->Nttyb)) == -1)
- return ERR;
- return OK;
-}
+MODULE_ID("Id: lib_initscr.c,v 1.19 1997/06/28 17:41:12 tom Exp $")
WINDOW *initscr(void)
{
@@ -100,7 +72,6 @@ static char ret[15];
if (term != 0) {
(void) strncpy(ret, term, sizeof(ret) - 1);
- ret[sizeof(ret) - 1] = '\0';
term = ret;
}
return term;