Date: Wed, 2 Jul 2003 00:26:13 +0930 From: Malcolm Kay <malcolm.kay@internode.on.net> To: abc@ai1.anchorage.mtaonline.net, "freebsd-questions" <questions@freebsd.org> Subject: Re: vt/ansi codes Message-ID: <200307020026.13910.malcolm.kay@internode.on.net> In-Reply-To: <200307010729.h617TOkh086166@en26.ai1.anchorage.mtaonline.net> References: <200307010729.h617TOkh086166@en26.ai1.anchorage.mtaonline.net>
next in thread | previous in thread | raw e-mail | index | archive | help
I wonder with this is really relavent to FreeBSD questions. But in any case here is my 2 cents worth. On Tue, 1 Jul 2003 16:59, abc@ai1.anchorage.mtaonline.net wrote: > i am trying to develop terminal I/O based code, > and found myself meandering down a path > to acquire terminal knowledge (i don't > need to be told of SLang/ncurses/...). > Have you looked at termcap and terminfo, which of course underpin curses/ncurses. > i can't readily find an answer to this, but > i am assuming DEC terminals don't scroll left/right? > i've never used a "terminal", so i wouldn't know. > > there are ANSI escape codes that would be great to use, > but from the knowledge i have been able to acquire, it > appears vtXXX stuff is a fairly "lacking" subset of > ANSI 3.64 terminal display functions. there's many > aspects of ANSI 3.64 that would make display updates > over serial connections MUCH more efficient than > using vtXXX only codes. any comments providing It doesn't really matter what standards might be defined; the important issue is what functions commonly available terminals and terminal emulations have. > a better understanding about this would be > appreciated - cuz i'd hate to write a bunch > of inefficient code just to find out i *could* > scroll left/right with an ANSI escape sequence, etc. > > my goal is to generate a minimal set of > reliable cross-platform ANSI escape codes > one can use without fear of incompatibility. > maybe this is an impossibility - i dunno - but > there are a few sequences that seem to permeate > most data sheets. There are an enormous variety of terminals and terminal=20 emulations which have very little in the way of a common=20 subset of functions. If you must use one common subset then you had best stick to VT100, I guess that will get you=20 into between 1/3 and 2/3 of the terminals and emulations=20 out there. Unix and same other OS have dealt with the problem=20 by using databases of terminal information - termcap=20 and/or terminfo - so that terminals with different control=20 sequences can be managed by the same software and=20 the software doesn't need prior knowledge of the specific=20 control codes. > > as i read that this ANSI stuff was done way > back in 1979 - before i bought my Apple 2e, > i can't help but "gawk" with disbelief as > i find UNIX vtXXX terminal stuff to still be > fairly primitive a quarter century later. > i mean, an entire screen shouldn't have to > be sent over a serial line just to move a > cursor past the rightmost column in 2003 :) > In 1979 to send a full screen of say 2000 characters=20 took perhaps 1 to 5 minutes, now in a similar situation we commonly send that in 20 to 100 milliseconds so the=20 problem of dealing with different standards is largely=20 circumvented by using less in the way of fancy functions and instead just redrawing the screen. Now-a-days graphic displays generally get more attention (not that I think this is necessarily good) and means of updating=20 these with respect to the available bandwidth is receiving=20 considerable attention. > also, i assume: > > ioctl.h struct winsize, and > termios.h struct termios > > are available in one form or another on most > platforms? is the "RAW" termios state > a cross-platform state? or is it a > BSD specific state? > > thank you (please ditto any replies off-list). Malcolm Kay
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307020026.13910.malcolm.kay>