9fans archive / 2000 / 08 / 82 /    prev next

From: "Russ Cox" <rsc@pla...>
Subject: Re: [9fans] ugrading edition 2 graphics to edition 3
Date: Wed, 2 Aug 2000 16:33:10 -0400

The easiest thing at the moment is not to use
the APE -- #include <u.h>, then <libc.h>,
and even <stdio.h> if you want it, and you'll
have a pretty sensible setup.

As far as the panel library goes, there is no
direct replacement.  

As far as converting libg.h to draw.h, the big
difference is that bitblt is replaced by draw, and
while there is some intersection (block copies,
block fills), if you have a program that is heavy
into things like XORing pixels, it will need to be
rethought for the new driver.  There are also
little differences -- add became addpt, etc.

For little graphical programs, there are a 
couple at www.eecs.harvard.edu/~rsc/plan9.html;
look for click.c, bargraph.c, mixer.c, cdplay.tar.gz,
in increasing order of complexity.

As far as file systems, there is a rot13fs.c 
on the same page, which is a 9P filter rather
than a 9P server.  /sys/src/cmd/archfs.c
is a very minimal server but uses a 9P
library to do the dirty work.  /sys/src/cmd/rdbfs.c is a fairly 
simple completely self-contained 9P server.

Russ