[GRASS5] Driver Update

Malcolm Blue mblue at nb.sympatico.ca
Tue Apr 24 22:47:36 EDT 2001


Glynn,

Glynn Clements wrote:

> Malcolm Blue wrote:
>
> > The XDRIVER seems to work fine.  Justin,  since you're having the problem with
> > sync_driver() is it possible that libes/raster/io.c is still being copied from
> > libes/raster/socket.new?  /socket.new shouldn;t exist anymore, but....
>
> .. it shouldn't matter if it did.
>

That's true.  It shouldn't matter if the sockets.new/io.c routine was copied over
the new io.c.  Somehow I was thinking in reverse.  It would only happen if somehow
he was using the old libes/raster/fifo.orig/io.c version with the new
src/display/devices/* code compiled with USE_G_SOCKS.

Or maybe libraster didn't get removed.

The thing that made me think of this was the errors reported when the ipc version of
XDRIVER was mixed with the fifo version of io.c.

>
> 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.

>
> 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....)?

>
> 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.  It worked for me when I
tested (only tested a little).  Now you have both XDRIVER and all other drivers in
sync through one set of communication routines.  A HUGE improvement.

>
> 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.  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.

I've looked at the code changes you made and am amazed at how cleanly you did it.
It will make a huge difference for anyone trying to add new drivers, or even
understanding the drivers.

Not only did you merge common code into common routines, you merged almost all of
the sockets and fifo code into common routines - where they can be easily
distinguished.

Markus and I have already reported success with this new version.  I think your code
changes are very successful.  I'm just suggesting what may have gone wrong for
Justin.

Malcolm

>
> --
> 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'


---------------------------------------- 
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