position.c (6f26c71d76bb795b30684affb3b57870a7926b26) position.c (2235c7feac959bcc9ddfd6a2bc6be32102b1f84c)
1/*
1/*
2 * Copyright (C) 1984-2020 Mark Nudelman
2 * Copyright (C) 1984-2021 Mark Nudelman
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information, see the README file.
8 */
9
10

--- 5 unchanged lines hidden (view full) ---

16 * {{ The position table is scrolled by moving all the entries.
17 * Would be better to have a circular table
18 * and just change a couple of pointers. }}
19 */
20
21#include "less.h"
22#include "position.h"
23
3 *
4 * You may distribute under the terms of either the GNU General Public
5 * License or the Less License, as specified in the README file.
6 *
7 * For more information, see the README file.
8 */
9
10

--- 5 unchanged lines hidden (view full) ---

16 * {{ The position table is scrolled by moving all the entries.
17 * Would be better to have a circular table
18 * and just change a couple of pointers. }}
19 */
20
21#include "less.h"
22#include "position.h"
23
24static POSITION *table = NULL; /* The position table */
24static POSITION *table = NULL; /* The position table */
25static int table_size = 0;
26
27extern int sc_width, sc_height;
28
29/*
30 * Return the starting file position of a line displayed on the screen.
31 * The line may be specified as a line number relative to the top
32 * of the screen, but is usually one of these special cases:
25static int table_size = 0;
26
27extern int sc_width, sc_height;
28
29/*
30 * Return the starting file position of a line displayed on the screen.
31 * The line may be specified as a line number relative to the top
32 * of the screen, but is usually one of these special cases:
33 * the top (first) line on the screen
34 * the second line on the screen
35 * the bottom line on the screen
36 * the line after the bottom line on the screen
33 * the top (first) line on the screen
34 * the second line on the screen
35 * the bottom line on the screen
36 * the line after the bottom line on the screen
37 */
38 public POSITION
39position(sindex)
40 int sindex;
41{
42 switch (sindex)
43 {
44 case BOTTOM:

--- 212 unchanged lines hidden ---
37 */
38 public POSITION
39position(sindex)
40 int sindex;
41{
42 switch (sindex)
43 {
44 case BOTTOM:

--- 212 unchanged lines hidden ---