summaryrefslogtreecommitdiffstats
path: root/driver/test-xinerama.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/test-xinerama.c')
-rw-r--r--driver/test-xinerama.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/driver/test-xinerama.c b/driver/test-xinerama.c
index 8bafbb0..cd8add4 100644
--- a/driver/test-xinerama.c
+++ b/driver/test-xinerama.c
@@ -1,5 +1,5 @@
/* test-xinerama.c --- playing with the Xinerama extension.
- * xscreensaver, Copyright (c) 2003 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright © 2003-2021 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -30,26 +30,9 @@
#include <X11/Xproto.h>
#include <X11/extensions/Xinerama.h>
-char *progname = 0;
+#include "blurb.h"
char *progclass = "XScreenSaver";
-static const char *
-blurb (void)
-{
- static char buf[255];
- time_t now = time ((time_t *) 0);
- char *ct = (char *) ctime (&now);
- int n = strlen(progname);
- if (n > 100) n = 99;
- strncpy(buf, progname, n);
- buf[n++] = ':';
- buf[n++] = ' ';
- strncpy(buf+n, ct+11, 8);
- strcpy(buf+n+9, ": ");
- return buf;
-}
-
-
int
main (int argc, char **argv)
{
@@ -63,13 +46,12 @@ main (int argc, char **argv)
Widget toplevel_shell = XtAppInitialize (&app, progclass, 0, 0,
&argc, argv, 0, 0, 0);
Display *dpy = XtDisplay (toplevel_shell);
- XtGetApplicationNameAndClass (dpy, &progname, &progclass);
if (!XineramaQueryExtension(dpy, &event_number, &error_number))
{
fprintf(stderr, "%s: XineramaQueryExtension(dpy, ...) ==> False\n",
blurb());
- fprintf(stderr, "%s: server does not support the Xinerama extension.\n",
+ fprintf(stderr, "%s: server does not support the Xinerama extension\n",
blurb());
exit(1);
}
@@ -80,7 +62,7 @@ main (int argc, char **argv)
if (!XineramaIsActive(dpy))
{
fprintf(stderr, "%s: XineramaIsActive(dpy) ==> False\n", blurb());
- fprintf(stderr, "%s: server says Xinerama is turned off.\n", blurb());
+ fprintf(stderr, "%s: server says Xinerama is turned off\n", blurb());
exit(1);
}
else