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