version 1.10, 2015/11/06 15:50:33 |
version 1.11, 2016/09/17 15:06:41 |
|
|
/* |
/* |
* Scroll the position table up. |
* Scroll the position table up. |
*/ |
*/ |
for (i = 1; i < sc_height; i++) |
for (i = 1; i < sc_height; i++) |
table[i-1] = table[i]; |
table[i-1] = table[i]; |
table[sc_height - 1] = pos; |
table[sc_height - 1] = pos; |
} |
} |
|
|
/* |
/* |
* Scroll the position table down. |
* Scroll the position table down. |
*/ |
*/ |
for (i = sc_height - 1; i > 0; i--) |
for (i = sc_height - 1; i > 0; i--) |
table[i] = table[i-1]; |
table[i] = table[i-1]; |
table[0] = pos; |
table[0] = pos; |
} |
} |
|
|
{ |
{ |
int i; |
int i; |
|
|
for (i = 0; i < sc_height; i++) |
for (i = 0; i < sc_height; i++) |
table[i] = -1; |
table[i] = -1; |
} |
} |
|
|
|
|
|
|
if (pos < table[0]) |
if (pos < table[0]) |
return (-1); |
return (-1); |
for (i = 1; i < sc_height; i++) |
for (i = 1; i < sc_height; i++) |
if (pos < table[i]) |
if (pos < table[i]) |
return (i-1); |
return (i-1); |
return (-1); |
return (-1); |
|
|
{ |
{ |
int i; |
int i; |
|
|
for (i = s; i <= e; i++) |
for (i = s; i <= e; i++) |
if (table[i] != -1 && table[i] != 0) |
if (table[i] != -1 && table[i] != 0) |
return (0); |
return (0); |
return (1); |
return (1); |
|
|
* Find the first line on the screen which has something on it, |
* Find the first line on the screen which has something on it, |
* and return the screen line number and the file position. |
* and return the screen line number and the file position. |
*/ |
*/ |
for (i = 0; i < sc_height; i++) |
for (i = 0; i < sc_height; i++) |
if (table[i] != -1) { |
if (table[i] != -1) { |
scrpos->ln = i+1; |
scrpos->ln = i+1; |
scrpos->pos = table[i]; |
scrpos->pos = table[i]; |