[winGRASS] Re: generic Windows GRASS driver

Malcolm Blue mblue at nb.sympatico.ca
Thu Sep 20 21:00:35 EDT 2001


Glynn,

When I said there may have been changes, I was only referring to the little
snippet of code that I supplied.  Having delved into the labyrinth of code
before your cleanup, I was very appreciative of the changes that you had
made to that point.  I had need, a couple of other times, to go into the
depths of the display code and found it was cleaner still (circa late May).
I am very thankful for the MAJOR CLEANUP that you did in this and other
parts of the grass code base. This makes everyone's work easier and much
less prone to error! Keep up the good work. [Please]

Yes, XOpenDisplay(NULL) fails in the ntXlib that Mike is trying to use.
This library originated from an attempt by Microsoft to show developers how
to emulate X Window programs through MS NT libraries.  As far as I know, it
hasn't been too widely used, but the version recently integrated into the
Cygwin distribution has mainly been used for trivial sample ports (e.g.
XClock) and the rxvt code.  As the maintainer states, his main goal was to
get rxvt compiling and working.  I hope that as more Cygwin users try to
utilize this port that some of the deficiencies can be resolved.  In the
meantime, the use of the Null string instead of the NULL will work around
the problem.

And yes, I am sure it wasn't XDisplayName() that failed (at first), since
that only failed after the XOpenDisplay(NULL) called failed.  XDisplayName()
failed also, so I did not use it in the error message printed for the ntXlib
code.

Mike:  I hope that you will send your enhancements to the ntxlib code to the
developer/maintainer when you have completed your work.  I had intended to
do that (if and) when I finished the work.  By the way, sorry I didn't pass
this along with the Win98 fixes.  It would have saved you a bunch of work,
but since it was a work in progress, I removed it from the code I sent you
before.  It sounds like you're well on the way, but keep me in the loop in
case there is something that I have already tackled that I can help you
with.

Malcolm

-----Original Message-----
From: Glynn Clements [mailto:glynn.clements at virgin.net]
Sent: Thursday, September 20, 2001 9:15 PM
To: Malcolm Blue
Cc: Mike Thomas; wingrass at grass.itc.it; Roberto Flor
Subject: RE: [winGRASS] Re: generic Windows GRASS driver



Malcolm Blue wrote:

> [Note that this code was from Glynn's late April revision to the display
> devices code - there may be changes since then]

There certainly have been changes since then; I started in April, and
continued through May, finishing the bulk of the changes early in
June.

> The other major change was in XDRIVER/XDRIVER24/Graph_Set.c
>
>     /* Open the display using the $DISPLAY environment variable to
>      * locate the X server. Return 0 if cannot open. */
> #ifndef __NoX__
>     if (!(dpy = XOpenDisplay(NULL))) {
>         fprintf(stderr, "Graph_Set: can't open Display %s\n",
> XDisplayName(NULL));
> #else
>     if (!(dpy = XOpenDisplay(""))) {
>         fprintf(stderr, "Graph_Set: can't open Display \n");
> #endif
>         return -1;
>     }
>
>
> This fixes the Null String vs NULL difference that I mentioned earlier.

Are you saying that c? That would be a fairly
major deficiency, as most X applications pass NULL to XOpenDisplay().

Are you sure that the problem wasn't just the use of XDisplayName()?

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.281 / Virus Database: 149 - Release Date: 9/18/2001




More information about the grass-windows mailing list