build egl_xlib/ too (softpipe_egl.so library)
[mesa.git] / progs / xdemos / glxheads.c
index 42bfc835adf72313ceaca0385a96e6b340d09a94..b3290e90d51d26c1aae9641e0e9eab39cbb2b59e 100644 (file)
@@ -1,4 +1,3 @@
-/* $Id: glxheads.c,v 1.2 2000/11/10 17:23:07 brianp Exp $ */
 
 /*
  * Exercise multiple GLX connections on multiple X displays.
@@ -30,6 +29,7 @@
 #include <GL/glx.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 
 
@@ -57,7 +57,7 @@ static int NumHeads = 0;
 static void
 Error(const char *display, const char *msg)
 {
-   fprintf(stderr, "Error on display %s - %s\n", display, msg);
+   fprintf(stderr, "Error on display %s - %s\n", XDisplayName(display), msg);
    exit(1);
 }
 
@@ -247,9 +247,9 @@ static void
 PrintInfo(const struct head *h)
 {
    printf("Name: %s\n", h->DisplayName);
-   printf("  Display:     0x%x\n", h->Dpy);
-   printf("  Window:      0x%x\n", h->Win);
-   printf("  Context:     0x%x\n", h->Context);
+   printf("  Display:     %p\n", (void *) h->Dpy);
+   printf("  Window:      0x%x\n", (int) h->Win);
+   printf("  Context:     0x%lx\n", (long) h->Context);
    printf("  GL_VERSION:  %s\n", h->Version);
    printf("  GL_VENDOR:   %s\n", h->Vendor);
    printf("  GL_RENDERER: %s\n", h->Renderer);