Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site utcsrgv.UUCP Path: utzoo!utcsrgv!dave From: dave@utcsrgv.UUCP (Dave Sherman) Newsgroups: net.unix-wizards,net.periphs Subject: Anyone have code in C to interpret VT-100 sequences? Message-ID: <3839@utcsrgv.UUCP> Date: Wed, 11-Apr-84 12:15:02 EST Article-I.D.: utcsrgv.3839 Posted: Wed Apr 11 12:15:02 1984 Date-Received: Wed, 11-Apr-84 12:23:04 EST Organization: The Law Society of Upper Canada, Toronto Lines: 28 I have an extensive CAI system which has assumptions about VT-100s wired into it all over the place - in C programs, in text files, and in (run-time interpreted) CAI files. I'm in the process of making it terminal-independent, while not affecting its use on VT-100s. I have figured out that the way to do it is to modify putc to be a function (#undef putc) which checks the terminal type and simply passes the data on if it's a VT-100, converting it if not. When it gets an ESC, it will build up (with subsequent calls to putc) a string which records the VT-100 sequence, and at the end generate the appropriate sequence for the user's terminal. Has anyone ever written the code in C to interpret the VT-100 sequences? It's not hard to do, but it's a rather long process. I have to be able to take a string beginning with ESC (e.g., "[1;5m", figure out where it ends, and figure out which termcap routines to call (e.g., bold(), ul() or whatever). If someone's done all this already I'd *love* to get a copy. Thanks. Dave Sherman The Law Society of Upper Canada Toronto ARPA: ihnp4!utcsrgv!dave@BERKELEY UUCP: see below \|/ -- {allegra,cornell,decvax,ihnp4,linus,utzoo}!utcsrgv!dave