1initscr(3XCURSES)       X/Open Curses Library Functions      initscr(3XCURSES)
2
3
4

NAME

6       initscr, newterm - screen initialization functions
7

SYNOPSIS

9       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
10        -R  /usr/xpg4/lib  -lcurses  [ library... ]
11
12       c89 [ flag... ] file... -lcurses [ library... ]
13
14       #include <curses.h>
15
16       WINDOW *initscr(void);
17
18
19       SCREEN *newterm(char *type, FILE *outfp, FILE *infp);
20
21

PARAMETERS

23       type     Is  a string defining the terminal type to be used in place of
24                TERM.
25
26
27       outfp    Is a pointer to a file to be used for output to the terminal.
28
29
30       infp     Is the pointer to a file to be used for input to the terminal.
31
32

DESCRIPTION

34       The initscr()  function  initializes  X/Open  Curses  data  structures,
35       determines   the   terminal   type,  and  ensures  the  first  call  to
36       refresh(3XCURSES) clears the screen.
37
38
39       The newterm() function opens a new terminal with each call.  It  should
40       be  used instead of initscr() when the program interacts with more than
41       one terminal.  It returns a variable of type SCREEN,  which  should  be
42       used for later  reference to that terminal. Before program termination,
43       endwin() should be called for each terminal.
44
45
46       The only functions that  you  can  call  before  calling  initscr()  or
47       newterm()       are       filter(3XCURSES),       ripoffline(3XCURSES),
48       slk_init(3XCURSES), and use_env(3XCURSES).
49

RETURN VALUES

51       On success, the initscr() function returns a pointer to stdscr;  other‐
52       wise, initscr() does not return.
53
54
55       On  success,  the newterm() function returns a pointer to the specified
56       terminal; otherwise, a null pointer is returned.
57

ERRORS

59       None.
60

ATTRIBUTES

62       See attributes(5) for descriptions of the following attributes:
63
64
65
66
67       ┌─────────────────────────────┬─────────────────────────────┐
68       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │Interface Stability          │Standard                     │
71       ├─────────────────────────────┼─────────────────────────────┤
72       │MT-Level                     │Unsafe                       │
73       └─────────────────────────────┴─────────────────────────────┘
74

SEE ALSO

76       del_curterm(3XCURSES),  delscreen(3XCURSES),  doupdate(3XCURSES),  end‐
77       win(3XCURSES),          filter(3XCURSES),          libcurses(3XCURSES),
78       slk_attroff(3XCURSES), use_env(3XCURSES), attributes(5), standards(5)
79
80
81
82SunOS 5.11                        5 Jun 2002                 initscr(3XCURSES)
Impressum