1cbreak(3XCURSES) X/Open Curses Library Functions cbreak(3XCURSES)
2
3
4
6 cbreak, nocbreak, noraw, raw - set input mode controls
7
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 int cbreak(void);
17
18
19 int nocbreak(void);
20
21
22 int noraw(void);
23
24
25 int raw(void);
26
27
29 The cbreak() function enables the character input mode. This overrides
30 any previous call to the raw() function and turns the stty flag ICANON
31 off.
32
33
34 The nocbreak() function sets the line canonical mode and turns the stty
35 flag ICANON on without touching the ISIG or IXON flags.
36
37
38 The noraw() function sets the line canonical mode and turns the stty
39 flags ICANON, ISIG, and IXON all on.
40
41
42 The raw() function sets the character input mode and turns the stty
43 flags ICANON, ISIG, and IXON all off. This mode provides maximum con‐
44 trol over input.
45
46
47 It is important to remember that the terminal may or may not be in
48 character mode operation initially. Most interactive programs require
49 cbreak() to be enabled.
50
52 On success, these functions return OK. Otherwise, they return ERR.
53
55 None.
56
58 See attributes(5) for descriptions of the following attributes:
59
60
61
62
63 ┌─────────────────────────────┬─────────────────────────────┐
64 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
65 ├─────────────────────────────┼─────────────────────────────┤
66 │Interface Stability │Standard │
67 ├─────────────────────────────┼─────────────────────────────┤
68 │MT-Level │Unsafe │
69 └─────────────────────────────┴─────────────────────────────┘
70
72 getch(3XCURSES), halfdelay(3XCURSES), nodelay(3XCURSES), time‐
73 out(3XCURSES), libcurses(3XCURSES), attributes(5), standards(5),
74 termio(7I)
75
76
77
78SunOS 5.11 5 Jun 2002 cbreak(3XCURSES)