projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
From http://www.jwz.org/xscreensaver/xscreensaver-5.39.tar.gz
[xscreensaver]
/
driver
/
xscreensaver.c
diff --git
a/driver/xscreensaver.c
b/driver/xscreensaver.c
index 45f0f0c48330afda7192a3b02fc6aee26100f965..f5f65dcf1b545fd11de6f4e6266ab1ad726d2114 100644
(file)
--- a/
driver/xscreensaver.c
+++ b/
driver/xscreensaver.c
@@
-1,4
+1,4
@@
-/* xscreensaver, Copyright (c) 1991-201
5
Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-201
8
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
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@
-305,7
+305,7
@@
xscreensaver %s, copyright (c) 1991-%s by Jamie Zawinski <jwz@jwz.org>\n\
\n\
For updates, online manual, and FAQ, please see the web page:\n\
\n\
\n\
For updates, online manual, and FAQ, please see the web page:\n\
\n\
- http://www.jwz.org/xscreensaver/\n\
+ http
s
://www.jwz.org/xscreensaver/\n\
\n");
fflush (stdout);
\n");
fflush (stdout);
@@
-317,7
+317,7
@@
xscreensaver %s, copyright (c) 1991-%s by Jamie Zawinski <jwz@jwz.org>\n\
Bool in_signal_handler_p = 0; /* I hate C so much... */
char *
Bool in_signal_handler_p = 0; /* I hate C so much... */
char *
-timestring (
void
)
+timestring (
time_t when
)
{
if (in_signal_handler_p)
{
{
if (in_signal_handler_p)
{
@@
-330,9
+330,10
@@
timestring (void)
}
else
{
}
else
{
- time_t now = time ((time_t *) 0);
- char *str = (char *) ctime (&now);
- char *nl = (char *) strchr (str, '\n');
+ char *str, *nl;
+ if (! when) when = time ((time_t *) 0);
+ str = (char *) ctime (&when);
+ nl = (char *) strchr (str, '\n');
if (nl) *nl = 0; /* take off that dang newline */
return str;
}
if (nl) *nl = 0; /* take off that dang newline */
return str;
}
@@
-348,7
+349,7
@@
blurb (void)
else
{
static char buf[255];
else
{
static char buf[255];
- char *ct = timestring();
+ char *ct = timestring(
0
);
int n = strlen(progname);
if (n > 100) n = 99;
strncpy(buf, progname, n);
int n = strlen(progname);
if (n > 100) n = 99;
strncpy(buf, progname, n);
@@
-424,7
+425,7
@@
saver_ehandler (Display *dpy, XErrorEvent *error)
" won't work. A \"log.txt\" file will also be written. Please *do*\n"
" include the complete \"log.txt\" file with your bug report.\n"
"\n"
" won't work. A \"log.txt\" file will also be written. Please *do*\n"
" include the complete \"log.txt\" file with your bug report.\n"
"\n"
- " http://www.jwz.org/xscreensaver/bugs.html explains how to create\n"
+ " http
s
://www.jwz.org/xscreensaver/bugs.html explains how to create\n"
" the most useful bug reports, and how to examine core files.\n"
"\n"
" The more information you can provide, the better. But please\n"
" the most useful bug reports, and how to examine core files.\n"
"\n"
" The more information you can provide, the better. But please\n"
@@
-494,8
+495,8
@@
startup_ehandler (String name, String type, String class,
}
fprintf (stderr, "\n"
}
fprintf (stderr, "\n"
- " http://www.jwz.org/xscreensaver/faq.html\n"
- " http://www.jwz.org/xscreensaver/man.html\n"
+ " http
s
://www.jwz.org/xscreensaver/faq.html\n"
+ " http
s
://www.jwz.org/xscreensaver/man.html\n"
"\n");
fflush (stderr);
"\n");
fflush (stderr);
@@
-529,7
+530,7
@@
set_version_string (saver_info *si, int *argc, char **argv)
*s = '_';
}
*s = '_';
}
- si->version = (char *) malloc (
5
);
+ si->version = (char *) malloc (
32
);
memcpy (si->version, screensaver_id + 17, 4);
si->version [4] = 0;
}
memcpy (si->version, screensaver_id + 17, 4);
si->version [4] = 0;
}
@@
-749,7
+750,7
@@
process_command_line (saver_info *si, int *argc, char **argv)
You control a running xscreensaver process by sending it messages\n\
with `xscreensaver-demo' or `xscreensaver-command'.\n\
. See the man pages for details, or check the web page:\n\
You control a running xscreensaver process by sending it messages\n\
with `xscreensaver-demo' or `xscreensaver-command'.\n\
. See the man pages for details, or check the web page:\n\
- http://www.jwz.org/xscreensaver/\n\n");
+ http
s
://www.jwz.org/xscreensaver/\n\n");
}
exit (1);
}
exit (1);
@@
-803,12
+804,12
@@
print_banner (saver_info *si)
"\n",
blurb());
"\n",
blurb());
- if (p->verbose_p && senescent_p ())
+ if (p->verbose_p && senesc
ul
ent_p ())
fprintf (stderr, "\n"
"*************************************"
"**************************************\n"
"%s: Warning: this version of xscreensaver is VERY OLD!\n"
fprintf (stderr, "\n"
"*************************************"
"**************************************\n"
"%s: Warning: this version of xscreensaver is VERY OLD!\n"
- "%s: Please upgrade! http://www.jwz.org/xscreensaver/\n"
+ "%s: Please upgrade! http
s
://www.jwz.org/xscreensaver/\n"
"*************************************"
"**************************************\n"
"\n",
"*************************************"
"**************************************\n"
"\n",
@@
-1197,10
+1198,10
@@
main_loop (saver_info *si)
{
if (si->demoing_p)
fprintf (stderr, "%s: demoing %d at %s.\n", blurb(),
{
if (si->demoing_p)
fprintf (stderr, "%s: demoing %d at %s.\n", blurb(),
- si->selection_mode, timestring());
+ si->selection_mode, timestring(
0
));
else
fprintf (stderr, "%s: blanking screen at %s.\n", blurb(),
else
fprintf (stderr, "%s: blanking screen at %s.\n", blurb(),
- timestring());
+ timestring(
0
));
}
maybe_reload_init_file (si);
}
maybe_reload_init_file (si);
@@
-1209,7
+1210,7
@@
main_loop (saver_info *si)
{
if (p->verbose_p)
fprintf (stderr, "%s: idle with blanking disabled at %s.\n",
{
if (p->verbose_p)
fprintf (stderr, "%s: idle with blanking disabled at %s.\n",
- blurb(), timestring());
+ blurb(), timestring(
0
));
/* Go around the loop and wait for the next bout of idleness,
or for the init file to change, or for a remote command to
/* Go around the loop and wait for the next bout of idleness,
or for the init file to change, or for a remote command to
@@
-1411,7
+1412,7
@@
main_loop (saver_info *si)
if (p->verbose_p)
fprintf (stderr, "%s: unblanking screen at %s.\n",
if (p->verbose_p)
fprintf (stderr, "%s: unblanking screen at %s.\n",
- blurb(), timestring ());
+ blurb(), timestring (
0
));
/* Kill before unblanking, to stop drawing as soon as possible. */
for (i = 0; i < si->nscreens; i++)
/* Kill before unblanking, to stop drawing as soon as possible. */
for (i = 0; i < si->nscreens; i++)
@@
-2323,7
+2324,6
@@
analyze_display (saver_info *si)
char buf [255];
int maj = 0, min = 0;
int dummy1, dummy2, dummy3;
char buf [255];
int maj = 0, min = 0;
int dummy1, dummy2, dummy3;
- int j;
/* Most of the extension version functions take 3 args,
writing results into args 2 and 3, but some take more.
/* Most of the extension version functions take 3 args,
writing results into args 2 and 3, but some take more.
@@
-2336,7
+2336,6
@@
analyze_display (saver_info *si)
if (!XQueryExtension (si->dpy, exts[i].name, &op, &event, &error))
continue;
sprintf (buf, "%s: ", blurb());
if (!XQueryExtension (si->dpy, exts[i].name, &op, &event, &error))
continue;
sprintf (buf, "%s: ", blurb());
- j = strlen (buf);
strcat (buf, exts[i].desc);
if (!version_fn_2)
strcat (buf, exts[i].desc);
if (!version_fn_2)