============
+Changes since 3.21: * Fixed some bugs in xscreensaver-demo.
+ * Rewrote the Motif version of xscreensaver-demo to
+ match the new Gtk version.
+ * The Athena toolkit is no longer supported.
Changes since 3.20: * Tweaked the xscreensaver-demo UI (Gtk only.)
* Fixed a few visual selection bugs. I think the proper
GL visual should be used with nVidia systems now.
*/
#define HAVE_MOTIF 1
-/* Define this if you don't have Motif, but you have Athena (-Xaw).
+/* Define this if you have the XmComboBox Motif widget (Motif 2.0.)
*/
-#undef HAVE_ATHENA
-
-/* Define this if you have Athena, and the version you have includes the
- * XawViewportSetCoordinates function in Viewport.h (some old versions of
- * the library didn't have this function.)
- */
-#undef HAVE_XawViewportSetCoordinates
+#undef HAVE_XMCOMBOBOX
/* Define this if you have the XPM library installed. Some of the demos can
* make use of this if it is available.
*/
#undef HAVE_MOTIF
-/* Define this if you have Gtk.
- */
-#undef HAVE_GTK
-
-/* Define this if you have Athena (-Xaw).
+/* Define this if you have the XmComboBox Motif widget (Motif 2.0.)
*/
-#undef HAVE_ATHENA
+#undef HAVE_XMCOMBOBOX
-/* Define this if you have Athena, and the version you have includes the
- * XawViewportSetCoordinates function in Viewport.h (some old versions of
- * the library didn't have this function.)
+/* Define this if you have Gtk.
*/
-#undef HAVE_XawViewportSetCoordinates
+#undef HAVE_GTK
/* Define this if you have the XPM library installed. Some of the demos can
* make use of this if it is available.
ac_help="$ac_help
--with-gtk Use the Gtk toolkit for the user interface."
ac_help="$ac_help
- --with-athena Use the Athena toolkit for the user interface."
-ac_help="$ac_help
Graphics options:
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:804: checking host system type" >&5
+echo "configure:802: 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:827: checking for $ac_word" >&5
+echo "configure:825: 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:857: checking for $ac_word" >&5
+echo "configure:855: 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 "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:908: checking for $ac_word" >&5
+echo "configure:906: 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:940: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:938: 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.
cat > conftest.$ac_ext << EOF
-#line 951 "configure"
+#line 949 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:982: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:980: 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:987: checking whether we are using GNU C" >&5
+echo "configure:985: 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:996: \"$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:994: \"$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:1015: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1013: 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:1049: checking how to request ANSI compilation" >&5
+echo "configure:1047: checking how to request ANSI compilation" >&5
case "$host" in
*-hpux* )
echo "$ac_t""HPUX: adding -Ae" 1>&6
fi
echo $ac_n "checking whether the compiler works on ANSI C""... $ac_c" 1>&6
-echo "configure:1072: checking whether the compiler works on ANSI C" >&5
+echo "configure:1070: 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 1077 "configure"
+#line 1075 "configure"
#include "confdefs.h"
main(int ac, char **av) { return 0; }
EOF
-if { (eval echo configure:1081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
echo "$ac_t""yes" 1>&6
else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1116: checking how to run the C preprocessor" >&5
+echo "configure:1114: 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 1131 "configure"
+#line 1129 "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:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1148 "configure"
+#line 1146 "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:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1165 "configure"
+#line 1163 "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:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1169: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1196: checking for working const" >&5
+echo "configure:1194: 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 1201 "configure"
+#line 1199 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1248: \"$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:1271: checking for inline" >&5
+echo "configure:1269: 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 1278 "configure"
+#line 1276 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:1285: \"$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_c_inline=$ac_kw; break
else
# 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:1324: checking for a BSD compatible install" >&5
+echo "configure:1322: 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 \"\${INSTALL} -d\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1377: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
+echo "configure:1375: checking whether \"\${INSTALL} -d\" creates intermediate directories" >&5
if eval "test \"`echo '$''{'ac_cv_install_d_creates_dirs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$ac_cv_install_d_creates_dirs" = no ; then
echo $ac_n "checking whether \"mkdir -p\" creates intermediate directories""... $ac_c" 1>&6
-echo "configure:1399: checking whether \"mkdir -p\" creates intermediate directories" >&5
+echo "configure:1397: checking whether \"mkdir -p\" creates intermediate directories" >&5
if eval "test \"`echo '$''{'ac_cv_mkdir_p_creates_dirs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1430: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1428: 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
# random libc stuff
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1459: checking for ANSI C header files" >&5
+echo "configure:1457: 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 1464 "configure"
+#line 1462 "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:1472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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 1489 "configure"
+#line 1487 "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 1507 "configure"
+#line 1505 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1528 "configure"
+#line 1526 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1566: checking for $ac_hdr" >&5
+echo "configure:1564: 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 1571 "configure"
+#line 1569 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
done
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:1603: checking for mode_t" >&5
+echo "configure:1601: 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 1608 "configure"
+#line 1606 "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:1636: checking for pid_t" >&5
+echo "configure:1634: 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 1641 "configure"
+#line 1639 "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:1669: checking for size_t" >&5
+echo "configure:1667: 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 1674 "configure"
+#line 1672 "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:1702: checking return type of signal handlers" >&5
+echo "configure:1700: 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 1707 "configure"
+#line 1705 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:1724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1743: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1741: 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 1748 "configure"
+#line 1746 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1755: \"$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:1778: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1776: 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 1783 "configure"
+#line 1781 "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:1799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1797: \"$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:1824: checking for $ac_hdr that defines DIR" >&5
+echo "configure:1822: 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 1829 "configure"
+#line 1827 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:1837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1835: \"$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:1862: checking for opendir in -ldir" >&5
+echo "configure:1860: 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 1870 "configure"
+#line 1868 "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:1881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:1903: checking for opendir in -lx" >&5
+echo "configure:1901: 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 1911 "configure"
+#line 1909 "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:1922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
echo $ac_n "checking how to call gettimeofday""... $ac_c" 1>&6
-echo "configure:1945: checking how to call gettimeofday" >&5
+echo "configure:1943: 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 1950 "configure"
+#line 1948 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
gettimeofday(&tv, &tzp);
; return 0; }
EOF
-if { (eval echo configure:1959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1957: \"$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 1967 "configure"
+#line 1965 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <sys/time.h>
struct timeval tv; gettimeofday(&tv);
; return 0; }
EOF
-if { (eval echo configure:1975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1973: \"$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:2014: checking for $ac_func" >&5
+echo "configure:2012: 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 2019 "configure"
+#line 2017 "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:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
for ac_func in sigaction syslog realpath
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2070: checking for $ac_func" >&5
+echo "configure:2068: 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 2075 "configure"
+#line 2073 "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:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
done
echo $ac_n "checking for struct icmp""... $ac_c" 1>&6
-echo "configure:2123: checking for struct icmp" >&5
+echo "configure:2121: checking for struct icmp" >&5
if eval "test \"`echo '$''{'ac_cv_have_icmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2128 "configure"
+#line 2126 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdio.h>
ip.ip_hl = 0;
; return 0; }
EOF
-if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_icmp=yes
else
fi
echo $ac_n "checking for struct icmphdr""... $ac_c" 1>&6
-echo "configure:2183: checking for struct icmphdr" >&5
+echo "configure:2181: checking for struct icmphdr" >&5
if eval "test \"`echo '$''{'ac_cv_have_icmphdr'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2188 "configure"
+#line 2186 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdio.h>
ip.ip_hl = 0;
; return 0; }
EOF
-if { (eval echo configure:2223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_icmphdr=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2246: checking for $ac_hdr" >&5
+echo "configure:2244: 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 2251 "configure"
+#line 2249 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# 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:2287: checking for $ac_word" >&5
+echo "configure:2285: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
PERL_VERSION=0
else
echo $ac_n "checking perl version""... $ac_c" 1>&6
-echo "configure:2326: checking perl version" >&5
+echo "configure:2324: checking perl version" >&5
if eval "test \"`echo '$''{'ac_cv_perl_version'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# 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:2348: checking for X" >&5
+echo "configure:2346: 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 2410 "configure"
+#line 2408 "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:2415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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 2484 "configure"
+#line 2482 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:2491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2597: checking whether -R must be followed by a space" >&5
+echo "configure:2595: 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 2600 "configure"
+#line 2598 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_R_nospace=yes
else
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat > conftest.$ac_ext <<EOF
-#line 2623 "configure"
+#line 2621 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2662: checking for dnet_ntoa in -ldnet" >&5
+echo "configure:2660: 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 2670 "configure"
+#line 2668 "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:2681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2703: checking for dnet_ntoa in -ldnet_stub" >&5
+echo "configure:2701: 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 2711 "configure"
+#line 2709 "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:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2751: checking for gethostbyname" >&5
+echo "configure:2749: 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 2756 "configure"
+#line 2754 "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:2779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2800: checking for gethostbyname in -lnsl" >&5
+echo "configure:2798: 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 2808 "configure"
+#line 2806 "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:2819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2849: checking for connect" >&5
+echo "configure:2847: 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 2854 "configure"
+#line 2852 "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:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2898: checking for connect in -lsocket" >&5
+echo "configure:2896: 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 2906 "configure"
+#line 2904 "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:2917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2941: checking for remove" >&5
+echo "configure:2939: 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 2946 "configure"
+#line 2944 "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:2969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:2990: checking for remove in -lposix" >&5
+echo "configure:2988: 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 2998 "configure"
+#line 2996 "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:3009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:3033: checking for shmat" >&5
+echo "configure:3031: 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 3038 "configure"
+#line 3036 "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:3061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:3082: checking for shmat in -lipc" >&5
+echo "configure:3080: 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 3090 "configure"
+#line 3088 "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:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:3134: checking for IceConnectionNumber in -lICE" >&5
+echo "configure:3132: 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 $X_EXTRA_LIBS $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3142 "configure"
+#line 3140 "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:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:3184: checking for X app-defaults directory" >&5
+echo "configure:3182: 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
# 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:3383: checking for regcmp in -lgen" >&5
+echo "configure:3381: 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 3391 "configure"
+#line 3389 "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:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
;;
esac
echo $ac_n "checking for XPointer""... $ac_c" 1>&6
-echo "configure:3426: checking for XPointer" >&5
+echo "configure:3424: 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 3437 "configure"
+#line 3435 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
int main() {
XPointer foo = (XPointer) 0;
; return 0; }
EOF
-if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_xpointer=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:3482: checking for X11/Xmu/Error.h" >&5
+echo "configure:3480: 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 3487 "configure"
+#line 3485 "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:3492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
HACK_LIBS="-lXmu $HACK_LIBS"
MOTIF_LIBS="-lXmu $MOTIF_LIBS"
GTK_LIBS="-lXmu $GTK_LIBS"
- ATHENA_LIBS="-lXmu $ATHENA_LIBS"
- ATHENA3D_LIBS="-lXmu $ATHENA3D_LIBS"
cat >> confdefs.h <<\EOF
#define HAVE_XMU 1
EOF
case "$host" in
*-sunos4*)
echo $ac_n "checking for the SunOS 4.1.x _get_wmShellWidgetClass bug""... $ac_c" 1>&6
-echo "configure:3545: checking for the SunOS 4.1.x _get_wmShellWidgetClass bug" >&5
+echo "configure:3541: 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 3558 "configure"
+#line 3554 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:3581: checking whether the compiler understands -static" >&5
+echo "configure:3577: 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 3588 "configure"
+#line 3584 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_ld_static=yes
else
/*)
echo $ac_n "checking for SGI SCREEN_SAVER headers""... $ac_c" 1>&6
-echo "configure:3678: checking for SGI SCREEN_SAVER headers" >&5
+echo "configure:3674: checking for SGI SCREEN_SAVER headers" >&5
d=$with_sgi/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for SGI SCREEN_SAVER libs""... $ac_c" 1>&6
-echo "configure:3688: checking for SGI SCREEN_SAVER libs" >&5
+echo "configure:3684: checking for SGI SCREEN_SAVER libs" >&5
d=$with_sgi/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3721: checking for X11/extensions/XScreenSaver.h" >&5
+echo "configure:3717: 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 3726 "configure"
+#line 3722 "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:3731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for MIT-SCREEN-SAVER headers""... $ac_c" 1>&6
-echo "configure:3788: checking for MIT-SCREEN-SAVER headers" >&5
+echo "configure:3784: checking for MIT-SCREEN-SAVER headers" >&5
d=$with_mit/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for MIT-SCREEN-SAVER libs""... $ac_c" 1>&6
-echo "configure:3798: checking for MIT-SCREEN-SAVER libs" >&5
+echo "configure:3794: checking for MIT-SCREEN-SAVER libs" >&5
d=$with_mit/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:3831: checking for X11/extensions/scrnsaver.h" >&5
+echo "configure:3827: 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 3836 "configure"
+#line 3832 "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:3841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXext""... $ac_c" 1>&6
-echo "configure:3886: checking for XScreenSaverRegister in -lXext" >&5
+echo "configure:3882: 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 3894 "configure"
+#line 3890 "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:3905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXExExt""... $ac_c" 1>&6
-echo "configure:3952: checking for XScreenSaverRegister in -lXExExt" >&5
+echo "configure:3948: 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 3960 "configure"
+#line 3956 "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:3971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XScreenSaverRegister in -lXss""... $ac_c" 1>&6
-echo "configure:4021: checking for XScreenSaverRegister in -lXss" >&5
+echo "configure:4017: 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 4029 "configure"
+#line 4025 "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:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for XIDLE headers""... $ac_c" 1>&6
-echo "configure:4106: checking for XIDLE headers" >&5
+echo "configure:4102: checking for XIDLE headers" >&5
d=$with_xidle/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XIDLE libs""... $ac_c" 1>&6
-echo "configure:4116: checking for XIDLE libs" >&5
+echo "configure:4112: checking for XIDLE libs" >&5
d=$with_xidle/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4149: checking for X11/extensions/xidle.h" >&5
+echo "configure:4145: 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 4154 "configure"
+#line 4150 "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:4159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4155: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for SGI-VIDEO-CONTROL headers""... $ac_c" 1>&6
-echo "configure:4215: checking for SGI-VIDEO-CONTROL headers" >&5
+echo "configure:4211: checking for SGI-VIDEO-CONTROL headers" >&5
d=$with_sgivc/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for SGI-VIDEO-CONTROL libs""... $ac_c" 1>&6
-echo "configure:4225: checking for SGI-VIDEO-CONTROL libs" >&5
+echo "configure:4221: checking for SGI-VIDEO-CONTROL libs" >&5
d=$with_sgivc/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4260: checking for X11/extensions/XSGIvc.h" >&5
+echo "configure:4256: 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 4265 "configure"
+#line 4261 "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:4270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XSGIvcQueryGammaMap in -lXsgivc""... $ac_c" 1>&6
-echo "configure:4314: checking for XSGIvcQueryGammaMap in -lXsgivc" >&5
+echo "configure:4310: 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 4322 "configure"
+#line 4318 "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:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for DPMS headers""... $ac_c" 1>&6
-echo "configure:4398: checking for DPMS headers" >&5
+echo "configure:4394: checking for DPMS headers" >&5
d=$with_dpms/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for DPMS libs""... $ac_c" 1>&6
-echo "configure:4408: checking for DPMS libs" >&5
+echo "configure:4404: checking for DPMS libs" >&5
d=$with_dpms/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:4443: checking for X11/extensions/dpms.h" >&5
+echo "configure:4439: 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 4448 "configure"
+#line 4444 "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:4453: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4449: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for DPMSInfo in -lXdpms""... $ac_c" 1>&6
-echo "configure:4497: checking for DPMSInfo in -lXdpms" >&5
+echo "configure:4493: 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 4505 "configure"
+#line 4501 "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:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for xf86vmode headers""... $ac_c" 1>&6
-echo "configure:4581: checking for xf86vmode headers" >&5
+echo "configure:4577: checking for xf86vmode headers" >&5
d=$with_xf86vmode/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for xf86vmode libs""... $ac_c" 1>&6
-echo "configure:4591: checking for xf86vmode libs" >&5
+echo "configure:4587: checking for xf86vmode libs" >&5
d=$with_xf86vmode/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/xf86vmode.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/xf86vmode.h""... $ac_c" 1>&6
-echo "configure:4626: checking for X11/extensions/xf86vmode.h" >&5
+echo "configure:4622: checking for X11/extensions/xf86vmode.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 4631 "configure"
+#line 4627 "configure"
#include "confdefs.h"
#include <X11/extensions/xf86vmode.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XF86VidModeGetViewPort in -lXxf86vm""... $ac_c" 1>&6
-echo "configure:4680: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
+echo "configure:4676: checking for XF86VidModeGetViewPort in -lXxf86vm" >&5
ac_lib_var=`echo Xxf86vm'_'XF86VidModeGetViewPort | 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="-lXxf86vm -lXext -lX11 $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4688 "configure"
+#line 4684 "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
XF86VidModeGetViewPort()
; return 0; }
EOF
-if { (eval echo configure:4699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4753 "configure"
+#line 4749 "configure"
#include "confdefs.h"
#include <X11/XHPlib.h>
EOF
if test "$with_proc_interrupts" = yes; then
echo $ac_n "checking whether /proc/interrupts contains keyboard data""... $ac_c" 1>&6
-echo "configure:4791: checking whether /proc/interrupts contains keyboard data" >&5
+echo "configure:4787: checking whether /proc/interrupts contains keyboard data" >&5
if eval "test \"`echo '$''{'ac_cv_have_proc_interrupts'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
/*)
echo $ac_n "checking for PAM headers""... $ac_c" 1>&6
-echo "configure:4924: checking for PAM headers" >&5
+echo "configure:4920: checking for PAM headers" >&5
d=$with_pam/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for PAM libs""... $ac_c" 1>&6
-echo "configure:4934: checking for PAM libs" >&5
+echo "configure:4930: checking for PAM libs" >&5
d=$with_pam/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
if test "$enable_locking" = yes -a "$with_pam" = yes; then
echo $ac_n "checking for PAM""... $ac_c" 1>&6
-echo "configure:4960: checking for PAM" >&5
+echo "configure:4956: checking for PAM" >&5
if eval "test \"`echo '$''{'ac_cv_pam'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 4971 "configure"
+#line 4967 "configure"
#include "confdefs.h"
#include <security/pam_appl.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:4978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_pam=yes
else
# libpam typically requires dlopen and dlsym. On FreeBSD,
# those are in libc. On Linux and Solaris, they're in libdl.
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5003: checking for dlopen in -ldl" >&5
+echo "configure:4999: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | 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="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5011 "configure"
+#line 5007 "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
dlopen()
; return 0; }
EOF
-if { (eval echo configure:5022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
echo $ac_n "checking how to call pam_strerror""... $ac_c" 1>&6
-echo "configure:5044: checking how to call pam_strerror" >&5
+echo "configure:5040: checking how to call pam_strerror" >&5
if eval "test \"`echo '$''{'ac_cv_pam_strerror_args'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5049 "configure"
+#line 5045 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
char *s = pam_strerror(pamh, PAM_SUCCESS);
; return 0; }
EOF
-if { (eval echo configure:5059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_pam_strerror_args=2
else
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 5067 "configure"
+#line 5063 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <stdlib.h>
pam_strerror(PAM_SUCCESS);
; return 0; }
EOF
-if { (eval echo configure:5077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_pam_strerror_args=1
else
/*)
echo $ac_n "checking for Kerberos headers""... $ac_c" 1>&6
-echo "configure:5133: checking for Kerberos headers" >&5
+echo "configure:5129: checking for Kerberos headers" >&5
d=$with_kerberos/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Kerberos libs""... $ac_c" 1>&6
-echo "configure:5143: checking for Kerberos libs" >&5
+echo "configure:5139: checking for Kerberos libs" >&5
d=$with_kerberos/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
if test "$enable_locking" = yes -a "$with_kerberos" = yes; then
echo $ac_n "checking for Kerberos""... $ac_c" 1>&6
-echo "configure:5169: checking for Kerberos" >&5
+echo "configure:5165: 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 5180 "configure"
+#line 5176 "configure"
#include "confdefs.h"
#include <krb.h>
int main() {
; return 0; }
EOF
-if { (eval echo configure:5187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_kerberos=yes
else
# from Tim Showalter <tjs+@andrew.cmu.edu>
PASSWD_LIBS="$PASSWD_LIBS -lkrb -ldes"
echo $ac_n "checking for res_search""... $ac_c" 1>&6
-echo "configure:5211: checking for res_search" >&5
+echo "configure:5207: checking for res_search" >&5
if eval "test \"`echo '$''{'ac_cv_func_res_search'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5216 "configure"
+#line 5212 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char res_search(); below. */
; return 0; }
EOF
-if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_res_search=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for res_search in -lresolv""... $ac_c" 1>&6
-echo "configure:5257: checking for res_search in -lresolv" >&5
+echo "configure:5253: checking for res_search in -lresolv" >&5
ac_lib_var=`echo resolv'_'res_search | 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="-lresolv $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 5265 "configure"
+#line 5261 "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
res_search()
; return 0; }
EOF
-if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for shadow password headers""... $ac_c" 1>&6
-echo "configure:5332: checking for shadow password headers" >&5
+echo "configure:5328: checking for shadow password headers" >&5
d=$with_shadow/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for shadow password libs""... $ac_c" 1>&6
-echo "configure:5342: checking for shadow password libs" >&5
+echo "configure:5338: checking for shadow password libs" >&5
d=$with_shadow/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
if test "$with_shadow" = yes ; then
echo $ac_n "checking for Sun-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5380: checking for Sun-style shadow passwords" >&5
+echo "configure:5376: 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 5391 "configure"
+#line 5387 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pwa_passwd;
; return 0; }
EOF
-if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_sun_adjunct=yes
else
if test "$with_shadow" = yes ; then
echo $ac_n "checking for DEC-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5434: checking for DEC-style shadow passwords" >&5
+echo "configure:5430: 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 5445 "configure"
+#line 5441 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
pw = p->ufld.fd_encrypt;
; return 0; }
EOF
-if { (eval echo configure:5462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_enhanced_passwd=yes
else
# But on DEC, it's in -lsecurity.
#
echo $ac_n "checking for getprpwnam in -lprot""... $ac_c" 1>&6
-echo "configure:5486: checking for getprpwnam in -lprot" >&5
+echo "configure:5482: 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 5494 "configure"
+#line 5490 "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:5505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6
-echo "configure:5524: checking for getprpwnam in -lsecurity" >&5
+echo "configure:5520: 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 5532 "configure"
+#line 5528 "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:5543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_shadow" = yes ; then
echo $ac_n "checking for HP-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5576: checking for HP-style shadow passwords" >&5
+echo "configure:5572: 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 5587 "configure"
+#line 5583 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->pw_passwd;
; return 0; }
EOF
-if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5596: \"$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:5621: checking for bigcrypt in -lsec" >&5
+echo "configure:5617: 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 5629 "configure"
+#line 5625 "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:5640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$with_shadow" = yes ; then
echo $ac_n "checking for FreeBSD-style shadow passwords""... $ac_c" 1>&6
-echo "configure:5678: 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
if test "$with_shadow" = yes ; then
echo $ac_n "checking for generic shadow passwords""... $ac_c" 1>&6
-echo "configure:5704: checking for generic shadow passwords" >&5
+echo "configure:5700: 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 5715 "configure"
+#line 5711 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <unistd.h>
const char *pw = p->sp_pwdp;
; return 0; }
EOF
-if { (eval echo configure:5727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5723: \"$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:5748: checking for getspnam in -lc" >&5
+echo "configure:5744: 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 5756 "configure"
+#line 5752 "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:5767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:5789: checking for getspnam in -lgen" >&5
+echo "configure:5785: 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 5797 "configure"
+#line 5793 "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:5808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
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:5844: checking for crypt in -lc" >&5
+echo "configure:5840: 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 5852 "configure"
+#line 5848 "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:5863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:5885: checking for crypt in -lcrypt" >&5
+echo "configure:5881: 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 5893 "configure"
+#line 5889 "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:5904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for Motif headers""... $ac_c" 1>&6
-echo "configure:5988: checking for Motif headers" >&5
+echo "configure:5984: checking for Motif headers" >&5
d=$with_motif/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Motif libs""... $ac_c" 1>&6
-echo "configure:5998: checking for Motif libs" >&5
+echo "configure:5994: checking for Motif libs" >&5
d=$with_motif/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:6037: checking for Xm/Xm.h" >&5
+echo "configure:6033: 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 6042 "configure"
+#line 6038 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6043: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
fi
+if test "$have_motif" = yes; then
+
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ if test \! -z "$includedir" ; then
+ CPPFLAGS="$CPPFLAGS -I$includedir"
+ fi
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+ ac_safe=`echo "Xm/ComboBox.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xm/ComboBox.h""... $ac_c" 1>&6
+echo "configure:6082: checking for Xm/ComboBox.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 6087 "configure"
+#include "confdefs.h"
+#include <Xm/ComboBox.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=yes"
+else
+ echo "$ac_err" >&5
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ cat >> confdefs.h <<\EOF
+#define HAVE_XMCOMBOBOX 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ CPPFLAGS="$ac_save_CPPFLAGS"
+fi
+
+
###############################################################################
#
# Check for -lgtk.
/*)
echo $ac_n "checking for Gtk headers""... $ac_c" 1>&6
-echo "configure:6112: checking for Gtk headers" >&5
+echo "configure:6155: checking for Gtk headers" >&5
d=$with_gtk/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
-echo "configure:6122: checking for Gtk libs" >&5
+echo "configure:6165: checking for Gtk libs" >&5
d=$with_gtk/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
# 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:6171: checking for $ac_word" >&5
+echo "configure:6214: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_glib_config'+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:6211: checking for $ac_word" >&5
+echo "configure:6254: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_gtk_config'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
if test "$have_gtk" = yes; then
echo $ac_n "checking Gtk version number""... $ac_c" 1>&6
-echo "configure:6252: checking Gtk version number" >&5
+echo "configure:6295: checking Gtk version number" >&5
if eval "test \"`echo '$''{'ac_cv_gtk_version_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
if test "$have_gtk" = yes; then
echo $ac_n "checking for Gtk includes""... $ac_c" 1>&6
-echo "configure:6279: checking for Gtk includes" >&5
+echo "configure:6322: checking for Gtk includes" >&5
if eval "test \"`echo '$''{'ac_cv_gtk_config_cflags'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$ac_cv_gtk_config_cflags" 1>&6
echo $ac_n "checking for Gtk libs""... $ac_c" 1>&6
-echo "configure:6288: checking for Gtk libs" >&5
+echo "configure:6331: checking for Gtk libs" >&5
if eval "test \"`echo '$''{'ac_cv_gtk_config_libs'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
-###############################################################################
-#
-# Check for -lXaw and -lXaw3d.
-#
-###############################################################################
-
-have_athena=no
-have_athena3d=no
-with_athena_req=unspecified
-# Check whether --with-athena or --without-athena was given.
-if test "${with_athena+set}" = set; then
- withval="$with_athena"
- with_athena="$withval"; with_athena_req="$withval"
-else
- with_athena=yes
-fi
-
-
-
- case "$with_athena" in
- yes) ;;
- no) ;;
-
- /*)
- echo $ac_n "checking for Athena headers""... $ac_c" 1>&6
-echo "configure:6331: checking for Athena headers" >&5
- d=$with_athena/include
- if test -d $d; then
- X_CFLAGS="-I$d $X_CFLAGS"
- echo "$ac_t""$d" 1>&6
- else
- echo "$ac_t""not found ($d: no such directory)" 1>&6
- fi
-
- echo $ac_n "checking for Athena libs""... $ac_c" 1>&6
-echo "configure:6341: checking for Athena libs" >&5
- d=$with_athena/lib
- if test -d $d; then
- X_LIBS="-L$d $X_LIBS"
- echo "$ac_t""$d" 1>&6
- else
- echo "$ac_t""not found ($d: no such directory)" 1>&6
- fi
-
- # replace the directory string with "yes".
- with_athena_req="yes"
- with_athena=$with_athena_req
- ;;
-
- *)
- echo ""
- echo "error: argument to --with-athena must be \"yes\", \"no\", or a directory."
- echo " If it is a directory, then \`DIR/include' will be added to"
- echo " the -I list, and \`DIR/lib' will be added to the -L list."
- exit 1
- ;;
- esac
-
-
-
-if test "$with_athena" != yes -a "$with_athena" != no ; then
- echo "error: must be yes or no: --with-athena=$with_athena"
- exit 1
-fi
-
-
-if test "$with_athena" = yes; then
- have_athena=no
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- 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:6382: 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 6387 "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:6392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
-if test -z "$ac_err"; then
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
-else
- echo "$ac_err" >&5
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- have_athena=yes
-else
- echo "$ac_t""no" 1>&6
-fi
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- if test "$have_athena" = yes; then
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- ac_save_LDFLAGS="$LDFLAGS"
-# ac_save_LIBS="$LIBS"
-
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- # note: $X_CFLAGS includes $x_includes
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
-
- if test \! -z "$libdir" ; then
- LDFLAGS="$LDFLAGS -L$libdir"
- fi
- # note: $X_LIBS includes $x_libraries
- LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
-
- echo $ac_n "checking for Xaw3dComputeTopShadowRGB in -lXaw3d""... $ac_c" 1>&6
-echo "configure:6433: 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
-else
- ac_save_LIBS="$LIBS"
-LIBS="-lXaw3d -lXt -lXmu -lXext -lX11 $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 6441 "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
- builtin and then its argument prototype would still apply. */
-char Xaw3dComputeTopShadowRGB();
-
-int main() {
-Xaw3dComputeTopShadowRGB()
-; return 0; }
-EOF
-if { (eval echo configure:6452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- have_athena=yes; have_athena3d=yes
-else
- echo "$ac_t""no" 1>&6
-true
-fi
-
- CPPFLAGS="$ac_save_CPPFLAGS"
- LDFLAGS="$ac_save_LDFLAGS"
-# LIBS="$ac_save_LIBS"
-
- fi
-fi
-
-if test "$have_athena" = yes; then
- cat >> confdefs.h <<\EOF
-#define HAVE_ATHENA 1
-EOF
-
- ATHENA_LIBS="-lXaw $ATHENA_LIBS"
-fi
-
-if test "$have_athena3d" = yes; then
- ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
-fi
-
-
-# If we have Athena, check whether it's a version that includes
-# 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:6497: 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
- ac_cv_have_XawViewportSetCoordinates=no
-
- ac_save_CPPFLAGS="$CPPFLAGS"
- if test \! -z "$includedir" ; then
- CPPFLAGS="$CPPFLAGS -I$includedir"
- fi
- CPPFLAGS="$CPPFLAGS $X_CFLAGS"
- cat > conftest.$ac_ext <<EOF
-#line 6509 "configure"
-#include "confdefs.h"
-#include <X11/Xaw/Viewport.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "XawViewportSetCoordinates" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_have_XawViewportSetCoordinates=yes
-fi
-rm -f conftest*
-
- CPPFLAGS="$ac_save_CPPFLAGS"
-fi
-
-echo "$ac_t""$ac_cv_have_XawViewportSetCoordinates" 1>&6
- if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
- cat >> confdefs.h <<\EOF
-#define HAVE_XawViewportSetCoordinates 1
-EOF
-
- fi
-fi
-
-
###############################################################################
#
# Checking whether Motif is really Lesstif.
have_lesstif=no
if test "$have_motif" = yes ; then
echo $ac_n "checking whether Motif is really LessTif""... $ac_c" 1>&6
-echo "configure:6542: checking whether Motif is really LessTif" >&5
+echo "configure:6358: 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 6553 "configure"
+#line 6369 "configure"
#include "confdefs.h"
#include <Xm/Xm.h>
int main() {
long vers = LesstifVersion;
; return 0; }
EOF
-if { (eval echo configure:6560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_have_lesstif=yes
else
ltv=unknown
echo unknown > conftest-lt
echo $ac_n "checking LessTif version number""... $ac_c" 1>&6
-echo "configure:6585: checking LessTif version number" >&5
+echo "configure:6401: checking LessTif version number" >&5
if eval "test \"`echo '$''{'ac_cv_lesstif_version_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_lesstif_version_string=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6600 "configure"
+#line 6416 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <Xm/Xm.h>
exit(0);
}
EOF
-if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ltv=`cat conftest-lt`
ac_cv_lesstif_version=`echo $ltv | sed 's/ .*//'`
mtv=unknown
echo unknown > conftest-mt
echo $ac_n "checking Motif version number""... $ac_c" 1>&6
-echo "configure:6643: checking Motif version number" >&5
+echo "configure:6459: checking Motif version number" >&5
if eval "test \"`echo '$''{'ac_cv_motif_version_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_motif_version_string=unknown
else
cat > conftest.$ac_ext <<EOF
-#line 6658 "configure"
+#line 6474 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <Xm/Xm.h>
exit(0);
}
EOF
-if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
mtv=`cat conftest-mt`
ac_cv_motif_version=`echo $mtv | sed 's/ .*//'`
motif_requires_xpm=no
if test "$have_motif" = yes ; then
echo $ac_n "checking whether Motif requires XPM""... $ac_c" 1>&6
-echo "configure:6715: checking whether Motif requires XPM" >&5
+echo "configure:6531: checking whether Motif requires XPM" >&5
if test "$motif_version" = "unknown" || test "$motif_version" -ge 2000
then
motif_requires_xpm=yes
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XpQueryExtension in -lXp""... $ac_c" 1>&6
-echo "configure:6757: checking for XpQueryExtension in -lXp" >&5
+echo "configure:6573: 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 6765 "configure"
+#line 6581 "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:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for _Xsetlocale in -lXintl""... $ac_c" 1>&6
-echo "configure:6830: checking for _Xsetlocale in -lXintl" >&5
+echo "configure:6646: checking for _Xsetlocale in -lXintl" >&5
ac_lib_var=`echo Xintl'_'_Xsetlocale | 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="-lXintl -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6838 "configure"
+#line 6654 "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
_Xsetlocale()
; return 0; }
EOF
-if { (eval echo configure:6849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for GL headers""... $ac_c" 1>&6
-echo "configure:6906: checking for GL headers" >&5
+echo "configure:6722: checking for GL headers" >&5
d=$with_gl/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for GL libs""... $ac_c" 1>&6
-echo "configure:6916: checking for GL libs" >&5
+echo "configure:6732: checking for GL libs" >&5
d=$with_gl/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:6952: checking for GL/gl.h" >&5
+echo "configure:6768: 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 6957 "configure"
+#line 6773 "configure"
#include "confdefs.h"
#include <GL/gl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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:6993: checking for GL/glx.h" >&5
+echo "configure:6809: 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 6998 "configure"
+#line 6814 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
# to link against.
#
echo $ac_n "checking whether GL is really MesaGL""... $ac_c" 1>&6
-echo "configure:7035: checking whether GL is really MesaGL" >&5
+echo "configure:6851: checking whether GL is really MesaGL" >&5
if eval "test \"`echo '$''{'ac_cv_have_mesa_gl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
cat > conftest.$ac_ext <<EOF
-#line 7047 "configure"
+#line 6863 "configure"
#include "confdefs.h"
#include <GL/glx.h>
EOF
#
if test "$ac_have_mesa_gl" = yes; then
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:7076: checking for pthread_create in -lpthread" >&5
+echo "configure:6892: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | 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="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7084 "configure"
+#line 6900 "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
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:7095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for glXCreateContext in -lMesaGL""... $ac_c" 1>&6
-echo "configure:7142: checking for glXCreateContext in -lMesaGL" >&5
+echo "configure:6958: checking for glXCreateContext in -lMesaGL" >&5
ac_lib_var=`echo MesaGL'_'glXCreateContext | 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="-lMesaGL -lMesaGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7150 "configure"
+#line 6966 "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
glXCreateContext()
; return 0; }
EOF
-if { (eval echo configure:7161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for glXCreateContext in -lGL""... $ac_c" 1>&6
-echo "configure:7207: checking for glXCreateContext in -lGL" >&5
+echo "configure:7023: checking for glXCreateContext in -lGL" >&5
ac_lib_var=`echo GL'_'glXCreateContext | 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="-lGL -lGLU $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7215 "configure"
+#line 7031 "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
glXCreateContext()
; return 0; }
EOF
-if { (eval echo configure:7226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
if test "$ac_have_mesa_gl" = yes; then
echo $ac_n "checking MesaGL version number""... $ac_c" 1>&6
-echo "configure:7284: checking MesaGL version number" >&5
+echo "configure:7100: checking MesaGL version number" >&5
if eval "test \"`echo '$''{'ac_cv_mesagl_version_string'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7289 "configure"
+#line 7105 "configure"
#include "confdefs.h"
#include <GL/gl.h>
configure: MESA_MAJOR_VERSION MESA_MINOR_VERSION
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for glBindTexture in -l$gl_lib_1""... $ac_c" 1>&6
-echo "configure:7355: checking for glBindTexture in -l$gl_lib_1" >&5
+echo "configure:7171: checking for glBindTexture in -l$gl_lib_1" >&5
ac_lib_var=`echo $gl_lib_1'_'glBindTexture | 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="-l$gl_lib_1 $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7363 "configure"
+#line 7179 "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
glBindTexture()
; return 0; }
EOF
-if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
# See comments in utils/visual-gl.c for why this is sometimes necessary.
#
echo $ac_n "checking whether drastic GL measures must be taken""... $ac_c" 1>&6
-echo "configure:7408: checking whether drastic GL measures must be taken" >&5
+echo "configure:7224: checking whether drastic GL measures must be taken" >&5
case "$host" in
*-sgi*)
echo "$ac_t""yes -- hello, SGI." 1>&6
/*)
echo $ac_n "checking for GLE headers""... $ac_c" 1>&6
-echo "configure:7461: checking for GLE headers" >&5
+echo "configure:7277: checking for GLE headers" >&5
d=$with_gle/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for GLE libs""... $ac_c" 1>&6
-echo "configure:7471: checking for GLE libs" >&5
+echo "configure:7287: checking for GLE libs" >&5
d=$with_gle/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "GL/gutil.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for GL/gutil.h""... $ac_c" 1>&6
-echo "configure:7507: checking for GL/gutil.h" >&5
+echo "configure:7323: checking for GL/gutil.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 7512 "configure"
+#line 7328 "configure"
#include "confdefs.h"
#include <GL/gutil.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "GL/tube.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for GL/tube.h""... $ac_c" 1>&6
-echo "configure:7548: checking for GL/tube.h" >&5
+echo "configure:7364: checking for GL/tube.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 7553 "configure"
+#line 7369 "configure"
#include "confdefs.h"
#include <GL/tube.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for gleCreateGC in -lgle""... $ac_c" 1>&6
-echo "configure:7603: checking for gleCreateGC in -lgle" >&5
+echo "configure:7419: checking for gleCreateGC in -lgle" >&5
ac_lib_var=`echo gle'_'gleCreateGC | 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="-lgle $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7611 "configure"
+#line 7427 "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
gleCreateGC()
; return 0; }
EOF
-if { (eval echo configure:7622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"
+ have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"
else
echo "$ac_t""no" 1>&6
fi
if test "$have_gle" = yes ; then
have_gle=no
gle_halfassed=yes
-
+
+ # sometimes the libmatrix stuff is included in libgle. look there first.
+#
+# I don't get it. For some reason, this test passes on SGI, as if
+# uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
+# Yet the link is succeeding. Why???
+#
+# AC_CHECK_X_LIB(gle, uview_direction_d,
+# [have_gle=yes; gle_halfassed=no],
+# [], $GL_LIBS -lX11 -lXext -lm)
+
+ # if it wasn't in libgle, then look in libmatrix.
+ if test "$have_gle" = no ; then
+
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LDFLAGS="$LDFLAGS"
# ac_save_LIBS="$LIBS"
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for uview_direction_d in -lmatrix""... $ac_c" 1>&6
-echo "configure:7668: checking for uview_direction_d in -lmatrix" >&5
+echo "configure:7497: checking for uview_direction_d in -lmatrix" >&5
ac_lib_var=`echo matrix'_'uview_direction_d | 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="-lmatrix $GL_LIBS -lX11 -lXext -lm $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7676 "configure"
+#line 7505 "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
uview_direction_d()
; return 0; }
EOF
-if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- have_gle=yes; gle_halfassed=no,
- GLE_LIBS="$GLE_LIBS -lmatrix"
+ have_gle=yes; gle_halfassed=no;
+ GLE_LIBS="$GLE_LIBS -lmatrix"
else
echo "$ac_t""no" 1>&6
fi
LDFLAGS="$ac_save_LDFLAGS"
# LIBS="$ac_save_LIBS"
+ fi
fi
if test "$have_gle" = yes ; then
/*)
echo $ac_n "checking for XPM headers""... $ac_c" 1>&6
-echo "configure:7753: checking for XPM headers" >&5
+echo "configure:7583: checking for XPM headers" >&5
d=$with_xpm/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XPM libs""... $ac_c" 1>&6
-echo "configure:7763: checking for XPM libs" >&5
+echo "configure:7593: checking for XPM libs" >&5
d=$with_xpm/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:7796: checking for X11/xpm.h" >&5
+echo "configure:7626: 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 7801 "configure"
+#line 7631 "configure"
#include "confdefs.h"
#include <X11/xpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for XSHM headers""... $ac_c" 1>&6
-echo "configure:7872: checking for XSHM headers" >&5
+echo "configure:7702: checking for XSHM headers" >&5
d=$with_xshm/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XSHM libs""... $ac_c" 1>&6
-echo "configure:7882: checking for XSHM libs" >&5
+echo "configure:7712: checking for XSHM libs" >&5
d=$with_xshm/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:7917: checking for X11/extensions/XShm.h" >&5
+echo "configure:7747: 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 7922 "configure"
+#line 7752 "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:7927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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:7961: checking for sys/ipc.h" >&5
+echo "configure:7791: 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 7966 "configure"
+#line 7796 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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:8006: checking for sys/shm.h" >&5
+echo "configure:7836: 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 8011 "configure"
+#line 7841 "configure"
#include "confdefs.h"
#include <sys/shm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
LDFLAGS="$LDFLAGS $X_LIBS $X_EXTRA_LIBS"
echo $ac_n "checking for XShmQueryExtension in -lXextSam""... $ac_c" 1>&6
-echo "configure:8068: checking for XShmQueryExtension in -lXextSam" >&5
+echo "configure:7898: 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 8076 "configure"
+#line 7906 "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:8087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
/*)
echo $ac_n "checking for DOUBLE-BUFFER headers""... $ac_c" 1>&6
-echo "configure:8154: checking for DOUBLE-BUFFER headers" >&5
+echo "configure:7984: checking for DOUBLE-BUFFER headers" >&5
d=$with_xdbe/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for DOUBLE-BUFFER libs""... $ac_c" 1>&6
-echo "configure:8164: checking for DOUBLE-BUFFER libs" >&5
+echo "configure:7994: checking for DOUBLE-BUFFER libs" >&5
d=$with_xdbe/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
ac_safe=`echo "X11/extensions/Xdbe.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/Xdbe.h""... $ac_c" 1>&6
-echo "configure:8198: checking for X11/extensions/Xdbe.h" >&5
+echo "configure:8028: checking for X11/extensions/Xdbe.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 8203 "configure"
+#line 8033 "configure"
#include "confdefs.h"
#include <X11/extensions/Xdbe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for XReadDisplay headers""... $ac_c" 1>&6
-echo "configure:8271: checking for XReadDisplay headers" >&5
+echo "configure:8101: checking for XReadDisplay headers" >&5
d=$with_readdisplay/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for XReadDisplay libs""... $ac_c" 1>&6
-echo "configure:8281: checking for XReadDisplay libs" >&5
+echo "configure:8111: checking for XReadDisplay libs" >&5
d=$with_readdisplay/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:8314: checking for X11/extensions/readdisplay.h" >&5
+echo "configure:8144: 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 8319 "configure"
+#line 8149 "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:8324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
/*)
echo $ac_n "checking for Iris Video headers""... $ac_c" 1>&6
-echo "configure:8379: checking for Iris Video headers" >&5
+echo "configure:8209: checking for Iris Video headers" >&5
d=$with_sgivideo/include
if test -d $d; then
X_CFLAGS="-I$d $X_CFLAGS"
fi
echo $ac_n "checking for Iris Video libs""... $ac_c" 1>&6
-echo "configure:8389: checking for Iris Video libs" >&5
+echo "configure:8219: checking for Iris Video libs" >&5
d=$with_sgivideo/lib
if test -d $d; then
X_LIBS="-L$d $X_LIBS"
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:8422: checking for dmedia/vl.h" >&5
+echo "configure:8252: 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 8427 "configure"
+#line 8257 "configure"
#include "confdefs.h"
#include <dmedia/vl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
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:8457: checking for vlOpenVideo in -lvl" >&5
+echo "configure:8287: 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 8465 "configure"
+#line 8295 "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:8476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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:8547: checking for $with_zippy_req" >&5
+echo "configure:8377: 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:8561: checking for $ac_word" >&5
+echo "configure:8391: 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:8611: checking for $ac_word" >&5
+echo "configure:8441: 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:8645: checking for $ac_word" >&5
+echo "configure:8475: 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:8680: checking for emacs yow" >&5
+echo "configure:8510: 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:8702: checking for xemacs yow" >&5
+echo "configure:8532: 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:8761: checking for $ac_word" >&5
+echo "configure:8591: 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:8797: checking for $ac_word" >&5
+echo "configure:8627: 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
fi
-DEMO_MAN="xscreensaver-demo-old.man"
ALL_DEMO_PROGRAMS=
-if test "$have_athena" = yes; then
- PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
- ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
-if test "$have_athena3d" = yes; then
- PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
- ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
if test "$have_motif" = yes; then
PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
if test "$have_gtk" = yes; then
PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
- DEMO_MAN="xscreensaver-demo.man"
fi
-
-
-
s%@INCLUDES@%$INCLUDES%g
s%@PREFERRED_DEMO_PROGRAM@%$PREFERRED_DEMO_PROGRAM%g
s%@ALL_DEMO_PROGRAMS@%$ALL_DEMO_PROGRAMS%g
-s%@DEMO_MAN@%$DEMO_MAN%g
s%@SAVER_LIBS@%$SAVER_LIBS%g
s%@MOTIF_LIBS@%$MOTIF_LIBS%g
s%@GTK_LIBS@%$GTK_LIBS%g
-s%@ATHENA_LIBS@%$ATHENA_LIBS%g
-s%@ATHENA3D_LIBS@%$ATHENA3D_LIBS%g
s%@HACK_LIBS@%$HACK_LIBS%g
s%@XPM_LIBS@%$XPM_LIBS%g
s%@GL_LIBS@%$GL_LIBS%g
fi
-if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
- warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
+if test "$have_motif" = no -a "$have_gtk" = no; then
+ warnL "Neither Motif nor Gtk seem to be available;"
warn2 "the \`xscreensaver-demo' program requires one of these."
elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
warnL "Use of Motif was requested, but it wasn't found;"
- if test "$have_gtk" = yes; then
- warn2 "Gtk will be used instead."
- else
- warn2 "Athena will be used instead."
- fi
+ warn2 "Gtk will be used instead."
elif test "$jurassic_gtk" = yes ; then
warnL "Gtk was found on this system, but it is version $v;"
fi
- if test "$have_motif" = yes; then
- which="Motif"
- else
- which="Athena"
- fi
-
- warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
+ warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
warnL "Use of Gtk was requested, but it wasn't found;"
- if test "$have_motif" = yes; then
- warn2 "Motif will be used instead."
- else
- warn2 "Athena will be used instead."
- fi
+ warn2 "Motif will be used instead."
-elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
- warnL "Use of Athena was requested, but it wasn't found;"
- if test "$have_gtk" = yes; then
- warn2 "Gtk will be used instead."
- else
- warn2 "Motif will be used instead."
- fi
fi
fi
fi
-if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
- warnL "Athena widgets are being used instead of Motif or Gtk."
- warn2 "The \`xscreensaver-demo' program looks much better"
- warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
- warn2 "Motif is shipped by every commercial Unix vendor,"
- warn2 "and there is a free implementation available as"
- warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
- warn2 "with most Linux and BSD distributions."
-fi
if test "$have_xpm" = no ; then
HACK_LIBS="-lXmu $HACK_LIBS"
MOTIF_LIBS="-lXmu $MOTIF_LIBS"
GTK_LIBS="-lXmu $GTK_LIBS"
- ATHENA_LIBS="-lXmu $ATHENA_LIBS"
- ATHENA3D_LIBS="-lXmu $ATHENA3D_LIBS"
AC_DEFINE(HAVE_XMU)
fi
fi
+if test "$have_motif" = yes; then
+ AC_CHECK_X_HEADER(Xm/ComboBox.h, [AC_DEFINE(HAVE_XMCOMBOBOX)])
+fi
+
+
###############################################################################
#
# Check for -lgtk.
fi
-###############################################################################
-#
-# Check for -lXaw and -lXaw3d.
-#
-###############################################################################
-
-have_athena=no
-have_athena3d=no
-with_athena_req=unspecified
-AC_ARG_WITH(athena,
-[ --with-athena Use the Athena toolkit for the user interface.],
- [with_athena="$withval"; with_athena_req="$withval"],[with_athena=yes])
-
-HANDLE_X_PATH_ARG(with_athena, --with-athena, Athena)
-
-
-if test "$with_athena" != yes -a "$with_athena" != no ; then
- echo "error: must be yes or no: --with-athena=$with_athena"
- exit 1
-fi
-
-
-if test "$with_athena" = yes; then
- have_athena=no
- AC_CHECK_X_HEADER(X11/Xaw/Dialog.h, [have_athena=yes])
- if test "$have_athena" = yes; then
- AC_CHECK_X_LIB(Xaw3d, Xaw3dComputeTopShadowRGB,
- [have_athena=yes; have_athena3d=yes], [true],
- -lXt -lXmu -lXext -lX11)
- fi
-fi
-
-if test "$have_athena" = yes; then
- AC_DEFINE(HAVE_ATHENA)
- ATHENA_LIBS="-lXaw $ATHENA_LIBS"
-fi
-
-if test "$have_athena3d" = yes; then
- ATHENA3D_LIBS="-lXaw3d $ATHENA3D_LIBS"
-fi
-
-
-# If we have Athena, check whether it's a version that includes
-# XawViewportSetCoordinates in Viewport.h (R3 (or R4?) don't.)
-if test "$have_athena" = yes ; then
- AC_CACHE_CHECK([for XawViewportSetCoordinates in Viewport.h],
- ac_cv_have_XawViewportSetCoordinates,
- [ac_cv_have_XawViewportSetCoordinates=no
- AC_EGREP_X_HEADER(XawViewportSetCoordinates,
- X11/Xaw/Viewport.h,
- ac_cv_have_XawViewportSetCoordinates=yes)])
- if test "$ac_cv_have_XawViewportSetCoordinates" = yes ; then
- AC_DEFINE(HAVE_XawViewportSetCoordinates)
- fi
-fi
-
-
###############################################################################
#
# Checking whether Motif is really Lesstif.
have_gle=no
gle_halfassed=yes
AC_CHECK_X_LIB(gle, gleCreateGC,
- [have_gle=yes; gle_halfassed=no, GLE_LIBS="-lgle"],
+ [have_gle=yes; gle_halfassed=no; GLE_LIBS="-lgle"],
[], $GL_LIBS -lX11 -lXext -lm)
fi
if test "$have_gle" = yes ; then
have_gle=no
gle_halfassed=yes
- AC_CHECK_X_LIB(matrix, uview_direction_d,
- [have_gle=yes; gle_halfassed=no,
- GLE_LIBS="$GLE_LIBS -lmatrix"],
- [], $GL_LIBS -lX11 -lXext -lm)
+
+ # sometimes the libmatrix stuff is included in libgle. look there first.
+#
+# I don't get it. For some reason, this test passes on SGI, as if
+# uview_direction_d() was in libgle -- but it's not, it's in libmatrix.
+# Yet the link is succeeding. Why???
+#
+# AC_CHECK_X_LIB(gle, uview_direction_d,
+# [have_gle=yes; gle_halfassed=no],
+# [], $GL_LIBS -lX11 -lXext -lm)
+
+ # if it wasn't in libgle, then look in libmatrix.
+ if test "$have_gle" = no ; then
+ AC_CHECK_X_LIB(matrix, uview_direction_d,
+ [have_gle=yes; gle_halfassed=no;
+ GLE_LIBS="$GLE_LIBS -lmatrix"],
+ [], $GL_LIBS -lX11 -lXext -lm)
+ fi
fi
if test "$have_gle" = yes ; then
fi
-DEMO_MAN="xscreensaver-demo-old.man"
ALL_DEMO_PROGRAMS=
-if test "$have_athena" = yes; then
- PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw
- ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
-if test "$have_athena3d" = yes; then
- PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xaw3d
- ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
-fi
if test "$have_motif" = yes; then
PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Xm
ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
if test "$have_gtk" = yes; then
PREFERRED_DEMO_PROGRAM=xscreensaver-demo-Gtk
ALL_DEMO_PROGRAMS="$PREFERRED_DEMO_PROGRAM $ALL_DEMO_PROGRAMS"
- DEMO_MAN="xscreensaver-demo.man"
fi
AC_SUBST(PREFERRED_DEMO_PROGRAM)
AC_SUBST(ALL_DEMO_PROGRAMS)
-AC_SUBST(DEMO_MAN)
AC_SUBST(SAVER_LIBS)
AC_SUBST(MOTIF_LIBS)
AC_SUBST(GTK_LIBS)
-AC_SUBST(ATHENA_LIBS)
-AC_SUBST(ATHENA3D_LIBS)
AC_SUBST(HACK_LIBS)
AC_SUBST(XPM_LIBS)
AC_SUBST(GL_LIBS)
fi
-if test "$have_motif" = no -a "$have_gtk" = no -a "$have_athena" = no ; then
- warnL "None of Motif, Gtk, or Athena widgets seem to be available;"
+if test "$have_motif" = no -a "$have_gtk" = no; then
+ warnL "Neither Motif nor Gtk seem to be available;"
warn2 "the \`xscreensaver-demo' program requires one of these."
elif test "$with_motif_req" = yes -a "$have_motif" = no ; then
warnL "Use of Motif was requested, but it wasn't found;"
- if test "$have_gtk" = yes; then
- warn2 "Gtk will be used instead."
- else
- warn2 "Athena will be used instead."
- fi
+ warn2 "Gtk will be used instead."
elif test "$jurassic_gtk" = yes ; then
warnL "Gtk was found on this system, but it is version $v;"
fi
- if test "$have_motif" = yes; then
- which="Motif"
- else
- which="Athena"
- fi
-
- warn2 "Gtk $pref_gtk or newer is required. $which will be used instead."
+ warn2 "Gtk $pref_gtk or newer is required. Motif will be used instead."
elif test "$with_gtk_req" = yes -a "$have_gtk" = no ; then
warnL "Use of Gtk was requested, but it wasn't found;"
- if test "$have_motif" = yes; then
- warn2 "Motif will be used instead."
- else
- warn2 "Athena will be used instead."
- fi
+ warn2 "Motif will be used instead."
-elif test "$with_athena_req" = yes -a "$have_athena" = no ; then
- warnL "Use of Athena was requested, but it wasn't found;"
- if test "$have_gtk" = yes; then
- warn2 "Gtk will be used instead."
- else
- warn2 "Motif will be used instead."
- fi
fi
fi
fi
-if test "$have_athena" = yes -a "$have_motif" = no -a "$have_gtk" = no; then
- warnL "Athena widgets are being used instead of Motif or Gtk."
- warn2 "The \`xscreensaver-demo' program looks much better"
- warn2 "with Motif or Gtk. Wouldn't you rather be using Motif?"
- warn2 "Motif is shipped by every commercial Unix vendor,"
- warn2 "and there is a free implementation available as"
- warn2 "well: see <http://www.lesstif.org/>. Gtk is shipped"
- warn2 "with most Linux and BSD distributions."
-fi
if test "$have_xpm" = no ; then
INCLUDES = -I. -I$(srcdir) -I$(UTILS_SRC) -I.. @INCLUDES@
-MOTIF_SRCS = dialogs-Xm.c
-MOTIF_OBJS = dialogs-Xm.o
+MOTIF_SRCS = demo-Xm.c demo-Xm-widgets.c
+MOTIF_OBJS = demo-Xm.o demo-Xm-widgets.o
GTK_SRCS = demo-Gtk.c demo-Gtk-widgets.c
GTK_OBJS = demo-Gtk.o demo-Gtk-widgets.o
-ATHENA_SRCS = dialogs-Xaw.c
-ATHENA_OBJS = dialogs-Xaw.o
-
PWENT_SRCS = passwd-pwent.c
PWENT_OBJS = passwd-pwent.o
TEST_SRCS = test-passwd.c test-uid.c test-xdpms.c test-grab.c \
test-apm.c xdpyinfo.c
-MOTIF_LIBS = @MOTIF_LIBS@
+MOTIF_LIBS = @MOTIF_LIBS@ @XPM_LIBS@
GTK_LIBS = @GTK_LIBS@
-ATHENA_LIBS = @ATHENA_LIBS@
-ATHENA3D_LIBS = @ATHENA3D_LIBS@
PASSWD_SRCS = @PASSWD_SRCS@
PASSWD_OBJS = @PASSWD_OBJS@
CMD_SRCS = remote.c xscreensaver-command.c
CMD_OBJS = remote.o xscreensaver-command.o
-DEMO_SRCS_1 = prefs.c demo.c $(XMU_SRCS)
-DEMO_OBJS_1 = prefs.o demo-Xm.o demo-Xaw.o $(XMU_OBJS)
+DEMO_SRCS_1 = prefs.c $(XMU_SRCS)
+DEMO_OBJS_1 = prefs.o $(XMU_OBJS)
-DEMO_SRCS = prefs.c remote.c $(DEMO_UTIL_SRCS) demo.c
+DEMO_SRCS = prefs.c remote.c $(DEMO_UTIL_SRCS)
DEMO_OBJS = prefs.o remote.o $(DEMO_UTIL_OBJS)
SAVER_LIBS = $(LIBS) $(X_LIBS) @SAVER_LIBS@ $(GL_LIBS) \
HDRS = XScreenSaver_ad.h xscreensaver.h prefs.h remote.h \
demo-Gtk-widgets.h demo-Gtk-stubs.h
-MEN = xscreensaver.man @DEMO_MAN@ \
+MEN = xscreensaver.man xscreensaver-demo.man \
xscreensaver-command.man
ALL_MEN = xscreensaver.man \
- xscreensaver-demo.man xscreensaver-demo-old.man \
- xscreensaver-command.man
+ xscreensaver-demo.man xscreensaver-command.man
EXTRAS = README Makefile.in XScreenSaver.ad.in xscreensaver.pam \
xscreensaver.kss xscreensaver-demo.glade .gdbinit
VMSFILES = compile_axp.com compile_decc.com link_axp.com link_decc.com \
vms_axp.opt vms_axp_12.opt vms_decc.opt vms_decc_12.opt
TARFILES = $(EXTRAS) $(VMSFILES) $(SAVER_SRCS_1) \
- $(MOTIF_SRCS) $(GTK_SRCS) $(ATHENA_SRCS) $(PWENT_SRCS) \
+ $(MOTIF_SRCS) $(GTK_SRCS) $(PWENT_SRCS) \
$(KERBEROS_SRCS) $(PAM_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) \
$(CMD_SRCS) $(HDRS) $(TEST_SRCS) $(ALL_MEN)
fi ; \
for man in $$men; do \
instname=`echo $$man | sed 's/\.man$$/\.$(mansuffix)/'` ; \
- instname=`echo $$instname | sed 's/-old//'` ; \
echo $(INSTALL_DATA) $(srcdir)/$$man \
$(install_prefix)$(man1dir)/$$instname ; \
$(INSTALL_DATA) $(srcdir)/$$man \
$(DEPEND) -w 0 -f - \
-s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
$(INCLUDES) $(DEFS) $(DEPEND_DEFINES) $(CFLAGS) $(X_CFLAGS) -- \
- $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) $(ATHENA_SRCS) \
+ $(SAVER_SRCS_1) $(MOTIF_SRCS) $(GTK_SRCS) \
$(PWENT_SRCS) $(LOCK_SRCS_1) $(DEMO_SRCS_1) $(CMD_SRCS) \
$(TEST_SRCS) | \
( \
xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@
cp -p @PREFERRED_DEMO_PROGRAM@ $@
-xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS) demo-Xm.o
- $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) demo-Xm.o \
- $(LIBS) $(X_LIBS) \
+xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \
$(MOTIF_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
xscreensaver-demo-Gtk: $(DEMO_OBJS) $(GTK_OBJS)
$(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(GTK_OBJS) $(LIBS) $(X_LIBS) \
$(GTK_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-xscreensaver-demo-Xaw: $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o
- $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o \
- $(LIBS) $(X_LIBS) \
- $(ATHENA_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-
-xscreensaver-demo-Xaw3d: $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o
- $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(ATHENA_OBJS) demo-Xaw.o \
- $(LIBS) $(X_LIBS) \
- $(ATHENA3D_LIBS) $(X_PRE_LIBS) -lXt -lX11 -lXext $(X_EXTRA_LIBS)
-
-demo-Xm.o: demo.c XScreenSaver_ad.h
- $(CC) -o $@ -c -DFORCE_MOTIF \
- $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $(srcdir)/demo.c
-demo-Xaw.o: demo.c XScreenSaver_ad.h
- $(CC) -o $@ -c -DFORCE_ATHENA \
- $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $(srcdir)/demo.c
-
-
TEST_PASSWD_OBJS = test-passwd.o $(LOCK_OBJS_1) $(PASSWD_OBJS) \
stderr.o: $(srcdir)/prefs.h
stderr.o: $(UTILS_SRC)/resources.h
stderr.o: $(UTILS_SRC)/visual.h
-dialogs-Xm.o: ../config.h
-dialogs-Xm.o: $(UTILS_SRC)/visual.h
+demo-Xm.o: ../config.h
+demo-Xm.o: $(UTILS_SRC)/version.h
+demo-Xm.o: $(srcdir)/prefs.h
+demo-Xm.o: $(UTILS_SRC)/resources.h
+demo-Xm.o: $(UTILS_SRC)/visual.h
+demo-Xm.o: $(srcdir)/remote.h
+demo-Xm.o: $(UTILS_SRC)/usleep.h
+demo-Xm.o: XScreenSaver_ad.h
+demo-Xm-widgets.o: ../config.h
demo-Gtk.o: ../config.h
demo-Gtk.o: $(UTILS_SRC)/version.h
demo-Gtk.o: $(srcdir)/prefs.h
demo-Gtk-widgets.o: ../config.h
demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-stubs.h
demo-Gtk-widgets.o: $(srcdir)/demo-Gtk-widgets.h
-dialogs-Xaw.o: ../config.h
-dialogs-Xaw.o: $(UTILS_SRC)/visual.h
passwd-pwent.o: ../config.h
lock.o: ../config.h
lock.o: $(srcdir)/xscreensaver.h
prefs.o: ../config.h
prefs.o: $(srcdir)/prefs.h
prefs.o: $(UTILS_SRC)/resources.h
-demo.o: ../config.h
-demo.o: $(UTILS_SRC)/version.h
-demo.o: $(srcdir)/prefs.h
-demo.o: $(UTILS_SRC)/resources.h
-demo.o: $(UTILS_SRC)/visual.h
-demo.o: $(srcdir)/remote.h
-demo.o: $(UTILS_SRC)/usleep.h
-demo.o: XScreenSaver_ad.h
remote.o: ../config.h
remote.o: $(srcdir)/remote.h
xscreensaver-command.o: ../config.h
! a screen saver and locker for the X window system
! by Jamie Zawinski
!
-! version 3.21
-! 18-Nov-99
+! version 3.22
+! 09-Dec-99
!
! See "man xscreensaver" for more info. The latest version is always
! available at http://www.jwz.org/xscreensaver/
! This is what the "Manual" button in xscreensaver-demo runs (/bin/sh syntax.)
*manualCommand: xterm +sb -fg black -bg gray75 -T '%s manual' \
- -e /bin/sh -c 'man "%s" || read'
+ -e /bin/sh -c 'man "%s" || read foo'
! Gnome folks might prefer this:
!*manualCommand: gnome-help-browser 'man:%s'
!
*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1
*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
-*XmTextField.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
+*cmdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
*label0.fontList: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-XScreenSaver*XmList.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-! Need to fully-qualify the preceeding in the case of of *sgiMode.
-
-*XmDialogShell*foreground: #000000
-*XmDialogShell*background: #E5E5E5
-*XmDialogShell*XmTextField.foreground: #000000
-*XmDialogShell*XmTextField.background: #FFFFFF
-*XmDialogShell*demoList.foreground: #000000
-*XmDialogShell*demoList.background: #FFFFFF
-
-*XmDialogShell.title: XScreenSaver
-*versionWarning_popup.title: XScreenSaver Warning
-*demoForm_popup.title: XScreenSaver Demo
-*preferencesForm_popup.title: XScreenSaver Preferences
+*doc.fontList: *-helvetica-medium-r-*-*-*-100-*-*-*-iso8859-1
+
+*foreground: #000000
+*background: #C0C0C0
+*XmTextField.foreground: #000000
+*XmTextField.background: #FFFFFF
+*list.foreground: #000000
+*list.background: #FFFFFF
+
+*ApplicationShell.title: XScreenSaver
+*warning.title: XScreenSaver
+*warning_popup.title: XScreenSaver
*allowShellResize: True
*autoUnmanage: False
-! This doesn't work. Motif ignores it if there is a scroll-list!
-*demoDialog.maxWidth: 600
-
-*label1.labelString: XScreenSaver %s
-*label1.label: XScreenSaver %s
-*label2.labelString: Copyright © 1991-1999 by Jamie Zawinski <jwz@jwz.org>
-*label2.label: Copyright © 1991-1999 by Jamie Zawinski <jwz@jwz.org>
-*demoList.visibleItemCount: 10
-*demoList.automaticSelection: True
-*next.labelString: Run Next
-*prev.labelString: Run Previous
-*edit.labelString: Preferences
-*restart.labelString: Reinitialize
+*menubar*file.labelString: File
+*menubar*file.mnemonic: F
+*file.blank.labelString: Blank Screen Now
+*file.blank.mnemonic: B
+*file.lock.labelString: Lock Screen Now
+*file.lock.mnemonic: L
+*file.kill.labelString: Kill Daemon
+*file.kill.mnemonic: K
+*file.restart.labelString: Restart Daemon
+*file.restart.mnemonic: R
+*file.exit.labelString: Exit
+*file.exit.mnemonic: E
+
+*menubar*edit.labelString: Edit
+*menubar*edit.mnemonic: E
+*edit.cut.labelString: Cut
+*edit.cut.mnemonic: u
+*edit.copy.labelString: Copy
+*edit.copy.mnemonic: C
+*edit.paste.labelString: Paste
+*edit.paste.mnemonic: P
+
+*menubar*help.labelString: Help
+*menubar*help.mnemonic: H
+*help.about.labelString: About...
+*help.about.mnemonic: A
+*help.docMenu.labelString: Documentation...
+*help.docMenu.mnemonic: D
+
+*demoTab.marginWidth: 10
+*optionsTab.marginWidth: 10
+
+*XmScrolledWindow.topOffset: 10
+*XmScrolledWindow.leftOffset: 10
+*demoTab.topOffset: 4
+*form1.bottomOffset: 10
+*form3.leftOffset: 10
+*form3.rightOffset: 10
+*frame.topOffset: 10
+*frame.bottomOffset: 10
+*enabled.topOffset: 10
+*visLabel.topOffset: 10
+*combo.topOffset: 10
+*form4.bottomOffset: 4
+*hr.bottomOffset: 4
+*XmComboBox.marginWidth: 0
+*XmComboBox.marginHeight: 0
+
+*demo.marginWidth: 30
+*demo.marginHeight: 4
+*man.marginWidth: 10
+*man.marginHeight: 4
+*down.leftOffset: 40
+*down.marginWidth: 4
+*down.marginHeight: 4
+*up.marginWidth: 4
+*up.marginHeight: 4
+*frame.traversalOn: False
+
+*list.automaticSelection: True
+*list.visibleItemCount: 20
+*doc.columns: 60
+*combo.columns: 11
+
+*demoTab.labelString: Graphics Demos
+*optionsTab.labelString: Screensaver Options
+*down.labelString: \\/
+*up.labelString: /\\
+*frameLabel.labelString:
+*cmdLabel.labelString: Command Line:
+*cmdLabel.alignment: ALIGNMENT_BEGINNING
+*enabled.labelString: Enabled
+*visLabel.labelString: Visual:
+*visLabel.alignment: ALIGNMENT_END
+*visLabel.leftOffset: 20
+*demo.labelString: Demo
+*man.labelString: Documentation...
*done.labelString: Quit
*preferencesLabel.labelString: XScreenSaver Parameters
*fadeToggle.labelString: Fade Colormap
*unfadeToggle.labelString: Unfade Colormap
*lockToggle.labelString: Require Password
-*preferencesDone.labelString: OK
-*preferencesCancel.labelString: Cancel
-! Disable Motif drag-and-drop in dialog boxes. This is kind of pathetic, but
-! in some older versions of Motif, most any attempt to drag cause immediate
-! flaming death from above. This *should* rip the legs off that bug.
-! (But sadly, Lesstif 0.86 and earlier ignore these resources *and* have
-! buggy drag-and-drop.)
-!
-XScreenSaver*dragInitiatorProtocolStyle: DRAG_NONE
-XScreenSaver*dragReceiverProtocolStyle: DRAG_NONE
-
+*OK.marginWidth: 30
+*OK.marginHeight: 4
+*OK.leftOffset: 10
+*OK.bottomOffset: 10
+*Cancel.marginWidth: 30
+*Cancel.marginHeight: 4
+*Cancel.rightOffset: 10
+*Cancel.bottomOffset: 10
-! Resources for the Athena dialog boxes of the "xscreensaver-demo" program.
-!
-*demo_dialog.title: XScreenSaver Demo
-*preferences_dialog.title: XScreenSaver Preferences
-*warning_dialog.title: XScreenSaver Warning
-
-! For some reason, it doesn't size correctly by itself.
-*demo_dialog.geometry: =640x400
-
-*demo_dialog*font: *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
-*preferences_dialog*font: *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
-*demo_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-*preferences_dialog*label1.font:*-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-XScreenSaver*warning_dialog*label0.font: \
- *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-XScreenSaver*warning_dialog*Label.font: \
- *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1
-XScreenSaver*warning_dialog*Command.font: \
- *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1
-XScreenSaver.demo_dialog*List.font: \
- *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1
-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.preferences_dialog*foreground: #000000
-XScreenSaver.preferences_dialog*background: #E5E5E5
-XScreenSaver.preferences_dialog*Command.background: #D9D9D9
-XScreenSaver.preferences_dialog*Toggle.background: #D9D9D9
-XScreenSaver.preferences_dialog*Text*background: #FFFFFF
-
-XScreenSaver.warning_dialog*foreground: #000000
-XScreenSaver.warning_dialog*background: #E5E5E5
-XScreenSaver.warning_dialog*Command.background: #D9D9D9
-
-*preferences_dialog*Dialog.value.translations: #override\n\
- <Key>Return: beginning-of-line()\n
-
-*demo_dialog*viewport.height: 200
-*Form.borderWidth: 0
-*Box.borderWidth: 0
-*Label.borderWidth: 0
-*preferences_dialog*Dialog.borderWidth: 0
-
-*demo_dialog*run.label: Run
-*demo_dialog*next.label: Run Next
-*demo_dialog*prev.label: Run Previous
-*demo_dialog*edit.label: Preferences
-*demo_dialog*restart.label: Reinitialize
-*demo_dialog*done.label: Quit
-XScreenSaver.demo_dialog*Command.internalWidth: 10
-XScreenSaver.demo_dialog*Command.internalHeight: 4
-
-*preferences_dialog*timeout.label: Saver Timeout:
-*preferences_dialog*cycle.label: Cycle Timeout:
-*preferences_dialog*fade.label: Fade Duration:
-*preferences_dialog*ticks.label: Fade Ticks:
-*preferences_dialog*lockTime.label: Lock Timeout:
-*preferences_dialog*passwdTime.label: Password Timeout:
-XScreenSaver.preferences_dialog*Command.internalWidth: 10
-XScreenSaver.preferences_dialog*Command.internalHeight: 4
-
-*preferences_dialog*label1.label: XScreenSaver Parameters
-*preferences_dialog*buttonbox.verbose.label: Verbose
-*preferences_dialog*buttonbox.cmap.label: Install Colormap
-*preferences_dialog*buttonbox.fade.label: Fade Colormap
-*preferences_dialog*buttonbox.unfade.label: Unfade Colormap
-*preferences_dialog*buttonbox.lock.label: Require Password
-*preferences_dialog*done.label: Ok
-*preferences_dialog*cancel.label: Cancel
-
-*warning_dialog*ok.label: Ok
-
-*warning_dialog*horizDistance: 30
-*warning_dialog*vertDistance: 0
-
-*warning_dialog*Label.internalWidth: 1
-*warning_dialog*Label.internalHeight: 0
-
-*warning_dialog*label0.horizDistance: 80
-*warning_dialog*label0.vertDistance: 20
-
-*warning_dialog*Command.horizDistance: 160
-*warning_dialog*Command.vertDistance: 20
-*warning_dialog*Command.internalWidth: 20
-*warning_dialog*Command.internalHeight: 5
!=============================================================================
"*helpURL: http://www.jwz.org/xscreensaver/man.html",
"*loadURL: netscape -remote 'openURL(%s)' || netscape '%s'",
"*manualCommand: xterm +sb -fg black -bg gray75 -T '%s manual' \
- -e /bin/sh -c 'man \"%s\" || read'",
+ -e /bin/sh -c 'man \"%s\" || read foo'",
"*dateFormat: %d-%b-%y (%a); %I:%M %p",
"*installColormap: True",
"*programs: \
"*splash.help.label: Help",
"*fontList: *-helvetica-medium-r-*-*-*-120-*-*-*-iso8859-1",
"*demoDialog*label1.fontList: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1",
-"*XmTextField.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
+"*cmdText.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
"*label0.fontList: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"XScreenSaver*XmList.fontList: *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"*XmDialogShell*foreground: #000000",
-"*XmDialogShell*background: #E5E5E5",
-"*XmDialogShell*XmTextField.foreground: #000000",
-"*XmDialogShell*XmTextField.background: #FFFFFF",
-"*XmDialogShell*demoList.foreground: #000000",
-"*XmDialogShell*demoList.background: #FFFFFF",
-"*XmDialogShell.title: XScreenSaver",
-"*versionWarning_popup.title: XScreenSaver Warning",
-"*demoForm_popup.title: XScreenSaver Demo",
-"*preferencesForm_popup.title: XScreenSaver Preferences",
+"*doc.fontList: *-helvetica-medium-r-*-*-*-100-*-*-*-iso8859-1",
+"*foreground: #000000",
+"*background: #C0C0C0",
+"*XmTextField.foreground: #000000",
+"*XmTextField.background: #FFFFFF",
+"*list.foreground: #000000",
+"*list.background: #FFFFFF",
+"*ApplicationShell.title: XScreenSaver",
+"*warning.title: XScreenSaver",
+"*warning_popup.title: XScreenSaver",
"*allowShellResize: True",
"*autoUnmanage: False",
-"*demoDialog.maxWidth: 600",
-"*label1.labelString: XScreenSaver %s",
-"*label1.label: XScreenSaver %s",
-"*label2.labelString: Copyright © 1991-1999 by Jamie Zawinski <jwz@jwz.org>",
-"*label2.label: Copyright © 1991-1999 by Jamie Zawinski <jwz@jwz.org>",
-"*demoList.visibleItemCount: 10",
-"*demoList.automaticSelection: True",
-"*next.labelString: Run Next",
-"*prev.labelString: Run Previous",
-"*edit.labelString: Preferences",
-"*restart.labelString: Reinitialize",
+"*menubar*file.labelString: File",
+"*menubar*file.mnemonic: F",
+"*file.blank.labelString: Blank Screen Now",
+"*file.blank.mnemonic: B",
+"*file.lock.labelString: Lock Screen Now",
+"*file.lock.mnemonic: L",
+"*file.kill.labelString: Kill Daemon",
+"*file.kill.mnemonic: K",
+"*file.restart.labelString: Restart Daemon",
+"*file.restart.mnemonic: R",
+"*file.exit.labelString: Exit",
+"*file.exit.mnemonic: E",
+"*menubar*edit.labelString: Edit",
+"*menubar*edit.mnemonic: E",
+"*edit.cut.labelString: Cut",
+"*edit.cut.mnemonic: u",
+"*edit.copy.labelString: Copy",
+"*edit.copy.mnemonic: C",
+"*edit.paste.labelString: Paste",
+"*edit.paste.mnemonic: P",
+"*menubar*help.labelString: Help",
+"*menubar*help.mnemonic: H",
+"*help.about.labelString: About...",
+"*help.about.mnemonic: A",
+"*help.docMenu.labelString: Documentation...",
+"*help.docMenu.mnemonic: D",
+"*demoTab.marginWidth: 10",
+"*optionsTab.marginWidth: 10",
+"*XmScrolledWindow.topOffset: 10",
+"*XmScrolledWindow.leftOffset: 10",
+"*demoTab.topOffset: 4",
+"*form1.bottomOffset: 10",
+"*form3.leftOffset: 10",
+"*form3.rightOffset: 10",
+"*frame.topOffset: 10",
+"*frame.bottomOffset: 10",
+"*enabled.topOffset: 10",
+"*visLabel.topOffset: 10",
+"*combo.topOffset: 10",
+"*form4.bottomOffset: 4",
+"*hr.bottomOffset: 4",
+"*XmComboBox.marginWidth: 0",
+"*XmComboBox.marginHeight: 0",
+"*demo.marginWidth: 30",
+"*demo.marginHeight: 4",
+"*man.marginWidth: 10",
+"*man.marginHeight: 4",
+"*down.leftOffset: 40",
+"*down.marginWidth: 4",
+"*down.marginHeight: 4",
+"*up.marginWidth: 4",
+"*up.marginHeight: 4",
+"*frame.traversalOn: False",
+"*list.automaticSelection: True",
+"*list.visibleItemCount: 20",
+"*doc.columns: 60",
+"*combo.columns: 11",
+"*demoTab.labelString: Graphics Demos",
+"*optionsTab.labelString: Screensaver Options",
+"*down.labelString: \\\\/ ",
+"*up.labelString: /\\\\ ",
+"*frameLabel.labelString: ",
+"*cmdLabel.labelString: Command Line:",
+"*cmdLabel.alignment: ALIGNMENT_BEGINNING",
+"*enabled.labelString: Enabled",
+"*visLabel.labelString: Visual:",
+"*visLabel.alignment: ALIGNMENT_END",
+"*visLabel.leftOffset: 20",
+"*demo.labelString: Demo",
+"*man.labelString: Documentation...",
"*done.labelString: Quit",
"*preferencesLabel.labelString: XScreenSaver Parameters",
"*timeoutLabel.labelString: Saver Timeout",
"*fadeToggle.labelString: Fade Colormap",
"*unfadeToggle.labelString: Unfade Colormap",
"*lockToggle.labelString: Require Password",
-"*preferencesDone.labelString: OK",
-"*preferencesCancel.labelString: Cancel",
-"XScreenSaver*dragInitiatorProtocolStyle: DRAG_NONE",
-"XScreenSaver*dragReceiverProtocolStyle: DRAG_NONE",
-"*demo_dialog.title: XScreenSaver Demo",
-"*preferences_dialog.title: XScreenSaver Preferences",
-"*warning_dialog.title: XScreenSaver Warning",
-"*demo_dialog.geometry: =640x400",
-"*demo_dialog*font: *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
-"*preferences_dialog*font: *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
-"*demo_dialog*label1.font: *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"*preferences_dialog*label1.font:*-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"XScreenSaver*warning_dialog*label0.font: \
- *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"XScreenSaver*warning_dialog*Label.font: \
- *-helvetica-bold-r-*-*-*-120-*-*-*-iso8859-1",
-"XScreenSaver*warning_dialog*Command.font: \
- *-helvetica-bold-r-*-*-*-140-*-*-*-iso8859-1",
-"XScreenSaver.demo_dialog*List.font: \
- *-courier-medium-r-*-*-*-120-*-*-*-iso8859-1",
-"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.preferences_dialog*foreground: #000000",
-"XScreenSaver.preferences_dialog*background: #E5E5E5",
-"XScreenSaver.preferences_dialog*Command.background: #D9D9D9",
-"XScreenSaver.preferences_dialog*Toggle.background: #D9D9D9",
-"XScreenSaver.preferences_dialog*Text*background: #FFFFFF",
-"XScreenSaver.warning_dialog*foreground: #000000",
-"XScreenSaver.warning_dialog*background: #E5E5E5",
-"XScreenSaver.warning_dialog*Command.background: #D9D9D9",
-"*preferences_dialog*Dialog.value.translations: #override\\n\
- <Key>Return: beginning-of-line()\\n",
-"*demo_dialog*viewport.height: 200",
-"*Form.borderWidth: 0",
-"*Box.borderWidth: 0",
-"*Label.borderWidth: 0",
-"*preferences_dialog*Dialog.borderWidth: 0",
-"*demo_dialog*run.label: Run",
-"*demo_dialog*next.label: Run Next",
-"*demo_dialog*prev.label: Run Previous",
-"*demo_dialog*edit.label: Preferences",
-"*demo_dialog*restart.label: Reinitialize",
-"*demo_dialog*done.label: Quit",
-"XScreenSaver.demo_dialog*Command.internalWidth: 10",
-"XScreenSaver.demo_dialog*Command.internalHeight: 4",
-"*preferences_dialog*timeout.label: Saver Timeout:",
-"*preferences_dialog*cycle.label: Cycle Timeout:",
-"*preferences_dialog*fade.label: Fade Duration:",
-"*preferences_dialog*ticks.label: Fade Ticks:",
-"*preferences_dialog*lockTime.label: Lock Timeout:",
-"*preferences_dialog*passwdTime.label: Password Timeout:",
-"XScreenSaver.preferences_dialog*Command.internalWidth: 10",
-"XScreenSaver.preferences_dialog*Command.internalHeight: 4",
-"*preferences_dialog*label1.label: XScreenSaver Parameters",
-"*preferences_dialog*buttonbox.verbose.label: Verbose",
-"*preferences_dialog*buttonbox.cmap.label: Install Colormap",
-"*preferences_dialog*buttonbox.fade.label: Fade Colormap",
-"*preferences_dialog*buttonbox.unfade.label: Unfade Colormap",
-"*preferences_dialog*buttonbox.lock.label: Require Password",
-"*preferences_dialog*done.label: Ok",
-"*preferences_dialog*cancel.label: Cancel",
-"*warning_dialog*ok.label: Ok",
-"*warning_dialog*horizDistance: 30",
-"*warning_dialog*vertDistance: 0",
-"*warning_dialog*Label.internalWidth: 1",
-"*warning_dialog*Label.internalHeight: 0",
-"*warning_dialog*label0.horizDistance: 80",
-"*warning_dialog*label0.vertDistance: 20",
-"*warning_dialog*Command.horizDistance: 160",
-"*warning_dialog*Command.vertDistance: 20",
-"*warning_dialog*Command.internalWidth: 20",
-"*warning_dialog*Command.internalHeight: 5",
+"*OK.marginWidth: 30",
+"*OK.marginHeight: 4",
+"*OK.leftOffset: 10",
+"*OK.bottomOffset: 10",
+"*Cancel.marginWidth: 30",
+"*Cancel.marginHeight: 4",
+"*Cancel.rightOffset: 10",
+"*Cancel.bottomOffset: 10",
"*hacks.documentation.isInstalled: True",
"*hacks.grav.documentation: \
This program draws a simple orbital simulation. If you turn on \
/* demo-Gtk.c --- implements the interactive demo-mode and options dialogs.
- * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1993-1999 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
int which, prefs_pair *pair);
static void populate_prefs_page (GtkWidget *top, prefs_pair *pair);
static int apply_changes_and_save (GtkWidget *widget);
-
+static int maybe_reload_init_file (GtkWidget *widget, prefs_pair *pair);
\f
/* Some random utility functions
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area),
label, TRUE, TRUE, 0);
- ok = gtk_button_new_with_label (
- get_string_resource ("warning_dialog.ok.label",
- "warning_dialog.Button.Label"));
+ ok = gtk_button_new_with_label ("OK");
gtk_container_add (GTK_CONTAINER (label), ok);
gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
if (which < 0) return;
apply_changes_and_save (widget);
if (report_errors_p)
- run_cmd (widget, XA_ACTIVATE, 0);
+ run_cmd (widget, XA_DEMO, which + 1);
else
{
char *s = 0;
if (which < 0) return -1;
+ if (maybe_reload_init_file (widget, pair) != 0)
+ return 1;
+
/* Sanity-check and canonicalize whatever the user typed into the combo box.
*/
if (!strcasecmp (visual, "")) visual = "";
"+ c #D6D6D6",
"@ c #000000",
+ " ",
" ------------- ",
" -+++++++++++@ ",
" -+++++++++@ ",
}
+static void
+widget_deleter (GtkWidget *widget, gpointer data)
+{
+ /* #### Well, I want to destroy these widgets, but if I do that, they get
+ referenced again, and eventually I get a SEGV. So instead of
+ destroying them, I'll just hide them, and leak a bunch of memory
+ every time the disk file changes. Go go go Gtk!
+
+ #### Ok, that's a lie, I get a crash even if I just hide the widget
+ and don't ever delete it. Fuck!
+ */
+#if 0
+ gtk_widget_destroy (widget);
+#else
+ gtk_widget_hide (widget);
+#endif
+}
+
+
+static int
+maybe_reload_init_file (GtkWidget *widget, prefs_pair *pair)
+{
+ int status = 0;
+ saver_preferences *p = pair->a;
+
+ static Bool reentrant_lock = False;
+ if (reentrant_lock) return 0;
+ reentrant_lock = True;
+
+ if (init_file_changed_p (p))
+ {
+ const char *f = init_file_name();
+ char *b;
+ int which;
+ GtkList *list;
+
+ if (!f || !*f) return 0;
+ b = (char *) malloc (strlen(f) + 1024);
+ sprintf (b,
+ "Warning:\n\n"
+ "file \"%s\" has changed, reloading.\n",
+ f);
+ warning_dialog (widget, b, 100);
+ free (b);
+
+ load_init_file (p);
+
+ which = selected_hack_number (widget);
+ list = GTK_LIST (name_to_widget (widget, "list"));
+ gtk_container_foreach (GTK_CONTAINER (list), widget_deleter, NULL);
+ populate_hack_list (widget, pair);
+ gtk_list_select_item (list, which);
+ populate_prefs_page (widget, pair);
+ populate_demo_window (widget, which, pair);
+ ensure_selected_item_visible (GTK_WIDGET (list));
+
+ status = 1;
+ }
+
+ reentrant_lock = False;
+ return status;
+}
+
\f
/* The main demo-mode command loop.
--- /dev/null
+/* demo-Xm.c --- implements the interactive demo-mode and options dialogs.
+ * xscreensaver, Copyright (c) 1999 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <X11/Xatom.h>
+#include <X11/Intrinsic.h>
+
+#include <X11/IntrinsicP.h> /* just for debug info */
+#include <X11/ShellP.h>
+
+#include <X11/Shell.h>
+#include <Xm/Xm.h>
+#include <Xm/MainW.h>
+#include <Xm/Form.h>
+#include <Xm/Frame.h>
+#include <Xm/ScrolledW.h>
+#include <Xm/List.h>
+#include <Xm/PushB.h>
+#include <Xm/PushBG.h>
+#include <Xm/Text.h>
+#include <Xm/TextF.h>
+#include <Xm/ToggleBG.h>
+#include <Xm/CascadeBG.h>
+#ifdef HAVE_XMCOMBOBOX
+# include <Xm/ComboBox.h>
+#endif
+#include <Xm/RowColumn.h>
+#include <Xm/LabelG.h>
+#include <Xm/SeparatoG.h>
+#include <Xm/SelectioB.h>
+
+#include <stdio.h>
+
+
+const char *visual_menu[] = {
+ "Any", "Best", "Default", "Default-N", "GL", "TrueColor", "PseudoColor",
+ "StaticGray", "GrayScale", "DirectColor", "Color", "Gray", "Mono", 0
+};
+
+
+
+static Widget create_demos_page (Widget parent);
+static Widget create_options_page (Widget parent);
+
+static void
+tab_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ Widget parent = XtParent(button);
+ Widget tabber = XtNameToWidget (parent, "*folder");
+ Widget this_tab = (Widget) client_data;
+ Widget *kids = 0;
+ Cardinal nkids = 0;
+ if (!tabber) abort();
+
+ XtVaGetValues (tabber, XmNnumChildren, &nkids, XmNchildren, &kids, 0);
+ if (!kids) abort();
+ if (nkids > 0)
+ XtUnmanageChildren (kids, nkids);
+
+ XtManageChild (this_tab);
+}
+
+
+Widget
+create_xscreensaver_demo (Widget parent)
+{
+ /* MainWindow
+ Form
+ Menubar
+ DemoTab
+ OptionsTab
+ HR
+ Tabber
+ (demo page)
+ (options page)
+ */
+
+ Widget mainw, form, menubar;
+ Widget demo_tab, options_tab, hr, tabber, demos, options;
+ Arg av[100];
+ int ac = 0;
+
+ mainw = XmCreateMainWindow (parent, "demoForm", av, ac);
+ form = XmCreateForm (mainw, "form", av, ac);
+ menubar = XmCreateSimpleMenuBar (form, "menubar", av, ac);
+ XtVaSetValues (menubar,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ 0);
+
+ {
+ Widget menu = 0, item = 0;
+ char *menus[] = {
+ "*file", "blank", "lock", "kill", "restart", "-", "exit",
+ "*edit", "cut", "copy", "paste",
+ "*help", "about", "docMenu" };
+ int i;
+ for (i = 0; i < sizeof(menus)/sizeof(*menus); i++)
+ {
+ ac = 0;
+ if (menus[i][0] == '-')
+ item = XmCreateSeparatorGadget (menu, "separator", av, ac);
+ else if (menus[i][0] != '*')
+ item = XmCreatePushButtonGadget (menu, menus[i], av, ac);
+ else
+ {
+ menu = XmCreatePulldownMenu (parent, menus[i]+1, av, ac);
+ XtSetArg (av [ac], XmNsubMenuId, menu); ac++;
+ item = XmCreateCascadeButtonGadget (menubar, menus[i]+1, av, ac);
+
+ if (!strcmp (menus[i]+1, "help"))
+ XtVaSetValues(menubar, XmNmenuHelpWidget, item, 0);
+ }
+ XtManageChild (item);
+ }
+ ac = 0;
+ }
+
+ demo_tab = XmCreatePushButtonGadget (form, "demoTab", av, ac);
+ XtVaSetValues (demo_tab,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopWidget, menubar,
+ 0);
+
+ options_tab = XmCreatePushButtonGadget (form, "optionsTab", av, ac);
+ XtVaSetValues (options_tab,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftWidget, demo_tab,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopWidget, demo_tab,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomWidget, demo_tab,
+ 0);
+
+ hr = XmCreateSeparatorGadget (form, "hr", av, ac);
+ XtVaSetValues (hr,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopWidget, demo_tab,
+ 0);
+
+ tabber = XmCreateForm (form, "folder", av, ac);
+ XtVaSetValues (tabber,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopWidget, hr,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ demos = create_demos_page (tabber);
+ options = create_options_page (tabber);
+
+ XtAddCallback (demo_tab, XmNactivateCallback, tab_cb, demos);
+ XtAddCallback (options_tab, XmNactivateCallback, tab_cb, options);
+
+ XtManageChild (demos);
+ XtManageChild (options);
+
+ XtManageChild (demo_tab);
+ XtManageChild (options_tab);
+ XtManageChild (hr);
+ XtManageChild (menubar);
+ XtManageChild (tabber);
+ XtManageChild (form);
+
+#if 1
+ XtUnmanageChild (options);
+ XtManageChild (demos);
+#endif
+
+ return mainw;
+}
+
+
+static Widget
+create_demos_page (Widget parent)
+{
+ /* Form1 (horizontal)
+ Form2 (vertical)
+ Scroller
+ List
+ ButtonBox1 (vertical)
+ Button ("Down")
+ Button ("Up")
+ Form3 (vertical)
+ Frame
+ Label
+ TextArea (doc)
+ Label
+ Text ("Command Line")
+ Form4 (horizontal)
+ Checkbox ("Enabled")
+ Label ("Visual")
+ ComboBox
+ HR
+ ButtonBox2 (vertical)
+ Button ("Demo")
+ Button ("Documentation")
+ */
+ Widget form1, form2, form3, form4;
+ Widget scroller, list, buttonbox1, down, up;
+ Widget frame, frame_label, doc, cmd_label, cmd_text, enabled, vis_label;
+ Widget combo;
+ Widget hr, buttonbox2, demo, man;
+ Arg av[100];
+ int ac = 0;
+ int i;
+
+ form1 = XmCreateForm (parent, "form1", av, ac);
+ form2 = XmCreateForm (form1, "form2", av, ac);
+ XtVaSetValues (form2,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ scroller = XmCreateScrolledWindow (form2, "scroller", av, ac);
+ XtVaSetValues (scroller,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+ list = XmCreateList (scroller, "list", av, ac);
+
+ buttonbox1 = XmCreateForm (form2, "buttonbox1", av, ac);
+ XtVaSetValues (buttonbox1,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ XtVaSetValues (scroller, XmNbottomWidget, buttonbox1, 0);
+
+ down = XmCreatePushButton (buttonbox1, "down", av, ac);
+ XtVaSetValues (down,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ up = XmCreatePushButton (buttonbox1, "up", av, ac);
+ XtVaSetValues (up,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftWidget, down,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ form3 = XmCreateForm (form1, "form3", av, ac);
+ XtVaSetValues (form3,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftWidget, form2,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ frame = XmCreateFrame (form3, "frame", av, ac);
+
+ ac = 0;
+ XtSetArg (av [ac], XmNchildType, XmFRAME_TITLE_CHILD); ac++;
+ frame_label = XmCreateLabelGadget (frame, "frameLabel", av, ac);
+
+ ac = 0;
+ XtVaSetValues (frame,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+
+ ac = 0;
+ XtSetArg (av [ac], XmNchildType, XmFRAME_WORKAREA_CHILD); ac++;
+ doc = XmCreateText (frame, "doc", av, ac);
+
+ ac = 0;
+ XtVaSetValues (doc,
+ XmNeditable, FALSE,
+ XmNcursorPositionVisible, FALSE,
+ XmNwordWrap, TRUE,
+ XmNeditMode, XmMULTI_LINE_EDIT,
+ XmNshadowThickness, 0,
+ 0);
+
+ cmd_label = XmCreateLabelGadget (form3, "cmdLabel", av, ac);
+ XtVaSetValues (cmd_label,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+ XtVaSetValues (frame, XmNbottomWidget, cmd_label, 0);
+
+ cmd_text = XmCreateTextField (form3, "cmdText", av, ac);
+ XtVaSetValues (cmd_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+ XtVaSetValues (cmd_label, XmNbottomWidget, cmd_text, 0);
+
+ form4 = XmCreateForm (form3, "form4", av, ac);
+ XtVaSetValues (form4,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+ XtVaSetValues (cmd_text, XmNbottomWidget, form4, 0);
+
+ enabled = XmCreateToggleButtonGadget (form4, "enabled", av, ac);
+ XtVaSetValues (enabled,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ vis_label = XmCreateLabelGadget (form4, "visLabel", av, ac);
+ XtVaSetValues (vis_label,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftWidget, enabled,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+#ifdef HAVE_XMCOMBOBOX
+ {
+ Widget list;
+ ac = 0;
+ XtSetArg (av [ac], XmNcomboBoxType, XmDROP_DOWN_COMBO_BOX); ac++;
+ combo = XmCreateComboBox (form4, "combo", av, ac);
+ for (i = 0; visual_menu[i]; i++)
+ {
+ XmString xs = XmStringCreate ((char *) visual_menu[i],
+ XmSTRING_DEFAULT_CHARSET);
+ XmComboBoxAddItem (combo, xs, 0, False);
+ XmStringFree (xs);
+ }
+ XtVaGetValues (combo, XmNlist, &list, 0);
+ XtVaSetValues (list, XmNvisibleItemCount, i, 0);
+ }
+#else /* !HAVE_XMCOMBOBOX */
+ {
+ Widget popup_menu = XmCreatePulldownMenu (parent, "menu", av, ac);
+ Widget kids[100];
+ for (i = 0; visual_menu[i]; i++)
+ {
+ XmString xs = XmStringCreate ((char *) visual_menu[i],
+ XmSTRING_DEFAULT_CHARSET);
+ ac = 0;
+ XtSetArg (av [ac], XmNlabelString, xs); ac++;
+ kids[i] = XmCreatePushButtonGadget (popup_menu, "button", av, ac);
+ /* XtAddCallback (combo, XmNactivateCallback, visual_popup_cb,
+ combo); */
+ XmStringFree (xs);
+ }
+ XtManageChildren (kids, i);
+
+ ac = 0;
+ XtSetArg (av [ac], XmNsubMenuId, popup_menu); ac++;
+ combo = XmCreateOptionMenu (form4, "combo", av, ac);
+ ac = 0;
+ }
+#endif /* !HAVE_XMCOMBOBOX */
+
+ XtVaSetValues (combo,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftWidget, vis_label,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ hr = XmCreateSeparatorGadget (form3, "hr", av, ac);
+ XtVaSetValues (hr,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ 0);
+ XtVaSetValues (form4, XmNbottomWidget, hr, 0);
+
+ buttonbox2 = XmCreateForm (form3, "buttonbox2", av, ac);
+ XtVaSetValues (buttonbox2,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ XtVaSetValues (hr, XmNbottomWidget, buttonbox2, 0);
+
+ demo = XmCreatePushButtonGadget (buttonbox2, "demo", av, ac);
+ XtVaSetValues (demo,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ man = XmCreatePushButtonGadget (buttonbox2, "man", av, ac);
+ XtVaSetValues (man,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ XtManageChild (demo);
+ XtManageChild (man);
+ XtManageChild (buttonbox2);
+ XtManageChild (hr);
+
+ XtManageChild (combo);
+ XtManageChild (vis_label);
+ XtManageChild (enabled);
+ XtManageChild (form4);
+
+ XtManageChild (cmd_text);
+ XtManageChild (cmd_label);
+
+ XtManageChild (doc);
+ XtManageChild (frame_label);
+ XtManageChild (frame);
+ XtManageChild (form3);
+
+ XtManageChild (up);
+ XtManageChild (down);
+ XtManageChild (buttonbox1);
+
+ XtManageChild (list);
+ XtManageChild (scroller);
+ XtManageChild (form2);
+
+ XtManageChild (form1);
+
+ XtVaSetValues (form1,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ return form1;
+}
+
+
+
+static Widget
+create_options_page (Widget parent)
+{
+ Arg av[64];
+ int ac = 0;
+ Widget children[100];
+ Widget timeout_label, cycle_label, fade_seconds_label, fade_ticks_label;
+ Widget lock_label, passwd_label, hr;
+ Widget preferences_form;
+
+ Widget timeout_text, cycle_text, fade_text, fade_ticks_text;
+ Widget lock_timeout_text, passwd_timeout_text, verbose_toggle;
+ Widget install_cmap_toggle, fade_toggle, unfade_toggle;
+ Widget lock_toggle, prefs_done, prefs_cancel;
+
+ ac = 0;
+ XtSetArg (av [ac], XmNdialogType, XmDIALOG_PROMPT); ac++;
+
+ ac = 0;
+ XtSetArg (av [ac], XmNtopAttachment, XmATTACH_FORM); ac++;
+ XtSetArg (av [ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
+ XtSetArg (av [ac], XmNleftAttachment, XmATTACH_FORM); ac++;
+ XtSetArg (av [ac], XmNrightAttachment, XmATTACH_FORM); ac++;
+ preferences_form = XmCreateForm (parent, "preferencesForm", av, ac);
+ XtManageChild (preferences_form);
+
+ ac = 0;
+
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ timeout_label = XmCreateLabelGadget (preferences_form, "timeoutLabel",
+ av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ cycle_label = XmCreateLabelGadget (preferences_form, "cycleLabel",
+ av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ fade_seconds_label = XmCreateLabelGadget (preferences_form,
+ "fadeSecondsLabel", av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ fade_ticks_label = XmCreateLabelGadget (preferences_form, "fadeTicksLabel",
+ av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ lock_label = XmCreateLabelGadget (preferences_form, "lockLabel", av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_END); ac++;
+ passwd_label = XmCreateLabelGadget (preferences_form, "passwdLabel", av, ac);
+ ac = 0;
+ timeout_text = XmCreateTextField (preferences_form, "timeoutText", av, ac);
+ cycle_text = XmCreateTextField (preferences_form, "cycleText", av, ac);
+ fade_text = XmCreateTextField (preferences_form, "fadeSecondsText", av, ac);
+ fade_ticks_text = XmCreateTextField (preferences_form, "fadeTicksText",
+ av, ac);
+ lock_timeout_text = XmCreateTextField (preferences_form, "passwdText",
+ av, ac);
+ passwd_timeout_text = XmCreateTextField (preferences_form, "lockText",
+ av, ac);
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+ verbose_toggle = XmCreateToggleButtonGadget (preferences_form,
+ "verboseToggle", av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+ install_cmap_toggle = XmCreateToggleButtonGadget (preferences_form,
+ "cmapToggle", av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+ fade_toggle = XmCreateToggleButtonGadget (preferences_form, "fadeToggle",
+ av, ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+ unfade_toggle = XmCreateToggleButtonGadget (preferences_form, "unfadeToggle",
+ av,ac);
+ ac = 0;
+ XtSetArg(av[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
+ lock_toggle = XmCreateToggleButtonGadget (preferences_form, "lockToggle",
+ av, ac);
+ ac = 0;
+ hr = XmCreateSeparatorGadget (preferences_form, "separator", av, ac);
+
+ prefs_done = XmCreatePushButtonGadget (preferences_form, "OK", av, ac);
+ prefs_cancel = XmCreatePushButtonGadget (preferences_form, "Cancel", av, ac);
+
+ XtVaSetValues (timeout_label,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNtopOffset, 4,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomWidget, timeout_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 20,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, timeout_text,
+ 0);
+
+ XtVaSetValues (cycle_label,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, cycle_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, cycle_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 20,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, cycle_text,
+ 0);
+
+ XtVaSetValues (fade_seconds_label,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, fade_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, fade_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 20,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, fade_text,
+ 0);
+
+ XtVaSetValues (fade_ticks_label,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, fade_ticks_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, fade_ticks_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 20,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, fade_ticks_text,
+ 0);
+
+ XtVaSetValues (lock_label,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, lock_timeout_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, lock_timeout_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 19,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, lock_timeout_text,
+ 0);
+
+ XtVaSetValues (passwd_label,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, passwd_timeout_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, passwd_timeout_text,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 14,
+ XmNrightAttachment, XmATTACH_WIDGET,
+ XmNrightOffset, 4,
+ XmNrightWidget, passwd_timeout_text,
+ 0);
+
+ XtVaSetValues (timeout_text,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNtopOffset, 4,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNleftOffset, 141,
+ 0);
+
+ XtVaSetValues (cycle_text,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopOffset, 2,
+ XmNtopWidget, timeout_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, timeout_text,
+ 0);
+
+ XtVaSetValues (fade_text,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopOffset, 2,
+ XmNtopWidget, cycle_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, cycle_text,
+ 0);
+
+ XtVaSetValues (fade_ticks_text,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopOffset, 2,
+ XmNtopWidget, fade_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, fade_text,
+ 0);
+
+ XtVaSetValues (lock_timeout_text,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopOffset, 2,
+ XmNtopWidget, fade_ticks_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, fade_ticks_text,
+ 0);
+
+ XtVaSetValues (passwd_timeout_text,
+ XmNtopAttachment, XmATTACH_WIDGET,
+ XmNtopOffset, 4,
+ XmNtopWidget, lock_timeout_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, lock_timeout_text,
+ 0);
+
+ XtVaSetValues (verbose_toggle,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNtopOffset, 4,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, timeout_text,
+ XmNleftAttachment, XmATTACH_WIDGET,
+ XmNleftOffset, 20,
+ XmNleftWidget, timeout_text,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNrightOffset, 20,
+ 0);
+
+ XtVaSetValues (install_cmap_toggle,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, cycle_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, cycle_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, verbose_toggle,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNrightOffset, 20,
+ 0);
+
+ XtVaSetValues (fade_toggle,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, fade_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, fade_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, install_cmap_toggle,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNrightOffset, 20,
+ 0);
+
+ XtVaSetValues (unfade_toggle,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, fade_ticks_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, fade_ticks_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, fade_toggle,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNrightOffset, 20,
+ 0);
+
+ XtVaSetValues (lock_toggle,
+ XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNtopOffset, 0,
+ XmNtopWidget, lock_timeout_text,
+ XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNbottomOffset, 0,
+ XmNbottomWidget, lock_timeout_text,
+ XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
+ XmNleftOffset, 0,
+ XmNleftWidget, unfade_toggle,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNrightOffset, 20,
+ 0);
+
+ XtVaSetValues (hr,
+ XmNtopWidget, passwd_timeout_text,
+ XmNbottomAttachment, XmATTACH_FORM,
+ XmNbottomOffset, 4,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ 0);
+
+ XtVaSetValues (prefs_done,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ XtVaSetValues (prefs_cancel,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+ XtVaSetValues (hr,
+ XmNbottomAttachment, XmATTACH_WIDGET,
+ XmNbottomWidget, prefs_done,
+ 0);
+
+ ac = 0;
+ children[ac++] = timeout_label;
+ children[ac++] = cycle_label;
+ children[ac++] = fade_seconds_label;
+ children[ac++] = fade_ticks_label;
+ children[ac++] = lock_label;
+ children[ac++] = passwd_label;
+ children[ac++] = timeout_text;
+ children[ac++] = cycle_text;
+ children[ac++] = fade_text;
+ children[ac++] = fade_ticks_text;
+ children[ac++] = lock_timeout_text;
+ children[ac++] = passwd_timeout_text;
+ children[ac++] = verbose_toggle;
+ children[ac++] = install_cmap_toggle;
+ children[ac++] = fade_toggle;
+ children[ac++] = unfade_toggle;
+ children[ac++] = lock_toggle;
+ children[ac++] = hr;
+
+ XtManageChildren(children, ac);
+ ac = 0;
+
+ XtManageChild (prefs_done);
+ XtManageChild (prefs_cancel);
+
+ XtManageChild (preferences_form);
+
+ XtVaSetValues (preferences_form,
+ XmNleftAttachment, XmATTACH_FORM,
+ XmNrightAttachment, XmATTACH_FORM,
+ XmNtopAttachment, XmATTACH_FORM,
+ XmNbottomAttachment, XmATTACH_FORM,
+ 0);
+
+ return preferences_form;
+}
--- /dev/null
+/* demo-Xm.c --- implements the interactive demo-mode and options dialogs.
+ * xscreensaver, Copyright (c) 1993-1999 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#ifdef HAVE_MOTIF /* whole file */
+
+#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef VMS
+# include <pwd.h> /* for getpwuid() */
+#else /* VMS */
+# include "vms-pwd.h"
+#endif /* VMS */
+
+#ifdef HAVE_UNAME
+# include <sys/utsname.h> /* for uname() */
+#endif /* HAVE_UNAME */
+
+#include <stdio.h>
+
+#include <X11/Xproto.h> /* for CARD32 */
+#include <X11/Xatom.h> /* for XA_INTEGER */
+#include <X11/Intrinsic.h>
+#include <X11/StringDefs.h>
+
+/* We don't actually use any widget internals, but these are included
+ so that gdb will have debug info for the widgets... */
+#include <X11/IntrinsicP.h>
+#include <X11/ShellP.h>
+
+#ifdef HAVE_XPM
+# include <X11/xpm.h>
+#endif /* HAVE_XPM */
+
+#ifdef HAVE_XMU
+# ifndef VMS
+# include <X11/Xmu/Error.h>
+# else /* VMS */
+# include <Xmu/Error.h>
+# endif
+#else
+# include "xmu.h"
+#endif
+
+
+
+#include <Xm/Xm.h>
+#include <Xm/List.h>
+#include <Xm/PushB.h>
+#include <Xm/LabelG.h>
+#include <Xm/RowColumn.h>
+#include <Xm/MessageB.h>
+
+#include "version.h"
+#include "prefs.h"
+#include "resources.h" /* for parse_time() */
+#include "visual.h" /* for has_writable_cells() */
+#include "remote.h" /* for xscreensaver_command() */
+#include "usleep.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+
+char *progname = 0;
+char *progclass = "XScreenSaver";
+XrmDatabase db;
+
+typedef struct {
+ saver_preferences *a, *b;
+} prefs_pair;
+
+static void *global_prefs_pair; /* I hate C so much... */
+
+char *blurb (void) { return progname; }
+
+extern Widget create_xscreensaver_demo (Widget parent);
+extern const char *visual_menu[];
+
+
+static char *short_version = 0;
+
+Atom XA_VROOT;
+Atom XA_SCREENSAVER, XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_VERSION;
+Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO;
+Atom XA_ACTIVATE, XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
+
+
+static void populate_demo_window (Widget toplevel,
+ int which, prefs_pair *pair);
+static void populate_prefs_page (Widget top, prefs_pair *pair);
+static int apply_changes_and_save (Widget widget);
+static int maybe_reload_init_file (Widget widget, prefs_pair *pair);
+
+\f
+/* Some random utility functions
+ */
+
+static Widget
+name_to_widget (Widget widget, const char *name)
+{
+ Widget parent;
+ char name2[255];
+ name2[0] = '*';
+ strcpy (name2+1, name);
+
+ while ((parent = XtParent (widget)))
+ widget = parent;
+ return XtNameToWidget (widget, name2);
+}
+
+
+
+/* Why this behavior isn't automatic in *either* toolkit, I'll never know.
+ Takes a scroller, viewport, or list as an argument.
+ */
+static void
+ensure_selected_item_visible (Widget list)
+{
+ int *pos_list = 0;
+ int pos_count = 0;
+ if (XmListGetSelectedPos (list, &pos_list, &pos_count) && pos_count > 0)
+ {
+ int top = -2;
+ int visible = 0;
+ XtVaGetValues (list,
+ XmNtopItemPosition, &top,
+ XmNvisibleItemCount, &visible,
+ 0);
+ if (pos_list[0] >= top + visible)
+ {
+ int pos = pos_list[0] - visible + 1;
+ if (pos < 0) pos = 0;
+ XmListSetPos (list, pos);
+ }
+ else if (pos_list[0] < top)
+ {
+ XmListSetPos (list, pos_list[0]);
+ }
+ }
+ if (pos_list)
+ XtFree ((char *) pos_list);
+}
+
+
+static void
+warning_dialog_dismiss_cb (Widget button, XtPointer client_data,
+ XtPointer user_data)
+{
+ Widget shell = (Widget) client_data;
+ XtDestroyWidget (shell);
+}
+
+
+static void
+warning_dialog (Widget parent, const char *message, int center)
+{
+ char *msg = strdup (message);
+ char *head;
+
+ Widget dialog = 0;
+ Widget label = 0;
+ Widget ok = 0;
+ int i = 0;
+
+ Widget w;
+ Widget container;
+ XmString xmstr;
+ Arg av[10];
+ int ac = 0;
+
+ ac = 0;
+ dialog = XmCreateWarningDialog (parent, "warning", av, ac);
+
+ w = XmMessageBoxGetChild (dialog, XmDIALOG_MESSAGE_LABEL);
+ if (w) XtUnmanageChild (w);
+ w = XmMessageBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON);
+ if (w) XtUnmanageChild (w);
+ w = XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON);
+ if (w) XtUnmanageChild (w);
+
+ ok = XmMessageBoxGetChild (dialog, XmDIALOG_OK_BUTTON);
+
+ ac = 0;
+ XtSetArg (av[ac], XmNnumColumns, 1); ac++;
+ XtSetArg (av[ac], XmNorientation, XmVERTICAL); ac++;
+ XtSetArg (av[ac], XmNpacking, XmPACK_COLUMN); ac++;
+ XtSetArg (av[ac], XmNrowColumnType, XmWORK_AREA); ac++;
+ XtSetArg (av[ac], XmNspacing, 0); ac++;
+ container = XmCreateRowColumn (dialog, "container", av, ac);
+
+ head = msg;
+ while (head)
+ {
+ char name[20];
+ char *s = strchr (head, '\n');
+ if (s) *s = 0;
+
+ sprintf (name, "label%d", i++);
+
+ xmstr = XmStringCreate (head, XmSTRING_DEFAULT_CHARSET);
+ ac = 0;
+ XtSetArg (av[ac], XmNlabelString, xmstr); ac++;
+ XtSetArg (av[ac], XmNmarginHeight, 0); ac++;
+ label = XmCreateLabelGadget (container, name, av, ac);
+ XtManageChild (label);
+ XmStringFree (xmstr);
+
+ if (s)
+ head = s+1;
+ else
+ head = 0;
+
+ center--;
+ }
+
+ XtManageChild (container);
+ XtRealizeWidget (dialog);
+ XtManageChild (dialog);
+
+ XtAddCallback (ok, XmNactivateCallback, warning_dialog_dismiss_cb, dialog);
+
+ free (msg);
+}
+
+
+static void
+run_cmd (Widget widget, Atom command, int arg)
+{
+ char *err = 0;
+ int status;
+
+ apply_changes_and_save (widget);
+ status = xscreensaver_command (XtDisplay (widget),
+ command, arg, False, &err);
+ if (status < 0)
+ {
+ char buf [255];
+ if (err)
+ sprintf (buf, "Error:\n\n%s", err);
+ else
+ strcpy (buf, "Unknown error!");
+ warning_dialog (widget, buf, 100);
+ }
+ if (err) free (err);
+}
+
+
+static void
+run_hack (Widget widget, int which, Bool report_errors_p)
+{
+ if (which < 0) return;
+ apply_changes_and_save (widget);
+ if (report_errors_p)
+ run_cmd (widget, XA_DEMO, which + 1);
+ else
+ {
+ char *s = 0;
+ xscreensaver_command (XtDisplay (widget), XA_DEMO, which + 1, False, &s);
+ if (s) free (s);
+ }
+}
+
+
+\f
+/* Button callbacks
+ */
+
+void
+exit_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ apply_changes_and_save (XtParent (button));
+ exit (0);
+}
+
+#if 0
+static void
+wm_close_cb (Widget widget, GdkEvent *event, XtPointer data)
+{
+ apply_changes_and_save (XtParent (button));
+ exit (0);
+}
+#endif
+
+void
+cut_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ /* #### */
+ warning_dialog (XtParent (button),
+ "Error:\n\n"
+ "cut unimplemented\n", 1);
+}
+
+
+void
+copy_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ /* #### */
+ warning_dialog (XtParent (button),
+ "Error:\n\n"
+ "copy unimplemented\n", 1);
+}
+
+
+void
+paste_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ /* #### */
+ warning_dialog (XtParent (button),
+ "Error:\n\n"
+ "paste unimplemented\n", 1);
+}
+
+
+void
+about_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ char buf [2048];
+ char *s = strdup (screensaver_id + 4);
+ char *s2;
+
+ s2 = strchr (s, ',');
+ *s2 = 0;
+ s2 += 2;
+
+ sprintf (buf, "%s\n%s\n\n"
+ "For updates, check http://www.jwz.org/xscreensaver/",
+ s, s2);
+ free (s);
+
+ warning_dialog (XtParent (button), buf, 100);
+}
+
+
+void
+doc_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+
+ saver_preferences *p = pair->a;
+ char *help_command;
+
+ if (!p->help_url || !*p->help_url)
+ {
+ warning_dialog (XtParent (button),
+ "Error:\n\n"
+ "No Help URL has been specified.\n", 100);
+ return;
+ }
+
+ help_command = (char *) malloc (strlen (p->load_url_command) +
+ (strlen (p->help_url) * 2) + 20);
+ strcpy (help_command, "( ");
+ sprintf (help_command + strlen(help_command),
+ p->load_url_command, p->help_url, p->help_url);
+ strcat (help_command, " ) &");
+ system (help_command);
+ free (help_command);
+}
+
+
+void
+activate_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ run_cmd (XtParent (button), XA_ACTIVATE, 0);
+}
+
+
+void
+lock_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ run_cmd (XtParent (button), XA_LOCK, 0);
+}
+
+
+void
+kill_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ run_cmd (XtParent (button), XA_EXIT, 0);
+}
+
+
+void
+restart_menu_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+#if 0
+ run_cmd (XtParent (button), XA_RESTART, 0);
+#else
+ button = XtParent (button);
+ apply_changes_and_save (button);
+ xscreensaver_command (XtDisplay (button), XA_EXIT, 0, False, NULL);
+ sleep (1);
+ system ("xscreensaver -nosplash &");
+#endif
+}
+
+
+static int _selected_hack_number = -1;
+
+static int
+selected_hack_number (Widget toplevel)
+{
+ return _selected_hack_number;
+}
+
+
+static int
+demo_write_init_file (Widget widget, saver_preferences *p)
+{
+ if (!write_init_file (p, short_version, False))
+ return 0;
+ else
+ {
+ const char *f = init_file_name();
+ if (!f || !*f)
+ warning_dialog (widget,
+ "Error:\n\nCouldn't determine init file name!\n",
+ 100);
+ else
+ {
+ char *b = (char *) malloc (strlen(f) + 1024);
+ sprintf (b, "Error:\n\nCouldn't write %s\n", f);
+ warning_dialog (widget, b, 100);
+ free (b);
+ }
+ return -1;
+ }
+}
+
+
+static int
+apply_changes_and_save (Widget widget)
+{
+ prefs_pair *pair = global_prefs_pair;
+ saver_preferences *p = pair->a;
+ Widget list_widget = name_to_widget (widget, "list");
+ int which = selected_hack_number (widget);
+
+ Widget cmd = name_to_widget (widget, "cmdText");
+ Widget enabled = name_to_widget (widget, "enabled");
+
+ Widget vis = name_to_widget (widget, "combo");
+# ifdef HAVE_XMCOMBOBOX
+ Widget text;
+# else /* !HAVE_XMCOMBOBOX */
+ Widget menu = 0, *kids = 0, selected_item = 0;
+ Cardinal nkids;
+ int i = 0;
+# endif /* !HAVE_XMCOMBOBOX */
+
+ Bool enabled_p = False;
+ const char *visual = 0;
+ const char *command = 0;
+
+ char c;
+ unsigned long id;
+
+ if (which < 0) return -1;
+
+# ifdef HAVE_XMCOMBOBOX
+ XtVaGetValues (vis, XmNtextField, &text, 0);
+ XtVaGetValues (text, XmNvalue, &visual, 0);
+
+# else /* !HAVE_XMCOMBOBOX */
+ XtVaGetValues (vis, XmNsubMenuId, &menu, 0);
+ XtVaGetValues (menu, XmNnumChildren, &nkids, XmNchildren, &kids, 0);
+ XtVaGetValues (menu, XmNmenuHistory, &selected_item, 0);
+ if (selected_item)
+ for (i = 0; i < nkids; i++)
+ if (kids[i] == selected_item)
+ break;
+
+ visual = visual_menu[i];
+# endif /* !HAVE_XMCOMBOBOX */
+
+ XtVaGetValues (enabled, XmNset, &enabled_p, 0);
+ XtVaGetValues (cmd, XtNvalue, &command, 0);
+
+ if (maybe_reload_init_file (widget, pair) != 0)
+ return 1;
+
+ /* Sanity-check and canonicalize whatever the user typed into the combo box.
+ */
+ if (!strcasecmp (visual, "")) visual = "";
+ else if (!strcasecmp (visual, "any")) visual = "";
+ else if (!strcasecmp (visual, "default")) visual = "Default";
+ else if (!strcasecmp (visual, "default-n")) visual = "Default-N";
+ else if (!strcasecmp (visual, "default-i")) visual = "Default-I";
+ else if (!strcasecmp (visual, "best")) visual = "Best";
+ else if (!strcasecmp (visual, "mono")) visual = "Mono";
+ else if (!strcasecmp (visual, "monochrome")) visual = "Mono";
+ else if (!strcasecmp (visual, "gray")) visual = "Gray";
+ else if (!strcasecmp (visual, "grey")) visual = "Gray";
+ else if (!strcasecmp (visual, "color")) visual = "Color";
+ else if (!strcasecmp (visual, "gl")) visual = "GL";
+ else if (!strcasecmp (visual, "staticgray")) visual = "StaticGray";
+ else if (!strcasecmp (visual, "staticcolor")) visual = "StaticColor";
+ else if (!strcasecmp (visual, "truecolor")) visual = "TrueColor";
+ else if (!strcasecmp (visual, "grayscale")) visual = "GrayScale";
+ else if (!strcasecmp (visual, "greyscale")) visual = "GrayScale";
+ else if (!strcasecmp (visual, "pseudocolor")) visual = "PseudoColor";
+ else if (!strcasecmp (visual, "directcolor")) visual = "DirectColor";
+ else if (1 == sscanf (visual, " %ld %c", &id, &c)) ;
+ else if (1 == sscanf (visual, " 0x%lx %c", &id, &c)) ;
+ else
+ {
+ XBell (XtDisplay (widget), 0); /* unparsable */
+ visual = "";
+ /* #### gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (vis)->entry), "Any");*/
+ }
+
+ ensure_selected_item_visible (list_widget);
+
+ if (!p->screenhacks[which]->visual)
+ p->screenhacks[which]->visual = strdup ("");
+ if (!p->screenhacks[which]->command)
+ p->screenhacks[which]->command = strdup ("");
+
+ if (p->screenhacks[which]->enabled_p != enabled_p ||
+ !!strcasecmp (p->screenhacks[which]->visual, visual) ||
+ !!strcasecmp (p->screenhacks[which]->command, command))
+ {
+ /* Something was changed -- store results into the struct,
+ and write the file.
+ */
+ free (p->screenhacks[which]->visual);
+ free (p->screenhacks[which]->command);
+ p->screenhacks[which]->visual = strdup (visual);
+ p->screenhacks[which]->command = strdup (command);
+ p->screenhacks[which]->enabled_p = enabled_p;
+
+ return demo_write_init_file (widget, p);
+ }
+
+ /* No changes made */
+ return 0;
+}
+
+void
+run_this_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ int which = selected_hack_number (XtParent (button));
+ if (which < 0) return;
+ if (0 == apply_changes_and_save (XtParent (button)))
+ run_hack (XtParent (button), which, True);
+}
+
+
+void
+manual_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+ saver_preferences *p = pair->a;
+ Widget list_widget = name_to_widget (button, "list");
+ int which = selected_hack_number (button);
+ char *name, *name2, *cmd, *s;
+ if (which < 0) return;
+ apply_changes_and_save (button);
+ ensure_selected_item_visible (list_widget);
+
+ name = strdup (p->screenhacks[which]->command);
+ name2 = name;
+ while (isspace (*name2)) name2++;
+ s = name2;
+ while (*s && !isspace (*s)) s++;
+ *s = 0;
+ s = strrchr (name2, '/');
+ if (s) name = s+1;
+
+ cmd = get_string_resource ("manualCommand", "ManualCommand");
+ if (cmd)
+ {
+ char *cmd2 = (char *) malloc (strlen (cmd) + strlen (name2) + 100);
+ strcpy (cmd2, "( ");
+ sprintf (cmd2 + strlen (cmd2),
+ cmd,
+ name2, name2, name2, name2);
+ strcat (cmd2, " ) &");
+ system (cmd2);
+ free (cmd2);
+ }
+ else
+ {
+ warning_dialog (XtParent (button),
+ "Error:\n\nno `manualCommand' resource set.",
+ 100);
+ }
+
+ free (name);
+}
+
+
+void
+run_next_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+ saver_preferences *p = pair->a;
+
+ Widget list_widget = name_to_widget (button, "list");
+ int which = selected_hack_number (button);
+
+ button = XtParent (button);
+
+ if (which < 0)
+ which = 0;
+ else
+ which++;
+
+ if (which >= p->screenhacks_count)
+ which = 0;
+
+ apply_changes_and_save (button);
+
+ XmListDeselectAllItems (list_widget); /* LessTif lossage */
+ XmListSelectPos (list_widget, which+1, True);
+
+ ensure_selected_item_visible (list_widget);
+ populate_demo_window (button, which, pair);
+ run_hack (button, which, False);
+}
+
+
+void
+run_prev_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+ saver_preferences *p = pair->a;
+
+ Widget list_widget = name_to_widget (button, "list");
+ int which = selected_hack_number (button);
+
+ button = XtParent (button);
+
+ if (which < 0)
+ which = p->screenhacks_count - 1;
+ else
+ which--;
+
+ if (which < 0)
+ which = p->screenhacks_count - 1;
+
+ apply_changes_and_save (button);
+
+ XmListDeselectAllItems (list_widget); /* LessTif lossage */
+ XmListSelectPos (list_widget, which+1, True);
+
+ ensure_selected_item_visible (list_widget);
+ populate_demo_window (button, which, pair);
+ run_hack (button, which, False);
+}
+
+
+/* Helper for the text fields that contain time specifications:
+ this parses the text, and does error checking.
+ */
+static void
+hack_time_text (const char *line, Time *store, Bool sec_p)
+{
+ if (*line)
+ {
+ int value;
+ value = parse_time ((char *) line, sec_p, True);
+ value *= 1000; /* Time measures in microseconds */
+ if (value < 0)
+ /* gdk_beep () */;
+ else
+ *store = value;
+ }
+}
+
+
+void
+prefs_ok_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+
+ saver_preferences *p = pair->a;
+ saver_preferences *p2 = pair->b;
+ Bool changed = False;
+ char *v = 0;
+
+ button = XtParent (button);
+
+# define SECONDS(field, name) \
+ v = 0; \
+ XtVaGetValues (name_to_widget (button, (name)), XtNvalue, &v, 0); \
+ hack_time_text (v, (field), True)
+
+# define MINUTES(field, name) \
+ v = 0; \
+ XtVaGetValues (name_to_widget (button, (name)), XtNvalue, &v, 0); \
+ hack_time_text (v, (field), False)
+
+# define INTEGER(field, name) do { \
+ unsigned int value; \
+ char c; \
+ XtVaGetValues (name_to_widget (button, (name)), XtNvalue, &v, 0); \
+ if (! *v) \
+ ; \
+ else if (sscanf (v, "%u%c", &value, &c) != 1) \
+ XBell(XtDisplay(button), 0); \
+ else \
+ *(field) = value; \
+ } while(0)
+
+# define CHECKBOX(field, name) \
+ XtVaGetValues (name_to_widget (button, (name)), XmNset, &field, 0)
+
+ MINUTES (&p2->timeout, "timeoutText");
+ MINUTES (&p2->cycle, "cycleText");
+ SECONDS (&p2->fade_seconds, "fadeSecondsText");
+ INTEGER (&p2->fade_ticks, "fadeTicksText");
+ MINUTES (&p2->lock_timeout, "lockText");
+ SECONDS (&p2->passwd_timeout, "passwdText");
+ CHECKBOX (p2->verbose_p, "verboseToggle");
+ CHECKBOX (p2->install_cmap_p, "cmapToggle");
+ CHECKBOX (p2->fade_p, "fadeToggle");
+ CHECKBOX (p2->unfade_p, "unfadeToggle");
+ CHECKBOX (p2->lock_p, "lockToggle");
+
+# undef SECONDS
+# undef MINUTES
+# undef INTEGER
+# undef CHECKBOX
+
+# define COPY(field) \
+ if (p->field != p2->field) changed = True; \
+ p->field = p2->field
+
+ COPY(timeout);
+ COPY(cycle);
+ COPY(lock_timeout);
+ COPY(passwd_timeout);
+ COPY(fade_seconds);
+ COPY(fade_ticks);
+ COPY(verbose_p);
+ COPY(install_cmap_p);
+ COPY(fade_p);
+ COPY(unfade_p);
+ COPY(lock_p);
+# undef COPY
+
+ populate_prefs_page (button, pair);
+
+ if (changed)
+ demo_write_init_file (button, p);
+}
+
+
+void
+prefs_cancel_cb (Widget button, XtPointer client_data, XtPointer ignored)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+
+ *pair->b = *pair->a;
+ populate_prefs_page (XtParent (button), pair);
+}
+
+
+static void
+list_select_cb (Widget list, XtPointer client_data, XtPointer call_data)
+{
+ prefs_pair *pair = (prefs_pair *) client_data;
+
+ XmListCallbackStruct *lcb = (XmListCallbackStruct *) call_data;
+ int which = lcb->item_position - 1;
+
+ apply_changes_and_save (list);
+ populate_demo_window (list, which, pair);
+
+ if (lcb->reason == XmCR_DEFAULT_ACTION && which >= 0)
+ run_hack (list, which, True);
+}
+
+\f
+/* Populating the various widgets
+ */
+
+
+/* Formats a `Time' into "H:MM:SS". (Time is microseconds.)
+ */
+static void
+format_time (char *buf, Time time)
+{
+ int s = time / 1000;
+ unsigned int h = 0, m = 0;
+ if (s >= 60)
+ {
+ m += (s / 60);
+ s %= 60;
+ }
+ if (m >= 60)
+ {
+ h += (m / 60);
+ m %= 60;
+ }
+ sprintf (buf, "%u:%02u:%02u", h, m, s);
+}
+
+
+static char *
+make_pretty_name (const char *shell_command)
+{
+ char *s = strdup (shell_command);
+ char *s2;
+ char res_name[255];
+
+ for (s2 = s; *s2; s2++) /* truncate at first whitespace */
+ if (isspace (*s2))
+ {
+ *s2 = 0;
+ break;
+ }
+
+ s2 = strrchr (s, '/'); /* if pathname, take last component */
+ if (s2)
+ {
+ s2 = strdup (s2+1);
+ free (s);
+ s = s2;
+ }
+
+ if (strlen (s) > 50) /* 51 is hereby defined as "unreasonable" */
+ s[50] = 0;
+
+ sprintf (res_name, "hacks.%s.name", s); /* resource? */
+ s2 = get_string_resource (res_name, res_name);
+ if (s2)
+ return s2;
+
+ for (s2 = s; *s2; s2++) /* if it has any capitals, return it */
+ if (*s2 >= 'A' && *s2 <= 'Z')
+ return s;
+
+ if (s[0] >= 'a' && s[0] <= 'z') /* else cap it */
+ s[0] -= 'a'-'A';
+ if (s[0] == 'X' && s[1] >= 'a' && s[1] <= 'z') /* (magic leading X) */
+ s[1] -= 'a'-'A';
+ return s;
+}
+
+
+/* Finds the number of the last hack to run, and makes that item be
+ selected by default.
+ */
+static void
+scroll_to_current_hack (Widget toplevel, prefs_pair *pair)
+{
+ Atom type;
+ int format;
+ unsigned long nitems, bytesafter;
+ CARD32 *data = 0;
+ Display *dpy = XtDisplay (toplevel);
+ int which = 0;
+ Widget list;
+
+ if (XGetWindowProperty (dpy, RootWindow (dpy, 0), /* always screen #0 */
+ XA_SCREENSAVER_STATUS,
+ 0, 3, False, XA_INTEGER,
+ &type, &format, &nitems, &bytesafter,
+ (unsigned char **) &data)
+ == Success
+ && type == XA_INTEGER
+ && nitems >= 3
+ && data)
+ which = (int) data[2] - 1;
+
+ if (data) free (data);
+
+ if (which < 0)
+ return;
+
+ list = name_to_widget (toplevel, "list");
+ apply_changes_and_save (toplevel);
+
+ XmListDeselectAllItems (list); /* LessTif lossage */
+ XmListSelectPos (list, which+1, True);
+
+ ensure_selected_item_visible (list);
+ populate_demo_window (toplevel, which, pair);
+}
+
+
+
+static void
+populate_hack_list (Widget toplevel, prefs_pair *pair)
+{
+ saver_preferences *p = pair->a;
+ Widget list = name_to_widget (toplevel, "list");
+ screenhack **hacks = p->screenhacks;
+ screenhack **h;
+
+ for (h = hacks; *h; h++)
+ {
+ char *pretty_name = (h[0]->name
+ ? strdup (h[0]->name)
+ : make_pretty_name (h[0]->command));
+
+ XmString xmstr = XmStringCreate (pretty_name, XmSTRING_DEFAULT_CHARSET);
+ XmListAddItem (list, xmstr, 0);
+ XmStringFree (xmstr);
+ }
+
+ XtAddCallback (list, XmNbrowseSelectionCallback, list_select_cb, pair);
+ XtAddCallback (list, XmNdefaultActionCallback, list_select_cb, pair);
+}
+
+
+static void
+populate_prefs_page (Widget top, prefs_pair *pair)
+{
+ saver_preferences *p = pair->a;
+ char s[100];
+
+ format_time (s, p->timeout);
+ XtVaSetValues (name_to_widget (top, "timeoutText"), XmNvalue, s, 0);
+ format_time (s, p->cycle);
+ XtVaSetValues (name_to_widget (top, "cycleText"), XmNvalue, s, 0);
+ format_time (s, p->lock_timeout);
+ XtVaSetValues (name_to_widget (top, "lockText"), XmNvalue, s, 0);
+ format_time (s, p->passwd_timeout);
+ XtVaSetValues (name_to_widget (top, "passwdText"), XmNvalue, s, 0);
+ format_time (s, p->fade_seconds);
+ XtVaSetValues (name_to_widget (top, "fadeSecondsText"), XmNvalue, s, 0);
+ sprintf (s, "%u", p->fade_ticks);
+ XtVaSetValues (name_to_widget (top, "fadeTicksText"), XmNvalue, s, 0);
+
+ XtVaSetValues (name_to_widget (top, "verboseToggle"),
+ XmNset, p->verbose_p, 0);
+ XtVaSetValues (name_to_widget (top, "cmapToggle"),
+ XmNset, p->install_cmap_p, 0);
+ XtVaSetValues (name_to_widget (top, "fadeToggle"),
+ XmNset, p->fade_p, 0);
+ XtVaSetValues (name_to_widget (top, "unfadeToggle"),
+ XmNset, p->unfade_p, 0);
+ XtVaSetValues (name_to_widget (top, "lockToggle"),
+ XmNset, p->lock_p, 0);
+
+
+ {
+ Bool found_any_writable_cells = False;
+ Display *dpy = XtDisplay (top);
+ int nscreens = ScreenCount(dpy);
+ int i;
+ for (i = 0; i < nscreens; i++)
+ {
+ Screen *s = ScreenOfDisplay (dpy, i);
+ if (has_writable_cells (s, DefaultVisualOfScreen (s)))
+ {
+ found_any_writable_cells = True;
+ break;
+ }
+ }
+
+ XtVaSetValues (name_to_widget (top, "fadeSecondsLabel"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "fadeTicksLabel"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "fadeSecondsText"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "fadeTicksText"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "cmapToggle"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "fadeToggle"), XtNsensitive,
+ found_any_writable_cells, 0);
+ XtVaSetValues (name_to_widget (top, "unfadeToggle"), XtNsensitive,
+ found_any_writable_cells, 0);
+ }
+}
+
+
+static void
+sensitize_demo_widgets (Widget toplevel, Bool sensitive_p)
+{
+ const char *names[] = { "cmdLabel", "cmdText", "enabled",
+ "visLabel", "combo", "demo", "man" };
+ int i;
+ for (i = 0; i < sizeof(names)/countof(*names); i++)
+ {
+ Widget w = name_to_widget (toplevel, names[i]);
+ XtVaSetValues (w, XtNsensitive, sensitive_p, 0);
+ }
+
+ /* I don't know how to handle these yet... */
+ {
+ const char *names2[] = { "cut", "copy", "paste" };
+ for (i = 0; i < sizeof(names2)/countof(*names2); i++)
+ {
+ Widget w = name_to_widget (toplevel, names2[i]);
+ XtVaSetValues (w, XtNsensitive, FALSE, 0);
+ }
+ }
+}
+
+
+\f
+/* Pixmaps for the up and down arrow buttons (yeah, this is sleazy...)
+ */
+
+#ifdef HAVE_XPM
+
+static char *up_arrow_xpm[] = {
+ "15 15 4 1",
+ " c None s background",
+ "- c #FFFFFF",
+ "+ c #D6D6D6",
+ "@ c #000000",
+
+ " @ ",
+ " @ ",
+ " -+@ ",
+ " -+@ ",
+ " -+++@ ",
+ " -+++@ ",
+ " -+++++@ ",
+ " -+++++@ ",
+ " -+++++++@ ",
+ " -+++++++@ ",
+ " -+++++++++@ ",
+ " -+++++++++@ ",
+ " -+++++++++++@ ",
+ " @@@@@@@@@@@@@ ",
+ " "
+};
+
+static char *down_arrow_xpm[] = {
+ "15 15 4 1",
+ " c None s background",
+ "- c #FFFFFF",
+ "+ c #D6D6D6",
+ "@ c #000000",
+
+ " ",
+ " ------------- ",
+ " -+++++++++++@ ",
+ " -+++++++++@ ",
+ " -+++++++++@ ",
+ " -+++++++@ ",
+ " -+++++++@ ",
+ " -+++++@ ",
+ " -+++++@ ",
+ " -+++@ ",
+ " -+++@ ",
+ " -+@ ",
+ " -+@ ",
+ " @ ",
+ " @ "
+};
+
+#endif /* HAVE_XPM */
+
+
+static void
+pixmapify_buttons (Widget toplevel)
+{
+#ifdef HAVE_XPM
+
+ Display *dpy = XtDisplay (toplevel);
+ Window window = XtWindow (toplevel);
+ XWindowAttributes xgwa;
+ XpmAttributes xpmattrs;
+ Pixmap up_pixmap = 0, down_pixmap = 0;
+ int result;
+ Widget up = name_to_widget (toplevel, "up");
+ Widget dn = name_to_widget (toplevel, "down");
+# ifdef XpmColorSymbols
+ XColor xc;
+ XpmColorSymbol symbols[2];
+ char color[20];
+# endif
+
+ XGetWindowAttributes (dpy, window, &xgwa);
+
+ xpmattrs.valuemask = 0;
+
+# ifdef XpmColorSymbols
+ symbols[0].name = "background";
+ symbols[0].pixel = 0;
+ symbols[1].name = 0;
+ XtVaGetValues (up, XmNbackground, &xc, 0);
+ XQueryColor (dpy, xgwa.colormap, &xc);
+ sprintf (color, "#%04X%04X%04X", xc.red, xc.green, xc.blue);
+ symbols[0].value = color;
+ symbols[0].pixel = xc.pixel;
+
+ xpmattrs.valuemask |= XpmColorSymbols;
+ xpmattrs.colorsymbols = symbols;
+ xpmattrs.numsymbols = 1;
+# endif
+
+# ifdef XpmCloseness
+ xpmattrs.valuemask |= XpmCloseness;
+ xpmattrs.closeness = 40000;
+# endif
+# ifdef XpmVisual
+ xpmattrs.valuemask |= XpmVisual;
+ xpmattrs.visual = xgwa.visual;
+# endif
+# ifdef XpmDepth
+ xpmattrs.valuemask |= XpmDepth;
+ xpmattrs.depth = xgwa.depth;
+# endif
+# ifdef XpmColormap
+ xpmattrs.valuemask |= XpmColormap;
+ xpmattrs.colormap = xgwa.colormap;
+# endif
+
+ result = XpmCreatePixmapFromData(dpy, window, up_arrow_xpm,
+ &up_pixmap, 0 /* mask */, &xpmattrs);
+ if (!up_pixmap || (result != XpmSuccess && result != XpmColorError))
+ {
+ fprintf (stderr, "%s: Can't load pixmaps\n", progname);
+ return;
+ }
+
+ result = XpmCreatePixmapFromData(dpy, window, down_arrow_xpm,
+ &down_pixmap, 0 /* mask */, &xpmattrs);
+ if (!down_pixmap || (result != XpmSuccess && result != XpmColorError))
+ {
+ fprintf (stderr, "%s: Can't load pixmaps\n", progname);
+ return;
+ }
+
+ XtVaSetValues (up, XmNlabelType, XmPIXMAP, XmNlabelPixmap, up_pixmap, 0);
+ XtVaSetValues (dn, XmNlabelType, XmPIXMAP, XmNlabelPixmap, down_pixmap, 0);
+
+#endif /* HAVE_XPM */
+}
+
+
+
+char *
+get_hack_blurb (screenhack *hack)
+{
+ char *doc_string;
+ char *prog_name = strdup (hack->command);
+ char *pretty_name = (hack->name
+ ? strdup (hack->name)
+ : make_pretty_name (hack->command));
+ char doc_name[255], doc_class[255];
+ char *s, *s2;
+
+ for (s = prog_name; *s && !isspace(*s); s++)
+ ;
+ *s = 0;
+ s = strrchr (prog_name, '/');
+ if (s) strcpy (prog_name, s+1);
+
+ sprintf (doc_name, "hacks.%s.documentation", pretty_name);
+ sprintf (doc_class, "hacks.%s.documentation", prog_name);
+ free (prog_name);
+ free (pretty_name);
+
+ doc_string = get_string_resource (doc_name, doc_class);
+ if (doc_string)
+ {
+ for (s = doc_string; *s; s++)
+ {
+ if (*s == '\n')
+ {
+ /* skip over whitespace at beginning of line */
+ s++;
+ while (*s && (*s == ' ' || *s == '\t'))
+ s++;
+ }
+ else if (*s == ' ' || *s == '\t')
+ {
+ /* compress all other horizontal whitespace. */
+ *s = ' ';
+ s++;
+ for (s2 = s; *s2 && (*s2 == ' ' || *s2 == '\t'); s2++)
+ ;
+ if (s2 > s) strcpy (s, s2);
+ s--;
+ }
+ }
+
+ while (*s && isspace (*s)) /* Strip trailing whitespace */
+ *(--s) = 0;
+
+ /* Delete whitespace at end of each line. */
+ for (; s > doc_string; s--)
+ if (*s == '\n' && (s[-1] == ' ' || s[-1] == '\t'))
+ {
+ for (s2 = s-1;
+ s2 > doc_string && (*s2 == ' ' || *s2 == '\t');
+ s2--)
+ ;
+ s2++;
+ if (s2 < s) strcpy (s2, s);
+ s = s2;
+ }
+
+ /* Delete leading blank lines. */
+ for (s = doc_string; *s == '\n'; s++)
+ ;
+ if (s > doc_string) strcpy (doc_string, s);
+ }
+ else
+ {
+ static int doc_installed = 0;
+ if (doc_installed == 0)
+ {
+ if (get_boolean_resource ("hacks.documentation.isInstalled",
+ "hacks.documentation.isInstalled"))
+ doc_installed = 1;
+ else
+ doc_installed = -1;
+ }
+
+ if (doc_installed < 0)
+ doc_string =
+ strdup ("Error:\n\n"
+ "The documentation strings do not appear to be "
+ "installed. This is probably because there is "
+ "an \"XScreenSaver\" app-defaults file installed "
+ "that is from an older version of the program. "
+ "To fix this problem, delete that file, or "
+ "install a current version (either will work.)");
+ else
+ doc_string = strdup ("");
+ }
+
+ return doc_string;
+}
+
+
+static void
+populate_demo_window (Widget toplevel, int which, prefs_pair *pair)
+{
+ saver_preferences *p = pair->a;
+ screenhack *hack = (which >= 0 ? p->screenhacks[which] : 0);
+ Widget frameL = name_to_widget (toplevel, "frameLabel");
+ Widget doc = name_to_widget (toplevel, "doc");
+ Widget cmd = name_to_widget (toplevel, "cmdText");
+ Widget enabled = name_to_widget (toplevel, "enabled");
+ Widget vis = name_to_widget (toplevel, "combo");
+ int i = 0;
+
+ char *pretty_name = (hack
+ ? (hack->name
+ ? strdup (hack->name)
+ : make_pretty_name (hack->command))
+ : 0);
+ char *doc_string = hack ? get_hack_blurb (hack) : 0;
+
+ XmString xmstr;
+
+ xmstr = XmStringCreate (pretty_name, XmSTRING_DEFAULT_CHARSET);
+ XtVaSetValues (frameL, XmNlabelString, xmstr, 0);
+ XmStringFree (xmstr);
+
+ XtVaSetValues (doc, XmNvalue, doc_string, 0);
+ XtVaSetValues (cmd, XmNvalue, (hack ? hack->command : ""), 0);
+
+ XtVaSetValues (enabled, XmNset, (hack ? hack->enabled_p : False), 0);
+
+ i = 0;
+ if (hack && hack->visual && *hack->visual)
+ for (i = 0; visual_menu[i]; i++)
+ if (!strcasecmp (hack->visual, visual_menu[i]))
+ break;
+ if (!visual_menu[i]) i = -1;
+
+ {
+# ifdef HAVE_XMCOMBOBOX
+ Widget text = 0;
+ XtVaGetValues (vis, XmNtextField, &text, 0);
+ XtVaSetValues (vis, XmNselectedPosition, i, 0);
+ if (i < 0)
+ XtVaSetValues (text, XmNvalue, hack->visual, 0);
+# else /* !HAVE_XMCOMBOBOX */
+ Cardinal nkids;
+ Widget *kids;
+ Widget menu;
+
+ XtVaGetValues (vis, XmNsubMenuId, &menu, 0);
+ if (!menu) abort ();
+ XtVaGetValues (menu, XmNnumChildren, &nkids, XmNchildren, &kids, 0);
+ if (!kids) abort();
+ if (i < nkids)
+ XtVaSetValues (vis, XmNmenuHistory, kids[i], 0);
+# endif /* !HAVE_XMCOMBOBOX */
+ }
+
+ sensitize_demo_widgets (toplevel, (hack ? True : False));
+
+ if (pretty_name) free (pretty_name);
+ if (doc_string) free (doc_string);
+
+ _selected_hack_number = which;
+}
+
+
+
+static int
+maybe_reload_init_file (Widget widget, prefs_pair *pair)
+{
+ int status = 0;
+ saver_preferences *p = pair->a;
+
+ static Bool reentrant_lock = False;
+ if (reentrant_lock) return 0;
+ reentrant_lock = True;
+
+ if (init_file_changed_p (p))
+ {
+ const char *f = init_file_name();
+ char *b;
+ int which;
+ Widget list;
+
+ if (!f || !*f) return 0;
+ b = (char *) malloc (strlen(f) + 1024);
+ sprintf (b,
+ "Warning:\n\n"
+ "file \"%s\" has changed, reloading.\n",
+ f);
+ warning_dialog (widget, b, 100);
+ free (b);
+
+ load_init_file (p);
+
+ which = selected_hack_number (widget);
+ list = name_to_widget (widget, "list");
+
+ XtVaSetValues (list, XmNitemCount, 0, 0);
+
+ populate_hack_list (widget, pair);
+
+ XmListDeselectAllItems (list); /* LessTif lossage */
+ XmListSelectPos (list, which+1, True);
+
+ populate_prefs_page (widget, pair);
+ populate_demo_window (widget, which, pair);
+ ensure_selected_item_visible (list);
+
+ status = 1;
+ }
+
+ reentrant_lock = False;
+ return status;
+}
+
+
+\f
+/* Attach all callback functions to widgets
+ */
+
+static void
+add_callbacks (Widget toplevel, prefs_pair *pair)
+{
+ Widget w;
+
+# define CB(NAME,FN) \
+ w = name_to_widget (toplevel, (NAME)); \
+ XtAddCallback (w, XmNactivateCallback, (FN), pair)
+
+ CB ("blank", activate_menu_cb);
+ CB ("lock", lock_menu_cb);
+ CB ("kill", kill_menu_cb);
+ CB ("restart", restart_menu_cb);
+ CB ("exit", exit_menu_cb);
+
+ CB ("cut", cut_menu_cb);
+ CB ("copy", copy_menu_cb);
+ CB ("paste", paste_menu_cb);
+
+ CB ("about", about_menu_cb);
+ CB ("docMenu", doc_menu_cb);
+
+ CB ("down", run_next_cb);
+ CB ("up", run_prev_cb);
+ CB ("demo", run_this_cb);
+ CB ("man", manual_cb);
+
+ CB ("preferencesForm.Cancel", prefs_cancel_cb);
+ CB ("preferencesForm.OK", prefs_ok_cb);
+
+# undef CB
+}
+
+
+static void
+sanity_check_resources (Widget toplevel)
+{
+ const char *names[] = { "demoTab", "optionsTab", "cmdLabel", "visLabel",
+ "enabled", "demo", "man", "timeoutLabel",
+ "cycleLabel", "fadeSecondsLabel", "fadeTicksLabel",
+ "lockLabel", "passwdLabel" };
+ int i;
+ for (i = 0; i < sizeof(names)/countof(*names); i++)
+ {
+ Widget w = name_to_widget (toplevel, names[i]);
+ const char *name = XtName(w);
+ XmString xm = 0;
+ char *label = 0;
+ XtVaGetValues (w, XmNlabelString, &xm, 0);
+ if (xm) XmStringGetLtoR (xm, XmSTRING_DEFAULT_CHARSET, &label);
+ if (w && (!label || !strcmp (name, label)))
+ {
+ xm = XmStringCreate ("ERROR", XmSTRING_DEFAULT_CHARSET);
+ XtVaSetValues (w, XmNlabelString, xm, 0);
+ }
+ }
+}
+
+/* Set certain buttons to be the same size (the max of the set.)
+ */
+static void
+hack_button_sizes (Widget toplevel)
+{
+ Widget demo = name_to_widget (toplevel, "demo");
+ Widget man = name_to_widget (toplevel, "man");
+ Widget ok = name_to_widget (toplevel, "OK");
+ Widget can = name_to_widget (toplevel, "Cancel");
+ Widget up = name_to_widget (toplevel, "up");
+ Widget down = name_to_widget (toplevel, "down");
+ Dimension w1, w2;
+
+ XtVaGetValues (demo, XmNwidth, &w1, 0);
+ XtVaGetValues (man, XmNwidth, &w2, 0);
+ XtVaSetValues ((w1 > w2 ? man : demo), XmNwidth, (w1 > w2 ? w1 : w2), 0);
+
+ XtVaGetValues (ok, XmNwidth, &w1, 0);
+ XtVaGetValues (can, XmNwidth, &w2, 0);
+ XtVaSetValues ((w1 > w2 ? can : ok), XmNwidth, (w1 > w2 ? w1 : w2), 0);
+
+ XtVaGetValues (up, XmNwidth, &w1, 0);
+ XtVaGetValues (down, XmNwidth, &w2, 0);
+ XtVaSetValues ((w1 > w2 ? down : up), XmNwidth, (w1 > w2 ? w1 : w2), 0);
+}
+
+
+
+\f
+/* The main demo-mode command loop.
+ */
+
+#if 0
+static Bool
+mapper (XrmDatabase *db, XrmBindingList bindings, XrmQuarkList quarks,
+ XrmRepresentation *type, XrmValue *value, XPointer closure)
+{
+ int i;
+ for (i = 0; quarks[i]; i++)
+ {
+ if (bindings[i] == XrmBindTightly)
+ fprintf (stderr, (i == 0 ? "" : "."));
+ else if (bindings[i] == XrmBindLoosely)
+ fprintf (stderr, "*");
+ else
+ fprintf (stderr, " ??? ");
+ fprintf(stderr, "%s", XrmQuarkToString (quarks[i]));
+ }
+
+ fprintf (stderr, ": %s\n", (char *) value->addr);
+
+ return False;
+}
+#endif
+
+
+static void
+the_network_is_not_the_computer (Widget parent)
+{
+ Display *dpy = XtDisplay (parent);
+ char *rversion, *ruser, *rhost;
+ char *luser, *lhost;
+ char *msg = 0;
+ struct passwd *p = getpwuid (getuid ());
+ const char *d = DisplayString (dpy);
+
+# if defined(HAVE_UNAME)
+ struct utsname uts;
+ if (uname (&uts) < 0)
+ lhost = "<UNKNOWN>";
+ else
+ lhost = uts.nodename;
+# elif defined(VMS)
+ strcpy (lhost, getenv("SYS$NODE"));
+# else /* !HAVE_UNAME && !VMS */
+ strcat (lhost, "<UNKNOWN>");
+# endif /* !HAVE_UNAME && !VMS */
+
+ if (p && p->pw_name)
+ luser = p->pw_name;
+ else
+ luser = "???";
+
+ server_xscreensaver_version (dpy, &rversion, &ruser, &rhost);
+
+ /* Make a buffer that's big enough for a number of copies of all the
+ strings, plus some. */
+ msg = (char *) malloc (10 * ((rversion ? strlen(rversion) : 0) +
+ (ruser ? strlen(ruser) : 0) +
+ (rhost ? strlen(rhost) : 0) +
+ strlen(lhost) +
+ strlen(luser) +
+ strlen(d) +
+ 1024));
+ *msg = 0;
+
+ if (!rversion || !*rversion)
+ {
+ sprintf (msg,
+ "Warning:\n\n"
+ "The XScreenSaver daemon doesn't seem to be running\n"
+ "on display \"%s\". You can launch it by selecting\n"
+ "`Restart Daemon' from the File menu, or by typing\n"
+ "\"xscreensaver &\" in a shell.",
+ d);
+ }
+ else if (p && ruser && *ruser && !!strcmp (ruser, p->pw_name))
+ {
+ /* Warn that the two processes are running as different users.
+ */
+ sprintf(msg,
+ "Warning:\n\n"
+ "%s is running as user \"%s\" on host \"%s\".\n"
+ "But the xscreensaver managing display \"%s\"\n"
+ "is running as user \"%s\" on host \"%s\".\n"
+ "\n"
+ "Since they are different users, they won't be reading/writing\n"
+ "the same ~/.xscreensaver file, so %s isn't\n"
+ "going to work right.\n"
+ "\n"
+ "Either re-run %s as \"%s\", or re-run\n"
+ "xscreensaver as \"%s\" (which you can do by\n"
+ "selecting `Restart Daemon' from the File menu.)\n",
+ progname, luser, lhost,
+ d,
+ (ruser ? ruser : "???"), (rhost ? rhost : "???"),
+ progname,
+ progname, (ruser ? ruser : "???"),
+ luser);
+ }
+ else if (rhost && *rhost && !!strcmp (rhost, lhost))
+ {
+ /* Warn that the two processes are running on different hosts.
+ */
+ sprintf (msg,
+ "Warning:\n\n"
+ "%s is running as user \"%s\" on host \"%s\".\n"
+ "But the xscreensaver managing display \"%s\"\n"
+ "is running as user \"%s\" on host \"%s\".\n"
+ "\n"
+ "If those two machines don't share a file system (that is,\n"
+ "if they don't see the same ~%s/.xscreensaver file) then\n"
+ "%s won't work right.\n"
+ "\n"
+ "You can restart the daemon on \"%s\" as \"%s\" by\n"
+ "selecting `Restart Daemon' from the File menu.)",
+ progname, luser, lhost,
+ d,
+ (ruser ? ruser : "???"), (rhost ? rhost : "???"),
+ luser,
+ progname,
+ lhost, luser);
+ }
+ else if (!!strcmp (rversion, short_version))
+ {
+ /* Warn that the version numbers don't match.
+ */
+ sprintf (msg,
+ "Warning:\n\n"
+ "This is %s version %s.\n"
+ "But the xscreensaver managing display \"%s\"\n"
+ "is version %s. This could cause problems.",
+ progname, short_version,
+ d,
+ rversion);
+ }
+
+
+ if (*msg)
+ warning_dialog (parent, msg, 1);
+
+ free (msg);
+}
+
+
+/* We use this error handler so that X errors are preceeded by the name
+ of the program that generated them.
+ */
+static int
+demo_ehandler (Display *dpy, XErrorEvent *error)
+{
+ fprintf (stderr, "\nX error in %s:\n", progname);
+ if (XmuPrintDefaultErrorMessage (dpy, error, stderr))
+ exit (-1);
+ else
+ fprintf (stderr, " (nonfatal.)\n");
+ return 0;
+}
+
+
+
+static char *defaults[] = {
+#include "XScreenSaver_ad.h"
+ 0
+};
+
+
+int
+main (int argc, char **argv)
+{
+ XtAppContext app;
+ prefs_pair Pair, *pair;
+ saver_preferences P, P2, *p, *p2;
+ Bool prefs = False;
+ int i;
+ Display *dpy;
+ Widget toplevel_shell, dialog;
+ char *real_progname = argv[0];
+ char *s;
+
+ s = strrchr (real_progname, '/');
+ if (s) real_progname = s+1;
+
+ p = &P;
+ p2 = &P2;
+ pair = &Pair;
+ pair->a = p;
+ pair->b = p2;
+ memset (p, 0, sizeof (*p));
+ memset (p2, 0, sizeof (*p2));
+
+ global_prefs_pair = pair;
+
+ progname = real_progname;
+
+ /* We must read exactly the same resources as xscreensaver.
+ That means we must have both the same progclass *and* progname,
+ at least as far as the resource database is concerned. So,
+ put "xscreensaver" in argv[0] while initializing Xt.
+ */
+ argv[0] = "xscreensaver";
+ progname = argv[0];
+
+
+ toplevel_shell = XtAppInitialize (&app, progclass, 0, 0, &argc, argv,
+ defaults, 0, 0);
+
+ dpy = XtDisplay (toplevel_shell);
+ db = XtDatabase (dpy);
+ XtGetApplicationNameAndClass (dpy, &progname, &progclass);
+ XSetErrorHandler (demo_ehandler);
+
+ /* Complain about unrecognized command-line arguments.
+ */
+ for (i = 1; i < argc; i++)
+ {
+ char *s = argv[i];
+ if (s[0] == '-' && s[1] == '-')
+ s++;
+ if (!strcmp (s, "-prefs"))
+ prefs = True;
+ else
+ {
+ fprintf (stderr, "usage: %s [ -display dpy-string ] [ -prefs ]\n",
+ real_progname);
+ exit (1);
+ }
+ }
+
+ short_version = (char *) malloc (5);
+ memcpy (short_version, screensaver_id + 17, 4);
+ short_version [4] = 0;
+
+ /* Load the init file, which may end up consulting the X resource database
+ and the site-wide app-defaults file. Note that at this point, it's
+ important that `progname' be "xscreensaver", rather than whatever
+ was in argv[0].
+ */
+ p->db = db;
+ load_init_file (p);
+ *p2 = *p;
+
+ /* Now that Xt has been initialized, and the resources have been read,
+ we can set our `progname' variable to something more in line with
+ reality.
+ */
+ progname = real_progname;
+
+
+#if 0
+ {
+ XrmName name = { 0 };
+ XrmClass class = { 0 };
+ int count = 0;
+ XrmEnumerateDatabase (db, &name, &class, XrmEnumAllLevels, mapper,
+ (POINTER) &count);
+ }
+#endif
+
+
+ /* Intern the atoms that xscreensaver_command() needs.
+ */
+ XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
+ XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
+ XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
+ XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
+ XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
+ XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
+ XA_SELECT = XInternAtom (dpy, "SELECT", False);
+ XA_DEMO = XInternAtom (dpy, "DEMO", False);
+ XA_ACTIVATE = XInternAtom (dpy, "ACTIVATE", False);
+ XA_BLANK = XInternAtom (dpy, "BLANK", False);
+ XA_LOCK = XInternAtom (dpy, "LOCK", False);
+ XA_EXIT = XInternAtom (dpy, "EXIT", False);
+ XA_RESTART = XInternAtom (dpy, "RESTART", False);
+
+ /* Create the window and all its widgets.
+ */
+ dialog = create_xscreensaver_demo (toplevel_shell);
+
+ /* Set the window's title. */
+ {
+ char title[255];
+ char *v = (char *) strdup(strchr(screensaver_id, ' '));
+ char *s1, *s2, *s3, *s4;
+ s1 = (char *) strchr(v, ' '); s1++;
+ s2 = (char *) strchr(s1, ' ');
+ s3 = (char *) strchr(v, '('); s3++;
+ s4 = (char *) strchr(s3, ')');
+ *s2 = 0;
+ *s4 = 0;
+ sprintf (title, "%.50s %.50s, %.50s", progclass, s1, s3);
+ XtVaSetValues (toplevel_shell, XtNtitle, title, 0);
+ free (v);
+ }
+
+ sanity_check_resources (toplevel_shell);
+ add_callbacks (toplevel_shell, pair);
+ populate_hack_list (toplevel_shell, pair);
+ populate_prefs_page (toplevel_shell, pair);
+ sensitize_demo_widgets (toplevel_shell, False);
+ scroll_to_current_hack (toplevel_shell, pair);
+
+ XtManageChild (dialog);
+ XtRealizeWidget(toplevel_shell);
+
+ /* The next few calls must come after XtRealizeWidget(). */
+ pixmapify_buttons (toplevel_shell);
+ hack_button_sizes (toplevel_shell);
+ ensure_selected_item_visible (name_to_widget (toplevel_shell, "list"));
+
+ XSync (dpy, False);
+ XtVaSetValues (toplevel_shell, XmNallowShellResize, False, 0);
+
+
+ /* Handle the -prefs command-line argument. */
+ if (prefs)
+ {
+ Widget tabber = name_to_widget (toplevel_shell, "folder");
+ Widget this_tab = name_to_widget (toplevel_shell, "optionsTab");
+ Widget this_page = name_to_widget (toplevel_shell, "preferencesForm");
+ Widget *kids = 0;
+ Cardinal nkids = 0;
+ if (!tabber) abort();
+
+ XtVaGetValues (tabber, XmNnumChildren, &nkids, XmNchildren, &kids, 0);
+ if (!kids) abort();
+ if (nkids > 0)
+ XtUnmanageChildren (kids, nkids);
+
+ XtManageChild (this_page);
+
+ XmProcessTraversal (this_tab, XmTRAVERSE_CURRENT);
+ }
+
+ /* Issue any warnings about the running xscreensaver daemon. */
+ the_network_is_not_the_computer (toplevel_shell);
+
+
+ XtAppMainLoop (app);
+ exit (0);
+}
+
+#endif /* HAVE_MOTIF -- whole file */
+++ /dev/null
-/* demo.c --- implements the interactive demo-mode and options dialogs.
- * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * 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.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-
-#ifdef FORCE_ATHENA
-# undef HAVE_MOTIF
-# define HAVE_ATHENA 1
-#endif
-#ifdef FORCE_MOTIF
-# undef HAVE_ATHENA
-# define HAVE_MOTIF 1
-#endif
-
-/* Only one, please. */
-#ifdef HAVE_MOTIF
-# undef HAVE_ATHENA
-#endif
-#ifdef HAVE_ATHENA
-# undef HAVE_MOTIF
-#endif
-
-
-#include <stdlib.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifndef VMS
-# include <pwd.h> /* for getpwuid() */
-#else /* VMS */
-# include "vms-pwd.h"
-#endif /* VMS */
-
-#ifdef HAVE_UNAME
-# include <sys/utsname.h> /* for uname() */
-#endif /* HAVE_UNAME */
-
-#include <stdio.h>
-
-#include <X11/Xproto.h> /* for CARD32 */
-#include <X11/Xatom.h> /* for XA_INTEGER */
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-
-/* We don't actually use any widget internals, but these are included
- so that gdb will have debug info for the widgets... */
-#include <X11/IntrinsicP.h>
-#include <X11/ShellP.h>
-
-#ifdef HAVE_XMU
-# ifndef VMS
-# include <X11/Xmu/Error.h>
-# else /* VMS */
-# include <Xmu/Error.h>
-# endif
-#else
-# include "xmu.h"
-#endif
-
-
-#ifdef HAVE_MOTIF
-# include <Xm/Xm.h>
-# include <Xm/Text.h>
-# include <Xm/List.h>
-# include <Xm/ToggleB.h>
-# include <Xm/MessageB.h>
-# include <Xm/LabelG.h>
-# include <Xm/RowColumn.h>
-
-#elif defined(HAVE_ATHENA)
- /* Athena demo code contributed by Jon A. Christopher <jac8782@tamu.edu> */
- /* Copyright 1997, with the same permissions as above. */
-# include <X11/Shell.h>
-# include <X11/Xaw/Form.h>
-# include <X11/Xaw/Box.h>
-# include <X11/Xaw/List.h>
-# include <X11/Xaw/Command.h>
-# include <X11/Xaw/Toggle.h>
-# include <X11/Xaw/Viewport.h>
-# include <X11/Xaw/Dialog.h>
-# include <X11/Xaw/Scrollbar.h>
-# include <X11/Xaw/Text.h>
-
-#endif /* HAVE_ATHENA */
-
-#include "version.h"
-#include "prefs.h"
-#include "resources.h" /* for parse_time() */
-#include "visual.h" /* for has_writable_cells() */
-#include "remote.h" /* for xscreensaver_command() */
-#include "usleep.h"
-
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
-#define WIDGET Widget
-#define POINTER XtPointer
-
-
-char *progname = 0;
-char *progclass = "XScreenSaver";
-XrmDatabase db;
-
-typedef struct {
- saver_preferences *a, *b;
-} prefs_pair;
-
-
-char *blurb (void) { return progname; }
-
-static void run_hack (Display *dpy, int n);
-
-#ifdef HAVE_ATHENA
-static saver_preferences *global_prefs_kludge = 0; /* I hate C so much... */
-#endif /* HAVE_ATHENA */
-
-static char *short_version = 0;
-
-Atom XA_VROOT;
-Atom XA_SCREENSAVER, XA_SCREENSAVER_RESPONSE, XA_SCREENSAVER_VERSION;
-Atom XA_SCREENSAVER_ID, XA_SCREENSAVER_STATUS, XA_SELECT, XA_DEMO;
-Atom XA_BLANK, XA_LOCK, XA_RESTART, XA_EXIT;
-
-extern void create_demo_dialog (Widget, Visual *, Colormap);
-extern void create_preferences_dialog (Widget, Visual *, Colormap);
-
-extern WIDGET demo_dialog;
-extern WIDGET label1;
-extern WIDGET text_line;
-extern WIDGET text_activate;
-extern WIDGET demo_form;
-extern WIDGET demo_list;
-extern WIDGET next;
-extern WIDGET prev;
-extern WIDGET done;
-extern WIDGET restart;
-extern WIDGET edit;
-
-extern WIDGET preferences_dialog;
-extern WIDGET preferences_form;
-extern WIDGET prefs_done;
-extern WIDGET prefs_cancel;
-extern WIDGET timeout_text;
-extern WIDGET cycle_text;
-extern WIDGET fade_text;
-extern WIDGET fade_ticks_text;
-extern WIDGET lock_timeout_text;
-extern WIDGET passwd_timeout_text;
-extern WIDGET verbose_toggle;
-extern WIDGET install_cmap_toggle;
-extern WIDGET fade_toggle;
-extern WIDGET unfade_toggle;
-extern WIDGET lock_toggle;
-
-
-#ifdef HAVE_MOTIF
-
-# define set_toggle_button_state(toggle,state) \
- XmToggleButtonSetState ((toggle), (state), True)
-# define set_text_string(text_widget,string) \
- XmTextSetString ((text_widget), (string))
-# define add_button_callback(button,cb,arg) \
- XtAddCallback ((button), XmNactivateCallback, (cb), (arg))
-# define add_toggle_callback(button,cb,arg) \
- XtAddCallback ((button), XmNvalueChangedCallback, (cb), (arg))
-# define add_text_callback add_toggle_callback
-# define disable_widget(widget) \
- XtVaSetValues((widget), XtNsensitive, False, 0)
-# define widget_name(widget) XtName(widget)
-# define widget_display(widget) XtDisplay(widget)
-# define widget_screen(widget) XtScreen(widget)
-# define CB_ARGS(a,b,c) (a,b,c)
-
-#elif defined(HAVE_ATHENA)
-
-# define set_toggle_button_state(toggle,state) \
- XtVaSetValues((toggle), XtNstate, (state), 0)
-# define set_text_string(text_widget,string) \
- XtVaSetValues ((text_widget), XtNvalue, (string), 0)
-# define add_button_callback(button,cb,arg) \
- XtAddCallback ((button), XtNcallback, (cb), (arg))
-# define add_toggle_callback add_button_callback
-# define add_text_callback(b,c,a) ERROR!
-# define disable_widget(widget) \
- XtVaSetValues((widget), XtNsensitive, False, 0)
-# define widget_name(widget) XtName(widget)
-# define widget_display(widget) XtDisplay(widget)
-# define widget_screen(widget) XtScreen(widget)
-# define CB_ARGS(a,b,c) (a,b,c)
-
-#endif /* HAVE_ATHENA */
-
-
-
-
-static char *
-get_text_string (WIDGET text_widget)
-{
-#ifdef HAVE_MOTIF
- return XmTextGetString (text_widget);
-#elif defined(HAVE_ATHENA)
- char *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 */
-}
-
-
-static char *
-get_label_string (WIDGET label_widget)
-{
-#ifdef HAVE_MOTIF
- char *label = 0;
- XmString xm_label = 0;
- XtVaGetValues (label_widget, XmNlabelString, &xm_label, 0);
- if (!xm_label)
- return 0;
- XmStringGetLtoR (xm_label, XmSTRING_DEFAULT_CHARSET, &label);
- return label;
-#elif defined(HAVE_ATHENA)
- char *label = 0;
- XtVaGetValues (label_widget, XtNlabel, &label, 0);
- return (label ? strdup(label) : 0);
-#endif /* HAVE_ATHENA */
-}
-
-
-static void
-set_label_string (WIDGET label_widget, char *string)
-{
-#ifdef HAVE_MOTIF
- XmString xm_string = XmStringCreate (string, XmSTRING_DEFAULT_CHARSET);
- XtVaSetValues (label_widget, XmNlabelString, xm_string, 0);
- XmStringFree (xm_string);
-#elif defined(HAVE_ATHENA)
- XtVaSetValues (label_widget, XtNlabel, string, 0);
-#endif /* HAVE_ATHENA */
-}
-
-
-/* Given a label widget that has a %s in it, do the printf thing.
- If the label's string is obviously wrong, complain about resource lossage.
- */
-static void
-format_into_label (WIDGET label, const char *arg)
-{
- char *text = get_label_string (label);
- char *buf = (char *) malloc ((text ? strlen(text) : 0) + strlen(arg) + 100);
-
- if (!text || !*text || !strcmp (text, widget_name (label)))
- strcpy (buf, "ERROR: RESOURCES ARE NOT INSTALLED CORRECTLY");
- else
- sprintf (buf, text, arg);
-
- set_label_string (label, buf);
- free (buf);
- XtFree (text);
-}
-
-
-/* Why this behavior isn't automatic in *either* toolkit, I'll never know.
- */
-static void
-ensure_selected_item_visible (WIDGET list)
-{
-#ifdef HAVE_MOTIF
- int *pos_list = 0;
- int pos_count = 0;
- if (XmListGetSelectedPos (list, &pos_list, &pos_count) && pos_count > 0)
- {
- int top = -2;
- int visible = 0;
- XtVaGetValues (list,
- XmNtopItemPosition, &top,
- XmNvisibleItemCount, &visible,
- 0);
- if (pos_list[0] >= top + visible)
- {
- int pos = pos_list[0] - visible + 1;
- if (pos < 0) pos = 0;
- XmListSetPos (list, pos);
- }
- else if (pos_list[0] < top)
- {
- XmListSetPos (list, pos_list[0]);
- }
- }
- if (pos_list)
- XtFree ((char *) pos_list);
-
-#elif defined(HAVE_ATHENA)
-# ifdef HAVE_XawViewportSetCoordinates
-
- int margin = 16; /* should be line height or something. */
- int count = 0;
- int pos;
- Dimension list_h = 0, vp_h = 0;
- Dimension top_margin = 4; /* I don't know where this value comes from */
- Position vp_x = 0, vp_y = 0, current_y;
- double cratio;
- Widget viewport = XtParent(demo_list);
- Widget sb = (viewport ? XtNameToWidget(viewport, "*vertical") : 0);
- float sb_top = 0, sb_size = 0;
- XawListReturnStruct *current = XawListShowCurrent(demo_list);
- if (!current || !sb) return;
-
- XtVaGetValues(demo_list,
- XtNnumberStrings, &count,
- XtNheight, &list_h,
- 0);
- if (count < 2 || list_h < 10) return;
-
- XtVaGetValues(viewport, XtNheight, &vp_h, XtNx, &vp_x, XtNy, &vp_y, 0);
- if (vp_h < 10) return;
-
- XtVaGetValues(sb, XtNtopOfThumb, &sb_top, XtNshown, &sb_size, 0);
- if (sb_size <= 0) return;
-
- pos = current->list_index;
- cratio = ((double) pos) / ((double) count);
- current_y = (cratio * list_h);
-
- if (cratio < sb_top ||
- cratio > sb_top + sb_size)
- {
- if (cratio < sb_top)
- current_y -= (vp_h - margin - margin);
- else
- current_y -= margin;
-
- if ((long)current_y >= (long) list_h)
- current_y = (Position) ((long)list_h - (long)vp_h);
-
- if ((long)current_y < (long)top_margin)
- current_y = (Position)top_margin;
-
- XawViewportSetCoordinates (viewport, vp_x, current_y);
- }
-# endif /* HAVE_XawViewportSetCoordinates */
-#endif /* HAVE_ATHENA */
-}
-
-
-#ifdef HAVE_ATHENA
-static void
-set_hack_list (Widget demo_list, saver_preferences *p)
-{
- char **strings = (char **) calloc (sizeof (char *), p->screenhacks_count);
- int i;
- for (i = 0; i < p->screenhacks_count; i++)
- strings[i] = format_hack (p->screenhacks[i], False);
- XtVaSetValues (demo_list,
- XtNlist, strings,
- XtNnumberStrings, p->screenhacks_count,
- 0);
-# if 0
- for (i = 0; i < p->screenhacks_count; i++)
- {
- free (strings[i]);
- strings[i] = (char *) 0xDEADBEEF;
- }
- free (strings);
-# endif
-}
-#endif /* HAVE_ATHENA */
-
-
-
-/* Callback for the text area:
- - note the text the user has entered;
- - change the corresponding element in `screenhacks';
- - write the .xscreensaver file;
- - tell the xscreensaver daemon to run that hack.
- */
-static void
-text_cb (WIDGET text_widget, POINTER client_data, POINTER call_data)
-{
- saver_preferences *p = (saver_preferences *) client_data;
- char *new_text = get_text_string (text_widget);
- Display *dpy = widget_display (text_widget);
- Bool save = TRUE;
-
- int hack_number = -1; /* 0-based */
-
-#ifdef HAVE_ATHENA
- XawListReturnStruct *current = XawListShowCurrent(demo_list);
- hack_number = current->list_index;
-#elif defined(HAVE_MOTIF)
- int *pos_list = 0;
- int pos_count = 0;
- if (XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
- hack_number = pos_list[0] - 1;
- if (pos_list)
- XtFree ((char *) pos_list);
-#endif /* HAVE_ATHENA */
-
- ensure_selected_item_visible (demo_list);
-
- if (hack_number < 0 || hack_number >= p->screenhacks_count)
- {
- set_text_string (text_widget, "");
- XBell (XtDisplay (text_widget), 0);
- }
- else
- {
- screenhack *new_hack = parse_screenhack (new_text);
- if (p->screenhacks [hack_number])
- free_screenhack (p->screenhacks [hack_number]);
- p->screenhacks [hack_number] = new_hack;
-
-#ifdef HAVE_MOTIF
-
- XmListDeselectAllItems (demo_list);
- {
- XmString xmstr = XmStringCreate (new_text, XmSTRING_DEFAULT_CHARSET);
- XmListReplaceItemsPos (demo_list, &xmstr, 1, hack_number+1);
- XmStringFree (xmstr);
- }
- XmListSelectPos (demo_list, hack_number+1, True);
-
-#elif defined(HAVE_ATHENA)
-
- {
- Widget vp = XtParent(demo_list);
- Widget sb = (vp ? XtNameToWidget(vp, "*vertical") : 0);
- Dimension list_h = 0;
- Position vp_x = 0, vp_y = 0;
- float sb_top = 0;
-
- XawListUnhighlight (demo_list);
- XtVaGetValues (vp, XtNx, &vp_x, 0);
- XtVaGetValues (sb, XtNtopOfThumb, &sb_top, 0);
- XtVaGetValues (demo_list, XtNheight, &list_h, 0);
- vp_y = (sb_top * list_h);
- set_hack_list (demo_list, p);
- XawViewportSetCoordinates (vp, vp_x, vp_y);
- XawListHighlight (demo_list, hack_number);
- }
-
-#endif /* HAVE_ATHENA */
-
- if (save)
- write_init_file (p, short_version, p->verbose_p);
-
- XSync (dpy, False);
- usleep (500000); /* give the disk time to settle down */
-
- run_hack (dpy, hack_number+1);
- }
-}
-
-
-#ifdef HAVE_ATHENA
-/* Bend over backwards to make hitting Return in the text field do the
- right thing.
- */
-static void text_enter (Widget w, XEvent *event, String *av, Cardinal *ac)
-{
- text_cb (w, global_prefs_kludge, 0); /* I hate C so much... */
-}
-
-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 */
-
-
-/* Callback for the Run Next button.
- */
-static void
-next_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
-#ifdef HAVE_ATHENA
- XawListReturnStruct *current = XawListShowCurrent(demo_list);
- int cnt;
- XtVaGetValues (demo_list, XtNnumberStrings, &cnt, 0);
- if (current->list_index == XAW_LIST_NONE ||
- current->list_index + 1 >= cnt)
- current->list_index = 0;
- else
- 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);
-
- run_hack (XtDisplay (button), current->list_index + 1);
-
-#elif defined(HAVE_MOTIF)
-
- saver_preferences *p = (saver_preferences *) client_data;
- int *pos_list = 0;
- int pos_count = 0;
- int pos;
- if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
- {
- pos = 1;
- XmListDeselectAllItems (demo_list); /* LessTif lossage */
- XmListSelectPos (demo_list, pos, True);
- }
- else
- {
- pos = pos_list[0] + 1;
- if (pos > p->screenhacks_count)
- pos = 1;
- XmListDeselectAllItems (demo_list); /* LessTif lossage */
- XmListSelectPos (demo_list, pos, True);
- }
-
- ensure_selected_item_visible (demo_list);
- run_hack (XtDisplay (button), pos);
- if (pos_list)
- XtFree ((char *) pos_list);
-
-#endif /* HAVE_MOTIF */
-}
-
-
-/* Callback for the Run Previous button.
- */
-static void
-prev_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
-#ifdef HAVE_ATHENA
- XawListReturnStruct *current = XawListShowCurrent(demo_list);
- int cnt;
- XtVaGetValues (demo_list, XtNnumberStrings, &cnt, 0);
- if (current->list_index == XAW_LIST_NONE ||
- current->list_index <= 0)
- current->list_index = cnt-1;
- else
- 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);
-
- run_hack (XtDisplay (button), current->list_index + 1);
-
-#elif defined(HAVE_MOTIF)
-
- saver_preferences *p = (saver_preferences *) client_data;
- int *pos_list = 0;
- int pos_count = 0;
- int pos;
- if (! XmListGetSelectedPos (demo_list, &pos_list, &pos_count))
- {
- pos = p->screenhacks_count;
- XmListDeselectAllItems (demo_list); /* LessTif lossage */
- XmListSelectPos (demo_list, pos, True);
- }
- else
- {
- pos = pos_list[0] - 1;
- if (pos == 0)
- pos = p->screenhacks_count;
- XmListDeselectAllItems (demo_list); /* LessTif lossage */
- XmListSelectPos (demo_list, pos, True);
- }
-
- ensure_selected_item_visible (demo_list);
- run_hack (XtDisplay (button), pos);
- if (pos_list)
- XtFree ((char *) pos_list);
-
-#endif /* HAVE_MOTIF */
-}
-
-
-/* Callback run when a list element is double-clicked.
- */
-static void
-select_cb (WIDGET button, POINTER client_data, POINTER call_data)
-{
-/* saver_preferences *p = (saver_preferences *) client_data; */
-
-#ifdef HAVE_ATHENA
- XawListReturnStruct *item = (XawListReturnStruct*)call_data;
- XtVaSetValues(text_line, XtNstring, item->string, 0);
- run_hack (XtDisplay (button), item->list_index + 1);
-
-#elif defined(HAVE_MOTIF)
- XmListCallbackStruct *lcb = (XmListCallbackStruct *) call_data;
- char *string = 0;
- if (lcb->item)
- XmStringGetLtoR (lcb->item, XmSTRING_DEFAULT_CHARSET, &string);
- set_text_string (text_line, (string ? string : ""));
-
- if (lcb->reason == XmCR_DEFAULT_ACTION && string)
- run_hack (XtDisplay (button), lcb->item_position);
-
- if (string)
- XtFree (string);
-
-#endif /* HAVE_MOTIF */
-}
-
-
-static void pop_preferences_dialog (prefs_pair *pair);
-static void make_preferences_dialog (prefs_pair *pair, Widget parent);
-
-/* Callback for the Preferences button.
- */
-static void
-preferences_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- prefs_pair *pair = (prefs_pair *) client_data;
- Widget parent = button;
-
- do {
- parent = XtParent(parent);
- } while (XtParent(parent));
-
- if (! preferences_dialog)
- make_preferences_dialog (pair, parent);
- *pair->b = *pair->a;
- pop_preferences_dialog (pair);
-}
-
-
-/* Callback for the Quit button.
- */
-static void
-quit_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- /* Save here? Right now we don't need to, because we save every time
- the text field is edited, or the Preferences OK button is pressed.
- */
- exit (0);
-}
-
-
-/* Callback for the (now unused) Restart button.
- */
-static void
-restart_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- xscreensaver_command (widget_display (button), XA_RESTART, 0, False, NULL);
-}
-
-
-/* Finds the number of the last hack to run, and makes that item be
- selected by default.
- */
-static void
-scroll_to_current_hack (WIDGET dialog)
-{
- Atom type;
- int format;
- unsigned long nitems, bytesafter;
- CARD32 *data = 0;
- Display *dpy = widget_display (dialog);
- int hack = 0;
-
- if (XGetWindowProperty (dpy, RootWindow (dpy, 0), /* always screen #0 */
- XA_SCREENSAVER_STATUS,
- 0, 3, False, XA_INTEGER,
- &type, &format, &nitems, &bytesafter,
- (unsigned char **) &data)
- == Success
- && type == XA_INTEGER
- && nitems >= 3
- && data)
- hack = (int) data[2];
-
- if (data) free (data);
-
- if (hack <= 0)
- return;
-
-#ifdef HAVE_MOTIF
- XmListDeselectAllItems (demo_list); /* LessTif lossage */
- XmListSelectPos (demo_list, hack, False);
- ensure_selected_item_visible (demo_list);
-
-#elif defined(HAVE_ATHENA)
- XawListUnhighlight (demo_list);
- XawListHighlight (demo_list, hack - 1);
-
-#endif /* HAVE_ATHENA */
-}
-
-
-static void
-pop_up_dialog_box (WIDGET dialog, WIDGET form)
-{
-#ifdef HAVE_ATHENA
- XtRealizeWidget (dialog);
- XtPopup (dialog, XtGrabNone);
-#elif defined(HAVE_MOTIF)
- XtRealizeWidget (form);
- XtManageChild (form);
-
- /* Motif likes to make the dialog wider than the screen; throttle it. */
- {
- Dimension w=0, h=0, bw=0;
- Dimension max_w;
- Screen *screen = 0;
- XtVaGetValues (dialog, XtNscreen, &screen, 0);
- max_w = WidthOfScreen (screen) * 0.8;
- XtVaGetValues(dialog, XtNwidth, &w, XtNheight, &h, XtNborderWidth, &bw, 0);
- if (w > max_w)
- XtResizeWidget(dialog, max_w, h, bw);
- }
-#endif /* HAVE_MOTIF */
-
- XMapRaised (XtDisplay (dialog), XtWindow (dialog));
-}
-
-
-static void
-make_demo_dialog (Widget toplevel_shell, prefs_pair *pair)
-{
- saver_preferences *p = pair->a;
- /* saver_preferences *p2 = pair->b; */
- Widget parent = toplevel_shell;
-#ifdef HAVE_MOTIF
- screenhack **hacks = p->screenhacks;
-#endif /* HAVE_MOTIF */
-
- create_demo_dialog (parent,
- DefaultVisualOfScreen (widget_screen (parent)),
- DefaultColormapOfScreen (widget_screen (parent)));
-
- format_into_label (label1, short_version);
- add_button_callback (next, next_cb, (POINTER) p);
- add_button_callback (prev, prev_cb, (POINTER) p);
- add_button_callback (done, quit_cb, (POINTER) p);
- if (restart)
- add_button_callback(restart,restart_cb, (POINTER) p);
- add_button_callback (edit, preferences_cb, (POINTER) pair);
-
-#ifdef HAVE_MOTIF
- XtAddCallback (demo_list, XmNbrowseSelectionCallback,
- select_cb, (POINTER) p);
- XtAddCallback (demo_list, XmNdefaultActionCallback,
- select_cb, (POINTER) p);
- XtAddCallback (text_line, XmNactivateCallback, text_cb, (POINTER) p);
-
- if (hacks)
- for (; *hacks; hacks++)
- {
- char *hs = format_hack (*hacks, False);
- XmString xmstr = XmStringCreate (hs, XmSTRING_DEFAULT_CHARSET);
- XmListAddItem (demo_list, xmstr, 0);
- XmStringFree (xmstr);
- free (hs);
- }
-
-#elif defined(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);
-
- set_hack_list (demo_list, p);
- XtAddCallback (demo_list, XtNcallback, select_cb, p);
-
- /* 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);
- 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 */
-
- scroll_to_current_hack (demo_dialog);
-
- pop_up_dialog_box(demo_dialog, demo_form);
-
-#if defined(HAVE_ATHENA)
- /* For Athena and Gtk, have to do this after the dialog is managed. */
- ensure_selected_item_visible (demo_list);
-#endif /* HAVE_ATHENA */
-}
-
-\f
-/* the Preferences dialog
- */
-
-/* Helper for the text fields that contain time specifications:
- this parses the text, and does error checking.
- */
-static void
-hack_time_text (Display *dpy, char *line, Time *store, Bool sec_p)
-{
- if (*line)
- {
- int value;
- value = parse_time (line, sec_p, True);
- value *= 1000; /* Time measures in microseconds */
- if (value < 0)
- /*XBell (dpy, 0)*/;
- else
- *store = value;
- }
-}
-
-
-/* Callback for text fields that hold a time that default to seconds,
- when not fully spelled out. client_data is a Time* where the value goes.
- */
-static void
-prefs_sec_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- hack_time_text (widget_display (button), get_text_string (button),
- (Time *) client_data, True);
-}
-
-
-/* Callback for text fields that hold a time that default to minutes,
- when not fully spelled out. client_data is an Time* where the value goes.
- */
-static void
-prefs_min_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- hack_time_text (widget_display (button), get_text_string (button),
- (Time *) client_data, False);
-}
-
-
-/* Callback for text fields that hold an integer value.
- client_data is an int* where the value goes.
- */
-static void
-prefs_int_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- char *line = get_text_string (button);
- int *store = (int *) client_data;
- unsigned int value;
- char c;
- if (! *line)
- ;
- else if (sscanf (line, "%u%c", &value, &c) != 1)
- XBell (XtDisplay (button), 0);
- else
- *store = value;
-}
-
-
-/* Callback for toggle buttons. client_data is a Bool* where the value goes.
- */
-static void
-prefs_bool_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER call_data)
-{
- Bool *store = (Bool *) client_data;
-#ifdef HAVE_MOTIF
- *store = ((XmToggleButtonCallbackStruct *) call_data)->set;
-#elif defined(HAVE_ATHENA)
- Boolean state = FALSE;
- XtVaGetValues (button, XtNstate, &state, 0);
- *store = state;
-#endif /* HAVE_ATHENA */
-}
-
-
-/* Callback for the Cancel button on the Preferences dialog.
- */
-static void
-prefs_cancel_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER ignored)
-{
- XtDestroyWidget (preferences_dialog);
- preferences_dialog = 0;
- XMapRaised (XtDisplay (demo_dialog), XtWindow (demo_dialog));
-}
-
-
-/* Callback for the OK button on the Preferences dialog.
- */
-static void
-prefs_ok_cb CB_ARGS(WIDGET button, POINTER client_data, POINTER call_data)
-{
- prefs_pair *pair = (prefs_pair *) client_data;
- saver_preferences *p = pair->a;
- saver_preferences *p2 = pair->b;
-
- prefs_cancel_cb CB_ARGS(button, client_data, call_data);
-
-#ifdef HAVE_ATHENA
- /* Athena doesn't let us put callbacks on these widgets, so run
- all the callbacks by hand when OK is pressed. */
- prefs_min_cb (timeout_text, (POINTER) &p2->timeout, 0);
- prefs_min_cb (cycle_text, (POINTER) &p2->cycle, 0);
- prefs_sec_cb (fade_text, (POINTER) &p2->fade_seconds, 0);
- prefs_int_cb (fade_ticks_text, (POINTER) &p2->fade_ticks, 0);
- prefs_min_cb (lock_timeout_text, (POINTER) &p2->lock_timeout, 0);
- prefs_sec_cb (passwd_timeout_text, (POINTER) &p2->passwd_timeout, 0);
-#endif /* HAVE_ATHENA */
-
- p->timeout = p2->timeout;
- p->cycle = p2->cycle;
- p->lock_timeout = p2->lock_timeout;
- p->passwd_timeout = p2->passwd_timeout;
- p->fade_seconds = p2->fade_seconds;
- p->fade_ticks = p2->fade_ticks;
- p->verbose_p = p2->verbose_p;
- p->install_cmap_p = p2->install_cmap_p;
- p->fade_p = p2->fade_p;
- p->unfade_p = p2->unfade_p;
- p->lock_p = p2->lock_p;
-
- write_init_file (p, short_version, p->verbose_p);
-}
-
-
-static void
-make_preferences_dialog (prefs_pair *pair, Widget parent)
-{
- saver_preferences *p = pair->a;
- saver_preferences *p2 = pair->b;
-
- Screen *screen = widget_screen (parent);
- Display *dpy = widget_display (parent);
-
- *p2 = *p; /* copy all slots of p into p2. */
-
- create_preferences_dialog (parent,
- DefaultVisualOfScreen (screen),
- DefaultColormapOfScreen (screen));
-
- add_button_callback (prefs_done, prefs_ok_cb, (POINTER) pair);
- add_button_callback (prefs_cancel, prefs_cancel_cb, 0);
-
-#define CB(widget,type,slot) \
- add_text_callback ((widget), (type), (POINTER) (slot))
-#define CBT(widget,type,slot) \
- add_toggle_callback ((widget), (type), (POINTER) (slot))
-
-#ifndef HAVE_ATHENA
- /* When using Athena widgets, we can't set callbacks for these,
- so in that case, we run them by hand when "OK" is pressed. */
- CB (timeout_text, prefs_min_cb, &p2->timeout);
- CB (cycle_text, prefs_min_cb, &p2->cycle);
- CB (fade_text, prefs_sec_cb, &p2->fade_seconds);
- CB (fade_ticks_text, prefs_int_cb, &p2->fade_ticks);
- CB (lock_timeout_text, prefs_min_cb, &p2->lock_timeout);
- CB (passwd_timeout_text, prefs_sec_cb, &p2->passwd_timeout);
-
-#endif /* !HAVE_ATHENA */
-
- CBT (verbose_toggle, prefs_bool_cb, &p2->verbose_p);
- CBT (install_cmap_toggle, prefs_bool_cb, &p2->install_cmap_p);
- CBT (fade_toggle, prefs_bool_cb, &p2->fade_p);
- CBT (unfade_toggle, prefs_bool_cb, &p2->unfade_p);
- CBT (lock_toggle, prefs_bool_cb, &p2->lock_p);
-#undef CB
-#undef CBT
-
- {
- Bool found_any_writable_cells = False;
- int nscreens = ScreenCount(dpy);
- int i;
- for (i = 0; i < nscreens; i++)
- {
- Screen *s = ScreenOfDisplay (dpy, i);
- if (has_writable_cells (s, DefaultVisualOfScreen (s)))
- {
- found_any_writable_cells = True;
- break;
- }
- }
-
- if (! found_any_writable_cells) /* fading isn't possible */
- {
- disable_widget (fade_text);
- disable_widget (fade_ticks_text);
- disable_widget (install_cmap_toggle);
- disable_widget (fade_toggle);
- disable_widget (unfade_toggle);
- }
- }
-}
-
-
-/* Formats a `Time' into "H:MM:SS". (Time is microseconds.)
- */
-static void
-format_time (char *buf, Time time)
-{
- int s = time / 1000;
- unsigned int h = 0, m = 0;
- if (s >= 60)
- {
- m += (s / 60);
- s %= 60;
- }
- if (m >= 60)
- {
- h += (m / 60);
- m %= 60;
- }
- sprintf (buf, "%u:%02u:%02u", h, m, s);
-}
-
-
-static void
-pop_preferences_dialog (prefs_pair *pair)
-{
- /* saver_preferences *p = pair->a; */
- saver_preferences *p2 = pair->b;
- char s[100];
-
- format_time (s, p2->timeout); set_text_string(timeout_text, s);
- format_time (s, p2->cycle); set_text_string(cycle_text, s);
- format_time (s, p2->lock_timeout); set_text_string(lock_timeout_text, s);
- format_time (s, p2->passwd_timeout); set_text_string(passwd_timeout_text, s);
- format_time (s, p2->fade_seconds); set_text_string(fade_text, s);
- sprintf (s, "%u", p2->fade_ticks); set_text_string(fade_ticks_text, s);
-
- set_toggle_button_state (verbose_toggle, p2->verbose_p);
- set_toggle_button_state (install_cmap_toggle, p2->install_cmap_p);
- set_toggle_button_state (fade_toggle, p2->fade_p);
- set_toggle_button_state (unfade_toggle, p2->unfade_p);
- set_toggle_button_state (lock_toggle, p2->lock_p);
-
- pop_up_dialog_box (preferences_dialog, preferences_form);
-}
-
-
-static void
-run_hack (Display *dpy, int n)
-{
- if (n <= 0) abort();
- xscreensaver_command (dpy, XA_DEMO, n, False, NULL);
-}
-
-
-static void
-warning_dialog_dismiss_cb CB_ARGS(WIDGET button, POINTER client_data,
- POINTER ignored)
-{
- WIDGET shell = (WIDGET) client_data;
- XtDestroyWidget (shell);
-}
-
-
-static void
-warning_dialog (WIDGET parent, const char *message)
-{
- char *msg = strdup (message);
- char *head;
-
- WIDGET dialog = 0;
- WIDGET label = 0;
- WIDGET ok = 0;
- int i = 0;
-
-#ifdef HAVE_MOTIF
-
- Widget w;
- Widget container;
- XmString xmstr;
- Arg av[10];
- int ac = 0;
-
- ac = 0;
- dialog = XmCreateWarningDialog (parent, "versionWarning", av, ac);
-
- w = XmMessageBoxGetChild (dialog, XmDIALOG_MESSAGE_LABEL);
- if (w) XtUnmanageChild (w);
- w = XmMessageBoxGetChild (dialog, XmDIALOG_CANCEL_BUTTON);
- if (w) XtUnmanageChild (w);
- w = XmMessageBoxGetChild (dialog, XmDIALOG_HELP_BUTTON);
- if (w) XtUnmanageChild (w);
-
- ok = XmMessageBoxGetChild (dialog, XmDIALOG_OK_BUTTON);
-
- ac = 0;
- XtSetArg (av[ac], XmNnumColumns, 1); ac++;
- XtSetArg (av[ac], XmNorientation, XmVERTICAL); ac++;
- XtSetArg (av[ac], XmNpacking, XmPACK_COLUMN); ac++;
- XtSetArg (av[ac], XmNrowColumnType, XmWORK_AREA); ac++;
- XtSetArg (av[ac], XmNspacing, 0); ac++;
- container = XmCreateRowColumn (dialog, "container", av, ac);
-
-#elif defined(HAVE_ATHENA)
-
- Widget form;
- dialog = XtVaCreatePopupShell("warning_dialog", transientShellWidgetClass,
- parent, 0);
- form = XtVaCreateManagedWidget("warning_form", formWidgetClass, dialog, 0);
-#endif /* HAVE_ATHENA */
-
- head = msg;
- while (head)
- {
- char name[20];
- char *s = strchr (head, '\n');
- if (s) *s = 0;
-
- sprintf (name, "label%d", i++);
-
-#ifdef HAVE_MOTIF
- xmstr = XmStringCreate (head, XmSTRING_DEFAULT_CHARSET);
- ac = 0;
- XtSetArg (av[ac], XmNlabelString, xmstr); ac++;
- label = XmCreateLabelGadget (container, name, av, ac);
- XtManageChild (label);
- XmStringFree (xmstr);
-#elif defined(HAVE_ATHENA)
-
- label = XtVaCreateManagedWidget (name, labelWidgetClass,
- form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNlabel, head,
- (label ? XtNfromVert : XtNtop),
- (label ? label : XtChainTop),
- 0);
-
-#endif /* HAVE_ATHENA */
-
- if (s)
- head = s+1;
- else
- head = 0;
- }
-
-#ifdef HAVE_MOTIF
-
- XtManageChild (container);
- XtRealizeWidget (dialog);
- XtManageChild (dialog);
-
-#elif defined(HAVE_ATHENA)
-
- ok = XtVaCreateManagedWidget ("ok", commandWidgetClass, form,
- XtNleft, XtChainLeft,
- XtNbottom, XtChainBottom,
- XtNfromVert, label,
- 0);
-
- XtRealizeWidget (dialog);
- XtPopup (dialog, XtGrabNone);
-#endif /* HAVE_ATHENA */
-
- add_button_callback (ok, warning_dialog_dismiss_cb, (POINTER) dialog);
-
- free (msg);
-}
-
-
-\f
-/* The main demo-mode command loop.
- */
-
-#if 0
-static Bool
-mapper (XrmDatabase *db, XrmBindingList bindings, XrmQuarkList quarks,
- XrmRepresentation *type, XrmValue *value, XPointer closure)
-{
- int i;
- for (i = 0; quarks[i]; i++)
- {
- if (bindings[i] == XrmBindTightly)
- fprintf (stderr, (i == 0 ? "" : "."));
- else if (bindings[i] == XrmBindLoosely)
- fprintf (stderr, "*");
- else
- fprintf (stderr, " ??? ");
- fprintf(stderr, "%s", XrmQuarkToString (quarks[i]));
- }
-
- fprintf (stderr, ": %s\n", (char *) value->addr);
-
- return False;
-}
-#endif
-
-
-static void
-the_network_is_not_the_computer (WIDGET parent)
-{
- Display *dpy = widget_display (parent);
- char *rversion, *ruser, *rhost;
- char *luser, *lhost;
- char *msg = 0;
- struct passwd *p = getpwuid (getuid ());
- const char *d = DisplayString (dpy);
-
-# if defined(HAVE_UNAME)
- struct utsname uts;
- if (uname (&uts) < 0)
- lhost = "<UNKNOWN>";
- else
- lhost = uts.nodename;
-# elif defined(VMS)
- strcpy (lhost, getenv("SYS$NODE"));
-# else /* !HAVE_UNAME && !VMS */
- strcat (lhost, "<UNKNOWN>");
-# endif /* !HAVE_UNAME && !VMS */
-
- if (p && p->pw_name)
- luser = p->pw_name;
- else
- luser = "???";
-
- server_xscreensaver_version (dpy, &rversion, &ruser, &rhost);
-
- /* Make a buffer that's big enough for a number of copies of all the
- strings, plus some. */
- msg = (char *) malloc (10 * ((rversion ? strlen(rversion) : 0) +
- (ruser ? strlen(ruser) : 0) +
- (rhost ? strlen(rhost) : 0) +
- strlen(lhost) +
- strlen(luser) +
- strlen(d) +
- 30));
- *msg = 0;
-
- if (!rversion || !*rversion)
- {
- sprintf (msg,
- "Warning:\n\n"
- "xscreensaver doesn't seem to be running on display \"%s\".",
- d);
- }
- else if (p && ruser && *ruser && !!strcmp (ruser, p->pw_name))
- {
- /* Warn that the two processes are running as different users.
- */
- sprintf(msg,
- "Warning:\n\n"
- "%s is running as user \"%s\" on host \"%s\".\n"
- "But the xscreensaver managing display \"%s\"\n"
- "is running as user \"%s\" on host \"%s\".\n"
- "\n"
- "Since they are different users, they won't be reading/writing\n"
- "the same ~/.xscreensaver file, so %s isn't\n"
- "going to work right.\n"
- "\n"
- "Either re-run %s as \"%s\", or re-run\n"
- "xscreensaver as \"%s\".\n",
- progname, luser, lhost,
- d,
- (ruser ? ruser : "???"), (rhost ? rhost : "???"),
- progname,
- progname, (ruser ? ruser : "???"),
- luser);
- }
- else if (rhost && *rhost && !!strcmp (rhost, lhost))
- {
- /* Warn that the two processes are running on different hosts.
- */
- sprintf (msg,
- "Warning:\n\n"
- "%s is running as user \"%s\" on host \"%s\".\n"
- "But the xscreensaver managing display \"%s\"\n"
- "is running as user \"%s\" on host \"%s\".\n"
- "\n"
- "If those two machines don't share a file system (that is,\n"
- "if they don't see the same ~%s/.xscreensaver file) then\n"
- "%s won't work right.",
- progname, luser, lhost,
- d,
- (ruser ? ruser : "???"), (rhost ? rhost : "???"),
- luser,
- progname);
- }
- else if (!!strcmp (rversion, short_version))
- {
- /* Warn that the version numbers don't match.
- */
- sprintf (msg,
- "Warning:\n\n"
- "This is %s version %s.\n"
- "But the xscreensaver managing display \"%s\"\n"
- "is version %s. This could cause problems.",
- progname, short_version,
- d,
- rversion);
- }
-
-
- if (*msg)
- warning_dialog (parent, msg);
-
- free (msg);
-}
-
-
-/* We use this error handler so that X errors are preceeded by the name
- of the program that generated them.
- */
-static int
-demo_ehandler (Display *dpy, XErrorEvent *error)
-{
- fprintf (stderr, "\nX error in %s:\n", progname);
- if (XmuPrintDefaultErrorMessage (dpy, error, stderr))
- exit (-1);
- else
- fprintf (stderr, " (nonfatal.)\n");
- return 0;
-}
-
-
-static char *defaults[] = {
-#include "XScreenSaver_ad.h"
- 0
-};
-
-int
-main (int argc, char **argv)
-{
- XtAppContext app;
- prefs_pair Pair, *pair;
- saver_preferences P, P2, *p, *p2;
- Bool prefs = False;
- int i;
- Display *dpy;
- Widget toplevel_shell;
- char *real_progname = argv[0];
- char *s;
-
- s = strrchr (real_progname, '/');
- if (s) real_progname = s+1;
-
- p = &P;
- p2 = &P2;
- pair = &Pair;
- pair->a = p;
- pair->b = p2;
- memset (p, 0, sizeof (*p));
- memset (p2, 0, sizeof (*p2));
-
- progname = real_progname;
-
- /* We must read exactly the same resources as xscreensaver.
- That means we must have both the same progclass *and* progname,
- at least as far as the resource database is concerned. So,
- put "xscreensaver" in argv[0] while initializing Xt.
- */
- argv[0] = "xscreensaver";
- progname = argv[0];
-
-
- toplevel_shell = XtAppInitialize (&app, progclass, 0, 0, &argc, argv,
- defaults, 0, 0);
-
- dpy = XtDisplay (toplevel_shell);
- db = XtDatabase (dpy);
- XtGetApplicationNameAndClass (dpy, &progname, &progclass);
- XSetErrorHandler (demo_ehandler);
-
- /* Complain about unrecognized command-line arguments.
- */
- for (i = 1; i < argc; i++)
- {
- char *s = argv[i];
- if (s[0] == '-' && s[1] == '-')
- s++;
- if (!strcmp (s, "-prefs"))
- prefs = True;
- else
- {
- fprintf (stderr, "usage: %s [ -display dpy-string ] [ -prefs ]\n",
- real_progname);
- exit (1);
- }
- }
-
- short_version = (char *) malloc (5);
- memcpy (short_version, screensaver_id + 17, 4);
- short_version [4] = 0;
-
- /* Load the init file, which may end up consulting the X resource database
- and the site-wide app-defaults file. Note that at this point, it's
- important that `progname' be "xscreensaver", rather than whatever
- was in argv[0].
- */
- p->db = db;
- load_init_file (p);
- *p2 = *p;
-
- /* Now that Xt has been initialized, and the resources have been read,
- we can set our `progname' variable to something more in line with
- reality.
- */
- progname = real_progname;
-
-
-#ifdef HAVE_ATHENA
- global_prefs_kludge = p; /* I hate C so much... */
-#endif /* HAVE_ATHENA */
-
-#if 0
- {
- XrmName name = { 0 };
- XrmClass class = { 0 };
- int count = 0;
- XrmEnumerateDatabase (db, &name, &class, XrmEnumAllLevels, mapper,
- (POINTER) &count);
- }
-#endif
-
-
- XA_VROOT = XInternAtom (dpy, "__SWM_VROOT", False);
- XA_SCREENSAVER = XInternAtom (dpy, "SCREENSAVER", False);
- XA_SCREENSAVER_VERSION = XInternAtom (dpy, "_SCREENSAVER_VERSION",False);
- XA_SCREENSAVER_STATUS = XInternAtom (dpy, "_SCREENSAVER_STATUS", False);
- XA_SCREENSAVER_ID = XInternAtom (dpy, "_SCREENSAVER_ID", False);
- XA_SCREENSAVER_RESPONSE = XInternAtom (dpy, "_SCREENSAVER_RESPONSE", False);
- XA_SELECT = XInternAtom (dpy, "SELECT", False);
- XA_DEMO = XInternAtom (dpy, "DEMO", False);
- XA_BLANK = XInternAtom (dpy, "BLANK", False);
- XA_LOCK = XInternAtom (dpy, "LOCK", False);
- XA_EXIT = XInternAtom (dpy, "EXIT", False);
- XA_RESTART = XInternAtom (dpy, "RESTART", False);
-
- make_demo_dialog (toplevel_shell, pair);
-
- if (prefs)
- {
- make_preferences_dialog (pair, toplevel_shell);
- pop_preferences_dialog (pair);
- }
-
- the_network_is_not_the_computer (preferences_dialog
- ? preferences_dialog
- : demo_dialog);
-
- XtAppMainLoop (app);
-
- exit (0);
-}
+++ /dev/null
-/* dialogs-Xaw.c --- Athena widgets for demo, options, and password dialogs.
- * xscreensaver, Copyright (c) 1997, 1998 Jamie Zawinski <jwz@jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * 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.
- *
- * Most of this code contributed by Jon A. Christopher <jac8782@tamu.edu>
- * Copyright 1997, with the same permissions as above.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Shell.h>
-#include <X11/Xaw/Form.h>
-#include <X11/Xaw/Box.h>
-#include <X11/Xaw/List.h>
-#include <X11/Xaw/Command.h>
-#include <X11/Xaw/Toggle.h>
-#include <X11/Xaw/Viewport.h>
-#include <X11/Xaw/Dialog.h>
-#include <X11/Xaw/AsciiText.h>
-
-#include <stdio.h>
-
-#include "visual.h" /* for visual_depth() */
-
-Widget preferences_dialog;
-Widget preferences_form;
-Widget timeout_text;
-Widget cycle_text;
-Widget fade_text;
-Widget fade_ticks_text;
-Widget lock_timeout_text;
-Widget passwd_timeout_text;
-Widget verbose_toggle;
-Widget install_cmap_toggle;
-Widget fade_toggle;
-Widget unfade_toggle;
-Widget lock_toggle;
-Widget prefs_done;
-Widget prefs_cancel;
-
-Widget demo_dialog;
-Widget demo_form;
-Widget label1;
-/*Widget label2;*/
-/*Widget text_area;*/
-Widget demo_list;
-Widget text_line;
-/*Widget vline;*/
-Widget next;
-Widget prev;
-Widget edit;
-Widget done;
-Widget restart;
-/*Widget spacer;*/
-
-static Widget buttonbox, textbox, okbox;
-
-
-void
-create_preferences_dialog(Widget parent, Visual *visual, Colormap colormap)
-{
- Widget rlabel;
- int depth = visual_depth(XtScreen(parent), visual);
-
- preferences_dialog =
- XtVaCreatePopupShell("preferences_dialog", transientShellWidgetClass, parent,
- XtNvisual, visual,
- XtNcolormap, colormap,
- XtNdepth, depth,
- NULL);
-
- preferences_form =
- XtVaCreateManagedWidget("preferences_form", formWidgetClass,
- preferences_dialog,
- XtNvisual, visual,
- XtNcolormap, colormap,
- XtNdepth, depth,
- NULL);
-
- rlabel = XtVaCreateManagedWidget("label1", labelWidgetClass, preferences_form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNtop, XtChainTop,
- NULL);
-
- textbox=
- XtVaCreateManagedWidget("textbox", formWidgetClass, preferences_form,
- XtNleft, XtChainLeft,
- XtNfromVert, rlabel,
- NULL);
- okbox=
- XtVaCreateManagedWidget("textbox", boxWidgetClass, preferences_form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, textbox,
- XtNorientation, XtorientHorizontal,
- NULL);
- timeout_text=
- XtVaCreateManagedWidget("timeout", dialogWidgetClass, textbox,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNtop, XtChainTop,
- NULL);
- cycle_text=
- XtVaCreateManagedWidget("cycle", dialogWidgetClass, textbox,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, timeout_text,
- NULL);
- fade_text=
- XtVaCreateManagedWidget("fade", dialogWidgetClass, textbox,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, cycle_text,
- NULL);
-
- fade_ticks_text =
- XtVaCreateManagedWidget("ticks", dialogWidgetClass, textbox,
- XtNtop, XtChainTop,
- XtNright, XtChainRight,
- XtNfromHoriz, timeout_text,
- NULL);
-
- lock_timeout_text =
- XtVaCreateManagedWidget("lockTime", dialogWidgetClass, textbox,
- XtNfromVert, fade_ticks_text,
- XtNright, XtChainRight,
- XtNfromHoriz, cycle_text,
- NULL);
-
- passwd_timeout_text =
- XtVaCreateManagedWidget("passwdTime", dialogWidgetClass, textbox,
- XtNfromVert, lock_timeout_text,
- XtNright, XtChainRight,
- XtNfromHoriz, fade_text,
- NULL);
-
- buttonbox=
- XtVaCreateManagedWidget("buttonbox", boxWidgetClass, preferences_form,
- XtNfromVert, rlabel,
- XtNfromHoriz, textbox,
- XtNright, XtChainRight,
- XtNorientation, XtorientVertical,
- NULL);
- verbose_toggle =
- XtVaCreateManagedWidget("verbose", toggleWidgetClass, buttonbox,
- NULL);
- install_cmap_toggle =
- XtVaCreateManagedWidget("cmap", toggleWidgetClass, buttonbox,
- NULL);
- fade_toggle =
- XtVaCreateManagedWidget("fade", toggleWidgetClass, buttonbox,
- NULL);
- unfade_toggle =
- XtVaCreateManagedWidget("unfade", toggleWidgetClass, buttonbox,
- NULL);
- lock_toggle =
- XtVaCreateManagedWidget("lock", toggleWidgetClass, buttonbox,
- NULL);
-
-
- prefs_done = XtVaCreateManagedWidget("done", commandWidgetClass, okbox,
- NULL);
- prefs_cancel = XtVaCreateManagedWidget("cancel", commandWidgetClass, okbox,
- NULL);
-}
-
-void
-create_demo_dialog(Widget parent, Visual *visual, Colormap colormap)
-{
- Widget subform, box, viewport, label2;
- int depth = visual_depth(XtScreen(parent), visual);
-
- demo_dialog =
- XtVaCreatePopupShell("demo_dialog", transientShellWidgetClass, parent,
- XtNvisual, visual,
- XtNcolormap, colormap,
- XtNdepth, depth,
- NULL);
-
- demo_form =
- XtVaCreateManagedWidget("demo_form", formWidgetClass, demo_dialog,
- XtNvisual, visual,
- XtNcolormap, colormap,
- XtNdepth, depth,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNtop, XtChainTop,
- NULL);
-
- label1 = XtVaCreateManagedWidget("label1", labelWidgetClass, demo_form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNtop, XtChainTop,
- NULL);
-
- label2 = XtVaCreateManagedWidget("label2", labelWidgetClass, demo_form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, label1,
- NULL);
-
- subform =
- XtVaCreateManagedWidget("subform", formWidgetClass, demo_form,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, label2,
- XtNresizable, True,
- NULL);
- 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);
-
- text_line = XtVaCreateManagedWidget("text", asciiTextWidgetClass, subform,
- XtNleft, XtChainLeft,
- XtNright, XtChainRight,
- XtNfromVert, viewport,
- XtNbottom, XtChainBottom,
- XtNeditType, XawtextEdit,
- NULL);
-
- box =
- XtVaCreateManagedWidget("box", boxWidgetClass, demo_form,
- XtNleft, XtChainLeft,
- XtNfromVert, subform,
- XtNbottom, XtChainBottom,
- XtNright, XtChainRight,
- XtNorientation, XtEhorizontal,
- NULL);
- next = XtVaCreateManagedWidget("next", commandWidgetClass, box, NULL);
- prev = XtVaCreateManagedWidget("prev", commandWidgetClass, box, NULL);
- edit = XtVaCreateManagedWidget("edit", commandWidgetClass, box, NULL);
-#if 0
- restart = XtVaCreateManagedWidget("restart", commandWidgetClass, box, NULL);
-#endif
- done = XtVaCreateManagedWidget("done", commandWidgetClass, box, NULL);
-}
+++ /dev/null
-/* dialogs-Xm.c --- Motif widgets for demo, options, and password dialogs.
- * xscreensaver, Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
- *
- * Permission to use, copy, modify, distribute, and sell this software and its
- * documentation for any purpose is hereby granted without fee, provided that
- * the above copyright notice appear in all copies and that both that
- * copyright notice and this permission notice appear in supporting
- * documentation. No representations are made about the suitability of this
- * software for any purpose. It is provided "as is" without express or
- * implied warranty.
- */
-
-/* The code in this file started off its life as the output of XDesigner,
- but I've since hacked it by hand... It's a mess, avert your eyes.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <X11/Xatom.h>
-#include <X11/Intrinsic.h>
-#include <X11/Shell.h>
-
-#include <Xm/Xm.h>
-#include <Xm/DialogS.h>
-#include <Xm/DrawnB.h>
-#include <Xm/Form.h>
-#include <Xm/Label.h>
-#include <Xm/List.h>
-#include <Xm/PushB.h>
-#include <Xm/ScrollBar.h>
-#include <Xm/Separator.h>
-#include <Xm/TextF.h>
-#include <Xm/ToggleB.h>
-
-#include <Xm/SelectioB.h>
-
-#include <stdio.h>
-
-#include "visual.h" /* for visual_depth() */
-
-Widget preferences_dialog;
-Widget preferences_form;
-Widget timeout_text;
-Widget cycle_text;
-Widget fade_text;
-Widget fade_ticks_text;
-Widget lock_timeout_text;
-Widget passwd_timeout_text;
-Widget verbose_toggle;
-Widget install_cmap_toggle;
-Widget fade_toggle;
-Widget unfade_toggle;
-Widget lock_toggle;
-Widget prefs_done;
-Widget prefs_cancel;
-
-Widget demo_dialog;
-Widget demo_form;
-Widget label1;
-Widget label2;
-Widget text_area;
-Widget demo_list;
-Widget text_line;
-Widget vline;
-Widget next;
-Widget prev;
-Widget edit;
-Widget done;
-Widget restart;
-Widget spacer;
-
-void
-create_preferences_dialog(Widget parent, Visual *visual, Colormap colormap)
-{
- Widget children[22]; /* Children to manage */
- Arg al[64]; /* Arg List */
- register int ac = 0; /* Arg Count */
- Widget widget12;
- Widget widget13;
- Widget widget14;
- Widget widget15;
- Widget widget16;
- Widget widget17;
- Widget widget18;
- Widget widget48;
- Widget widget29;
-
- Widget real_dialog;
- Widget w;
-
- ac = 0;
- XtSetArg (al[ac], XmNvisual, visual); ac++;
- XtSetArg (al[ac], XmNcolormap, colormap); ac++;
- XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++;
-
- real_dialog = XmCreatePromptDialog (parent, "preferencesForm", al, ac);
- preferences_dialog = XtParent(real_dialog);
-
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SEPARATOR);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SELECTION_LABEL);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_HELP_BUTTON);
- if (w) XtUnmanageChild (w);
-
- ac = 0;
- XtSetArg (al [ac], XmNtopAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- preferences_form = XmCreateForm (real_dialog, "form", al, ac);
- XtManageChild (preferences_form);
-
- ac = 0;
-
- widget12 = XmCreateLabel ( preferences_form, "preferencesLabel", al, ac );
- widget13 = XmCreateSeparator ( preferences_form, "separator", al, ac );
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget14 = XmCreateLabel ( preferences_form, "timeoutLabel", al, ac );
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget15 = XmCreateLabel ( preferences_form, "cycleLabel", al, ac );
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget16 = XmCreateLabel ( preferences_form, "fadeSecondsLabel", al, ac );
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget17 = XmCreateLabel ( preferences_form, "fadeTicksLabel", al, ac );
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget18 = XmCreateLabel ( preferences_form, "lockLabel", al, ac );
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_END); ac++;
- widget48 = XmCreateLabel ( preferences_form, "passwdLabel", al, ac );
- ac = 0;
- timeout_text = XmCreateTextField ( preferences_form, "timeoutText", al, ac );
- cycle_text = XmCreateTextField ( preferences_form, "cycleText", al, ac );
- fade_text = XmCreateTextField ( preferences_form, "fadeSecondsText", al, ac);
- fade_ticks_text = XmCreateTextField ( preferences_form, "fadeTicksText", al, ac);
- lock_timeout_text = XmCreateTextField ( preferences_form, "passwdText", al, ac);
- passwd_timeout_text = XmCreateTextField ( preferences_form, "lockText", al, ac);
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
- verbose_toggle = XmCreateToggleButton (preferences_form,"verboseToggle",al,ac);
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
- install_cmap_toggle = XmCreateToggleButton ( preferences_form, "cmapToggle", al, ac);
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
- fade_toggle = XmCreateToggleButton ( preferences_form, "fadeToggle", al, ac);
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
- unfade_toggle = XmCreateToggleButton (preferences_form,"unfadeToggle",al,ac);
- ac = 0;
- XtSetArg(al[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
- lock_toggle = XmCreateToggleButton ( preferences_form, "lockToggle", al, ac);
- ac = 0;
- widget29 = XmCreateSeparator ( preferences_form, "separator", al, ac );
-
- prefs_done = XmSelectionBoxGetChild (real_dialog, XmDIALOG_OK_BUTTON);
- prefs_cancel = XmSelectionBoxGetChild (real_dialog, XmDIALOG_CANCEL_BUTTON);
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetValues ( widget12,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, widget12); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 0); ac++;
- XtSetValues ( widget13,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, widget13); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomWidget, timeout_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 20); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, timeout_text); ac++;
- XtSetValues ( widget14,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 20); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, cycle_text); ac++;
- XtSetValues ( widget15,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 20); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, fade_text); ac++;
- XtSetValues ( widget16,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 20); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, fade_ticks_text); ac++;
- XtSetValues ( widget17,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 19); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, lock_timeout_text); ac++;
- XtSetValues ( widget18,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, passwd_timeout_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, passwd_timeout_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 14); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightWidget, passwd_timeout_text); ac++;
- XtSetValues ( widget48,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, widget13); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 141); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( timeout_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 2); ac++;
- XtSetArg(al[ac], XmNtopWidget, timeout_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, timeout_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( cycle_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 2); ac++;
- XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( fade_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 2); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( fade_ticks_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 2); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( lock_timeout_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++;
- XtSetValues ( passwd_timeout_text,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, widget13); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, timeout_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 20); ac++;
- XtSetArg(al[ac], XmNleftWidget, timeout_text); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 20); ac++;
- XtSetValues ( verbose_toggle,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, cycle_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, verbose_toggle); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 20); ac++;
- XtSetValues ( install_cmap_toggle,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, fade_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, install_cmap_toggle); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 20); ac++;
- XtSetValues ( fade_toggle,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, fade_ticks_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, fade_toggle); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 20); ac++;
- XtSetValues ( unfade_toggle,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 0); ac++;
- XtSetArg(al[ac], XmNbottomWidget, lock_timeout_text); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++;
- XtSetArg(al[ac], XmNleftOffset, 0); ac++;
- XtSetArg(al[ac], XmNleftWidget, unfade_toggle); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 20); ac++;
- XtSetValues ( lock_toggle,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 0); ac++;
- XtSetArg(al[ac], XmNtopWidget, passwd_timeout_text); ac++;
-
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNbottomOffset, 4); ac++;
-
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetValues ( widget29,al, ac );
- ac = 0;
-
-
-
- ac = 0;
- children[ac++] = widget12;
- children[ac++] = widget13;
- children[ac++] = widget14;
- children[ac++] = widget15;
- children[ac++] = widget16;
- children[ac++] = widget17;
- children[ac++] = widget18;
- children[ac++] = widget48;
- children[ac++] = timeout_text;
- children[ac++] = cycle_text;
- children[ac++] = fade_text;
- children[ac++] = fade_ticks_text;
- children[ac++] = lock_timeout_text;
- children[ac++] = passwd_timeout_text;
- children[ac++] = verbose_toggle;
- children[ac++] = install_cmap_toggle;
- children[ac++] = fade_toggle;
- children[ac++] = unfade_toggle;
- children[ac++] = lock_toggle;
- children[ac++] = widget29;
-
- XtManageChildren(children, ac);
- ac = 0;
-
- preferences_form = real_dialog;
-}
-
-
-void
-create_demo_dialog(Widget parent, Visual *visual, Colormap colormap)
-{
- Arg al[64]; /* Arg List */
- register int ac = 0; /* Arg Count */
-
- Widget real_dialog;
- Widget w;
-
-
- ac = 0;
- XtSetArg (al[ac], XmNvisual, visual); ac++;
- XtSetArg (al[ac], XmNcolormap, colormap); ac++;
- XtSetArg (al[ac], XmNdepth, visual_depth(XtScreen(parent), visual)); ac++;
-
-
- real_dialog = XmCreatePromptDialog (parent, "demoForm", al, ac);
- demo_dialog = XtParent(real_dialog);
-
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SEPARATOR);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_SELECTION_LABEL);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_OK_BUTTON);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_CANCEL_BUTTON);
- if (w) XtUnmanageChild (w);
- w = XmSelectionBoxGetChild (real_dialog, XmDIALOG_HELP_BUTTON);
- if (w) XtUnmanageChild (w);
-
- ac = 0;
- XtSetArg (al [ac], XmNtopAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg (al [ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- demo_form = XmCreateForm (real_dialog, "form", al, ac);
- XtManageChild (demo_form);
-
- label1 = XmCreateLabel ( demo_form, "label1", al, ac );
- label2 = XmCreateLabel ( demo_form, "label2", al, ac );
- demo_list = XmCreateScrolledList ( demo_form, "demoList", al, ac );
- text_area = XtParent ( demo_list );
-
- ac = 0;
- text_line = XmSelectionBoxGetChild (real_dialog, XmDIALOG_TEXT);
- XtManageChild(text_line);
-
- /* #### ARRGH! This is apparently the only way to make hitting return in
- the text field not *ALSO* activate the most-recently-selected button!
-
- This has the unfortunate side effect of making the buttons not be
- keyboard-traversable, but that's less bad than not being able to try
- out new switches by typing them into the text field.
-
- XmSelectionBox(3M) says in the "Additional Behavior" section:
- KActivate:
- Calls the activate callbacks for the button with
- the keyboard focus. [... ] In a List widget or
- single-line Text widget, the List or Text action
- associated with KActivate is called before the
- SelectionBox actions associated with KActivate."
-
- So they take it as a given that when running activateCallback on a single-
- line Text widget, you'll also want to run activateCallback on whatever the
- currently-focussed button is as well! Morons! Villains! Shitheads!
-
- (Perhaps there's some way to override XmSelectionBox's KActivate behavior.
- I doubt it, but if there is, I don't know it.)
- */
- ac = 0;
- XtSetArg(al[ac], XmNtraversalOn, False); ac++;
-
- next = XmCreatePushButton ( real_dialog, "next", al, ac );
- prev = XmCreatePushButton ( real_dialog, "prev", al, ac );
- edit = XmCreatePushButton ( real_dialog, "edit", al, ac );
- done = XmCreatePushButton ( real_dialog, "done", al, ac );
-#if 0
- restart = XmCreatePushButton ( real_dialog, "restart", al, ac );
-#endif
- XtManageChild(next);
- XtManageChild(prev);
- XtManageChild(edit);
- XtManageChild(done);
-#if 0
- XtManageChild(restart);
-#endif
-
- ac = 0;
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNtopOffset, 5); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetValues ( label1,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, label1); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetValues ( label2,al, ac );
- ac = 0;
-
- XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
- XtSetArg(al[ac], XmNtopOffset, 4); ac++;
- XtSetArg(al[ac], XmNtopWidget, label2); ac++;
- XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNleftOffset, 4); ac++;
- XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
- XtSetArg(al[ac], XmNrightOffset, 4); ac++;
- XtSetValues ( text_area,al, ac );
-
- XtManageChild(demo_list);
- XtManageChild(label1);
- XtManageChild(label2);
-
- demo_form = real_dialog;
-}
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
+.TH XScreenSaver 1 "09-Dec-99 (3.22)" "X Version 11"
.SH NAME
xscreensaver-command - control a running xscreensaver process
.SH SYNOPSIS
+++ /dev/null
-.de EX \"Begin example
-.ne 5
-.if n .sp 1
-.if t .sp .5
-.nf
-.in +.5i
-..
-.de EE
-.fi
-.in -.5i
-.if n .sp 1
-.if t .sp .5
-..
-.TH XScreenSaver 1 "09-Nov-99 (3.19)" "X Version 11"
-.SH NAME
-xscreensaver-demo - interactively control the background xscreensaver daemon
-.SH SYNOPSIS
-.B xscreensaver\-demo
-[\-display \fIhost:display.screen\fP] [\-prefs] [\-xrm \fIresources\fP]
-.SH DESCRIPTION
-The \fIxscreensaver\-demo\fP program is a graphical front-end for
-setting the parameters used by the background
-.BR xscreensaver (1)
-daemon.
-It is essentially two things: a tool for editing the \fI~/.xscreensaver\fP
-file; and a tool for demoing the various graphics hacks that
-the \fIxscreensaver\fP daemon will launch.
-
-.B Note:
-this manual describes the Motif and Athena versions of
-the \fIxscreensaver\-demo\fP command. At this point, the Gtk
-version of \fIxscreensaver\-demo\fP is somewhat more advanced.
-
-The main dialog box contains a scrolling list, a text field, and a number
-of buttons.
-
-Double-clicking on one of the programs in the list will run it. The screen
-will go black, and the program will run in full-screen mode, just as it would
-if the \fIxscreensaver\fP daemon had launched it. Clicking the mouse again
-will stop the demo and un-blank the screen, making the dialog box visible
-again.
-
-Single-clicking in the list will place the indicated program and its args
-in the text field to be edited. Edit the arguments and hit return to run
-the program with the parameters you have specified. This will also save
-your changes to your \fI~/.xscreensaver\fP file: so any changes you make
-in this way are persistent.
-
-If one of the lines in the scrolling list begins with the character "-",
-then that means that the program is disabled: \fIxscreensaver\fP will not
-select it to be run (though you can still try it out by clicking on it.)
-Rather than just deleting the programs you don't want to run, you might
-want to disable them in this way instead, so that you can more easily change
-your mind later.
-
-If the line begins with the name of a visual, followed by a colon, then
-that program will only be run on that kind of visual. For example, you can
-specify that a particular program should only be run if color is available,
-and another should only be run in monochrome. See the discussion of
-the \fIprograms\fP parameter in the \fIConfiguration\fP section of the
-.BR xscreensaver (1)
-manual.
-
-The buttons are:
-.TP 8
-.B Run Next
-Clicking this button will run the next program in the list after the
-currently-selected one, and will wrap around to the top when it reaches
-the bottom.
-.TP 8
-.B Run Previous
-Opposite of Run Next; at the top, it wraps around to the bottom.
-.TP 8
-.B Preferences
-This pops up a second dialog box, in which you have the option to
-interactively change most of the screensaver's operational parameters,
-such as its timeouts, and whether it should lock the screen. When you
-click OK, your chosen settings will take effect immediately, and will
-also be saved to the \fI~/.xscreensaver\fP file in your home directory,
-so that the settings will persist next time.
-.TP 8
-.B Quit
-Exits the \fIxscreensaver-demo\fP program. The background \fIxscreensaver\fP
-daemon will continue running as before.
-.P
-The Preferences dialog box lets you change the following settings.
-
-(There are more settings available, but these are the most commonly used
-ones; see the manual for
-.BR xscreensaver (1)
-for other parameters that can be set by editing the \fI~/.xscreensaver\fP
-file, or the X resource database.)
-.TP 8
-.B Saver Timeout
-After the user has been idle this long, the \fIxscreensaver\fP daemon
-will blank the screen.
-.TP 8
-.B Cycle Timeout
-After the screensaver has been running for this long, the currently
-running graphics demo will be killed, and a new one started.
-If this is 0, then the graphics demo will never be changed:
-only one demo will run until the screensaver is deactivated by user
-activity.
-.TP 8
-.B Verbose\
-Whether to print lots of debugging information.
-.TP 8
-.B Install Colormap
-Whether to install a private colormap while the screensaver is active, so
-that the graphics hacks can get as many colors as possible. (This only
-applies when the screen's default visual is being used, since non-default
-visuals get their own colormaps automatically.) This can also be overridden
-on a per-demo basis.
-.TP 8
-.B Fade Colormap
-If selected, then when the screensaver activates, the current contents
-of the screen will fade to black instead of simply winking out. This only
-works on displays with writable colormaps, that is, if the screen's default
-visual is a PseudoColor visual. A fade will also be done when
-switching graphics hacks (when the \fICycle Timeout\fP expires.)
-.TP 8
-.B Unfade Colormap
-The complement to \fIFade Colormap\fP: if selected, then when the screensaver
-deactivates, the original contents of the screen will fade in from black
-instead of appearing immediately. This only works on displays with writable
-colormaps, and when \fIFade Colormap\fP is also selected.
-.TP 8
-.B Fade Duration
-When fading or unfading are selected, this controls how long the fade will
-take.
-.TP 8
-.B Fade Ticks
-This controls how many times a second the colormap will be changed to
-effect a fade. Higher numbers yield smoother fades, but may make the
-fades take longer than the specified number of seconds, if your server
-isn't fast enough to keep up.
-.TP 8
-.B Require Password
-Whether the screen saver should lock the screen when it activates.
-.TP 8
-.B Lock Timeout
-If \fIRequire Password\fP is selected, this controls the length of
-the ``grace period'' between when the screensaver activates, and when the
-screen becomes locked. For example, if this is 0:05:00,
-and \fISaver Timeout\fP is 0:10:00, then after 10 minutes, the screen
-would blank. If there was user activity at 12 minutes, no password
-would be required to un-blank the screen. But, if there was user activity
-at 15 minutes or later (that is, \fILock Timeout\fP minutes after
-activation) then a password would be required. The default is 0, meaning
-that if locking is enabled, then a password will be required as soon as the
-screen blanks.
-.TP 8
-.B Password Timeout
-When the screensaver is prompting for a password, the prompt dialog box will
-stay on the screen for this long before giving up, and reverting to
-screen-saving mode.
-.SH COMMAND-LINE OPTIONS
-.I xscreensaver\-demo
-accepts the following command line options.
-.TP 8
-.B \-display \fIhost:display.screen\fP
-The X display to use. The \fIxscreensaver\-demo\fP program will open its
-window on that display, and also control the \fIxscreensaver\fP daemon that
-is managing that same display.
-.TP 8
-.B \-prefs
-Start up in Preferences mode: this is just like launching the program with
-no arguments, and then pressing the \fIPreferences\fP button.
-.P
-It is important that the \fIxscreensaver\fP and \fIxscreensaver\-demo\fP
-processes be running on the same machine, or at least, on two machines
-that share a file system. When \fIxscreensaver\-demo\fP writes a new version
-of the \fI~/.xscreensaver\fP file, it's important that the \fIxscreensaver\fP
-see that same file. If the two processes are seeing
-different \fI~/.xscreensaver\fP files, things will malfunction.
-.SH ENVIRONMENT
-.PP
-.TP 8
-.B DISPLAY
-to get the default host and display number.
-.TP 8
-.B PATH
-to find the sub-programs to run. However, note that the sub-programs
-are actually launched by the \fIxscreensaver\fP daemon, not
-by \fIxscreensaver-demo\fP itself. So, what matters is what \fB$PATH\fP
-the \fIxscreensaver\fP program sees.
-.TP 8
-.B HOME
-for the directory in which to read and write the \fI.xscreensaver\fP file.
-.TP 8
-.B XENVIRONMENT
-to get the name of a resource file that overrides the global resources
-stored in the RESOURCE_MANAGER property.
-.SH UPGRADES
-The latest version can always be found at
-http://www.jwz.org/xscreensaver/
-.SH SEE ALSO
-.BR X (1),
-.BR xscreensaver (1),
-.BR xscreensaver\-command (1)
-.SH COPYRIGHT
-Copyright \(co 1992, 1993, 1997, 1998, 1999
-by Jamie Zawinski. Permission to use, copy, modify, distribute, and sell
-this software and its documentation for any purpose is hereby granted without
-fee, provided that the above copyright notice appear in all copies and that
-both that copyright 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.
-.SH AUTHOR
-Jamie Zawinski <jwz@jwz.org>, 13-aug-92.
-
-Please let me know if you find any bugs or make any improvements.
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
+.TH XScreenSaver 1 "09-Dec-99 (3.22)" "X Version 11"
.SH NAME
xscreensaver-demo - interactively control the background xscreensaver daemon
.SH SYNOPSIS
file; and a tool for demoing the various graphics hacks that
the \fIxscreensaver\fP daemon will launch.
-.B Note:
-this manual describes the Gtk version of the \fIxscreensaver\-demo\fP
-command. The UI of the Motif and Athena versions of \fIxscreensaver\-demo\fP
-is a bit different (for now.)
-
The main window consists of a menu bar and two tabbed pages. The first page
is for editing the list of demos, and the second is for editing various other
parameters of the screensaver.
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "18-Nov-99 (3.21)" "X Version 11"
+.TH XScreenSaver 1 "09-Dec-99 (3.22)" "X Version 11"
.SH NAME
xscreensaver - graphics hack and screen locker, launched when the user is idle
.SH SYNOPSIS
* high score is in the bottom left. Start with -smart to have the computer
* player skip the learning process.
+ Version: 0.2
+ -- fixed an AI bug that was keeping the computer player a tad weak
+ Version: 0.1
+ -- first release
+
*/
#include "screenhack.h"
-#define kSleepTime 10000
+#define kSleepTime 10000
#define font_height(font) (font->ascent + font->descent)
#define FONT_NAME "-*-times-*-*-*-*-80-*-*-*-*-*-*-*"
}
}
+#define kExpHelp 0.2
+#define kSpeedDiff 3.5
+#define kMaxToGround 0.75
static int fire(int xlim, int ylim,
Display *dpy, Window window, Colormap cmap)
{
continue;
if (choosy && (city[mis->dcity].alive == 0))
continue;
+ ey = mis->starty + ((float) (mis->endy - mis->starty)) * (mis->pos + kExpHelp + (1.0 - mis->pos) / kSpeedDiff);
+ if (ey > ylim * kMaxToGround)
+ continue; /* too far down */
cnt++;
suitor[j] = 1;
}
}
m->startx = city[dcity].x;
m->starty = ylim;
-#define kExpHelp 0.2
-#define kSpeedDiff 3.5
ex = mis->startx + ((float) (mis->endx - mis->startx)) * (mis->pos + kExpHelp + (1.0 - mis->pos) / kSpeedDiff);
ey = mis->starty + ((float) (mis->endy - mis->starty)) * (mis->pos + kExpHelp + (1.0 - mis->pos) / kSpeedDiff);
m->endx = ex + random() % 16 - 8 + (random() % aim) - aim / 2;
m->endy = ey + random() % 16 - 8 + (random() % aim) - aim / 2;
- if (ey > ylim * 0.75)
+ if (ey > ylim * kMaxToGround)
return 0; /* too far down */
mis->enemies++;
m->target = misnum;
if (!m->alive)
continue;
- if (loop & 1) {
+ if (loop & 1)
if (m->outgoing) {
m->rad++;
if (m->rad >= m->max)
if (m->rad <= 0)
m->alive = 0;
}
- }
}
}
use Fcntl ':flock'; # import LOCK_* constants
-my $version = q{ $Revision: 1.42 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.43 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
my $copyright = "WebCollage $version, Copyright (c) 1999" .
" Jamie Zawinski <jwz\@jwz.org>\n" .
" http://www.jwz.org/xscreensaver/\n";
$cookie = "AV_ALL=1";
}
- print S ("GET " . ($http_proxy ? $url : "/$path") . " HTTP/1.0\n" .
- "Host: $them\n" .
- "User-Agent: $progname/$version\n" .
- ($referer ? "Referer: $referer\n" : "") .
- ($cookie ? "Cookie: $cookie\n" : "") .
- "\n");
+ print S ("GET " . ($http_proxy ? $url : "/$path") . " HTTP/1.0\r\n" .
+ "Host: $them\r\n" .
+ "User-Agent: $progname/$version\r\n" .
+ ($referer ? "Referer: $referer\r\n" : "") .
+ ($cookie ? "Cookie: $cookie\r\n" : "") .
+ "\r\n");
my $http = <S>;
while (<S>) {
static const char screensaver_id[] =
- "@(#)xscreensaver 3.21 (17-Nov-99), by Jamie Zawinski (jwz@jwz.org)";
+ "@(#)xscreensaver 3.22 (08-Dec-99), by Jamie Zawinski (jwz@jwz.org)";
Begin3
Title: xscreensaver
-Version: 3.21
-Entered-date: 18NOV99
+Version: 3.22
+Entered-date: 09DEC99
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@jwz.org (Jamie Zawinski)
Maintained-by: jwz@jwz.org (Jamie Zawinski)
Primary-site: http://www.jwz.org/xscreensaver/
- 1261K xscreensaver-3.21.tar.gz
+ 1260K xscreensaver-3.22.tar.gz
39K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
- 1261K xscreensaver-3.21.tar.gz
+ 1260K xscreensaver-3.22.tar.gz
39K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: ftp.x.org /contrib/applications/
- 1261K xscreensaver-3.21.tar.gz
+ 1260K xscreensaver-3.22.tar.gz
39K xscreensaver.README
1K xscreensaver.lsm
Platforms: Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
%define name xscreensaver
-%define version 3.21
+%define version 3.22
%define release 1
%define serial 1
%define prefix /usr/X11R6