summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2006-12-13 08:30:26 -0700
committerBrian <brian@yutani.localnet.net>2006-12-13 08:30:26 -0700
commit73eee2402eec80b745141689ecff2d4ecf36035e (patch)
tree7f2e3c5e11fe42ca3611a1c0df8211e38b8dec1c
parent5b35132b41427798e02a66a8e39583fffbe9d232 (diff)
Use XDisplayName() when reporting errors (bug 8079).
-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;
}