Screen Editing

T

Tak-Shing Chan

Which are the ones running a widely-used non-vt100-compatible terminal?

Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.

Tak-Shing
 
T

Thomas Dickey

Tak-Shing Chan said:
Which are the ones running a widely-used non-vt100-compatible terminal?
[/QUOTE]
Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.

A serial port is a data connection (a wire)
It doesn't present data (a terminal).

Again, unless it's widely used, it doesn't add to the "most" category.
 
T

Tak-Shing Chan

Tak-Shing Chan said:
[...]
Most terminals, particularly modern ones, will clear the screen if
you simply send them a formfeed. It's not guaranteed, but it's a
similar kind of assumption to backspace will move the cursor left
which seems pretty much standard these days.

I haven't found that to be the case for any of the terminal emulators
I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
command window, the GNU "screen" program, and rxvt; none of them clear
the screen in response to a formfeed character.

I have just posted a long list elsethread.

You posted a long list which has no obvious relevance to the point in
question. The list is a long way from "most terminals" and few of the
ones listed count as modern (one was recently sold as a rare antique
computer, many are archaic museum pieces).

OK. Let me trim it down to just one item: the Sun console.
It is certainly still in use today, and it does clear the screen
with '\f'. But you are absolutely right, this has little
relevance to ``most terminals''. Perhaps I should s/most/some/g.

Tak-Shing
 
T

Tak-Shing Chan

A serial port is a data connection (a wire)
It doesn't present data (a terminal).

The serial driver doesn't, but the console driver does.
Again, unless it's widely used, it doesn't add to the "most" category.

Fair enough.

Tak-Shing
 
T

Thomas Dickey

OK. Let me trim it down to just one item: the Sun console.
It is certainly still in use today, and it does clear the screen
with '\f'. But you are absolutely right, this has little
relevance to ``most terminals''. Perhaps I should s/most/some/g.

yes - "some". As a colleague pointed out to me (quite a while ago),
as I was modifying a terminal driver to do form-feeds, _printers_
do form-feeds, terminals are not expected to do this.
 
K

Keith Thompson

Tak-Shing Chan said:
What about ISO 9899:1990, 5.2.2, where escape sequences for
display devices (such as '\f', '\b' and '\r') are defined? The
only problem with these are quality of implementation issues.

It says that \f (form feed) "moves the active position to the initial
position at the start of the next logical page."

I don't see anything there about clearing the screen.

I think we all know by now that *some* terminals and terminal
emulators will clear the screen in response to a formfeed characters,
and some will not. (It happens that most of the ones I use or have
access to don't. I suspect my experience in this case is typical; I
certainly don't claim that it's universal.)

In my opinion, the statement in question 19.4 of the FAQ that clearing
the display by printing a formfeed character is "halfway portable" is
incorrect, or at least over-stated.
 
T

Tak-Shing Chan

It says that \f (form feed) "moves the active position to the initial
position at the start of the next logical page."

I don't see anything there about clearing the screen.

I think we all know by now that *some* terminals and terminal
emulators will clear the screen in response to a formfeed characters,
and some will not. (It happens that most of the ones I use or have
access to don't. I suspect my experience in this case is typical; I
certainly don't claim that it's universal.)

In my opinion, the statement in question 19.4 of the FAQ that clearing
the display by printing a formfeed character is "halfway portable" is
incorrect, or at least over-stated.

I agree with you vis-a-vis '\f', but my reply above was an
attempt to paint a larger picture---that it is indeed possible to
``edit'' something that is already written on the screen, if not
by '\f', then by '\r' or '\b' on the current line.

Tak-Shing
 
D

Dik T. Winter

> I agree with you vis-a-vis '\f', but my reply above was an
> attempt to paint a larger picture---that it is indeed possible to
> ``edit'' something that is already written on the screen, if not
> by '\f', then by '\r' or '\b' on the current line.

An interesting discussion. But when I go back to what the OP posted
it has gone a bit off-topic. And to get more off-topic, I have used
a full-screen editor that worked across half-duplex lines, so it was
only when you entered a CR that the base system knew what you had been
doing. (FSE under NOS/VE on CDC Cybers.)
 
C

Christopher Benson-Manica

(WRT clearing the "screen")
For some reason, no one liked this suggestion of mine when I
brought it during the last discussion of this issue:
for (;;)
putchar('\n');

How about

{
int idx, times=1;
while( 1 ) {
for( idx=0; idx < times; idx++ ) {
putchar( '\n' );
}
printf( "Was that enough?\n" );
if( getc(stdin) == 'n' ) {
times++;
continue;
}
break;
}
}

? This way the programmer can decide when the screen is clear enough,
assuming of course I haven't made any silly mistakes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top