From owner-freebsd-questions Wed Feb 2 14:50: 6 2000 Delivered-To: freebsd-questions@freebsd.org Received: from watson.ficsgrp.com (watson.ficsgrp.com [194.74.111.3]) by builder.freebsd.org (Postfix) with ESMTP id E4DC54184 for ; Wed, 2 Feb 2000 14:50:01 -0800 (PST) Received: from mail.au.ficsgrp.com ([194.74.111.35]) by watson.ficsgrp.com (Netscape Messaging Server 3.6) with ESMTP id AAA6F36 for ; Wed, 2 Feb 2000 23:49:59 +0100 Received: from S1.com ([172.16.48.219]) by mail.au.ficsgrp.com (Netscape Messaging Server 3.6) with ESMTP id 1206; Thu, 3 Feb 2000 09:53:50 +1100 Message-ID: <3898B4C5.A4B8E058@S1.com> Date: Thu, 03 Feb 2000 09:50:45 +1100 From: Harry Woodward-Clarke X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 2.2.8-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 Cc: Roelof Osinga , David Banning , questions@FreeBSD.ORG Subject: Re: Help writing for ASCII terminals References: <000801bf695b$1136aec0$b71e05d1@tracker> <3898B0C4.A7CE0981@nisser.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi guys, > > > > I am interested in writing an application with graphics / text > > boxes for > > ASCII terminals. > > It seems xterm communicates through ASCII, but it seems to me that > > a > > non-xterminal > > couldn't even fire-up an X11 program - would it? > > > > Is there a widget set (maybe non-X11) out there that would help me > > do this? > > I think it would be better to get some experience with glass TTY's > first. Especially regarding the 'graphics' thing. Get your hands > on an Ann-Arbor, DEC, Televideo, Wyse, IBM, whatever terminal > and browse through its manual. Look into the termcap file if you > like. > > Basically the only graphics they've got in common is things like > /\+-| and like chars like = and _. > > It could probably fire up a X11 program, but would not be able to > render its output. > There is a library of terminal control functions under the generic title "curses" ($ man curses). Any half way decent book on Programming in C on Unix should introduce you to the routines. Unfortunately, I don't think they allow curves and irregular objects. Just straight lines (boxes, etc.), but they do work on just about any terminal defined in the termcap. Failing that, or rather, to supplement that, if you are going to be always using a specific family of terminals (e.g. VT220 or higher) you can get hold of the programming guide for that beast, and then output the specific graphic commands from within your program(s). Better, would be to write your main code to a generic 'graphic device', and then build up a library of modules to interpret that stuff to the specific terminals as you go. In fact, I would dare say that there are already libraries of these around somewhere! This wheel has got to have been invented before - many times over! hth, haxxa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message