[GRASS5] Driver Update

Glynn Clements glynn.clements at virgin.net
Wed Apr 25 00:40:53 EDT 2001


Malcolm Blue wrote:

> > The old libes/raster/io.c should work fine with the new XDRIVER, and
> > vice-versa. The protocol hasn't changed, and nothing on the client
> > side depends upon the code in src/display/devices.
> 
> The io.c routines varied from fifo/ipc/sockets.  Thats how the clients communicate
> with the display drivers.  They all have to be in sync with code from
> src/display/devices.  That's why I mentioned it.  All of the d.mon/pgms programs
> link to rasterlib.  If there was an error in recreating this lib, then the clients
> won't be communicating on the same pipe/socket.

We can ignore such possibilities; the "no response from graphics
monitor" message can only be printed after a successful connect.

> > The only thing that changed regarding src/libes/raster/io.c was that
> > the fifo.orig/socket.new versions were merged into a single file which
> > used #ifdef USE_G_SOCKS to determine which code to use.
> >
> 
> Right....But, if he's not using the new io.c code (or the libraster version of
> that....)?

If he were trying to using the wrong transport, he'd get a different
error message.

> > The changes in src/display/devices were much more substantial.
> > Previously, each driver had it's own version of the transport code
> > (connect.c and bits of SWITCHER.c); well, apart from the fact that the
> > sockets stuff was only implemented for XDRIVER; the other drivers
> > wouldn't work if you used sockets.
> >
> 
> Sockets stuff was in src/display/lib for the other drivers.

Oh yes, that's right; there were two SWITCHER.c's (lib and
XDRIVER/XDRIVER24), and two versions of each of them. Only XDRIVER had
multiple versions of connect.c, but the socket code didn't use it.

> > Merging this wasn't all that straightforward, due the need for XDRIVER
> > to process X events while waiting for a connection.
> 
> No.  I think you did a great job.

"Did" is maybe a tad premature at this point; If I can solve Justin's
problems, we can use past tense ;)

> This will make everyone's maintenance a lot
> easier and, more importantly, prevent fixes to one driver that don't get applied to
> other drivers.

Sure; otherwise I probably would have left it alone, with the release
approaching.

Similar reasoning also applies to the batch of changes which I've just
committed (sanitising coordinate semantics), although none of those
are likely to cause total failure.

In a lot of cases, I couldn't figure out whether something should be
"<" or "<=", or where there should be a +/- 1, and it looked like
others before me didn't know either. So I made everything use "usual"
semantics, i.e. top/left inclusive, bottom/right exclusive.

-- 
Glynn Clements <glynn.clements at virgin.net>

---------------------------------------- 
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'



More information about the grass-dev mailing list