/* xscreensaver, Copyright (c) 1992, 1997, 1998
- * Jamie Zawinski <jwz@netscape.com>
+ * 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
if (!strcmp (buf,"off") || !strcmp (buf, "false") || !strcmp (buf,"no"))
return 0;
fprintf (stderr, "%s: %s must be boolean, not %s.\n",
- progname, res_class, buf);
+ progname, res_name, buf);
return 0;
}
return color.pixel;
DEFAULT:
if (s) free (s);
- return (strcmp (res_class, "Background")
- ? WhitePixel (dpy, DefaultScreen (dpy))
- : BlackPixel (dpy, DefaultScreen (dpy)));
+ return ((strlen(res_class) >= 10 &&
+ !strcmp ("Background", res_class + strlen(res_class) - 10))
+ ? BlackPixel (dpy, DefaultScreen (dpy))
+ : WhitePixel (dpy, DefaultScreen (dpy)));
}
int
-parse_time (char *string, Bool seconds_default_p, Bool silent_p)
+parse_time (const char *string, Bool seconds_default_p, Bool silent_p)
{
unsigned int h, m, s;
char c;