STATIC
char line
[66] "Error message file not available\n/usr/lib/ex1.1strings";
STATIC
char *linp line
+ 33;
extern char *erpath line
+ 33;
if (pfast
== 0 && phadnl
)
else if (linp
>= &line
[63])
if (c
== '\n' && pfast
== 0) {
destline
=+ destcol
/ COLUMNS
;
destline
=+ destcol
/ COLUMNS
+ 1;
if (destcol
!= 0 && destcol
% COLUMNS
== 0)
if (AM
== 0 && outcol
== COLUMNS
)
} else if (c
>= ' ' && c
!= 0177) {
* Goto destline, destcol from outline, outcol.
* We must be cognizant of the capabilities of the terminal
* and (if its a crt) the possibly finite size of its screen.
* The following capability variables are considered:
* CA if true, can cursor address
* NDSPACE non-destructive space sequence (cursor right)
* UPLINE up line sequence (reverse line-feed)
* AM if true, terminal has automatic return at right margin
* Adjust the destination column to be
* non-virtual by performing line folding.
if (destcol
> COLUMNS
- 1) {
destline
=+ destcol
/ COLUMNS
;
if (outcol
> COLUMNS
- 1) {
l
= (outcol
+ 1) / COLUMNS
;
* Software automatic margins
* Outline has to be a real line...
* rounding outline and destline down corresponds
* to "rolling" the screen up.
if (outline
> LINES
- 1) {
destline
=- outline
- (LINES
- 1);
* If destination line is off the screen
* provide an appropriate "on screen" target,
* call ourselves recursively to get it,
* and then roll the screen up.
if (destline
> LINES
- 1) {
if (outline
< LINES
- 1) {
if (destline
< outline
&& !(CA
|| UPLINE
))
* we have no hope of reducing outline.
* Try to do the move with very local cursor motions,
* perhaps using a carriage return to move to
if (CA
&& !value(PRINTALL
)) {
/* off the line may not work on 3a here */
* ADM3A special - fix tabs
if (TTY
== 'ca' && (del
<= -4 || del
>= 4)) {
* A tip of the hatlo hat here too!
* v is vertical distance, then cost with cr
* h is horizontal distance, then direct move cost
while (outline
< destline
) {
if (!NOCR
&& (outcol
- destcol
> destcol
+ 1 || outcol
> destcol
&& !BS
)) {
while (outcol
> destcol
) {
while (outline
> destline
) {
while ((i
= ((outcol
+ 8) &~ 7)) < destcol
) {
while (outcol
< destcol
) {
* What a feat of engineering!
* A terminal with cursor addressibility
* but no cursor move 1 char right sequence!
if (NOCR
|| !value(OPTIMIZE
) || value(PRINTALL
))
error("Open and visual must be used interactively");
tty
[2] = (tty
[2] &~ (ECHO
|CRLF
)) | RAW
;