[comp.os.vms] Why does EVE switch the terminals WRAP setting off ?

RALPH@UHHEPG.BITNET (05/15/88)

Date: 14-MAY-1988 22:16:24.25
From: Ralph Becker-Szendy RALPH AT UHHEPG
To:   0::"info-vax@kl.sri.com",RALPH
Subj: Why does EVE switch the terminals WRAP setting off ?
Hi

I have a SET TERM/WRAP in my login-file, and it works nicely: it switches the
terminal to AUTO WRAP mode. But, whenever I get into EVE and back out, it
leaves the terminal with auto wrap off. That is annoying. Is that a bug
or a feature ?

I am using VMS 4.2 and the TPU/EVE which comes with it. This happens both
on a real DEC VT240 and on a Falco 5220 = cloned VT220.

Ralph Becker-Szendy                            RALPH@UHHEPG.PHYS.HAWAII.EDU
University of Hawaii / High Energy Physics Group        RALPH@UHHEPG.BITNET
Watanabe Hall #203, 2505 Correa Road, Honolulu, HI 96822      (808)948-7391

LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) (05/19/88)

	I have a SET TERM/WRAP in my login-file, and it works nicely: it
	switches the terminal to AUTO WRAP mode. But, whenever I get into EVE
	and back out, it leaves the terminal with auto wrap off. That is
	annoying. Is that a bug or a feature ?

	I am using VMS 4.2 and the TPU/EVE which comes with it. This happens
	both on a real DEC VT240 and on a Falco 5220 = cloned VT220.

EVE - well, TPU - turns autowrap on the terminal itself off because having it
on interferes with TPU's ability to control what is on the screen.  Ideally,
it should restore the previous setting when finished - but there's a problem:
There is no way to tell what the previous setting was on a VT200!  (The VT300
series terminals can be interogated to determine such things, but no the
VT200's.)

I think you understand this, and are setting the terminal /WRAP in the belief
that this will tell VMS that you want them to turn autowrap on - just as
setting the terminal /APPLICATION_KEYPAD tells them VMS that you want the
keypad set to application mode.  However, that is NOT what /WRAP means at
all.  Rather, it is a request that VMS ITSELF wrap lines that are too long;
it provides no information to VMS about how you want your terminal set up.

Actually, a combination of /WRAP with autowrap in the terminal makes little
sense:  Unless you are doing something unusual, the terminal will never see
any lines long enough to trigger its autowrap facility - VMS will have already
wrapped them.

There is no way of telling VMS that you want autowrap enabled on the terminal.
As a result, it will always end up turned off when you exit from TPU, unless
you somehow arrange to turn it back on again yourself.  (This could be done
by having a surrounding command file - or even a program that invokes callable
TPU - which sends out the appropriate escape sequence once TPU is done.)

							-- Jerry

rrk@byuvax.bitnet (05/20/88)

Any screen handler needs to know the state of the terminal--wrap on or wrap
off, to know what the codes it sends to the screen will do.  The terminal
port's wrap and the terminal's wrap feature do NOT go together--if you have
one, you don't need or want the other.  They operate at different levels.
There is no easy way to detect the state of the terminal's wrap feature,
and the port's wrap feature is worthless except in line-oriented applications.
So the only thing to do is set the terminal to a known state (wrap off)
and assume that all other applications will do the same and not assume that
wrap will be on or off just because the user set it that way initially.

Hope this addresses the problem and helps.

                                        AMMON::RAY

MCGUIRE@GRIN1.BITNET ("The Sysco Kid ", McGuire,Ed) (06/11/88)

I can shed additional light on the TPU/EVE versus terminal wrap question.

The I/O manual states that terminals with hardware wrap on are not supported.
Any wrapping to be done is done by the terminal driver, by inserting a newline
where necessary.  The terminal driver does this if the VAX/VMS wrap
characteristic is turned on.

There is a design error in VAXTPU's handling of both the terminal's hardware
wrap and the VAX/VMS wrap characteristic.

VAXTPU saves and turns off the VAX/VMS wrap characteristic, and also turns off
the terminal's hardware wrap just in case, to avoid obvious screen management
problems.

The error is that, if the VAX/VMS wrap characteristic is on, VAXTPU restores
that characteristic and also sets the terminal's hardware wrap on when exiting.
This causes strange behavior in other screen applications that assume that the
hardware wrap was always off.  Appendix B of the _VAX TPU Reference Manual_,
VAX/VMS Version 4.4, documents this behavior as if it were not a design error.

I wrote an SPR calling the information in the I/O manual to Digital's attention
and asking them to correct the design.  It took lots of clarifying phone calls
to make the problem clear to Digital's SPR response team. (If you are confused
at this point you at least understand why it took so many phone calls! :-)

Despite my efforts, VAXTPU still turns hardware wrap on if the VAX/VMS wrap
characteristic is on, at least in Version 4.7.  I never got a satisfactory
answer to my SPR.

Ed