Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: net.micro.amiga,net.dcom Subject: What is a VT100, what is ANSI X3.64: answer Message-ID: <914@hoptoad.uucp> Date: Fri, 25-Jul-86 06:41:07 EDT Article-I.D.: hoptoad.914 Posted: Fri Jul 25 06:41:07 1986 Date-Received: Fri, 25-Jul-86 20:54:19 EDT References: <691@batcomputer.TN.CORNELL.EDU> Organization: Nebula Consultants in San Francisco Lines: 52 Xref: mnetor net.micro.amiga:3993 net.dcom:1165 In article <691@batcomputer.TN.CORNELL.EDU>, hsgj (Dan Green) writes: >> ED: Erase in Display. ESC [ Ps J >> EL: Erase in Line. ESC [ Ps K >> The bug is that no matter what you specify for the "Ps" parameter in either >> of these functions, the [Amiga] CONSOLE always performs function 0, which is >> "erase from current position to end of line/screen". > Public Apology: I just rechecked my references, and noticed that these > are *not* ANSI codes, but only VT100 codes. This is incorrect. I have a copy of the ANSI X3.64 standard here and the parameter for ED and EL is defined. The problem is: for a terminal, or terminal emulator, to claim ANSI X3.64 compatability does NOT mean that it implements everything in the standard. Rather, it means that IF it implements a certain function, it uses the standard escape code to represent that function. X3.64 contains all sorts of wierd escape codes for proportional spacing, typesetters, multiple fonts and colors, etc; if you were required to implement it all, nobody would use it. If you don't implement anything but the default parameter for Erase Line, you are free to ignore the parameter. Your alternative is to ignore the whole escape code and do nothing. Either is acceptable under the standard. Now, for a terminal or program to claim VT100 compatability, I would expect that in all cases it does what a VT100 does. However, having consulted to a terminal company that built an enhanced VT100 clone (Anderson Jacobson), I can inform you that finding all the nuances of the VT100 is a tough thing to do. Sometimes what you find is clearly wrong -- you found a VT100 bug. Mostly you just found a condition not defined by the ANSI standard, like what happens when the cursor hits the right margin on the bottom line when you are in insert mode, and you and the VT100 just didn't happen to do the same thing. If you are a conscientious "VT100 compatible" then you fix it. Mostly you aren't, so you don't bother -- or you don't even notice til a customer complains. Then the traditional response is "Well, it was Marketing that said it was a VT100, we just built it to be X3.64 compatible.". Moral: If you're writing a program, don't depend on VT100-private escape codes (clearly marked in the manual), and use as few oddball codes (like clear from here to beginning of line) as possible; this will make your program more portable, and it will run on "most" X3.64 terminals. Better to use termcap/terminfo, then your code will run on substantially *all* terminals. (There is a PD terminfo, for you non-unix types. See mod.sources archives "pcurses".) Morel #2: If you are marketing a terminal emulator, don't claim it's a VT100 unless you have made damn sure that it is. Unless you've spent a hundred man hours at it, you aren't sure yet. -- John Gilmore {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu jgilmore@lll-crg.arpa May the Source be with you!