# This really makes me sick...
tar:
- @$(MAKE) distdepend ; \
+ @ \
sh config.status ; \
+ $(MAKE) hack_configure ; \
+ $(MAKE) distdepend ; \
sh xscreensaver.lsm.sh > xscreensaver.lsm.$$$$ ; \
mv xscreensaver.lsm.$$$$ xscreensaver.lsm ; \
NAME=`sed -n \
`echo $(TARFILES) $$FILES | sed "s|^|$$NAME/|g; s| | $$NAME/|g" ` \
| $(COMPRESS) > $${NAME}.tar.$(COMPRESS_EXT) ; \
rm $$NAME
+
+
+# This also makes me sick...
+# autoconf generates a configure script that begins with a very hard to read,
+# nearly impossible to customize --help blurb. This horrid set of regexps
+# go through and clean up the help text, by inserting whitespace and ripping
+# out options we don't use. Odds are good that this will fail with any version
+# of autoconf other than 2.12.
+#
+hack_configure::
+ autoconf
+ @TMP=configure.$$$$ ; \
+ echo "munging configure's --help message..." ; \
+ ( perl -e ' \
+ my $$file=""; \
+ while (<>) { $$file .= $$_; } \
+ $$_ = $$file; \
+ \
+ s/^(Configuration:)$$/\n$$1\n/m; \
+ s/^(Directory and file names:)$$/\n$$1\n/m; \
+ s/^ --sbindir=.*\n//m; \
+ s/^ --libexecdir.*\n//m; \
+ s/^ --datadir.*\n.*\n//m; \
+ s/^ --sysconfdir.*\n//m; \
+ s/^ --sharedstatedir.*\n.*\n//m; \
+ s/^ --localstatedir.*\n//m; \
+ s/^ --infodir.*\n//m; \
+ s/^(Host type:)$$/\n$$1\n/m; \
+ s/\nFeatures and packages:\n.*library files are in DIR\n/\n/s;\
+ s/--enable and --with options recognized://m; \
+ s/\n --with-x .*?(["\n])/$$1/s; \
+ s/\n(Installation options:\n)/$$1/s; \
+ s/\n(X Server Extension options:\n)/$$1/s; \
+ \
+ s/^ --oldincludedir=.*$$/ \
+ --x-includes=DIR X include files are in DIR\n \
+ --x-libraries=DIR X library files are in DIR/m; \
+ \
+ print;' \
+ < configure \
+ > $$TMP && \
+ cat $$TMP > configure ) ; \
+ rm -f $$TMP
bsod - Simulates the system crashes of various other OSes.
crystal - A kaleidoscope of moving polygons.
discrete - Various fractal-ish "discrete map" forms.
+ distort - A moving lens wanders around the screen, magnifying it.
+ kumppa - Spinning 3D color fields, kinda.
gears - Draws interlocking rotating gears (GLX only.)
morph3d - Draws shiny shape-changing 3d forms (GLX only.)
superquadrics - More shiny shape-changing 3d forms (GLX only.)
-- Jamie Zawinski <jwz@netscape.com>
\f
+Changes since 2.23: * Tweaked the order of the -L options again.
+ * Cleaned up configure's --help message.
+ * Added `kumppa' hack.
+ * Smarter maze-solving algorithm in `maze'.
+ * Took `xlyap' out of the default list of hacks, since
+ it's just incredibly buggy (and slow.) Maybe someday
+ someone will fix it...
+ * Added `distort' hack, but didn't add it to the default
+ list (yet) because it's still too slow.
+ * Made the Athena demo dialog look more like the Motif
+ version; it has a text-entry field now, too.
+ * Made the Athena password dialog echo asterisks, like
+ Motif does, instead of using a flyspeck font.
+ * Some random configure tweaks.
+ * Added a `timestamp' resource that makes the `-verbose'
+ messages include the time at which they were printed.
Changes since 2.22: * The fix for SGI's "scheme" nonsense broke things, and
let the user's "*background" resource show through.
Fixed it in a different way.
prevent the data from being displayed on the screensaver
window as well.
+ You also might want to set the "*timestamp" resource to True, which
+ will cause the xscreensaver messages to include the time at which
+ they were printed.
+
* If the problem is intermittent, you might want to capture the
log information to a file and examine it later.
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
-
Installation options:
--enable-subdir=DIR Put the demo programs in a subdirectory of \`bindir',
specify the name of the subdirectory. For example,
--exec-prefix=/usr/local/bin --enable-subdir=demos
would put xscreensaver in /usr/local/bin/, and would
- put the demos in /usr/local/bin/demos/. Note that if
- you do this, you must make sure that the directory
- is on your \$PATH before xscreensaver is started: the
- directory name is not hardcoded into the program.
- This merely sets the default installation location.
+ put the demos in /usr/local/bin/demos/. (If DIR
+ begins with /, then bindir will not be prepended.)
--disable-subdir Just put the demos in \`bindir' (this is the default.)
"
+ac_help="$ac_help"
ac_help="$ac_help
- --with-x use the X Window System"
-ac_help="$ac_help
-
-Server options:
+X Server Extension options:
--with-sgi-ext Include support for the SGI SCREEN_SAVER
server extension, if possible (this is the default).
--without-dpms-ext Do not compile in support for this extension."
ac_help="$ac_help
-Toolkit options:
+X Client Toolkit options:
--with-motif Use the Motif toolkit for the user interface,
if possible (this is the default).
--without-athena Do not use Athena."
ac_help="$ac_help
-Demo options:
+Graphics Demo options:
--with-xpm Include support for XPM files in some demos,
if possible (this is the default).
have it) or else to use \"fortune\"."
ac_help="$ac_help
-Locking options:
+Screen Locking options:
--enable-locking Compile in support for locking the display
(this is the default.)
cat << EOF
Usage: configure [options] [host]
Options: [defaults in brackets after descriptions]
+
Configuration:
+
--cache-file=FILE cache test results in FILE
--help print this message
--no-create do not create output files
--quiet, --silent do not print \`checking...' messages
--version print the version of autoconf that created configure
+
Directory and file names:
+
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[same as prefix]
--bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
--includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
--mandir=DIR man documentation in DIR [PREFIX/man]
--srcdir=DIR find the sources in DIR [configure dir or ..]
--program-prefix=PREFIX prepend PREFIX to installed program names
run sed PROGRAM on installed program names
EOF
cat << EOF
+
Host type:
+
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
--target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
EOF
if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
+ echo "$ac_help"
fi
exit 0 ;;
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:649: checking host system type" >&5
+echo "configure:646: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:673: checking for $ac_word" >&5
+echo "configure:670: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:702: checking for $ac_word" >&5
+echo "configure:699: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:750: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 760 "configure"
+#line 757 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:784: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:781: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:789: checking whether we are using GNU C" >&5
+echo "configure:786: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:813: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:810: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$GCC"; then
echo $ac_n "checking how to request ANSI compilation""... $ac_c" 1>&6
-echo "configure:843: checking how to request ANSI compilation" >&5
+echo "configure:840: checking how to request ANSI compilation" >&5
case "$host" in
*-hpux*)
echo "$ac_t""HPUX: adding -Ae" 1>&6
echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:865: checking whether the compiler works on ANSI C" >&5
+echo "configure:862: checking whether the compiler works on ANSI C" >&5
if test "$cross_compiling" = yes; then
{ echo "configure: error: Couldn't build even a trivial ANSI C program: check CC." 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 870 "configure"
+#line 867 "configure"
#include "confdefs.h"
main(int ac, char **av) { return 0; }
EOF
-if { (eval echo configure:874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
else
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:903: checking how to run the C preprocessor" >&5
+echo "configure:900: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 918 "configure"
+#line 915 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 935 "configure"
+#line 932 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:974: checking for a BSD compatible install" >&5
+echo "configure:971: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1024: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1021: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1052: checking for working const" >&5
+echo "configure:1049: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1057 "configure"
+#line 1054 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:1127: checking for inline" >&5
+echo "configure:1124: checking for inline" >&5
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 1134 "configure"
+#line 1131 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1168: checking for ANSI C header files" >&5
+echo "configure:1165: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1173 "configure"
+#line 1170 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1198 "configure"
+#line 1195 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1216 "configure"
+#line 1213 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1237 "configure"
+#line 1234 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1272: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1269: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1277 "configure"
+#line 1274 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1283: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1307: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1304: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1312 "configure"
+#line 1309 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:1353: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1350: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1358 "configure"
+#line 1355 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:1391: checking for opendir in -ldir" >&5
+echo "configure:1388: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1399 "configure"
+#line 1396 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:1410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:1432: checking for opendir in -lx" >&5
+echo "configure:1429: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1440 "configure"
+#line 1437 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
opendir()
; return 0; }
EOF
-if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1475: checking for mode_t" >&5
+echo "configure:1472: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1480 "configure"
+#line 1477 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:1508: checking for pid_t" >&5
+echo "configure:1505: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1513 "configure"
+#line 1510 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1541: checking for size_t" >&5
+echo "configure:1538: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1546 "configure"
+#line 1543 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1574: checking return type of signal handlers" >&5
+echo "configure:1571: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1579 "configure"
+#line 1576 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1616: checking how to call gettimeofday" >&5
+echo "configure:1613: checking how to call gettimeofday" >&5
if eval "test \"`echo '$''{'ac_cv_gettimeofday_args'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1621 "configure"
+#line 1618 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
gettimeofday(&tv, &tzp);
; return 0; }
EOF
-if { (eval echo configure:1630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_gettimeofday_args=2
else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 1638 "configure"
+#line 1635 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
struct timeval tv; gettimeofday(&tv);
; return 0; }
EOF
-if { (eval echo configure:1646: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_gettimeofday_args=1
else
for ac_func in select fcntl uname nice setpriority getcwd getwd putenv
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1686: checking for $ac_func" >&5
+echo "configure:1683: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1691 "configure"
+#line 1688 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1741: checking for $ac_func" >&5
+echo "configure:1738: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1746 "configure"
+#line 1743 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1798: checking for $ac_hdr" >&5
+echo "configure:1795: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1803 "configure"
+#line 1800 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1808: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
echo $ac_n "checking for X""... $ac_c" 1>&6
-echo "configure:1867: checking for X" >&5
+echo "configure:1864: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 1929 "configure"
+#line 1926 "configure"
#include "confdefs.h"
#include <$x_direct_test_include>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2003 "configure"
+#line 2000 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
LIBS="$ac_save_LIBS"
# We can link X programs with no special library path.
case "`(uname -sr) 2>/dev/null`" in
"SunOS 5"*)
echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
-echo "configure:2116: checking whether -R must be followed by a space" >&5
+echo "configure:2113: checking whether -R must be followed by a space" >&5
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 2119 "configure"
+#line 2116 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 2142 "configure"
+#line 2139 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_R_space=yes
else
# libraries were built with DECnet support. And karl@cs.umb.edu says
# the Alpha needs dnet_stub (dnet does not exist).
echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
-echo "configure:2181: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2178: checking for dnet_ntoa in -ldnet" >&5
ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2189 "configure"
+#line 2186 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
-echo "configure:2222: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2219: checking for dnet_ntoa in -ldnet_stub" >&5
ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-ldnet_stub $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2230 "configure"
+#line 2227 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
dnet_ntoa()
; return 0; }
EOF
-if { (eval echo configure:2241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# The nsl library prevents programs from opening the X display
# on Irix 5.2, according to dickey@clark.net.
echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:2270: checking for gethostbyname" >&5
+echo "configure:2267: checking for gethostbyname" >&5
if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2275 "configure"
+#line 2272 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname(); below. */
; return 0; }
EOF
-if { (eval echo configure:2298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_gethostbyname=yes"
else
if test $ac_cv_func_gethostbyname = no; then
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
-echo "configure:2319: checking for gethostbyname in -lnsl" >&5
+echo "configure:2316: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2327 "configure"
+#line 2324 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:2338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# -lsocket must be given before -lnsl if both are needed.
# We assume that if connect needs -lnsl, so does gethostbyname.
echo $ac_n "checking for connect""... $ac_c" 1>&6
-echo "configure:2368: checking for connect" >&5
+echo "configure:2365: checking for connect" >&5
if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2373 "configure"
+#line 2370 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect(); below. */
; return 0; }
EOF
-if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_connect=yes"
else
if test $ac_cv_func_connect = no; then
echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
-echo "configure:2417: checking for connect in -lsocket" >&5
+echo "configure:2414: checking for connect in -lsocket" >&5
ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2425 "configure"
+#line 2422 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
connect()
; return 0; }
EOF
-if { (eval echo configure:2436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:2460: checking for remove" >&5
+echo "configure:2457: checking for remove" >&5
if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2465 "configure"
+#line 2462 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove(); below. */
; return 0; }
EOF
-if { (eval echo configure:2488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_remove=yes"
else
if test $ac_cv_func_remove = no; then
echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:2509: checking for remove in -lposix" >&5
+echo "configure:2506: checking for remove in -lposix" >&5
ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lposix $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2517 "configure"
+#line 2514 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
remove()
; return 0; }
EOF
-if { (eval echo configure:2528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:2552: checking for shmat" >&5
+echo "configure:2549: checking for shmat" >&5
if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2557 "configure"
+#line 2554 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat(); below. */
; return 0; }
EOF
-if { (eval echo configure:2580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_shmat=yes"
else
if test $ac_cv_func_shmat = no; then
echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:2601: checking for shmat in -lipc" >&5
+echo "configure:2598: checking for shmat in -lipc" >&5
ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lipc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2609 "configure"
+#line 2606 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
shmat()
; return 0; }
EOF
-if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# libraries we check for below, so use a different variable.
# --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
-echo "configure:2653: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:2650: checking for IceConnectionNumber in -lICE" >&5
ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lICE $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2661 "configure"
+#line 2658 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
IceConnectionNumber()
; return 0; }
EOF
-if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking for X app-defaults directory""... $ac_c" 1>&6
-echo "configure:2709: checking for X app-defaults directory" >&5
+echo "configure:2706: checking for X app-defaults directory" >&5
if eval "test \"`echo '$''{'ac_cv_x_app_defaults'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cd ..
rm -fr conftestdir
fi
- # Look for the directory under a standard set of common directories.
+ if test x"$ac_x_app_defaults" = x; then
+ # Look for the directory under a standard set of common directories.
# Check X11 before X11Rn because it's often a symlink to the current release.
for ac_dir in \
/usr/X11/lib/app-defaults \
fi
done
+ fi
if test x"$ac_x_app_defaults" = x; then
ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2836 "configure"
+#line 2835 "configure"
#include "confdefs.h"
#include <X11/XHPlib.h>
EOF
# Check for the availability of the XPointer typedef, and define it otherwise.
#
echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:2857: checking for XPointer" >&5
+echo "configure:2856: checking for XPointer" >&5
if eval "test \"`echo '$''{'ac_cv_xpointer'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 2868 "configure"
+#line 2867 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {
XPointer foo = (XPointer) 0;
; return 0; }
EOF
-if { (eval echo configure:2875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_xpointer=yes
else
# Some versions of Slowlaris Motif require -lgen. But not all. Why?
echo $ac_n "checking for regcmp in -lgen""... $ac_c" 1>&6
-echo "configure:2934: checking for regcmp in -lgen" >&5
+echo "configure:2933: checking for regcmp in -lgen" >&5
ac_lib_var=`echo gen'_'regcmp | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2942 "configure"
+#line 2941 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
regcmp()
; return 0; }
EOF
-if { (eval echo configure:2953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/Xmu/Error.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xmu/Error.h""... $ac_c" 1>&6
-echo "configure:2990: checking for X11/Xmu/Error.h" >&5
+echo "configure:2989: checking for X11/Xmu/Error.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2995 "configure"
+#line 2994 "configure"
#include "confdefs.h"
#include <X11/Xmu/Error.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
case "$host" in
*-sunos4*)
echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3044: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3043: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
if eval "test \"`echo '$''{'ac_cv_sunos_xmu_bug'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# with X libraries because we know it's SunOS.
LDFLAGS="$LDFLAGS -lXmu -lXt -lX11 -lXext -lm"
cat > conftest.$ac_ext <<EOF
-#line 3057 "configure"
+#line 3056 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_sunos_xmu_bug=no
else
echo "$ac_t""$ac_cv_sunos_xmu_bug" 1>&6
if test $ac_cv_sunos_xmu_bug = yes ; then
echo $ac_n "checking whether the compiler understands -static""... $ac_c" 1>&6
-echo "configure:3080: checking whether the compiler understands -static" >&5
+echo "configure:3079: checking whether the compiler understands -static" >&5
if eval "test \"`echo '$''{'ac_cv_ld_static'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -static"
cat > conftest.$ac_ext <<EOF
-#line 3087 "configure"
+#line 3086 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_ld_static=yes
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/XScreenSaver.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/XScreenSaver.h""... $ac_c" 1>&6
-echo "configure:3140: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3139: checking for X11/extensions/XScreenSaver.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+#line 3144 "configure"
#include "confdefs.h"
#include <X11/extensions/XScreenSaver.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3150: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/scrnsaver.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/scrnsaver.h""... $ac_c" 1>&6
-echo "configure:3205: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3204: checking for X11/extensions/scrnsaver.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3210 "configure"
+#line 3209 "configure"
#include "confdefs.h"
#include <X11/extensions/scrnsaver.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3259: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3258: checking for XScreenSaverRegister in -lXext" >&5
ac_lib_var=`echo Xext'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
+#line 3266 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3329: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3328: checking for XScreenSaverRegister in -lXExExt" >&5
ac_lib_var=`echo XExExt'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXExExt -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3337 "configure"
+#line 3336 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:3394: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:3393: checking for XScreenSaverRegister in -lXss" >&5
ac_lib_var=`echo Xss'_'XScreenSaverRegister | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXss -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3402 "configure"
+#line 3401 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XScreenSaverRegister()
; return 0; }
EOF
-if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/xidle.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/xidle.h""... $ac_c" 1>&6
-echo "configure:3474: checking for X11/extensions/xidle.h" >&5
+echo "configure:3473: checking for X11/extensions/xidle.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3479 "configure"
+#line 3478 "configure"
#include "confdefs.h"
#include <X11/extensions/xidle.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/XShm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/XShm.h""... $ac_c" 1>&6
-echo "configure:3539: checking for X11/extensions/XShm.h" >&5
+echo "configure:3538: checking for X11/extensions/XShm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3544 "configure"
+#line 3543 "configure"
#include "confdefs.h"
#include <X11/extensions/XShm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:3583: checking for sys/ipc.h" >&5
+echo "configure:3582: checking for sys/ipc.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3588 "configure"
+#line 3587 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "sys/shm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/shm.h""... $ac_c" 1>&6
-echo "configure:3628: checking for sys/shm.h" >&5
+echo "configure:3627: checking for sys/shm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3633 "configure"
+#line 3632 "configure"
#include "confdefs.h"
#include <sys/shm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:3687: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:3686: checking for XShmQueryExtension in -lXextSam" >&5
ac_lib_var=`echo XextSam'_'XShmQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXextSam -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3695 "configure"
+#line 3694 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XShmQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:3706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/XSGIvc.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/XSGIvc.h""... $ac_c" 1>&6
-echo "configure:3768: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:3767: checking for X11/extensions/XSGIvc.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3773 "configure"
+#line 3772 "configure"
#include "confdefs.h"
#include <X11/extensions/XSGIvc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:3821: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:3820: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
ac_lib_var=`echo Xsgivc'_'XSGIvcQueryGammaMap | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXsgivc -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3829 "configure"
+#line 3828 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XSGIvcQueryGammaMap()
; return 0; }
EOF
-if { (eval echo configure:3840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/dpms.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/dpms.h""... $ac_c" 1>&6
-echo "configure:3901: checking for X11/extensions/dpms.h" >&5
+echo "configure:3900: checking for X11/extensions/dpms.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3906 "configure"
+#line 3905 "configure"
#include "confdefs.h"
#include <X11/extensions/dpms.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:3954: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:3953: checking for DPMSInfo in -lXdpms" >&5
ac_lib_var=`echo Xdpms'_'DPMSInfo | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXdpms -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3962 "configure"
+#line 3961 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
DPMSInfo()
; return 0; }
EOF
-if { (eval echo configure:3973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:4072: checking for Xm/Xm.h" >&5
+echo "configure:4071: checking for Xm/Xm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4077 "configure"
+#line 4076 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/Xaw/Dialog.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/Dialog.h""... $ac_c" 1>&6
-echo "configure:4122: checking for X11/Xaw/Dialog.h" >&5
+echo "configure:4121: checking for X11/Xaw/Dialog.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4127 "configure"
+#line 4126 "configure"
#include "confdefs.h"
#include <X11/Xaw/Dialog.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:4171: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
+echo "configure:4170: checking for Xaw3dComputeTopShadowRGB in -lXaw3d" >&5
ac_lib_var=`echo Xaw3d'_'Xaw3dComputeTopShadowRGB | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4179 "configure"
+#line 4178 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
Xaw3dComputeTopShadowRGB()
; return 0; }
EOF
-if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
if test $have_athena = yes ; then
echo $ac_n "checking for XawViewportSetCoordinates in Viewport.h""... $ac_c" 1>&6
-echo "configure:4266: checking for XawViewportSetCoordinates in Viewport.h" >&5
+echo "configure:4265: checking for XawViewportSetCoordinates in Viewport.h" >&5
if eval "test \"`echo '$''{'ac_cv_have_XawViewportSetCoordinates'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4278 "configure"
+#line 4277 "configure"
#include "confdefs.h"
#include <X11/Xaw/Viewport.h>
EOF
have_lesstif=no
if test $have_motif = yes ; then
echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:4307: checking whether Motif is really LessTif" >&5
+echo "configure:4306: checking whether Motif is really LessTif" >&5
if eval "test \"`echo '$''{'ac_cv_have_lesstif'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4318 "configure"
+#line 4317 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
int main() {
long vers = LesstifVersion;
; return 0; }
EOF
-if { (eval echo configure:4325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_lesstif=yes
else
# It must be at least "GNU Lesstif 0.82".
# #### If you change this, also sync the warning message lower down.
echo $ac_n "checking whether LessTif is of a recent enough vintage""... $ac_c" 1>&6
-echo "configure:4350: checking whether LessTif is of a recent enough vintage" >&5
+echo "configure:4349: checking whether LessTif is of a recent enough vintage" >&5
if eval "test \"`echo '$''{'ac_cv_good_lesstif'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_good_lesstif=yes
else
cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
+#line 4364 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
int main() { exit(LesstifVersion < 82); }
EOF
-if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_good_lesstif=yes
else
LDFLAGS="$LDFLAGS -L$x_libraries"
fi
echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:4414: checking for XpQueryExtension in -lXp" >&5
+echo "configure:4413: checking for XpQueryExtension in -lXp" >&5
ac_lib_var=`echo Xp'_'XpQueryExtension | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lXp -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4422 "configure"
+#line 4421 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
XpQueryExtension()
; return 0; }
EOF
-if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/xpm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/xpm.h""... $ac_c" 1>&6
-echo "configure:4479: checking for X11/xpm.h" >&5
+echo "configure:4478: checking for X11/xpm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4484 "configure"
+#line 4483 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6
-echo "configure:4544: checking for GL/gl.h" >&5
+echo "configure:4543: checking for GL/gl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4549 "configure"
+#line 4548 "configure"
#include "confdefs.h"
#include <GL/gl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "GL/glx.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for GL/glx.h""... $ac_c" 1>&6
-echo "configure:4585: checking for GL/glx.h" >&5
+echo "configure:4584: checking for GL/glx.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4590 "configure"
+#line 4589 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4635 "configure"
+#line 4634 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/readdisplay.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/readdisplay.h""... $ac_c" 1>&6
-echo "configure:4685: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:4684: checking for X11/extensions/readdisplay.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4690 "configure"
+#line 4689 "configure"
#include "confdefs.h"
#include <X11/extensions/readdisplay.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4694: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "dmedia/vl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dmedia/vl.h""... $ac_c" 1>&6
-echo "configure:4747: checking for dmedia/vl.h" >&5
+echo "configure:4746: checking for dmedia/vl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4752 "configure"
+#line 4751 "configure"
#include "confdefs.h"
#include <dmedia/vl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
if test $have_sgivideo = yes; then
have_sgivideo=no
echo $ac_n "checking for vlOpenVideo in -lvl""... $ac_c" 1>&6
-echo "configure:4782: checking for vlOpenVideo in -lvl" >&5
+echo "configure:4781: checking for vlOpenVideo in -lvl" >&5
ac_lib_var=`echo vl'_'vlOpenVideo | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lvl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4790 "configure"
+#line 4789 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
vlOpenVideo()
; return 0; }
EOF
-if { (eval echo configure:4801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
case "$with_zippy_req" in
/*)
echo $ac_n "checking for $with_zippy_req""... $ac_c" 1>&6
-echo "configure:4869: checking for $with_zippy_req" >&5
+echo "configure:4868: checking for $with_zippy_req" >&5
if test -x "$with_zippy_req" ; then
echo "$ac_t""yes" 1>&6
else
# Extract the first word of "$with_zippy_req", so it can be a program name with args.
set dummy $with_zippy_req; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4883: checking for $ac_word" >&5
+echo "configure:4882: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_zip2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4929: checking for $ac_word" >&5
+echo "configure:4928: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_emacs_exe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4962: checking for $ac_word" >&5
+echo "configure:4961: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_xemacs_exe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$emacs_exe" ; then
echo $ac_n "checking for emacs yow""... $ac_c" 1>&6
-echo "configure:4996: checking for emacs yow" >&5
+echo "configure:4995: checking for emacs yow" >&5
#
# get emacs to tell us where the libexec directory is.
#
if test -z "$ac_cv_zippy_program" ; then
echo $ac_n "checking for xemacs yow""... $ac_c" 1>&6
-echo "configure:5018: checking for xemacs yow" >&5
+echo "configure:5017: checking for xemacs yow" >&5
if test -n "$xemacs_exe" ; then
#
# get xemacs to tell us where the libexec directory is.
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5064: checking for $ac_word" >&5
+echo "configure:5063: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_fortune'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:5099: checking for $ac_word" >&5
+echo "configure:5098: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_fortune'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test $with_kerberos = yes; then
echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:5178: checking for Kerberos" >&5
+echo "configure:5177: checking for Kerberos" >&5
if eval "test \"`echo '$''{'ac_cv_kerberos'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5189 "configure"
+#line 5188 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_kerberos=yes
else
#
if test $passwd_cruft_done = no ; then
echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5246: checking for Sun-style shadow passwords" >&5
+echo "configure:5245: checking for Sun-style shadow passwords" >&5
if eval "test \"`echo '$''{'ac_cv_sun_adjunct'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5257 "configure"
+#line 5256 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pwa_passwd;
; return 0; }
EOF
-if { (eval echo configure:5270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sun_adjunct=yes
else
#
if test $passwd_cruft_done = no ; then
echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5299: checking for DEC-style shadow passwords" >&5
+echo "configure:5298: checking for DEC-style shadow passwords" >&5
if eval "test \"`echo '$''{'ac_cv_enhanced_passwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5310 "configure"
+#line 5309 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
pw = p->ufld.fd_encrypt;
; return 0; }
EOF
-if { (eval echo configure:5327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_enhanced_passwd=yes
else
# On SCO, getprpwnam() is in -lprot (which uses nap() from -lx)
# (I'm told it needs -lcurses too, but I don't understand why.)
echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:5353: checking for getprpwnam in -lprot" >&5
+echo "configure:5352: checking for getprpwnam in -lprot" >&5
ac_lib_var=`echo prot'_'getprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lprot -lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5361 "configure"
+#line 5360 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:5372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "$ac_t""no" 1>&6
# On DEC, getprpwnam() is in -lsecurity
echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:5392: checking for getprpwnam in -lsecurity" >&5
+echo "configure:5391: checking for getprpwnam in -lsecurity" >&5
ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsecurity $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5400 "configure"
+#line 5399 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getprpwnam()
; return 0; }
EOF
-if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
#
if test $passwd_cruft_done = no ; then
echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5440: checking for HP-style shadow passwords" >&5
+echo "configure:5439: checking for HP-style shadow passwords" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_passwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5451 "configure"
+#line 5450 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pw_passwd;
; return 0; }
EOF
-if { (eval echo configure:5464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_hpux_passwd=yes
else
# on HPUX, bigcrypt is in -lsec
echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6
-echo "configure:5489: checking for bigcrypt in -lsec" >&5
+echo "configure:5488: checking for bigcrypt in -lsec" >&5
ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lsec $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5497 "configure"
+#line 5496 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
bigcrypt()
; return 0; }
EOF
-if { (eval echo configure:5508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
#
if test $passwd_cruft_done = no ; then
echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:5535: checking for generic shadow passwords" >&5
+echo "configure:5534: checking for generic shadow passwords" >&5
if eval "test \"`echo '$''{'ac_cv_shadow'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 5546 "configure"
+#line 5545 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->sp_pwdp;
; return 0; }
EOF
-if { (eval echo configure:5558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_shadow=yes
else
# On some systems (UnixWare 2.1), getspnam() is in -lgen instead of -lc.
have_getspnam=no
echo $ac_n "checking for getspnam in -lc""... $ac_c" 1>&6
-echo "configure:5584: checking for getspnam in -lc" >&5
+echo "configure:5583: checking for getspnam in -lc" >&5
ac_lib_var=`echo c'_'getspnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5592 "configure"
+#line 5591 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getspnam()
; return 0; }
EOF
-if { (eval echo configure:5603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $have_getspnam = no ; then
echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6
-echo "configure:5625: checking for getspnam in -lgen" >&5
+echo "configure:5624: checking for getspnam in -lgen" >&5
ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lgen $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5633 "configure"
+#line 5632 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
getspnam()
; return 0; }
EOF
-if { (eval echo configure:5644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
#
if test $passwd_cruft_done = no ; then
echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5675: checking for FreeBSD-style shadow passwords" >&5
+echo "configure:5674: checking for FreeBSD-style shadow passwords" >&5
if eval "test \"`echo '$''{'ac_cv_master_passwd'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# On some systems (UnixWare 2.1), crypt() is in -lcrypt instead of -lc.
have_crypt=no
echo $ac_n "checking for crypt in -lc""... $ac_c" 1>&6
-echo "configure:5696: checking for crypt in -lc" >&5
+echo "configure:5695: checking for crypt in -lc" >&5
ac_lib_var=`echo c'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lc $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5704 "configure"
+#line 5703 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:5715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test $have_crypt = no ; then
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:5737: checking for crypt in -lcrypt" >&5
+echo "configure:5736: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lcrypt $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5745 "configure"
+#line 5744 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
crypt()
; return 0; }
EOF
-if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:5755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo " If you would prefer the demos to be installed elsewhere"
echo " (for example, in a dedicated directory) you should re-run"
echo " configure with the --enable-subdir=DIR option. For more"
-echo " information, run $0 --help."
+echo " information, run $0 --help."
echo ""
echo "$warnsep"
echo ""
specify the name of the subdirectory. For example,
--exec-prefix=/usr/local/bin --enable-subdir=demos
would put xscreensaver in /usr/local/bin/, and would
- put the demos in /usr/local/bin/demos/. Note that if
- you do this, you must make sure that the directory
- is on your \$PATH before xscreensaver is started: the
- directory name is not hardcoded into the program.
- This merely sets the default installation location.
+ put the demos in /usr/local/bin/demos/. (If DIR
+ begins with /, then bindir will not be prepended.)
--disable-subdir Just put the demos in \`bindir' (this is the default.)
],
[AC_REQUIRE_CPP()
AC_CACHE_CHECK([for X app-defaults directory], ac_cv_x_app_defaults,
[AC_PATH_X_APP_DEFAULTS_XMKMF
- AC_PATH_X_APP_DEFAULTS_DIRECT
+ if test x"$ac_x_app_defaults" = x; then
+ AC_PATH_X_APP_DEFAULTS_DIRECT
+ fi
if test x"$ac_x_app_defaults" = x; then
ac_cv_x_app_defaults="/usr/lib/X11/app-defaults"
else
have_sgi=no
with_sgi_req=unspecified
AC_ARG_WITH(sgi-ext,[
-Server options:
+X Server Extension options:
--with-sgi-ext Include support for the SGI SCREEN_SAVER
server extension, if possible (this is the default).
with_athena_req=unspecified
AC_ARG_WITH(motif,[
-Toolkit options:
+X Client Toolkit options:
--with-motif Use the Motif toolkit for the user interface,
if possible (this is the default).
have_xpm=no
with_xpm_req=unspecified
AC_ARG_WITH(xpm,[
-Demo options:
+Graphics Demo options:
--with-xpm Include support for XPM files in some demos,
if possible (this is the default).
need_setuid=no
AC_ARG_ENABLE(locking,[
-Locking options:
+Screen Locking options:
--enable-locking Compile in support for locking the display
(this is the default.)
# X_EXTRA_LIBS contains extra libraries needed by X that aren't a part of X.
# (e.g., -lsocket, -lnsl, etc.)
#
-XLIBS = $(X_LIBS) $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
-XTLIBS = $(X_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
+# SAVER_LIBS is the link line for "xscreensaver", and
+# CMD_LIBS is the link line for "xscreensaver-command".
+
AD_DIR = @APPDEFAULTS@
SAVER_SRCS = $(SAVER_SRCS_1) $(DIALOG_SRCS) $(LOCK_SRCS) $(UTIL_SRCS)
SAVER_OBJS = $(SAVER_OBJS_1) $(DIALOG_OBJS) $(LOCK_OBJS) $(UTIL_OBJS)
-SAVER_LIBS = @SAVER_LIBS@ -lXt $(XTLIBS) $(PASSWD_LIBS) $(LIBS)
CMD_SRCS = xscreensaver-command.c
CMD_OBJS = xscreensaver-command.o
-CMD_LIBS = $(XLIBS) $(LIBS)
+
+SAVER_LIBS = $(X_LIBS) $(X_PRE_LIBS) @SAVER_LIBS@ -lXt \
+ -lX11 -lXext $(X_EXTRA_LIBS) $(PASSWD_LIBS) \
+ $(LIBS)
+
+CMD_LIBS = $(X_LIBS) $(X_PRE_LIBS) \
+ -lX11 -lXext $(X_EXTRA_LIBS) \
+ $(LIBS)
EXES = xscreensaver xscreensaver-command
$(DEPEND) -s '# DO NOT DELETE: updated by make depend' \
$(DEPEND_FLAGS) -- \
$(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
- $(SAVER_SRCS_1) $(CMD_SRCS)
+ $(SAVER_SRCS) $(CMD_SRCS)
# Adds some dependencies to Makefile.in -- not totally accurate, but pretty
# close. This excludes dependencies on files in /usr/include, etc. It tries
$(DEPEND) -w 0 -f - \
-s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
$(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
- $(SAVER_SRCS_1) $(CMD_SRCS) | \
+ $(SAVER_SRCS_1) $(MOTIF_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) \
+ $(LOCK_SRCS_1) $(CMD_SRCS) | \
( \
awk '/^# .*Makefile.in ---/,/^# DO .*distdepend/' < Makefile.in ; \
sed -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d' \
$(CC) $(LDFLAGS) -o $@ $(CMD_OBJS) $(CMD_LIBS)
+TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PWENT_OBJS) $(DIALOG_OBJS) \
+ subprocs.o demo.o \
+ $(UTIL_OBJS)
+
+test-passwd: $(TEST_PASSWD_OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(TEST_PASSWD_OBJS) $(SAVER_LIBS)
+
##############################################################################
#
# DO NOT DELETE: updated by make distdepend
xscreensaver.o: XScreenSaver_ad.h
xset.o: ../config.h
xset.o: $(srcdir)/xscreensaver.h
+dialogs-Xm.o: ../config.h
+dialogs-Xm.o: $(UTILS_SRC)/visual.h
+dialogs-Xaw.o: ../config.h
+dialogs-Xaw.o: $(UTILS_SRC)/visual.h
+passwd.o: ../config.h
+lock.o: ../config.h
+lock.o: $(srcdir)/xscreensaver.h
+lock.o: $(UTILS_SRC)/resources.h
xscreensaver-command.o: ../config.h
xscreensaver-command.o: $(UTILS_SRC)/version.h
! a screen saver and locker for the X window system
! by Jamie Zawinski
!
-! version 2.23
-! 21-Jun-98
+! version 2.24
+! 30-Jun-98
!
! See "man xscreensaver" for more info. The latest version is always
! available at http://people.netscape.com/jwz/xscreensaver/
*nice: 10
*lock: False
*verbose: False
+*timestamp: False
*fade: True
*unfade: False
*fadeSeconds: 3
vines -root \n\
kaleidescope -root \n\
xjack -root \n\
- xlyap -root -randomize \n\
cynosure -root \n\
flow -root \n\
epicycle -root \n\
bsod -root \n\
crystal -root \n\
discrete -root \n\
+ kumppa -root \n\
\
mono: rocks -root \n\
color: rocks -root -fg darksalmon \n\
*resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
XScreenSaver.demo_dialog*List.font: \
*-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-
-! This is a hack to make the typed password invisible.
-! Surely someone can do better than this...
-XScreenSaver.passwd_dialog*passwd_form.value*font: *nil*
+XScreenSaver.demo_dialog*Text*font: \
+ *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
XScreenSaver.demo_dialog*foreground: #000000
XScreenSaver.demo_dialog*background: #E5E5E5
XScreenSaver.demo_dialog*List.background: #FFFFFF
XScreenSaver.demo_dialog*Scrollbar.background: #D9D9D9
XScreenSaver.demo_dialog*Command.background: #D9D9D9
+XScreenSaver.demo_dialog*Text*background: #FFFFFF
XScreenSaver.resources_dialog*foreground: #000000
XScreenSaver.resources_dialog*background: #E5E5E5
XScreenSaver.passwd_dialog*roger.foreground: #CD0000
XScreenSaver.passwd_dialog*roger.background: #FFFFFF
-*demo_dialog*viewport.width: 400
*demo_dialog*viewport.height: 200
*Form.borderWidth: 0
*Box.borderWidth: 0
*demo_dialog*edit.label: Preferences
*demo_dialog*done.label: Exit Demo Mode
*demo_dialog*restart.label: Reinitialize
+XScreenSaver.demo_dialog*Command.internalWidth: 10
+XScreenSaver.demo_dialog*Command.internalHeight: 4
*resources_dialog*timeout.label: Saver Timeout:
*resources_dialog*cycle.label: Cycle Timeout:
*passwd_dialog*label3.label: Please type %s's password to unlock it.
*passwd_dialog*ok.label: OK
*passwd_dialog*cancel.label: Cancel
-*passwd_dialog*passwd_form*label.label: Enter password:
-*passwd_dialog*Dialog.label: Enter password:
+*passwd_dialog*passwd_form*label.label:
+*passwd_dialog*Dialog.label:
*passwd_dialog*passwd_form*Text.width: 200
+*passwd_dialog*passwd_form.borderWidth: 0
*passwd_dialog*roger.width: 150
*passwd_dialog*roger.height: 150
*passwd_dialog*roger.borderWidth: 1
"*nice: 10",
"*lock: False",
"*verbose: False",
+"*timestamp: False",
"*fade: True",
"*unfade: False",
"*fadeSeconds: 3",
vines -root \\n\
kaleidescope -root \\n\
xjack -root \\n\
- xlyap -root -randomize \\n\
cynosure -root \\n\
flow -root \\n\
epicycle -root \\n\
bsod -root \\n\
crystal -root \\n\
discrete -root \\n\
+ kumppa -root \\n\
\
mono: rocks -root \\n\
color: rocks -root -fg darksalmon \\n\
"*resources_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
"XScreenSaver.demo_dialog*List.font: \
*-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"XScreenSaver.passwd_dialog*passwd_form.value*font: *nil*",
+"XScreenSaver.demo_dialog*Text*font: \
+ *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
"XScreenSaver.demo_dialog*foreground: #000000",
"XScreenSaver.demo_dialog*background: #E5E5E5",
"XScreenSaver.demo_dialog*List.background: #FFFFFF",
"XScreenSaver.demo_dialog*Scrollbar.background: #D9D9D9",
"XScreenSaver.demo_dialog*Command.background: #D9D9D9",
+"XScreenSaver.demo_dialog*Text*background: #FFFFFF",
"XScreenSaver.resources_dialog*foreground: #000000",
"XScreenSaver.resources_dialog*background: #E5E5E5",
"XScreenSaver.resources_dialog*Command.background: #D9D9D9",
"XScreenSaver.passwd_dialog*Text*background: #FFFFFF",
"XScreenSaver.passwd_dialog*roger.foreground: #CD0000",
"XScreenSaver.passwd_dialog*roger.background: #FFFFFF",
-"*demo_dialog*viewport.width: 400",
"*demo_dialog*viewport.height: 200",
"*Form.borderWidth: 0",
"*Box.borderWidth: 0",
"*demo_dialog*edit.label: Preferences",
"*demo_dialog*done.label: Exit Demo Mode",
"*demo_dialog*restart.label: Reinitialize",
+"XScreenSaver.demo_dialog*Command.internalWidth: 10",
+"XScreenSaver.demo_dialog*Command.internalHeight: 4",
"*resources_dialog*timeout.label: Saver Timeout:",
"*resources_dialog*cycle.label: Cycle Timeout:",
"*resources_dialog*fade.label: Fade Duration:",
"*passwd_dialog*label3.label: Please type %s's password to unlock it.",
"*passwd_dialog*ok.label: OK",
"*passwd_dialog*cancel.label: Cancel",
-"*passwd_dialog*passwd_form*label.label: Enter password:",
-"*passwd_dialog*Dialog.label: Enter password:",
+"*passwd_dialog*passwd_form*label.label: ",
+"*passwd_dialog*Dialog.label: ",
"*passwd_dialog*passwd_form*Text.width: 200",
+"*passwd_dialog*passwd_form.borderWidth: 0",
"*passwd_dialog*roger.width: 150",
"*passwd_dialog*roger.height: 150",
"*passwd_dialog*roger.borderWidth: 1",
# include <X11/Xaw/Viewport.h>
# include <X11/Xaw/Dialog.h>
# include <X11/Xaw/Scrollbar.h>
+# include <X11/Xaw/Text.h>
#endif /* HAVE_ATHENA */
#include "xscreensaver.h"
return XmTextGetString (text_widget);
#else /* HAVE_ATHENA */
char *string = 0;
- XtVaGetValues (text_widget, XtNvalue, &string, 0);
+ if (XtIsSubclass(text_widget, textWidgetClass))
+ XtVaGetValues (text_widget, XtNstring, &string, 0);
+ else if (XtIsSubclass(text_widget, dialogWidgetClass))
+ XtVaGetValues (text_widget, XtNvalue, &string, 0);
+ else
+ string = 0;
+
return string;
#endif /* HAVE_ATHENA */
}
XInstallColormap (si->dpy, ssi->cmap);
}
-#ifdef HAVE_MOTIF
static void
text_cb (Widget text_widget, XtPointer client_data, XtPointer call_data)
demo_mode_hack (si, line);
}
-#endif /* HAVE_MOTIF */
+
+#ifdef HAVE_ATHENA
+/* Bend over backwards to make hitting Return in the text field do the
+ right thing.
+ */
+extern saver_info *global_si_kludge;
+static void text_enter (Widget w, XEvent *event, String *av, Cardinal *ac)
+{
+ text_cb (w, global_si_kludge, 0);
+}
+
+static XtActionsRec actions[] = {{"done", text_enter}
+ };
+static char translations[] = ("<Key>Return: done()\n"
+ "<Key>Linefeed: done()\n"
+ "Ctrl<Key>M: done()\n"
+ "Ctrl<Key>J: done()\n");
+#endif /* HAVE_ATHENA */
static void
#ifdef HAVE_ATHENA
XawListReturnStruct *item = (XawListReturnStruct*)call_data;
+ XtVaSetValues(text_line, XtNstring, item->string, 0);
+
demo_mode_hack (si, item->string);
if (item->list_index >= 0)
si->default_screen->current_hack = item->list_index;
int cnt;
XawListReturnStruct *current = XawListShowCurrent(demo_list);
if (current->list_index == XAW_LIST_NONE)
- XawListHighlight(demo_list,1);
+ XawListHighlight(demo_list, 0);
else
{
XtVaGetValues(demo_list,
ensure_selected_item_visible (demo_list);
current = XawListShowCurrent(demo_list);
+ XtVaSetValues(text_line, XtNstring, current->string, 0);
demo_mode_hack (si, current->string);
#else /* HAVE_MOTIF */
#ifdef HAVE_ATHENA
XawListReturnStruct *current=XawListShowCurrent(demo_list);
if (current->list_index == XAW_LIST_NONE)
- XawListHighlight(demo_list,1);
+ XawListHighlight(demo_list, 0);
else
{
- if (current->list_index>=1)
+ if (current->list_index >= 1)
{
current->list_index--;
XawListHighlight(demo_list, current->list_index);
ensure_selected_item_visible (demo_list);
current = XawListShowCurrent(demo_list);
+ XtVaSetValues(text_line, XtNstring, current->string, 0);
demo_mode_hack (si, current->string);
#else /* HAVE_MOTIF */
}
-static void
+void
make_screenhack_dialog (saver_info *si)
{
saver_screen_info *ssi = si->default_screen;
select_cb, (XtPointer) si);
XtAddCallback (text_line, XmNactivateCallback, text_cb, (XtPointer) si);
- for (; *hacks; hacks++)
- {
- XmString xmstr = XmStringCreate (*hacks, XmSTRING_DEFAULT_CHARSET);
- XmListAddItem (demo_list, xmstr, 0);
- XmStringFree (xmstr);
- }
+ if (hacks)
+ for (; *hacks; hacks++)
+ {
+ XmString xmstr = XmStringCreate (*hacks, XmSTRING_DEFAULT_CHARSET);
+ XmListAddItem (demo_list, xmstr, 0);
+ XmStringFree (xmstr);
+ }
/* Cause the most-recently-run hack to be selected in the list.
Do some voodoo to make it be roughly centered in the list (really,
#else /* HAVE_ATHENA */
+ /* Hook up the text line. */
+
+ XtAppAddActions(XtWidgetToApplicationContext(text_line),
+ actions, XtNumber(actions));
+ XtOverrideTranslations(text_line, XtParseTranslationTable(translations));
+
+
+ /* Must realize the widget before populating the list, or the dialog
+ will be as wide as the longest string.
+ */
+ XtRealizeWidget (demo_dialog);
+
XtVaSetValues (demo_list,
XtNlist, hacks,
XtNnumberStrings, si->prefs.screenhacks_count,
if (ssi->current_hack > 0)
XawListHighlight(demo_list, ssi->current_hack);
+ /* Now that we've populated the list, make sure that the list is as
+ wide as the dialog itself.
+ */
+ {
+ Widget viewport = XtParent(demo_list);
+ Widget subform = XtParent(viewport);
+ Widget box = XtNameToWidget(demo_dialog, "*box");
+ Widget label1 = XtNameToWidget(demo_dialog, "*label1");
+ Widget label2 = XtNameToWidget(demo_dialog, "*label2");
+ Dimension x=0, y=0, w=0, h=0, bw=0, w2=0;
+ XtVaGetValues(subform,
+ XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+ XtVaGetValues(box, XtNwidth, &w2, 0);
+ if (w2 != w)
+ XtResizeWidget(subform, w2, h, bw);
+
+ /* Why isn't the viewport getting centered? */
+ XtVaGetValues(viewport,
+ XtNx, &x, XtNy, &y, XtNheight, &h, XtNborderWidth, &bw, 0);
+ printf("%d %d %d %d\n", x, y, w, h);
+ XtConfigureWidget(viewport, x, y, w2-x-x, h, bw);
+
+ /* And the text line, too. */
+ XtVaGetValues(text_line,
+ XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+ XtVaGetValues(viewport, XtNwidth, &w2, 0);
+ if (w2 != w)
+ XtResizeWidget(text_line, w2, h, bw);
+
+ /* And the labels too. */
+ XtVaGetValues(label1,
+ XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+ if (w2 != w)
+ XtResizeWidget(label1, w2, h, bw);
+
+ XtVaGetValues(label2,
+ XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
+ if (w2 != w)
+ XtResizeWidget(label2, w2, h, bw);
+
+ }
+
#endif /* HAVE_ATHENA */
monitor_power_on (si);
timeout: %d\n\tcycle: %d\n\tlock: %d\n\tpasswd: %d\n\
fade: %d\n\tfade: %d\n\tverbose: %d\n\tinstall: %d\n\
fade: %d\n\tunfade: %d\n\tlock: %d\n",
- progname, p->timeout, p->cycle, p->lock_timeout,
+ blurb(), p->timeout, p->cycle, p->lock_timeout,
#ifdef NO_LOCKING
0,
#else
if (p->verbose_p)
fprintf (stderr,
"%s: configuring server for saver timeout of %d seconds.\n",
- progname, server_timeout);
+ blurb(), server_timeout);
/* Leave all other parameters the same. */
XSetScreenSaver (si->dpy, server_timeout, server_interval,
prefer_blank, allow_exp);
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
- progname,
+ blurb(),
(unsigned int) event.xcreatewindow.window,
p->notice_events_timeout);
#endif /* DEBUG_TIMERS */
#include <X11/Xaw/Toggle.h>
#include <X11/Xaw/Viewport.h>
#include <X11/Xaw/Dialog.h>
+#include <X11/Xaw/AsciiText.h>
#include <stdio.h>
XtNfromVert, label1,
NULL);
- subform=
+ subform =
XtVaCreateManagedWidget("subform", formWidgetClass, demo_form,
XtNleft, XtChainLeft,
XtNright, XtChainRight,
XtNfromVert, label2,
- XtNbottom, XtChainBottom,
NULL);
- viewport=
+ viewport =
XtVaCreateManagedWidget("viewport", viewportWidgetClass, subform,
+ XtNtop, XtChainTop,
+ XtNleft, XtChainLeft,
+ XtNright, XtChainRight,
XtNallowVert, TRUE,
XtNallowHoriz, TRUE,
XtNforceBars, TRUE,
NULL);
demo_list = XtVaCreateManagedWidget("demo_list", listWidgetClass, viewport,
- XtNverticalList, TRUE,
- XtNdefaultColumns, 1,
- NULL);
- box=
+ XtNverticalList, TRUE,
+ XtNdefaultColumns, 1,
+ NULL);
+
+ text_line = XtVaCreateManagedWidget("text", asciiTextWidgetClass, subform,
+ XtNleft, XtChainLeft,
+ XtNright, XtChainRight,
+ XtNfromVert, viewport,
+ XtNbottom, XtChainBottom,
+ XtNeditType, XawtextEdit,
+ NULL);
+
+ box =
XtVaCreateManagedWidget("box", boxWidgetClass, demo_form,
- XtNfromHoriz, subform,
- XtNfromVert, label2,
+ XtNleft, XtChainLeft,
+ XtNfromVert, subform,
XtNbottom, XtChainBottom,
XtNright, XtChainRight,
+ XtNorientation, XtEhorizontal,
NULL);
- prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL);
next = XtVaCreateManagedWidget("next", commandWidgetClass, box, NULL);
+ prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL);
edit = XtVaCreateManagedWidget("edit", commandWidgetClass, box, NULL);
restart = XtVaCreateManagedWidget("restart", commandWidgetClass, box, NULL);
done = XtVaCreateManagedWidget("done", commandWidgetClass, box, NULL);
#include <X11/StringDefs.h>
#include <X11/Intrinsic.h>
+#include <X11/IntrinsicP.h> /* for XtResizeWidget */
#include "xscreensaver.h"
#include "resources.h"
#else /* VMS */
extern char *getenv(const char *name);
extern int validate_user(char *name, char *password);
-static char * user_vms;
#endif /* VMS */
# include <X11/Xaw/Label.h>
# include <X11/Xaw/Dialog.h>
-static void passwd_done_cb (Widget, XtPointer, XtPointer);
-static XtActionsRec actionsList[] =
-{
- {"passwdentered", (XtActionProc) passwd_done_cb},
-};
-
-static char Translations[] =
-"\
-<Key>Return: passwdentered()\
-";
-
#else /* HAVE_MOTIF */
# include <Xm/Xm.h>
passwd_state = pw_cancel;
}
+
+#ifdef VMS
+static Bool
+vms_passwd_valid_p(char *pw)
+{
+ char *u = getenv("USER");
+ return (validate_user (i, typed_passwd) == 1);
+}
+# undef passwd_valid_p
+# define passwd_valid_p vms_passwd_valid_p
+
+#endif /* VMS */
+
+
static void
passwd_done_cb (Widget button, XtPointer client_data, XtPointer call_data)
{
if (passwd_state != pw_read) return; /* already done */
-#ifndef VMS
-# ifdef HAVE_ATHENA
- strncpy(typed_passwd, XawDialogGetValueString(passwd_form),
- sizeof(typed_passwd)-1);
- typed_passwd[sizeof(typed_passwd)-1] = 0;
-# endif /* HAVE_ATHENA */
if (passwd_valid_p (typed_passwd))
passwd_state = pw_ok;
else
passwd_state = pw_fail;
-
-#else /* VMS */
- user_vms = getenv("USER");
- if (validate_user(user_vms,typed_passwd) == 1)
- passwd_state = pw_ok;
- else
- passwd_state = pw_fail;
-#endif /* VMS */
}
+
#if defined(HAVE_MOTIF) && defined(VERIFY_CALLBACK_WORKS)
/* It looks to me like adding any modifyVerify callback causes
{"done", done}
};
-# ifdef HAVE_MOTIF
-# if 0 /* oh fuck, why doesn't this work? */
-static char translations[] = "\
-<Key>BackSpace: backspace()\n\
-<Key>Delete: backspace()\n\
-Ctrl<Key>H: backspace()\n\
-Ctrl<Key>U: kill_line()\n\
-Ctrl<Key>X: kill_line()\n\
-Ctrl<Key>J: done()\n\
-Ctrl<Key>M: done()\n\
-<Key>: keypress()\n\
-";
-# else /* !0 */
-static char translations[] = "<Key>:keypress()";
-# endif /* !0 */
-# endif /* HAVE_MOTIF */
+# if 0 /* This works for Athena, but not Motif: keypress() gets called
+ for all keys anyway. So, the implementation of keypress()
+ has BackSpace, etc, hardcoded into it instead. FMH!
+ */
+static char translations[] = ("<Key>BackSpace: backspace()\n"
+ "<Key>Delete: backspace()\n"
+ "Ctrl<Key>H: backspace()\n"
+ "Ctrl<Key>U: kill_line()\n"
+ "Ctrl<Key>X: kill_line()\n"
+ "Ctrl<Key>J: done()\n"
+ "Ctrl<Key>M: done()\n"
+ "<Key>: keypress()\n");
+# else /* !0 */
+static char translations[] = ("<Key>: keypress()\n");
+# endif /* !0 */
static void
create_passwd_dialog (parent, ssi->default_visual, ssi->demo_cmap);
#ifdef HAVE_ATHENA
-
XtVaSetValues(passwd_form, XtNvalue, typed_passwd, 0);
XawDialogAddButton(passwd_form,"ok", passwd_done_cb, 0);
passwd_done = XtNameToWidget(passwd_form,"ok");
passwd_text = XtNameToWidget(passwd_form,"value");
- XtAppAddActions(XtWidgetToApplicationContext(passwd_text),
- actionsList, XtNumber(actionsList));
- XtOverrideTranslations(passwd_text, XtParseTranslationTable(Translations));
+ XtAppAddActions(XtWidgetToApplicationContext(passwd_text),
+ actions, XtNumber(actions));
+ XtOverrideTranslations(passwd_text, XtParseTranslationTable(translations));
+
+ /* Lose the label on the inner dialog. */
+ {
+ Widget w = XtNameToWidget(passwd_form, "label");
+ if (w) XtUnmanageChild(w);
+ }
#else /* HAVE_MOTIF */
# ifdef VERIFY_CALLBACK_WORKS
XtAddCallback (passwd_text, XmNmodifyVerifyCallback, check_passwd_cb, 0);
XtAddCallback (passwd_text, XmNactivateCallback, check_passwd_cb, 0);
-# else
+# else /* !VERIFY_CALLBACK_WORKS */
XtAddCallback (passwd_text, XmNactivateCallback, passwd_done_cb, 0);
XtOverrideTranslations (passwd_text, XtParseTranslationTable (translations));
-# endif
+# endif /* !VERIFY_CALLBACK_WORKS */
# if defined(HAVE_MOTIF) && (XmVersion >= 1002)
/* The focus stuff changed around; this didn't exist in 1.1.5. */
XtVaSetValues (passwd_form, XmNinitialFocus, passwd_text, 0);
-# endif
+# endif /* HAVE_MOTIF && XmVersion >= 1002 */
/* Another random thing necessary in 1.2.1 but not 1.1.5... */
XtVaSetValues (roger_label, XmNborderWidth, 2, 0);
x = (w / 2);
-#ifdef __sgi /* Kludge -- SGI's Motif hacks place buttons differently. */
+# ifdef __sgi /* Kludge -- SGI's Motif hacks place buttons differently. */
{
static int sgi_mode = -1;
if (sgi_mode == -1)
if (sgi_mode)
x = d;
}
-#endif /* __sgi */
+# endif /* __sgi */
x -= d/2;
y += d/2;
}
-#ifdef HAVE_ATHENA
-
-void
-pop_up_athena_dialog_box (Widget parent, Widget focus, Widget dialog,
- Widget form, int where)
-{
- /* modified from demo.c */
- /* I'm sure this is the wrong way to pop up a dialog box, but I can't
- figure out how else to do it.
-
- It's important that the screensaver dialogs not get decorated or
- otherwise reparented by the window manager, because they need to be
- children of the *real* root window, not the WM's virtual root, in
- order for us to guarentee that they are visible above the screensaver
- window itself.
- */
- Arg av [100];
- int ac = 0;
- Dimension sw, sh, x, y, w, h;
-
- XtRealizeWidget(dialog);
- sw = WidthOfScreen (XtScreen (dialog));
- sh = HeightOfScreen (XtScreen (dialog));
- ac = 0;
- XtSetArg (av [ac], XtNwidth, &w); ac++;
- XtSetArg (av [ac], XtNheight, &h); ac++;
- XtGetValues (form, av, ac);
- switch (where)
- {
- case 0: /* center it in the top-right quadrant */
- x = (sw/2 + w) / 2 + (sw/2) - w;
- y = (sh/2 + h) / 2 - h;
- break;
- case 1: /* center it in the bottom-right quadrant */
- x = (sw/2 + w) / 2 + (sw/2) - w;
- y = (sh/2 + h) / 2 + (sh/2) - h;
- break;
- case 2: /* center it on the screen */
- x = (sw + w) / 2 - w;
- y = (sh + h) / 2 - h;
- break;
- default:
- abort ();
- }
- if (x + w > sw) x = sw - w;
- if (y + h > sh) y = sh - h;
- ac = 0;
- XtVaSetValues(dialog,
- XtNx, x,
- XtNy, y,
- NULL);
- XtVaSetValues(form,
- XtNx, x,
- XtNy, y,
- NULL);
- XtPopup(dialog,XtGrabNone);
- steal_focus_and_colormap (focus);
-}
-
-static void
-passwd_set_label (char *buf, int len)
-{
- Widget label;
- if (!passwd_text)
- return;
- label=XtNameToWidget(XtParent(passwd_text),"*label");
- XtVaSetValues(label,
- XtNlabel, buf,
- NULL);
-}
-#endif /* HAVE_ATHENA */
-
static Bool
pop_passwd_dialog (saver_info *si)
{
*/
if (XtWindow (passwd_form))
XMapRaised (dpy, XtWindow (passwd_dialog));
-#endif
+#endif /* HAVE_MOTIF && !DESTROY_WORKS */
monitor_power_on (si);
-#ifdef HAVE_ATHENA
- pop_up_athena_dialog_box (parent, passwd_text, passwd_dialog,
- passwd_form, 2);
-#else
pop_up_dialog_box (passwd_dialog, passwd_form,
/* for debugging -- don't ask */
(si->prefs.debug_p ? 69 : 0) +
2);
XtManageChild (passwd_form);
-#endif
+
+#ifdef HAVE_ATHENA
+ steal_focus_and_colormap (passwd_text);
+
+ /* For some reason, the passwd_form box is not stretching all the way
+ to the right edge of the window, despite being XtChainRight.
+ So... resize it by hand.
+ */
+ {
+ Dimension x=0, w=0, h=0;
+ XtVaGetValues(passwd_form, XtNx, &x, XtNwidth, &w, XtNheight, &h, 0);
+ XtVaGetValues(XtParent(passwd_form), XtNwidth, &w, 0);
+ w -= x;
+ w -= 6;
+ if (w > 0) XtResizeWidget(passwd_form, w, h, 0);
+ }
+
+#endif /* HAVE_ATHENA */
+
#if defined(HAVE_MOTIF) && (XmVersion < 1002)
/* The focus stuff changed around; this causes problems in 1.2.1
but is necessary in 1.1.5. */
XmProcessTraversal (passwd_text, XmTRAVERSE_CURRENT);
-#endif
+#endif /* HAVE_MOTIF && XmVersion < 1002 */
passwd_idle_timer_tick = p->passwd_timeout / 1000;
passwd_idle_id = XtAppAddTimeOut (si->app, 1000, passwd_idle_timer,
case pw_cancel: lose = 0; break;
default: abort ();
}
+
#ifdef HAVE_MOTIF
XmProcessTraversal (passwd_cancel, 0); /* turn off I-beam */
-#endif
+#else /* HAVE_ATHENA */
+ steal_focus_and_colormap (passwd_done);
+#endif /* HAVE_ATHENA */
+
if (lose)
{
-#ifdef HAVE_ATHENA
- /* show the message */
- passwd_set_label(lose,strlen(lose)+1);
-
- /* and clear the password line */
- memset(typed_passwd, 0, sizeof(typed_passwd));
- text_field_set_string (passwd_text, "", 0);
-#else
text_field_set_string (passwd_text, lose, strlen (lose) + 1);
-#endif
+
passwd_idle_timer_tick = 1;
passwd_idle_id = XtAppAddTimeOut (si->app, 3000, passwd_idle_timer,
(XtPointer) si);
#ifdef DESTROY_WORKS
XtDestroyWidget (passwd_dialog);
passwd_dialog = 0;
-#else
+#else /* !DESTROY_WORKS */
XUnmapWindow (XtDisplay (passwd_dialog), XtWindow (passwd_dialog));
-#endif
+#endif /* !DESTROY_WORKS */
{
XErrorHandler old_handler = XSetErrorHandler (BadWindow_ehandler);
/* I don't understand why this doesn't refocus on the old selected
static Bool initted = False;
if (! initted)
{
+
#ifndef VERIFY_CALLBACK_WORKS
XtAppAddActions (si->app, actions, XtNumber (actions));
-#endif
+#endif /* !VERIFY_CALLBACK_WORKS */
+
passwd_dialog = 0;
initted = True;
}
if (si->prefs.debug_p)
fprintf ((real_stderr ? real_stderr : stderr),
- "%s: resetting stderr\n", progname);
+ "%s: resetting stderr\n", blurb());
ssi->stderr_text_x = 0;
ssi->stderr_text_y = 0;
if (si->prefs.debug_p)
fprintf(real_stderr,
"%s: using overlay visual 0x%0x for stderr text layer.\n",
- progname, (int) XVisualIDFromVisual (visual));
+ blurb(), (int) XVisualIDFromVisual (visual));
ssi->stderr_cmap = XCreateColormap(si->dpy,
RootWindowOfScreen(ssi->screen),
if (nice (n) == -1 && errno != 0)
{
char buf [512];
- sprintf (buf, "%s: nice(%d) failed", progname, n);
+ sprintf (buf, "%s: nice(%d) failed", blurb(), n);
perror (buf);
}
}
{
char buf [512];
sprintf (buf, "%s: setpriority(PRIO_PROCESS, %lu, %d) failed",
- progname, (unsigned long) getpid(), nice_level);
+ blurb(), (unsigned long) getpid(), nice_level);
perror (buf);
}
#else
fprintf (stderr,
"%s: don't know how to change process priority on this system.\n",
- progname);
+ blurb());
#endif
}
{
char buf [512];
- sprintf (buf, "%s: could not execute \"%s\"", progname, av[0]);
+ sprintf (buf, "%s: could not execute \"%s\"", blurb(), av[0]);
perror (buf);
if (errno == ENOENT &&
{
char buf [512];
- sprintf (buf, "%s: execvp(\"%s\") failed", progname, av[0]);
+ sprintf (buf, "%s: execvp(\"%s\") failed", blurb(), av[0]);
perror (buf);
fflush(stderr);
fflush(stdout);
if (p->verbose_p)
printf ("%s: spawning \"%s\" in pid %lu%s.\n",
- progname, command, (unsigned long) getpid (),
+ blurb(), command, (unsigned long) getpid (),
(hairy_p ? " (via shell)" : ""));
if (hairy_p)
#else /* VMS */
if (p->verbose_p)
- printf ("%s: spawning \"%s\" in pid %lu.\n", progname, command, getpid());
+ printf ("%s: spawning \"%s\" in pid %lu.\n", blurb(), command, getpid());
exec_vms_command (command);
#endif /* VMS */
show_job_list (void)
{
struct screenhack_job *job;
- fprintf(stderr, "%s: job list:\n", progname);
+ fprintf(stderr, "%s: job list:\n", blurb());
for (job = jobs; job; job = job->next)
fprintf (stderr, " %5ld: (%s) %s\n",
(long) job->pid,
{
if (p->verbose_p)
fprintf (stderr, "%s: no child %ld to signal!\n",
- progname, (long) pid);
+ blurb(), (long) pid);
goto DONE;
}
#ifdef SIGSTOP
if (p->verbose_p)
- fprintf (stderr, "%s: %s pid %lu.\n", progname,
+ fprintf (stderr, "%s: %s pid %lu.\n", blurb(),
(signal == SIGTERM ? "killing" :
signal == SIGSTOP ? "suspending" :
signal == SIGCONT ? "resuming" : "signalling"),
(unsigned long) job->pid);
#else /* !SIGSTOP */
if (p->verbose_p)
- fprintf (stderr, "%s: %s pid %lu.\n", progname, "killing",
+ fprintf (stderr, "%s: %s pid %lu.\n", blurb(), "killing",
(unsigned long) job->pid);
#endif /* !SIGSTOP */
{
if (errno == ESRCH)
fprintf (stderr, "%s: child process %lu (%s) was already dead.\n",
- progname, job->pid, job->name);
+ blurb(), job->pid, job->name);
else
{
char buf [1024];
sprintf (buf, "%s: couldn't kill child process %lu (%s)",
- progname, job->pid, job->name);
+ blurb(), job->pid, job->name);
perror (buf);
}
}
saver_info *si = global_si_kludge; /* I hate C so much... */
if (si->prefs.debug_p)
- fprintf(stderr, "%s: got SIGCHLD%s\n", progname,
+ fprintf(stderr, "%s: got SIGCHLD%s\n", blurb(),
(block_sigchld_handler ? " (blocked)" : ""));
if (block_sigchld_handler < 0)
if (si->prefs.debug_p)
{
if (kid < 0 && errno)
- fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", progname,
+ fprintf (stderr, "%s: waitpid(-1) ==> %ld (%d)\n", blurb(),
(long) kid, errno);
else
- fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", progname,
+ fprintf (stderr, "%s: waitpid(-1) ==> %ld\n", blurb(),
(long) kid);
}
(p->verbose_p || job->status != job_killed)))
fprintf (stderr,
"%s: child pid %lu (%s) exited abnormally (code %d).\n",
- progname, (unsigned long) kid, name, exit_status);
+ blurb(), (unsigned long) kid, name, exit_status);
else if (p->verbose_p)
printf ("%s: child pid %lu (%s) exited normally.\n",
- progname, (unsigned long) kid, name);
+ blurb(), (unsigned long) kid, name);
if (job)
job->status = job_dead;
job->status != job_killed ||
WTERMSIG (wait_status) != SIGTERM)
fprintf (stderr, "%s: child pid %lu (%s) terminated with %s.\n",
- progname, (unsigned long) kid, name,
+ blurb(), (unsigned long) kid, name,
signal_name (WTERMSIG(wait_status)));
if (job)
{
if (p->verbose_p)
fprintf (stderr, "%s: child pid %lu (%s) stopped with %s.\n",
- progname, (unsigned long) kid, name,
+ blurb(), (unsigned long) kid, name,
signal_name (WSTOPSIG (wait_status)));
if (job)
else
{
fprintf (stderr, "%s: child pid %lu (%s) died in a mysterious way!",
- progname, (unsigned long) kid, name);
+ blurb(), (unsigned long) kid, name);
if (job)
job->status = job_dead;
}
if (sigaction(SIGCHLD, &action, &old) < 0)
{
char buf [255];
- sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
+ sprintf (buf, "%s: couldn't catch SIGCHLD", blurb());
perror (buf);
}
sigchld_initialized_p = True;
if (((long) signal (SIGCHLD, sigchld_handler)) == -1L)
{
char buf [255];
- sprintf (buf, "%s: couldn't catch SIGCHLD", progname);
+ sprintf (buf, "%s: couldn't catch SIGCHLD", blurb());
perror (buf);
}
# endif /* !HAVE_SIGACTION */
(si->demo_mode_p
? "%s: warning, no \"%s\" visual for \"%s\".\n"
: "%s: no \"%s\" visual; skipping \"%s\".\n"),
- progname, (vis ? vis : "???"), in);
+ blurb(), (vis ? vis : "???"), in);
}
return selected;
if (p->verbose_p)
fprintf(stderr,
"%s: no suitable visuals for these programs.\n",
- progname);
+ blurb());
return;
}
else
switch ((int) (forked = fork ()))
{
case -1:
- sprintf (buf, "%s: couldn't fork", progname);
+ sprintf (buf, "%s: couldn't fork", blurb());
perror (buf);
restore_real_vroot (si);
saver_exit (si, 1);
{
if (si->prefs.verbose_p)
printf ("%s: server reports that monitor has powered down; "
- "not launching a new hack.\n", progname);
+ "not launching a new hack.\n", blurb());
return;
}
execvp (saved_argv [0], saved_argv); /* shouldn't return */
{
char buf [512];
- sprintf (buf, "%s: could not restart process", progname);
+ sprintf (buf, "%s: could not restart process", blurb());
perror(buf);
fflush(stderr);
}
else if (hack_uid_errno == 0)
{
if (p->verbose_p)
- printf ("%s: %s\n", progname, hack_uid_error);
+ printf ("%s: %s\n", blurb(), hack_uid_error);
}
else
{
char buf [255];
- sprintf (buf, "%s: %s", progname, hack_uid_error);
+ sprintf (buf, "%s: %s", blurb(), hack_uid_error);
if (hack_uid_errno == -1)
fprintf (stderr, "%s\n", buf);
else
if (top_p && p->verbose_p && (events & KeyPressMask))
{
/* Only mention one window per tree (hack hack). */
- printf ("%s: selected KeyPress on 0x%lX\n", progname,
+ printf ("%s: selected KeyPress on 0x%lX\n", blurb(),
(unsigned long) window);
top_p = False;
}
if (si->dbox_up_p || si->question_up_p)
{
if (p->verbose_p)
- printf ("%s: dialog box up; delaying hack change.\n", progname);
+ printf ("%s: dialog box up; delaying hack change.\n", blurb());
how_long = 30000; /* 30 secs */
}
else
{
if (p->verbose_p)
- printf ("%s: changing graphics hacks.\n", progname);
+ printf ("%s: changing graphics hacks.\n", blurb());
kill_screenhack (si);
spawn_screenhack (si, False);
}
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: starting cycle_timer (%ld, %ld)\n",
- progname, how_long, si->cycle_id);
+ blurb(), how_long, si->cycle_id);
#endif /* DEBUG_TIMERS */
}
saver_preferences *p = &si->prefs;
if (p->verbose_p)
- printf ("%s: timed out; activating lock\n", progname);
+ printf ("%s: timed out; activating lock\n", blurb());
si->locked_p = True;
#ifdef HAVE_XHPDISABLERESET
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: killing idle_timer (%ld, %ld)\n",
- progname, p->timeout, si->timer_id);
+ blurb(), p->timeout, si->timer_id);
#endif /* DEBUG_TIMERS */
XtRemoveTimeOut (si->timer_id);
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: restarting idle_timer (%ld, %ld)\n",
- progname, p->timeout, si->timer_id);
+ blurb(), p->timeout, si->timer_id);
#endif /* DEBUG_TIMERS */
si->last_activity_time = time ((time_t *) 0);
root_y == ssi->poll_mouse_last_root_y &&
child == ssi->poll_mouse_last_child)
printf ("%s: modifiers changed at %s on screen %d.\n",
- progname, timestring(), i);
+ blurb(), timestring(), i);
else
printf ("%s: pointer moved at %s on screen %d.\n",
- progname, timestring(), i);
+ blurb(), timestring(), i);
#endif /* DEBUG_TIMERS */
si->last_activity_screen = ssi;
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: starting idle_timer (%ld, %ld)\n",
- progname, p->timeout, si->timer_id);
+ blurb(), p->timeout, si->timer_id);
#endif /* DEBUG_TIMERS */
}
{
if (! XGetIdleTime (si->dpy, &idle))
{
- fprintf (stderr, "%s: XGetIdleTime() failed.\n", progname);
+ fprintf (stderr, "%s: XGetIdleTime() failed.\n", blurb());
saver_exit (si, 1);
}
}
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: starting idle_timer (%ld, %ld)\n",
- progname, p->timeout - idle, si->timer_id);
+ blurb(), p->timeout - idle, si->timer_id);
#endif /* DEBUG_TIMERS */
}
}
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: starting notice_events_timer for 0x%X (%lu)\n",
- progname,
+ blurb(),
(unsigned int) event.xcreatewindow.window,
p->notice_events_timeout);
#endif /* DEBUG_TIMERS */
if (p->verbose_p)
{
if (event.xany.type == MotionNotify)
- printf ("%s: MotionNotify at %s\n", progname, timestring ());
+ printf ("%s: MotionNotify at %s\n", blurb(), timestring ());
else if (event.xany.type == KeyPress)
- printf ("%s: KeyPress seen on 0x%X at %s\n", progname,
+ printf ("%s: KeyPress seen on 0x%X at %s\n", blurb(),
(unsigned int) event.xkey.window, timestring ());
}
#endif /* DEBUG_TIMERS */
# ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: ScreenSaverOn event received at %s\n",
- progname, timestring ());
+ blurb(), timestring ());
# endif /* DEBUG_TIMERS */
/* Get the "real" server window(s) out of the way as soon
# ifdef DEBUG_TIMERS
fprintf (stderr,
"%s: ScreenSaverOn event wasn't of type External!\n",
- progname);
+ blurb());
# endif /* DEBUG_TIMERS */
}
# ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: ScreenSaverOff event received at %s\n",
- progname, timestring ());
+ blurb(), timestring ());
# endif /* DEBUG_TIMERS */
if (!until_idle_p)
goto DONE;
# ifdef DEBUG_TIMERS
else if (p->verbose_p)
printf ("%s: unknown MIT-SCREEN-SAVER event received at %s\n",
- progname, timestring ());
+ blurb(), timestring ());
# endif /* DEBUG_TIMERS */
}
else
# ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: ScreenSaverStart event received at %s\n",
- progname, timestring ());
+ blurb(), timestring ());
# endif /* DEBUG_TIMERS */
if (until_idle_p)
# ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: ScreenSaverEnd event received at %s\n",
- progname, timestring ());
+ blurb(), timestring ());
# endif /* DEBUG_TIMERS */
if (!until_idle_p)
goto DONE;
#ifdef DEBUG_TIMERS
if (si->prefs.verbose_p)
printf ("%s: watchdog timer raising %sscreen.\n",
- progname, (running_p ? "" : "and clearing "));
+ blurb(), (running_p ? "" : "and clearing "));
#endif /* DEBUG_TIMERS */
raise_window (si, True, True, running_p);
{
if (si->prefs.verbose_p)
printf ("%s: server reports that monitor has powered down; "
- "killing running hacks.\n", progname);
+ "killing running hacks.\n", blurb());
kill_screenhack (si);
}
}
#ifdef DEBUG_TIMERS
if (p->verbose_p)
printf ("%s: restarting watchdog_timer (%ld, %ld)\n",
- progname, p->watchdog_timeout, si->watchdog_id);
+ blurb(), p->watchdog_timeout, si->watchdog_id);
#endif /* DEBUG_TIMERS */
}
if (p->debug_p)
fprintf(stderr, "%s: XGrabKeyboard(... 0x%x ...) ==> %s\n",
- progname, (unsigned long) w,
+ blurb(), (unsigned long) w,
(status == GrabSuccess ? "GrabSuccess" :
status == AlreadyGrabbed ? "AlreadyGrabbed" :
status == GrabInvalidTime ? "GrabInvalidTime" :
if (p->debug_p)
fprintf(stderr, "%s: XGrabPointer(... 0x%x, 0x%x ...) ==> %s\n",
- progname, (unsigned long) w, (unsigned long) cursor,
+ blurb(), (unsigned long) w, (unsigned long) cursor,
grab_string(status));
return status;
}
saver_preferences *p = &si->prefs;
XUngrabKeyboard(si->dpy, CurrentTime);
if (p->debug_p)
- fprintf(stderr, "%s: XUngrabKeyboard (was 0x%x)\n", progname,
+ fprintf(stderr, "%s: XUngrabKeyboard (was 0x%x)\n", blurb(),
(unsigned long) si->keyboard_grab_window);
si->keyboard_grab_window = 0;
}
saver_preferences *p = &si->prefs;
XUngrabPointer(si->dpy, CurrentTime);
if (p->debug_p)
- fprintf(stderr, "%s: XUngrabPointer (was 0x%x)\n", progname,
+ fprintf(stderr, "%s: XUngrabPointer (was 0x%x)\n", blurb(),
(unsigned long) si->mouse_grab_window);
si->mouse_grab_window = 0;
}
status = grab_kbd (si, window);
if (status != GrabSuccess)
fprintf (stderr, "%s: couldn't grab keyboard! (%s)\n",
- progname, grab_string(status));
+ blurb(), grab_string(status));
}
status = grab_mouse (si, window, cursor);
status = grab_mouse (si, window, cursor);
if (status != GrabSuccess)
fprintf (stderr, "%s: couldn't grab pointer! (%s)\n",
- progname, grab_string(status));
+ blurb(), grab_string(status));
}
}
fprintf (stderr,
"%s: already running on display %s (window 0x%x)\n from process %s.\n",
- progname, DisplayString (dpy), (int) kids [i], id);
+ blurb(), DisplayString (dpy), (int) kids [i], id);
status = True;
}
}
#if 0
if (p->verbose_p)
fprintf (stderr,
- "%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", progname,
+ "%s: storing XA_VROOT = 0x%x (%s) = 0x%x (%s)\n", blurb(),
win,
(win == screensaver_window ? "ScreenSaver" :
(win == real_vroot ? "VRoot" :
{
#if 0
if (p->verbose_p)
- fprintf (stderr, "%s: removing XA_VROOT from 0x%x (%s)\n", progname, win,
+ fprintf (stderr, "%s: removing XA_VROOT from 0x%x (%s)\n", blurb(), win,
(win == screensaver_window ? "ScreenSaver" :
(win == real_vroot ? "VRoot" :
(win == real_vroot_value ? "Vroot_value" : "???"))));
{
if (verbose_p)
printf ("%s: destroying xsetroot data (0x%lX).\n",
- progname, *dataP);
+ blurb(), *dataP);
XKillClient (dpy, *dataP);
}
else
fprintf (stderr, "%s: deleted unrecognised _XSETROOT_ID property: \n\
%lu, %lu; type: %lu, format: %d, nitems: %lu, bytesafter %ld\n",
- progname, (unsigned long) dataP, (dataP ? *dataP : 0), type,
+ blurb(), (unsigned long) dataP, (dataP ? *dataP : 0), type,
format, nitems, bytesafter);
}
}
if (*vrootP == ssi->screensaver_window) abort ();
fprintf (stderr,
"%s: more than one virtual root window found (0x%x and 0x%x).\n",
- progname, (int) ssi->real_vroot, (int) kids [i]);
+ blurb(), (int) ssi->real_vroot, (int) kids [i]);
exit (1);
}
ssi->real_vroot = kids [i];
saver_preferences *p = &si->prefs;
if (p->verbose_p && ssi->real_vroot)
printf ("%s: restoring __SWM_VROOT property on the real vroot (0x%lx).\n",
- progname, (unsigned long) ssi->real_vroot);
+ blurb(), (unsigned long) ssi->real_vroot);
remove_vroot_property (si->dpy, ssi->screensaver_window);
if (ssi->real_vroot)
{
signal (sig, SIG_DFL);
if (restore_real_vroot_1 (si))
fprintf (real_stderr, "\n%s: %s intercepted, vroot restored.\n",
- progname, signal_name(sig));
+ blurb(), signal_name(sig));
kill (getpid (), sig);
}
if (((long) signal (sig, restore_real_vroot_handler)) == -1L)
{
char buf [255];
- sprintf (buf, "%s: couldn't catch %s", progname, signal_name(sig));
+ sprintf (buf, "%s: couldn't catch %s", blurb(), signal_name(sig));
perror (buf);
saver_exit (si, 1);
}
emergency_kill_subproc (si);
if (vrs && (p->verbose_p || status != 0))
- fprintf (real_stderr, "%s: vroot restored, exiting.\n", progname);
+ fprintf (real_stderr, "%s: vroot restored, exiting.\n", blurb());
else if (p->verbose_p)
- fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", progname);
+ fprintf (real_stderr, "%s: no vroot to restore; exiting.\n", blurb());
fflush(real_stdout);
if (si->prefs.debug_p)
{
- fprintf(real_stderr, "%s: dumping core (because of -debug)\n", progname);
+ fprintf(real_stderr, "%s: dumping core (because of -debug)\n", blurb());
/* Do this to drop a core file, so that we can get a stack trace. */
abort();
}
{
saver_info *si = ssi->global;
saver_preferences *p = &si->prefs;
- Bool install_cmap_p = ssi->install_cmap_p;
+ Bool install_cmap_p = (ssi->install_cmap_p || p->install_cmap_p);
/* This resets the screensaver window as fully as possible, since there's
no way of knowing what some random client may have done to us in the
;
else if (ssi->current_visual == DefaultVisualOfScreen (ssi->screen))
{
- fprintf (stderr, "%s: using default visual ", progname);
- describe_visual (stderr, ssi->screen, ssi->current_visual);
+ fprintf (stderr, "%s: using default visual ", blurb());
+ describe_visual (stderr, ssi->screen, ssi->current_visual,
+ install_cmap_p);
}
else
{
- fprintf (stderr, "%s: using visual: ", progname);
- describe_visual (stderr, ssi->screen, ssi->current_visual);
- fprintf (stderr, "%s: default visual: ", progname);
+ fprintf (stderr, "%s: using visual: ", blurb());
+ describe_visual (stderr, ssi->screen, ssi->current_visual,
+ install_cmap_p);
+ fprintf (stderr, "%s: default visual: ", blurb());
describe_visual (stderr, ssi->screen,
- DefaultVisualOfScreen (ssi->screen));
+ DefaultVisualOfScreen (ssi->screen),
+ ssi->install_cmap_p);
}
printed_visual_info = True;
store_activate_time(si, True);
if (p->verbose_p)
fprintf (stderr, "%s: saver window is 0x%lx.\n",
- progname, (unsigned long) ssi->screensaver_window);
+ blurb(), (unsigned long) ssi->screensaver_window);
}
#ifdef HAVE_MIT_SAVER_EXTENSION
ssi->black_pixel);
}
- if (p->verbose_p) fprintf (stderr, "%s: fading... ", progname);
+ if (p->verbose_p) fprintf (stderr, "%s: fading... ", blurb());
XGrabServer (si->dpy); /* ############ DANGER! */
ssi->black_pixel);
}
- if (p->verbose_p) fprintf (stderr, "%s: unfading... ", progname);
+ if (p->verbose_p) fprintf (stderr, "%s: unfading... ", blurb());
XSync (si->dpy, False);
if (p->verbose_p)
{
+ fprintf (stderr, "%s: switching to visual ", blurb());
+ describe_visual (stderr, ssi->screen, new_v, install_cmap_p);
#if 0
- fprintf (stderr, "%s: switching visuals\tfrom: ", progname);
- describe_visual (stderr, ssi->screen, ssi->current_visual);
- fprintf (stderr, "\t\t\t\tto: ");
- describe_visual (stderr, ssi->screen, new_v);
- fprintf (stderr, "\t\t\t\t install cmap: %s\n",
- (install_cmap_p ? "yes" : "no"));
-#else
- fprintf (stderr, "%s: switching to visual ", progname);
- describe_visual (stderr, ssi->screen, new_v);
+ fprintf (stderr, "%s: from ", blurb());
+ describe_visual (stderr, ssi->screen, ssi->current_visual,
+ was_installed_p);
#endif
}
if (p->verbose_p)
fprintf (stderr, "%s: destroyed old saver window 0x%lx.\n",
- progname, (unsigned long) old_w);
+ blurb(), (unsigned long) old_w);
if (old_c &&
old_c != DefaultColormapOfScreen (ssi->screen) &&
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
+.TH XScreenSaver 1 "30-Jun-98 (2.24)" "X Version 11"
.SH NAME
xscreensaver-command - control a running xscreensaver process
.SH SYNOPSIS
{
fprintf (stderr,
"%s: the `monoPrograms' and `colorPrograms' resources are obsolete;\n\
- see the manual for details.\n", progname);
+ see the manual for details.\n", blurb());
free(d);
}
}
+static Bool blurb_timestamp_p = False; /* kludge */
+
+
static void
get_resources (saver_info *si)
{
saver_preferences *p = &si->prefs;
p->verbose_p = get_boolean_resource ("verbose", "Boolean");
+ p->timestamp_p = get_boolean_resource ("timestamp", "Boolean");
p->lock_p = get_boolean_resource ("lock", "Boolean");
p->fade_p = get_boolean_resource ("fade", "Boolean");
p->unfade_p = get_boolean_resource ("unfade", "Boolean");
{
p->lock_p = False;
fprintf (stderr, "%s: not compiled with support for locking.\n",
- progname);
+ blurb());
}
#else /* ! NO_LOCKING */
if (p->lock_p && si->locking_disabled_p)
{
- fprintf (stderr, "%s: locking is disabled (%s).\n", progname,
+ fprintf (stderr, "%s: locking is disabled (%s).\n", blurb(),
si->nolock_reason);
p->lock_p = False;
}
{
XSynchronize(si->dpy, True);
p->verbose_p = True;
+ p->timestamp_p = True;
p->initial_delay = 0;
}
+
+ blurb_timestamp_p = p->timestamp_p;
}
{
saver_info *si = global_si_kludge; /* I hate C so much... */
- fprintf (real_stderr, "\nX error in %s:\n", progname);
+ fprintf (real_stderr, "\nX error in %s:\n", blurb());
if (XmuPrintDefaultErrorMessage (dpy, error, real_stderr))
saver_exit (si, -1);
else
return 0;
}
+
+const char *
+blurb (void)
+{
+ if (!blurb_timestamp_p)
+ return progname;
+ else
+ {
+ static char buf[255];
+ time_t now = time ((time_t *) 0);
+ char *ct = (char *) ctime (&now);
+ int n = strlen(progname);
+ if (n > 100) n = 99;
+ strncpy(buf, progname, n);
+ buf[n++] = ':';
+ buf[n++] = ' ';
+ strncpy(buf+n, ct+11, 8);
+ strcpy(buf+n+9, ": ");
+ return buf;
+ }
+}
+
static void
initialize_connection (saver_info *si, int argc, char **argv)
{
int i;
- Widget toplevel_shell = XtAppInitialize (&si->app, progclass,
- options, XtNumber (options),
- &argc, argv, defaults, 0, 0);
+ Widget toplevel_shell;
+
+ /* The X resource database blows up if argv[0] has a "." in it. */
+ {
+ char *s = argv[0];
+ while ((s = strchr (s, '.')))
+ *s = '_';
+ }
+
+ toplevel_shell = XtAppInitialize (&si->app, progclass,
+ options, XtNumber (options),
+ &argc, argv, defaults, 0, 0);
si->dpy = XtDisplay (toplevel_shell);
si->db = XtDatabase (si->dpy);
{
const char *s = argv[1];
fprintf (stderr, "%s: unknown option \"%s\". Try \"-help\".\n",
- progname, s);
+ blurb(), s);
if (s[0] == '-' && s[1] == '-') s++;
if (!strcmp (s, "-activate") ||
{
fprintf (stderr,
"%s: display %s does not support the SGI SCREEN_SAVER extension.\n",
- progname, DisplayString (si->dpy));
+ blurb(), DisplayString (si->dpy));
p->use_sgi_saver_extension = False;
}
else if (p->use_mit_saver_extension)
{
fprintf (stderr, "%s: SGI SCREEN_SAVER extension used instead\
of MIT-SCREEN-SAVER extension.\n",
- progname);
+ blurb());
p->use_mit_saver_extension = False;
}
else if (p->use_xidle_extension)
{
fprintf (stderr,
"%s: SGI SCREEN_SAVER extension used instead of XIDLE extension.\n",
- progname);
+ blurb());
p->use_xidle_extension = False;
}
#else /* !HAVE_MIT_SAVER_EXTENSION */
fprintf (stderr,
"%s: not compiled with support for the SGI SCREEN_SAVER extension.\n",
- progname);
+ blurb());
p->use_sgi_saver_extension = False;
#endif /* !HAVE_SGI_SAVER_EXTENSION */
}
{
fprintf (stderr,
"%s: display %s does not support the MIT-SCREEN-SAVER extension.\n",
- progname, DisplayString (si->dpy));
+ blurb(), DisplayString (si->dpy));
p->use_mit_saver_extension = False;
}
else if (p->use_xidle_extension)
{
fprintf (stderr,
"%s: MIT-SCREEN-SAVER extension used instead of XIDLE extension.\n",
- progname);
+ blurb());
p->use_xidle_extension = False;
}
#else /* !HAVE_MIT_SAVER_EXTENSION */
fprintf (stderr,
"%s: not compiled with support for the MIT-SCREEN-SAVER extension.\n",
- progname);
+ blurb());
p->use_mit_saver_extension = False;
#endif /* !HAVE_MIT_SAVER_EXTENSION */
}
{
fprintf (stderr,
"%s: display %s does not support the XIdle extension.\n",
- progname, DisplayString (si->dpy));
+ blurb(), DisplayString (si->dpy));
p->use_xidle_extension = False;
}
#else /* !HAVE_XIDLE_EXTENSION */
fprintf (stderr, "%s: not compiled with support for XIdle.\n",
- progname);
+ blurb());
p->use_xidle_extension = False;
#endif /* !HAVE_XIDLE_EXTENSION */
}
if (p->verbose_p && p->use_mit_saver_extension)
fprintf (stderr, "%s: using MIT-SCREEN-SAVER server extension.\n",
- progname);
+ blurb());
if (p->verbose_p && p->use_sgi_saver_extension)
fprintf (stderr, "%s: using SGI SCREEN_SAVER server extension.\n",
- progname);
+ blurb());
if (p->verbose_p && p->use_xidle_extension)
fprintf (stderr, "%s: using XIdle server extension.\n",
- progname);
+ blurb());
initialize_stderr (si);
XSetErrorHandler (saver_ehandler);
{
if (p->verbose_p)
{
- printf ("%s: waiting for %d second%s...", progname,
+ printf ("%s: waiting for %d second%s...", blurb(),
(int) p->initial_delay,
(p->initial_delay == 1 ? "" : "s"));
fflush (stdout);
}
if (p->verbose_p)
{
- printf ("%s: selecting events on extant windows...", progname);
+ printf ("%s: selecting events on extant windows...", blurb());
fflush (stdout);
}
#endif /* !NO_DEMO_MODE */
{
if (p->verbose_p)
- printf ("%s: user is idle; waking up at %s.\n", progname,
+ printf ("%s: user is idle; waking up at %s.\n", blurb(),
timestring());
blank_screen (si);
spawn_screenhack (si, True);
suspend_screenhack (si, True);
XUndefineCursor (si->dpy, ssi->screensaver_window);
if (p->verbose_p)
- printf ("%s: prompting for password.\n", progname);
+ printf ("%s: prompting for password.\n", blurb());
val = unlock_p (si);
if (p->verbose_p && val == False)
- printf ("%s: password incorrect!\n", progname);
+ printf ("%s: password incorrect!\n", blurb());
si->dbox_up_p = False;
XDefineCursor (si->dpy, ssi->screensaver_window, ssi->cursor);
suspend_screenhack (si, False);
#endif /* !NO_LOCKING */
if (p->verbose_p)
- printf ("%s: user is active; going to sleep at %s.\n", progname,
+ printf ("%s: user is active; going to sleep at %s.\n", blurb(),
timestring ());
}
}
char *str;
str = XGetAtomName (si->dpy, event->xclient.message_type);
fprintf (stderr, "%s: unrecognised ClientMessage type %s received\n",
- progname, (str ? str : "(null)"));
+ blurb(), (str ? str : "(null)"));
if (str) XFree (str);
return False;
}
if (event->xclient.format != 32)
{
fprintf (stderr, "%s: ClientMessage of format %d received, not 32\n",
- progname, event->xclient.format);
+ blurb(), event->xclient.format);
return False;
}
if (until_idle_p)
{
if (p->verbose_p)
- printf ("%s: ACTIVATE ClientMessage received.\n", progname);
+ printf ("%s: ACTIVATE ClientMessage received.\n", blurb());
if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
{
XForceScreenSaver (si->dpy, ScreenSaverActive);
}
fprintf (stderr,
"%s: ClientMessage ACTIVATE received while already active.\n",
- progname);
+ blurb());
}
else if (type == XA_DEACTIVATE)
{
if (! until_idle_p)
{
if (p->verbose_p)
- printf ("%s: DEACTIVATE ClientMessage received.\n", progname);
+ printf ("%s: DEACTIVATE ClientMessage received.\n", blurb());
if (p->use_mit_saver_extension || p->use_sgi_saver_extension)
{
XForceScreenSaver (si->dpy, ScreenSaverReset);
}
fprintf (stderr,
"%s: ClientMessage DEACTIVATE received while inactive.\n",
- progname);
+ blurb());
}
else if (type == XA_CYCLE)
{
if (! until_idle_p)
{
if (p->verbose_p)
- printf ("%s: CYCLE ClientMessage received.\n", progname);
+ printf ("%s: CYCLE ClientMessage received.\n", blurb());
if (si->cycle_id)
XtRemoveTimeOut (si->cycle_id);
si->cycle_id = 0;
return False;
}
fprintf (stderr, "%s: ClientMessage CYCLE received while inactive.\n",
- progname);
+ blurb());
}
else if (type == XA_NEXT || type == XA_PREV)
{
if (p->verbose_p)
- printf ("%s: %s ClientMessage received.\n", progname,
+ printf ("%s: %s ClientMessage received.\n", blurb(),
(type == XA_NEXT ? "NEXT" : "PREV"));
si->next_mode_p = 1 + (type == XA_PREV);
if (until_idle_p || !si->locked_p)
{
if (p->verbose_p)
- printf ("%s: EXIT ClientMessage received.\n", progname);
+ printf ("%s: EXIT ClientMessage received.\n", blurb());
if (! until_idle_p)
{
unblank_screen (si);
}
else
fprintf (stderr, "%s: EXIT ClientMessage received while locked.\n",
- progname);
+ blurb());
}
else if (type == XA_RESTART)
{
if (until_idle_p || !si->locked_p)
{
if (p->verbose_p)
- printf ("%s: RESTART ClientMessage received.\n", progname);
+ printf ("%s: RESTART ClientMessage received.\n", blurb());
if (! until_idle_p)
{
unblank_screen (si);
}
else
fprintf(stderr, "%s: RESTART ClientMessage received while locked.\n",
- progname);
+ blurb());
}
else if (type == XA_DEMO)
{
#ifdef NO_DEMO_MODE
fprintf (stderr, "%s: not compiled with support for DEMO mode\n",
- progname);
+ blurb());
#else
if (until_idle_p)
{
if (p->verbose_p)
- printf ("%s: DEMO ClientMessage received.\n", progname);
+ printf ("%s: DEMO ClientMessage received.\n", blurb());
si->demo_mode_p = True;
return True;
}
fprintf (stderr,
- "%s: DEMO ClientMessage received while active.\n", progname);
+ "%s: DEMO ClientMessage received while active.\n", blurb());
#endif
}
else if (type == XA_LOCK)
{
#ifdef NO_LOCKING
fprintf (stderr, "%s: not compiled with support for LOCK mode\n",
- progname);
+ blurb());
#else
if (si->locking_disabled_p)
fprintf (stderr,
"%s: LOCK ClientMessage received, but locking is disabled.\n",
- progname);
+ blurb());
else if (si->locked_p)
fprintf (stderr,
"%s: LOCK ClientMessage received while already locked.\n",
- progname);
+ blurb());
else
{
si->locked_p = True;
if (p->verbose_p)
printf ("%s: LOCK ClientMessage received;%s locking.\n",
- progname, until_idle_p ? " activating and" : "");
+ blurb(), until_idle_p ? " activating and" : "");
if (si->lock_id) /* we're doing it now, so lose the timeout */
{
if (str)
fprintf (stderr,
"%s: unrecognised screensaver ClientMessage %s received\n",
- progname, str);
+ blurb(), str);
else
fprintf (stderr,
"%s: unrecognised screensaver ClientMessage 0x%x received\n",
- progname, (unsigned int) event->xclient.data.l[0]);
+ blurb(), (unsigned int) event->xclient.data.l[0]);
if (str) XFree (str);
}
return False;
command line, the resource database, or entered through a dialog box.
*/
struct saver_preferences {
- Bool verbose_p;
- Bool lock_p; /* whether to lock as well as save */
+ Bool verbose_p; /* whether to print out lots of status info */
+ Bool timestamp_p; /* whether to mark messages with a timestamp */
+ Bool debug_p; /* pay no mind to the man behind the curtain */
- Bool debug_p;
+ Bool lock_p; /* whether to lock as well as save */
Bool fade_p; /* whether to fade to black */
Bool unfade_p; /* whether to fade from black */
int fade_seconds; /* how long that should take */
misc
======================================================================= */
+extern const char *blurb (void);
extern void save_argv (int argc, char **argv);
extern void saver_exit (saver_info *si, int status);
extern void restart_process (saver_info *si);
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "21-Jun-98 (2.23)" "X Version 11"
+.TH XScreenSaver 1 "30-Jun-98 (2.24)" "X Version 11"
.SH NAME
xscreensaver - graphics hack and screen locker, launched when the user is idle
.SH SYNOPSIS
xscreensaver-command -exit
xscreensaver
.EE
+If you get "connection refused" errors when running \fIxscreensaver\fP
+from \fIxdm\fP, then this probably means that you have
+.BR xauth (1)
+or some other security mechanism turned on. One way around this is to
+add \fB"xhost\ +localhost"\fP to \fIXsetup\fP, just before \fIxscreensaver\fP
+is launched.
+
+Note that this will give access to the X server to anyone capable of logging
+in to the local machine, so in some environments, this might not be
+appropriate. If turning off file-system-based access control is not
+acceptable, then running \fIxscreensaver\fP from \fIxdm\fP might not be
+possible, and users will have to launch it themselves instead of having it
+be launched by \fIxdm\fP before anyone logs in.
+
+For more information on the X server's access control mechanisms, see the
+man pages for
+.BR X (1),
+.BR Xsecurity (1),
+.BR xauth (1),
+and
+.BR xhost (1).
.SH USING CDE (COMMON DESKTOP ENVIRONMENT)
The easiest way to use \fIxscreensaver\fP on a system with CDE is to simply
switch off the built-in CDE screensaver, and use \fIxscreensaver\fP instead;
activity from being buffered up.
.TP 8
.B Locking and XDM
-If xscreensaver has been launched from XDM, you will need to cause the
-xscreensaver daemon to exit and restart in order to lock the screen.
+If xscreensaver has been launched from
+.BR xdm (1),
+you will need to cause the xscreensaver daemon to exit and restart in
+order to lock the screen.
-The reason for this is, if xscreensaver has been launched by XDM, that
-means it was launched \fIbefore\fP you logged in: so it has no way of
-knowing who the logged-in user is, and therefore, whose password it
-should prompt for.
+The reason for this is, if xscreensaver has been launched by
+.BR xdm (1),
+that means it was launched \fIbefore\fP you logged in: so it has no way of
+knowing who the logged-in user is, and therefore, whose password it should
+prompt for.
So if you want to use it as a locker, you must start it with your user id.
If it has already been started by \fIxdm\fP, you can kill it by sending
xscreensaver-command -exit
xscreensaver &
.EE
+See the ``\fIUsing XDM(1)\fP'' section, above, for more details.
.TP 8
.B Locking and root logins
An implication of the above is that if you log in as \fIroot\fP on the
to \fIroot\fP as necessary. People who spend their day logged in
as \fIroot\fP are just begging for disaster.
.TP 8
+.B XAUTH and XDM
+For xscreensaver to work when launched by
+.BR xdm (1),
+programs running on the local machine as user \fI"nobody"\fP must be
+able to connect to the X server. This means that \fB"xhost +localhost"\fP
+is required if xscreensaver is to be launched by
+.BR xdm (1).
+This is \fInot\fP required if \fIxscreensaver\fP is launched by the
+individual users: it is only necessary when it is launched by
+.BR xdm (1),
+before any user has logged in. See the ``\fIUsing XDM(1)\fP'' section,
+above, for more details.
+
+If anyone has suggestions on how xscreensaver could be made to work with
+.BR xdm (1)
+without first turning off \fI.Xauthority\fP-based access control, please
+let me know.
+.TP 8
.B Passwords
If you get an error message like ``couldn't get password of \fIuser\fP''
then this probably means that you're on a system in which the
.BR xscreensaver\-command (1),
.BR xdm (1),
.BR xset (1),
+.BR Xsecurity (1),
+.BR xauth (1),
+.BR xhost (1).
.BR ant (1),
.BR atlantis (1),
.BR attraction (1),
fprintf (stderr,
"%s: SGI SCREEN_SAVER extension exists, but can't be initialized;\n\
perhaps some other screensaver program is already running?\n",
- progname);
+ blurb());
p->use_sgi_saver_extension = False;
return;
}
if (desired_server_timeout == 0)
printf ("%s%sisabling server builtin screensaver.\n\
You can re-enable it with \"xset s on\".\n",
- (p->verbose_p ? "" : progname),
+ (p->verbose_p ? "" : blurb()),
(p->verbose_p ? "\n\tD" : ": d"));
if (p->verbose_p)
- fprintf (stderr, "%s: (xset s %d %d %s %s)\n", progname,
+ fprintf (stderr, "%s: (xset s %d %d %s %s)\n", blurb(),
desired_server_timeout, desired_server_interval,
(desired_prefer_blank ? "blank" : "noblank"),
(desired_allow_exp ? "noexpose" : "expose"));
if (!monitor_powered_on_p (si))
fprintf (stderr,
"%s: DPMSForceLevel(dpy, DPMSModeOn) did not power the monitor on?\n",
- progname);
+ blurb());
}
}
rd-bomb.c coral.c mountain.c triangle.c lissie.c worm.c \
rotor.c ant.c xjack.c xlyap.c jigsaw.c xscreensaver-sgigl.c \
cynosure.c moire2.c flow.c epicycle.c interference.c \
- truchet.c bsod.c crystal.c discrete.c
+ truchet.c bsod.c crystal.c discrete.c distort.c kumppa.c
OBJS = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
bubbles-default.o decayscreen.o deco.o drift.o flag.o \
rd-bomb.o coral.o mountain.o triangle.o lissie.o worm.o \
rotor.o ant.o xjack.o xlyap.o jigsaw.o xscreensaver-sgigl.o \
cynosure.o moire2.o flow.o epicycle.o interference.o \
- truchet.o bsod.o crystal.o discrete.o
+ truchet.o bsod.o crystal.o discrete.o distort.o kumppa.o
EXES = attraction blitspin bouboule braid bubbles decayscreen deco \
drift flag flame forest vines galaxy grav greynetic halo \
slip sphere spiral strange swirl xroger goop starfish munch \
fadeplot rd-bomb coral mountain triangle lissie worm rotor \
ant xjack xlyap jigsaw cynosure moire2 flow epicycle \
- interference truchet bsod crystal discrete
+ interference truchet bsod crystal discrete distort kumppa
HACK_OBJS_1 = $(UTILS_BIN)/resources.o $(UTILS_BIN)/visual.o \
$(UTILS_BIN)/usleep.o $(UTILS_BIN)/yarandom.o @XMU_OBJS@
bsod: $(HACK_OBJS) bsod.o $(COL)
$(CC_HACK) -o $@ $(HACK_OBJS) bsod.o $(COL) $(HACK_LIBS) $(XPM_LIBS)
+distort: $(HACK_OBJS) distort.o $(GRAB)
+ $(CC_HACK) -o $@ $(HACK_OBJS) distort.o $(GRAB) $(HACK_LIBS) $(GRAB_LIBS)
+
+kumppa: $(HACK_OBJS) kumppa.o
+ $(CC_HACK) -o $@ $(HACK_OBJS) kumppa.o $(HACK_LIBS)
+
# The rules for those hacks which follow the `xlockmore' API.
#
discrete.o: $(UTILS_SRC)/grabscreen.h
discrete.o: $(UTILS_SRC)/visual.h
discrete.o: $(UTILS_SRC)/erase.h
+distort.o: $(srcdir)/screenhack.h
+distort.o: ../config.h
+distort.o: $(UTILS_SRC)/yarandom.h
+distort.o: $(UTILS_SRC)/usleep.h
+distort.o: $(UTILS_SRC)/resources.h
+distort.o: $(UTILS_SRC)/hsv.h
+distort.o: $(UTILS_SRC)/colors.h
+distort.o: $(UTILS_SRC)/grabscreen.h
+distort.o: $(UTILS_SRC)/visual.h
+kumppa.o: $(srcdir)/screenhack.h
+kumppa.o: ../config.h
+kumppa.o: $(UTILS_SRC)/yarandom.h
+kumppa.o: $(UTILS_SRC)/usleep.h
+kumppa.o: $(UTILS_SRC)/resources.h
+kumppa.o: $(UTILS_SRC)/hsv.h
+kumppa.o: $(UTILS_SRC)/colors.h
+kumppa.o: $(UTILS_SRC)/grabscreen.h
+kumppa.o: $(UTILS_SRC)/visual.h
/* bubbles.c - frying pan / soft drink in a glass simulation */
-/*$Id: bubbles.c,v 1.14 1998/06/04 22:55:09 jwz Exp $*/
+/*$Id: bubbles.c,v 1.15 1998/06/21 23:49:25 jwz Exp $*/
/*
* Copyright (C) 1995-1996 James Macnicol
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECAYSCREEN.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DECO.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISCRETE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DISTORT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) DRIFT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) EPICYCLE.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) FADEPLOT.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JIGSAW.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) JULIA.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
--- /dev/null
+/* xscreensaver, Copyright (c) 1992, 1993, 1994, 1996, 1997, 1998
+ * Jamie Zawinski <jwz@netscape.com>
+ *
+ * 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.
+ */
+
+/* distort
+ * by Jonas Munsin (jmunsin@iki.fi)
+ * it's a bit of a resource hog at the moment
+ * TODO:
+ * -optimize for speed
+ * -mutiple spheres/lenses (with bounces/layering)
+ * -different distortion matrices
+ * -randomize movement a bit
+ * program idea borrowed from a screensaver on a non-*NIX OS,
+ * code based on decayscreen by Jamie Zawinski
+ */
+
+#include <math.h>
+#include "screenhack.h"
+
+static int delay, radius, speed, size_x, size_y;
+static XWindowAttributes xgwa;
+static GC gc;
+static Pixmap orig_map, buffer_map;
+
+static int ***from;
+
+static void init_distort (Display *dpy, Window window) {
+ XGCValues gcv;
+ long gcflags;
+ int i, j;
+
+ delay = get_integer_resource ("delay", "Integer");
+ radius = get_integer_resource ("radius", "Integer");
+ speed = get_integer_resource ("speed", "Integer");
+
+ if (delay < 0)
+ delay = 0;
+ if (radius <= 0)
+ radius = 60;
+ if (speed == 0)
+ speed = 2;
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+
+ gcv.function = GXcopy;
+ gcv.subwindow_mode = IncludeInferiors;
+ gcflags = GCForeground |GCFunction;
+ if (use_subwindow_mode_p(xgwa.screen, window)) /* see grabscreen.c */
+ gcflags |= GCSubwindowMode;
+ gc = XCreateGC (dpy, window, gcflags, &gcv);
+
+ size_x = xgwa.width;
+ size_y = xgwa.height;
+
+ grab_screen_image (xgwa.screen, window);
+
+ orig_map = XCreatePixmap(dpy, window,
+ xgwa.width, xgwa.height, xgwa.depth);
+ XCopyArea(dpy, window,
+ orig_map, gc, 0, 0, xgwa.width, xgwa.height, 0, 0);
+ buffer_map = XCreatePixmap(dpy, window,
+ 2*radius + speed, 2*radius + speed,
+ xgwa.depth);
+
+ from = (int ***)malloc ((2*radius+1) * sizeof(int **));
+ for(i = 0; i <= 2*radius; i++) {
+ from[i] = (int **)malloc((2*radius+1) * sizeof(int *));
+ for (j = 0; j <= 2*radius; j++)
+ from[i][j] = (int *)malloc(2*sizeof(int));
+ }
+
+ /* initialize a "see-trough" matrix */
+ for (i = 0; i <= 2*radius; i++) {
+ for (j = 0 ; j <= 2*radius ; j++) {
+ from[i][j][0]=i-radius/2;
+ from[i][j][1]=j-radius/2;
+ }
+ }
+
+ /* initialize the distort matrix */
+ for (i = 0; i <= 2*radius; i++) {
+ for(j = 0; j <= 2*radius; j++) {
+ double r;
+ r = sqrt ((i-radius)*(i-radius)+(j-radius)*(j-radius));
+ if (r < radius) {
+ r = sin(r*(M_PI_2)/radius);
+ if (i < radius)
+ from[i][j][0] = radius/2 + (i-radius)*r;
+ else
+ from[i][j][0] = radius/2 + (i-radius)*r;
+ if (j < radius)
+ from[i][j][1] = radius/2 + (j-radius)*r;
+ else
+ from[i][j][1] = radius/2 + (j-radius)*r;
+ }
+ }
+ }
+
+ XSetGraphicsExposures(dpy, gc, False); /* stop events from XCopyArea */
+}
+
+static void
+move_lens (int *x, int *y, int *xmove, int *ymove) {
+ if (*xmove==0)
+ *xmove=speed;
+ if (*ymove==0)
+ *ymove=speed;
+ if (*x==0)
+ *x = radius + (random() % (size_x-2*radius));
+ if (*y==0)
+ *y = radius + (random() % (size_y-2*radius));
+ if (*x + 3*radius/2 >= size_x)
+ *xmove = -abs(*xmove);
+ if (*x - radius/2 <= 0)
+ *xmove = abs(*xmove);
+ if (*y + 3*radius/2 >= size_y)
+ *ymove = -abs(*ymove);
+ if (*y - radius/2 <= 0)
+ *ymove = abs(*ymove);
+
+ *x = *x + *xmove;
+ *y = *y + *ymove;
+}
+
+static void distort (Display *dpy, Window window)
+{
+ static int x, y, xmove=0, ymove=0;
+ int i,j;
+
+ move_lens (&x, &y, &xmove, &ymove);
+
+ XCopyArea(dpy, orig_map, buffer_map, gc,
+ x-radius/2 - xmove, y-radius/2 - ymove,
+ 2*radius + abs(xmove), 2*radius + abs(ymove),
+ 0,0);
+
+ /* it's possible to lower the number of loop iterations by a factor
+ * of 4, but since it's the XCopyArea's which eat resources, and
+ * I've only supplied one distortion routine (which is circular),
+ * here's a check-if-inside circle variation of this for loop.
+ * Using both optimizations turns the matrix rendering into one
+ * ugly mess... I'm counting on gcc optimization ;)
+ */
+
+ for(i = 0 ; i <= 2*radius ; i++) {
+ for(j = 0 ; j <= 2*radius ; j++) {
+ if (((radius-i)*(radius-i) + (j-radius)*(j-radius))
+ < radius*radius) {
+ XCopyArea (dpy, orig_map, buffer_map, gc,
+ x+from[i][j][0],
+ y+from[i][j][1],
+ 1, 1, i + xmove, j+ymove);
+ }
+ }
+ }
+
+ XCopyArea(dpy, buffer_map, window, gc, 0, 0,
+ 2*radius + abs(xmove), 2*radius + abs(ymove),
+ x-radius/2 - xmove, y-radius/2 - ymove);
+}
+
+\f
+
+char *progclass = "Distort";
+
+char *defaults [] = {
+ "*dontClearRoot: True",
+#ifdef __sgi /* really, HAVE_READ_DISPLAY_EXTENSION */
+ "*visualID: Best",
+#endif
+
+ "*delay: 10000",
+ "*radius: 60",
+ "*speed: 2",
+ 0
+};
+
+XrmOptionDescRec options [] = {
+ { "-delay", ".delay", XrmoptionSepArg, 0 },
+ { "-radius", ".radius", XrmoptionSepArg, 0 },
+ { "-speed", ".speed", XrmoptionSepArg, 0 },
+ { 0, 0, 0, 0 }
+};
+
+
+void screenhack (Display *dpy, Window window) {
+ init_distort (dpy, window);
+ while (1) {
+ distort (dpy, window);
+ XSync (dpy, True);
+ if (delay) usleep (delay);
+ }
+}
--- /dev/null
+/*
+
+Copyright (C) Teemu Suutari (temisu@utu.fi) Feb 1998
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from the X Consortium.
+
+*/
+
+
+
+
+/*
+
+*** This is contest-version. Don't look any further, code is *very* ugly.
+
+*/
+
+
+#include <math.h>
+#include "screenhack.h"
+
+#ifdef HAVE_XDBE_EXTENSION
+# include <X11/extensions/Xdbe.h>
+#endif /* HAVE_XDBE_EXTENSION */
+
+char *progclass="Kumppa";
+
+char *defaults [] ={
+ ".background: black",
+ "*speed: 0.1",
+ "*delay: 0",
+ 0
+};
+
+XrmOptionDescRec options [] = {
+ {"-delay",".delay",XrmoptionSepArg,0},
+ {"-speed",".speed",XrmoptionSepArg,0},
+ {"-random",".random",XrmoptionIsArg,0},
+#ifdef HAVE_XDBE_EXTENSION
+ {"-dbuf",".dbuf",XrmoptionIsArg,0},
+#endif /* HAVE_XDBE_EXTENSION */
+ {0,0,0,0}
+};
+
+const char colors[96]=
+ {0,0,255, 0,51,255, 0,102,255, 0,153,255, 0,204,255,
+ 0,255,255,0,255,204, 0,255,153, 0,255,102, 0,255,51,
+ 0,255,0, 51,255,0, 102,255,0, 153,255,0, 204,255,0,
+ 255,255,0, 255,204,0, 255,153,0, 255,102,0, 255,51,0,
+ 255,0,0, 255,0,51, 255,0,102, 255,0,153, 255,0,204,
+ 255,0,255, 219,0,255, 182,0,255, 146,0,255, 109,0,255,
+ 73,0,255, 37,0,255};
+const float cosinus[8][6]={{-0.07,0.12,-0.06,32,25,37},{0.08,-0.03,0.05,51,46,32},{0.12,0.07,-0.13,27,45,36},
+ {0.05,-0.04,-0.07,36,27,39},{-0.02,-0.07,0.1,21,43,42},{-0.11,0.06,0.02,51,25,34},{0.04,-0.15,0.02,42,32,25},
+ {-0.02,-0.04,-0.13,34,20,15}};
+
+static float acosinus[8][3]={{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}};
+static int coords[8];
+static int ocoords[8]={0,0,0,0,0,0,0,0};
+
+static Display *dpy;
+static Window win[2];
+static GC fgc[33];
+static GC cgc;
+static int sizx,sizy;
+static int midx,midy;
+static unsigned long delay;
+static Bool cosilines=True;
+#ifdef HAVE_XDBE_EXTENSION
+static Bool usedouble=False;
+#endif /* HAVE_XDBE_EXTENSION */
+
+static int *Xrotations;
+static int *Yrotations;
+static int *Xrottable;
+static int *Yrottable;
+
+static int *rotateX;
+static int *rotateY;
+
+static int rotsizeX,rotsizeY;
+static int stateX,stateY;
+
+static int rx,ry;
+
+
+int Satnum(int maxi)
+{
+return (int)(maxi*frand(1));
+}
+
+
+void palaRotate(int x,int y)
+{
+int ax,ay,bx,by,cx,cy;
+
+ax=rotateX[x];
+ay=rotateY[y];
+bx=rotateX[x+1]+2;
+by=rotateY[y+1]+2;
+cx=rotateX[x]-(y-ry)+x-rx;
+cy=rotateY[y]+(x-rx)+y-ry;
+if (cx<0)
+ {
+ ax-=cx;
+ cx=0;
+ }
+if (cy<0)
+ {
+ ay-=cy;
+ cy=0;
+ }
+if (cx+bx-ax>sizx) bx=ax-cx+sizx;
+if (cy+by-ay>sizy) by=ay-cy+sizy;
+if (ax<bx && ay<by)
+ XCopyArea(dpy,win[0],win[1],cgc,ax,ay,bx-ax,by-ay,cx,cy);
+}
+
+
+void rotate(void)
+{
+int x,y;
+int dx,dy;
+
+rx=Xrottable[stateX+1]-Xrottable[stateX];
+ry=Yrottable[stateX+1]-Yrottable[stateY];
+
+
+for (x=0;x<=rx;x++)
+ rotateX[x]=(x)?midx-1-Xrotations[Xrottable[stateX+1]-x]:0;
+for (x=0;x<=rx;x++)
+ rotateX[x+rx+1]=(x==rx)?sizx-1:midx+Xrotations[Xrottable[stateX]+x];
+for (y=0;y<=ry;y++)
+ rotateY[y]=(y)?midy-1-Yrotations[Yrottable[stateY+1]-y]:0;
+for (y=0;y<=ry;y++)
+ rotateY[y+ry+1]=(y==ry)?sizy-1:midy+Yrotations[Yrottable[stateY]+y];
+
+x=(rx>ry)?rx:ry;
+for (dy=0;dy<(x+1)<<1;dy++)
+ for (dx=0;dx<(x+1)<<1;dx++)
+ {
+ y=(rx>ry)?ry-rx:0;
+ if (dy+y>=0 && dy<(ry+1)<<1 && dx<(rx+1)<<1)
+ if (dy+y+dx<=ry+rx && dy+y-dx<=ry-rx)
+ {
+ palaRotate((rx<<1)+1-dx,dy+y);
+ palaRotate(dx,(ry<<1)+1-dy-y);
+ }
+ y=(ry>rx)?rx-ry:0;
+ if (dy+y>=0 && dx<(ry+1)<<1 && dy<(rx+1)<<1)
+ if (dy+y+dx<=ry+rx && dx-dy-y>=ry-rx)
+ {
+ palaRotate(dy+y,dx);
+ palaRotate((rx<<1)+1-dy-y,(ry<<1)+1-dx);
+ }
+ }
+stateX++;
+if (stateX==rotsizeX) stateX=0;
+stateY++;
+if (stateY==rotsizeY) stateY=0;
+}
+
+
+
+Bool make_rots(double xspeed,double yspeed)
+{
+int a,b,c,f,g,j,k,l;
+double m,om,ok;
+double d,ix,iy;
+int maxi;
+
+Bool *chks;
+
+rotsizeX=(int)(2/xspeed+1);
+ix=(double)(midx+1)/(double)(rotsizeX);
+rotsizeY=(int)(2/yspeed+1);
+iy=(double)(midy+1)/(double)(rotsizeY);
+
+Xrotations=malloc((midx+2)*sizeof(unsigned int));
+Xrottable=malloc((rotsizeX+1)*sizeof(unsigned int));
+Yrotations=malloc((midy+2)*sizeof(unsigned int));
+Yrottable=malloc((rotsizeY+1)*sizeof(unsigned int));
+chks=malloc(((midx>midy)?midx:midy)*sizeof(Bool));
+if (!Xrottable || !Yrottable || !Xrotations || !Yrotations || !chks) return False;
+
+
+maxi=0;
+c=0;
+d=0;
+g=0;
+for (a=0;a<midx;a++) chks[a]=True;
+for (a=0;a<rotsizeX;a++)
+ {
+ Xrottable[a]=c;
+ f=(int)(d+ix)-g; /*viivojen lkm.*/
+ g+=f;
+ if (g>midx)
+ {
+ f-=g-midx;
+ g=midx;
+ }
+ for (b=0;b<f;b++)
+ {
+ m=0;
+ for (j=0;j<midx;j++) /*testi*/
+ {
+ if (chks[j])
+ {
+ om=0;
+ ok=1;
+ l=0;
+ while (j+l<midx && om+12*ok>m)
+ {
+ if (j-l>=0) if (chks[j-l]) om+=ok;
+ else; else if (chks[l-j]) om+=ok;
+ if (chks[j+l]) om+=ok;
+ ok/=1.5;
+ l++;
+ }
+ if (om>=m)
+ {
+ k=j;
+ m=om;
+ }
+ }
+ }
+ chks[k]=False;
+ l=c;
+ while (l>=Xrottable[a])
+ {
+ if (l!=Xrottable[a]) Xrotations[l]=Xrotations[l-1];
+ if (k>Xrotations[l] || l==Xrottable[a])
+ {
+ Xrotations[l]=k;
+ c++;
+ l=Xrottable[a];
+ }
+ l--;
+ }
+ }
+ d+=ix;
+ if (maxi<c-Xrottable[a]) maxi=c-Xrottable[a];
+ }
+Xrottable[a]=c;
+rotateX=malloc((maxi+2)*sizeof(int)<<1);
+if (!rotateX) return False;
+
+maxi=0;
+c=0;
+d=0;
+g=0;
+for (a=0;a<midy;a++) chks[a]=True;
+for (a=0;a<rotsizeY;a++)
+ {
+ Yrottable[a]=c;
+ f=(int)(d+iy)-g; /*viivojen lkm.*/
+ g+=f;
+ if (g>midy)
+ {
+ f-=g-midy;
+ g=midy;
+ }
+ for (b=0;b<f;b++)
+ {
+ m=0;
+ for (j=0;j<midy;j++) /*testi*/
+ {
+ if (chks[j])
+ {
+ om=0;
+ ok=1;
+ l=0;
+ while (j+l<midy && om+12*ok>m)
+ {
+ if (j-l>=0) if (chks[j-l]) om+=ok;
+ else; else if (chks[l-j]) om+=ok;
+ if (chks[j+l]) om+=ok;
+ ok/=1.5;
+ l++;
+ }
+ if (om>=m)
+ {
+ k=j;
+ m=om;
+ }
+ }
+ }
+ chks[k]=False;
+ l=c;
+ while (l>=Yrottable[a])
+ {
+ if (l!=Yrottable[a]) Yrotations[l]=Yrotations[l-1];
+ if (k>Yrotations[l] || l==Yrottable[a])
+ {
+ Yrotations[l]=k;
+ c++;
+ l=Yrottable[a];
+ }
+ l--;
+ }
+
+ }
+ d+=iy;
+ if (maxi<c-Yrottable[a]) maxi=c-Yrottable[a];
+ }
+Yrottable[a]=c;
+rotateY=malloc((maxi+2)*sizeof(int)<<1);
+if (!rotateY) return False;
+
+free(chks);
+return (True);
+}
+
+
+Bool InitializeAll(void)
+{
+XGCValues xgcv;
+XWindowAttributes xgwa;
+XSetWindowAttributes xswa;
+Colormap cmap;
+XColor color;
+int n,i;
+double rspeed;
+
+XGetWindowAttributes(dpy,win[0],&xgwa);
+cmap=xgwa.colormap;
+xswa.backing_store=Always;
+XChangeWindowAttributes(dpy,win[0],CWBackingStore,&xswa);
+xgcv.function=GXcopy;
+
+xgcv.foreground=get_pixel_resource ("background", "Background", dpy, cmap);
+fgc[32]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+
+n=0;
+if (mono_p)
+ {
+ fgc[0]=fgc[32];
+ xgcv.foreground=get_pixel_resource ("foreground", "Foreground", dpy, cmap);
+ fgc[1]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+ for (i=0;i<32;i+=2) fgc[i]=fgc[0];
+ for (i=1;i<32;i+=2) fgc[i]=fgc[1];
+ } else
+ for (i=0;i<32;i++)
+ {
+ color.red=colors[n++]<<8;
+ color.green=colors[n++]<<8;
+ color.blue=colors[n++]<<8;
+ color.flags=DoRed|DoGreen|DoBlue;
+ XAllocColor(dpy,cmap,&color);
+ xgcv.foreground=color.pixel;
+ fgc[i]=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+ }
+cgc=XCreateGC(dpy,win[0],GCForeground|GCFunction,&xgcv);
+XSetGraphicsExposures(dpy,cgc,False);
+
+if (get_string_resource("random","String")!=NULL && get_string_resource("random","String")[0]!=0) cosilines=False;
+
+#ifdef HAVE_XDBE_EXTENSION
+if (get_string_resource("dbuf","String")!=NULL && get_string_resource("dbuf","String")[0]!=0) usedouble=True;
+if (usedouble)
+ {
+ XdbeQueryExtension(dpy,&n,&i);
+ if (n==0 && i==0)
+ {
+ fprintf(stderr,"Double buffer extension not supported!\n");
+ usedouble=False;
+ }
+ }
+if (usedouble) win[1]=XdbeAllocateBackBufferName(dpy,win[0],XdbeUndefined);
+#endif /* HAVE_XDBE_EXTENSION */
+
+delay=get_integer_resource("delay","Integer");
+rspeed=get_float_resource("speed","Float");
+if (rspeed<0.0001 || rspeed>0.2)
+ {
+ fprintf(stderr,"Speed not in valid range! (0.0001 - 0.2), using 0.1 \n");
+ rspeed=0.1;
+ }
+
+sizx=xgwa.width;
+sizy=xgwa.height;
+midx=sizx>>1;
+midy=sizy>>1;
+stateX=0;
+stateY=0;
+
+if (!make_rots(rspeed,rspeed))
+ {
+ fprintf(stderr,"Not enough memory for tables!\n");
+ return False;
+ }
+return True;
+}
+
+
+void screenhack(Display *d, Window w)
+{
+#ifdef HAVE_XDBE_EXTENSION
+XdbeSwapInfo xdswp;
+#endif /* HAVE_XDBE_EXTENSION */
+int a,b,c,e;
+float f;
+
+dpy=d;
+win[0]=w;
+if (!InitializeAll()) return;
+
+#ifdef HAVE_XDBE_EXTENSION
+if (usedouble)
+ {
+ xdswp.swap_action=XdbeUndefined;
+ xdswp.swap_window=win[0];
+ }
+ else
+#endif /* HAVE_XDBE_EXTENSION */
+ win[1]=win[0];
+
+while (0==0)
+ {
+ if (cosilines)
+ {
+ c++;
+ for (a=0;a<8;a++)
+ {
+ f=0;
+ for (b=0;b<3;b++)
+ {
+ acosinus[a][b]+=cosinus[a][b];
+ f+=cosinus[a][b+3]*sin((double)acosinus[a][b]);
+ }
+ coords[a]=(int)f;
+ }
+ for (a=0;a<4;a++)
+ {
+ XDrawLine(dpy,win[0],(mono_p)?fgc[1]:fgc[((a<<2)+c)&31],midx+ocoords[a<<1],midy+ocoords[(a<<1)+1]
+ ,midx+coords[a<<1],midy+coords[(a<<1)+1]);
+ ocoords[a<<1]=coords[a<<1];
+ ocoords[(a<<1)+1]=coords[(a<<1)+1];
+ }
+
+ } else {
+ for (e=0;e<8;e++)
+ {
+ a=Satnum(50);
+ if (a>=32) a=32;
+ b=Satnum(32)-16+midx;
+ c=Satnum(32)-16+midy;
+ XFillRectangle(dpy,win[0],fgc[a],b,c,2,2);
+ }
+ }
+ XFillRectangle(dpy,win[0],fgc[32],midx-2,midy-2,4,4);
+ rotate();
+#ifdef HAVE_XDBE_EXTENSION
+ if (usedouble) XdbeSwapBuffers(dpy,&xdswp,1);
+#endif /* HAVE_XDBE_EXTENSION */
+ XSync(dpy,True);
+ if (delay) usleep (delay);
+ }
+}
/******************************************************************************
* [ maze ] ...
*
+ * modified: [ 6-28-98 ] Zack Weinberg <zack@rabi.phys.columbia.edu>
+ *
+ * Made the maze-solver somewhat more intelligent. There are
+ * three optimizations:
+ *
+ * - Straight-line lookahead: the solver does not enter dead-end
+ * corridors. This is a win with all maze generators.
+ *
+ * - First order direction choice: the solver knows where the
+ * exit is in relation to itself, and will try paths leading in
+ * that direction first. This is a major win on maze generator 1
+ * which tends to offer direct routes to the exit.
+ *
+ * - Dead region elimination: the solver already has a map of
+ * all squares visited. Whenever it starts to backtrack, it
+ * consults this map and marks off all squares that cannot be
+ * reached from the exit without crossing a square already
+ * visited. Those squares can never contribute to the path to
+ * the exit, so it doesn't bother checking them. This helps a
+ * lot with maze generator 2 and somewhat less with generator 1.
+ *
+ * Further improvements would require knowledge of the wall map
+ * as well as the position of the exit and the squares visited.
+ * I would consider that to be cheating. Generator 0 makes
+ * mazes which are remarkably difficult to solve mechanically --
+ * even with these optimizations the solver generally must visit
+ * at least two-thirds of the squares. This is partially
+ * because generator 0's mazes have longer paths to the exit.
+ *
* modified: [ 4-10-97 ] Johannes Keukelaar <johannes@nada.kth.se>
* Added multiple maze creators. Robustified solver.
* Added bridge option.
#define MOVE_LIST_SIZE (MAX_MAZE_SIZE_X * MAX_MAZE_SIZE_Y)
-#define WALL_TOP 0x8000
-#define WALL_RIGHT 0x4000
-#define WALL_BOTTOM 0x2000
-#define WALL_LEFT 0x1000
+#define NOT_DEAD 0x8000
+#define SOLVER_VISIT 0x4000
+#define START_SQUARE 0x2000
+#define END_SQUARE 0x1000
+
+#define WALL_TOP 0x8
+#define WALL_RIGHT 0x4
+#define WALL_BOTTOM 0x2
+#define WALL_LEFT 0x1
+#define WALL_ANY 0xF
#define DOOR_IN_TOP 0x800
#define DOOR_IN_RIGHT 0x400
#define DOOR_OUT_BOTTOM 0x20
#define DOOR_OUT_LEFT 0x10
-#define SOLVER_VISIT 0x4
-#define START_SQUARE 0x2
-#define END_SQUARE 0x1
#define border_x (0)
#define border_y (0)
#define get_random(x) (random() % (x))
-
+
+
static int logo_x, logo_y;
#ifdef XROGER
static struct {
unsigned char x;
unsigned char y;
- unsigned char dir;
+ unsigned char dir, ways;
} move_list[MOVE_LIST_SIZE], save_path[MOVE_LIST_SIZE], path[MOVE_LIST_SIZE];
static int maze_size_x, maze_size_y;
static Display *dpy;
static Window win;
-static GC gc, cgc, tgc, logo_gc, erase_gc;
+static GC gc, cgc, tgc, sgc, ugc, logo_gc, erase_gc;
static Pixmap logo_map;
static int x = 0, y = 0, restart = 0, stop = 1, state = 1, max_length;
border_x + 3 + grid_width * logo_x,
border_y + 3 + grid_height * logo_y, 1);
}
- draw_solid_square (start_x, start_y, start_dir, tgc);
- draw_solid_square (end_x, end_y, end_dir, tgc);
+ draw_solid_square (start_x, start_y, WALL_TOP >> start_dir, tgc);
+ draw_solid_square (end_x, end_y, WALL_TOP >> end_dir, tgc);
}
int dir, GC gc)
{
switch (dir) {
- case 0: XFillRectangle(dpy, win, gc,
- border_x + bw + grid_width * i,
- border_y - bw + grid_height * j,
- grid_width - (bw+bw), grid_height);
- break;
- case 1: XFillRectangle(dpy, win, gc,
- border_x + bw + grid_width * i,
- border_y + bw + grid_height * j,
- grid_width, grid_height - (bw+bw));
- break;
- case 2: XFillRectangle(dpy, win, gc,
- border_x + bw + grid_width * i,
- border_y + bw + grid_height * j,
- grid_width - (bw+bw), grid_height);
- break;
- case 3: XFillRectangle(dpy, win, gc,
- border_x - bw + grid_width * i,
- border_y + bw + grid_height * j,
- grid_width, grid_height - (bw+bw));
- break;
+ case WALL_TOP:
+ XFillRectangle(dpy, win, gc,
+ border_x + bw + grid_width * i,
+ border_y - bw + grid_height * j,
+ grid_width - (bw+bw), grid_height);
+ break;
+ case WALL_RIGHT:
+ XFillRectangle(dpy, win, gc,
+ border_x + bw + grid_width * i,
+ border_y + bw + grid_height * j,
+ grid_width, grid_height - (bw+bw));
+ break;
+ case WALL_BOTTOM:
+ XFillRectangle(dpy, win, gc,
+ border_x + bw + grid_width * i,
+ border_y + bw + grid_height * j,
+ grid_width - (bw+bw), grid_height);
+ break;
+ case WALL_LEFT:
+ XFillRectangle(dpy, win, gc,
+ border_x - bw + grid_width * i,
+ border_y + bw + grid_height * j,
+ grid_width, grid_height - (bw+bw));
+ break;
}
XSync (dpy, False);
}
+int
+longdeadend_p(int x1, int y1, int x2, int y2, int endwall)
+{
+ int dx = x2 - x1, dy = y2 - y1;
+ int sidewalls;
+
+ sidewalls = endwall | (endwall >> 2 | endwall << 2);
+ sidewalls = ~sidewalls & WALL_ANY;
+
+ while((maze[x2][y2] & WALL_ANY) == sidewalls)
+ {
+ x2 += dx;
+ y2 += dy;
+ }
+
+ if((maze[x2][y2] & WALL_ANY) == (sidewalls | endwall))
+ {
+ endwall = (endwall >> 2 | endwall << 2) & WALL_ANY;
+ while(x1 != x2 || y1 != y2)
+ {
+ x1 += dx;
+ y1 += dy;
+ draw_solid_square(x1, y1, endwall, sgc);
+ maze[x1][y1] |= SOLVER_VISIT;
+ }
+ return 1;
+ }
+ else
+ return 0;
+}
+
+/* Find all dead regions -- areas from which the goal cannot be reached --
+ and mark them visited. */
+void
+find_dead_regions(void)
+{
+ int x, y, flipped;
+
+ /* Find all not SOLVER_VISIT squares bordering NOT_DEAD squares
+ and mark them NOT_DEAD also. Repeat until no more such squares. */
+ maze[start_x][start_y] |= NOT_DEAD;
+
+ do
+ {
+ flipped = 0;
+ for(x = 0; x < maze_size_x; x++)
+ for(y = 0; y < maze_size_y; y++)
+ if(!(maze[x][y] & (SOLVER_VISIT | NOT_DEAD))
+ && ( (x && (maze[x-1][y] & NOT_DEAD))
+ || (y && (maze[x][y-1] & NOT_DEAD))))
+ {
+ flipped = 1;
+ maze[x][y] |= NOT_DEAD;
+ }
+ for(x = maze_size_x-1; x >= 0; x--)
+ for(y = maze_size_y-1; y >= 0; y--)
+ if(!(maze[x][y] & (SOLVER_VISIT | NOT_DEAD))
+ && ( (x != maze_size_x-1 && (maze[x+1][y] & NOT_DEAD))
+ || (y != maze_size_y-1 && (maze[x][y+1] & NOT_DEAD))))
+ {
+ flipped = 1;
+ maze[x][y] |= NOT_DEAD;
+ }
+ }
+ while(flipped);
+
+ for (y = 0; y < maze_size_y; y++)
+ for (x = 0; x < maze_size_x; x++)
+ {
+ if (maze[x][y] & NOT_DEAD)
+ maze[x][y] &= ~NOT_DEAD;
+ else if (!(maze[x][y] & SOLVER_VISIT))
+ {
+ maze[x][y] |= SOLVER_VISIT;
+ if((x < logo_x || x > logo_x + logo_width / grid_width) ||
+ (y < logo_y || y > logo_y + logo_height / grid_height))
+ {
+ if (!maze[x][y] & WALL_ANY)
+ XFillRectangle(dpy, win, ugc,
+ border_x + bw + grid_width * x,
+ border_y + bw + grid_height * y,
+ grid_width - (bw+bw), grid_height - (bw+bw));
+ else
+ {
+ if (! (maze[x][y] & WALL_LEFT))
+ draw_solid_square(x, y, WALL_LEFT, ugc);
+ if (! (maze[x][y] & WALL_RIGHT))
+ draw_solid_square(x, y, WALL_RIGHT, ugc);
+ if (! (maze[x][y] & WALL_TOP))
+ draw_solid_square(x, y, WALL_TOP, ugc);
+ if (! (maze[x][y] & WALL_BOTTOM))
+ draw_solid_square(x, y, WALL_BOTTOM, ugc);
+ }
+ }
+ }
+ }
+ XSync(dpy, 0);
+}
static void
solve_maze (void) /* solve it with graphical feedback */
{
- int i;
- int step_x[4] = { 0, 1, 0, -1 };
- int step_y[4] = { -1, 0, 1, 0 };
+ int i, dir, from, x, y, ways, bt;
+
+ /* plug up the surrounding wall */
+ maze[end_x][end_y] |= (WALL_TOP >> end_dir);
- /* plug up the surrounding wall */
- maze[start_x][start_y] |= (WALL_TOP >> start_dir);
- maze[end_x][end_y] |= (WALL_TOP >> end_dir);
-
- /* initialize search path */
- i = 0;
- path[i].x = end_x;
- path[i].y = end_y;
- path[i].dir = -1;
- maze[end_x][end_y] |= SOLVER_VISIT;
-
- /* do it */
- while (1) {
- if ( ++path[i].dir >= 4 ) {
- XFillRectangle(dpy, win, cgc,
- border_x + bw + grid_width * (int)(path[i].x),
- border_y + bw + grid_height * (int)(path[i].y),
- grid_width - (bw+bw), grid_height - (bw+bw));
- i--;
- if(i<0) /* Can't solve this maze. */
+ /* initialize search path */
+ i = 0;
+ path[i].x = end_x;
+ path[i].y = end_y;
+ path[i].dir = 0;
+ maze[end_x][end_y] |= SOLVER_VISIT;
+
+ /* do it */
+ while (1)
+ {
+ if ( maze[path[i].x][path[i].y] & START_SQUARE )
+ return;
+
+ /* Abort solve on expose - cheapo repaint strategy */
+ if (check_events()) return;
+
+ if (solve_delay) usleep (solve_delay);
+
+ if(!path[i].dir)
+ {
+ ways = 0;
+ /* First visit this square. Which adjacent squares are open? */
+ for(dir = WALL_TOP; dir & WALL_ANY; dir >>= 1)
+ {
+ if(maze[path[i].x][path[i].y] & dir)
+ continue;
+
+ y = path[i].y - !!(dir & WALL_TOP) + !!(dir & WALL_BOTTOM);
+ x = path[i].x + !!(dir & WALL_RIGHT) - !!(dir & WALL_LEFT);
+
+ if(maze[x][y] & SOLVER_VISIT)
+ continue;
+
+ from = (dir << 2 & WALL_ANY) | (dir >> 2 & WALL_ANY);
+ /* don't enter obvious dead ends */
+ if(((maze[x][y] & WALL_ANY) | from) != WALL_ANY)
+ {
+ if(!longdeadend_p(path[i].x, path[i].y, x, y, dir))
+ ways |= dir;
+ }
+ else
+ {
+ draw_solid_square(x, y, from, sgc);
+ maze[x][y] |= SOLVER_VISIT;
+ }
+ }
+ }
+ else
+ ways = path[i].ways;
+ /* ways now has a bitmask of open paths. */
+
+ if(!ways)
+ goto backtrack;
+
+ x = path[i].x - start_x;
+ y = path[i].y - start_y;
+ /* choice one */
+ if(abs(y) <= abs(x))
+ dir = (x > 0) ? WALL_LEFT : WALL_RIGHT;
+ else
+ dir = (y > 0) ? WALL_TOP : WALL_BOTTOM;
+
+ if(dir & ways)
+ goto found;
+
+ /* choice two */
+ switch(dir)
+ {
+ case WALL_LEFT:
+ case WALL_RIGHT:
+ dir = (y > 0) ? WALL_TOP : WALL_BOTTOM; break;
+ case WALL_TOP:
+ case WALL_BOTTOM:
+ dir = (x > 0) ? WALL_LEFT : WALL_RIGHT;
+ }
+
+ if(dir & ways)
+ goto found;
+
+ /* choice three */
+
+ dir = (dir << 2 & WALL_ANY) | (dir >> 2 & WALL_ANY);
+ if(dir & ways)
+ goto found;
+
+ /* choice four */
+ dir = ways;
+ if(!dir)
+ goto backtrack;
+
+ found:
+ bt = 0;
+ ways &= ~dir; /* tried this one */
+
+ y = path[i].y - !!(dir & WALL_TOP) + !!(dir & WALL_BOTTOM);
+ x = path[i].x + !!(dir & WALL_RIGHT) - !!(dir & WALL_LEFT);
+
+ /* advance in direction dir */
+ path[i].dir = dir;
+ path[i].ways = ways;
+ draw_solid_square(path[i].x, path[i].y, dir, tgc);
+
+ i++;
+ path[i].dir = 0;
+ path[i].ways = 0;
+ path[i].x = x;
+ path[i].y = y;
+ maze[x][y] |= SOLVER_VISIT;
+ continue;
+
+ backtrack:
+ if(i == 0)
{
- printf("Unsolvable maze.\n");
- return;
+ printf("Unsolvable maze.\n");
+ return;
}
- draw_solid_square( (int)(path[i].x), (int)(path[i].y),
- (int)(path[i].dir), cgc);
+
+ if(!bt)
+ find_dead_regions();
+ bt = 1;
+ from = path[i-1].dir;
+ from = (from << 2 & WALL_ANY) | (from >> 2 & WALL_ANY);
+
+ draw_solid_square(path[i].x, path[i].y, from, cgc);
+ i--;
}
- else if ( (! (maze[path[i].x][path[i].y] & (WALL_TOP >> path[i].dir))) &&
- (!( maze[path[i].x+step_x[path[i].dir]]
- [path[i].y+step_y[path[i].dir]]&SOLVER_VISIT)) ) {
- path[i+1].x = path[i].x+step_x[path[i].dir];
- path[i+1].y = path[i].y+step_y[path[i].dir];
- path[i+1].dir = -1;
- draw_solid_square(path[i].x, path[i].y, path[i].dir, tgc);
- i++;
- maze[path[i].x][path[i].y] |= SOLVER_VISIT;
- if ( maze[path[i].x][path[i].y] & START_SQUARE ) {
- return;
- }
- }
- if (check_events()) return;
- /* Abort solve on expose - cheapo repaint strategy */
- if (solve_delay) usleep (solve_delay);
- }
}
-
#if 0
static void
enter_square (int n) /* move into a neighboring square */
"*postDelay: 4000000",
"*liveColor: green",
"*deadColor: red",
+ "*skipColor: orange",
+ "*surroundColor: slateblue",
"*generator: -1",
"*maxLength: 5",
"*syncDraw: False",
{ "-post-delay", ".postDelay", XrmoptionSepArg, 0 },
{ "-live-color", ".liveColor", XrmoptionSepArg, 0 },
{ "-dead-color", ".deadColor", XrmoptionSepArg, 0 },
+ { "-skip-color", ".skipColor", XrmoptionSepArg, 0 },
+ { "-surround-color", ".surroundColor",XrmoptionSepArg, 0 },
{ "-generator", ".generator", XrmoptionSepArg, 0 },
{ "-max-length", ".maxLength", XrmoptionSepArg, 0 },
{ "-bridge", ".bridge", XrmoptionNoArg, "True" },
Pixmap gray;
int size, root, generator, this_gen;
XWindowAttributes xgwa;
- unsigned long bg, fg, pfg, pbg, lfg;
+ unsigned long bg, fg, pfg, pbg, lfg, sfg, ufg;
size = get_integer_resource ("gridSize", "Dimension");
root = get_boolean_resource("root", "Boolean");
if (! root)
XSelectInput (dpy, win, ExposureMask|ButtonPressMask|StructureNotifyMask);
- gc = XCreateGC(dpy, win, 0, 0);
+ gc = XCreateGC(dpy, win, 0, 0);
cgc = XCreateGC(dpy, win, 0, 0);
- tgc = XCreateGC(dpy,win,0,0);
+ tgc = XCreateGC(dpy, win, 0, 0);
+ sgc = XCreateGC(dpy, win, 0, 0);
+ ugc = XCreateGC(dpy, win, 0, 0);
logo_gc = XCreateGC(dpy, win, 0, 0);
erase_gc = XCreateGC(dpy, win, 0, 0);
lfg = get_pixel_resource ("logoColor", "Foreground", dpy, xgwa.colormap);
pfg = get_pixel_resource ("liveColor", "Foreground", dpy, xgwa.colormap);
pbg = get_pixel_resource ("deadColor", "Foreground", dpy, xgwa.colormap);
+ sfg = get_pixel_resource ("skipColor", "Foreground", dpy, xgwa.colormap);
+ ufg = get_pixel_resource ("surroundColor", "Foreground", dpy, xgwa.colormap);
if (mono_p) lfg = pfg = fg;
if (lfg == bg)
XSetBackground (dpy, cgc, bg);
XSetForeground (dpy, tgc, pfg);
XSetBackground (dpy, tgc, bg);
+ XSetForeground (dpy, sgc, sfg);
+ XSetBackground (dpy, sgc, bg);
+ XSetForeground (dpy, ugc, ufg);
+ XSetBackground (dpy, ugc, bg);
XSetForeground (dpy, logo_gc, lfg);
XSetBackground (dpy, logo_gc, bg);
XSetForeground (dpy, erase_gc, bg);
XSetStipple (dpy, cgc, gray);
XSetFillStyle (dpy, cgc, FillOpaqueStippled);
+ XSetStipple (dpy, sgc, gray);
+ XSetFillStyle (dpy, sgc, FillOpaqueStippled);
+ XSetStipple (dpy, ugc, gray);
+ XSetFillStyle (dpy, ugc, FillOpaqueStippled);
#ifdef XROGER
{
.B \-dead\-color \fIcolor\fP
The color of the failed path (it is also stippled with a 50% pattern.)
.TP 8
+.B \-skip\-color \fIcolor\fP
+The maze solver will choose to not go down a path if it can "see" (in a
+straight line) that it is a dead end. This is the color to use for paths
+that are skipped for this reason.
+.TP 8
+.B \-surround\-color \fIcolor\fP
+If the maze solver ever completely encloses an area within the maze, then
+it knows that the exit is not in there (and in fact the interior of that
+area might not even be reachable.) It will mark out those cells using this
+color.
+.TP 8
.B \-solve\-delay \fIinteger\fP
Delay (in microseconds) between each step of the solution path.
Default 5000, or about 1/200th second.
OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.SH AUTHOR(s)
.nf
+Zack Weinberg [ Smarter maze-solver ] zack@rabi.phys.columbia.edu
Johannes Keukelaar [ Generators 1 and 2 ] johannes@nada.kth.se
Royal Institute of Technology, Stockholm, Sweden
Jim Randell [ XScreenSaver version ] jmr@mddjmr.fc.hp.com
if [ -s $tmp_ppm2 ]; then
if [ "$verbose" = true ]; then
echo "launching xv $xvargs $tmp_ppm2" >&2
+ ls -lF $tmp_ppm2
fi
- xv $xvargs $tmp_ppm2 &
+
+ # cat the file so that we can nuke it without racing against xv.
+ cat $tmp_ppm2 | xv $xvargs - &
pid=$!
fi
fi
main $@
# to find stray xv data:
-# xwininfo -root -children|grep 'xv image comments' | awk '{print $1}'
+# xwininfo -root -children|grep 'xv image comments' | awk '{print "xkill -id ", $1}'
$ decayscreen :== $'mydir'decayscreen
$ deco :== $'mydir'deco
$ discrete :== $'mydir'discrete
+$ distort :== $'mydir'distort
$ drift :== $'mydir'drift
$ epicycle :== $'mydir'epicycle
$ fadeplot :== $'mydir'fadeplot
$ jigsaw :== $'mydir'jigsaw
$ julia :== $'mydir'julia
$ kaleidescope :== $'mydir'kaleidescope
+$ kumppa :== $'mydir'kumppa
$ laser :== $'mydir'laser
$ lightning :== $'mydir'lightning
$ lisa :== $'mydir'lisa
# utils/Makefile.in --- xscreensaver, Copyright (c) 1997 Jamie Zawinski.
# the `../configure' script generates `utils/Makefile' from this file.
+
+# The utilities in this directory are used mostly by the demos in ../hacks/.
+# The Makefile in that directory builds executables by simply referencing
+# the .o files in this directory.
+
+
+##############################################################################
+#
+# Some rambling about dynamic libraries follows, ignore it if you don't care
+# (which is almost assuredly the case.)
+#
+#
+# It would probably be sensible to just build a single .a file in this
+# directory, and link the hacks against that (statically.) I haven't done
+# that for two reasons: first, it works now, and why fix what ain't broke;
+# second, it wouldn't actually improve anything for the end user (it would
+# just make the Makefiles be a little smaller.)
+#
+# People sometimes suggest that the stuff in this directory should be in a
+# dynamic library, and that the hacks should be linked dynamically against
+# it. I haven't done this for a number of reasons:
+#
+# * First, the only thing that would improve would be disk space, in that
+# the executable files themselves would be smaller. That's it. Many other
+# things would get worse if we used a dynamic library:
+#
+# * Complication of installation procedures: suddenly, before any of the
+# hacks will work, you need to have a dynamic library installed, and
+# the system configured to use it. This is, basically, rocket science.
+# Most people don't know how to do this, it's a huge pain, and on many
+# systems, it requires root access.
+#
+# * Complication of the Makefile: every system builds dynamic libraries
+# differently. Every compiler takes different flags. I don't want to
+# do the hand-holding for the scores of Unix systems and compilers on
+# which people try to build this program.
+#
+# * Reduction of maintainability: gdb is remarkably bad at dealing with
+# debug info in dynamic libraries, and when debugging a hack, one would
+# constantly be fighting the linker and the debugger (or linking
+# statically when debugging.)
+#
+# * Version skew: when things are statically linked, it's perfectly ok to
+# make incompatible changes to the APIs defined in this directory, so long
+# as the current version in ../hacks/ is in sync. Much more care would
+# need to be taken with such things if dynamic libraries were involved,
+# to make sure that the major and minor versions of the library changed
+# at the appropriate time. This isn't too hard, but it's more work, and
+# yet another opportunity to screw up.
+#
+# * Runtime memory usage goes *up*. That's right, up! When a program
+# links in a dynamic library, the whole library is brought into the
+# address space, not just the files that are actually used. Normally,
+# this is ok, because if several programs are using (for example)
+# libX11.so, chances are that the savings outweighs the overhead. But
+# the nature of xscreensaver is that only one of the hacks ever runs at
+# a time -- so there would never be a second program using the utils/
+# dynamic library with which things could be shared.
+#
+# * Runtime speed decreases slightly, since dynamic code is marginally
+# slower. On modern machines, this probably doesn't make a perceptible
+# difference, however.
+#
+# So basically, I just don't think using libraries would be a win, and it would
+# definitely cause more of a maintenance and portability headache. However,
+# if someone else wants to do the work to make it be an option to configure,
+# and verifies that it works on several (more than three) different Unixes,
+# I'd be happy to take the patches.
+# -- jwz, 30-Jun-98
+#
+##############################################################################
+
+
@SET_MAKE@
.SUFFIXES:
.SUFFIXES: .c .o
XWindowAttributes xgwa2;
XGetWindowAttributes (dpy, window, &xgwa2);
fprintf(stderr, "%s: ", progname);
- describe_visual(stderr, screen, xgwa2.visual);
+ describe_visual(stderr, screen, xgwa2.visual, ####);
+ fprintf (stderr, "\n");
}
#endif /* DEBUG */
static const char screensaver_id[] =
- "@(#)xscreensaver 2.23, by Jamie Zawinski (jwz@netscape.com)";
+ "@(#)xscreensaver 2.24, by Jamie Zawinski (jwz@netscape.com)";
}
void
-describe_visual (FILE *f, Screen *screen, Visual *visual)
+describe_visual (FILE *f, Screen *screen, Visual *visual, Bool private_cmap_p)
{
+ char n[10];
Display *dpy = DisplayOfScreen (screen);
XVisualInfo vi_in, *vi_out;
int out_count;
vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
&vi_in, &out_count);
if (! vi_out) abort ();
- fprintf (f, "0x%02x (%s depth: %2d, cmap: %3d)\n",
+ if (private_cmap_p)
+ sprintf(n, "%3d", vi_out->colormap_size);
+ else
+ strcpy(n, "default");
+
+ fprintf (f, "0x%02x (%s depth: %2d, cmap: %s)\n",
(unsigned int) vi_out->visualid,
(vi_out->class == StaticGray ? "StaticGray, " :
vi_out->class == StaticColor ? "StaticColor," :
vi_out->class == PseudoColor ? "PseudoColor," :
vi_out->class == DirectColor ? "DirectColor," :
"UNKNOWN: "),
- vi_out->depth, vi_out->colormap_size /*, vi_out->bits_per_rgb*/);
+ vi_out->depth, n);
XFree ((char *) vi_out);
}
extern int visual_cells (Screen *, Visual *);
extern int screen_number (Screen *);
extern Visual *find_similar_visual (Screen *, Visual *old);
-extern void describe_visual (FILE *f, Screen *, Visual *);
+extern void describe_visual (FILE *f, Screen *, Visual *, Bool private_cmap_p);
extern Visual *get_overlay_visual (Screen *, unsigned long *pixel_return);
extern Bool has_writable_cells (Screen *screen, Visual *visual);
Begin3
Title: xscreensaver
-Version: 2.23
-Entered-date: 21JUN98
+Version: 2.24
+Entered-date: 30JUN98
Description: A modular screen saver and locker for the X Window System.
Highly customizable: allows the use of any program that
can draw on the root window as a display mode.
Author: jwz@netscape.com (Jamie Zawinski)
Maintained-by: jwz@netscape.com (Jamie Zawinski)
Primary-site: ftp.x.org /contrib/applications/
- 819K xscreensaver-2.23.tar.gz
- 22K xscreensaver.README
+ 831K xscreensaver-2.24.tar.gz
+ 23K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
- 819K xscreensaver-2.23.tar.gz
- 22K xscreensaver.README
+ 831K xscreensaver-2.24.tar.gz
+ 23K xscreensaver.README
1K xscreensaver.lsm
Platforms: Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
BSDI, SCO, OSF1, Ultrix, VMS.