Using "am" or "xn" in programs considered harmful
John Gilmore
gnu at hoptoad.uucp
Fri Aug 8 20:33:32 AEST 1986
Aha! The problem is coming out!
Some people (Doug Gwyn for example) think "am" means this:
am:xn@ terminal moves to next line after col 80
am:xn: terminal moves to next line after col 80 but ignores next NL
am@ Can't depend on what terminal does in col 80
On the other hand, Barry Margolin points out that "Applications need to
know whether they can safely output to [column 80 of the last line]
without causing the screen to scroll." The above definitions provide
no guidance about this; so some software appears to be assuming:
am@ terminal stays in col 80 after printing char there
This is the problem I've been facing.
So, let me modify my suggestion. If "am" is set, you can assume that
the cursor will move to the next line. If "am" is not set, **you must
not assume anything**. In either case, you can't safely write to column
80 of the last line.
This would mean that removing "am" from a termcap entry would never
cause it to fail. That is what I am after.
--
John Gilmore {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu jgilmore at lll-crg.arpa
May the Source be with you!
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list