From e4fa2ac140f7bc56571373a7b7eb585fa4500e38 Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 2 Mar 2009 00:43:16 -0500 Subject: [PATCH] ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz -rw-r--r-- 1 zblaxell zblaxell 4045811 Feb 26 2004 xscreensaver-4.15.tar.gz 3ce8f7d8a2f490daaa3a0943491a589f1a635529 xscreensaver-4.15.tar.gz --- README | 14 + config.h.in | 9 +- configure | 459 ++- configure.in | 75 +- driver/Makefile.in | 5 +- driver/XScreenSaver.ad.in | 86 +- driver/XScreenSaver_ad.h | 15 +- driver/demo-Gtk-conf.c | 29 +- driver/demo-Gtk.c | 15 +- driver/passwd-helper.c | 154 + driver/passwd-kerberos.c | 17 +- driver/passwd.c | 8 + driver/pdf2jpeg.m | 2 +- driver/screensaver-properties.desktop.in | 2 +- driver/timers.c | 15 +- driver/xscreensaver-command.man | 8 +- driver/xscreensaver-demo.glade2 | 30 +- driver/xscreensaver-demo.man | 19 +- driver/xscreensaver-getimage-desktop | 4 +- driver/xscreensaver-getimage-file.man | 2 +- driver/xscreensaver-getimage-video | 9 +- driver/xscreensaver-getimage-video.man | 2 +- driver/xscreensaver-getimage.c | 45 +- driver/xscreensaver-getimage.man | 2 +- driver/xscreensaver.c | 40 +- driver/xscreensaver.kss.in | 42 +- driver/xscreensaver.man | 30 +- driver/xscreensaver.pam | 3 + hacks/Makefile.in | 40 +- hacks/analogtv.c | 163 +- hacks/analogtv.h | 2 + hacks/ant.c | 10 +- hacks/apollonian.c | 4 +- hacks/apple2-main.c | 621 +++- hacks/apple2.c | 27 +- hacks/apple2.h | 1 + hacks/apple2.man | 106 +- hacks/bsod.c | 6 +- hacks/compile_axp.com | 3 + hacks/compile_decc.com | 3 + hacks/config/README | 4 +- hacks/config/blinkbox.xml | 9 + hacks/config/blocktube.xml | 64 +- hacks/config/electricsheep.xml | 6 +- hacks/config/gleidescope.xml | 4 +- hacks/config/glslideshow.xml | 13 +- hacks/config/glsnake.xml | 15 +- hacks/config/halo.xml | 2 +- hacks/config/mirrorblob.xml | 52 +- hacks/config/mismunch.xml | 29 + hacks/config/molecule.xml | 2 +- hacks/config/noof.xml | 18 + hacks/config/pacman.xml | 19 + hacks/config/phosphor.xml | 5 + hacks/config/pong.xml | 6 +- hacks/config/wormhole.xml | 24 + hacks/config/xanalogtv.xml | 2 +- hacks/config/xearth.xml | 3 + hacks/config/xplanet.xml | 138 + hacks/crystal.c | 14 +- hacks/demon.c | 2 +- hacks/drift.c | 4 +- hacks/epicycle.c | 3 +- hacks/euler2d.c | 4 +- hacks/euler2d.tex | 337 +++ hacks/galaxy.c | 2 +- hacks/glx/Makefile.in | 12 +- hacks/glx/atlantis.c | 124 +- hacks/glx/atunnel.c | 6 +- hacks/glx/blinkbox.c | 224 +- hacks/glx/blinkbox.man | 18 +- hacks/glx/blocktube.c | 29 +- hacks/glx/blocktube.man | 2 +- hacks/glx/bouncingcow.c | 4 +- hacks/glx/boxed.c | 2 +- hacks/glx/circuit.c | 14 +- hacks/glx/cubenetic.c | 12 +- hacks/glx/cubestorm.c | 8 +- hacks/glx/dangerball.c | 6 +- hacks/glx/endgame.c | 34 +- hacks/glx/engine.c | 8 +- hacks/glx/extrusion.c | 14 +- hacks/glx/flipscreen3d.c | 6 +- hacks/glx/flurry.c | 2 +- hacks/glx/flyingtoasters.c | 8 +- hacks/glx/gears.c | 2 +- hacks/glx/gflux.c | 26 +- hacks/glx/glblur.c | 6 +- hacks/glx/glforestfire.c | 12 +- hacks/glx/glknots.c | 12 +- hacks/glx/glmatrix.c | 26 +- hacks/glx/glplanet.c | 16 +- hacks/glx/glslideshow.man | 11 +- hacks/glx/glsnake.c | 28 +- hacks/glx/gltext.c | 6 +- hacks/glx/hypertorus.c | 22 +- hacks/glx/jigglypuff.c | 22 +- hacks/glx/klein.c | 8 +- hacks/glx/lament.c | 2 +- hacks/glx/lavalite.c | 32 +- hacks/glx/menger.c | 10 +- hacks/glx/mirrorblob.c | 1927 +++++++------ hacks/glx/moebius.c | 4 +- hacks/glx/molecule.c | 160 +- hacks/glx/molecule.man | 8 +- hacks/glx/noof.c | 460 +++ hacks/glx/noof.man | 49 + hacks/glx/pipes.c | 10 +- hacks/glx/pulsar.c | 22 +- hacks/glx/queens.c | 90 +- hacks/glx/rubik.c | 8 +- hacks/glx/sballs.c | 6 +- hacks/glx/sierpinski3d.c | 8 +- hacks/glx/spheremonics.c | 16 +- hacks/glx/starwars.c | 28 +- hacks/glx/superquadrics.c | 2 +- hacks/grav.c | 4 +- hacks/hopalong.c | 22 +- hacks/hyperball.c | 3 +- hacks/hypercube.c | 3 +- hacks/juggle.c | 11 +- hacks/julia.c | 2 +- hacks/lisa.c | 2 +- hacks/loop.c | 2 +- hacks/maze.c | 3 +- hacks/mismunch.c | 361 +++ hacks/mismunch.man | 75 + hacks/pacman.c | 864 ++++++ hacks/pacman.h | 189 ++ hacks/pacman.man | 63 + hacks/pacman_ai.h | 565 ++++ hacks/pacman_level.h | 651 +++++ hacks/penrose.c | 2 +- hacks/phosphor.c | 719 ++++- hacks/phosphor.man | 84 +- hacks/polyominoes.c | 4 +- hacks/pong.c | 2 + hacks/screenhack.c | 6 +- hacks/vermiculate.c | 5 +- hacks/vidwhacker | 42 +- hacks/webcollage | 14 +- hacks/wormhole.c | 682 +++++ hacks/wormhole.man | 65 + hacks/xanalogtv.c | 3 + po/Makefile.in.in | 3 +- po/POTFILES.in | 16 +- po/fr.po | 3320 ++++++++++++++-------- po/nl.po | 1465 +++++----- setup.com | 3 + utils/grabclient.c | 60 +- utils/version.h | 2 +- xscreensaver.lsm | 16 +- xscreensaver.spec | 12 +- 153 files changed, 11908 insertions(+), 3917 deletions(-) create mode 100644 driver/passwd-helper.c create mode 100644 hacks/config/mismunch.xml create mode 100644 hacks/config/noof.xml create mode 100644 hacks/config/pacman.xml create mode 100644 hacks/config/wormhole.xml create mode 100644 hacks/config/xplanet.xml create mode 100644 hacks/euler2d.tex create mode 100644 hacks/glx/noof.c create mode 100644 hacks/glx/noof.man create mode 100644 hacks/mismunch.c create mode 100644 hacks/mismunch.man create mode 100644 hacks/pacman.c create mode 100644 hacks/pacman.h create mode 100644 hacks/pacman.man create mode 100644 hacks/pacman_ai.h create mode 100644 hacks/pacman_level.h create mode 100644 hacks/wormhole.c create mode 100644 hacks/wormhole.man diff --git a/README b/README index 03628479..44739a66 100644 --- a/README +++ b/README @@ -76,6 +76,20 @@ the XScreenSaver FAQ about that: http://www.jwz.org/xscreensaver/faq.html ============ +Changes since 4.14: * New hacks, `wormhole', `mismunch', `noof', and + `pacman'. + * `phosphor' and `apple2' include vt100 emulators now: + this means you can do "phosphor -program top", or + can use either program as an xterm replacement: + "apple2 -text -fast -program 'xemacs -nw'". + * `analogtv' (and related) fill the screen better. + * The '-gradient' option works in `atlantis' now. + * Minor updates to `blinkbox', `queens', `endgame', + `glmatrix', `mirrorblob', `blocktube', and `molecule'. + * Integrated SuSE's "external passwd helper" support. + * Marginally better /tmp handling in various programs. + * Updated config defaults for xplanet 1.0.3. + * Portability fixes. Changes since 4.13: * New hacks, `fontglide', `apple2', `xanalogtv', `pong', `gleidescope', `mirrorblob', and `blinkbox'. * New version of `glsnake' (with many more models.) diff --git a/config.h.in b/config.h.in index 463963e1..d5688cbe 100644 --- a/config.h.in +++ b/config.h.in @@ -232,6 +232,10 @@ */ #define FORTUNE_PROGRAM "fortune" +/* Set the name of the password helper program, if any + */ +#undef PASSWD_HELPER_PROGRAM + /* ************************************************************************* @@ -392,7 +396,10 @@ #undef HAVE_SETRLIMIT /* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 +#undef HAVE_SBRK + +/* Define if you have the forkpty function. */ +#undef HAVE_FORKPTY /* Define if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/configure b/configure index e0126736..23b3ddbd 100755 --- a/configure +++ b/configure @@ -308,7 +308,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS pkg_config glib_config gtk_config gnome_config have_gnome_help xml_config gdk_pixbuf_config fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE EGREP PERL X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS INTLTOOL_DESKTOP_RULE INTLTOOL_DIRECTORY_RULE INTLTOOL_KEYS_RULE INTLTOOL_OAF_RULE INTLTOOL_PONG_RULE INTLTOOL_SERVER_RULE INTLTOOL_SHEET_RULE INTLTOOL_SOUNDLIST_RULE INTLTOOL_UI_RULE INTLTOOL_XML_RULE INTLTOOL_CAVES_RULE INTLTOOL_EXTRACT INTLTOOL_MERGE INTLTOOL_UPDATE INTLTOOL_PERL GETTEXT_PACKAGE RANLIB ac_ct_RANLIB ALLOCA USE_NLS MSGFMT GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLDEPS INTLLIBS INTLOBJS POFILES POSUB MKINSTALLDIRS pkg_config glib_config gtk_config gnome_config have_gnome_help xml_config gdk_pixbuf_config fortune_tmp INCLUDES PREFERRED_DEMO_PROGRAM ALL_DEMO_PROGRAMS SAVER_LIBS MOTIF_LIBS GTK_LIBS XML_LIBS JPEG_LIBS HACK_LIBS XPM_LIBS PTY_LIBS GL_LIBS GLE_LIBS XDPMS_LIBS PASSWD_LIBS INSTALL_SETUID SETUID_HACKS INSTALL_DIRS NEED_SETUID INSTALL_PAM OBJCC EXES_OSX SCRIPTS_OSX MEN_OSX PASSWD_SRCS PASSWD_OBJS XMU_SRCS XMU_OBJS XMU_LIBS SAVER_GL_SRCS SAVER_GL_OBJS SAVER_GL_LIBS LOCK_SRCS LOCK_OBJS JPEG_EXES GL_EXES GL_UTIL_EXES GL_MEN GL_KLUDGE GLE_EXES GLE_KLUDGE GNOMEHELP_Y GNOMEHELP_N HACKDIR GNOME_DATADIR GLADE_DATADIR PO_DATADIR GNOME_PANELDIR HACK_CONF_DIR GTK_EXTRA_OBJS APPDEFAULTS DEPEND DEPEND_FLAGS DEPEND_DEFINES LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -889,6 +889,8 @@ Screen blanking and idle-detection options: --with-pam Include support for PAM (Pluggable Auth Modules.) --with-kerberos Include support for Kerberos authentication. --with-shadow Include support for shadow password authentication. + --with-passwd-helper Include support for an external password + verification helper program. User interface options: @@ -4458,7 +4460,6 @@ done - for ac_func in sigaction syslog realpath setrlimit do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -8585,6 +8586,7 @@ fi sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES +MKINSTALLDIRS="$INSTALL_DIRS" ############################################################################### @@ -10175,9 +10177,9 @@ fi # note: $X_LIBS includes $x_libraries LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" - echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXext" >&5 -echo $ECHO_N "checking for XineramaQueryExtension in -lXext... $ECHO_C" >&6 -if test "${ac_cv_lib_Xext_XineramaQueryExtension+set}" = set; then + echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXext" >&5 +echo $ECHO_N "checking for XineramaQueryScreens in -lXext... $ECHO_C" >&6 +if test "${ac_cv_lib_Xext_XineramaQueryScreens+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10196,11 +10198,11 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XineramaQueryExtension (); +char XineramaQueryScreens (); int main () { -XineramaQueryExtension (); +XineramaQueryScreens (); ; return 0; } @@ -10217,19 +10219,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_Xext_XineramaQueryExtension=yes + ac_cv_lib_Xext_XineramaQueryScreens=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xext_XineramaQueryExtension=no +ac_cv_lib_Xext_XineramaQueryScreens=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryExtension" >&6 -if test $ac_cv_lib_Xext_XineramaQueryExtension = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XineramaQueryScreens" >&5 +echo "${ECHO_T}$ac_cv_lib_Xext_XineramaQueryScreens" >&6 +if test $ac_cv_lib_Xext_XineramaQueryScreens = yes; then have_xinerama=yes else true @@ -10259,9 +10261,9 @@ fi # note: $X_LIBS includes $x_libraries LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" - echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5 -echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6 -if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then + echo "$as_me:$LINENO: checking for XineramaQueryScreens in -lXinerama" >&5 +echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6 +if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -10280,11 +10282,11 @@ extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char XineramaQueryExtension (); +char XineramaQueryScreens (); int main () { -XineramaQueryExtension (); +XineramaQueryScreens (); ; return 0; } @@ -10301,19 +10303,19 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - ac_cv_lib_Xinerama_XineramaQueryExtension=yes + ac_cv_lib_Xinerama_XineramaQueryScreens=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_Xinerama_XineramaQueryExtension=no +ac_cv_lib_Xinerama_XineramaQueryScreens=no fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5 -echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6 -if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then +echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5 +echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6 +if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama" else true @@ -11342,6 +11344,127 @@ if test $ac_cv_lib_dl_dlopen = yes; then fi + # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt. + have_timedwait=no + echo "$as_me:$LINENO: checking for sigtimedwait in -lc" >&5 +echo $ECHO_N "checking for sigtimedwait in -lc... $ECHO_C" >&6 +if test "${ac_cv_lib_c_sigtimedwait+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lc $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sigtimedwait (); +int +main () +{ +sigtimedwait (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_c_sigtimedwait=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_c_sigtimedwait=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_c_sigtimedwait" >&5 +echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6 +if test $ac_cv_lib_c_sigtimedwait = yes; then + have_timedwait=yes +fi + + if test "$have_timedwait" = no ; then + echo "$as_me:$LINENO: checking for sigtimedwait in -lrt" >&5 +echo $ECHO_N "checking for sigtimedwait in -lrt... $ECHO_C" >&6 +if test "${ac_cv_lib_rt_sigtimedwait+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lrt $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sigtimedwait (); +int +main () +{ +sigtimedwait (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_rt_sigtimedwait=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_rt_sigtimedwait=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5 +echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6 +if test $ac_cv_lib_rt_sigtimedwait = yes; then + PASSWD_LIBS="${PASSWD_LIBS} -lrt" +fi + + fi + echo "$as_me:$LINENO: checking how to call pam_strerror" >&5 echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6 if test "${ac_cv_pam_strerror_args+set}" = set; then @@ -12831,6 +12954,51 @@ _ACEOF fi +############################################################################### +# +# Check for external password helper +# On SuSE, instead of having xscreensaver be a setuid program, they +# fork an external program that takes the password on stdin, and +# returns true if that password is a valid one. Then only that +# smaller program needs to be setuid. +# +# (Note that this external program is not a GUI: the GUI is still +# all in xscreensaver itself; the external program just does auth.) +# +############################################################################### + +have_passwd_helper=no +with_passwd_helper_req=unspecified + + +# Check whether --with-passwd-helper or --without-passwd-helper was given. +if test "${with_passwd_helper+set}" = set; then + withval="$with_passwd_helper" + with_passwd_helper="$withval"; with_passwd_helper_req="$withval" +else + with_passwd_helper=no +fi; +# no HANDLE_X_PATH_ARG for this one + +if test "$enable_locking" = no ; then + with_passwd_helper_req=no + with_passwd_helper=no +fi + +case "$with_passwd_helper" in + ""|no) : ;; + /*) + cat >>confdefs.h <<_ACEOF +#define PASSWD_HELPER_PROGRAM "$with_passwd_helper" +_ACEOF + + have_passwd_helper=yes;; + *) + echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2 + exit 1 +esac + + ############################################################################### # # Check for -lXm. @@ -15392,7 +15560,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat > conftest.$ac_ext < #ifndef MESA_MAJOR_VERSION @@ -17418,6 +17586,245 @@ fi fi +############################################################################### +# +# Check for pty support for 'phosphor' +# +############################################################################### + +PTY_LIBS= +have_ptys=no + + ac_save_CPPFLAGS="$CPPFLAGS" + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + if test "${ac_cv_header_pty_h+set}" = set; then + echo "$as_me:$LINENO: checking for pty.h" >&5 +echo $ECHO_N "checking for pty.h... $ECHO_C" >&6 +if test "${ac_cv_header_pty_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pty_h" >&5 +echo "${ECHO_T}$ac_cv_header_pty_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking pty.h usability" >&5 +echo $ECHO_N "checking pty.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking pty.h presence" >&5 +echo $ECHO_N "checking pty.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc in + yes:no ) + { echo "$as_me:$LINENO: WARNING: pty.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: pty.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: pty.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pty.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: pty.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: pty.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: pty.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: pty.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: pty.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: pty.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for pty.h" >&5 +echo $ECHO_N "checking for pty.h... $ECHO_C" >&6 +if test "${ac_cv_header_pty_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_pty_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_pty_h" >&5 +echo "${ECHO_T}$ac_cv_header_pty_h" >&6 + +fi +if test $ac_cv_header_pty_h = yes; then + have_ptys=yes +fi + + + CPPFLAGS="$ac_save_CPPFLAGS" +if test "$have_ptys" = yes; then + # we have the header, now check for the library + have_ptys=no + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" +# ac_save_LIBS="$LIBS" + + if test \! -z "$includedir" ; then + CPPFLAGS="$CPPFLAGS -I$includedir" + fi + # note: $X_CFLAGS includes $x_includes + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + if test \! -z "$libdir" ; then + LDFLAGS="$LDFLAGS -L$libdir" + fi + # note: $X_LIBS includes $x_libraries + LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS" + + echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5 +echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6 +if test "${ac_cv_lib_util_forkpty+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lutil $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char forkpty (); +int +main () +{ +forkpty (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_util_forkpty=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_util_forkpty=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5 +echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6 +if test $ac_cv_lib_util_forkpty = yes; then + have_ptys=yes + PTY_LIBS="-lutil" + cat >>confdefs.h <<\_ACEOF +#define HAVE_FORKPTY 1 +_ACEOF + +fi + + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" +# LIBS="$ac_save_LIBS" + +fi + + ############################################################################### # # Check for the XSHM server extension. @@ -18529,6 +18936,10 @@ if test "$have_pam" = yes; then PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)" PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)" INSTALL_PAM="install-pam" +fi +if test "$have_passwd_helper" = yes; then + PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)" + PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)" fi PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)" PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)" @@ -18748,6 +19159,7 @@ INCLUDES=`echo "$INCLUDES" | sed 's@ -I${prefix}/include@@g;'` + APPDEFAULTS=$ac_x_app_defaults @@ -19475,6 +19887,7 @@ s,@XML_LIBS@,$XML_LIBS,;t t s,@JPEG_LIBS@,$JPEG_LIBS,;t t s,@HACK_LIBS@,$HACK_LIBS,;t t s,@XPM_LIBS@,$XPM_LIBS,;t t +s,@PTY_LIBS@,$PTY_LIBS,;t t s,@GL_LIBS@,$GL_LIBS,;t t s,@GLE_LIBS@,$GLE_LIBS,;t t s,@XDPMS_LIBS@,$XDPMS_LIBS,;t t diff --git a/configure.in b/configure.in index 8397156d..e6d3cdc7 100644 --- a/configure.in +++ b/configure.in @@ -830,7 +830,6 @@ AC_HEADER_SYS_WAIT AC_HEADER_DIRENT AC_GETTIMEOFDAY_ARGS AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv sbrk) - AC_CHECK_FUNCS(sigaction syslog realpath setrlimit) AC_CHECK_ICMP AC_CHECK_ICMPHDR @@ -877,6 +876,7 @@ AC_SUBST(GETTEXT_PACKAGE) ALL_LINGUAS="ca da de es et fi fr hu it ja ko nl no pl pt pt_BR ru sk sv vi wa zh_CN zh_TW" AM_GLIB_GNU_GETTEXT +MKINSTALLDIRS="$INSTALL_DIRS" ############################################################################### @@ -1259,12 +1259,12 @@ if test "$with_xinerama" = yes; then # first look in -lXext have_xinerama=no - AC_CHECK_X_LIB(Xext, XineramaQueryExtension, [have_xinerama=yes], [true], + AC_CHECK_X_LIB(Xext, XineramaQueryScreens, [have_xinerama=yes], [true], -lXext -lX11) # if that failed, look in -lXinerama (this is where it is in XFree86 4.1.) if test "$have_xinerama" = no; then - AC_CHECK_X_LIB(Xinerama, XineramaQueryExtension, + AC_CHECK_X_LIB(Xinerama, XineramaQueryScreens, [have_xinerama=yes; SAVER_LIBS="$SAVER_LIBS -lXinerama"], [true], -lXext -lX11) fi @@ -1564,6 +1564,13 @@ if test "$enable_locking" = yes -a "$with_pam" = yes; then # those are in libc. On Linux and Solaris, they're in libdl. AC_CHECK_LIB(dl, dlopen, [PASSWD_LIBS="${PASSWD_LIBS} -ldl"]) + # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt. + have_timedwait=no + AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes]) + if test "$have_timedwait" = no ; then + AC_CHECK_LIB(rt, sigtimedwait, [PASSWD_LIBS="${PASSWD_LIBS} -lrt"]) + fi + AC_MSG_CHECKING(how to call pam_strerror) AC_CACHE_VAL(ac_cv_pam_strerror_args, [AC_TRY_COMPILE([#include @@ -1889,6 +1896,44 @@ elif test "$have_shadow" = yes ; then fi +############################################################################### +# +# Check for external password helper +# On SuSE, instead of having xscreensaver be a setuid program, they +# fork an external program that takes the password on stdin, and +# returns true if that password is a valid one. Then only that +# smaller program needs to be setuid. +# +# (Note that this external program is not a GUI: the GUI is still +# all in xscreensaver itself; the external program just does auth.) +# +############################################################################### + +have_passwd_helper=no +with_passwd_helper_req=unspecified + +AC_ARG_WITH(passwd-helper, +[ --with-passwd-helper Include support for an external password + verification helper program.], + [with_passwd_helper="$withval"; with_passwd_helper_req="$withval"],[with_passwd_helper=no]) +# no HANDLE_X_PATH_ARG for this one + +if test "$enable_locking" = no ; then + with_passwd_helper_req=no + with_passwd_helper=no +fi + +case "$with_passwd_helper" in + ""|no) : ;; + /*) + AC_DEFINE_UNQUOTED(PASSWD_HELPER_PROGRAM, "$with_passwd_helper") + have_passwd_helper=yes;; + *) + echo "error: --with-passwd-helper needs full pathname of helper (not '$with_passwd_helper')." >&2 + exit 1 +esac + + ############################################################################### # # Check for -lXm. @@ -3139,6 +3184,25 @@ if test "$with_jpeg" = yes; then fi +############################################################################### +# +# Check for pty support for 'phosphor' +# +############################################################################### + +PTY_LIBS= +have_ptys=no +AC_CHECK_X_HEADER(pty.h, [have_ptys=yes]) +if test "$have_ptys" = yes; then + # we have the header, now check for the library + have_ptys=no + AC_CHECK_X_LIB(util, forkpty, + [have_ptys=yes + PTY_LIBS="-lutil" + AC_DEFINE(HAVE_FORKPTY)]) +fi + + ############################################################################### # # Check for the XSHM server extension. @@ -3416,6 +3480,10 @@ if test "$have_pam" = yes; then PASSWD_SRCS="$PASSWD_SRCS \$(PAM_SRCS)" PASSWD_OBJS="$PASSWD_OBJS \$(PAM_OBJS)" INSTALL_PAM="install-pam" +fi +if test "$have_passwd_helper" = yes; then + PASSWD_SRCS="$PASSWD_SRCS \$(PWHELPER_SRCS)" + PASSWD_OBJS="$PASSWD_OBJS \$(PWHELPER_OBJS)" fi PASSWD_SRCS="$PASSWD_SRCS \$(PWENT_SRCS)" PASSWD_OBJS="$PASSWD_OBJS \$(PWENT_OBJS)" @@ -3593,6 +3661,7 @@ AC_SUBST(XML_LIBS) AC_SUBST(JPEG_LIBS) AC_SUBST(HACK_LIBS) AC_SUBST(XPM_LIBS) +AC_SUBST(PTY_LIBS) AC_SUBST(GL_LIBS) AC_SUBST(GLE_LIBS) AC_SUBST(XDPMS_LIBS) diff --git a/driver/Makefile.in b/driver/Makefile.in index b7d30828..d10f3d3e 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -111,6 +111,9 @@ KERBEROS_OBJS = passwd-kerberos.o PAM_SRCS = passwd-pam.c PAM_OBJS = passwd-pam.o +PWHELPER_SRCS = passwd-helper.c +PWHELPER_OBJS = passwd-helper.o + LOCK_SRCS_1 = lock.c passwd.c LOCK_OBJS_1 = lock.o passwd.o NOLOCK_SRCS_1 = lock.c @@ -240,7 +243,7 @@ VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \ vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \ - $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_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) $(HDRS) \ $(SCRIPTS_1) $(SCRIPTS_OSX) $(MEN_1) $(MEN_OSX) \ diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index fde6eeec..fe738b08 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 4.14 -! 25-Oct-2003 +! version 4.15 +! 26-Feb-2004 ! ! See "man xscreensaver" for more info. The latest version is always ! available at http://www.jwz.org/xscreensaver/ @@ -98,48 +98,22 @@ ! Turning on "installColormap" on 8-bit systems interacts erratically with -! twm and tvtwm, but seems to work fine with mwm and olwm. Try it and see. -! If your screen turns some color other than black, the window manager is -! buggy, and you need to set this resource to False (or get a WM that works.) +! certain jurassic window managers. If your screen turns some color other +! than black, the window manager is buggy, and you need to set this resource +! to false. Or switch WMs. Or join the 21st century and get a 24-bit +! graphics card. ! *installColormap: True -! Any program which can draw on the root window will work as a screensaver. -! The following resource enumerates them. +! This is the list of installed screen saver modes. See "man xscreensaver" +! for the syntax used here. ! -! Programs are separated by newlines (specified in resource files with \n). -! Lines may be continued with a lone \ at the end of the line. +! If you want to disable a screensaver, DO NOT remove it from this list: +! instead, mark it as inactive by placing a "-" at the beginning of the line. ! -! Each line is an `sh' command. -! -! If the first (non-blank) character on the line is "-", then that means -! that this command is disabled: it's still in the list, but it won't ever -! be used. (This is just to make it easy to disable and then re-enable -! them later.) -! -! If the first word on the line is the name of a visual followed by a -! colon, then that visual will be used for the program, if it is available. -! If no such visual is available, then the program will be skipped. In -! this way, you can specify that you want certain programs to run only -! on color screens, and others only on mono screens, by making use of the -! magic visual names "color" and "mono". Likewise, if some hacks prefer -! colormaps, but others prefer 24-bit windows, that also can be arranged -! (in this case, by using "PseudoColor:" versus "TrueColor:".) -! -! Some of the screenhacks are written using OpenGL. OpenGL programs are -! a bit different than normal X programs, in that they prefer visuals that -! are *half* as deep as the screen. You can tell xscreensaver to select a -! good visual for a GL program by using the magic visual name "GL". -! -! All programs must be launched in such a way that they draw on the root -! window; they should not be spawned in the background with "&". If shell -! metacharacters are used, they must be understandable to `sh', not `csh' -! (the $SHELL variable is not consulted, for unfortunate but good reasons.) -! -! Be sure to check out Demo Mode: run the `xscreensaver-demo' program to -! edit the current list of programs interactively, try out the various modes, -! and change other parameters. See the man page for details. +! You can use the `xscreensaver-demo' program to edit the current list of +! screen savers interactively. ! *programs: \ "Qix (solid)" qix -root -solid -segments 100 \n\ @@ -211,6 +185,7 @@ starfish -root \n\ "Starfish (blob)" starfish -root -blob \n\ munch -root \n\ + mismunch -root \n\ fadeplot -root \n\ coral -root -delay 0 \n\ mountain -root \n\ @@ -297,6 +272,8 @@ apple2 -root \n\ bubbles -root \n\ pong -root \n\ + wormhole -root \n\ + pacman -root \n\ - default-n: webcollage -root \n\ - default-n: "WebCollage (whacked)" \ webcollage -root -filter \ @@ -339,8 +316,8 @@ @GL_KLUDGE@ GL: flipscreen3d -root \n\ @GL_KLUDGE@ GL: glsnake -root \n\ @GL_KLUDGE@ GL: boxed -root \n\ -@GL_KLUDGE@ GL: glforestfire -root \n\ -- GL: glforestfire -root -rain \n\ +@GL_KLUDGE@ GL: "GLForestFire" glforestfire -root \n\ +- GL: "GLForestFire (rain)" glforestfire -root -rain \n\ @GL_KLUDGE@ GL: sballs -root \n\ @GL_KLUDGE@ GL: cubenetic -root \n\ @GL_KLUDGE@ GL: spheremonics -root \n\ @@ -368,13 +345,14 @@ @GL_KLUDGE@ GL: "MirrorBlob (color only)" \ mirrorblob -root -colour -no-texture \n\ @GL_KLUDGE@ GL: blinkbox -root \n\ +@GL_KLUDGE@ GL: noof -root \n\ \ - xdaliclock -root -builtin3 -cycle \n\ - default-n: xearth -nofork -nostars -ncolors 50 \ -night 3 -wait 0 -timewarp 400.0 -pos \ sunrel/38/-30 \n\ -- xplanetbg -xscreensaver -moonside \ - -markerfile earth -wait 1 -timewarp 400 \n\ +- xplanet -vroot -wait 1 -timewarp 90000 \ + -label -origin moon \n\ - xmountains -b -M -Z 0 -r 1 \n\ - "XMountains (top)" xmountains -b -M -Z 0 -r 1 -m \n\ - xaos -root -autopilot -nogui -delay 10000 \ @@ -389,27 +367,6 @@ - GL: fireflies -root \n -! To display a randomized slideshow of images, you can do something like this: -! -! default-n: "Slideshow" xv -root -rmode 5 -random -viewonly \ -! -wloop -wait 30 $HOME/bitmaps/*.jpg \n\ -! -! Recipes for using other slideshow programs can be found in the -! XScreenSaver FAQ: http://www.jwz.org/xscreensaver/faq.html -! -! Note that we've used "default-n" as the visual name, rather than just -! "default": this means "default visual, no install", that is, it's like -! specifying the command-line arguments "-visual default -no-install". -! This is necessary because, when XV or XLI arerunning in "-root" mode, they -! always assume that the default visual and colormap are being used, rather -! than examining the window it is drawing on to see what visual and colormap -! it has. If we didn't force the default visual to be used, we would get an -! X error. If we didn't force the default colormap to be installed, the -! colors would be all wrong. "default-i" may also be used as a visual name -! (meaning, "-visual default -install") but you probably won't ever need -! to use that. - - !============================================================================= ! @@ -459,7 +416,7 @@ XScreenSaver.bourneShell: /bin/sh *passwd.thermometer.width: 8 *splash.heading.label: XScreenSaver %s -*splash.body.label: Copyright © 1991-2003 by +*splash.body.label: Copyright © 1991-2004 by *splash.body2.label: Jamie Zawinski *splash.demo.label: Settings *splash.help.label: Help @@ -633,6 +590,7 @@ XScreenSaver*doc.fontList: *-helvetica-medium-r-*-*-*-100-*-*-*-iso8859-1 *hacks.sballs.name: SBalls *hacks.xdaliclock.name: XDaliClock *hacks.xplanetbg.name: XPlanet +*hacks.xplanet.name: XPlanet *hacks.xaos.name: XaoS *hacks.xfishtank.name: XFishTank *hacks.electricsheep.name: ElectricSheep diff --git a/driver/XScreenSaver_ad.h b/driver/XScreenSaver_ad.h index b6ec5815..b3caf1df 100644 --- a/driver/XScreenSaver_ad.h +++ b/driver/XScreenSaver_ad.h @@ -113,6 +113,7 @@ starfish -root \\n\ \"Starfish (blob)\" starfish -root -blob \\n\ munch -root \\n\ + mismunch -root \\n\ fadeplot -root \\n\ coral -root -delay 0 \\n\ mountain -root \\n\ @@ -199,6 +200,8 @@ apple2 -root \\n\ bubbles -root \\n\ pong -root \\n\ + wormhole -root \\n\ + pacman -root \\n\ - default-n: webcollage -root \\n\ - default-n: \"WebCollage (whacked)\" \ webcollage -root -filter \ @@ -241,8 +244,8 @@ GL: flipscreen3d -root \\n\ GL: glsnake -root \\n\ GL: boxed -root \\n\ - GL: glforestfire -root \\n\ -- GL: glforestfire -root -rain \\n\ + GL: \"GLForestFire\" glforestfire -root \\n\ +- GL: \"GLForestFire (rain)\" glforestfire -root -rain \\n\ GL: sballs -root \\n\ GL: cubenetic -root \\n\ GL: spheremonics -root \\n\ @@ -270,13 +273,14 @@ GL: \"MirrorBlob (color only)\" \ mirrorblob -root -colour -no-texture \\n\ GL: blinkbox -root \\n\ + GL: noof -root \\n\ \ - xdaliclock -root -builtin3 -cycle \\n\ - default-n: xearth -nofork -nostars -ncolors 50 \ -night 3 -wait 0 -timewarp 400.0 -pos \ sunrel/38/-30 \\n\ -- xplanetbg -xscreensaver -moonside \ - -markerfile earth -wait 1 -timewarp 400 \\n\ +- xplanet -vroot -wait 1 -timewarp 90000 \ + -label -origin moon \\n\ - xmountains -b -M -Z 0 -r 1 \\n\ - \"XMountains (top)\" xmountains -b -M -Z 0 -r 1 -m \\n\ - xaos -root -autopilot -nogui -delay 10000 \ @@ -320,7 +324,7 @@ "*passwd.passwdFont: *-courier-medium-r-*-*-*-140-*-*-*-iso8859-1", "*passwd.thermometer.width: 8", "*splash.heading.label: XScreenSaver %s", -"*splash.body.label: Copyright © 1991-2003 by", +"*splash.body.label: Copyright © 1991-2004 by", "*splash.body2.label: Jamie Zawinski ", "*splash.demo.label: Settings", "*splash.help.label: Help", @@ -466,6 +470,7 @@ "*hacks.sballs.name: SBalls", "*hacks.xdaliclock.name: XDaliClock", "*hacks.xplanetbg.name: XPlanet", +"*hacks.xplanet.name: XPlanet", "*hacks.xaos.name: XaoS", "*hacks.xfishtank.name: XFishTank", "*hacks.electricsheep.name: ElectricSheep", diff --git a/driver/demo-Gtk-conf.c b/driver/demo-Gtk-conf.c index 39680375..6416e6ce 100644 --- a/driver/demo-Gtk-conf.c +++ b/driver/demo-Gtk-conf.c @@ -1,5 +1,5 @@ /* demo-Gtk-conf.c --- implements the dynamic configuration dialogs. - * xscreensaver, Copyright (c) 2001, 2003 Jamie Zawinski + * xscreensaver, Copyright (c) 2001, 2003, 2004 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 @@ -1642,7 +1642,7 @@ restore_defaults (const char *progname, GList *parms) */ static char * -get_description (GList *parms) +get_description (GList *parms, gboolean verbose_p) { parameter *doc = 0; for (; parms; parms = parms->next) @@ -1661,6 +1661,7 @@ get_description (GList *parms) { char *d = strdup ((char *) doc->string); char *s; + char *p; for (s = d; *s; s++) if (s[0] == '\n') { @@ -1687,7 +1688,27 @@ get_description (GList *parms) d[--L] = 0; } - return _(d); + /* strip off duplicated whitespaces */ + for (s = d; *s; s++) + if (s[0] == ' ') + { + p = s+1; + while (*s == ' ') + s++; + if (*p && (s != p)) + memmove (p, s, strlen(s)+1); + } + +#if 0 + if (verbose_p) + { + fprintf (stderr, "%s: text read is \"%s\"\n", blurb(),doc->string); + fprintf (stderr, "%s: description is \"%s\"\n", blurb(), d); + fprintf (stderr, "%s: translation is \"%s\"\n", blurb(), _(d)); + } +#endif /* 0 */ + + return (d); } } @@ -1771,7 +1792,7 @@ load_configurator_1 (const char *program, const char *arguments, data->widget = table; data->parameters = parms; - data->description = get_description (parms); + data->description = get_description (parms, verbose_p); } else { diff --git a/driver/demo-Gtk.c b/driver/demo-Gtk.c index 9c2f0ca8..f220ab0d 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-2003 Jamie Zawinski + * xscreensaver, Copyright (c) 1993-2004 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 @@ -116,6 +116,9 @@ #include "logo-50.xpm" #include "logo-180.xpm" +#undef dgettext /* else these are defined twice... */ +#undef dcgettext + #include "demo-Gtk-widgets.h" #include "demo-Gtk-support.h" #include "demo-Gtk-conf.h" @@ -650,9 +653,9 @@ about_menu_cb (GtkMenuItem *menuitem, gpointer user_data) look as good in the plain-old default Latin1 "C" locale.) */ #ifdef HAVE_GTK2 - sprintf(copy, ("Copyright \xC2\xA9 1991-2003 %s"), s); + sprintf(copy, ("Copyright \xC2\xA9 1991-2004 %s"), s); #else /* !HAVE_GTK2 */ - sprintf(copy, ("Copyright \251 1991-2003 %s"), s); + sprintf(copy, ("Copyright \251 1991-2004 %s"), s); #endif /* !HAVE_GTK2 */ sprintf (msg, "%s\n\n%s", copy, desc); @@ -2833,15 +2836,15 @@ populate_demo_window (state *s, int list_elt) if (!pretty_name) pretty_name = strdup (_("Preview")); - gtk_frame_set_label (frame1, pretty_name); - gtk_frame_set_label (frame2, pretty_name); + gtk_frame_set_label (frame1, _(pretty_name)); + gtk_frame_set_label (frame2, _(pretty_name)); gtk_entry_set_text (cmd, (hack ? hack->command : "")); gtk_entry_set_position (cmd, 0); { char title[255]; - sprintf (title, "%s: %.100s Settings", + sprintf (title, _("%s: %.100s Settings"), progclass, (pretty_name ? pretty_name : "???")); gtk_window_set_title (GTK_WINDOW (s->popup_widget), title); } diff --git a/driver/passwd-helper.c b/driver/passwd-helper.c new file mode 100644 index 00000000..7b23f05a --- /dev/null +++ b/driver/passwd-helper.c @@ -0,0 +1,154 @@ +/* passwd-helper.c --- verifying typed passwords with external helper program + * written by Olaf Kirch + * xscreensaver, Copyright (c) 1993-2004 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 + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. No representations are made about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + */ + +/* The idea here is to be able to run xscreensaver without any setuid bits. + * Password verification happens through an external program that you feed + * your password to on stdin. The external command is invoked with a user + * name argument. + * + * The external helper does whatever authentication is necessary. Currently, + * SuSE uses "unix2_chkpwd", which is a variation of "unix_chkpwd" from the + * PAM distribution. + * + * Normally, the password helper should just authenticate the calling user + * (i.e. based on the caller's real uid). This is in order to prevent + * brute-forcing passwords in a shadow environment. A less restrictive + * approach would be to allow verifying other passwords as well, but always + * with a 2 second delay or so. (Not sure what SuSE's "unix2_chkpwd" + * currently does.) + * -- Olaf Kirch , 16-Dec-2003 + */ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef NO_LOCKING /* whole file */ + +#include +#ifdef HAVE_UNISTD_H +# include +#endif + +extern char *blurb(void); + + +#include +#include +#include +#include +#include + +#include + +extern void block_sigchld (void); +extern void unblock_sigchld (void); + +static int +ext_run (const char *user, const char *typed_passwd, int verbose_p) +{ + int pfd[2], status; + pid_t pid; + + if (pipe(pfd) < 0) + return 0; + + if (verbose_p) + fprintf (stderr, "%s: ext_run (%s, %s)\n", + blurb(), PASSWD_HELPER_PROGRAM, user); + + block_sigchld(); + + if ((pid = fork()) < 0) { + close(pfd[0]); + close(pfd[1]); + return 0; + } + + if (pid == 0) { + close(pfd[1]); + if (pfd[0] != 0) + dup2(pfd[0], 0); + + /* Helper is invoked as helper service-name [user] */ + execlp(PASSWD_HELPER_PROGRAM, PASSWD_HELPER_PROGRAM, "xscreensaver", user, NULL); + if (verbose_p) + fprintf(stderr, "%s: %s\n", PASSWD_HELPER_PROGRAM, + strerror(errno)); + exit(1); + } + + close(pfd[0]); + + /* Write out password to helper process */ + if (!typed_passwd) + typed_passwd = ""; + write(pfd[1], typed_passwd, strlen(typed_passwd)); + close(pfd[1]); + + while (waitpid(pid, &status, 0) < 0) { + if (errno == EINTR) + continue; + if (verbose_p) + fprintf(stderr, "%s: ext_run: waitpid failed: %s\n", + blurb(), strerror(errno)); + unblock_sigchld(); + return 0; + } + + unblock_sigchld(); + + if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) + return 0; + return 1; +} + + + +/* This can be called at any time, and says whether the typed password + belongs to either the logged in user (real uid, not effective); or + to root. + */ +int +ext_passwd_valid_p (const char *typed_passwd, int verbose_p) +{ + struct passwd *pw; + int res = 0; + + if ((pw = getpwuid(getuid())) != NULL) + res = ext_run (pw->pw_name, typed_passwd, verbose_p); + endpwent(); + + if (!res) + res = ext_run ("root", typed_passwd, verbose_p); + + return res; +} + + +int +ext_priv_init (int argc, char **argv, int verbose_p) +{ + /* Make sure the passwd helper exists */ + if (access(PASSWD_HELPER_PROGRAM, X_OK) < 0) { + fprintf(stderr, + "%s: warning: %s does not exist.\n" + "%s: password authentication via " + "external helper will not work.\n", + blurb(), PASSWD_HELPER_PROGRAM, blurb()); + return 0; + } + return 1; +} + +#endif /* NO_LOCKING -- whole file */ diff --git a/driver/passwd-kerberos.c b/driver/passwd-kerberos.c index cdb22b59..26b2cb86 100644 --- a/driver/passwd-kerberos.c +++ b/driver/passwd-kerberos.c @@ -26,6 +26,7 @@ #include #include #include +#include /* I'm not sure if this is exactly the right test... Might __APPLE__ be defined if this is apple hardware, but not @@ -192,6 +193,7 @@ kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p) C_Block mitkey; Bool success; char *newtkfile; + int fh = -1; /* temporarily switch to a new ticketfile. I'm not using tmpnam() because it isn't entirely portable. @@ -199,7 +201,19 @@ kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p) newtkfile = malloc(80 * sizeof(char)); memset(newtkfile, 0, sizeof(newtkfile)); - sprintf(newtkfile, "/tmp/xscrn-%i", getpid()); + sprintf(newtkfile, "/tmp/xscrn-%i.XXXXXX", getpid()); + + if( (fh = mkstemp(newtktfile)) < 0) + { + free(newtktfile); + return(False); + } + if( fchmod(fh, 0600) < 0) + { + free(newtktfile); + return(False); + } + krb_set_tkt_string(newtkfile); @@ -222,6 +236,7 @@ kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p) krb_set_tkt_string(tk_file); free(newtkfile); memset(mitkey, 0, sizeof(mitkey)); + close(fh); /* #### tom: should the file be removed? */ /* Did we verify successfully? */ diff --git a/driver/passwd.c b/driver/passwd.c index fa7d4178..c3c2b62a 100644 --- a/driver/passwd.c +++ b/driver/passwd.c @@ -55,6 +55,10 @@ extern Bool kerberos_passwd_valid_p (const char *typed_passwd, Bool verbose_p); extern Bool pam_priv_init (int argc, char **argv, Bool verbose_p); extern Bool pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p); #endif +#ifdef PASSWD_HELPER_PROGRAM +extern Bool ext_priv_init (int argc, char **argv, Bool verbose_p); +extern Bool ext_passwd_valid_p (const char *typed_passwd, Bool verbose_p); +#endif extern Bool pwent_lock_init (int argc, char **argv, Bool verbose_p); extern Bool pwent_priv_init (int argc, char **argv, Bool verbose_p); extern Bool pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p); @@ -74,6 +78,10 @@ struct auth_methods methods[] = { { "PAM", 0, pam_priv_init, pam_passwd_valid_p, False, False }, # endif +# ifdef PASSWD_HELPER_PROGRAM + { "external", 0, ext_priv_init, ext_passwd_valid_p, + False, False }, +#endif { "normal", pwent_lock_init, pwent_priv_init, pwent_passwd_valid_p, False, False } }; diff --git a/driver/pdf2jpeg.m b/driver/pdf2jpeg.m index 87e89034..60778fe1 100644 --- a/driver/pdf2jpeg.m +++ b/driver/pdf2jpeg.m @@ -1,6 +1,6 @@ /* pdf2jpeg -- converts a PDF file to a JPEG file, using Cocoa * - * Copyright (c) 2001, 2002, 2003 by Jamie Zawinski + * Copyright (c) 2003 by 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 diff --git a/driver/screensaver-properties.desktop.in b/driver/screensaver-properties.desktop.in index ee6cd7e4..d0949083 100644 --- a/driver/screensaver-properties.desktop.in +++ b/driver/screensaver-properties.desktop.in @@ -5,4 +5,4 @@ Terminal=false _Name=Screensaver _Comment=Change screensaver properties Type=Application -Categories=Application;Settings;AdvancedSettings; +Categories=Application;Settings;Appearance;AdvancedSettings; diff --git a/driver/timers.c b/driver/timers.c index 8c068c02..d36ff701 100644 --- a/driver/timers.c +++ b/driver/timers.c @@ -1076,7 +1076,20 @@ proc_interrupts_activity_p (saver_info *si) while (fgets (new_line, sizeof(new_line)-1, f1)) { - if (!checked_kbd && strstr (new_line, "keyboard")) + if (strchr (new_line, ',')) + { + /* Ignore any line that has a comma on it: this is because + a setup like this: + + 12: 930935 XT-PIC usb-uhci, PS/2 Mouse + + is really bad news. It *looks* like we can note mouse + activity from that line, but really, that interrupt gets + fired any time any USB device has activity! So we have + to ignore any shared IRQs. + */ + } + else if (!checked_kbd && strstr (new_line, "keyboard")) { kbd_changed = (*last_kbd_line && !!strcmp (new_line, last_kbd_line)); strcpy (last_kbd_line, new_line); diff --git a/driver/xscreensaver-command.man b/driver/xscreensaver-command.man index d8dd718b..a7cea7a2 100644 --- a/driver/xscreensaver-command.man +++ b/driver/xscreensaver-command.man @@ -11,7 +11,7 @@ .if n .sp 1 .if t .sp .5 .. -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver-command - control a running xscreensaver process .SH SYNOPSIS @@ -148,8 +148,8 @@ using a machine remotely, and you find that some display modes are using too much CPU. (If you want to do this \fIpermanently\fP, that is, you want the screen saver -to only blank the screen and not run demos at all, then set the \fIprograms\fP -resource to an empty list: See +to only blank the screen and not run demos at all, then set the \fImode\fP +preference to "blank": See .BR xscreensaver (1) for details.) .TP 8 @@ -256,7 +256,7 @@ and related tools can always be found at http://www.jwz.org/xscreensaver/ .BR xscreensaver (1) .BR xscreensaver\-demo (1) .SH COPYRIGHT -Copyright \(co 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002 +Copyright \(co 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by 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 the above copyright notice appear in all copies and that diff --git a/driver/xscreensaver-demo.glade2 b/driver/xscreensaver-demo.glade2 index f0828d0b..a1c7c6e7 100644 --- a/driver/xscreensaver-demo.glade2 +++ b/driver/xscreensaver-demo.glade2 @@ -2,14 +2,13 @@ + XScreenSaver GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False - xscreensaver - XScreenSaver True False @@ -140,8 +139,6 @@ True GTK_POS_TOP False - 2 - 2 False @@ -668,8 +665,6 @@ False GTK_POS_BOTTOM False - 2 - 2 False @@ -1926,8 +1921,6 @@ Installed False GTK_POS_BOTTOM False - 2 - 2 False @@ -2301,6 +2294,27 @@ Installed 0 0 + + 0 + False + False + + + + + + True + + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + 0 True diff --git a/driver/xscreensaver-demo.man b/driver/xscreensaver-demo.man index 22c60d50..3f583321 100644 --- a/driver/xscreensaver-demo.man +++ b/driver/xscreensaver-demo.man @@ -11,7 +11,7 @@ .if n .sp 1 .if t .sp .5 .. -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver-demo - interactively control the background xscreensaver daemon .SH SYNOPSIS @@ -235,11 +235,10 @@ power down after this much idle time. This duration should be greater than or equal to \fISuspend\fP. .TP 4 .B Install Colormap -Whether to install a private colormap while the screensaver is active, so -that the graphics hacks can get as many colors as possible. (This only -applies when the screen's default visual is being used, since non-default -visuals get their own colormaps automatically.) This can also be overridden -on a per-demo basis. +On 8-bit screens, whether to install a private colormap while the +screensaver is active, so that the graphics hacks can get as many +colors as possible. This does nothing if you are running in 16-bit +or better. .TP 4 .B Fade To Black When Blanking If selected, then when the screensaver activates, the current contents @@ -284,7 +283,7 @@ available, and another should only be run in monochrome. See the discussion of the \fIprograms\fP parameter in the \fIConfiguration\fP section of the .BR xscreensaver (1) -manual. +manual. (OpenGL programs should always have their visual set to "GL".) .SH COMMAND-LINE OPTIONS .I xscreensaver\-demo accepts the following command line options. @@ -298,10 +297,6 @@ is managing that same display. Start up with the \fBAdvanced\fP tab selected by default instead of the \fBDisplay Modes\fP tab. .TP 8 -.B \-crapplet -For use by the Gnome Control Center code: this causes this program to -be embedded inside the Control Center window. -.TP 8 .B \-debug Causes lots of diagnostics to be printed on stderr. .P @@ -338,7 +333,7 @@ http://www.jwz.org/xscreensaver/ .BR xscreensaver\-command (1), .BR xscreensaver\-getimage (1) .SH COPYRIGHT -Copyright \(co 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002 +Copyright \(co 1992, 1993, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by 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 the above copyright notice appear in all copies and that diff --git a/driver/xscreensaver-getimage-desktop b/driver/xscreensaver-getimage-desktop index f7d9e765..40c6173c 100755 --- a/driver/xscreensaver-getimage-desktop +++ b/driver/xscreensaver-getimage-desktop @@ -34,7 +34,7 @@ use diagnostics; use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.1 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my $version = q{ $Revision: 1.2 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; my @grabber = ("screencapture", "-x"); my @converter = ("pdf2jpeg"); @@ -81,7 +81,7 @@ sub grab_image { my $tmpdir = $ENV{TMPDIR}; $tmpdir = "/tmp" unless $tmpdir; - my $tmpfile = "$tmpdir/xssgrab.$$.pdf"; + my $tmpfile = sprintf ("%s/xssgrab.%08x.pdf", $tmpdir, rand(0xffffffff)); my @cmd = (@grabber, $tmpfile); unlink $tmpfile; diff --git a/driver/xscreensaver-getimage-file.man b/driver/xscreensaver-getimage-file.man index 92a53d9c..6dea72b9 100644 --- a/driver/xscreensaver-getimage-file.man +++ b/driver/xscreensaver-getimage-file.man @@ -1,4 +1,4 @@ -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver-getimage-file - put a randomly-selected image on the root window .SH SYNOPSIS diff --git a/driver/xscreensaver-getimage-video b/driver/xscreensaver-getimage-video index d35d0ca7..f8474670 100755 --- a/driver/xscreensaver-getimage-video +++ b/driver/xscreensaver-getimage-video @@ -29,7 +29,7 @@ use diagnostics; use strict; my $progname = $0; $progname =~ s@.*/@@g; -my $version = q{ $Revision: 1.12 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; +my $version = q{ $Revision: 1.13 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/; my $verbose = 0; @@ -44,7 +44,7 @@ my $verbose = 0; my $tmpdir = $ENV{TMPDIR}; $tmpdir = "/tmp" unless $tmpdir; -my $tmpfile = "$tmpdir/xssgv.$$.ppm"; +my $tmpfile = sprintf ("%s/xssgv.%08x.ppm", $tmpdir, rand(0xFFFFFFFF)); # this crap is because "vidtomem" can only write to a file, and uses # a stupid, non-overridable file name format. @@ -55,7 +55,10 @@ my @programs = ( "bttvgrab -d q -Q -l 1 -o ppm -f $tmpfile", # BTTV "qcam > $tmpfile", # Connectix Qcam "gqcam -t PPM -d $tmpfile", # GTK+ Qcam clone - "streamer -s 768x576 -o $tmpfile", # XawTV + + "streamer -a -s 768x576 -o $tmpfile", # XawTV + # the "-a" option ("mute audio") arrived with XawTV 3.76. + "atitv snap $tmpfile", # ATI video capture card "grab -type ppm -format ntsc -source 1 " . diff --git a/driver/xscreensaver-getimage-video.man b/driver/xscreensaver-getimage-video.man index 86c38230..ed4b9f32 100644 --- a/driver/xscreensaver-getimage-video.man +++ b/driver/xscreensaver-getimage-video.man @@ -1,4 +1,4 @@ -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver-getimage-video - put a video frame on the root window .SH SYNOPSIS diff --git a/driver/xscreensaver-getimage.c b/driver/xscreensaver-getimage.c index e46bc5c9..67b59d06 100644 --- a/driver/xscreensaver-getimage.c +++ b/driver/xscreensaver-getimage.c @@ -136,6 +136,15 @@ ignore_all_errors_ehandler (Display *dpy, XErrorEvent *error) return 0; } +static int +ignore_badmatch_ehandler (Display *dpy, XErrorEvent *error) +{ + if (error->error_code == BadMatch) + return ignore_all_errors_ehandler (dpy, error); + else + return x_ehandler (dpy, error); +} + /* Returns True if the given Drawable is a Window; False if it's a Pixmap. */ @@ -885,7 +894,7 @@ read_jpeg_ximage (Screen *screen, Visual *visual, Drawable drawable, int x; for (x = 0; x < ximage->width; x++) { - int j = x * cinfo.num_components; + int j = x * cinfo.output_components; unsigned char r = scanbuf[i][j]; unsigned char g = scanbuf[i][j+1]; unsigned char b = scanbuf[i][j+2]; @@ -897,10 +906,12 @@ read_jpeg_ximage (Screen *screen, Visual *visual, Drawable drawable, pixel = ((r >> 5) | ((g >> 5) << 3) | ((b >> 6) << 6)); else if (depth == 12) pixel = ((r >> 4) | ((g >> 4) << 4) | ((b >> 4) << 8)); - else if (depth == 16 || depth == 15) + else if (depth == 15) /* Gah! I don't understand why these are in the other order. */ pixel = (((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3))); + else if (depth == 16) + pixel = (((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3))); else abort(); @@ -1347,12 +1358,38 @@ display_desktop (Screen *screen, Window window, Drawable drawable, } else /* size mismatch -- must scale client-side images to fit drawable */ { - XImage *ximage = XGetImage (dpy, window, 0, 0, xgwa.width, xgwa.height, - ~0L, ZPixmap); GC gc; + XImage *ximage = 0; + XErrorHandler old_handler; + + XSync (dpy, False); + old_handler = XSetErrorHandler (ignore_badmatch_ehandler); + error_handler_hit_p = False; + + /* This can return BadMatch if the window is not fully on screen. + Trap that error and return color bars in that case. + (Note that this only happens with XGetImage, not with XCopyArea: + yet another totally gratuitous inconsistency in X, thanks.) + */ + ximage = XGetImage (dpy, window, 0, 0, xgwa.width, xgwa.height, + ~0L, ZPixmap); + + XSync (dpy, False); + XSetErrorHandler (old_handler); + XSync (dpy, False); + + if (error_handler_hit_p) + { + ximage = 0; + if (verbose_p) + fprintf (stderr, "%s: BadMatch reading window 0x%x contents!\n", + progname, (unsigned int) window); + } + if (!ximage || !scale_ximage (xgwa.screen, xgwa.visual, ximage, w2, h2)) return False; + gc = XCreateGC (dpy, drawable, 0, &gcv); clear_drawable (screen, drawable); XPutImage (dpy, drawable, gc, ximage, diff --git a/driver/xscreensaver-getimage.man b/driver/xscreensaver-getimage.man index f83aed89..0c762221 100644 --- a/driver/xscreensaver-getimage.man +++ b/driver/xscreensaver-getimage.man @@ -1,4 +1,4 @@ -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver-getimage - put some randomly-selected image on the root window .SH SYNOPSIS diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c index 09665b66..5327ccb0 100644 --- a/driver/xscreensaver.c +++ b/driver/xscreensaver.c @@ -255,7 +255,7 @@ do_help (saver_info *si) fflush (stdout); fflush (stderr); fprintf (stdout, "\ -xscreensaver %s, copyright (c) 1991-2003 by Jamie Zawinski \n\ +xscreensaver %s, copyright (c) 1991-2004 by Jamie Zawinski \n\ \n\ All xscreensaver configuration is via the `~/.xscreensaver' file.\n\ Rather than editing that file by hand, just run `xscreensaver-demo':\n\ @@ -719,7 +719,7 @@ print_banner (saver_info *si) if (p->verbose_p) fprintf (stderr, - "%s %s, copyright (c) 1991-2003 " + "%s %s, copyright (c) 1991-2004 " "by Jamie Zawinski .\n", progname, si->version); @@ -1372,27 +1372,33 @@ main_loop (saver_info *si) To avoid this: after un-blanking the screen, sleep for a second, and then really make sure the window is unmapped. + + Update: actually, let's do that once a second for 8 seconds, + because sometimes the machine is slow, and we miss... */ { - int i; - XSync (si->dpy, False); - sleep (1); - for (i = 0; i < si->nscreens; i++) + int i, j; + for (j = 0; j < 8; j++) { - saver_screen_info *ssi = &si->screens[i]; - Window w = ssi->screensaver_window; - XWindowAttributes xgwa; - XGetWindowAttributes (si->dpy, w, &xgwa); - if (xgwa.map_state != IsUnmapped) + XSync (si->dpy, False); + sleep (1); + for (i = 0; i < si->nscreens; i++) { - if (p->verbose_p) - fprintf (stderr, - "%s: %d: client race! emergency unmap 0x%lx.\n", - blurb(), i, (unsigned long) w); - XUnmapWindow (si->dpy, w); + saver_screen_info *ssi = &si->screens[i]; + Window w = ssi->screensaver_window; + XWindowAttributes xgwa; + XGetWindowAttributes (si->dpy, w, &xgwa); + if (xgwa.map_state != IsUnmapped) + { + if (p->verbose_p) + fprintf (stderr, + "%s: %d: client race! emergency unmap 0x%lx.\n", + blurb(), i, (unsigned long) w); + XUnmapWindow (si->dpy, w); + } } + XSync (si->dpy, False); } - XSync (si->dpy, False); } } } diff --git a/driver/xscreensaver.kss.in b/driver/xscreensaver.kss.in index ba2a7f1b..28cda06c 100755 --- a/driver/xscreensaver.kss.in +++ b/driver/xscreensaver.kss.in @@ -58,23 +58,27 @@ while [ -n "$1" ]; do exit ;; - -test) - # I was unable to grep stdout because xscreensaver nabs it. But I was able - # to output it to a file, and grep the file. - TEMP_FILE=/tmp/xsc.$RANDOM - $bindir/xscreensaver -no-splash -verbose -no-capture-stderr 2> $TEMP_FILE & - $bindir/xscreensaver-command -activate - while true; do - ExitNow=$(grep -E -c unblanking\|already $TEMP_FILE) - if [ $ExitNow != 0 ]; then - kill $! - rm $TEMP_FILE - exit - fi - sleep 1 - done - exit # It should never get this far. - ;; +# I don't know what "-test" was supposed to do, but I suspect the +# answer is "something stupid." Also, it uses /tmp insecurely. +# So let's just comment it out, shall we? -jwz, 10-Nov-2003. +# +# -test) +# # I was unable to grep stdout because xscreensaver nabs it. But I was able +# # to output it to a file, and grep the file. +# TEMP_FILE=/tmp/xsc.$RANDOM +# $bindir/xscreensaver -no-splash -verbose -no-capture-stderr 2> $TEMP_FILE & +# $bindir/xscreensaver-command -activate +# while true; do +# ExitNow=$(grep -E -c unblanking\|already $TEMP_FILE) +# if [ $ExitNow != 0 ]; then +# kill $! +# rm $TEMP_FILE +# exit +# fi +# sleep 1 +# done +# exit # It should never get this far. +# ;; # -corners) # echo "Not yet supported" @@ -124,7 +128,7 @@ if [ -n "$Install" ] ; then wait $! # Do not exit, just wait for signals. else - echo "Usage: ./xscreensaver.kss -install|-setup|-test|-desc [-delay num] [-lock] [-nice num]" + echo "Usage: ./xscreensaver.kss -install|-setup|-desc [-delay num] [-lock] [-nice num]" # echo " -corners xxxx Placing cursor in corner performs action:" # echo " x = i no action (ignore)" # echo " x = s save screen" @@ -139,7 +143,7 @@ else echo " -preview wid Run in the specified XWindow" # echo " -inroot Run in the root window" echo " -setup Setup screen saver" - echo " -test Invoke the screen saver immediately" +# echo " -test Invoke the screen saver immediately" fi # End of script - "xscreensaver.kss" diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man index 7d627791..6f9f32c8 100644 --- a/driver/xscreensaver.man +++ b/driver/xscreensaver.man @@ -11,7 +11,7 @@ .if n .sp 1 .if t .sp .5 .. -.TH XScreenSaver 1 "25-Oct-2003 (4.14)" "X Version 11" +.TH XScreenSaver 1 "26-Feb-2004 (4.15)" "X Version 11" .SH NAME xscreensaver - extensible screen saver framework, plus locking .SH SYNOPSIS @@ -231,7 +231,7 @@ Whether to print diagnostics. Default false. .TP 8 .B timestamp\fP (class \fBBoolean\fP) Whether to print the time of day along with any other diagnostic messages. -Default false. +Default true. .TP 8 .B splash\fP (class \fBBoolean\fP) Whether to display a splash screen at startup. Default true. @@ -270,23 +270,6 @@ system, and don't increase the load unnecessarily. The default is 10. .BR nice (1) for details.) .TP 8 -.B memoryLimit\fP (class \fBMemoryLimit\fP) -The sub-processes created by \fIxscreensaver\fP will not be allowed to -allocate more than this much memory (more accurately, this is the maximum -size their address space may become.) If any sub-process tries to allocate -more than this, -.BR malloc (3) -will fail, and the process will likely exit (or safely crash) rather than -going forth and hogging memory. - -The assumption here is that if one of the screenhacks is trying to use -a lot of memory, then something has gone wrong, and it's better to kill -that program than to overload the machine. - -Default: 0, meaning "no limit." 30M is a good choice on most systems. -(But beware that setting this to a small value can cause OpenGL programs -to malfunction on certain systems.) -.TP 8 .B fade\fP (class \fBBoolean\fP) If this is true, then when the screensaver activates, the current contents of the screen will fade to black instead of simply winking out. This only @@ -476,12 +459,13 @@ seconds before selecting events on existing windows, under the assumption that \fIxscreensaver\fP is started during your login procedure, and the window state may be in flux. Default 0. (This used to default to 30, but that was back in the days when slow machines and X terminals were more common...) -.TP 8 -.B sgiSaverExtension\fP (class \fBBoolean\fP) +.RE +.PP There are a number of different X server extensions which can make xscreensaver's job easier. The next few resources specify whether these extensions should be utilized if they are available. - +.TP 8 +.B sgiSaverExtension\fP (class \fBBoolean\fP) This resource controls whether the SGI \fBSCREEN_SAVER\fP server extension will be used to decide whether the user is idle. This is the default if \fIxscreensaver\fP has been compiled with support for this @@ -1332,7 +1316,7 @@ and a FAQ can always be found at http://www.jwz.org/xscreensaver/ .BR zoom (1) .SH COPYRIGHT Copyright \(co 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -2000, 2001, 2002, 2003 by Jamie Zawinski. Permission to use, copy, +2000, 2001, 2002, 2003, 2004 by 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 the above copyright notice appear in all copies and that both that copyright diff --git a/driver/xscreensaver.pam b/driver/xscreensaver.pam index b59e2603..4a0c3e09 100644 --- a/driver/xscreensaver.pam +++ b/driver/xscreensaver.pam @@ -3,5 +3,8 @@ # Red Hat says this is right for them, as of 7.3: auth required /lib/security/pam_stack.so service=system-auth +# SuSE 9.0 uses this (along with "--with-passwd-helper" of "unix2_chkpwd") +# auth required pam_unix2.so nullok + # This is what we were using before: # auth required /lib/security/pam_pwdb.so shadow nullok diff --git a/hacks/Makefile.in b/hacks/Makefile.in index c818b1fc..53520547 100644 --- a/hacks/Makefile.in +++ b/hacks/Makefile.in @@ -54,6 +54,7 @@ HACK_LIBS = $(HACK_PRE) @HACK_LIBS@ $(HACK_POST) XPM_LIBS = $(HACK_PRE) @XPM_LIBS@ @HACK_LIBS@ $(HACK_POST) JPEG_LIBS = @JPEG_LIBS@ XLOCK_LIBS = $(HACK_LIBS) +PTY_LIBS = @PTY_LIBS@ UTILS_SRC = $(srcdir)/../utils UTILS_BIN = ../utils @@ -99,7 +100,8 @@ SRCS = attraction.c blitspin.c bouboule.c braid.c bubbles.c \ euler2d.c juggle.c polyominoes.c thornbird.c fluidballs.c \ anemone.c halftone.c metaballs.c eruption.c popsquares.c \ barcode.c piecewise.c cloudlife.c fontglide.c apple2.c \ - apple2-main.c analogtv.c xanalogtv.c pong.c + apple2-main.c analogtv.c xanalogtv.c pong.c wormhole.c \ + mismunch.c pacman.c SCRIPTS = vidwhacker webcollage ljlatest OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ @@ -125,7 +127,8 @@ OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \ euler2d.o juggle.o polyominoes.o thornbird.o fluidballs.o \ anemone.o halftone.o metaballs.o eruption.o popsquares.o \ barcode.o piecewise.o cloudlife.o fontglide.o apple2.o \ - apple2-main.o analogtv.o xanalogtv.o pong.o + apple2-main.o analogtv.o xanalogtv.o pong.o wormhole.o \ + mismunch.o pacman.p NEXES = attraction blitspin bouboule braid bubbles decayscreen deco \ drift flag flame forest vines galaxy grav greynetic halo \ @@ -143,7 +146,8 @@ NEXES = attraction blitspin bouboule braid bubbles decayscreen deco \ whirlygig speedmine vermiculate twang apollonian euler2d \ juggle polyominoes thornbird fluidballs anemone halftone \ metaballs eruption popsquares barcode piecewise cloudlife \ - fontglide apple2 xanalogtv pong \ + fontglide apple2 xanalogtv pong wormhole mismunch \ + pacman \ @JPEG_EXES@ SEXES = sonar JPEG_EXES = webcollage-helper @@ -159,7 +163,8 @@ XSHM_OBJS = $(UTILS_BIN)/xshm.o XDBE_OBJS = $(UTILS_BIN)/xdbe.o HDRS = bubbles.h screenhack.h xlockmore.h xlockmoreI.h automata.h \ - bumps.h xpm-pixmap.h apple2.h analogtv.h + bumps.h xpm-pixmap.h apple2.h analogtv.h \ + pacman.h pacman_ai.h pacman_level.h MEN = anemone.man ant.man apollonian.man attraction.man \ blaster.man blitspin.man bouboule.man braid.man bsod.man \ bubbles.man bumps.man ccurve.man compass.man coral.man \ @@ -186,9 +191,11 @@ MEN = anemone.man ant.man apollonian.man attraction.man \ xrayswarm.man xspirograph.man xsublim.man xteevee.man \ zoom.man halftone.man eruption.man metaballs.man \ barcode.man piecewise.man cloudlife.man ljlatest.man \ - fontglide.man apple2.man xanalogtv.man pong.man + fontglide.man apple2.man xanalogtv.man pong.man \ + wormhole.man mismunch.man pacman.man STAR = * EXTRAS = README Makefile.in xlock_23.h xml2man.pl .gdbinit \ + euler2d.tex \ config/README \ config/$(STAR).xml \ images/$(STAR).xbm \ @@ -635,7 +642,7 @@ bsod: bsod.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(GRAB) $(APPLE2) $(XPM) $(XPM_LIBS) apple2: apple2.o apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) - $(CC_HACK) -o $@ $@.o apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM_LIBS) + $(CC_HACK) -o $@ $@.o apple2-main.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM_LIBS) $(PTY_LIBS) xanalogtv: xanalogtv.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(XPM_LIBS) $(HACK_LIBS) @@ -677,7 +684,7 @@ critical: critical.o $(HACK_OBJS) $(COL) $(ERASE) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS) phosphor: phosphor.o $(HACK_OBJS) $(COL) - $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(HACK_LIBS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(HACK_LIBS) $(PTY_LIBS) xmatrix: xmatrix.o $(HACK_OBJS) $(XPM) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(XPM) $(XPM_LIBS) @@ -769,6 +776,11 @@ fontglide: fontglide.o $(HACK_OBJS) $(DBE) pong: pong.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(XPM_LIBS) $(HACK_LIBS) +wormhole: wormhole.o $(HACK_OBJS) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(HACK_LIBS) + +mismunch: mismunch.o $(HACK_OBJS) $(COL) $(SPL) + $(CC_HACK) -o $@ $@.o $(HACK_OBJS) $(COL) $(SPL) $(HACK_LIBS) # The rules for those hacks which follow the `xlockmore' API. # @@ -887,6 +899,9 @@ polyominoes: polyominoes.o $(XLOCK_OBJS) $(ERASE) thornbird: thornbird.o $(XLOCK_OBJS) $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) +pacman: pacman.o $(XLOCK_OBJS) + $(CC_HACK) -o $@ $@.o $(XLOCK_OBJS) $(HACK_LIBS) + # These are not like the others. # @@ -1183,6 +1198,8 @@ maze.o: ../config.h maze.o: $(srcdir)/screenhack.h metaballs.o: ../config.h metaballs.o: $(srcdir)/screenhack.h +mismunch.o: ../config.h +mismunch.o: $(srcdir)/screenhack.h moire2.o: ../config.h moire2.o: $(srcdir)/screenhack.h moire.o: ../config.h @@ -1206,6 +1223,13 @@ noseguy.o: $(srcdir)/images/noseguy/nose-r1.xpm noseguy.o: $(srcdir)/images/noseguy/nose-r2.xpm noseguy.o: $(srcdir)/screenhack.h noseguy.o: $(srcdir)/xpm-pixmap.h +pacman.o: ../config.h +pacman.o: $(srcdir)/pacman_ai.h +pacman.o: $(srcdir)/pacman.h +pacman.o: $(srcdir)/pacman_level.h +pacman.o: $(srcdir)/screenhack.h +pacman.o: $(srcdir)/xlockmore.h +pacman.o: $(srcdir)/xlockmoreI.h pedal.o: ../config.h pedal.o: $(srcdir)/screenhack.h penetrate.o: ../config.h @@ -1314,6 +1338,8 @@ whirlwindwarp.o: ../config.h whirlwindwarp.o: $(srcdir)/screenhack.h whirlygig.o: ../config.h whirlygig.o: $(srcdir)/screenhack.h +wormhole.o: ../config.h +wormhole.o: $(srcdir)/screenhack.h worm.o: ../config.h worm.o: $(srcdir)/screenhack.h worm.o: $(srcdir)/xlockmore.h diff --git a/hacks/analogtv.c b/hacks/analogtv.c index 86761b7d..85ced09c 100644 --- a/hacks/analogtv.c +++ b/hacks/analogtv.c @@ -51,6 +51,7 @@ Trevor Blackwell */ +#include #include #include #include @@ -273,30 +274,77 @@ analogtv_configure(analogtv *it) { int oldwidth=it->usewidth; int oldheight=it->useheight; - int wlim,hlim,ohlim; + int wlim,hlim,height_diff; - hlim=it->xgwa.height; - if (hlim 1000. + */ + float percent = 0.20; + float min_ratio = 4.0 / 3.0 * (1 - percent); + float max_ratio = 4.0 / 3.0 * (1 + percent); + float ratio; + float height_snap=0.025; + + hlim = it->xgwa.height; wlim = it->xgwa.width; - if (wlim<300) wlim = 300; + ratio = wlim / (float) hlim; - /* require 3:4 aspect ratio */ - if (wlim > hlim*4/3) wlim=hlim*4/3; - if (hlim > wlim*3/4) hlim=wlim*3/4; + if (wlim < 266 || hlim < 200) + { + wlim = 266; + hlim = 200; +# ifdef DEBUG + fprintf (stderr, + "size: minimal: %dx%d in %dx%d (%.3f < %.3f < %.3f)\n", + wlim, hlim, it->xgwa.width, it->xgwa.height, + min_ratio, ratio, max_ratio); +# endif + } + else if (ratio > min_ratio && ratio < max_ratio) + { +# ifdef DEBUG + fprintf (stderr, + "size: close enough: %dx%d (%.3f < %.3f < %.3f)\n", + wlim, hlim, min_ratio, ratio, max_ratio); +# endif + } + else if (ratio > max_ratio) + { + wlim = hlim*max_ratio; +# ifdef DEBUG + fprintf (stderr, + "size: center H: %dx%d in %dx%d (%.3f < %.3f < %.3f)\n", + wlim, hlim, it->xgwa.width, it->xgwa.height, + min_ratio, ratio, max_ratio); +# endif + } + else /* ratio < min_ratio */ + { + hlim = wlim/min_ratio; +# ifdef DEBUG + fprintf (stderr, + "size: center V: %dx%d in %dx%d (%.3f < %.3f < %.3f)\n", + wlim, hlim, it->xgwa.width, it->xgwa.height, + min_ratio, ratio, max_ratio); +# endif + } - /* height must be a multiple of VISLINES */ - ohlim=hlim; - hlim = (hlim/ANALOGTV_VISLINES)*ANALOGTV_VISLINES; - /* Scale width proportionally */ - wlim=wlim*hlim/ohlim; + height_diff = ((hlim + ANALOGTV_VISLINES/2) % ANALOGTV_VISLINES) - ANALOGTV_VISLINES/2; + if (height_diff != 0 && fabs(height_diff) < hlim * height_snap) + { + hlim -= height_diff; + } - { - FILE *fp=fopen("/tmp/analogtv.size","w"); - fprintf(fp,"wlim=%d hlim=%d\n", wlim, hlim); - fclose(fp); - } /* Most times this doesn't change */ if (wlim != oldwidth || hlim != oldheight) { @@ -766,7 +814,7 @@ analogtv_setup_frame(analogtv *it) it->hashnoise_rpm -= 100 + 0.01*it->hashnoise_rpm; if (it->hashnoise_rpm<0.0) it->hashnoise_rpm=0.0; } - if (it->hashnoise_rpm >= 0.0) { + if (it->hashnoise_rpm > 0.0) { int hni; int hnc=it->hashnoise_counter; /* in 24.8 format */ @@ -786,7 +834,8 @@ analogtv_setup_frame(analogtv *it) hnc -= (ANALOGTV_V * ANALOGTV_H)<<8; } - it->agclevel = 1.0/it->rx_signal_level; + if (it->rx_signal_level != 0.0) + it->agclevel = 1.0/it->rx_signal_level; #ifdef DEBUG2 @@ -949,6 +998,52 @@ analogtv_level(analogtv *it, int y, int ytop, int ybot) return level; } +/* + + The point of this stuff is to ensure that when useheight is not a + multiple of VISLINES so that TV scan lines map to different numbers + of vertical screen pixels, the total brightness of each scan line + remains the same. + MAX_LINEHEIGHT corresponds to 2400 vertical pixels, beyond which + it interpolates extra black lines. + */ +enum {MAX_LINEHEIGHT=12}; +static struct { + int index; + double value; +} leveltable[MAX_LINEHEIGHT+1][MAX_LINEHEIGHT+1]; + +static void +analogtv_setup_levels(analogtv *it, double avgheight) +{ + int i,height; + static double levelfac[3]={-7.5, 5.5, 24.5}; + + for (height=0; height=3) { + leveltable[height][0].index=0; + } + if (avgheight>=5) { + leveltable[height][height-1].index=0; + } + if (avgheight>=7) { + leveltable[height][1].index=1; + leveltable[height][height-2].index=1; + } + + for (i=0; iimage->data + y*it->image->bytes_per_line; @@ -978,7 +1074,6 @@ analogtv_blast_imagerow(analogtv *it, memcpy(rowdata, level_copyfrom[level], it->image->bytes_per_line); } else { - double levelmult=analogtv_levelmult(it, level); level_copyfrom[level] = rowdata; if (0) { @@ -1115,6 +1210,8 @@ analogtv_draw(analogtv *it) puheight = puramp(it, 2.0, 1.0, 1.3) * it->height_control * (1.125 - 0.125*puramp(it, 2.0, 2.0, 1.1)); + analogtv_setup_levels(it, puheight * (double)it->useheight/(double)ANALOGTV_VISLINES); + overall_top=it->useheight; overall_bot=0; @@ -1137,6 +1234,8 @@ analogtv_draw(analogtv *it) if (ytop<0) ytop=0; if (ybot>it->useheight) ybot=it->useheight; + if (ybot > ytop+MAX_LINEHEIGHT) ybot=ytop+MAX_LINEHEIGHT; + if (ytop < overall_top) overall_top=ytop; if (ybot > overall_bot) overall_bot=ybot; @@ -1493,6 +1592,8 @@ analogtv_load_ximage(analogtv *it, analogtv_input *input, XImage *pic_im) XColor col1[ANALOGTV_PIC_LEN]; XColor col2[ANALOGTV_PIC_LEN]; int multiq[ANALOGTV_PIC_LEN+4]; + int y_overscan=5; /* overscan this much top and bottom */ + int y_scanlength=ANALOGTV_VISLINES+2*y_overscan; img_w=pic_im->width; img_h=pic_im->height; @@ -1503,9 +1604,9 @@ analogtv_load_ximage(analogtv *it, analogtv_input *input, XImage *pic_im) multiq[i]=(int)(-cos(3.1415926/180.0*(phase-303)) * 4096.0 * ampl); } - for (y=0; y>14) + ANALOGTV_BLACK_LEVEL; if (composite>125) composite=125; if (composite<0) composite=0; - input->signal[y+ANALOGTV_TOP][x+ANALOGTV_PIC_START] = composite; + input->signal[y-y_overscan+ANALOGTV_TOP][x+ANALOGTV_PIC_START] = composite; } } @@ -2104,9 +2205,15 @@ analogtv_handle_events (analogtv *it) { KeySym keysym; char c = 0; - XLookupString (&event.xkey, &c, 1, &keysym, 0); - if (c == ' ' || c == '\t' || c == '\r' || c == '\n') - return 1; + + if (it->key_handler) { + if (it->key_handler (it->dpy, &event, it->key_data)) + return 1; + } else { + XLookupString (&event.xkey, &c, 1, &keysym, 0); + if (c == ' ' || c == '\t' || c == '\r' || c == '\n') + return 1; + } } break; diff --git a/hacks/analogtv.h b/hacks/analogtv.h index ff9e8db2..2a76db0f 100644 --- a/hacks/analogtv.h +++ b/hacks/analogtv.h @@ -163,6 +163,8 @@ typedef struct analogtv_s { int screen_xo,screen_yo; /* centers image in window */ void (*event_handler)(Display *dpy, XEvent *event); + int (*key_handler)(Display *dpy, XEvent *event,void *key_data); + void *key_data; int flutter_horiz_desync; int flutter_tint; diff --git a/hacks/ant.c b/hacks/ant.c index d7d07266..9fc750a5 100644 --- a/hacks/ant.c +++ b/hacks/ant.c @@ -102,11 +102,11 @@ static XrmOptionDescRec opts[] = }; static argtype vars[] = { - {(caddr_t *) & neighbors, (char *) "neighbors", (char *) "Neighbors", (char *) DEF_NEIGHBORS, t_Int}, - {(caddr_t *) & truchet, (char *) "truchet", (char *) "Truchet", (char *) DEF_TRUCHET, t_Bool}, - {(caddr_t *) & eyes, (char *) "eyes", (char *) "Eyes", (char *) DEF_EYES, t_Bool}, - {(caddr_t *) & sharpturn, (char *) "sharpturn", (char *) "SharpTurn", (char *) DEF_SHARPTURN, t_Bool}, - {(caddr_t *) & neighbors, "neighbors", "Neighbors", DEF_NEIGHBORS, t_Int} + {&neighbors, "neighbors", "Neighbors", DEF_NEIGHBORS, t_Int}, + {&truchet, "truchet", "Truchet", DEF_TRUCHET, t_Bool}, + {&eyes, "eyes", "Eyes", DEF_EYES, t_Bool}, + {&sharpturn, "sharpturn", "SharpTurn", DEF_SHARPTURN, t_Bool}, + {&neighbors, "neighbors", "Neighbors", DEF_NEIGHBORS, t_Int} }; static OptionStruct desc[] = { diff --git a/hacks/apollonian.c b/hacks/apollonian.c index 0c1888ac..838f81fd 100644 --- a/hacks/apollonian.c +++ b/hacks/apollonian.c @@ -97,8 +97,8 @@ static XrmOptionDescRec opts[] = }; static argtype vars[] = { - {(caddr_t *) & altgeom, (char *) "altgeom", (char *) "AltGeom", (char *) DEF_ALTGEOM, t_Bool}, - {(caddr_t *) & label, (char *) "label", (char *) "Label", (char *) DEF_LABEL, t_Bool}, + {&altgeom, "altgeom", "AltGeom", DEF_ALTGEOM, t_Bool}, + {&label, "label", "Label", DEF_LABEL, t_Bool}, }; static OptionStruct desc[] = { diff --git a/hacks/apple2-main.c b/hacks/apple2-main.c index ae38787f..95078bef 100644 --- a/hacks/apple2-main.c +++ b/hacks/apple2-main.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1998-2003 Jamie Zawinski +/* xscreensaver, Copyright (c) 1998-2004 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 @@ -10,18 +10,29 @@ * * Apple ][ CRT simulator, by Trevor Blackwell * with additional work by Jamie Zawinski + * Pty and vt100 emulation by Fredrik Tolf */ #include +#include #include "screenhack.h" #include "apple2.h" #include #include -#include + +#define XK_MISCELLANY +#include + +#ifdef HAVE_FORKPTY +# include +#endif /* HAVE_FORKPTY */ #undef countof #define countof(x) (sizeof((x))/sizeof((*x))) +#define SCREEN_COLS 40 +#define SCREEN_ROWS 24 + #define DEBUG extern XtAppContext app; @@ -552,18 +563,36 @@ load_image (Display *dpy, Window window, char **image_filename_r) char *progclass = "Apple2"; char *defaults [] = { + ".background: black", + ".foreground: white", "*mode: random", "*duration: 20", + "*metaSendsESC: True", + "*swapBSDEL: True", + "*fast: False", +# ifdef HAVE_FORKPTY + "*usePty: True", +#else + "*usePty: False", +# endif /* !HAVE_FORKPTY */ + ANALOGTV_DEFAULTS 0 }; XrmOptionDescRec options [] = { - { "-slideshow", ".mode", XrmoptionNoArg, "slideshow" }, - { "-basic", ".mode", XrmoptionNoArg, "basic" }, - { "-text", ".mode", XrmoptionNoArg, "text" }, + { "-slideshow", ".mode", XrmoptionNoArg, "slideshow" }, + { "-basic", ".mode", XrmoptionNoArg, "basic" }, + { "-text", ".mode", XrmoptionNoArg, "text" }, { "-program", ".program", XrmoptionSepArg, 0 }, { "-duration", ".duration", XrmoptionSepArg, 0 }, + { "-pty", ".usePty", XrmoptionNoArg, "True" }, + { "-pipe", ".usePty", XrmoptionNoArg, "False" }, + { "-meta", ".metaSendsESC", XrmoptionNoArg, "False" }, + { "-esc", ".metaSendsESC", XrmoptionNoArg, "True" }, + { "-bs", ".swapBSDEL", XrmoptionNoArg, "False" }, + { "-del", ".swapBSDEL", XrmoptionNoArg, "True" }, + { "-fast", ".fast", XrmoptionNoArg, "True" }, ANALOGTV_OPTIONS { 0, 0, 0, 0 } }; @@ -719,15 +748,37 @@ void slideshow_controller(apple2_sim_t *sim, int *stepno, } } +#define NPAR 16 + struct terminal_controller_data { FILE *pipe; int pipe_id; + pid_t pid; int input_available_p; XtIntervalId timeout_id; char curword[256]; unsigned char lastc; int fake_nl; double last_emit_time; + XComposeStatus compose; + + int escstate; + int csiparam[NPAR]; + int curparam; + int cursor_x, cursor_y; + int saved_x, saved_y; + union { + struct { + unsigned int bold : 1; + unsigned int blink : 1; + unsigned int rev : 1; + } bf; + int w; + } termattrib; + Bool meta_sends_esc_p; + Bool swap_bs_del_p; + Bool fast_p; + }; static void @@ -741,6 +792,7 @@ subproc_cb (XtPointer closure, int *source, XtInputId *id) static void launch_text_generator (struct terminal_controller_data *mine) { + char buf[255]; char *oprogram = get_string_resource ("program", "Program"); char *program; @@ -754,6 +806,48 @@ launch_text_generator (struct terminal_controller_data *mine) strcat (program, " ) 2>&1"); if (mine->pipe) abort(); + +# ifdef HAVE_FORKPTY + if (get_boolean_resource ("usePty", "Boolean")) + { + int fd; + struct winsize ws; + + ws.ws_col = SCREEN_COLS; + ws.ws_row = SCREEN_ROWS; + ws.ws_xpixel = ws.ws_col * 6; + ws.ws_ypixel = ws.ws_row * 8; + + mine->pipe = NULL; + if((mine->pid = forkpty(&fd, NULL, NULL, &ws)) < 0) + { + /* Unable to fork */ + sprintf (buf, "%.100s: forkpty", progname); + perror(buf); + } + else if(!mine->pid) + { + /* This is the child fork. */ + if (putenv("TERM=vt100")) + abort(); + execl("/bin/sh", "/bin/sh", "-c", oprogram, NULL); + sprintf (buf, "%.100s: %.100s", progname, oprogram); + perror(buf); + exit(1); + } + else + { + /* This is the parent fork. */ + mine->pipe = fdopen(fd, "r+"); + mine->pipe_id = + XtAppAddInput (app, fileno (mine->pipe), + (XtPointer) (XtInputReadMask | XtInputExceptMask), + subproc_cb, (XtPointer) mine); + } + } + else +# endif /* HAVE_FORKPTY */ + if ((mine->pipe = popen (program, "r"))) { if (mine->pipe_id) abort(); @@ -764,7 +858,8 @@ launch_text_generator (struct terminal_controller_data *mine) } else { - perror (program); + sprintf (buf, "%.100s: %.100s", progname, program); + perror(buf); } } @@ -830,6 +925,480 @@ terminal_read(struct terminal_controller_data *mine, unsigned char *buf, int n) } +/* The interpretation of the ModN modifiers is dependent on what keys + are bound to them: Mod1 does not necessarily mean "meta". It only + means "meta" if Meta_L or Meta_R are bound to it. If Meta_L is on + Mod5, then Mod5 is the one that means Meta. Oh, and Meta and Alt + aren't necessarily the same thing. Icepicks in my forehead! + */ +static unsigned int +do_icccm_meta_key_stupidity (Display *dpy) +{ + unsigned int modbits = 0; + int i, j, k; + XModifierKeymap *modmap = XGetModifierMapping (dpy); + for (i = 3; i < 8; i++) + for (j = 0; j < modmap->max_keypermod; j++) + { + int code = modmap->modifiermap[i * modmap->max_keypermod + j]; + KeySym *syms; + int nsyms = 0; + if (code == 0) continue; + syms = XGetKeyboardMapping (dpy, code, 1, &nsyms); + for (k = 0; k < nsyms; k++) + if (syms[k] == XK_Meta_L || syms[k] == XK_Meta_R || + syms[k] == XK_Alt_L || syms[k] == XK_Alt_R) + modbits |= (1 << i); + XFree (syms); + } + XFreeModifiermap (modmap); + return modbits; +} + +/* Returns a mask of the bit or bits of a KeyPress event that mean "meta". + */ +static unsigned int +meta_modifier (Display *dpy) +{ + static Bool done_once = False; + static unsigned int mask = 0; + if (!done_once) + { + /* Really, we are supposed to recompute this if a KeymapNotify + event comes in, but fuck it. */ + done_once = True; + mask = do_icccm_meta_key_stupidity (dpy); + } + return mask; +} + + +static int +terminal_keypress_handler (Display *dpy, XEvent *event, void *data) +{ + struct terminal_controller_data *mine = + (struct terminal_controller_data *) data; + KeySym keysym; + unsigned char c = 0; + XLookupString (&event->xkey, (char *) &c, 1, &keysym, &mine->compose); + if (c == 0 || !mine->pipe) + return 0; + + if (!mine->swap_bs_del_p) ; + else if (c == 127) c = 8; + else if (c == 8) c = 127; + + /* If meta was held down, send ESC, or turn on the high bit. */ + if (event->xkey.state & meta_modifier (dpy)) + { + if (mine->meta_sends_esc_p) + fputc ('\033', mine->pipe); + else + c |= 0x80; + } + + fputc (c, mine->pipe); + fflush (mine->pipe); + + event->xany.type = 0; /* do not process this event further */ + + return 0; +} + + +static void +a2_ascii_printc (apple2_state_t *st, unsigned char c, + Bool bold_p, Bool blink_p, Bool rev_p, + Bool scroll_p) +{ + if (c >= 'a' && c <= 'z') /* upcase lower-case chars */ + { + c &= 0xDF; + } + else if ((c >= 'A'+128) || /* upcase and blink */ + (c < ' ' && c != 014 && /* high-bit & ctl chrs */ + c != '\r' && c != '\n' && c!='\t')) + { + c = (c & 0x1F) | 0x80; + } + else if (c >= 'A' && c <= 'Z') /* invert upper-case chars */ + { + c |= 0x80; + } + + if (bold_p) c |= 0xc0; + if (blink_p) c = (c & ~0x40) | 0x80; + if (rev_p) c |= 0xc0; + + if (scroll_p) + a2_printc(st, c); + else + a2_printc_noscroll(st, c); +} + + +static void +a2_vt100_printc (apple2_sim_t *sim, struct terminal_controller_data *state, + unsigned char c) +{ + apple2_state_t *st=sim->st; + int cols = SCREEN_COLS; + int rows = SCREEN_ROWS; + + int i; + int start, end; + + switch (state->escstate) + { + case 0: + switch (c) + { + case 7: /* BEL */ + /* Dummy case - we don't want the screensaver to beep */ + /* #### But maybe this should flash the screen? */ + break; + case 8: /* BS */ + if (state->cursor_x > 0) + state->cursor_x--; + break; + case 9: /* HT */ + if (state->cursor_x < cols - 8) + { + state->cursor_x = (state->cursor_x & ~7) + 8; + } + else + { + state->cursor_x = 0; + if (state->cursor_y < rows - 1) + state->cursor_y++; + else + a2_scroll (st); + } + break; + case 10: /* LF */ + case 11: /* VT */ + case 12: /* FF */ + if (state->cursor_y < rows - 1) + state->cursor_y++; + else + a2_scroll (st); + break; + case 13: /* CR */ + state->cursor_x = 0; + break; + case 14: /* SO */ + case 15: /* SI */ + /* Dummy case - there is one and only one font. */ + break; + case 24: /* CAN */ + case 26: /* SUB */ + /* Dummy case - these interrupt escape sequences, so + they don't do anything in this state */ + break; + case 27: /* ESC */ + state->escstate = 1; + break; + case 127: /* DEL */ + /* Dummy case - this is supposed to be ignored */ + break; + case 155: /* CSI */ + state->escstate = 2; + for(i = 0; i < NPAR; i++) + state->csiparam[i] = 0; + state->curparam = 0; + break; + default: + /* If the cursor is in column 39 and we print a character, then + that character shows up in column 39, and the cursor is no longer + visible on the screen (it's in "column 40".) If another character + is printed, then that character shows up in column 0, and the + cursor moves to column 1. + + This is empirically what xterm and gnome-terminal do, so that must + be the right thing. (In xterm, the cursor vanishes, whereas; in + gnome-terminal, the cursor overprints the character in col 39.) + */ + if (state->cursor_x >= cols) + { + state->cursor_x = 0; + if (state->cursor_y >= rows - 1) + a2_scroll (st); + else + state->cursor_y++; + } + + a2_goto(st, state->cursor_y, state->cursor_x); /* clips range */ + a2_ascii_printc (st, c, + state->termattrib.bf.bold, + state->termattrib.bf.blink, + state->termattrib.bf.rev, + False); + state->cursor_x++; + + break; + } + break; + case 1: + switch (c) + { + case 24: /* CAN */ + case 26: /* SUB */ + state->escstate = 0; + break; + case 'c': /* Reset */ + a2_cls(st); + state->escstate = 0; + break; + case 'D': /* Linefeed */ + if (state->cursor_y < rows - 1) + state->cursor_y++; + else + a2_scroll (st); + state->escstate = 0; + break; + case 'E': /* Newline */ + state->cursor_x = 0; + state->escstate = 0; + break; + case 'M': /* Reverse newline */ + if (state->cursor_y > 0) + state->cursor_y--; + state->escstate = 0; + break; + case '7': /* Save state */ + state->saved_x = state->cursor_x; + state->saved_y = state->cursor_y; + state->escstate = 0; + break; + case '8': /* Restore state */ + state->cursor_x = state->saved_x; + state->cursor_y = state->saved_y; + state->escstate = 0; + break; + case '[': /* CSI */ + state->escstate = 2; + for(i = 0; i < NPAR; i++) + state->csiparam[i] = 0; + state->curparam = 0; + break; + case '%': /* Select charset */ + /* No, I don't support UTF-8, since the apple2 font + isn't even Unicode anyway. We must still catch the + last byte, though. */ + case '(': + case ')': + /* I don't support different fonts either - see above + for SO and SI */ + state->escstate = 3; + break; + default: + /* Escape sequences not supported: + * + * H - Set tab stop + * Z - Terminal identification + * > - Keypad change + * = - Other keypad change + * ] - OS command + */ + state->escstate = 0; + break; + } + break; + case 2: + switch (c) + { + case 24: /* CAN */ + case 26: /* SUB */ + state->escstate = 0; + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (state->curparam < NPAR) + state->csiparam[state->curparam] = + (state->csiparam[state->curparam] * 10) + (c - '0'); + break; + case ';': + state->csiparam[++state->curparam] = 0; + break; + case '[': + state->escstate = 3; + break; + case '@': + for (i = 0; i < state->csiparam[0]; i++) + { + if(++state->cursor_x > cols) + { + state->cursor_x = 0; + if (state->cursor_y < rows - 1) + state->cursor_y++; + else + a2_scroll (st); + } + } + state->escstate = 0; + break; + case 'F': + state->cursor_x = 0; + case 'A': + if (state->csiparam[0] == 0) + state->csiparam[0] = 1; + if ((state->cursor_y -= state->csiparam[0]) < 0) + state->cursor_y = 0; + state->escstate = 0; + break; + case 'E': + state->cursor_x = 0; + case 'e': + case 'B': + if (state->csiparam[0] == 0) + state->csiparam[0] = 1; + if ((state->cursor_y += state->csiparam[0]) >= rows) + state->cursor_y = rows - 1; + state->escstate = 0; + break; + case 'a': + case 'C': + if (state->csiparam[0] == 0) + state->csiparam[0] = 1; + if ((state->cursor_x += state->csiparam[0]) >= cols) + state->cursor_x = cols - 1; + state->escstate = 0; + break; + case 'D': + if (state->csiparam[0] == 0) + state->csiparam[0] = 1; + if ((state->cursor_x -= state->csiparam[0]) < 0) + state->cursor_x = 0; + state->escstate = 0; + break; + case 'd': + if ((state->cursor_y = (state->csiparam[0] - 1)) >= rows) + state->cursor_y = rows - 1; + state->escstate = 0; + break; + case '`': + case 'G': + if ((state->cursor_x = (state->csiparam[0] - 1)) >= cols) + state->cursor_x = cols - 1; + state->escstate = 0; + break; + case 'f': + case 'H': + if ((state->cursor_y = (state->csiparam[0] - 1)) >= rows) + state->cursor_y = rows - 1; + if ((state->cursor_x = (state->csiparam[1] - 1)) >= cols) + state->cursor_x = cols - 1; + if(state->cursor_y < 0) + state->cursor_y = 0; + if(state->cursor_x < 0) + state->cursor_x = 0; + state->escstate = 0; + break; + case 'J': + start = 0; + end = rows * cols; + if (state->csiparam[0] == 0) + start = cols * state->cursor_y + state->cursor_x; + if (state->csiparam[0] == 1) + end = cols * state->cursor_y + state->cursor_x; + + a2_goto(st, state->cursor_y, state->cursor_x); + for (i = start; i < end; i++) + { + a2_ascii_printc(st, ' ', False, False, False, False); + } + state->escstate = 0; + break; + case 'K': + start = 0; + end = cols; + if (state->csiparam[0] == 0) + start = state->cursor_x; + if (state->csiparam[1] == 1) + end = state->cursor_x; + + a2_goto(st, state->cursor_y, state->cursor_x); + for (i = start; i < end; i++) + { + a2_ascii_printc(st, ' ', False, False, False, False); + } + state->escstate = 0; + break; + case 'm': /* Set attributes */ + for (i = 0; i <= state->curparam; i++) + { + switch(state->csiparam[i]) + { + case 0: + state->termattrib.w = 0; + break; + case 1: + state->termattrib.bf.bold = 1; + break; + case 5: + state->termattrib.bf.blink = 1; + break; + case 7: + state->termattrib.bf.rev = 1; + break; + case 21: + case 22: + state->termattrib.bf.bold = 0; + break; + case 25: + state->termattrib.bf.blink = 0; + break; + case 27: + state->termattrib.bf.rev = 0; + break; + } + } + state->escstate = 0; + break; + case 's': /* Save position */ + state->saved_x = state->cursor_x; + state->saved_y = state->cursor_y; + state->escstate = 0; + break; + case 'u': /* Restore position */ + state->cursor_x = state->saved_x; + state->cursor_y = state->saved_y; + state->escstate = 0; + break; + case '?': /* DEC Private modes */ + if ((state->curparam != 0) || (state->csiparam[0] != 0)) + state->escstate = 0; + break; + default: + /* Known unsupported CSIs: + * + * L - Insert blank lines + * M - Delete lines (I don't know what this means...) + * P - Delete characters + * X - Erase characters (difference with P being...?) + * c - Terminal identification + * g - Clear tab stop(s) + * h - Set mode (Mainly due to its complexity and lack of good + docs) + * l - Clear mode + * m - Set mode (Phosphor is, per defenition, green on black) + * n - Status report + * q - Set keyboard LEDs + * r - Set scrolling region (too exhausting - noone uses this, + right?) + */ + state->escstate = 0; + break; + } + break; + case 3: + state->escstate = 0; + break; + } + a2_goto(st, state->cursor_y, state->cursor_x); +} + + /* It's fun to put things like "gdb" as the command. For one, it's amusing how the standard mumble (version, no warranty, it's @@ -848,6 +1417,13 @@ terminal_controller(apple2_sim_t *sim, int *stepno, double *next_actiontime) sim->controller_data=calloc(sizeof(struct terminal_controller_data),1); mine=(struct terminal_controller_data *) sim->controller_data; + mine->meta_sends_esc_p = get_boolean_resource ("metaSendsESC", "Boolean"); + mine->swap_bs_del_p = get_boolean_resource ("swapBSDEL", "Boolean"); + mine->fast_p = get_boolean_resource ("fast", "Boolean"); + + sim->dec->key_handler = terminal_keypress_handler; + sim->dec->key_data = mine; + switch(*stepno) { case 0: @@ -858,17 +1434,19 @@ terminal_controller(apple2_sim_t *sim, int *stepno, double *next_actiontime) a2_goto(st,0,16); a2_prints(st, "APPLE ]["); a2_goto(st,2,0); + mine->cursor_y = 2; if (! mine->pipe) launch_text_generator(mine); - *next_actiontime += 4.0; + if (! mine->fast_p) + *next_actiontime += 4.0; *stepno = 10; break; case 10: { - unsigned char buf[5]; + unsigned char buf[1024]; int nr,nwant; double elapsed; @@ -879,28 +1457,17 @@ terminal_controller(apple2_sim_t *sim, int *stepno, double *next_actiontime) if (nwant<1) nwant=1; if (nwant>4) nwant=4; + if (mine->fast_p) + nwant = sizeof(buf)-1; + nr=terminal_read(mine, buf, nwant); for (i=0; i= 'a' && c <= 'z') /* upcase lower-case chars */ - { - a2_printc(st, c&0xDF); - } - else if ((c >= 'A'+128) || /* upcase and blink */ - (c < ' ' && c != 014 && /* high-bit & ctl chrs */ - c != '\r' && c != '\n' && c!='\t')) - { - a2_printc(st, (c & 0x1F) | 0x80); - } - else if (c >= 'A' && c <= 'Z') /* invert upper-case chars */ - { - a2_printc(st, c | 0x80); - } - else { - a2_printc(st, c); - } + + if (mine->pid) + a2_vt100_printc (sim, mine, c); + else + a2_ascii_printc (st, c, False, False, False, True); } } break; diff --git a/hacks/apple2.c b/hacks/apple2.c index 184ff68f..c2b3e652 100644 --- a/hacks/apple2.c +++ b/hacks/apple2.c @@ -71,14 +71,16 @@ void a2_scroll(apple2_state_t *st) { int i; + st->textlines[st->cursy][st->cursx] ^= 0xc0; /* turn off cursor */ for (i=0; i<23; i++) { memcpy(st->textlines[i],st->textlines[i+1],40); } memset(st->textlines[23],0xe0,40); + st->textlines[st->cursy][st->cursx] ^= 0xc0; /* turn cursor back on */ } -void -a2_printc(apple2_state_t *st, char c) +static void +a2_printc_1(apple2_state_t *st, char c, int scroll_p) { st->textlines[st->cursy][st->cursx] |= 0xc0; /* turn off blink */ @@ -86,7 +88,8 @@ a2_printc(apple2_state_t *st, char c) { if (st->cursy==23) { - a2_scroll(st); + if (scroll_p) + a2_scroll(st); } else { @@ -118,7 +121,8 @@ a2_printc(apple2_state_t *st, char c) st->cursx++; if (st->cursx==40) { if (st->cursy==23) { - a2_scroll(st); + if (scroll_p) + a2_scroll(st); } else { st->cursy++; } @@ -129,6 +133,19 @@ a2_printc(apple2_state_t *st, char c) st->textlines[st->cursy][st->cursx] &= 0x7f; /* turn on blink */ } +void +a2_printc(apple2_state_t *st, char c) +{ + a2_printc_1(st, c, 1); +} + +void +a2_printc_noscroll(apple2_state_t *st, char c) +{ + a2_printc_1(st, c, 0); +} + + void a2_prints(apple2_state_t *st, char *s) { @@ -138,6 +155,8 @@ a2_prints(apple2_state_t *st, char *s) void a2_goto(apple2_state_t *st, int r, int c) { + if (r > 23) r = 23; + if (c > 39) r = 39; st->textlines[st->cursy][st->cursx] |= 0xc0; /* turn off blink */ st->cursy=r; st->cursx=c; diff --git a/hacks/apple2.h b/hacks/apple2.h index f445b3fe..27202fc2 100644 --- a/hacks/apple2.h +++ b/hacks/apple2.h @@ -94,6 +94,7 @@ void a2_add_disk_item(apple2_state_t *st, char *name, u_char *data, int len, char type); void a2_scroll(apple2_state_t *st); void a2_printc(apple2_state_t *st, char c); +void a2_printc_noscroll(apple2_state_t *st, char c); void a2_prints(apple2_state_t *st, char *s); void a2_goto(apple2_state_t *st, int r, int c); void a2_cls(apple2_state_t *st); diff --git a/hacks/apple2.man b/hacks/apple2.man index a14400c3..e29cd239 100644 --- a/hacks/apple2.man +++ b/hacks/apple2.man @@ -20,7 +20,8 @@ apple2 - Apple ][ display emulator [\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install] [\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-program \fIcommand to run\fP] -[\-text] [\-slideshow] [\-basic] +[\-basic] [\-slideshow] [\-text] +[\-meta] [\-esc] [\-bs] [\-del] [\-fast] .SH DESCRIPTION The .I apple2 @@ -28,20 +29,22 @@ program simulates an original Apple ][ Plus computer in all its 1979 glory. It also reproduces the appearance of display on a color television set of the period. .PP -There are 3 modes: text, slideshow, and basic. Normally it chooses a -mode randomly, but you can override with the \fI\-text\fP, -\fI\-slideshow\fP, or \fI\-basic\fP options. -.PP -In text mode it displays the output of a command (by default your -system's fortune program, but can be overridden with -program). -.PP +There are 3 modes: basic, slideshow, and text. Normally it chooses a +mode randomly, but you can override with the \fI\-basic\fP, +\fI\-slideshow\fP, or \fI\-text\fP options. + +In basic mode a simulated user types in a Basic program and runs it. + In slideshow mode it chooses a number of images from the image source you configured into XScreenSaver and displays them within the limitations of the Apple ][ display hardware. With only 6 available colors, you can only make out the general shape of the pictures. -.PP -In basic mode a simulated user types in a Basic program and runs it. +In text mode it displays the output of a command (by default your +system's fortune program, but can be overridden with \fI\-program\fP). + +In text mode, it is also a fully functional (if anachronistic) +vt100 terminal emulator. .SH OPTIONS .I apple2 accepts the following options: @@ -65,14 +68,14 @@ or the id number (decimal or hex) of a specific visual. .B \-delay \fIdelay\fP The delay between displaying one crash and another. .TP 8 -.B \-text -Choose text mode +.B \-basic +Choose basic mode .TP 8 .B \-slideshow Choose slideshow mode .TP 8 -.B \-basic -Choose basic mode +.B \-text +Choose text mode .TP 8 .B \-program \fIsh-command\fP In text mode, the command to run to generate the text to display. This @@ -82,25 +85,69 @@ run at the end of a pipe, and any characters that it prints to exits, it will be launched again after 3 seconds. Default: .BR fortune (1). -Note that apple2 is \fInot\fP a terminal emulator: programs that try -to directly address the screen will not do what you might expect. It -merely draws the characters on the screen left to right, top to -bottom. Lines wrap when they reach the right edge, and the screen -scrolls when characters reach the bottom. - -In other words, programs like -.BR fortune (1) -will work, but programs like -.BR top (1) -won't. +In text mode, \fIapple2\fP emulates a vt100 terminal running on a 40x24 +uppercase-only screen. For example: .EX -apple2 -text -program 'cat /usr/src/linux*/README | fold -sw40' +apple2 -text \\ + -program 'cat /usr/src/linux*/README | fold -sw40' apple2 -text -program 'ping apple.com' apple2 -text -program 'ps -e' apple2 -text -program 'od -txCz -w7 /dev/random' +apple2 -text -fast -program 'xemacs -nw -q -f life' +apple2 -text -fast \\ + -program 'xemacs -nw -q --eval "(hanoi 5)"' +.EE +You can also use \fIapple2\fP as an extremely lo-fi replacement for the +.BR xterm (1) +and +.BR gnome-terminal (1) +terminal emulators: +.EX +apple2 -fast -program tcsh .EE +.TP 8 +.B \-pty +In \fI\-text\fP mode, launch the sub-program under a pty so that it +can address the screen directly. This is the default. +.TP 8 +.B \-pipe +In \fI\-text\fP mode, launch the sub-program at the end of a pipe: +do not let it address the screen directly. +.TP 8 +.B \-esc +When the user types a key with the Alt or Meta keys held down, send an +ESC character first. This is the default. +.TP 8 +.B \-meta +When Meta or Alt are held down, set the high bit on the character instead. +.TP 8 +.B \-del +Swap Backspace and Delete. This is the default. +.TP 8 +.B \-bs +Do not swap Backspace and Delete. +.TP 8 +.B \-fast +Normally, characters are printed at the speed of an original Apple][ +computer; however, when using this program as a terminal emulator, +the novelty of those 300 baud characters might wear off. You can use +the \fI\-fast\fP option to speed things up a bit. +.SH TERMINAL EMULATION +By default, \fIapple2\fP allocates a pseudo-tty for the \fI\-text\fP-mode +sub-process to run under. This has the desirable side effect that the +program will be able to use +.BR ioctl (2) +to fetch information about terminal parameters and window size, which +many programs (such as +.BR top (1)) +need to run properly. \fIapple2\fP will also set the environment +variable \fITERM\fP to \fIvt100\fP in the child process. + +Any characters typed on the apple2 window will be passed along to +the sub-process. (Note that this only works when running in "window" +mode, not when running in \fI\-root\fP mode under xscreensaver.) .SH ENVIRONMENT .PP .TP 8 @@ -110,6 +157,9 @@ to get the default host and display number. .B XENVIRONMENT to get the name of a resource file that overrides the global resources stored in the RESOURCE_MANAGER property. +.TP 8 +.B TERM +to inform the sub-process of the type of terminal emulation. .SH X RESOURCES Notable X resources supported include the following which correspond to standard TV controls: @@ -134,7 +184,8 @@ Apple ][ and Applesoft are trademarks of Apple Computer. .BR webcollage (1), .BR driftnet (1) .BR EtherPEG , -.BR EtherPeek +.BR EtherPeek , +.BR console_codes (4). .SH COPYRIGHT Copyright \(co 2002-2003 by Trevor Blackwell. Permission to use, copy, modify, distribute, and sell this software and its documentation for @@ -147,3 +198,4 @@ warranty. .SH AUTHOR Television and Apple ][ emulation by Trevor Blackwell . Slideshow and text mode by Jamie Zawinski . +Pty and vt100 emulation by Fredrik Tolf . diff --git a/hacks/bsod.c b/hacks/bsod.c index 84f5f312..32877b8b 100644 --- a/hacks/bsod.c +++ b/hacks/bsod.c @@ -314,9 +314,9 @@ windows (Display *dpy, Window window, int delay, int which) "with the manufacturer for driver updates. Try changing video\n" "adapters.\n" "\n" - "Check with you hardware vendor for any BIOS updates. Disable\n" + "Check with your hardware vendor for any BIOS updates. Disable\n" "BIOS memory options such as caching or shadowing. If you need\n" - "to use Safe Mode to remove or disable compinents, restart your\n" + "to use Safe Mode to remove or disable components, restart your\n" "computer, press F8 to select Advanced Startup Options, and then\n" "select Safe Mode.\n" "\n" @@ -1735,7 +1735,7 @@ sparc_solaris (Display* dpy, Window window, int delay) const char *msg1 = "BAD TRAP: cpu=0 type=0x31 rp=0x2a10043b5e0 addr=0xf3880 mmu_fsr=0x0\n" - "BAD TRAP occured in module \"unix\" due to an illegal access to a" + "BAD TRAP occurred in module \"unix\" due to an illegal access to a" " user address.\n" "adb: trap type = 0x31\n" "addr=0xf3880\n" diff --git a/hacks/compile_axp.com b/hacks/compile_axp.com index 7ae7c0a5..8beb3cb7 100644 --- a/hacks/compile_axp.com +++ b/hacks/compile_axp.com @@ -64,12 +64,14 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LOOP.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MAZE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) METABALLS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MISMUNCH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE2.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOUNTAIN.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NERVEROT.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PACMAN.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENETRATE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C @@ -113,6 +115,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]) WHIRLWINDWARP.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WHIRLYGIG.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORMHOLE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XANALOGTV.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XFLAME.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C diff --git a/hacks/compile_decc.com b/hacks/compile_decc.com index 7ae7c0a5..8beb3cb7 100644 --- a/hacks/compile_decc.com +++ b/hacks/compile_decc.com @@ -64,12 +64,14 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LOOP.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MAZE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) METABALLS.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MISMUNCH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE2.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOIRE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MOUNTAIN.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) MUNCH.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NERVEROT.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) NOSEGUY.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PACMAN.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PEDAL.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENETRATE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) PENROSE.C @@ -113,6 +115,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]) WHIRLWINDWARP.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WHIRLYGIG.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORM.C +$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) WORMHOLE.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XANALOGTV.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XFLAME.C $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) XJACK.C diff --git a/hacks/config/README b/hacks/config/README index 1975f672..d43165d1 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 4.14 - 25-Oct-2003 + version 4.15 + 26-Feb-2004 http://www.jwz.org/xscreensaver/ diff --git a/hacks/config/blinkbox.xml b/hacks/config/blinkbox.xml index 0c25f39d..92aaffdd 100644 --- a/hacks/config/blinkbox.xml +++ b/hacks/config/blinkbox.xml @@ -8,6 +8,15 @@ _label="Speed" _low-label="Fast" _high-label="Slow" low="0" high="50000" default="30000"/> + + +
+ + + +
+ <_description> Shows a ball contained inside of a bounding box. Colored blocks blink in when the ball hits the edges. diff --git a/hacks/config/blocktube.xml b/hacks/config/blocktube.xml index b4d4ab98..aa0fb910 100644 --- a/hacks/config/blocktube.xml +++ b/hacks/config/blocktube.xml @@ -1,32 +1,32 @@ - - - - - - - - - - - - - - - - - <_description> -This hack draws a swirling, falling tunnel of reflective slabs. They fade from -hue to hue. Written by Lars R. Damerow. - - + + + + + + + + + + + + + + + + + <_description> +This hack draws a swirling, falling tunnel of reflective slabs. They fade from +hue to hue. Written by Lars R. Damerow. + + diff --git a/hacks/config/electricsheep.xml b/hacks/config/electricsheep.xml index 14403c0b..58aae7c4 100644 --- a/hacks/config/electricsheep.xml +++ b/hacks/config/electricsheep.xml @@ -1,4 +1,8 @@ -command arg="--root 1"/> + + + + +
diff --git a/hacks/config/gleidescope.xml b/hacks/config/gleidescope.xml index ec8c1f6e..fb753caf 100644 --- a/hacks/config/gleidescope.xml +++ b/hacks/config/gleidescope.xml @@ -18,7 +18,7 @@ <_description> -An OpenGL Kaleidescope. -Written by andrew dean. +An OpenGL kaleidescope that operates on your desktop image, or on +image files loaded from disk. Written by andrew dean. diff --git a/hacks/config/glslideshow.xml b/hacks/config/glslideshow.xml index 479b2991..19a80a6d 100644 --- a/hacks/config/glslideshow.xml +++ b/hacks/config/glslideshow.xml @@ -35,10 +35,17 @@ <_description> Loads a random sequence of images and smoothly scans and zooms around -in each, fading from pan to pan. You can set the directory from which -images are loaded on the "Advanced" tab. +in each, fading from pan to pan. -This program requires a good video card capable of supporting large +To tell it where to find the images to display, go to the "Advanced" +tab on the Screensaver Preferences window. Select "Choose Random +Images", and enter your image directory in the text field right below +that. + +(Note: not the the "Advanced" button at the bottom of this window: +the one on the other window.) + +This program requires a good video card capable of supporting large textures. Written by Jamie Zawinski and Mike Oliphant. diff --git a/hacks/config/glsnake.xml b/hacks/config/glsnake.xml index f897c482..88dd749a 100644 --- a/hacks/config/glsnake.xml +++ b/hacks/config/glsnake.xml @@ -8,25 +8,24 @@ _label="Duration" _low-label="1" _high-label="30 Seconds" low="1000" high="30000" default="5000"/> - - - - - +