Commit | Line | Data |
---|---|---|
b6229a61 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 | .\" | |
ea43c906 | 5 | .\" @(#)doc.IV 6.1 (Berkeley) %G% |
b6229a61 KM |
6 | .\" |
7 | .Ds | |
8 | .Fd gettmode | |
9 | .De | |
10 | Get the tty stats. | |
11 | This is normally called by | |
12 | .Fn initscr . | |
13 | .Ds | |
14 | .Fd mvcur lasty\*,lastx\*,newy\*,newx | |
15 | int lasty\*,lastx\*,newy\*,newx; | |
16 | .De | |
17 | Moves the terminal's cursor from | |
18 | .Vn lasty\*,lastx ) ( | |
19 | to | |
20 | .Vn newy\*,newx ) ( | |
21 | in an approximation of optimal fashion. | |
22 | This routine uses the functions borrowed from | |
23 | .i ex | |
24 | version 2.6. | |
25 | It is possible to use this optimization | |
26 | without the benefit of the screen routines. | |
27 | With the screen routines, this should not be called by the user. | |
28 | .Fn move | |
29 | and | |
30 | .Fn refresh | |
31 | should be used to move the cursor position, | |
32 | so that the routines know what's going on. | |
33 | .Ds | |
34 | .Fd scroll win | |
35 | WINDOW *win; | |
36 | .De | |
37 | Scroll the window upward one line. | |
38 | This is normally not used by the user. | |
39 | .Ds | |
40 | .Fd savetty "" \*m | |
b6229a61 KM |
41 | .Fd resetty "" \*m |
42 | .De | |
43 | .Fn savetty | |
44 | saves the current tty characteristic flags. | |
45 | .Fn resetty | |
46 | restores them to what | |
47 | .Fn savetty | |
48 | stored. | |
49 | These functions are performed automatically by | |
50 | .Fn initscr | |
51 | and | |
52 | .Fn endwin . | |
53 | .Ds | |
54 | .Fd setterm name | |
55 | char *name; | |
56 | .De | |
57 | Set the terminal characteristics to be those of the terminal named | |
ea43c906 KM |
58 | .Vn name , |
59 | getting the terminal size from the | |
60 | .b TIOCGWINSZ | |
61 | .Fn ioctl "" "" 2 | |
62 | if it exists, | |
63 | otherwise from the environment. | |
b6229a61 KM |
64 | This is normally called by |
65 | .Fn initscr . | |
66 | .Ds | |
67 | .Fd tstp | |
68 | .De | |
69 | If the new | |
70 | .b tty (4) | |
71 | driver is in use, | |
72 | this function | |
73 | will save the current tty state | |
74 | and then put the process to sleep. | |
75 | When the process gets restarted, | |
76 | it restores the tty state | |
77 | and then calls | |
78 | .Fn wrefresh "" "" curscr | |
79 | to redraw the screen. | |
80 | .Fn initscr | |
81 | sets the signal | |
82 | SIGTSTP | |
83 | to trap to this routine. |