summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--progs/xdemos/glthreads.c2
-rw-r--r--progs/xdemos/glxcontexts.c4
-rw-r--r--progs/xdemos/glxgears_fbconfig.c2
-rw-r--r--progs/xdemos/glxheads.c2
-rw-r--r--progs/xdemos/glxinfo.c2
-rw-r--r--progs/xdemos/glxswapcontrol.c2
-rw-r--r--progs/xdemos/manywin.c2
-rw-r--r--progs/xdemos/opencloseopen.c2
-rw-r--r--progs/xdemos/pbinfo.c2
-rw-r--r--progs/xdemos/yuvrect_client.c2
10 files changed, 11 insertions, 11 deletions
diff --git a/progs/xdemos/glthreads.c b/progs/xdemos/glthreads.c
index 83413383dd..989697fbca 100644
--- a/progs/xdemos/glthreads.c
+++ b/progs/xdemos/glthreads.c
@@ -473,7 +473,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Unable to open display %s\n", displayName);
+ fprintf(stderr, "Unable to open display %s\n", XDisplayName(displayName));
return -1;
}
}
diff --git a/progs/xdemos/glxcontexts.c b/progs/xdemos/glxcontexts.c
index fbc296ef62..a9ff326ed5 100644
--- a/progs/xdemos/glxcontexts.c
+++ b/progs/xdemos/glxcontexts.c
@@ -587,8 +587,8 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ fprintf(stderr, "Error: couldn't open display %s\n",
+ XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/glxgears_fbconfig.c b/progs/xdemos/glxgears_fbconfig.c
index acbadd21ac..2dac00b75d 100644
--- a/progs/xdemos/glxgears_fbconfig.c
+++ b/progs/xdemos/glxgears_fbconfig.c
@@ -575,7 +575,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/glxheads.c b/progs/xdemos/glxheads.c
index 0145a70e91..b3290e90d5 100644
--- a/progs/xdemos/glxheads.c
+++ b/progs/xdemos/glxheads.c
@@ -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);
}
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index a1aca5ad31..3e8e0be520 100644
--- a/progs/xdemos/glxinfo.c
+++ b/progs/xdemos/glxinfo.c
@@ -939,7 +939,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(displayName);
if (!dpy) {
- fprintf(stderr, "Error: unable to open display %s\n", displayName);
+ fprintf(stderr, "Error: unable to open display %s\n", XDisplayName(displayName));
return -1;
}
diff --git a/progs/xdemos/glxswapcontrol.c b/progs/xdemos/glxswapcontrol.c
index 0ed5ebe472..d9be984be5 100644
--- a/progs/xdemos/glxswapcontrol.c
+++ b/progs/xdemos/glxswapcontrol.c
@@ -749,7 +749,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return -1;
}
diff --git a/progs/xdemos/manywin.c b/progs/xdemos/manywin.c
index c9cca75134..cfea555210 100644
--- a/progs/xdemos/manywin.c
+++ b/progs/xdemos/manywin.c
@@ -59,7 +59,7 @@ static GLuint TexObj = 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);
}
diff --git a/progs/xdemos/opencloseopen.c b/progs/xdemos/opencloseopen.c
index 2e4de24c71..0b8d061843 100644
--- a/progs/xdemos/opencloseopen.c
+++ b/progs/xdemos/opencloseopen.c
@@ -91,7 +91,7 @@ make_window( const char * dpyName, const char *name,
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName);
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
exit(1);
}
diff --git a/progs/xdemos/pbinfo.c b/progs/xdemos/pbinfo.c
index 88d93c8da6..b43adf1bb7 100644
--- a/progs/xdemos/pbinfo.c
+++ b/progs/xdemos/pbinfo.c
@@ -95,7 +95,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
- printf("Error: couldn't open display %s\n", dpyName ? dpyName : ":0");
+ printf("Error: couldn't open display %s\n", XDisplayName(dpyName));
return 1;
}
diff --git a/progs/xdemos/yuvrect_client.c b/progs/xdemos/yuvrect_client.c
index 48f82cb759..e2b79a7c0e 100644
--- a/progs/xdemos/yuvrect_client.c
+++ b/progs/xdemos/yuvrect_client.c
@@ -296,7 +296,7 @@ main(int argc, char *argv[])
dpy = XOpenDisplay(dpyName);
if (!dpy) {
printf("Error: couldn't open display %s\n",
- dpyName ? dpyName : getenv("DISPLAY"));
+ XDisplayName(dpyName));
return -1;
}