1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
11 # define MINPAGESIZE 5
13 PUBLIC
int pagesize
; /* How many lines on a page */
14 PUBLIC
int maxpagesize
; /* Maximum # of lines on a page */
15 PUBLIC
int scrollsize
; /* number of lines in a scroll */
18 int cnt
; /* # of screenlines for this line */
19 long line
; /* lineno of this line */
20 # define firstline head->line
21 # define lastline tail->line
22 struct linelist
*next
;
23 struct linelist
*prev
;
24 } *tail
, *head
; /* Of all lines of the input file that are
25 * on the screen, remember how many
26 * screenlines they occupy. Keep this
27 * info in a doubly linked list.
29 int nf
; /* How many screenlines of the first line
30 * on the screen are not on the screen?
32 int currentpos
; /* Y coordinate of first free line */
33 struct linelist ssaavv
; /* Mark */
34 # define savfirst ssaavv.line
35 # define savnf ssaavv.cnt
38 PUBLIC
struct scr_info scr_info
;
39 PUBLIC
int status
; /* EOFILE on end of file
40 * START on start of file
41 * logical "or" if both
43 /* Flags for status field */
51 * int flag; Either 0 or 1
53 * Redraws the screen. If flag = 1, the screen is redrawn as precisely
54 * as possible, otherwise one page is displayed (which possibly does not
55 * take a whole screen.
60 * int display(firstline, nodispl, nlines, really)
61 * long firstline; Line with which to start
62 * int nodispl; Do not display nodispl lines of it
63 * int nlines; Number of screen lines that must be displayed
64 * int really; Either 0 or 1
66 * Displays nlines as a page. if "really" = 0, the actual displaying is not
67 * performed. Only the computing associated with it is done.
72 * int scrollf(nlines,really)
73 * int nlines; Number of lines to scroll
74 * int really; Either 0 or 1, see explanation above
76 * Scroll forwards "nlines" (screen)lines.
81 * int scrollb(nlines,really)
82 * int nlines; Number of lines to scroll
83 * int really; Either 0 or 1, see explanation above
85 * Scroll backwards "nlines" (screen)lines.
91 * long cnt; (Argument ignored)
93 * Display a page starting at the mark. If there was no
94 * mark, display the first page of the file.
95 * (There is always assumed to be a mark, the initial one is on the first page
102 * long cnt; (Argument ignored)
104 * Sets a mark on the current page.
105 * It returns nothing (but the address is taken ...)
111 * long cnt; (Argumewnt ignored)
113 * Sets the mark on the current page and displays the
114 * previously marked page.
121 * Clean up and initialize. To be called before displaying a new file