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