Article View: comp.std.unix
Article #91Re: standard unix graphics package
From: Mark Horton
Date: Fri, 20 Oct 1989 21:32
Date: Fri, 20 Oct 1989 21:32
36 lines
2018 bytes
2018 bytes
From: mark@cbnews.ATT.COM (Mark Horton)
In article <404@longway.TIC.COM> gwyn@brl.arpa (Doug Gwyn) writes:
>If there is this much variation possible simply in the UNIX
>portability of the "Hello, world" program, imagine how much
>more difficult it would be for a GRAPHICS program (as in the
>original specification). By the way, we all understand the
>"graphics" requirement to not be satisfied by a text-oriented
>program.
I think it should be possible, but you have to stretch the notion
of "graphics" a bit. Back in the dark ages when we all used character
oriented output devices, there were programs that plotted graphs like this:
for x from start to stop
y = f(x)
nblank = y * 80 /* assumes function range 0..1 */
for i from 1 to y
putchar(' ')
putchar('*')
putchar('\n');
This isn't really in C, but you get the idea. Assume a 66x80 resolution
output device and draw with stars and blanks. Do all I/O with getchar
and putchar and I think it works everywhere (unless there's some gotcha
with ANSI C) with no #include files.
If you want to get really fancy, use graphcap (see the source to vfontinfo
in 4.2BSD for the tables and an example of using them) and you can get
better resolution: 164x160 on that same printed page. This does assume
lower case, which many early UNIX systems didn't have, but that just
makes the output ugly if you have only upper case, it will still run.
Mark
Volume-Number: Volume 17, Number 45
Technical Details
Message-ID:
<415@longway.TIC.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!longway!std-unixReferences:
<404@longway.TIC.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!longway!std-unix From: mark@cbnews.ATT.COM (Mark Horton) Newsgroups: comp.std.unix Subject: Re: standard unix graphics package Message-ID: <415@longway.TIC.COM> Date: 20 Oct 89 21:32:00 GMT References: <404@longway.TIC.COM> Sender: std-unix@longway.TIC.COM Reply-To: mark@cbnews.ATT.COM (Mark Horton,45264,cb,1D119,6148604276) Organization: AT&T Bell Laboratories Lines: 36 Approved: jsq@longway.tic.com (Moderator, John S. Quarterman)