From 2954208d00d422b34fa3a69631b0a091f17a349d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 2 Dec 2020 08:23:52 +0100 Subject: 5.44 --- Makefile.in | 4 + README | 14 + README.hacking | 2 +- driver/Makefile.in | 23 +- driver/XScreenSaver.ad.in | 12 +- driver/demo-Gtk.c | 23 +- driver/lock.c | 15 + driver/passwd.c | 19 +- driver/prefs.c | 55 +- driver/subprocs.c | 6 +- driver/timers.c | 8 +- driver/types.h | 3 +- driver/windows.c | 11 +- driver/xscreensaver-getimage-file | 5 +- driver/xscreensaver-text | 21 +- driver/xscreensaver.c | 12 +- hacks/Makefile.in | 36 +- hacks/analogtv-cli.c | 66 +- hacks/barcode.c | 28 +- hacks/bsod.c | 208 ++++- hacks/compile_axp.com | 1 + hacks/compile_decc.com | 1 + hacks/config/README | 4 +- hacks/config/bsod.xml | 8 +- hacks/config/deepstars.xml | 2 + hacks/config/dnalogo.xml | 12 - hacks/config/etruscanvenus.xml | 143 +++ hacks/config/gibson.xml | 65 ++ hacks/config/hypertorus.xml | 6 +- hacks/config/klein.xml | 12 +- hacks/config/projectiveplane.xml | 4 + hacks/config/razzledazzle.xml | 2 +- hacks/config/romanboy.xml | 4 + hacks/config/scooter.xml | 42 + hacks/drift.c | 3 +- hacks/eruption.c | 330 ++++--- hacks/filmleader.c | 13 +- hacks/fireworkx.c | 1 + hacks/glx/Makefile.in | 50 +- hacks/glx/deepstars.c | 8 +- hacks/glx/etruscanvenus.c | 1825 +++++++++++++++++++++++++++++++++++++ hacks/glx/etruscanvenus.man | 372 ++++++++ hacks/glx/gibson.c | 1335 +++++++++++++++++++++++++++ hacks/glx/gibson.man | 88 ++ hacks/glx/glhanoi.c | 9 +- hacks/glx/glmatrix.c | 2 +- hacks/glx/gravitywell.c | 6 + hacks/glx/hypertorus.c | 441 ++++++--- hacks/glx/hypertorus.man | 76 +- hacks/glx/klein.c | 815 ++++++++++++----- hacks/glx/klein.man | 138 +-- hacks/glx/polytopes.c | 10 +- hacks/glx/projectiveplane.c | 460 +++++++--- hacks/glx/projectiveplane.man | 132 +-- hacks/glx/romanboy.c | 358 +++++--- hacks/glx/romanboy.man | 110 ++- hacks/glx/sonar-icmp.c | 22 +- hacks/glx/sonar.c | 8 +- hacks/glx/starwars.c | 12 +- hacks/halftone.c | 1 + hacks/halo.c | 2 + hacks/images/Makefile | 2 + hacks/images/Makefile.in | 2 + hacks/moire2.c | 2 +- hacks/munch.c | 12 +- hacks/munge-ad.pl | 1 - hacks/rd-bomb.c | 10 + hacks/recanim.c | 12 +- hacks/scooter.c | 957 +++++++++++++++++++ hacks/scooter.man | 79 ++ hacks/screenhack.c | 8 +- hacks/webcollage | 1 + hacks/xlockmore.c | 36 +- hacks/xlyap.c | 2 +- hacks/xmatrix.c | 4 +- jwxyz/jwxyz-android.c | 5 +- jwxyz/jwxyz-gl.c | 273 +++--- jwxyz/jwxyzI.h | 1 + po/POTFILES.in | 5 +- setup.com | 1 + utils/version.h | 2 +- xscreensaver.spec | 2 +- 82 files changed, 7663 insertions(+), 1258 deletions(-) create mode 100644 hacks/config/etruscanvenus.xml create mode 100644 hacks/config/gibson.xml create mode 100644 hacks/config/scooter.xml create mode 100644 hacks/glx/etruscanvenus.c create mode 100644 hacks/glx/etruscanvenus.man create mode 100644 hacks/glx/gibson.c create mode 100644 hacks/glx/gibson.man create mode 100644 hacks/scooter.c create mode 100644 hacks/scooter.man diff --git a/Makefile.in b/Makefile.in index e0795b2..52f1b4f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,6 +69,10 @@ tar:: rm -f configure ; \ $(MAKE2) configure ; \ $(MAKE2) version-date distdepend ; \ + $(MAKE2) _tar + +_tar: + @ \ VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' utils/version.h` ; \ NAME="xscreensaver-$$VERS" ; \ rm -rf $$NAME ; ln -s . $$NAME ; \ diff --git a/README b/README index 118a061..0b55bd1 100644 --- a/README +++ b/README @@ -46,6 +46,20 @@ XScreenSaver has an extensive manual -- please read it! =============================================================================== +5.44 * New hacks, `gibson', `etruscanvenus' and `scooter'. + * BSOD supports Tivo and Nintendo. + * New color options in `romanboy', `projectiveplane', `hypertorus' + and `klein'. + * macOS: Fixed "Use random screen saver" on macOS 10.15. + * iOS: Supports dark mode. + * iOS: Fixed image loading on iOS 13. + * iOS: Fixed rotation on iOS 13 (Apple incompatibly breaks rotation + every two years as a matter of policy). + * Performance tweaks for `eruption', `fireworkx', `halftone', `halo', + `moire2', `rd-bomb'. + * X11: Always use $HOME/.xscreensaver, not getpwuid's directory. + * Various bug fixes. + 5.43 * New hacks, `GravityWell', `DeepStars'. * GLPlanet now supports the Mercator projection. * Bouncing Cow has mathematically ideal cows (spherical, frictionless). diff --git a/README.hacking b/README.hacking index 451aec1..f2958b4 100644 --- a/README.hacking +++ b/README.hacking @@ -90,7 +90,7 @@ The XScreenSaver API state machine. You may not store global state in global variables, or in function-local - static variables. All of your runtime state must be encapsulted in the + static variables. All of your runtime state must be encapsulated in the "state" object created by your "init" function. If you use global or static variables, your screen saver will not work properly on macOS. diff --git a/driver/Makefile.in b/driver/Makefile.in index 4ca00b6..7baf504 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -301,7 +301,7 @@ install-program: $(EXES) echo $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver ; \ $$inst xscreensaver $(install_prefix)$(bindir)/xscreensaver @for exe in xscreensaver-command xscreensaver-demo \ - xscreensaver-getimage @EXES_OSX@ ; do \ + xscreensaver-getimage @EXES_OSX@ @EXES_SYSTEMD@ ; do \ echo $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \ $(INSTALL_PROGRAM) $$exe $(install_prefix)$(bindir)/$$exe ; \ done @@ -633,7 +633,9 @@ clean: distclean: clean -rm -f Makefile XScreenSaver.ad \ - TAGS *~ "#"* screensaver-properties.desktop + TAGS *~ "#"* screensaver-properties.desktop \ + xscreensaver-demo.glade2 \ + xscreensaver.pam # Adds all current dependencies to Makefile depend: XScreenSaver_ad.h XScreenSaver_Xm_ad.h @@ -651,9 +653,10 @@ distdepend: check_men update_ad_version XScreenSaver_ad.h XScreenSaver_Xm_ad.h $(DEPEND) -w 0 -f - \ -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \ $(INCLUDES_1) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \ - $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(GETIMG_SRCS_1) \ - $(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \ - $(SYSTEMD_SRCS) $(TEST_SRCS) 2>/dev/null | \ + $(SAVER_SRCS_1) $(SYSTEMD_SRCS) $(MOTIF_SRCS) $(GTK_SRCS) \ + $(PWENT_SRCS) $(PWHELPER_SRCS) $(KERBEROS_SRCS) $(PAM_SRCS) \ + $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) $(GETIMG_SRCS_1) \ + $(PDF2JPEG_SRCS) $(TEST_SRCS) 2>/dev/null | \ sort -d | \ ( \ awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \ @@ -866,7 +869,7 @@ test-mlstring.o: mlstring.c test-mlstring: test-mlstring.o $(CC) -DTEST $(LDFLAGS) -o $@ test-mlstring.o $(SAVER_LIBS) -TEST_FADE_OBJS = test-fade.o $(UTILS_SRC)/fade.o $(DEMO_UTIL_OBJS) +TEST_FADE_OBJS = test-fade.o $(UTILS_BIN)/fade.o $(DEMO_UTIL_OBJS) test-fade: test-fade.o $(UTILS_BIN)/fade.o $(CC) $(LDFLAGS) -o $@ $(TEST_FADE_OBJS) $(SAVER_LIBS) @@ -923,11 +926,19 @@ lock.o: $(srcdir)/types.h lock.o: $(UTILS_SRC)/resources.h lock.o: $(srcdir)/xscreensaver.h mlstring.o: $(srcdir)/mlstring.h +passwd-helper.o: ../config.h +passwd-helper.o: $(srcdir)/prefs.h +passwd-helper.o: $(srcdir)/types.h +passwd-helper.o: $(srcdir)/xscreensaver.h +passwd-kerberos.o: ../config.h passwd.o: $(srcdir)/auth.h passwd.o: ../config.h passwd.o: $(srcdir)/prefs.h passwd.o: $(srcdir)/types.h passwd.o: $(srcdir)/xscreensaver.h +passwd-pam.o: $(srcdir)/auth.h +passwd-pam.o: ../config.h +passwd-pam.o: $(srcdir)/types.h passwd-pwent.o: ../config.h prefs.o: ../config.h prefs.o: $(srcdir)/prefs.h diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 5deb334..cfdd1a2 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! a screen saver and locker for the X window system ! by Jamie Zawinski ! -! version 5.43 -! 09-Jul-2019 +! version 5.44 +! 20-Mar-2020 ! ! See "man xscreensaver" for more info. The latest version is always ! available at https://www.jwz.org/xscreensaver/ @@ -323,7 +323,7 @@ XScreenSaver.bourneShell: /bin/sh *passwd.user.label: Username: *splash.heading.label: XScreenSaver %s -*splash.body.label: Copyright \251 1991-2019 by +*splash.body.label: Copyright \251 1991-2020 by *splash.body2.label: Jamie Zawinski *splash.demo.label: Settings *splash.help.label: Help @@ -445,6 +445,7 @@ XScreenSaver.bourneShell: /bin/sh @GL_KLUDGE@ GL: menger -root \n\ @GL_KLUDGE@ GL: molecule -root \n\ rotzoomer -root \n\ + scooter -root \n\ speedmine -root \n\ @GL_KLUDGE@ GL: starwars -root \n\ @GL_KLUDGE@ GL: stonerview -root \n\ @@ -577,7 +578,9 @@ XScreenSaver.bourneShell: /bin/sh @GL_KLUDGE@ GL: razzledazzle -root \n\ vfeedback -root \n\ @GL_KLUDGE@ GL: deepstars -root \n\ -@GL_KLUDGE@ GL: gravitywell -root \n +@GL_KLUDGE@ GL: gravitywell -root \n\ +@GL_KLUDGE@ GL: etruscanvenus -root \n\ +@GL_KLUDGE@ GL: gibson -root \n @@ -613,6 +616,7 @@ XScreenSaver.bourneShell: /bin/sh *hacks.dnalogo.name: DNA Logo *hacks.dymaxionmap.name: DymaxionMap *hacks.energystream.name: EnergyStream +*hacks.etruscanvenus.name: EtruscanVenus *hacks.euler2d.name: Euler2D *hacks.fadeplot.name: FadePlot *hacks.filmleader.name: FilmLeader diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c index be4a238..da98c53 100644 --- a/driver/demo-Gtk.c +++ b/driver/demo-Gtk.c @@ -1,5 +1,5 @@ /* demo-Gtk.c --- implements the interactive demo-mode and options dialogs. - * xscreensaver, Copyright (c) 1993-2019 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2020 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -550,7 +550,10 @@ warning_dialog (GtkWidget *parent, const char *message, if (!parent || !GET_WINDOW (parent)) /* too early to pop up transient dialogs */ { - fprintf (stderr, "%s: too early for dialog?\n", progname); + fprintf (stderr, + "%s: too early for warning dialog?" + "\n\n\t%s\n\n", + progname, message); free(msg); return False; } @@ -1043,7 +1046,9 @@ await_xscreensaver (state *s) strcat (buf, STFU _("You are running as root. This usually means that xscreensaver\n" "was unable to contact your X server because access control is\n" - "turned on. Try running this command:\n" + "turned on." +/* + " Try running this command:\n" "\n" " xhost +localhost\n" "\n" @@ -1053,9 +1058,10 @@ await_xscreensaver (state *s) "on to this machine to access your screen, which might be\n" "considered a security problem. Please read the xscreensaver\n" "manual and FAQ for more information.\n" + */ "\n" "You shouldn't run X as root. Instead, you should log in as a\n" - "normal user, and `su' as necessary.")); + "normal user, and `sudo' as necessary.")); else strcat (buf, _("Please check your $PATH and permissions.")); @@ -4422,7 +4428,8 @@ kde_screensaver_active_p (void) FILE *p = popen ("dcop kdesktop KScreensaverIface isEnabled 2>/dev/null", "r"); char buf[255]; - fgets (buf, sizeof(buf)-1, p); + if (!p) return False; + if (!fgets (buf, sizeof(buf)-1, p)) return False; pclose (p); if (!strcmp (buf, "true\n")) return True; @@ -4433,7 +4440,11 @@ kde_screensaver_active_p (void) static void kill_kde_screensaver (void) { - system ("dcop kdesktop KScreensaverIface enable false"); + /* Use empty body to kill warning from gcc -Wall with + "warning: ignoring return value of 'system', + declared with attribute warn_unused_result" + */ + if (system ("dcop kdesktop KScreensaverIface enable false")) {} } diff --git a/driver/lock.c b/driver/lock.c index 7696f30..d36481e 100644 --- a/driver/lock.c +++ b/driver/lock.c @@ -1400,6 +1400,8 @@ destroy_passwd_window (saver_info *si) memset (pw, 0, sizeof(*pw)); free (pw); si->pw_data = 0; + + si->unlock_dismiss_time = time((time_t *) 0); } @@ -2216,6 +2218,7 @@ Bool unlock_p (saver_info *si) { saver_preferences *p = &si->prefs; + time_t now = time ((time_t *) 0); if (!si->unlock_cb) { @@ -2225,6 +2228,18 @@ unlock_p (saver_info *si) raise_window (si, True, True, True); + /* If your cat is sitting on the return key, don't thrash the window. + Only one failed/cancelled unlock per 2 seconds. + */ + if (si->unlock_dismiss_time >= now - 1) + { + if (p->verbose_p) + fprintf (stderr, "%s: unlock: thrashing: RET held down?\n", blurb()); + XSync (si->dpy, False); +# undef sleep + sleep (2); /* This is less than ideal, but fine */ + } + xss_authenticate(si, p->verbose_p); return (si->unlock_state == ul_success); diff --git a/driver/passwd.c b/driver/passwd.c index f443726..68e1a0b 100644 --- a/driver/passwd.c +++ b/driver/passwd.c @@ -1,5 +1,5 @@ /* passwd.c --- verifying typed passwords with the OS. - * xscreensaver, Copyright (c) 1993-2018 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2019 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -251,7 +251,7 @@ do_syslog (saver_info *si, Bool verbose_p) { # ifdef HAVE_SYSLOG struct passwd *pw = getpwuid (getuid ()); - char *d = DisplayString (si->dpy); + char *d = (si->dpy ? DisplayString (si->dpy) : 0); char *u = (pw && pw->pw_name ? pw->pw_name : "???"); int opt = 0; int fac = 0; @@ -324,8 +324,9 @@ xss_authenticate(saver_info *si, Bool verbose_p) si->cached_passwd && !*si->cached_passwd) { - fprintf (stderr, "%s: assuming null password means cancel.\n", - blurb()); + if (verbose_p) + fprintf (stderr, "%s: assuming null password means cancel.\n", + blurb()); si->unlock_state = ul_cancel; } @@ -354,11 +355,11 @@ xss_authenticate(saver_info *si, Bool verbose_p) { /* If any auth method gets a cancel or timeout, don't try the next auth method! We're done! */ - fprintf (stderr, - "%s: authentication via %s %s.\n", - blurb(), methods[i].name, - (si->unlock_state == ul_cancel - ? "cancelled" : "timed out")); + if (verbose_p) + fprintf (stderr, "%s: authentication via %s %s.\n", + blurb(), methods[i].name, + (si->unlock_state == ul_cancel + ? "cancelled" : "timed out")); goto DONE; } } diff --git a/driver/prefs.c b/driver/prefs.c index 8fb029e..94e7a0c 100644 --- a/driver/prefs.c +++ b/driver/prefs.c @@ -1,5 +1,5 @@ /* dotfile.c --- management of the ~/.xscreensaver file. - * xscreensaver, Copyright (c) 1998-2018 Jamie Zawinski + * xscreensaver, Copyright (c) 1998-2020 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -136,33 +136,34 @@ init_file_name (void) if (!file) { uid_t uid = getuid (); - struct passwd *p = getpwuid (uid); + const char *home = getenv("HOME"); - if (i_am_a_nobody (uid)) - /* If we're running as nobody, then use root's .xscreensaver file - (since ~root/.xscreensaver and ~nobody/.xscreensaver are likely - to be different -- if we didn't do this, then xscreensaver-demo - would appear to have no effect when the luser is running as root.) - */ - uid = 0; - - p = getpwuid (uid); - - if (!p || !p->pw_name || !*p->pw_name) - { - fprintf (stderr, "%s: couldn't get user info of uid %d\n", - blurb(), getuid ()); - file = ""; - } - else if (!p->pw_dir || !*p->pw_dir) + if (i_am_a_nobody (uid) || !home || !*home) { - fprintf (stderr, "%s: couldn't get home directory of \"%s\"\n", - blurb(), (p->pw_name ? p->pw_name : "???")); - file = ""; + /* If we're running as nobody, then use root's .xscreensaver file + (since ~root/.xscreensaver and ~nobody/.xscreensaver are likely + to be different -- if we didn't do this, then xscreensaver-demo + would appear to have no effect when the luser is running as root.) + */ + struct passwd *p = getpwuid (uid); + uid = 0; + if (!p || !p->pw_name || !*p->pw_name) + { + fprintf (stderr, "%s: couldn't get user info of uid %d\n", + blurb(), getuid ()); + } + else if (!p->pw_dir || !*p->pw_dir) + { + fprintf (stderr, "%s: couldn't get home directory of \"%s\"\n", + blurb(), (p->pw_name ? p->pw_name : "???")); + } + else + { + home = p->pw_dir; + } } - else + if (home && *home) { - const char *home = p->pw_dir; const char *name = ".xscreensaver"; file = (char *) malloc(strlen(home) + strlen(name) + 2); strcpy(file, home); @@ -170,6 +171,10 @@ init_file_name (void) strcat(file, "/"); strcat(file, name); } + else + { + file = ""; + } } if (file && *file) @@ -1653,7 +1658,7 @@ stop_the_insanity (saver_preferences *p) if (p->watchdog_timeout > 57000) p->watchdog_timeout = 57000; /* 57 secs */ if (p->pointer_hysteresis < 0) p->pointer_hysteresis = 0; - if (p->pointer_hysteresis > 100) p->pointer_hysteresis = 100; +/* if (p->pointer_hysteresis > 100) p->pointer_hysteresis = 100; */ if (p->auth_warning_slack < 0) p->auth_warning_slack = 0; if (p->auth_warning_slack > 300) p->auth_warning_slack = 300; diff --git a/driver/subprocs.c b/driver/subprocs.c index d500f70..e251842 100644 --- a/driver/subprocs.c +++ b/driver/subprocs.c @@ -264,8 +264,8 @@ make_job (pid_t pid, int screen, const char *cmd) clean_job_list(); AGAIN: - while (isspace(*in)) in++; /* skip whitespace */ - while (!isspace(*in) && *in != ':') { + while (*in && isspace(*in)) in++; /* skip whitespace */ + while (*in && !isspace(*in) && *in != ':') { if (*in == '=') got_eq = 1; *out++ = *in++; /* snarf first token */ } @@ -277,7 +277,7 @@ make_job (pid_t pid, int screen, const char *cmd) goto AGAIN; } - while (isspace(*in)) in++; /* skip whitespace */ + while (*in && isspace(*in)) in++; /* skip whitespace */ *out = 0; job->name = strdup(name); diff --git a/driver/timers.c b/driver/timers.c index ea97f34..5aa568c 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -1,5 +1,5 @@ /* timers.c --- detecting when the user is idle, and other timer-related tasks. - * xscreensaver, Copyright (c) 1991-2017 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2019 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -311,6 +311,12 @@ activate_lock_timer (XtPointer closure, XtIntervalId *id) if (p->verbose_p) fprintf (stderr, "%s: timed out; activating lock.\n", blurb()); + + if (!si->locked_p) + /* So that "xscreensaver-command -watch" reports the time that the + screen was locked, instead of duplicating the blank time. */ + si->blank_time = time ((time_t *) 0); + set_locked_p (si, True); } diff --git a/driver/types.h b/driver/types.h index 35992ae..ebea9e0 100644 --- a/driver/types.h +++ b/driver/types.h @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1993-2019 Jamie Zawinski +/* xscreensaver, Copyright (c) 1993-2020 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -275,6 +275,7 @@ struct saver_info { int unlock_failures; /* Counts failed login attempts while the screen is locked. */ time_t unlock_failure_time; /* Time of first failed login attempt. */ + time_t unlock_dismiss_time; /* Time lock dialog most recently dismissed. */ char *unlock_typeahead; /* If the screen is locked, and the user types a character, we assume that it is the first diff --git a/driver/windows.c b/driver/windows.c index b7bea52..9e47c45 100644 --- a/driver/windows.c +++ b/driver/windows.c @@ -1,5 +1,5 @@ /* windows.c --- turning the screen black; dealing with visuals, virtual roots. - * xscreensaver, Copyright (c) 1991-2019 Jamie Zawinski + * xscreensaver, Copyright (c) 1991-2020 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -1463,6 +1463,7 @@ resize_screensaver_window (saver_info *si) if (ssi->cmap) XInstallColormap (si->dpy, ssi->cmap); XMapRaised (si->dpy, ssi->screensaver_window); + XSync (si->dpy, False); if (! ssi->pid) spawn_screenhack (ssi); @@ -1586,6 +1587,7 @@ raise_window (saver_info *si, if (!dont_clear || ssi->stderr_overlay_window) clear_stderr (ssi); XMapRaised (si->dpy, ssi->screensaver_window); + XSync (si->dpy, False); #ifdef HAVE_MIT_SAVER_EXTENSION if (ssi->server_mit_saver_window && window_exists_p (si->dpy, ssi->server_mit_saver_window)) @@ -1792,15 +1794,18 @@ unblank_screen (saver_info *si) { Window focus = 0; int revert_to; + XSync (si->dpy, False); XGetInputFocus (si->dpy, &focus, &revert_to); if (focus && focus != PointerRoot && focus != None) { + XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler); XWindowAttributes xgwa; xgwa.colormap = 0; - XGetWindowAttributes (si->dpy, focus, &xgwa); - if (xgwa.colormap && + if (XGetWindowAttributes (si->dpy, focus, &xgwa) && + xgwa.colormap && xgwa.colormap != DefaultColormapOfScreen (xgwa.screen)) XInstallColormap (si->dpy, xgwa.colormap); + XSetErrorHandler (old_handler); } } diff --git a/driver/xscreensaver-getimage-file b/driver/xscreensaver-getimage-file index ba1ef30..3a5c7f4 100755 --- a/driver/xscreensaver-getimage-file +++ b/driver/xscreensaver-getimage-file @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2001-2018 Jamie Zawinski . +# Copyright © 2001-2020 Jamie Zawinski . # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -53,7 +53,7 @@ BEGIN { eval 'use LWP::Simple;' } my $progname = $0; $progname =~ s@.*/@@g; -my ($version) = ('$Revision: 1.52 $' =~ m/\s(\d[.\d]+)\s/s); +my ($version) = ('$Revision: 1.53 $' =~ m/\s(\d[.\d]+)\s/s); my $verbose = 0; @@ -1256,6 +1256,7 @@ sub main() { elsif (m/^--?no-spotlight$/s) { $use_spotlight_p = 0; } elsif (m/^--?cache$/s) { $cache_p = 1; } elsif (m/^--?no-?cache$/s) { $cache_p = 0; } + elsif (m/^--?flush-?cache$/s) { $feed_max_age = $cache_max_age = 0; } elsif (m/^--?cocoa$/) { $cocoa_id = shift @ARGV; } elsif (m/^--?abs(olute)?$/) { $abs_p = 1; } elsif (m/^-./) { usage; } diff --git a/driver/xscreensaver-text b/driver/xscreensaver-text index e965bed..eca1fbf 100755 --- a/driver/xscreensaver-text +++ b/driver/xscreensaver-text @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright © 2005-2017 Jamie Zawinski +# Copyright © 2005-2019 Jamie Zawinski # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that @@ -37,7 +37,7 @@ use Text::Wrap qw(wrap); #use bytes; # This breaks shit. my $progname = $0; $progname =~ s@.*/@@g; -my ($version) = ('$Revision: 1.46 $' =~ m/\s(\d[.\d]+)\s/s); +my ($version) = ('$Revision: 1.48 $' =~ m/\s(\d[.\d]+)\s/s); my $verbose = 0; my $http_proxy = undef; @@ -344,6 +344,11 @@ sub output() { last if ($truncate_lines && $lines > $truncate_lines); } close $pipe; + + # I don't understand why we must do this here, but must not do this + # in the 'file' branch above, which reads the file with :raw... + utf8::decode ($body); # Pack multi-byte UTF-8 back into wide chars. + $body = reformat_text ($body); print STDOUT $body; } else { @@ -573,9 +578,10 @@ sub reformat_rss($) { foreach (@items) { $i++; - my ($title, $body1, $body2, $body3); + my ($title, $author, $body1, $body2, $body3); $title = $3 if (m@<((TITLE) [^<>\s]*)[^<>]*>\s*(.*?)\s*@xsi); + $author= $3 if (m@<((DC:CREATOR) [^<>\s]*)[^<>]*>\s*(.*?)\s*@xsi); $body1 = $3 if (m@<((DESCRIPTION) [^<>\s]*)[^<>]*>\s*(.*?)\s*@xsi); $body2 = $3 if (m@<((CONTENT) [^<>\s]*)[^<>]*>\s*(.*?)\s*@xsi); $body3 = $3 if (m@<((SUMMARY) [^<>\s]*)[^<>]*>\s*(.*?)\s*@xsi); @@ -602,10 +608,19 @@ sub reformat_rss($) { } $title = rss_field_to_html ($title || ''); + $author= rss_field_to_html ($author || ''); $body1 = rss_field_to_html ($body1 || ''); $title = '' if ($body1 eq $title); # Identical in Twitter's atom feed. + # Omit author if it's in the title or body + $author = '' if ($author && + ($title =~ m/\Q$author\E/si || + $body1 =~ m/\Q$author\E/si)); + + $title = $author if ($author && !$title); + $title = "$author: $title" if ($author && $title); + $out .= reformat_html ("$title

$body1", $wiki_p ? 'wiki' : 'rss'); $out .= "\n"; } diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index 2add3b8..40f8207 100644 --- a/driver/xscreensaver.c +++ b/driver/xscreensaver.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1991-2019 Jamie Zawinski +/* xscreensaver, Copyright (c) 1991-2020 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -443,6 +443,11 @@ saver_ehandler (Display *dpy, XErrorEvent *error) } +#ifdef __GNUC__ /* Silence warning */ +static void startup_ehandler (String, String, String, String, String *, + Cardinal *) __attribute__((noreturn)); +#endif /* __GNUC__ */ + /* This error handler is used only while the X connection is being set up; after we've got a connection, we don't use this handler again. The only reason for having this is so that we can present a more idiot-proof error @@ -1561,6 +1566,7 @@ main (int argc, char **argv) if (ssi->real_screen_p) if (ensure_no_screensaver_running (si->dpy, si->screens[i].screen)) exit (1); + ssi->current_hack = -1; } lock_initialization (si, &argc, argv); @@ -1590,6 +1596,8 @@ main (int argc, char **argv) initialize_stderr (si); handle_signals (si); + store_saver_status (si); /* for xscreensaver-command -status */ + # ifdef HAVE_LIBSYSTEMD /* Launch it in the background */ si->systemd_pid = fork_and_exec_1 (si, 0, "xscreensaver-systemd"); # endif @@ -1904,13 +1912,13 @@ handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p) "suspending."); si->selection_mode = 0; si->demoing_p = False; - si->emergency_lock_p = True; si->throttled_p = True; /* When suspending, immediately lock, if locking enabled. */ # ifndef NO_LOCKING if (p->lock_p && !si->locked_p && !si->locking_disabled_p) { + si->emergency_lock_p = True; if (p->verbose_p) fprintf (stderr, "%s: locking.\n", blurb()); set_locked_p (si, True); diff --git a/hacks/Makefile.in b/hacks/Makefile.in index 63e69be..7acaeb3 100644 --- a/hacks/Makefile.in +++ b/hacks/Makefile.in @@ -122,7 +122,7 @@ SRCS = attraction.c blitspin.c bouboule.c braid.c bubbles.c \ boxfit.c interaggregate.c celtic.c cwaves.c m6502.c \ asm6502.c abstractile.c lcdscrub.c hexadrop.c \ tessellimage.c delaunay.c recanim.c binaryring.c \ - glitchpeg.c vfeedback.c webcollage-cocoa.m \ + glitchpeg.c vfeedback.c scooter.c webcollage-cocoa.m \ webcollage-helper-cocoa.m testx11.c SCRIPTS = vidwhacker webcollage ljlatest @@ -164,7 +164,7 @@ OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ webcollage-cocoa.o webcollage-helper-cocoa.o m6502.o \ asm6502.o abstractile.o lcdscrub.o hexadrop.o \ tessellimage.o delaunay.o recanim.o binaryring.o \ - glitchpeg.o vfeedback.o testx11.o + glitchpeg.o vfeedback.o scooter.o testx11.o EXES = attraction blitspin bouboule braid decayscreen deco \ drift flame galaxy grav greynetic halo \ @@ -186,7 +186,7 @@ EXES = attraction blitspin bouboule braid decayscreen deco \ pacman fuzzyflakes anemotaxis memscroller substrate \ intermomentary fireworkx fiberlamp boxfit interaggregate \ celtic cwaves m6502 abstractile lcdscrub hexadrop \ - tessellimage binaryring glitchpeg vfeedback \ + tessellimage binaryring glitchpeg vfeedback scooter \ @JPEG_EXES@ JPEG_EXES = webcollage-helper @@ -245,7 +245,7 @@ MEN = anemone.man apollonian.man attraction.man \ intermomentary.man fireworkx.man fiberlamp.man boxfit.man \ interaggregate.man celtic.man cwaves.man abstractile.man \ lcdscrub.man hexadrop.man tessellimage.man binaryring.man \ - glitchpeg.man vfeedback.man + glitchpeg.man vfeedback.man scooter.man RETIRED_MEN = ant.man bubbles.man critical.man flag.man forest.man \ laser.man lightning.man lisa.man lissie.man lmorph.man \ @@ -291,7 +291,10 @@ install-program:: $(EXES) done install-scripts: $(SCRIPTS) munge-scripts - @for program in $(SCRIPTS); do \ + @if [ ! -d $(install_prefix)$(HACKDIR) ]; then \ + $(INSTALL_DIRS) $(install_prefix)$(HACKDIR) ; \ + fi ; \ + for program in $(SCRIPTS); do \ if [ -r $$program ] ; then \ p=$$program ; \ else \ @@ -814,8 +817,8 @@ halftone: halftone.o $(HACK_OBJS) $(COL) metaballs: metaballs.o $(HACK_OBJS) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) -eruption: eruption.o $(HACK_OBJS) - $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) +eruption: eruption.o $(HACK_OBJS) $(SHM) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(SHM) $(HACK_LIBS) $(THRL) popsquares: popsquares.o $(HACK_OBJS) $(DBE) $(COL) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(DBE) $(COL) $(HACK_LIBS) @@ -1030,6 +1033,9 @@ pacman: pacman.o $(PACOBJS) $(XLOCK_OBJS) $(PNG) fiberlamp: fiberlamp.o $(XLOCK_OBJS) $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) +scooter: scooter.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + # These are not like the others. # xsublim: xsublim.o $(HACK_OBJS_1) @@ -1655,6 +1661,7 @@ eruption.o: $(UTILS_SRC)/hsv.h eruption.o: $(UTILS_SRC)/resources.h eruption.o: $(UTILS_SRC)/usleep.h eruption.o: $(UTILS_SRC)/visual.h +eruption.o: $(UTILS_SRC)/xshm.h eruption.o: $(UTILS_SRC)/yarandom.h euler2d.o: ../config.h euler2d.o: $(srcdir)/fps.h @@ -2711,6 +2718,21 @@ rotzoomer.o: $(UTILS_SRC)/usleep.h rotzoomer.o: $(UTILS_SRC)/visual.h rotzoomer.o: $(UTILS_SRC)/xshm.h rotzoomer.o: $(UTILS_SRC)/yarandom.h +scooter.o: ../config.h +scooter.o: $(srcdir)/fps.h +scooter.o: $(srcdir)/recanim.h +scooter.o: $(srcdir)/screenhackI.h +scooter.o: $(UTILS_SRC)/colors.h +scooter.o: $(UTILS_SRC)/erase.h +scooter.o: $(UTILS_SRC)/font-retry.h +scooter.o: $(UTILS_SRC)/grabscreen.h +scooter.o: $(UTILS_SRC)/hsv.h +scooter.o: $(UTILS_SRC)/resources.h +scooter.o: $(UTILS_SRC)/usleep.h +scooter.o: $(UTILS_SRC)/visual.h +scooter.o: $(UTILS_SRC)/yarandom.h +scooter.o: $(srcdir)/xlockmoreI.h +scooter.o: $(srcdir)/xlockmore.h screenhack.o: ../config.h screenhack.o: $(srcdir)/fps.h screenhack.o: $(srcdir)/recanim.h diff --git a/hacks/analogtv-cli.c b/hacks/analogtv-cli.c index d70db1b..aeec901 100644 --- a/hacks/analogtv-cli.c +++ b/hacks/analogtv-cli.c @@ -1,4 +1,4 @@ -/* xanalogtv-cli, Copyright (c) 2018 Jamie Zawinski +/* xanalogtv-cli, Copyright (c) 2018-2019 Jamie Zawinski * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -15,7 +15,7 @@ * --duration Length in seconds of MP4. * --powerup Do the power-on animation at the beginning. * --logo FILE Small image overlayed onto the colorbars image. - * --audio FILE Add a soundtrack. Must be as long or longer. + * --audio FILE Add a soundtrack. * * Created: 10-Dec-2018 by jwz. */ @@ -573,7 +573,8 @@ analogtv_write_mp4 (struct state *st, const char *outfile, " -map 0:v:0" " -map 1:a:0" " -acodec aac" - " -shortest", + /* Truncate or pad audio to length of video */ + " -filter_complex '[1:0] apad' -shortest", audiofile); sprintf (cmd + strlen(cmd), " -c:v libx264" @@ -642,10 +643,11 @@ analogtv_convert (const char *infile, const char *outfile, unsigned long curticks = 0; time_t lastlog = time((time_t *)0); int frames_left; + int channel_changes = 0; int fps = 30; if (verbose_p) - fprintf (stderr, "%s: progname: loaded %s %dx%d\n", + fprintf (stderr, "%s: loaded %s %dx%d\n", progname, infile, ximage->width, ximage->height); flip_ximage (ximage); @@ -663,12 +665,30 @@ analogtv_convert (const char *infile, const char *outfile, calloc (st->output_frame->height, st->output_frame->bytes_per_line); { - char *s1, *s2; - st->framefile_fmt = malloc (strlen(outfile) + 100); + char *s0, *slash, *dot; + st->framefile_fmt = calloc (1, strlen(outfile) + 100); + + s0 = st->framefile_fmt; strcpy (st->framefile_fmt, outfile); - s1 = strrchr (st->framefile_fmt, '/'); - s2 = strrchr (st->framefile_fmt, '.'); - if (s2 && s2 > s1) *s2 = 0; + + slash = strrchr (st->framefile_fmt, '/'); + dot = strrchr (st->framefile_fmt, '.'); + if (dot && dot > slash) *dot = 0; + + /* Make tmp files be dotfiles */ + if (slash) { + memmove (slash+1, slash, strlen(slash)+1); + slash[1] = '.'; + } else { + memmove (s0+1, s0, strlen(s0)+1); + s0[0] = '.'; + } + + /* Can't have percents in the tmp file names */ + for (s0 = (slash ? slash : s0); *s0; s0++) { + if (*s0 == '%') *s0 = '_'; + } + sprintf (st->framefile_fmt + strlen(st->framefile_fmt), ".%08x.%%06d.png", (random() % 0xFFFFFFFF)); } @@ -677,7 +697,7 @@ analogtv_convert (const char *infile, const char *outfile, int x, y; st->logo = file_to_ximage (0, 0, logofile); if (verbose_p) - fprintf (stderr, "%s: progname: loaded %s %dx%d\n", + fprintf (stderr, "%s: loaded %s %dx%d\n", progname, logofile, st->logo->width, st->logo->height); flip_ximage (st->logo); /* Pull the alpha out of the logo and make a separate mask ximage. */ @@ -799,6 +819,8 @@ analogtv_convert (const char *infile, const char *outfile, st->curinputi=0; st->cs = &st->chansettings[st->curinputi]; + + /* First channel (initial unadulterated image) stays for this long */ frames_left = fps * (2 + frand(1.5)); st->tv->powerup=0.0; @@ -832,17 +854,35 @@ analogtv_convert (const char *infile, const char *outfile, frames_left--; if (frames_left <= 0) { - frames_left = fps * (0.5 + frand(2.5)); - if (st->curinputi != 0 && !(random() % 3)) { - st->curinputi = 0; /* unadulterated image */ + channel_changes++; + + if (channel_changes == 1) { + /* Second channel has short duration */ + frames_left = fps * (0.25 + frand(0.5)); } else { + frames_left = fps * (0.5 + frand(2.5)); + } + + if (channel_changes == 2) { + /* Always use the unadulterated image for the third channel: + So the effect is, plain, brief blip, plain, then random. */ + st->curinputi = 0; + } else if (st->curinputi != 0 && !(random() % 3)) { + /* Use the unadulterated image 1/3 of the time */ + st->curinputi = 0; + } else { + /* Otherwise random */ st->curinputi = 1 + (random() % (N_CHANNELS - 1)); } st->cs = &st->chansettings[st->curinputi]; /* Set channel change noise flag */ st->tv->channel_change_cycles=200000; + + if (verbose_p) + fprintf (stderr, "%s: %.1f: channel %d\n", + progname, curticks/1000.0, st->curinputi); } for (i=0; ifont->ascent + bst->font->descent; int line_height1 = bst->fontA->ascent + bst->fontA->descent; @@ -2528,7 +2528,7 @@ macsbug (Display *dpy, Window window) if (xoff < 0) xoff = 0; if (yoff < 0) yoff = 0; - BSOD_MARGINS (bst, xoff, yoff); + BSOD_MARGINS (bst, xoff, xoff); BSOD_COLOR (bst, bc, bg); BSOD_RECT (bst, True, 0, 0, bst->xgwa.width, bst->xgwa.height); @@ -2552,7 +2552,9 @@ macsbug (Display *dpy, Window window) BSOD_MOVETO (bst, xoff + col_right + char_width, yoff + body_top + line_height); - BSOD_MARGINS (bst, xoff + col_right + char_width, yoff); + BSOD_MARGINS (bst, + xoff + col_right + char_width, + xoff + col_right + char_width); BSOD_TEXT (bst, LEFT, body); BSOD_RECT (bst, False, xoff-2, yoff, page_right+4, page_bottom); /* again */ @@ -3265,28 +3267,21 @@ sparc_solaris (Display *dpy, Window window) Pixmap pixmap = image_data_to_pixmap (dpy, window, sun_png, sizeof(sun_png), &pix_w, &pix_h, &mask); -# if 0 - if (pixmap && - pix_w < bst->xgwa.width / 2 && - pix_h < bst->xgwa.height / 2) - { - int i, n = 1; - if (bst->xgwa.width > 2560) n++; /* Retina displays */ - for (i = 0; i < n; i++) - { - pixmap = double_pixmap (dpy, bst->xgwa.visual, - bst->xgwa.depth, pixmap, pix_w, pix_h); - mask = double_pixmap (dpy, bst->xgwa.visual, 1, mask, pix_w, pix_h); - pix_w *= 2; - pix_h *= 2; - } - } -# endif char_width = (bst->font->per_char ? bst->font->per_char['n'-bst->font->min_char_or_byte2].width : bst->font->min_bounds.width); + if (pixmap) + while (pix_w < char_width * 4) + { + pixmap = double_pixmap (dpy, bst->xgwa.visual, + bst->xgwa.depth, pixmap, pix_w, pix_h); + mask = double_pixmap (dpy, bst->xgwa.visual, 1, mask, pix_w, pix_h); + pix_w *= 2; + pix_h *= 2; + } + bst->pixmap = pixmap; bst->mask = mask; @@ -3384,13 +3379,13 @@ sparc_solaris (Display *dpy, Window window) BSOD_PIXMAP (bst, 0, 0, pix_w, pix_h, ~0, ~0); BSOD_MARGINS (bst, - bst->left_margin + char_width * 12, - bst->top_margin); + bst->left_margin + pix_w + char_width * 2, + bst->left_margin + pix_w + char_width * 2); BSOD_TEXT (bst, LEFT, "SPARCstation IPC, Keyboard Present\n" "ROM Rev. 2.9, 16 MB memory installed, Serial #12648190.\n" "Ethernet address 8:0:20:37:1:87, Host ID: 52c0fefe.\n"); - BSOD_MARGINS (bst, bst->left_margin, bst->top_margin); + BSOD_MARGINS (bst, bst->left_margin, bst->left_margin); BSOD_TEXT (bst, LEFT, "\n\n\033"); BSOD_PAUSE (bst, 3000000); @@ -5653,6 +5648,121 @@ dvd (Display *dpy, Window window) } +static struct bsod_state * +tivo (Display *dpy, Window window) +{ + struct bsod_state *bst = make_bsod_state (dpy, window, "tivo", "Tivo"); + int char_width = + (bst->font->per_char + ? bst->font->per_char['n'-bst->font->min_char_or_byte2].width + : bst->font->min_bounds.width); + int line_height = bst->font->ascent + bst->font->descent; + + int left = (bst->xgwa.width - char_width * 44) / 2; + int top = (bst->xgwa.height - line_height * 15) / 2; + if (left < 0) left = 0; + if (top < 0) top = 0; + + XClearWindow (dpy, window); + + BSOD_MARGINS (bst, left, left); + BSOD_MOVETO (bst, left, top); + + BSOD_FONT (bst, 1); + BSOD_TEXT (bst, LEFT, "\nA severe error has occurred.\n\n"); + BSOD_FONT (bst, 0); + BSOD_TEXT (bst, LEFT, + "Please leave the Receiver plugged in and connected\n" + "to the phone line for the next three hours while the\n" + "Receiver attempts to repair itself."); + BSOD_FONT (bst, 1); + BSOD_TEXT (bst, LEFT, + "\n\n" + "DO NOT UNPLUG OR RESTART\nTHE RECEIVER.\n\n"); + BSOD_FONT (bst, 0); + BSOD_TEXT (bst, LEFT, + "If, after three hours, the Receiver does not restart\n" + "itself, call Customer Care."); + + BSOD_PAUSE (bst, 1000000 * 60); + return bst; +} + + +/* Error message for corrupted (and therefore presumed bootleg) cartridges. + */ +static struct bsod_state * +nintendo (Display *dpy, Window window) +{ + struct bsod_state *bst = make_bsod_state (dpy, window, + "nintendo", "Nintendo"); + unsigned long bg = get_pixel_resource (dpy, bst->xgwa.colormap, + "nintendo.background", + "Nintendo.Background"); + unsigned long bg2 = get_pixel_resource (dpy, bst->xgwa.colormap, + "nintendo.background2", + "Nintendo.Background"); + unsigned long fg = get_pixel_resource (dpy, bst->xgwa.colormap, + "nintendo.foreground", + "Nintendo.Foreground"); + int char_width = + (bst->font->per_char + ? bst->font->per_char['n'-bst->font->min_char_or_byte2].width + : bst->font->min_bounds.width); + int line_height = bst->font->ascent + bst->font->descent; + + int left = (bst->xgwa.width - char_width * 30) / 2; + int top = (bst->xgwa.height - line_height * 9) / 2; + int left2 = left - char_width * 4; + int top2 = top - line_height; + if (left < 0) left = 0; + if (top < 0) top = 0; + if (left2 < 0) left2 = 0; + if (top2 < 0) top2 = 0; + if (left2 > char_width * 8) left2 = char_width * 8; + if (top2 > line_height * 10) top2 = line_height * 10; + + XClearWindow (dpy, window); + + BSOD_COLOR (bst, bg2, bg); + BSOD_RECT (bst, True, left2, top2 - line_height*2, + bst->xgwa.width - left2*2, + bst->xgwa.height - top2*2 + line_height*2); + + BSOD_MARGINS (bst, left, left); + BSOD_MOVETO (bst, left, top - line_height/2); + + BSOD_FONT (bst, 1); + BSOD_COLOR (bst, bg, bg2); + + /* a variant crash has a second box above the English text that says: + + 警告 + ビデオゲームのコピーは法律で禁じられています。 + 詳しくは取扱説明書をご覧になってください。 + + but BSOD_TEXT doesn't do Xft, and more importantly, "PxPlus IBM VGA8" + doesn't contain Japanese characters. + */ + + BSOD_TEXT (bst, CENTER, "WARNING"); + BSOD_FONT (bst, 0); + BSOD_COLOR (bst, fg, bg2); + BSOD_TEXT (bst, LEFT, + "\n\n" + "IT IS A SERIOUS CRIME\n" + "TO COPY VIDEO GAMES\n" + "ACCORDING TO COPYRIGHT LAW.\n" + "PLEASE REFER TO\n" + "YOUR NINTENDO GAME\n" + "INSTRUCTION BOOKLET\n" + "FOR FURTHER INFORMATION."); + + BSOD_PAUSE (bst, 1000000 * 60); + return bst; +} + + /* An Android phone boot loader, by jwz. */ static struct bsod_state * @@ -5930,6 +6040,8 @@ static const struct { { "VMware", vmware }, { "Encom", encom }, { "DVD", dvd }, + { "Tivo", tivo }, + { "Nintendo", nintendo }, }; @@ -6247,10 +6359,12 @@ static const char *bsod_defaults [] = { "*doNvidia: True", "*doATM: True", "*doGLaDOS: True", - "*doAndroid: True", + "*doAndroid: False", "*doVMware: True", "*doEncom: True", "*doDVD: True", + "*doTivo: True", + "*doNintendo: True", ".foreground: White", ".background: Black", @@ -6362,6 +6476,13 @@ static const char *bsod_defaults [] = { ".vmware.foreground2: Yellow", ".vmware.background: #a700a8", /* purple */ + ".tivo.background: #339020", + ".tivo.foreground: #B8E6BA", + + ".nintendo.background: #F76D0A", + ".nintendo.background2: #085C89", + ".nintendo.foreground: #EEAACF", + "*dontClearRoot: True", ANALOGTV_DEFAULTS @@ -6370,6 +6491,8 @@ static const char *bsod_defaults [] = { "*useSHM: True", #endif + ".lowrez: false", /* This is required on macOS */ + "*fontB: ", "*fontC: ", @@ -6400,6 +6523,11 @@ static const char *bsod_defaults [] = { ".ransomware.fontB: Arial 9, Helvetica 9", ".ransomware.fontC: Arial Bold 11, Arial-BoldMT 11, Helvetica Bold 11", + ".tivo.font: Helvetica-Bold 13", + ".tivo.fontB: Helvetica-Bold 17", + + ".nintendo.font: PxPlus IBM VGA8 18, Courier-Bold 18", + # elif defined(HAVE_ANDROID) "*font: PxPlus IBM VGA8 16", @@ -6424,6 +6552,11 @@ static const char *bsod_defaults [] = { ".ransomware.fontB: -*-helvetica-medium-r-*-*-*-80-*-*-*-*-*-*", ".ransomware.fontC: -*-helvetica-bold-r-*-*-*-100-*-*-*-*-*-*", + ".tivo.font: -*-helvetica-medium-r-*-*-*-180-*-*-*-*-*-*", + ".tivo.fontB: -*-helvetica-bold-r-*-*-*-240-*-*-*-*-*-*", + + ".nintendo.font: PxPlus IBM VGA8 18", + # elif defined(HAVE_COCOA) "*font: PxPlus IBM VGA8 8, Courier Bold 9", @@ -6455,10 +6588,16 @@ static const char *bsod_defaults [] = { ".win10.fontB: Arial 100, Helvetica 100", ".win10.fontC: Arial 16, Helvetica 16", - ".ransomware.font: Arial 24, Helvetica 24", - ".ransomware.bigFont: Arial 24, Helvetica 24", - ".ransomware.fontB: Arial 16, Helvetica 16", - ".ransomware.fontC: Arial Bold 24, Helvetica Bold 24", + ".ransomware.font: Arial 24, Helvetica 24", + ".ransomware.bigFont: Arial 24, Helvetica 24", + ".ransomware.fontB: Arial 16, Helvetica 16", + ".ransomware.fontC: Arial Bold 24, Helvetica Bold 24", + + ".tivo.font: Helvetica 36", + ".tivo.fontB: Helvetica 48", + + ".nintendo.font: PxPlus IBM VGA8 12, Courier Bold 12", + ".nintendo.bigFont: PxPlus IBM VGA8 48, Courier Bold 48", # else /* X11 */ @@ -6506,6 +6645,11 @@ static const char *bsod_defaults [] = { ".ransomware.fontB: -*-helvetica-medium-r-*-*-*-140-*-*-*-*-*-*", ".ransomware.fontC: -*-helvetica-bold-r-*-*-*-180-*-*-*-*-*-*", + ".tivo.font: -*-helvetica-medium-r-*-*-*-180-*-*-*-*-*-*", + ".tivo.fontB: -*-helvetica-bold-r-*-*-*-240-*-*-*-*-*-*", + + ".nintendo.font: -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*", + ".nintendo.bigFont: -*-courier-bold-r-*-*-*-360-*-*-m-*-*-*", # endif /* X11 */ @@ -6580,8 +6724,12 @@ static const XrmOptionDescRec bsod_options [] = { { "-no-vmware", ".doVMware", XrmoptionNoArg, "False" }, { "-encom", ".doEncom", XrmoptionNoArg, "True" }, { "-no-encom", ".doEncom", XrmoptionNoArg, "False" }, - { "-dvd", ".doDVD", XrmoptionNoArg, "True" }, - { "-no-dvd", ".doDVD", XrmoptionNoArg, "False" }, + { "-dvd", ".doDVD", XrmoptionNoArg, "True" }, + { "-no-dvd", ".doDVD", XrmoptionNoArg, "False" }, + { "-tivo", ".doTivo", XrmoptionNoArg, "True" }, + { "-no-tivo", ".doTivo", XrmoptionNoArg, "False" }, + { "-nintendo", ".doNintendo", XrmoptionNoArg, "True" }, + { "-no-nintendo", ".doNintendo", XrmoptionNoArg, "False" }, ANALOGTV_OPTIONS { 0, 0, 0, 0 } }; diff --git a/hacks/compile_axp.com b/hacks/compile_axp.com index 9fab007..caf116c 100644 --- a/hacks/compile_axp.com +++ b/hacks/compile_axp.com @@ -111,6 +111,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTZOOMER.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCOOTER.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SHADEBOBS.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C diff --git a/hacks/compile_decc.com b/hacks/compile_decc.com index 9fab007..caf116c 100644 --- a/hacks/compile_decc.com +++ b/hacks/compile_decc.com @@ -111,6 +111,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) RORSCHACH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTOR.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) ROTZOOMER.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCOOTER.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SCREENHACK.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SHADEBOBS.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) SIERPINSKI.C diff --git a/hacks/config/README b/hacks/config/README index 58c4195..5ba2e7b 100644 --- a/hacks/config/README +++ b/hacks/config/README @@ -4,8 +4,8 @@ a screen saver and locker for the X window system by Jamie Zawinski - version 5.43 - 09-Jul-2019 + version 5.44 + 20-Mar-2020 https://www.jwz.org/xscreensaver/ diff --git a/hacks/config/bsod.xml b/hacks/config/bsod.xml index 0d18218..6a3ac4a 100644 --- a/hacks/config/bsod.xml +++ b/hacks/config/bsod.xml @@ -24,7 +24,7 @@ - + @@ -43,19 +43,21 @@ - + + + - + diff --git a/hacks/config/deepstars.xml b/hacks/config/deepstars.xml index e1118e2..d690d2d 100644 --- a/hacks/config/deepstars.xml +++ b/hacks/config/deepstars.xml @@ -19,6 +19,8 @@ _label="Smear" _low-label="Low" _high-label="High" low="0.1" high="5.0" default="1.0"/> + + <_description> diff --git a/hacks/config/dnalogo.xml b/hacks/config/dnalogo.xml index ac10f15..48cd2ee 100644 --- a/hacks/config/dnalogo.xml +++ b/hacks/config/dnalogo.xml @@ -33,18 +33,6 @@ DNA Lounge San Francisco, CA 94103 -Codeword - - Restaurant -- Bar -- Nightclub -- Cafe -- Est. 2015. - - 917 Folsom Street - San Francisco, CA - 94107 - - https://www.dnalounge.com/ - http://www.dnapizza.com/ - https://www.codeword-sf.com/ - Written by Jamie Zawinski; 2001. diff --git a/hacks/config/etruscanvenus.xml b/hacks/config/etruscanvenus.xml new file mode 100644 index 0000000..090b102 --- /dev/null +++ b/hacks/config/etruscanvenus.xml @@ -0,0 +1,143 @@ + + + + +

+ + + +
+ +
+ + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + <_description> +A 3D immersion of of a Klein bottle that smoothly deforms between the +Etruscan Venus surface, the Roman surface, the Boy surface, and the +Ida surface. Topologically, all surfaces are Klein bottles, even the +Roman and Boy surfaces, which are doubly covered and therefore appear +to be an immersed real projective plane. + +You can walk on the Klein bottle or rotate it in 3D. Since all the +surfaces except the Ida surfaces have points where the surface normal +is not well defined for some points, walking is performed on the Ida +surface. Furthermore, it is possible to smoothly deform the surface +between the Etruscan Venus surface, the Roman surface, the Boy +surface, and the Ida surface surface while turning it. + +Inspired by George K. Francis's book "A Topological Picturebook", +Springer, 1987, George K. Francis's paper "The Etruscan Venus" in +P. Concus, R. Finn, and D. A. Hoffman: "Geometric Analysis and +Computer Graphics", Springer, 1991, and a video entitled "The Etruscan +Venus" by Donna J. Cox, George K. Francis, and Raymond L. Idaszak, +presented at SIGGRAPH 1989. + +https://en.wikipedia.org/wiki/Boy%27s_surface +https://en.wikipedia.org/wiki/Roman_surface +https://en.wikipedia.org/wiki/Klein_bottle +http://mathworld.wolfram.com/BoySurface.html +http://mathworld.wolfram.com/RomanSurface.html +http://mathworld.wolfram.com/EtruscanVenusSurface.html +http://mathworld.wolfram.com/IdaSurface.html + +Written by Carsten Steger; 2020. + + diff --git a/hacks/config/gibson.xml b/hacks/config/gibson.xml new file mode 100644 index 0000000..3e69a9c --- /dev/null +++ b/hacks/config/gibson.xml @@ -0,0 +1,65 @@ + + + + + + + diff --git a/hacks/config/hypertorus.xml b/hacks/config/hypertorus.xml index a82e090..899d0cb 100644 --- a/hacks/config/hypertorus.xml +++ b/hacks/config/hypertorus.xml @@ -40,10 +40,14 @@ + + -