[winGRASS] Re: generic Windows GRASS driver

Glynn Clements glynn.clements at virgin.net
Thu Sep 20 20:14:43 EDT 2001


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 XOpenDisplay(NULL) fails? 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>



More information about the grass-windows mailing list