summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_initscr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libncurses/lib_initscr.c')
-rw-r--r--lib/libncurses/lib_initscr.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/libncurses/lib_initscr.c b/lib/libncurses/lib_initscr.c
new file mode 100644
index 0000000..5c9dfc3
--- /dev/null
+++ b/lib/libncurses/lib_initscr.c
@@ -0,0 +1,31 @@
+
+/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
+* details. If they are missing then this copy is in violation of *
+* the copyright conditions. */
+
+/*
+** lib_initscr.c
+**
+** The routine initscr().
+**
+*/
+
+#include <stdlib.h>
+#include "curses.priv.h"
+
+WINDOW *initscr()
+{
+#ifdef TRACE
+ _init_trace();
+
+ T(("initscr() called"));
+#endif
+
+ if (newterm(getenv("TERM"), stdout, stdin) == NULL)
+ return NULL;
+ else {
+ def_shell_mode();
+ def_prog_mode();
+ return(stdscr);
+ }
+}
OpenPOWER on IntegriCloud