Commit | Line | Data |
---|---|---|
ea56bb60 KB |
1 | .\" Copyright (c) 1980 The Regents of the University of California. |
2 | .\" All rights reserved. | |
a08e0da0 | 3 | .\" |
3edcb7c8 | 4 | .\" %sccs.include.redist.roff% |
ea56bb60 | 5 | .\" |
3edcb7c8 | 6 | .\" @(#)doc.II 6.3 (Berkeley) %G% |
a08e0da0 KM |
7 | .\" |
8 | .Ds | |
81d48c56 KM |
9 | .Fd cbreak "" \*m |
10 | .Fd nocbreak "" \*m | |
a08e0da0 | 11 | .Fd crmode "" \*m |
a08e0da0 KM |
12 | .Fd nocrmode "" \*m |
13 | .De | |
14 | Set or unset the terminal to/from cbreak mode. | |
81d48c56 KM |
15 | The misnamed macros |
16 | .Fn crmode | |
17 | and | |
18 | .Fn nocrmode | |
19 | are retained for backwards compatibility | |
20 | with ealier versions of the library. | |
a08e0da0 KM |
21 | .Ds |
22 | .Fd echo "" \*m | |
a08e0da0 KM |
23 | .Fd noecho "" \*m |
24 | .De | |
25 | Sets the terminal to echo or not echo characters. | |
26 | .Ds | |
27 | .Fd getch "" \*m | |
a08e0da0 KM |
28 | .Fd wgetch win |
29 | WINDOW *win; | |
30 | .De | |
31 | Gets a character from the terminal and (if necessary) | |
32 | echos it on the window. | |
33 | \*(Es | |
34 | Otherwise, the character gotten is returned. | |
35 | If | |
36 | .i noecho | |
37 | has been set, then the window is left unaltered. | |
38 | In order to retain control of the terminal, | |
39 | it is necessary to have one of | |
40 | .i noecho , | |
41 | .i cbreak , | |
42 | or | |
43 | .i rawmode | |
44 | set. | |
45 | If you do not set one, | |
46 | whatever routine you call to read characters will set | |
47 | .i cbreak | |
48 | for you, | |
49 | and then reset to the original mode when finished. | |
50 | .Ds | |
51 | .Fd getstr str \*m | |
52 | char *str; | |
a08e0da0 KM |
53 | .Fd wgetstr win\*,str |
54 | WINDOW *win; | |
55 | char *str; | |
56 | .De | |
57 | Get a string through the window | |
58 | and put it in the location pointed to by | |
59 | .Vn str , | |
60 | which is assumed to be large enough to handle it. | |
61 | It sets tty modes if necessary, | |
62 | and then calls | |
63 | .Fn getch | |
64 | (or | |
65 | .Fn wgetch ) "" win | |
66 | to get the characters needed to fill in the string | |
67 | until a newline or EOF is encountered. | |
68 | The newline stripped off the string. | |
69 | \*(Es | |
70 | .Ds | |
81d48c56 KM |
71 | .Fd \*_putchar c |
72 | char c; | |
73 | .De | |
74 | Put out a character using the | |
75 | .Fn putchar | |
76 | macro. | |
77 | This function is used to output every character | |
78 | that | |
79 | .b curses | |
80 | generates. | |
81 | Thus, | |
82 | it can be redefined by the user who wants to do non-standard things | |
83 | with the output. | |
84 | It is named with an initial \*(lq\*_\*(rq | |
85 | because it usually should be invisible to the programmer. | |
86 | .Ds | |
a08e0da0 | 87 | .Fd raw "" \*m |
a08e0da0 KM |
88 | .Fd noraw "" \*m |
89 | .De | |
90 | Set or unset the terminal to/from raw mode. | |
91 | On version 7 | |
92 | .Un \** | |
93 | .(f | |
94 | \** | |
95 | .Un | |
96 | is a trademark of Bell Laboratories. | |
97 | .)f | |
98 | this also turns of newline mapping | |
99 | (see | |
100 | .Fn nl ). | |
101 | .Ds | |
102 | .Fd scanw fmt\*,arg1\*,arg2\*,... | |
103 | char *fmt; | |
a08e0da0 KM |
104 | .Fd wscanw win\*,fmt\*,arg1\*,arg2\*,... |
105 | WINDOW *win; | |
106 | char *fmt; | |
107 | .De | |
108 | Perform a | |
109 | .Fn scanf | |
110 | through the window using | |
111 | .Vn fmt . | |
112 | It does this using consecutive | |
113 | .Fn getch 's | |
114 | (or | |
115 | .Fn wgetch 's). "" win | |
116 | \*(Es |