summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_initscr.c
blob: a81783fff5c8be1764684e5daa8a95659eec71a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

/* 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();

	if (_tracing)
	    _tracef("initscr() called");
#endif

  	if (newterm(getenv("TERM"), stdout, stdin) == NULL)
    	return NULL;
	else {
		def_shell_mode();
		def_prog_mode();
		return(stdscr);
	}
}
OpenPOWER on IntegriCloud