User: ben
Date: 05/02/15 02:25:21
Modified: xemacs/src Tag: ben-fixup EmacsShell-sub.c EmacsShell.c
Makefile.in.in alloc.c balloon_help.c buffer.c
callint.c charset.h chartab.c cmds.c config.h.in
console-gtk-impl.h console-gtk.h console-impl.h
console-msw.c console-stream.c console-x-impl.h
console-x.h console.c console.h data.c database.c
debug.c device-gtk.c device-x.c device.h
dialog-msw.c dired-msw.c dired.c doc.c doprnt.c
dragdrop.c editfns.c emacs-marshals.c emacs.c
emodules.c eval.c event-Xt.c event-gtk.c
event-msw.c event-stream.c event-unixoid.c
event-xlike-inc.c events.c events.h extents-impl.h
extents.c extents.h faces.c faces.h file-coding.c
fileio.c floatfns.c fns.c frame-gtk.c frame-msw.c
frame-tty.c frame-x.c frame.c frame.h gccache-gtk.c
glade.c glyphs-eimage.c glyphs-gtk.c glyphs-msw.c
glyphs-shared.c glyphs-widget.c glyphs-x.c glyphs.c
glyphs.h gpmevent.c gtk-glue.c gtk-xemacs.c
gui-gtk.c gui-x.c gui.c indent.c inline.c insdel.c
insdel.h intl-win32.c intl.c keymap.c lisp.h
lread.c lrecord.h lstream.c lstream.h marker.c
menubar-gtk.c minibuf.c mule-charset.c
mule-coding.c native-gtk-toolbar.c nt.c
objects-gtk.c objects-gtk.h objects-msw.c
objects-tty.c objects-x.c objects-x.h print.c
process-unix.c process.c ralloc.c rangetab.c
redisplay-gtk.c redisplay-msw.c redisplay-output.c
redisplay-x.c redisplay.c redisplay.h
scrollbar-gtk.c scrollbar-msw.c scrollbar-x.c
scrollbar.c scrollbar.h search.c select-common.h
select-gtk.c select-msw.c select-x.c sound.c
specifier.c specifier.h symbols.c symsinit.h
syntax.c sysdep.c sysdll.c sysdll.h syswindows.h
text.c text.h toolbar-common.c toolbar-gtk.c
toolbar-x.c tooltalk.c ui-byhand.c ui-gtk.c undo.c
unicode.c window-impl.h window.c winslots.h
Added: xemacs/src console-xlike.h event-xlike.c gccache-x.c
gccache-xlike-inc.c intl-gtk.c objects-xlike-inc.c
ui-gtk-inc.c
Removed: xemacs/src dumper.h gccache-gtk.h universe.h xgccache.c
xgccache.h
Log:
first check-in of ben-fixup branch
Revision Changes Path
No revision
No revision
1.434.2.1 +40 -0 XEmacs/xemacs/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/ChangeLog,v
retrieving revision 1.434
retrieving revision 1.434.2.1
diff -u -r1.434 -r1.434.2.1
--- ChangeLog 2005/02/04 03:04:04 1.434
+++ ChangeLog 2005/02/15 01:15:45 1.434.2.1
@@ -1,3 +1,43 @@
+2002-12-16 Ben Wing <ben(a)xemacs.org>
+
+ * INSTALL (Rationale):
+ * configure.in (XE_COMPUTE_RUNPATH):
+ * configure.usage (Usage):
+ * configure.usage (--xemacs-compiler):
+ * configure.usage (--srcdir):
+ * configure.usage (--with-prefix):
+ * configure.usage (--bindir): New.
+ * configure.usage (--datadir): New.
+ * configure.usage (--statedir): New.
+ * configure.usage (--libdir): New.
+ * configure.usage (--infodir): New.
+ * configure.usage (--mandir): New.
+ * configure.usage (--lispdir): New.
+ * configure.usage (--sitelispdir): New.
+ * configure.usage (--etcdir): New.
+ * configure.usage (--lockdir): New.
+ * configure.usage (--archlibdir): New.
+ * configure.usage (--docdir): New.
+ * configure.usage (--moduledir): New.
+ * configure.usage (--with-site-lisp): New.
+ * configure.usage (--with-site-modules): New.
+ * configure.usage (--package-path): New.
+ * configure.usage (--infopath): New.
+ * configure.usage (--with-xmu):
+ * configure.usage (--with-tty):
+ * configure.usage (--with-gif):
+ * configure.usage (--native-sound-lib):
+ * configure.usage (--with-xim): New.
+ * configure.usage (--with-clash-detection): New.
+ * configure.usage (--with-database):
+ * configure.usage (--mail-locking):
+ * configure.usage (--with-ipv6-cname): Removed.
+ * configure.usage (--error-checking):
+ Redo usage message more logically, fix some problems. In configure,
+ when outputting the compilation options, put in a big ugly warning
+ about using union-type, since it's been known to trigger so many
+ compiler bugs, invariably leading to weird crashes.
+
2005-02-03 Ben Wing <ben(a)xemacs.org>
* BUGS, README.packages: Delete, incorporate into FAQ.
1.239.2.1 +2509 -2575XEmacs/xemacs/configure
Index: configure
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure,v
retrieving revision 1.239
retrieving revision 1.239.2.1
diff -u -r1.239 -r1.239.2.1
--- configure 2005/02/04 03:04:06 1.239
+++ configure 2005/02/15 01:15:48 1.239.2.1
@@ -6,7 +6,7 @@
#### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software
Foundation, Inc.
#### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
#### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
-#### Copyright (C) 1995, 1996, 2002, 2003, 2004 Ben Wing.
+#### Copyright (C) 1995, 1996, 2002, 2003, 2004, 2005 Ben Wing.
#### Copyright (C) 2000, 2001 Martin Buchholz.
#### Copyright (C) 1998, 1999 J. Kean Johnston.
@@ -194,7 +194,7 @@
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -249,6 +249,7 @@
need_modules_common=''
with_menubars=''
with_scrollbars=''
+with_toolbars=''
with_widgets=''
with_dialogs=''
cpp='' cppflags='' libs='' ldflags=''
@@ -263,16 +264,16 @@
with_nas_sound=''
with_esd_sound='no'
native_sound_lib=''
-with_gtk='no'
-with_gnome='no'
+with_gtk=''
+with_gnome=''
use_assertions="yes"
-with_toolbars=""
with_tty=""
use_union_type="no"
with_dnet=""
use_number_lib="no"
pdump=""
-with_dragndrop_default="no"
+with_dragndrop_windows="yes"
+with_dragndrop_nonwindows="no"
with_ipv6_cname="no"
@@ -535,8 +536,8 @@
flock ) val=flock ;;
file | dot ) val=file ;;
locking ) val=locking ;;
- mmdf ) val=mmdf ;;
- pop ) val=pop ;;
+ mmdf ) val=mmdf ;;
+ pop ) val=pop ;;
* ) (echo "$progname: Usage error:"
echo " " "The \`--$optname' option must have one of these values:
\`lockf', \`flock', \`file', \`dot', \`locking', \`mmdf', or
\`pop'."
@@ -790,11 +791,9 @@
n | no | non | none ) val=no ;;
y | ye | yes ) val=yes ;;
"") val=yes ;;
- g | gt | gtk ) val=gtk ;;
- ms | msw ) val=msw ;;
* ) (echo "$progname: Usage error:"
echo " " "The \`--$optname' option must have one of these values:
- \`gtk', \`lucid', \`motif', \`athena', \`yes', or
\`no'."
+ \`lucid', \`motif', \`athena', \`yes', or \`no'."
echo " Use \`$progname --help' to show usage.") >&2 &&
exit 1 ;;
esac
eval "$opt=\"$val\""
@@ -862,7 +861,7 @@
fi
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:866: checking whether ln -s works" >&5
+echo "configure:865: checking whether ln -s works" >&5
rm -f conftestdata
if ln -s X conftestdata 2>/dev/null
@@ -1148,7 +1147,7 @@
echo $ac_n "checking "host system type"""... $ac_c"
1>&6
-echo "configure:1152: checking "host system type"" >&5
+echo "configure:1151: checking "host system type"" >&5
internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub
"$internal_configuration"`
configuration=`echo "$configuration" | sed
's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
@@ -1696,7 +1695,7 @@
# 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:1700: checking for $ac_word" >&5
+echo "configure:1699: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1723,7 +1722,7 @@
# 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:1727: checking for $ac_word" >&5
+echo "configure:1726: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1771,7 +1770,7 @@
# 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:1775: checking for $ac_word" >&5
+echo "configure:1774: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1800,12 +1799,12 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works""... $ac_c" 1>&6
-echo "configure:1804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
+echo "configure:1803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -1813,12 +1812,12 @@
cat > conftest.$ac_ext << EOF
-#line 1817 "configure"
+#line 1816 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1821: \"$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
@@ -1835,7 +1834,7 @@
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -1846,19 +1845,19 @@
{ 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:1850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
cross-compiler" >&5
+echo "configure:1849: 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:1855: checking whether we are using GNU C" >&5
+echo "configure:1854: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1862:
\"$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:1861:
\"$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
@@ -1876,7 +1875,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c"
1>&6
-echo "configure:1880: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1879: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -1909,7 +1908,7 @@
# 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:1913: checking for $ac_word" >&5
+echo "configure:1912: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1936,7 +1935,7 @@
# 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:1940: checking for $ac_word" >&5
+echo "configure:1939: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1984,7 +1983,7 @@
# 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:1988: checking for $ac_word" >&5
+echo "configure:1987: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2013,12 +2012,12 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works""... $ac_c" 1>&6
-echo "configure:2017: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
+echo "configure:2016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -2026,12 +2025,12 @@
cat > conftest.$ac_ext << EOF
-#line 2030 "configure"
+#line 2029 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2034: \"$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
@@ -2048,7 +2047,7 @@
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -2059,19 +2058,19 @@
{ 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:2063: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
cross-compiler" >&5
+echo "configure:2062: 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:2068: checking whether we are using GNU C" >&5
+echo "configure:2067: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2075:
\"$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:2074:
\"$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
@@ -2089,7 +2088,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c"
1>&6
-echo "configure:2093: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2092: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2122,7 +2121,7 @@
# 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:2126: checking for $ac_word" >&5
+echo "configure:2125: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2149,7 +2148,7 @@
# 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:2153: checking for $ac_word" >&5
+echo "configure:2152: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2197,7 +2196,7 @@
# 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:2201: checking for $ac_word" >&5
+echo "configure:2200: checking for $ac_word" >&5
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2226,12 +2225,12 @@
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works""... $ac_c" 1>&6
-echo "configure:2230: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
+echo "configure:2229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -2239,12 +2238,12 @@
cat > conftest.$ac_ext << EOF
-#line 2243 "configure"
+#line 2242 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2247: \"$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
@@ -2261,7 +2260,7 @@
ac_ext=c
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
@@ -2272,19 +2271,19 @@
{ 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:2276: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a
cross-compiler" >&5
+echo "configure:2275: 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:2281: checking whether we are using GNU C" >&5
+echo "configure:2280: checking whether we are using GNU C" >&5
cat > conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2288:
\"$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:2287:
\"$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
@@ -2302,7 +2301,7 @@
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c"
1>&6
-echo "configure:2306: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2305: checking whether ${CC-cc} accepts -g" >&5
echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
@@ -2335,7 +2334,7 @@
if test "$GCC" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 2339 "configure"
+#line 2338 "configure"
#include "confdefs.h"
int main () {
#if __GNUC__ >= 3
@@ -2345,7 +2344,7 @@
#endif
}
EOF
-if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2348: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
@@ -2371,7 +2370,7 @@
test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z
"$CPP" && CPP="$NON_GNU_CPP"
echo $ac_n "checking how to run the C preprocessor""... $ac_c"
1>&6
-echo "configure:2375: checking how to run the C preprocessor" >&5
+echo "configure:2374: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2384,13 +2383,13 @@
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2388 "configure"
+#line 2387 "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:2394: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:2393: \"$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
:
@@ -2401,13 +2400,13 @@
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2405 "configure"
+#line 2404 "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:2411: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:2410: \"$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
:
@@ -2418,13 +2417,13 @@
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2422 "configure"
+#line 2421 "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:2428: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:2427: \"$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
:
@@ -2450,9 +2449,9 @@
echo $ac_n "checking for AIX""... $ac_c" 1>&6
-echo "configure:2454: checking for AIX" >&5
+echo "configure:2453: checking for AIX" >&5
cat > conftest.$ac_ext <<EOF
-#line 2456 "configure"
+#line 2455 "configure"
#include "confdefs.h"
#ifdef _AIX
yes
@@ -2479,9 +2478,9 @@
echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
-echo "configure:2483: checking for GNU libc" >&5
+echo "configure:2482: checking for GNU libc" >&5
cat > conftest.$ac_ext <<EOF
-#line 2485 "configure"
+#line 2484 "configure"
#include "confdefs.h"
#include <features.h>
int main() {
@@ -2493,7 +2492,7 @@
; return 0; }
EOF
-if { (eval echo configure:2497: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:2496: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
have_glibc=yes
else
@@ -2588,7 +2587,7 @@
esac
cat > conftest.$ac_ext <<EOF
-#line 2592 "configure"
+#line 2591 "configure"
#include "confdefs.h"
int main () {
#if defined __SUNPRO_C
@@ -2604,7 +2603,7 @@
#endif
}
EOF
-if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
@@ -2858,17 +2857,17 @@
if test "$__USLC__" = yes; then
echo $ac_n "checking for whether the -Kalloca compiler flag is
needed""... $ac_c" 1>&6
-echo "configure:2862: checking for whether the -Kalloca compiler flag is
needed" >&5
+echo "configure:2861: checking for whether the -Kalloca compiler flag is
needed" >&5
need_kalloca=no
cat > conftest.$ac_ext <<EOF
-#line 2865 "configure"
+#line 2864 "configure"
#include "confdefs.h"
int main() {
void *x = alloca(4);
; return 0; }
EOF
-if { (eval echo configure:2872: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
:
else
@@ -2879,14 +2878,14 @@
xe_save_c_switch_system="$c_switch_system"
c_switch_system="$c_switch_system -Kalloca"
cat > conftest.$ac_ext <<EOF
-#line 2883 "configure"
+#line 2882 "configure"
#include "confdefs.h"
int main() {
void *x = alloca(4);
; return 0; }
EOF
-if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
need_kalloca=yes
else
@@ -2924,7 +2923,7 @@
echo $ac_n "checking for preferred optimization flags""... $ac_c"
1>&6
-echo "configure:2928: checking for preferred optimization flags" >&5
+echo "configure:2927: checking for preferred optimization flags" >&5
if test "$with_optimization" = "yes" ; then
if test "$cflags_optimization_specified" = "no"; then
if test "$GCC" = "yes"; then
@@ -2951,7 +2950,7 @@
echo $ac_n "checking for preferred debugging flags""... $ac_c"
1>&6
-echo "configure:2955: checking for preferred debugging flags" >&5
+echo "configure:2954: checking for preferred debugging flags" >&5
if test "$cflags_debugging_specified" = "no"; then
cflags_debugging="-g"
@@ -2968,7 +2967,7 @@
echo $ac_n "checking for preferred warning flags for XEMACS_CC""...
$ac_c" 1>&6
-echo "configure:2972: checking for preferred warning flags for XEMACS_CC"
>&5
+echo "configure:2971: checking for preferred warning flags for XEMACS_CC"
>&5
xe_cflags_warning=""
@@ -3001,12 +3000,12 @@
echo "$ac_t""${xe_cflags_warning}" 1>&6
echo $ac_n "checking for preferred warning flags for CC""... $ac_c"
1>&6
-echo "configure:3005: checking for preferred warning flags for CC"
>&5
+echo "configure:3004: checking for preferred warning flags for CC"
>&5
echo "$ac_t""${cflags_warning}" 1>&6
echo $ac_n "checking for remaining CFLAGS""... $ac_c" 1>&6
-echo "configure:3010: checking for remaining CFLAGS" >&5
+echo "configure:3009: checking for remaining CFLAGS" >&5
if test "$cflags_specified" = "no"; then
if test "$CC" = "xlc"; then
@@ -3020,15 +3019,15 @@
CFLAGS="$cflags_warning $cflags_debugging $cflags_optimization $CFLAGS"
echo $ac_n "checking total value of XE_CFLAGS""... $ac_c"
1>&6
-echo "configure:3024: checking total value of XE_CFLAGS" >&5
+echo "configure:3023: checking total value of XE_CFLAGS" >&5
echo "$ac_t""${XE_CFLAGS}" 1>&6
echo $ac_n "checking total value of CFLAGS""... $ac_c" 1>&6
-echo "configure:3027: checking total value of CFLAGS" >&5
+echo "configure:3026: checking total value of CFLAGS" >&5
echo "$ac_t""${CFLAGS}" 1>&6
if test "$GCC" = "yes"; then
echo $ac_n "checking for buggy gcc versions""... $ac_c"
1>&6
-echo "configure:3032: checking for buggy gcc versions" >&5
+echo "configure:3031: checking for buggy gcc versions" >&5
GCC_VERSION=`$CC --version`
case `uname -s`:`uname -m`:$GCC_VERSION in
*:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
@@ -3086,7 +3085,7 @@
if test "$pdump" != "yes"; then
echo $ac_n "checking for \"-z nocombreloc\" linker flag""...
$ac_c" 1>&6
-echo "configure:3090: checking for \"-z nocombreloc\" linker flag"
>&5
+echo "configure:3089: checking for \"-z nocombreloc\" linker flag"
>&5
case "`ld --help 2>&1`" in
*-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
ld_switch_site="-z nocombreloc $ld_switch_site" && if test
"$extra_verbose" = "yes"; then echo " Prepending \"-z
nocombreloc\" to \$ld_switch_site"; fi ;;
@@ -3175,7 +3174,7 @@
fi
echo $ac_n "checking for dynodump""... $ac_c" 1>&6
-echo "configure:3179: checking for dynodump" >&5
+echo "configure:3178: checking for dynodump" >&5
if test "$unexec" != "unexsol2.o"; then
echo "$ac_t""no" 1>&6
else
@@ -3212,12 +3211,12 @@
done
echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c"
1>&6
-echo "configure:3216: checking for terminateAndUnload in -lC" >&5
+echo "configure:3215: checking for terminateAndUnload in -lC" >&5
ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
xe_check_libs=" -lC "
cat > conftest.$ac_ext <<EOF
-#line 3221 "configure"
+#line 3220 "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
@@ -3228,7 +3227,7 @@
terminateAndUnload()
; return 0; }
EOF
-if { (eval echo configure:3232: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3231: \"$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
@@ -3270,7 +3269,7 @@
libc_version=""
echo $ac_n "checking for compiler version information""... $ac_c"
1>&6
-echo "configure:3274: checking for compiler version information" >&5
+echo "configure:3273: checking for compiler version information" >&5
if test "$GCC" = "yes"; then
compiler_version=`$XEMACS_CC --version | head -1`
@@ -3321,7 +3320,7 @@
fi
echo $ac_n "checking for standard C library version information""...
$ac_c" 1>&6
-echo "configure:3325: checking for standard C library version information"
>&5
+echo "configure:3324: checking for standard C library version information"
>&5
case "$canonical" in
*-*-linux*)
@@ -3433,7 +3432,7 @@
if test "$add_runtime_path" = "yes"; then
echo $ac_n "checking "for runtime libraries flag"""...
$ac_c" 1>&6
-echo "configure:3437: checking "for runtime libraries flag""
>&5
+echo "configure:3436: checking "for runtime libraries flag""
>&5
case "$opsys" in
sol2 ) dash_r="-R" ;;
decosf* | linux* | irix*) dash_r="-rpath " ;;
@@ -3455,14 +3454,14 @@
done
fi
cat > conftest.$ac_ext <<EOF
-#line 3459 "configure"
+#line 3458 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3465: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
dash_r="$try_dash_r"
else
@@ -3563,10 +3562,10 @@
fi
after_morecore_hook_exists=yes
echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
-echo "configure:3567: checking for malloc_set_state" >&5
+echo "configure:3566: checking for malloc_set_state" >&5
cat > conftest.$ac_ext <<EOF
-#line 3570 "configure"
+#line 3569 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char malloc_set_state(); below. */
@@ -3589,7 +3588,7 @@
; return 0; }
EOF
-if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_malloc_set_state=yes"
else
@@ -3609,16 +3608,16 @@
fi
echo $ac_n "checking whether __after_morecore_hook exists""...
$ac_c" 1>&6
-echo "configure:3613: checking whether __after_morecore_hook exists"
>&5
+echo "configure:3612: checking whether __after_morecore_hook exists"
>&5
cat > conftest.$ac_ext <<EOF
-#line 3615 "configure"
+#line 3614 "configure"
#include "confdefs.h"
extern void (* __after_morecore_hook)();
int main() {
__after_morecore_hook = 0
; return 0; }
EOF
-if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -3674,7 +3673,7 @@
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3678: checking for $ac_word" >&5
+echo "configure:3677: checking for $ac_word" >&5
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -3729,7 +3728,7 @@
# 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:3733: checking for a BSD compatible install" >&5
+echo "configure:3732: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
@@ -3783,7 +3782,7 @@
# 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:3787: checking for $ac_word" >&5
+echo "configure:3786: checking for $ac_word" >&5
if test -n "$YACC"; then
ac_cv_prog_YACC="$YACC" # Let the user override the test.
@@ -3815,15 +3814,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3819: checking for $ac_hdr" >&5
+echo "configure:3818: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 3822 "configure"
+#line 3821 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3827: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:3826: \"$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*
@@ -3853,10 +3852,10 @@
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""...
$ac_c" 1>&6
-echo "configure:3857: checking for sys/wait.h that is POSIX.1 compatible"
>&5
+echo "configure:3856: checking for sys/wait.h that is POSIX.1 compatible"
>&5
cat > conftest.$ac_ext <<EOF
-#line 3860 "configure"
+#line 3859 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -3872,7 +3871,7 @@
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:3876: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:3875: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -3896,10 +3895,10 @@
fi
echo $ac_n "checking for ANSI C header files""... $ac_c"
1>&6
-echo "configure:3900: checking for ANSI C header files" >&5
+echo "configure:3899: checking for ANSI C header files" >&5
cat > conftest.$ac_ext <<EOF
-#line 3903 "configure"
+#line 3902 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -3907,7 +3906,7 @@
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3911: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:3910: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v
"^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3924,7 +3923,7 @@
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 3928 "configure"
+#line 3927 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -3942,7 +3941,7 @@
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 3946 "configure"
+#line 3945 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -3960,7 +3959,7 @@
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
cat > conftest.$ac_ext <<EOF
-#line 3964 "configure"
+#line 3963 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -3971,7 +3970,7 @@
exit (0); }
EOF
-if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:3974: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
@@ -3997,10 +3996,10 @@
fi
echo $ac_n "checking whether time.h and sys/time.h may both be
included""... $ac_c" 1>&6
-echo "configure:4001: checking whether time.h and sys/time.h may both be
included" >&5
+echo "configure:4000: checking whether time.h and sys/time.h may both be
included" >&5
cat > conftest.$ac_ext <<EOF
-#line 4004 "configure"
+#line 4003 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -4009,7 +4008,7 @@
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4013: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4033,10 +4032,10 @@
fi
echo $ac_n "checking for sys_siglist declaration in signal.h or
unistd.h""... $ac_c" 1>&6
-echo "configure:4037: checking for sys_siglist declaration in signal.h or
unistd.h" >&5
+echo "configure:4036: checking for sys_siglist declaration in signal.h or
unistd.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4040 "configure"
+#line 4039 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -4048,7 +4047,7 @@
char *msg = *(sys_siglist + 1);
; return 0; }
EOF
-if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4051: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_siglist=yes
else
@@ -4074,9 +4073,9 @@
echo $ac_n "checking for utime""... $ac_c" 1>&6
-echo "configure:4078: checking for utime" >&5
+echo "configure:4077: checking for utime" >&5
cat > conftest.$ac_ext <<EOF
-#line 4080 "configure"
+#line 4079 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <utime.h>
@@ -4084,7 +4083,7 @@
struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
; return 0; }
EOF
-if { (eval echo configure:4088: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
{ test "$extra_verbose" = "yes" && cat << \EOF
@@ -4103,10 +4102,10 @@
for ac_func in utimes
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4107: checking for $ac_func" >&5
+echo "configure:4106: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 4110 "configure"
+#line 4109 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4129,7 +4128,7 @@
; return 0; }
EOF
-if { (eval echo configure:4133: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4132: \"$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
@@ -4161,10 +4160,10 @@
echo $ac_n "checking return type of signal handlers""... $ac_c"
1>&6
-echo "configure:4165: checking return type of signal handlers" >&5
+echo "configure:4164: checking return type of signal handlers" >&5
cat > conftest.$ac_ext <<EOF
-#line 4168 "configure"
+#line 4167 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -4181,7 +4180,7 @@
int i;
; return 0; }
EOF
-if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@@ -4203,10 +4202,10 @@
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:4207: checking for size_t" >&5
+echo "configure:4206: checking for size_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4210 "configure"
+#line 4209 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4237,10 +4236,10 @@
fi
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:4241: checking for pid_t" >&5
+echo "configure:4240: checking for pid_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4244 "configure"
+#line 4243 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4271,10 +4270,10 @@
fi
echo $ac_n "checking for uid_t in sys/types.h""... $ac_c"
1>&6
-echo "configure:4275: checking for uid_t in sys/types.h" >&5
+echo "configure:4274: checking for uid_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4278 "configure"
+#line 4277 "configure"
#include "confdefs.h"
#include <sys/types.h>
EOF
@@ -4310,10 +4309,10 @@
fi
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:4314: checking for mode_t" >&5
+echo "configure:4313: checking for mode_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4317 "configure"
+#line 4316 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4344,10 +4343,10 @@
fi
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:4348: checking for off_t" >&5
+echo "configure:4347: checking for off_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4351 "configure"
+#line 4350 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4378,10 +4377,10 @@
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:4382: checking for ssize_t" >&5
+echo "configure:4381: checking for ssize_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4385 "configure"
+#line 4384 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -4414,9 +4413,9 @@
if test "$ac_cv_header_inttypes_h" != "yes"; then
echo $ac_n "checking for intptr_t in sys/types.h""... $ac_c"
1>&6
-echo "configure:4418: checking for intptr_t in sys/types.h" >&5
+echo "configure:4417: checking for intptr_t in sys/types.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 4420 "configure"
+#line 4419 "configure"
#include "confdefs.h"
#include <sys/types.h>
intptr_t x;
@@ -4425,7 +4424,7 @@
; return 0; }
EOF
-if { (eval echo configure:4429: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
{ test "$extra_verbose" = "yes" && cat << \EOF
@@ -4446,9 +4445,9 @@
fi
echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:4450: checking for socklen_t" >&5
+echo "configure:4449: checking for socklen_t" >&5
cat > conftest.$ac_ext <<EOF
-#line 4452 "configure"
+#line 4451 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -4458,7 +4457,7 @@
; return 0; }
EOF
-if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4461: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
else
@@ -4467,7 +4466,7 @@
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 4471 "configure"
+#line 4470 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@@ -4477,7 +4476,7 @@
; return 0; }
EOF
-if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4480: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""size_t" 1>&6
@@ -4509,9 +4508,9 @@
rm -f conftest*
echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
-echo "configure:4513: checking for struct timeval" >&5
+echo "configure:4512: checking for struct timeval" >&5
cat > conftest.$ac_ext <<EOF
-#line 4515 "configure"
+#line 4514 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
#include <sys/time.h>
@@ -4527,7 +4526,7 @@
static struct timeval x; x.tv_sec = x.tv_usec;
; return 0; }
EOF
-if { (eval echo configure:4531: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
HAVE_TIMEVAL=yes
@@ -4549,10 +4548,10 @@
rm -f conftest*
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""...
$ac_c" 1>&6
-echo "configure:4553: checking whether struct tm is in sys/time.h or time.h"
>&5
+echo "configure:4552: checking whether struct tm is in sys/time.h or time.h"
>&5
cat > conftest.$ac_ext <<EOF
-#line 4556 "configure"
+#line 4555 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -4560,7 +4559,7 @@
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:4564: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4563: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -4584,10 +4583,10 @@
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c"
1>&6
-echo "configure:4588: checking for tm_zone in struct tm" >&5
+echo "configure:4587: checking for tm_zone in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 4591 "configure"
+#line 4590 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -4595,7 +4594,7 @@
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:4599: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4598: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -4618,10 +4617,10 @@
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:4622: checking for tzname" >&5
+echo "configure:4621: checking for tzname" >&5
cat > conftest.$ac_ext <<EOF
-#line 4625 "configure"
+#line 4624 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -4631,7 +4630,7 @@
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:4635: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4634: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -4657,10 +4656,10 @@
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:4661: checking for working const" >&5
+echo "configure:4660: checking for working const" >&5
cat > conftest.$ac_ext <<EOF
-#line 4664 "configure"
+#line 4663 "configure"
#include "confdefs.h"
int main() {
@@ -4709,7 +4708,7 @@
; return 0; }
EOF
-if { (eval echo configure:4713: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4712: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -4734,7 +4733,7 @@
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c"
1>&6
-echo "configure:4738: checking whether ${MAKE-make} sets \${MAKE}"
>&5
+echo "configure:4737: checking whether ${MAKE-make} sets \${MAKE}"
>&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
cat > conftestmake <<\EOF
@@ -4759,12 +4758,12 @@
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c"
1>&6
-echo "configure:4763: checking whether byte ordering is bigendian"
>&5
+echo "configure:4762: checking whether byte ordering is bigendian"
>&5
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 4768 "configure"
+#line 4767 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -4775,11 +4774,11 @@
#endif
; return 0; }
EOF
-if { (eval echo configure:4779: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
# It does; now see whether it defined to BIG_ENDIAN or not.
cat > conftest.$ac_ext <<EOF
-#line 4783 "configure"
+#line 4782 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -4790,7 +4789,7 @@
#endif
; return 0; }
EOF
-if { (eval echo configure:4794: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:4793: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -4807,7 +4806,7 @@
rm -f conftest*
if test $ac_cv_c_bigendian = unknown; then
cat > conftest.$ac_ext <<EOF
-#line 4811 "configure"
+#line 4810 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -4820,7 +4819,7 @@
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_c_bigendian=no
else
@@ -4847,10 +4846,10 @@
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:4851: checking size of short" >&5
+echo "configure:4850: checking size of short" >&5
cat > conftest.$ac_ext <<EOF
-#line 4854 "configure"
+#line 4853 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -4861,7 +4860,7 @@
exit(0);
}
EOF
-if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_short=`cat conftestval`
else
@@ -4889,10 +4888,10 @@
exit 1
fi
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:4893: checking size of int" >&5
+echo "configure:4892: checking size of int" >&5
cat > conftest.$ac_ext <<EOF
-#line 4896 "configure"
+#line 4895 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -4903,7 +4902,7 @@
exit(0);
}
EOF
-if { (eval echo configure:4907: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_int=`cat conftestval`
else
@@ -4925,10 +4924,10 @@
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:4929: checking size of long" >&5
+echo "configure:4928: checking size of long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4932 "configure"
+#line 4931 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -4939,7 +4938,7 @@
exit(0);
}
EOF
-if { (eval echo configure:4943: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_long=`cat conftestval`
else
@@ -4961,10 +4960,10 @@
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:4965: checking size of long long" >&5
+echo "configure:4964: checking size of long long" >&5
cat > conftest.$ac_ext <<EOF
-#line 4968 "configure"
+#line 4967 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -4975,7 +4974,7 @@
exit(0);
}
EOF
-if { (eval echo configure:4979: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_long_long=`cat conftestval`
else
@@ -4997,10 +4996,10 @@
echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:5001: checking size of void *" >&5
+echo "configure:5000: checking size of void *" >&5
cat > conftest.$ac_ext <<EOF
-#line 5004 "configure"
+#line 5003 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -5011,7 +5010,7 @@
exit(0);
}
EOF
-if { (eval echo configure:5015: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:5014: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_void_p=`cat conftestval`
else
@@ -5033,10 +5032,10 @@
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:5037: checking size of double" >&5
+echo "configure:5036: checking size of double" >&5
cat > conftest.$ac_ext <<EOF
-#line 5040 "configure"
+#line 5039 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -5047,7 +5046,7 @@
exit(0);
}
EOF
-if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_sizeof_double=`cat conftestval`
else
@@ -5070,7 +5069,7 @@
echo $ac_n "checking for long file names""... $ac_c" 1>&6
-echo "configure:5074: checking for long file names" >&5
+echo "configure:5073: checking for long file names" >&5
ac_cv_sys_long_file_names=yes
# Test for long file names in all the places we know might matter:
@@ -5116,10 +5115,10 @@
echo $ac_n "checking for sin""... $ac_c" 1>&6
-echo "configure:5120: checking for sin" >&5
+echo "configure:5119: checking for sin" >&5
cat > conftest.$ac_ext <<EOF
-#line 5123 "configure"
+#line 5122 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sin(); below. */
@@ -5142,7 +5141,7 @@
; return 0; }
EOF
-if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_sin=yes"
else
@@ -5160,12 +5159,12 @@
echo "$ac_t""no" 1>&6
echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
-echo "configure:5164: checking for sin in -lm" >&5
+echo "configure:5163: checking for sin in -lm" >&5
ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
xe_check_libs=" -lm "
cat > conftest.$ac_ext <<EOF
-#line 5169 "configure"
+#line 5168 "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
@@ -5176,7 +5175,7 @@
sin()
; return 0; }
EOF
-if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5179: \"$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
@@ -5211,14 +5210,14 @@
cat > conftest.$ac_ext <<EOF
-#line 5215 "configure"
+#line 5214 "configure"
#include "confdefs.h"
#include <math.h>
int main() {
return atanh(1.0) + asinh(1.0) + acosh(1.0);
; return 0; }
EOF
-if { (eval echo configure:5222: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_INVERSE_HYPERBOLIC
@@ -5237,10 +5236,10 @@
for ac_func in mkstemp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5241: checking for $ac_func" >&5
+echo "configure:5240: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 5244 "configure"
+#line 5243 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5263,7 +5262,7 @@
; return 0; }
EOF
-if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5266: \"$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
@@ -5292,14 +5291,14 @@
echo "checking type of mail spool file locking" 1>&6
-echo "configure:5296: checking type of mail spool file locking" >&5
+echo "configure:5295: checking type of mail spool file locking" >&5
for ac_func in lockf flock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5300: checking for $ac_func" >&5
+echo "configure:5299: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 5303 "configure"
+#line 5302 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5322,7 +5321,7 @@
; return 0; }
EOF
-if { (eval echo configure:5326: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5325: \"$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
@@ -5412,12 +5411,12 @@
case "$opsys" in decosf*)
echo $ac_n "checking for cma_open in -lpthreads""... $ac_c"
1>&6
-echo "configure:5416: checking for cma_open in -lpthreads" >&5
+echo "configure:5415: checking for cma_open in -lpthreads" >&5
ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpthreads "
cat > conftest.$ac_ext <<EOF
-#line 5421 "configure"
+#line 5420 "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
@@ -5428,7 +5427,7 @@
cma_open()
; return 0; }
EOF
-if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5431: \"$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
@@ -5465,7 +5464,7 @@
echo $ac_n "checking whether the -xildoff compiler flag is required""...
$ac_c" 1>&6
-echo "configure:5469: checking whether the -xildoff compiler flag is
required" >&5
+echo "configure:5468: checking whether the -xildoff compiler flag is
required" >&5
if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild
' > /dev/null ; then
if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild
' > /dev/null ;
then echo "$ac_t""no" 1>&6;
@@ -5477,7 +5476,7 @@
if test "$opsys" = "sol2"; then
if test "$os_release" -ge 506; then
echo $ac_n "checking for \"-z ignore\" linker flag""...
$ac_c" 1>&6
-echo "configure:5481: checking for \"-z ignore\" linker flag"
>&5
+echo "configure:5480: checking for \"-z ignore\" linker flag"
>&5
case "`ld -h 2>&1`" in
*-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
ld_switch_site="-z ignore $ld_switch_site" && if test
"$extra_verbose" = "yes"; then echo " Prepending \"-z
ignore\" to \$ld_switch_site"; fi ;;
@@ -5487,445 +5486,20 @@
fi
-echo "checking "for specified window system"" 1>&6
-echo "configure:5492: checking "for specified window system""
>&5
-
-
-GNOME_CONFIG=no
-GTK_CONFIG=no
-
-if test "$with_gnome" != "no"; then
- echo $ac_n "checking for GNOME configuration script""... $ac_c"
1>&6
-echo "configure:5500: checking for GNOME configuration script" >&5
- for possible in gnome-config
- do
- possible_version=`${possible} --version 2> /dev/null`
- if test "x${possible_version}" != "x"; then
- GNOME_CONFIG="${possible}"
- with_gnome=yes
- with_gtk=yes
- break
- fi
- done
- echo "$ac_t""${GNOME_CONFIG}" 1>&6
-fi
-
-if test "${GNOME_CONFIG}" != "no"; then
- GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
- GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_GNOME
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_GNOME 1
-EOF
-}
-
- libs_gtk="$libs_gtk ${GNOME_LIBS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GNOME_LIBS}\" to \$libs_gtk"; fi
- c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
-fi
-
-if test "$with_gtk" != "no";then
- echo $ac_n "checking for GTK configuration script""... $ac_c"
1>&6
-echo "configure:5531: checking for GTK configuration script" >&5
- for possible in gtk12-config gtk14-config gtk-config
- do
- possible_version=`${possible} --version 2> /dev/null`
- if test "x${possible_version}" != "x"; then
- GTK_CONFIG="${possible}"
- case "${possible_version}" in
- 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your
version of GTK." 1>&2; with_gtk=no;;
- 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now"
1>&2; with_gtk=no;;
- 1.2.*)
- with_gtk=yes
- break
- ;;
- *) echo "configure: warning: Found unsupported version of GTK:
$possible_version" 1>&2;;
- esac
- fi
- done
- echo "$ac_t""${GTK_CONFIG}" 1>&6
-fi
-
-if test "${GTK_CONFIG}" != "no"; then
- echo $ac_n "checking gtk version""... $ac_c" 1>&6
-echo "configure:5553: checking gtk version" >&5
- GTK_VERSION=`${GTK_CONFIG} --version`
- echo "$ac_t""${GTK_VERSION}" 1>&6
-
- echo $ac_n "checking gtk libs""... $ac_c" 1>&6
-echo "configure:5558: checking gtk libs" >&5
- GTK_LIBS=`${GTK_CONFIG} --libs`
- libs_gtk="$libs_gtk ${GTK_LIBS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GTK_LIBS}\" to \$libs_gtk"; fi
- echo "$ac_t""${GTK_LIBS}" 1>&6
-
- echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
-echo "configure:5564: checking gtk cflags" >&5
- GTK_CFLAGS=`${GTK_CONFIG} --cflags`
- if test "$GCC" = "yes"; then
- GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
- fi
- c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
- echo "$ac_t""${GTK_CFLAGS}" 1>&6
-
-
-echo $ac_n "checking for main in -lgdk_imlib""... $ac_c"
1>&6
-echo "configure:5574: checking for main in -lgdk_imlib" >&5
-ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lgdk_imlib "
-cat > conftest.$ac_ext <<EOF
-#line 5579 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5586: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- libs_gtk="-lgdk_imlib $libs_gtk" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lgdk_imlib\" to \$libs_gtk"; fi
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c"
1>&6
-echo "configure:5608: checking for Imlib_init in -lImlib" >&5
-ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lImlib "
-cat > conftest.$ac_ext <<EOF
-#line 5613 "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 Imlib_init();
-
-int main() {
-Imlib_init()
-; return 0; }
-EOF
-if { (eval echo configure:5624: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- libs_gtk="$libs_gtk -lImlib" && if test "$extra_verbose"
= "yes"; then echo " Appending \"-lImlib\" to
\$libs_gtk"; fi
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- for ac_func in gdk_imlib_init
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5647: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5650 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:5673: \"$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_func
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_XPM
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_XPM 1
-EOF
-}
-
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_GTK
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_GTK 1
-EOF
-}
-
-
-
- window_system=gtk
- with_gtk=yes
- if test "$with_x11" != "no"; then
- echo "configure: warning: Configuring GTK, forcing with_x11 to no"
1>&2
- with_x11=no
- fi
-
- for feature in scrollbars toolbars menubars dialogs widgets
- do
- eval "feature_value=\${with_${feature}}"
- case "${feature_value}" in
- yes|no|gtk|"" )
- ;;
- * )
- feature_conflict_with_gtk=yes
- echo "configure: warning: --with-${feature}=${feature_value} is incompatible
with --with-gtk" 1>&2 ;;
- esac
- done
- if test "${feature_conflict_with_gtk}" = "yes"; then
- { echo "Error:" "One or more GUI toolkit features conflict with
GTK" >&2; exit 1; }
- fi
-
- test "${with_scrollbars}" != "no" &&
with_scrollbars=gtk
- test "${with_toolbars}" != "no" && with_toolbars=gtk
- test "${with_menubars}" != "no" && with_menubars=gtk
- test "${with_dialogs}" != "no" && with_dialogs=gtk
- test "${with_widgets}" != "no" && with_widgets=gtk
-
- OLD_CFLAGS="${CFLAGS}"
- OLD_CPPFLAGS="${CPPFLAGS}"
- OLD_LDFLAGS="${LDFLAGS}"
- CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
- CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
- LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
- for ac_hdr in glade/glade.h glade.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5757: checking for $ac_hdr" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 5760 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5765: \"$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*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
- echo "$ac_t""yes" 1>&6
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed
'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_hdr
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
-echo "configure:5796: checking for main in -lxml" >&5
-ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lxml "
-cat > conftest.$ac_ext <<EOF
-#line 5801 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5808: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- libs_gtk="-lxml $libs_gtk" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lxml\" to \$libs_gtk";
fi
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
-echo "configure:5830: checking for main in -lglade" >&5
-ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lglade "
-cat > conftest.$ac_ext <<EOF
-#line 5835 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5842: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- libs_gtk="-lglade $libs_gtk" && if test "$extra_verbose"
= "yes"; then echo " Prepending \"-lglade\" to
\$libs_gtk"; fi
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
-
-echo $ac_n "checking for main in -lglade-gnome""... $ac_c"
1>&6
-echo "configure:5864: checking for main in -lglade-gnome" >&5
-ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lglade-gnome "
-cat > conftest.$ac_ext <<EOF
-#line 5869 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:5876: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- libs_gtk="-lglade-gnome $libs_gtk" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lglade-gnome\" to \$libs_gtk"; fi
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- cat > conftest.$ac_ext <<EOF
-#line 5897 "configure"
-#include "confdefs.h"
-#include <glade/glade-xml.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "char \*txtdomain;" >/dev/null 2>&1; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- { test "$extra_verbose" = "yes" &&
cat << \EOF
- Defining LIBGLADE_XML_TXTDOMAIN = 1
-EOF
-cat >> confdefs.h <<\EOF
-#define LIBGLADE_XML_TXTDOMAIN 1
-EOF
-}
-
-else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
+if test -n "$with_dragndrop" ; then
+ with_dragndrop_windows="$with_dragndrop"
+ with_dragndrop_nonwindows="$with_dragndrop"
fi
-rm -f conftest*
- CFLAGS="${OLD_CFLAGS}"
- CPPFLAGS="${OLD_CPPFLAGS}"
- LDFLAGS="${OLD_LDFLAGS}"
-fi
+echo "checking "for window-system support"" 1>&6
+echo "configure:5496: checking "for window-system support""
>&5
if test "$with_x11" != "no"; then
test "$x_includes $x_libraries" != "NONE NONE" && \
- window_system=x11 with_x11=yes
+ with_x11=yes
-
+
if test "$x_includes $x_libraries" = "NONE NONE" \
-a -n "$OPENWINHOME" \
-a "$OPENWINHOME" != "/usr/openwin" \
@@ -5952,7 +5526,7 @@
# 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:5956: checking for X" >&5
+echo "configure:5530: checking for X" >&5
# Check whether --with-x or --without-x was given.
if test "${with_x+set}" = set; then
@@ -6012,12 +5586,12 @@
# First, try using that file with no special directory specified.
cat > conftest.$ac_ext <<EOF
-#line 6016 "configure"
+#line 5590 "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:6021: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:5595: \"$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*
@@ -6086,14 +5660,14 @@
ac_save_LIBS="$LIBS"
LIBS="-l$x_direct_test_library $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6090 "configure"
+#line 5664 "configure"
#include "confdefs.h"
int main() {
${x_direct_test_function}()
; return 0; }
EOF
-if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5671: \"$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.
@@ -6202,92 +5776,319 @@
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:6206: checking whether -R must be followed by a space"
>&5
+echo "configure:5780: 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 6209 "configure"
+#line 5783 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5790: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_nospace=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_nospace=no
+fi
+rm -f conftest*
+ if test $ac_R_nospace = yes; then
+ echo "$ac_t""no" 1>&6
+ X_LIBS="$X_LIBS -R$x_libraries"
+ else
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat > conftest.$ac_ext <<EOF
+#line 5806 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:5813: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ ac_R_space=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_R_space=no
+fi
+rm -f conftest*
+ if test $ac_R_space = yes; then
+ echo "$ac_t""yes" 1>&6
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+ echo "$ac_t""neither works" 1>&6
+ fi
+ fi
+ LIBS="$ac_xsave_LIBS"
+ esac
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn.Johnson(a)cl.cam.ac.uk says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And karl(a)cs.umb.edu says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ if test "$with_dnet" = "no" ; then
+ac_cv_lib_dnet_dnet_ntoa=no
+else
+
+echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c"
1>&6
+echo "configure:5849: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldnet "
+cat > conftest.$ac_ext <<EOF
+#line 5854 "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 dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:5865: \"$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*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+ 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:5889: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldnet_stub "
+cat > conftest.$ac_ext <<EOF
+#line 5894 "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 dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:5905: \"$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*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ fi
+
+ # msh(a)cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # chad(a)anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to dickey(a)clark.net.
+ echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:5934: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5937 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname(); below. */
+#include <assert.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 gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5960: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" =
yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_gethostbyname = no; then
+
+echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c"
1>&6
+echo "configure:5981: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lnsl "
+cat > conftest.$ac_ext <<EOF
+#line 5986 "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 gethostbyname();
int main() {
-
+gethostbyname()
; return 0; }
EOF
-if { (eval echo configure:6216: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5997: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- ac_R_nospace=yes
+ eval "ac_cv_lib_$ac_lib_var=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_R_nospace=no
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
- if test $ac_R_nospace = yes; then
- echo "$ac_t""no" 1>&6
- X_LIBS="$X_LIBS -R$x_libraries"
- else
- LIBS="$ac_xsave_LIBS -R $x_libraries"
- cat > conftest.$ac_ext <<EOF
-#line 6232 "configure"
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ fi
+
+ # lieder(a)skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says simon(a)lia.di.epfl.ch: it contains
+ # gethostby* variants that don't use the nameserver (or something).
+ # -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:6027: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6030 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect(); below. */
+#include <assert.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 connect();
int main() {
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:6239: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- ac_R_space=yes
+ eval "ac_cv_func_connect=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_R_space=no
+ eval "ac_cv_func_connect=no"
fi
rm -f conftest*
- if test $ac_R_space = yes; then
- echo "$ac_t""yes" 1>&6
- X_LIBS="$X_LIBS -R $x_libraries"
- else
- echo "$ac_t""neither works" 1>&6
- fi
- fi
- LIBS="$ac_xsave_LIBS"
- esac
- fi
-
- # Check for system-dependent libraries X programs must link with.
- # Do this before checking for the system-independent R6 libraries
- # (-lICE), since we may need -lsocket or whatever for X linking.
- if test "$ISC" = yes; then
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
- else
- # Martyn.Johnson(a)cl.cam.ac.uk says this is needed for Ultrix, if the X
- # libraries were built with DECnet support. And karl(a)cs.umb.edu says
- # the Alpha needs dnet_stub (dnet does not exist).
- if test "$with_dnet" = "no" ; then
-ac_cv_lib_dnet_dnet_ntoa=no
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes";
then
+ echo "$ac_t""yes" 1>&6
+ :
else
+ echo "$ac_t""no" 1>&6
+fi
-echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c"
1>&6
-echo "configure:6275: checking for dnet_ntoa in -ldnet" >&5
-ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+ if test $ac_cv_func_connect = no; then
+
+xe_msg_checking="for connect in -lsocket"
+test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking
using extra libs $X_EXTRA_LIBS"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
+echo "configure:6076: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
-xe_check_libs=" -ldnet "
+xe_check_libs=" -lsocket $X_EXTRA_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6280 "configure"
+#line 6081 "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 dnet_ntoa();
+char connect();
int main() {
-dnet_ntoa()
+connect()
; return 0; }
EOF
-if { (eval echo configure:6291: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6092: \"$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
@@ -6301,33 +6102,80 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
else
echo "$ac_t""no" 1>&6
fi
+
+ fi
+
+ # gomez(a)mi.uni-erlangen.de says -lposix is necessary on A/UX.
+ echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:6116: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6119 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove(); below. */
+#include <assert.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 remove();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6142: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
fi
- if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ if test $ac_cv_func_remove = no; then
-echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c"
1>&6
-echo "configure:6315: checking for dnet_ntoa in -ldnet_stub" >&5
-ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:6163: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
-xe_check_libs=" -ldnet_stub "
+xe_check_libs=" -lposix "
cat > conftest.$ac_ext <<EOF
-#line 6320 "configure"
+#line 6168 "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 dnet_ntoa();
+char remove();
int main() {
-dnet_ntoa()
+remove()
; return 0; }
EOF
-if { (eval echo configure:6331: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6179: \"$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
@@ -6341,7 +6189,7 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
else
echo "$ac_t""no" 1>&6
fi
@@ -6349,77 +6197,210 @@
fi
- # msh(a)cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
- # to get the SysV transport functions.
- # chad(a)anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
- # needs -lnsl.
- # The nsl library prevents programs from opening the X display
- # on Irix 5.2, according to dickey(a)clark.net.
- echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
-echo "configure:6360: checking for gethostbyname" >&5
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:6203: checking for shmat" >&5
cat > conftest.$ac_ext <<EOF
-#line 6363 "configure"
+#line 6206 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char gethostbyname(); below. */
+ which can conflict with char shmat(); below. */
#include <assert.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 gethostbyname();
+char shmat();
int main() {
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
-gethostbyname();
+shmat();
#endif
; return 0; }
+EOF
+if { (eval echo configure:6229: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ :
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test $ac_cv_func_shmat = no; then
+
+echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:6250: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lipc "
+cat > conftest.$ac_ext <<EOF
+#line 6255 "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 shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:6266: \"$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*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+ echo "$ac_t""yes" 1>&6
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS="$LDFLAGS"
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS
-L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # --interran(a)uluru.Stanford.EDU, kb(a)cs.umb.edu.
+
+xe_msg_checking="for IceConnectionNumber in -lICE"
+test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking
using extra libs $X_EXTRA_LIBS"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
+echo "configure:6302: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lICE $X_EXTRA_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 6307 "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 IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
EOF
-if { (eval echo configure:6386: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_func_gethostbyname=yes"
+ 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_func_gethostbyname=no"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+xe_check_libs=""
-if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" =
yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- :
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
else
echo "$ac_t""no" 1>&6
fi
- if test $ac_cv_func_gethostbyname = no; then
-
-echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c"
1>&6
-echo "configure:6407: checking for gethostbyname in -lnsl" >&5
-ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lnsl "
+ LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+ # Autoconf claims to find X library and include dirs for us.
+ if test "$no_x" = "yes"
+ then with_x11=no
+ else with_x11=yes
+ fi
+fi
+
+if test "$with_x11" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_X_WINDOWS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_X_WINDOWS 1
+EOF
+}
+
+ MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib\" to \$MAKE_SUBDIR"; fi
+ SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
+
+
+ ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
+echo "configure:6363: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6366 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6371: \"$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*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
+ echo "$ac_t""yes" 1>&6
+
+echo $ac_n "checking for XmStringFree in -lXm""... $ac_c"
1>&6
+echo "configure:6388: checking for XmStringFree in -lXm" >&5
+ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 6412 "configure"
+#line 6393 "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 gethostbyname();
+char XmStringFree();
int main() {
-gethostbyname()
+XmStringFree()
; return 0; }
EOF
-if { (eval echo configure:6423: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6404: \"$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
@@ -6433,88 +6414,242 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+ got_motif=yes
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
else
echo "$ac_t""no" 1>&6
fi
+ if test "$got_motif" != "yes"; then
+ for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
+ "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
+ inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
+ if test -d "$lib_dir" -a -d "$inc_dir"; then
+ case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ x_libraries="$lib_dir $x_libraries"
+ X_LIBS="-L${lib_dir} $X_LIBS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-L${lib_dir}\" to \$X_LIBS"; fi ;;
+ esac
+ case "$x_includes" in "$inc_dir"* ) ;; *)
+ x_includes="$inc_dir $x_includes"
+ X_CFLAGS="-I${inc_dir} $X_CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
+ esac
+ break; fi
+ done
+ fi
+
+ for rel in "X11R6" "X11R5" "X11R4"; do
+ lib_dir="/usr/contrib/$rel/lib"
inc_dir="/usr/contrib/$rel/include"
+ if test -d "$lib_dir" -a -d "$inc_dir"; then
+ case "$x_libraries" in *"$lib_dir"* ) ;; *)
+ x_libraries="$x_libraries $lib_dir"
+ X_LIBS="$X_LIBS -L${lib_dir}" && if test "$extra_verbose"
= "yes"; then echo " Appending \"-L${lib_dir}\" to
\$X_LIBS"; fi
+ esac
+ case "$x_includes" in "$inc_dir"* ) ;; *)
+ x_includes="$x_includes $inc_dir"
+ X_CFLAGS="$X_CFLAGS -I${inc_dir}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"-I${inc_dir}\" to \$X_CFLAGS"; fi
+ esac
+ break; fi
+ done
+
+ case "$opsys" in
+ decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS
-L/usr/shlib" && if test "$extra_verbose" = "yes"; then
echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
+ esac
+
+ ld_switch_x_site="$X_LIBS"
+
+
+if test "$add_runtime_path" = "yes" -a -n "$dash_r";
then
+ ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e
"s/$dash_r[^ ]*//g"`
+ ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e
"s/$dash_r[^ ]*//g"`
+
+ runpath="" runpath_dirs=""
+ if test -n "$LD_RUN_PATH"; then
+ runpath="$LD_RUN_PATH"
+ elif test "$GCC" = "yes"; then
+ ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+ echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+ xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS
'"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+ for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+ case "$arg" in P,* | -L* | -R* )
+ for dir in `echo '' "$arg" | sed -e 's:^ ::' -e
's/^..//' -e 'y/:/ /'`; do
+ {
+xe_runpath_dir="$dir"
+ test "$xe_runpath_dir" != "/lib" -a \
+ "$xe_runpath_dir" != "/usr/lib" -a \
+ -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+ eval "$xe_add_unique_runpath_dir"
+}
+ done ;;
+ esac
+ done
+ ld_switch_run="$ld_switch_run_save"
+ rm -f conftest*
+ else
+ for arg in $ld_switch_site $ld_switch_x_site; do
+ case "$arg" in -L*) {
+xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e
's/^-L//'`
+ test "$xe_runpath_dir" != "/lib" -a \
+ "$xe_runpath_dir" != "/usr/lib" -a \
+ -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+ eval "$xe_add_unique_runpath_dir"
+};; esac
+ done
+ if test "$opsys $need_motif" = "sol2 yes"; then
+ xe_runpath_dir="/opt/SUNWdt/lib";
+ eval "$xe_add_unique_runpath_dir";
fi
+ fi
+ if test -n "$runpath"; then
+ ld_switch_run="${dash_r}${runpath}"
+
+if test "$GCC" = "yes"; then
+ set x $ld_switch_run; shift; ld_switch_run=""
+ while test -n "$1"; do
+ case $1 in
+ -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2";
shift ;;
+ -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
+ -Xlinker* ) ;;
+ * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
+ esac
+ shift
+ done
+fi
+ test "$extra_verbose" = "yes" && echo "Setting
runpath to $runpath"
+ fi
+fi
- # lieder(a)skyler.mavd.honeywell.com says without -lsocket,
- # socket/setsockopt and other routines are undefined under SCO ODT
- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
- # on later versions), says simon(a)lia.di.epfl.ch: it contains
- # gethostby* variants that don't use the nameserver (or something).
- # -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:6453: checking for connect" >&5
-cat > conftest.$ac_ext <<EOF
-#line 6456 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char connect(); below. */
-#include <assert.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 connect();
+ if test "$extra_verbose" = "yes"; then
+ echo; echo "X11 compilation variables:"
+ for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval
"echo \"$var = '\$$var'\""; done
+ echo
+ fi
+
+ bitmapdirs=
+ if test "$x_includes" != NONE; then
+ for i in $x_includes; do
+ if test -d "$i/bitmaps"; then
+ bitmapdirs="$i/bitmaps:$bitmapdirs"
+ fi
+ if test -d "$i/X11/bitmaps"; then
+ bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
+ fi
+ done
+ bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
+ fi
+ test ! -z "$bitmapdirs" && { test "$extra_verbose" =
"yes" && cat << EOF
+ Defining BITMAPDIR = "$bitmapdirs"
+EOF
+cat >> confdefs.h <<EOF
+#define BITMAPDIR "$bitmapdirs"
+EOF
+}
+
+
+ echo "checking for X defines extracted by xmkmf" 1>&6
+echo "configure:6556: checking for X defines extracted by xmkmf" >&5
+ rm -fr conftestdir
+ if mkdir conftestdir; then
+ cd conftestdir
+ cat > Imakefile <<'EOF'
+xetest:
+ @echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse
us.
+ xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+ fi
+ cd ..
+ rm -fr conftestdir
+ for word in $xmkmf_defines; do
+ case "$word" in
+ -D__STDC__*) ;;
+ -D* )
+ sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
+ case "$word" in
+ -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
+ * ) val=1 ;;
+ esac
+ if grep "^#define $sym " confdefs.h >/dev/null; then :; else
+ if test "$val" = "1"
+ then { test "$extra_verbose" = "yes" && cat <<
EOF
+ Defining $sym
+EOF
+cat >> confdefs.h <<EOF
+#define $sym 1
+EOF
+}
+
+ else { test "$extra_verbose" = "yes" && cat <<
EOF
+ Defining $sym = $val
+EOF
+cat >> confdefs.h <<EOF
+#define $sym $val
+EOF
+}
-int main() {
+ fi
+ fi ;;
+ esac
+ done
+ fi
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_connect) || defined (__stub___connect)
-choke me
-#else
-connect();
-#endif
+ ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
+echo "configure:6605: checking for X11/Intrinsic.h" >&5
-; return 0; }
+cat > conftest.$ac_ext <<EOF
+#line 6608 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
EOF
-if { (eval echo configure:6479: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6613: \"$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_func_connect=yes"
+ 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_func_connect=no"
+ eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
-
-if eval "test \"`echo '$ac_cv_func_'connect`\" = yes";
then
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
:
else
echo "$ac_t""no" 1>&6
+{ echo "configure: error: Unable to find X11 header files." 1>&2; exit
1; }
fi
- if test $ac_cv_func_connect = no; then
+
-xe_msg_checking="for connect in -lsocket"
-test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking
using extra libs $X_EXTRA_LIBS"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:6502: checking "$xe_msg_checking"" >&5
-ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c"
1>&6
+echo "configure:6637: checking for XOpenDisplay in -lX11" >&5
+ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lsocket $X_EXTRA_LIBS"
+xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 6507 "configure"
+#line 6642 "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 connect();
+char XOpenDisplay();
int main() {
-connect()
+XOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:6518: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6653: \"$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
@@ -6528,80 +6663,77 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+ have_lib_x11=yes
else
echo "$ac_t""no" 1>&6
fi
- fi
-
- # gomez(a)mi.uni-erlangen.de says -lposix is necessary on A/UX.
- echo $ac_n "checking for remove""... $ac_c" 1>&6
-echo "configure:6542: checking for remove" >&5
+ if test "$have_lib_x11" != "yes"; then
+
+xe_msg_checking="for XGetFontProperty in -lX11"
+test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking
using extra libs -b i486-linuxaout"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
+echo "configure:6678: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
+xe_check_libs=" -lX11 -b i486-linuxaout"
cat > conftest.$ac_ext <<EOF
-#line 6545 "configure"
+#line 6683 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char remove(); below. */
-#include <assert.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 remove();
+char XGetFontProperty();
int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_remove) || defined (__stub___remove)
-choke me
-#else
-remove();
-#endif
-
+XGetFontProperty()
; return 0; }
EOF
-if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6694: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_func_remove=yes"
+ 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_func_remove=no"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+xe_check_libs=""
-if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- :
+ ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
else
echo "$ac_t""no" 1>&6
+{ echo "configure: error: Unable to find X11 libraries." 1>&2; exit 1;
}
fi
- if test $ac_cv_func_remove = no; then
-
-echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
-echo "configure:6589: checking for remove in -lposix" >&5
-ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lposix "
+ fi
+ libs_x="-lX11"
+ test "$extra_verbose" = "yes" && echo " Setting
libs_x to \"-lX11\""
+
+
+echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c"
1>&6
+echo "configure:6721: checking for XShapeSelectInput in -lXext" >&5
+ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXext "
cat > conftest.$ac_ext <<EOF
-#line 6594 "configure"
+#line 6726 "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 remove();
+char XShapeSelectInput();
int main() {
-remove()
+XShapeSelectInput()
; return 0; }
EOF
-if { (eval echo configure:6605: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6737: \"$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
@@ -6615,186 +6747,159 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+ libs_x="-lXext $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXext\" to \$libs_x";
fi
else
echo "$ac_t""no" 1>&6
fi
- fi
- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo $ac_n "checking for shmat""... $ac_c" 1>&6
-echo "configure:6629: checking for shmat" >&5
+
+echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c"
1>&6
+echo "configure:6760: checking for XtOpenDisplay in -lXt" >&5
+ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
+xe_check_libs=" -lXt "
cat > conftest.$ac_ext <<EOF
-#line 6632 "configure"
+#line 6765 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shmat(); below. */
-#include <assert.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 shmat();
+char XtOpenDisplay();
int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_shmat) || defined (__stub___shmat)
-choke me
-#else
-shmat();
-#endif
-
+XtOpenDisplay()
; return 0; }
EOF
-if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_func_shmat=yes"
+ 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_func_shmat=no"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+xe_check_libs=""
-if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- :
+ libs_x="-lXt $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXt\" to \$libs_x"; fi
else
echo "$ac_t""no" 1>&6
+{ echo "configure: error: Unable to find X11 libraries." 1>&2; exit 1;
}
fi
- if test $ac_cv_func_shmat = no; then
-
-echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
-echo "configure:6676: checking for shmat in -lipc" >&5
-ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lipc "
-cat > conftest.$ac_ext <<EOF
-#line 6681 "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 shmat();
-int main() {
-shmat()
-; return 0; }
+ echo $ac_n "checking the version of X11 being used""... $ac_c"
1>&6
+echo "configure:6799: checking the version of X11 being used" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 6801 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+ int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
EOF
-if { (eval echo configure:6692: \"$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"
+if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+then
+ ./conftest foobar; x11_release=$?
else
+ conftest_rc="$?"
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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
-else
- echo "$ac_t""no" 1>&6
+ rm -fr conftest*
+ x11_release=4
fi
+rm -fr conftest*
+ echo "$ac_t""R${x11_release}" 1>&6
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining THIS_IS_X11R${x11_release}
+EOF
+cat >> confdefs.h <<EOF
+#define THIS_IS_X11R${x11_release} 1
+EOF
+}
- fi
+ if test "${x11_release}" = "4"; then
+ case "$with_widgets" in
+ "" | "no") with_widgets=no ;;
+ *) { echo "Error:" "Widget support requires X11R5 or greater"
>&2; exit 1; } ;;
+ esac
fi
- # Check for libraries that X11R6 Xt/Xaw programs need.
- ac_save_LDFLAGS="$LDFLAGS"
- test -n "$x_libraries" && LDFLAGS="$LDFLAGS
-L$x_libraries"
- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
- # check for ICE first), but we must link in the order -lSM -lICE or
- # we get undefined symbols. So assume we have SM if we have ICE.
- # These have to be linked with before -lX11, unlike the other
- # libraries we check for below, so use a different variable.
- # --interran(a)uluru.Stanford.EDU, kb(a)cs.umb.edu.
-
-xe_msg_checking="for IceConnectionNumber in -lICE"
-test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking
using extra libs $X_EXTRA_LIBS"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:6728: checking "$xe_msg_checking"" >&5
-ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+ for ac_func in XConvertCase
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6837: checking for $ac_func" >&5
-xe_check_libs=" -lICE $X_EXTRA_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 6733 "configure"
+#line 6840 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 IceConnectionNumber();
+char $ac_func();
int main() {
-IceConnectionNumber()
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:6744: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6863: \"$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"
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-xe_check_libs=""
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
echo "$ac_t""yes" 1>&6
- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
- LDFLAGS="$ac_save_LDFLAGS"
-
-fi
- # Autoconf claims to find X library and include dirs for us.
- if test "$no_x" = "yes"
- then with_x11=no window_system=none HAVE_X_WINDOWS=no
- else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
- fi
-fi
-
-
-if test "$with_x11" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_X_WINDOWS
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_X_WINDOWS 1
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
}
-
- MAKE_SUBDIR="$MAKE_SUBDIR lwlib" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib\" to \$MAKE_SUBDIR"; fi
- SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
- ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:6790: checking for Xm/Xm.h" >&5
+ for ac_hdr in X11/Xlocale.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6895: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 6793 "configure"
+#line 6898 "configure"
#include "confdefs.h"
-#include <Xm/Xm.h>
+#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6798: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:6903: \"$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*
@@ -6809,274 +6914,181 @@
rm -f conftest*
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
-
-echo $ac_n "checking for XmStringFree in -lXm""... $ac_c"
1>&6
-echo "configure:6815: checking for XmStringFree in -lXm" >&5
-ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | sed
'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
-xe_check_libs=" -lXm "
+
+ for ac_func in XRegisterIMInstantiateCallback
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6936: checking for $ac_func" >&5
+
cat > conftest.$ac_ext <<EOF
-#line 6820 "configure"
+#line 6939 "configure"
#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 XmStringFree();
+char $ac_func();
int main() {
-XmStringFree()
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:6831: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6962: \"$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"
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-xe_check_libs=""
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
echo "$ac_t""yes" 1>&6
- got_motif=yes
-else
- echo "$ac_t""no" 1>&6
-fi
-
-
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+
else
echo "$ac_t""no" 1>&6
-fi
-
-
- if test "$got_motif" != "yes"; then
- for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" \
- "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
- inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
- if test -d "$lib_dir" -a -d "$inc_dir"; then
- case "$x_libraries" in *"$lib_dir"* ) ;; *)
- x_libraries="$lib_dir $x_libraries"
- X_LIBS="-L${lib_dir} $X_LIBS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-L${lib_dir}\" to \$X_LIBS"; fi ;;
- esac
- case "$x_includes" in "$inc_dir"* ) ;; *)
- x_includes="$inc_dir $x_includes"
- X_CFLAGS="-I${inc_dir} $X_CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
- esac
- break; fi
- done
- fi
-
- for rel in "X11R6" "X11R5" "X11R4"; do
- lib_dir="/usr/contrib/$rel/lib"
inc_dir="/usr/contrib/$rel/include"
- if test -d "$lib_dir" -a -d "$inc_dir"; then
- case "$x_libraries" in *"$lib_dir"* ) ;; *)
- x_libraries="$x_libraries $lib_dir"
- X_LIBS="$X_LIBS -L${lib_dir}" && if test "$extra_verbose"
= "yes"; then echo " Appending \"-L${lib_dir}\" to
\$X_LIBS"; fi
- esac
- case "$x_includes" in "$inc_dir"* ) ;; *)
- x_includes="$x_includes $inc_dir"
- X_CFLAGS="$X_CFLAGS -I${inc_dir}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"-I${inc_dir}\" to \$X_CFLAGS"; fi
- esac
- break; fi
- done
-
- case "$opsys" in
- decosf*) if test "$GCC" = yes -a -d /usr/shlib; then X_LIBS="$X_LIBS
-L/usr/shlib" && if test "$extra_verbose" = "yes"; then
echo " Appending \"-L/usr/shlib\" to \$X_LIBS"; fi; fi ;;
- esac
-
- ld_switch_x_site="$X_LIBS"
-
-
-if test "$add_runtime_path" = "yes" -a -n "$dash_r";
then
- ld_switch_site=`echo '' $ld_switch_site | sed -e 's:^ ::' -e
"s/$dash_r[^ ]*//g"`
- ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e
"s/$dash_r[^ ]*//g"`
-
- runpath="" runpath_dirs=""
- if test -n "$LD_RUN_PATH"; then
- runpath="$LD_RUN_PATH"
- elif test "$GCC" = "yes"; then
- ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
- echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
- xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS
'"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
- for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
- case "$arg" in P,* | -L* | -R* )
- for dir in `echo '' "$arg" | sed -e 's:^ ::' -e
's/^..//' -e 'y/:/ /'`; do
- {
-xe_runpath_dir="$dir"
- test "$xe_runpath_dir" != "/lib" -a \
- "$xe_runpath_dir" != "/usr/lib" -a \
- -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
- eval "$xe_add_unique_runpath_dir"
-}
- done ;;
- esac
- done
- ld_switch_run="$ld_switch_run_save"
- rm -f conftest*
- else
- for arg in $ld_switch_site $ld_switch_x_site; do
- case "$arg" in -L*) {
-xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e
's/^-L//'`
- test "$xe_runpath_dir" != "/lib" -a \
- "$xe_runpath_dir" != "/usr/lib" -a \
- -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
- eval "$xe_add_unique_runpath_dir"
-};; esac
- done
- if test "$opsys $need_motif" = "sol2 yes"; then
- xe_runpath_dir="/opt/SUNWdt/lib";
- eval "$xe_add_unique_runpath_dir";
- fi
- fi
- if test -n "$runpath"; then
- ld_switch_run="${dash_r}${runpath}"
-
-if test "$GCC" = "yes"; then
- set x $ld_switch_run; shift; ld_switch_run=""
- while test -n "$1"; do
- case $1 in
- -L | -l | -u ) ld_switch_run="$ld_switch_run $1 $2";
shift ;;
- -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
- -Xlinker* ) ;;
- * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
- esac
- shift
- done
fi
- test "$extra_verbose" = "yes" && echo "Setting
runpath to $runpath"
- fi
-fi
-
+done
- if test "$extra_verbose" = "yes"; then
- echo; echo "X11 compilation variables:"
- for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval
"echo \"$var = '\$$var'\""; done
- echo
- fi
+ echo $ac_n "checking for standard XRegisterIMInstantiateCallback
prototype""... $ac_c" 1>&6
+echo "configure:6990: checking for standard XRegisterIMInstantiateCallback
prototype" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 6992 "configure"
+#include "confdefs.h"
- bitmapdirs=
- if test "$x_includes" != NONE; then
- for i in $x_includes; do
- if test -d "$i/bitmaps"; then
- bitmapdirs="$i/bitmaps:$bitmapdirs"
- fi
- if test -d "$i/X11/bitmaps"; then
- bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
- fi
- done
- bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
- fi
- test ! -z "$bitmapdirs" && { test "$extra_verbose" =
"yes" && cat << EOF
- Defining BITMAPDIR = "$bitmapdirs"
-EOF
-cat >> confdefs.h <<EOF
-#define BITMAPDIR "$bitmapdirs"
-EOF
-}
+#define NeedFunctionPrototypes 1
+#include <X11/Xlib.h>
+extern Bool XRegisterIMInstantiateCallback(
+ Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
+int main() {
- echo "checking for X defines extracted by xmkmf" 1>&6
-echo "configure:6983: checking for X defines extracted by xmkmf" >&5
- rm -fr conftestdir
- if mkdir conftestdir; then
- cd conftestdir
- cat > Imakefile <<'EOF'
-xetest:
- @echo ${PROTO_DEFINES} ${STD_DEFINES}
-EOF
- if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
- # GNU make sometimes prints "make[1]: Entering...", which would confuse
us.
- xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
- fi
- cd ..
- rm -fr conftestdir
- for word in $xmkmf_defines; do
- case "$word" in
- -D__STDC__*) ;;
- -D* )
- sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
- case "$word" in
- -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
- * ) val=1 ;;
- esac
- if grep "^#define $sym " confdefs.h >/dev/null; then :; else
- if test "$val" = "1"
- then { test "$extra_verbose" = "yes" && cat <<
EOF
- Defining $sym
-EOF
-cat >> confdefs.h <<EOF
-#define $sym 1
+; return 0; }
EOF
-}
-
- else { test "$extra_verbose" = "yes" && cat <<
EOF
- Defining $sym = $val
+if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ echo "$ac_t""yes" 1>&6
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
EOF
-cat >> confdefs.h <<EOF
-#define $sym $val
+cat >> confdefs.h <<\EOF
+#define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
EOF
}
- fi
- fi ;;
- esac
- done
- fi
+fi
+rm -f conftest*
- ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
-echo "configure:7032: checking for X11/Intrinsic.h" >&5
+ test -z "$with_xmu" && {
+echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""...
$ac_c" 1>&6
+echo "configure:7025: checking for XmuReadBitmapDataFromFile in -lXmu"
>&5
+ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
+xe_check_libs=" -lXmu "
cat > conftest.$ac_ext <<EOF
-#line 7035 "configure"
+#line 7030 "configure"
#include "confdefs.h"
-#include <X11/Intrinsic.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 XmuReadBitmapDataFromFile();
+
+int main() {
+XmuReadBitmapDataFromFile()
+; return 0; }
EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7040: \"$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
+if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- eval "ac_cv_header_$ac_safe=yes"
+ eval "ac_cv_lib_$ac_lib_var=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"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- :
+ with_xmu=yes
else
echo "$ac_t""no" 1>&6
-{ echo "configure: error: Unable to find X11 header files." 1>&2; exit
1; }
+with_xmu=no
fi
+ }
+ if test "$with_xmu" = "no"; then
+ extra_objs="$extra_objs xmu.o" && if test
"$extra_verbose" = "yes"; then
+ echo " xemacs will be linked with \"xmu.o\""
+ fi
+ else
+ libs_x="-lXmu $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXmu\" to \$libs_x"; fi
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_XMU
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XMU 1
+EOF
+}
+
+ fi
-echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c"
1>&6
-echo "configure:7064: checking for XOpenDisplay in -lX11" >&5
-ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
+echo "configure:7080: checking for main in -lXbsd" >&5
+ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lX11 "
+xe_check_libs=" -lXbsd "
cat > conftest.$ac_ext <<EOF
-#line 7069 "configure"
+#line 7085 "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 XOpenDisplay();
int main() {
-XOpenDisplay()
+main()
; return 0; }
EOF
-if { (eval echo configure:7080: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7092: \"$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
@@ -7090,34 +7102,58 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- have_lib_x11=yes
+ libs_x="-lXbsd $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXbsd\" to \$libs_x";
fi
else
echo "$ac_t""no" 1>&6
fi
- if test "$have_lib_x11" != "yes"; then
-
-xe_msg_checking="for XGetFontProperty in -lX11"
-test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking
using extra libs -b i486-linuxaout"
-echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:7105: checking "$xe_msg_checking"" >&5
-ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lX11 -b i486-linuxaout"
+
+ ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
+echo "configure:7116: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7119 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7124: \"$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*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
+ echo "$ac_t""yes" 1>&6
+
+echo $ac_n "checking for XmStringFree in -lXm""... $ac_c"
1>&6
+echo "configure:7141: checking for XmStringFree in -lXm" >&5
+ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 7110 "configure"
+#line 7146 "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 XGetFontProperty();
+char XmStringFree();
int main() {
-XGetFontProperty()
+XmStringFree()
; return 0; }
EOF
-if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7157: \"$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
@@ -7131,36 +7167,64 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
+ have_motif=yes
else
echo "$ac_t""no" 1>&6
-{ echo "configure: error: Unable to find X11 libraries." 1>&2; exit 1;
}
+have_motif=no
fi
- fi
- libs_x="-lX11"
- test "$extra_verbose" = "yes" && echo " Setting
libs_x to \"-lX11\""
+else
+ echo "$ac_t""no" 1>&6
+have_motif=no
+fi
+
+
+ if test "$have_motif" = "yes"; then
+ echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
+echo "configure:7186: checking for Lesstif" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 7188 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+#ifdef LESSTIF_VERSION
+yes
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "yes" >/dev/null 2>&1; then
+ rm -rf conftest*
+ have_lesstif=yes
+else
+ rm -rf conftest*
+ have_lesstif=no
+fi
+rm -f conftest*
+
+
+ echo "$ac_t""$have_lesstif" 1>&6
+ echo $ac_n "checking for Xpm built into Xm""... $ac_c"
1>&6
+echo "configure:7209: checking for Xpm built into Xm" >&5
-echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c"
1>&6
-echo "configure:7148: checking for XShapeSelectInput in -lXext" >&5
-ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for XpmCreatePixmapFromBuffer in -lXm""...
$ac_c" 1>&6
+echo "configure:7212: checking for XpmCreatePixmapFromBuffer in -lXm"
>&5
+ac_lib_var=`echo Xm'_'XpmCreatePixmapFromBuffer | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lXext "
+xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 7153 "configure"
+#line 7217 "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 XShapeSelectInput();
+char XpmCreatePixmapFromBuffer();
int main() {
-XShapeSelectInput()
+XpmCreatePixmapFromBuffer()
; return 0; }
EOF
-if { (eval echo configure:7164: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7228: \"$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
@@ -7174,32 +7238,131 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- libs_x="-lXext $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXext\" to \$libs_x";
fi
+ have_xpm_in_xm=yes
else
echo "$ac_t""no" 1>&6
fi
+ if test "$have_xpm_in_xm" = "yes" ; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining XPM_BUILT_INTO_XM
+EOF
+cat >> confdefs.h <<\EOF
+#define XPM_BUILT_INTO_XM 1
+EOF
+}
-
-echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c"
1>&6
-echo "configure:7187: checking for XtOpenDisplay in -lXt" >&5
-ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
+ fi
-xe_check_libs=" -lXt "
+ if test "$unexec" = "unexaix.o" -a "$x11_release" =
"6"; then
+ if test "$GCC" = "yes"; then
+ X_CFLAGS="-mthreads $X_CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-mthreads\" to \$X_CFLAGS"; fi
+ libs_x="-mthreads $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-mthreads\" to \$libs_x"; fi
+ else
+ case "$CC" in
+ "xlc" ) CC="xlc_r" ;;
+ "xlC" ) CC="xlC_r" ;;
+ "cc" ) CC="cc_r" ;;
+ esac
+ fi
+ fi
+
+fi
+
+GNOME_CONFIG=no
+GTK_CONFIG=no
+
+if test "$with_gnome" != "no"; then
+ echo $ac_n "checking for GNOME configuration script""... $ac_c"
1>&6
+echo "configure:7279: checking for GNOME configuration script" >&5
+ for possible in gnome-config
+ do
+ { possible_version="`${possible} --version`" ; } 2> /dev/null
+ if test "x${possible_version}" != "x"; then
+ GNOME_CONFIG="${possible}"
+ with_gnome=yes
+ with_gtk=yes
+ break
+ fi
+ done
+ echo "$ac_t""${GNOME_CONFIG}" 1>&6
+fi
+
+if test "${GNOME_CONFIG}" != "no"; then
+ GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
+ GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_GNOME
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_GNOME 1
+EOF
+}
+
+ libs_gtk="$libs_gtk ${GNOME_LIBS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GNOME_LIBS}\" to \$libs_gtk"; fi
+ c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
+fi
+
+if test "$with_gtk" != "no";then
+ echo $ac_n "checking for GTK configuration script""... $ac_c"
1>&6
+echo "configure:7310: checking for GTK configuration script" >&5
+ for possible in gtk12-config gtk14-config gtk-config
+ do
+ { possible_version="`${possible} --version`" ; } 2> /dev/null
+ if test "x${possible_version}" != "x"; then
+ GTK_CONFIG="${possible}"
+ case "${possible_version}" in
+ 1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your
version of GTK." 1>&2; with_gtk=no;;
+ 1.3.*) echo "configure: warning: GTK 1.3 is not supported right now"
1>&2; with_gtk=no;;
+ 1.2.*)
+ with_gtk=yes
+ break
+ ;;
+ *) echo "configure: warning: Found unsupported version of GTK:
$possible_version" 1>&2;;
+ esac
+ fi
+ done
+ echo "$ac_t""${GTK_CONFIG}" 1>&6
+fi
+
+if test "${GTK_CONFIG}" != "no"; then
+ echo $ac_n "checking gtk version""... $ac_c" 1>&6
+echo "configure:7332: checking gtk version" >&5
+ GTK_VERSION=`${GTK_CONFIG} --version`
+ echo "$ac_t""${GTK_VERSION}" 1>&6
+
+ echo $ac_n "checking gtk libs""... $ac_c" 1>&6
+echo "configure:7337: checking gtk libs" >&5
+ GTK_LIBS=`${GTK_CONFIG} --libs`
+ libs_gtk="$libs_gtk ${GTK_LIBS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GTK_LIBS}\" to \$libs_gtk"; fi
+
+ echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
+echo "configure:7342: checking gtk cflags" >&5
+ GTK_CFLAGS=`${GTK_CONFIG} --cflags`
+ if test "$GCC" = "yes"; then
+ GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
+ fi
+ if test "${GNOME_CONFIG}" != "no"; then
+ GTK_CFLAGS="`${GNOME_CONFIG} --cflags libglade 2> /dev/null`
${GTK_CFLAGS}"
+ fi
+ c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
+
+
+echo $ac_n "checking for main in -lgdk_imlib""... $ac_c"
1>&6
+echo "configure:7354: checking for main in -lgdk_imlib" >&5
+ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgdk_imlib "
cat > conftest.$ac_ext <<EOF
-#line 7192 "configure"
+#line 7359 "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 XtOpenDisplay();
int main() {
-XtOpenDisplay()
+main()
; return 0; }
EOF
-if { (eval echo configure:7203: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7366: \"$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
@@ -7213,57 +7376,57 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- libs_x="-lXt $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXt\" to \$libs_x"; fi
+ libs_gtk="-lgdk_imlib $libs_gtk" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lgdk_imlib\" to \$libs_gtk"; fi
else
echo "$ac_t""no" 1>&6
-{ echo "configure: error: Unable to find X11 libraries." 1>&2; exit 1;
}
fi
+
+echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c"
1>&6
+echo "configure:7388: checking for Imlib_init in -lImlib" >&5
+ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
- echo $ac_n "checking the version of X11 being used""... $ac_c"
1>&6
-echo "configure:7226: checking the version of X11 being used" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7228 "configure"
+xe_check_libs=" -lImlib "
+cat > conftest.$ac_ext <<EOF
+#line 7393 "configure"
#include "confdefs.h"
-#include <X11/Intrinsic.h>
- int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
-EOF
-if { (eval echo configure:7233: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
-then
- ./conftest foobar; x11_release=$?
-else
- conftest_rc="$?"
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- x11_release=4
-fi
-rm -fr conftest*
- echo "$ac_t""R${x11_release}" 1>&6
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining THIS_IS_X11R${x11_release}
-EOF
-cat >> confdefs.h <<EOF
-#define THIS_IS_X11R${x11_release} 1
+/* 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 Imlib_init();
+
+int main() {
+Imlib_init()
+; return 0; }
EOF
-}
+if { (eval echo configure:7404: \"$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*
+xe_check_libs=""
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
+ echo "$ac_t""yes" 1>&6
+ libs_gtk="$libs_gtk -lImlib" && if test "$extra_verbose"
= "yes"; then echo " Appending \"-lImlib\" to
\$libs_gtk"; fi
+else
+ echo "$ac_t""no" 1>&6
+fi
- if test "${x11_release}" = "4"; then
- case "$with_widgets" in
- "" | "no") with_widgets=no ;;
- *) { echo "Error:" "Widget support requires X11R5 or greater"
>&2; exit 1; } ;;
- esac
- fi
- for ac_func in XConvertCase
+ for ac_func in gdk_imlib_init
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7264: checking for $ac_func" >&5
+echo "configure:7427: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 7267 "configure"
+#line 7430 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7286,7 +7449,7 @@
; return 0; }
EOF
-if { (eval echo configure:7290: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7453: \"$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
@@ -7314,19 +7477,47 @@
done
- for ac_hdr in X11/Xlocale.h
+ { test "$extra_verbose" = "yes" && cat <<
\EOF
+ Defining HAVE_XPM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XPM 1
+EOF
+}
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_GTK
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_GTK 1
+EOF
+}
+
+
+
+ with_gtk=yes
+
+ test "$with_dragndrop_nonwindows" = "yes" &&
dragndrop_proto="$dragndrop_proto GTK" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"GTK\" to \$dragndrop_proto"; fi
+
+ OLD_CFLAGS="${CFLAGS}"
+ OLD_CPPFLAGS="${CPPFLAGS}"
+ OLD_LDFLAGS="${LDFLAGS}"
+ CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
+ CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
+ LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
+ for ac_hdr in glade/glade.h glade.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7322: checking for $ac_hdr" >&5
+echo "configure:7513: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 7325 "configure"
+#line 7516 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7330: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:7521: \"$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*
@@ -7355,116 +7546,55 @@
fi
done
-
- for ac_func in XRegisterIMInstantiateCallback
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7363: checking for $ac_func" >&5
+
+echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
+echo "configure:7552: checking for main in -lxml" >&5
+ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
+xe_check_libs=" -lxml "
cat > conftest.$ac_ext <<EOF
-#line 7366 "configure"
+#line 7557 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
int main() {
-
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
+main()
; return 0; }
EOF
-if { (eval echo configure:7389: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7564: \"$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"
+ 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_func_$ac_func=no"
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+xe_check_libs=""
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_func
-EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-}
-
+ libs_gtk="-lxml $libs_gtk" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lxml\" to \$libs_gtk";
fi
else
echo "$ac_t""no" 1>&6
fi
-done
-
- echo $ac_n "checking for standard XRegisterIMInstantiateCallback
prototype""... $ac_c" 1>&6
-echo "configure:7417: checking for standard XRegisterIMInstantiateCallback
prototype" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7419 "configure"
-#include "confdefs.h"
-
-#define NeedFunctionPrototypes 1
-#include <X11/Xlib.h>
-extern Bool XRegisterIMInstantiateCallback(
- Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:7431: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
-EOF
-cat >> confdefs.h <<\EOF
-#define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
-EOF
-}
-fi
-rm -f conftest*
- test -z "$with_xmu" && {
-echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""...
$ac_c" 1>&6
-echo "configure:7452: checking for XmuReadBitmapDataFromFile in -lXmu"
>&5
-ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
+
+echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
+echo "configure:7586: checking for main in -lglade" >&5
+ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lXmu "
+xe_check_libs=" -lglade "
cat > conftest.$ac_ext <<EOF
-#line 7457 "configure"
+#line 7591 "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 XmuReadBitmapDataFromFile();
int main() {
-XmuReadBitmapDataFromFile()
+main()
; return 0; }
EOF
-if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7598: \"$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
@@ -7478,44 +7608,27 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- with_xmu=yes
+ libs_gtk="-lglade $libs_gtk" && if test "$extra_verbose"
= "yes"; then echo " Prepending \"-lglade\" to
\$libs_gtk"; fi
else
echo "$ac_t""no" 1>&6
-with_xmu=no
fi
- }
- if test "$with_xmu" = "no"; then
- extra_objs="$extra_objs xmu.o" && if test
"$extra_verbose" = "yes"; then
- echo " xemacs will be linked with \"xmu.o\""
- fi
- else
- libs_x="-lXmu $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXmu\" to \$libs_x"; fi
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_XMU
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_XMU 1
-EOF
-}
-
- fi
-
-echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
-echo "configure:7507: checking for main in -lXbsd" >&5
-ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
+
+echo $ac_n "checking for main in -lglade-gnome""... $ac_c"
1>&6
+echo "configure:7620: checking for main in -lglade-gnome" >&5
+ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
-xe_check_libs=" -lXbsd "
+xe_check_libs=" -lglade-gnome "
cat > conftest.$ac_ext <<EOF
-#line 7512 "configure"
+#line 7625 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7519: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7632: \"$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
@@ -7529,45 +7642,61 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- libs_x="-lXbsd $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXbsd\" to \$libs_x";
fi
+ libs_gtk="-lglade-gnome $libs_gtk" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lglade-gnome\" to \$libs_gtk"; fi
else
echo "$ac_t""no" 1>&6
fi
+ echo $ac_n "checking the name of the GladeXML textdomain field""...
$ac_c" 1>&6
+echo "configure:7653: checking the name of the GladeXML textdomain field"
>&5
+ cat > conftest.$ac_ext <<EOF
+#line 7655 "configure"
+#include "confdefs.h"
+#include <glade/glade-xml.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep "char \*txtdomain;" >/dev/null 2>&1; then
+ rm -rf conftest*
+ echo "$ac_t""txtdomain" 1>&6
+ { test "$extra_verbose" = "yes" && cat
<< \EOF
+ Defining LIBGLADE_XML_TXTDOMAIN = 1
+EOF
+cat >> confdefs.h <<\EOF
+#define LIBGLADE_XML_TXTDOMAIN 1
+EOF
+}
+
+else
+ rm -rf conftest*
+ echo "$ac_t""textdomain" 1>&6
+fi
+rm -f conftest*
+
+ CFLAGS="${OLD_CFLAGS}"
+ CPPFLAGS="${OLD_CPPFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+fi
- if test "$unexec" = "unexaix.o" -a "$x11_release" =
"6"; then
- if test "$GCC" = "yes"; then
- X_CFLAGS="-mthreads $X_CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-mthreads\" to \$X_CFLAGS"; fi
- libs_x="-mthreads $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-mthreads\" to \$libs_x"; fi
- else
- case "$CC" in
- "xlc" ) CC="xlc_r" ;;
- "xlC" ) CC="xlC_r" ;;
- "cc" ) CC="cc_r" ;;
- esac
- fi
- fi
-fi
if test "$with_msw" != "no"; then
echo "checking for MS-Windows" 1>&6
-echo "configure:7556: checking for MS-Windows" >&5
+echo "configure:7685: checking for MS-Windows" >&5
echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
-echo "configure:7559: checking for main in -lgdi32" >&5
+echo "configure:7688: checking for main in -lgdi32" >&5
ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgdi32 "
cat > conftest.$ac_ext <<EOF
-#line 7564 "configure"
+#line 7693 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7571: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7700: \"$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
@@ -7605,25 +7734,14 @@
install_pp="$srcdir/lib-src/installexe.sh"
libs_system="$libs_system -limm32 -lshell32 -lgdi32 -luser32 -lcomdlg32
-lcomctl32 -lole32 -luuid -lwinspool -lmpr" && if test
"$extra_verbose" = "yes"; then echo " Appending \"-limm32
-lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32 -luuid -lwinspool -lmpr\" to
\$libs_system"; fi
- if test "$with_dragndrop" != no; then
- dragndrop_proto="$dragndrop_proto msw" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"msw\" to \$dragndrop_proto"; fi
- with_dragndrop=yes
- fi
- if test "$window_system" != x11; then
- window_system=msw
- test "$with_scrollbars" != "no" &&
with_scrollbars=msw
- test "$with_menubars" != "no" && with_menubars=msw
- test "$with_toolbars" != "no" && with_toolbars=msw
- test "$with_dialogs" != "no" && with_dialogs=msw
- test "$with_widgets" != "no" && with_widgets=msw
- fi
+ test "$with_dragndrop_windows" = "yes" &&
dragndrop_proto="$dragndrop_proto msw" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"msw\" to \$dragndrop_proto"; fi
cat > conftest.$ac_ext <<EOF
-#line 7622 "configure"
+#line 7740 "configure"
#include "confdefs.h"
#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
EOF
-if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:7745: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_MSG_SELECT
@@ -7644,35 +7762,26 @@
-test -z "$with_dragndrop" &&
with_dragndrop="$with_dragndrop_default"
-test -z "$window_system" && window_system="none"
-
-if test "$window_system" = "none"; then
- for feature in menubars scrollbars toolbars dialogs dragndrop xface
- do
- if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
- echo "configure: warning: --with-$feature ignored: Not valid without
window system support" 1>&2
- fi
- eval "with_${feature}=no"
- done
+if test "$with_x11" = "yes" -o "$with_msw" =
"yes" -o "$with_gtk" = "yes" ; then
+ have_window_system=yes
else
- test -z "$with_toolbars" && with_toolbars=yes
+ have_window_system=no
fi
-if test "$with_msw" != "yes"; then
- for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
+if test "$have_window_system" = "no"; then
+ for feature in menubars scrollbars toolbars dialogs dragndrop gif jpeg png tiff xpm
xface
do
if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
- echo "configure: warning: --with-$feature ignored: Not valid without
MS-Windows support" 1>&2
+ echo "configure: warning: --with-$feature ignored: Not valid without
window system support" 1>&2
fi
eval "with_${feature}=no"
done
else
- :
+ test -z "$with_toolbars" && with_toolbars=yes
fi
if test "$with_x11" != "yes"; then
- for feature in tooltalk cde offix wmcommand xim xmu nas_sound
+ for feature in tooltalk cde offix wmcommand xim xmu nas_sound
do
if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
echo "configure: warning: --with-$feature ignored: Not valid without X
support" 1>&2
@@ -7684,15 +7793,15 @@
if test "$with_x11" = "yes"; then
ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/extensions/shape.h""... $ac_c"
1>&6
-echo "configure:7688: checking for X11/extensions/shape.h" >&5
+echo "configure:7797: checking for X11/extensions/shape.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7691 "configure"
+#line 7800 "configure"
#include "confdefs.h"
#include <X11/extensions/shape.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7696: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:7805: \"$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*
@@ -7725,24 +7834,13 @@
bitmapdir=
-case "$window_system" in
- x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
- msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
- gtk )
- HAVE_X_WINDOWS=no
- test "$with_gnome" = "yes" && echo " Using
GNOME."
- test "$with_gnome" = "no" && echo " Using
GTK."
- ;;
- none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
-esac
-
case "$x_libraries" in *X11R4* )
test "$opsys" = "hpux9" &&
opsysfile="s/hpux9-x11r4.h"
test "$opsys" = "hpux9-shr" &&
opsysfile="s/hpux9shxr4.h"
esac
echo "checking for WM_COMMAND option" 1>&6
-echo "configure:7746: checking for WM_COMMAND option" >&5;
+echo "configure:7844: checking for WM_COMMAND option" >&5;
if test "$with_wmcommand" != "no"; then
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_WMCOMMAND
@@ -7754,18 +7852,18 @@
fi
-test -z "$with_xauth" && test "$window_system" =
"none" && with_xauth=no
+test -z "$with_xauth" && test "$with_x11" !=
"yes" && with_xauth=no
test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
-echo "configure:7761: checking for X11/Xauth.h" >&5
+echo "configure:7859: checking for X11/Xauth.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7764 "configure"
+#line 7862 "configure"
#include "confdefs.h"
#include <X11/Xauth.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7769: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:7867: \"$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*
@@ -7788,12 +7886,12 @@
}
test -z "$with_xauth" && {
echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c"
1>&6
-echo "configure:7792: checking for XauGetAuthByAddr in -lXau" >&5
+echo "configure:7890: checking for XauGetAuthByAddr in -lXau" >&5
ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXau "
cat > conftest.$ac_ext <<EOF
-#line 7797 "configure"
+#line 7895 "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
@@ -7804,7 +7902,7 @@
XauGetAuthByAddr()
; return 0; }
EOF
-if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7906: \"$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
@@ -7853,14 +7951,15 @@
fi
-if test "$with_modules" != "no"; then
- echo "checking for module support" 1>&6
-echo "configure:7859: checking for module support" >&5
- case "$opsys" in
- mingw* | cygwin* ) have_dl=yes ;;
- darwin ) have_dl=yes
- { test "$extra_verbose" = "yes" && cat << \EOF
+echo "checking for dll support" 1>&6
+echo "configure:7957: checking for dll support" >&5
+
+
+case "$opsys" in
+ mingw* | cygwin* ) have_dl=yes ;;
+ darwin ) have_dl=yes
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_DYLD
EOF
cat >> confdefs.h <<\EOF
@@ -7868,19 +7967,19 @@
EOF
}
- ;;
- * )
- ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
+ ;;
+ * )
+ ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:7876: checking for dlfcn.h" >&5
+echo "configure:7975: checking for dlfcn.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7879 "configure"
+#line 7978 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7884: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:7983: \"$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*
@@ -7896,17 +7995,17 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
-echo "configure:7901: checking for dlopen in -lc" >&5
- cat > conftest.$ac_ext <<EOF
-#line 7903 "configure"
+ echo $ac_n "checking for dlopen in -lc""... $ac_c"
1>&6
+echo "configure:8000: checking for dlopen in -lc" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 8002 "configure"
#include "confdefs.h"
#include <dlfcn.h>
int main() {
- dlopen ("", 0);
+ dlopen ("", 0);
; return 0; }
EOF
-if { (eval echo configure:7910: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8009: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
have_dl=yes
else
@@ -7914,19 +8013,19 @@
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:7919: checking for dlopen in -ldl" >&5
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -ldl"
- cat > conftest.$ac_ext <<EOF
-#line 7923 "configure"
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c"
1>&6
+echo "configure:8018: checking for dlopen in -ldl" >&5
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldl"
+ cat > conftest.$ac_ext <<EOF
+#line 8022 "configure"
#include "confdefs.h"
#include <dlfcn.h>
int main() {
- dlopen ("", 0);
+ dlopen ("", 0);
; return 0; }
EOF
-if { (eval echo configure:7930: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8029: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
have_dl=yes
else
@@ -7934,18 +8033,18 @@
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo $ac_n "checking for dlopen in -lsvld""... $ac_c"
1>&6
-echo "configure:7939: checking for dlopen in -lsvld" >&5
- LIBS="$ac_save_LIBS -lsvld"
- cat > conftest.$ac_ext <<EOF
-#line 7942 "configure"
+ echo $ac_n "checking for dlopen in -lsvld""... $ac_c"
1>&6
+echo "configure:8038: checking for dlopen in -lsvld" >&5
+ LIBS="$ac_save_LIBS -lsvld"
+ cat > conftest.$ac_ext <<EOF
+#line 8041 "configure"
#include "confdefs.h"
#include <dlfcn.h>
int main() {
- dlopen ("", 0);
+ dlopen ("", 0);
; return 0; }
EOF
-if { (eval echo configure:7949: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8048: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
have_dl=yes
else
@@ -7963,8 +8062,8 @@
echo "$ac_t""no" 1>&6
fi
- if test "$have_dl" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
+ if test "$have_dl" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_DLOPEN
EOF
cat >> confdefs.h <<\EOF
@@ -7972,18 +8071,18 @@
EOF
}
- else
- ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
+ else
+ ac_safe=`echo "dl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dl.h""... $ac_c" 1>&6
-echo "configure:7979: checking for dl.h" >&5
+echo "configure:8078: checking for dl.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 7982 "configure"
+#line 8081 "configure"
#include "confdefs.h"
#include <dl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7987: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:8086: \"$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*
@@ -7999,17 +8098,17 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for shl_load in -lc""... $ac_c"
1>&6
-echo "configure:8004: checking for shl_load in -lc" >&5
- cat > conftest.$ac_ext <<EOF
-#line 8006 "configure"
+ echo $ac_n "checking for shl_load in -lc""... $ac_c"
1>&6
+echo "configure:8103: checking for shl_load in -lc" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 8105 "configure"
#include "confdefs.h"
#include <dl.h>
int main() {
- shl_load ("", 0, 0);
+ shl_load ("", 0, 0);
; return 0; }
EOF
-if { (eval echo configure:8013: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8112: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
have_dl=yes
else
@@ -8017,19 +8116,19 @@
cat conftest.$ac_ext >&5
rm -rf conftest*
- echo $ac_n "checking for shl_load in -ldl""... $ac_c"
1>&6
-echo "configure:8022: checking for shl_load in -ldl" >&5
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -ldld"
- cat > conftest.$ac_ext <<EOF
-#line 8026 "configure"
+ echo $ac_n "checking for shl_load in -ldl""... $ac_c"
1>&6
+echo "configure:8121: checking for shl_load in -ldl" >&5
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldld"
+ cat > conftest.$ac_ext <<EOF
+#line 8125 "configure"
#include "confdefs.h"
#include <dl.h>
int main() {
- shl_load ("", 0, 0);
+ shl_load ("", 0, 0);
; return 0; }
EOF
-if { (eval echo configure:8033: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8132: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
have_dl=yes
else
@@ -8045,8 +8144,8 @@
echo "$ac_t""no" 1>&6
fi
- if test "$have_dl" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
+ if test "$have_dl" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat <<
\EOF
Defining HAVE_SHL_LOAD
EOF
cat >> confdefs.h <<\EOF
@@ -8054,18 +8153,18 @@
EOF
}
- else
- ac_safe=`echo "ltdl.h" | sed 'y%./+-%__p_%'`
+ else
+ ac_safe=`echo "ltdl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ltdl.h""... $ac_c" 1>&6
-echo "configure:8061: checking for ltdl.h" >&5
+echo "configure:8160: checking for ltdl.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8064 "configure"
+#line 8163 "configure"
#include "confdefs.h"
#include <ltdl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8069: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:8168: \"$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*
@@ -8081,48 +8180,115 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c"
1>&6
-echo "configure:8086: checking for lt_dlinit in -lltdl" >&5
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -lltdl"
- cat > conftest.$ac_ext <<EOF
-#line 8090 "configure"
+ echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c"
1>&6
+echo "configure:8185: checking for lt_dlinit in -lltdl" >&5
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -lltdl"
+ cat > conftest.$ac_ext <<EOF
+#line 8189 "configure"
+#include "confdefs.h"
+#include <ltdl.h>
+int main() {
+ lt_dlinit ();
+; return 0; }
+EOF
+if { (eval echo configure:8196: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ have_dl=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ LIBS="$ac_save_LIBS"
+fi
+rm -f conftest*
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ if test "$have_dl" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat <<
\EOF
+ Defining HAVE_LTDL
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_LTDL 1
+EOF
+}
+
+ fi
+ fi
+ fi
+ ac_save_LIBS=
+esac
+
+if test -n "$have_dl"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_SHLIB
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SHLIB 1
+EOF
+}
+
+ test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&
if test "$extra_verbose" = "yes"; then echo " Prepending
\"-l${libdl}\" to \$LIBS"; fi
+ for ac_func in dlerror _dlerror
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8238: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8241 "configure"
#include "confdefs.h"
-#include <ltdl.h>
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.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 $ac_func();
+
int main() {
- lt_dlinit ();
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
; return 0; }
EOF
-if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
- have_dl=yes
+ eval "ac_cv_func_$ac_func=yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- LIBS="$ac_save_LIBS"
+ eval "ac_cv_func_$ac_func=no"
fi
rm -f conftest*
-else
- echo "$ac_t""no" 1>&6
-fi
- if test "$have_dl" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_LTDL
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining $ac_tr_func
EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_LTDL 1
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
EOF
}
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
- fi
- fi
- fi
- ac_save_LIBS=
- esac
- if test -n "$have_dl"; then
+ if test "$with_modules" != "no" ; then
dll_ld=
dll_ldflags=
@@ -8134,7 +8300,7 @@
xealias=$internal_configuration
echo "checking how to build dynamic libraries for ${xehost}" 1>&6
-echo "configure:8138: checking how to build dynamic libraries for ${xehost}"
>&5
+echo "configure:8304: checking how to build dynamic libraries for ${xehost}"
>&5
# Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
case "$xehost" in
*-*-linux-gnu*) ;;
@@ -8162,9 +8328,9 @@
XEGCC=yes
else
echo $ac_n "checking checking whether we are using GNU C""...
$ac_c" 1>&6
-echo "configure:8166: checking checking whether we are using GNU C"
>&5
+echo "configure:8332: checking checking whether we are using GNU C"
>&5
cat > conftest.$ac_ext <<EOF
-#line 8168 "configure"
+#line 8334 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -8186,7 +8352,7 @@
fi
echo $ac_n "checking how to produce PIC code""... $ac_c"
1>&6
-echo "configure:8190: checking how to produce PIC code" >&5
+echo "configure:8356: checking how to produce PIC code" >&5
wl=
can_build_shared=yes
@@ -8290,18 +8456,18 @@
# Check to make sure the dll_cflags actually works.
echo $ac_n "checking if PIC flag ${dll_cflags} really works""...
$ac_c" 1>&6
-echo "configure:8294: checking if PIC flag ${dll_cflags} really works"
>&5
+echo "configure:8460: checking if PIC flag ${dll_cflags} really works"
>&5
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $dll_cflags -DPIC"
cat > conftest.$ac_ext <<EOF
-#line 8298 "configure"
+#line 8464 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:8305: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:8471: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
# On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
@@ -8332,7 +8498,7 @@
xldf=
xcldf=
echo $ac_n "checking if C compiler can produce shared libraries""...
$ac_c" 1>&6
-echo "configure:8336: checking if C compiler can produce shared libraries"
>&5
+echo "configure:8502: checking if C compiler can produce shared libraries"
>&5
if test "$XEGCC" = yes -o "$__ICC" = yes; then
case "$xehost_os" in
*darwin*)
@@ -8391,14 +8557,14 @@
xe_libs=
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
cat > conftest.$ac_ext <<EOF
-#line 8395 "configure"
+#line 8561 "configure"
#include "confdefs.h"
int main() {
int x=0;
; return 0; }
EOF
-if { (eval echo configure:8402: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8568: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
cc_produces_so=yes
else
@@ -8423,7 +8589,7 @@
if test "$XEGCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo $ac_n "checking for ld used by GCC""... $ac_c"
1>&6
-echo "configure:8427: checking for ld used by GCC" >&5
+echo "configure:8593: checking for ld used by GCC" >&5
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
@@ -8449,7 +8615,7 @@
esac
else
echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
-echo "configure:8453: checking for GNU ld" >&5
+echo "configure:8619: checking for GNU ld" >&5
fi
if test -z "$LTLD"; then
@@ -8487,7 +8653,7 @@
# Check to see if it really is or isn't GNU ld.
echo $ac_n "checking if the linker is GNU ld""... $ac_c"
1>&6
-echo "configure:8491: checking if the linker is GNU ld" >&5
+echo "configure:8657: checking if the linker is GNU ld" >&5
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5;
then
xe_gnu_ld=yes
@@ -8522,7 +8688,7 @@
# OK - only NOW do we futz about with ld.
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker supports shared libraries""...
$ac_c" 1>&6
-echo "configure:8526: checking whether the linker supports shared libraries"
>&5
+echo "configure:8692: checking whether the linker supports shared libraries"
>&5
dll_ld=$CC
dll_ldflags=$LDFLAGS
ld_shlibs=yes
@@ -8719,97 +8885,45 @@
fi
+fi
- if test "$can_build_shared" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_SHLIB
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_SHLIB 1
-EOF
-}
-
- MAKE_SUBDIR="$MAKE_SUBDIR src" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"src\" to \$MAKE_SUBDIR"; fi
- INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" && if
test "$extra_verbose" = "yes"; then echo " Appending
\"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
- test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&
if test "$extra_verbose" = "yes"; then echo " Prepending
\"-l${libdl}\" to \$LIBS"; fi
- for ac_func in dlerror _dlerror
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:8739: checking for $ac_func" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 8742 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.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 $ac_func();
-
-int main() {
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:8765: \"$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"
+if test "$can_build_shared" = "yes"; then
+ test -z "$with_modules" && with_modules=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
+ if test "$with_modules" = "yes"; then
+ { echo "Error:" "Required module support cannot be provided."
>&2; exit 1; }
+ else
+ echo " No module support."
+ fi
+ with_modules=no
fi
-rm -f conftest*
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes";
then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining $ac_tr_func
+
+if test "$with_modules" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_MODULES
EOF
-cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
+cat >> confdefs.h <<\EOF
+#define HAVE_MODULES 1
EOF
}
-
-else
- echo "$ac_t""no" 1>&6
-fi
-done
- with_modules=yes
- MOD_CC="../../lib-src/ellcc"
- MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src
-I\$(srcdir)/../../src"
- INSTALLPATH="\$(moduledir)"
- MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
- OBJECT_TO_BUILD="\$(MODNAME).ell"
- else
- if test "$with_modules" = "yes"; then
- { echo "Error:" "Required module support cannot be provided."
>&2; exit 1; }
- else
- echo " No module support."
- fi
- with_modules=no
- fi
-fi
-if test "$with_modules" != "yes"; then
+ MAKE_SUBDIR="$MAKE_SUBDIR src" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"src\" to \$MAKE_SUBDIR"; fi
+ INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
+ MOD_CC="../../lib-src/ellcc"
+ MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src
-I\$(srcdir)/../../src"
+ INSTALLPATH="\$(moduledir)"
+ MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
+ OBJECT_TO_BUILD="\$(MODNAME).ell"
+else
MOD_CC="$XEMACS_CC"
MODCFLAGS="\$(XE_CFLAGS) -I../../src -I\$(srcdir)/../../src"
INSTALLPATH=""
MOD_INSTALL_PROGRAM="true"
OBJECT_TO_BUILD="\$(MODNAME).o"
fi
+
MODARCHDIR=
MAKE_DOCFILE="../../lib-src/make-docfile"
@@ -8825,15 +8939,15 @@
for dir in "" "Tt/" "desktop/" ; do
ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
-echo "configure:8829: checking for ${dir}tt_c.h" >&5
+echo "configure:8943: checking for ${dir}tt_c.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8832 "configure"
+#line 8946 "configure"
#include "confdefs.h"
#include <${dir}tt_c.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8837: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:8951: \"$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*
@@ -8869,12 +8983,12 @@
xe_msg_checking="for tt_message_create in -ltt"
test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using
extra libs $extra_libs"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:8873: checking "$xe_msg_checking"" >&5
+echo "configure:8987: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
xe_check_libs=" -ltt $extra_libs"
cat > conftest.$ac_ext <<EOF
-#line 8878 "configure"
+#line 8992 "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
@@ -8885,7 +8999,7 @@
tt_message_create()
; return 0; }
EOF
-if { (eval echo configure:8889: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9003: \"$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
@@ -8937,17 +9051,23 @@
libs_x="$tt_libs $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"$tt_libs\" to \$libs_x";
fi
fi
+if test "$with_dragndrop_nonwindows" = "no" ; then
+ if test "$with_cde" = "yes" ; then
+ echo "configure: warning: --with-cde forced to \`no'; no generic
Drag'n'Drop support" 1>&2
+ fi
+ with_cde=no
+fi
test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
-echo "configure:8943: checking for Dt/Dt.h" >&5
+echo "configure:9063: checking for Dt/Dt.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 8946 "configure"
+#line 9066 "configure"
#include "confdefs.h"
#include <Dt/Dt.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8951: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9071: \"$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*
@@ -8970,12 +9090,12 @@
}
test -z "$with_cde" && {
echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c"
1>&6
-echo "configure:8974: checking for DtDndDragStart in -lDtSvc" >&5
+echo "configure:9094: checking for DtDndDragStart in -lDtSvc" >&5
ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
xe_check_libs=" -lDtSvc "
cat > conftest.$ac_ext <<EOF
-#line 8979 "configure"
+#line 9099 "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
@@ -8986,7 +9106,7 @@
DtDndDragStart()
; return 0; }
EOF
-if { (eval echo configure:8990: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9110: \"$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
@@ -9007,12 +9127,6 @@
fi
}
-if test "$with_dragndrop" = "no" ; then
- if test "$with_cde" = "yes" ; then
- echo "configure: warning: --with-cde forced to \`no'; no generic
Drag'n'Drop support" 1>&2
- fi
- with_cde=no
-fi
test -z "$with_cde" && with_cde=yes
if test "$with_cde" = "yes" ; then
{ test "$extra_verbose" = "yes" && cat << \EOF
@@ -9029,14 +9143,14 @@
need_motif=yes # CDE requires Motif
fi
-test "$window_system" != "x11" && with_offix=no
-if test "$with_xmu" != yes -a "$with_x11" = yes; then
+test "$with_x11" != "yes" && with_offix=no
+if test "$with_xmu" != "yes" -a "$with_x11" =
"yes"; then
if test "$with_offix" = "yes" ; then
echo "configure: warning: --with-offix forced to \`no'; no real Xmu
support" 1>&2
fi
with_offix=no
fi
-if test "$with_dragndrop" = no; then
+if test "$with_dragndrop_nonwindows" = "no" ; then
if test "$with_offix" = "yes" ; then
echo "configure: warning: --with-offix forced to \`no'; no generic
Drag'n'Drop support" 1>&2
fi
@@ -9061,17 +9175,9 @@
dnd_objs="$dnd_objs offix.o" && if test "$extra_verbose"
= "yes"; then echo " Appending \"offix.o\" to
\$dnd_objs"; fi
dragndrop_proto="$dragndrop_proto OffiX" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"OffiX\" to \$dragndrop_proto"; fi
fi
-if test "$with_gtk" = "yes"; then
- dragndrop_proto="$dragndrop_proto GTK" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"GTK\" to \$dragndrop_proto"; fi
-fi
-if test "$with_dragndrop" != "no" ; then
- echo $ac_n "checking if drag and drop API is needed""... $ac_c"
1>&6
-echo "configure:9071: checking if drag and drop API is needed" >&5
- if test -n "$dragndrop_proto" ; then
- with_dragndrop=yes
- echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
- { test "$extra_verbose" = "yes" && cat << \EOF
+if test -n "$dragndrop_proto" ; then
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_DRAGNDROP
EOF
cat >> confdefs.h <<\EOF
@@ -9079,27 +9185,23 @@
EOF
}
- extra_objs="$extra_objs dragdrop.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"dragdrop.o\" to \$extra_objs"; fi
- else
- with_dragndrop=no
- echo "$ac_t""no" 1>&6
- fi
+ extra_objs="$extra_objs dragdrop.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"dragdrop.o\" to \$extra_objs"; fi
fi
echo "checking for LDAP" 1>&6
-echo "configure:9091: checking for LDAP" >&5
+echo "configure:9193: checking for LDAP" >&5
ldap_libs=
test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
-echo "configure:9095: checking for ldap.h" >&5
+echo "configure:9197: checking for ldap.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9098 "configure"
+#line 9200 "configure"
#include "confdefs.h"
#include <ldap.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9103: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9205: \"$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*
@@ -9122,15 +9224,15 @@
}
test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for lber.h""... $ac_c" 1>&6
-echo "configure:9126: checking for lber.h" >&5
+echo "configure:9228: checking for lber.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9129 "configure"
+#line 9231 "configure"
#include "confdefs.h"
#include <lber.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9134: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9236: \"$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*
@@ -9154,12 +9256,12 @@
if test "$with_ldap" != "no"; then
echo $ac_n "checking for ldap_search in -lldap""... $ac_c"
1>&6
-echo "configure:9158: checking for ldap_search in -lldap" >&5
+echo "configure:9260: checking for ldap_search in -lldap" >&5
ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
xe_check_libs=" -lldap "
cat > conftest.$ac_ext <<EOF
-#line 9163 "configure"
+#line 9265 "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
@@ -9170,7 +9272,7 @@
ldap_search()
; return 0; }
EOF
-if { (eval echo configure:9174: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9276: \"$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
@@ -9194,12 +9296,12 @@
xe_msg_checking="for ldap_open in -lldap"
test -n "-llber" && xe_msg_checking="$xe_msg_checking using
extra libs -llber"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:9198: checking "$xe_msg_checking"" >&5
+echo "configure:9300: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lldap -llber"
cat > conftest.$ac_ext <<EOF
-#line 9203 "configure"
+#line 9305 "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
@@ -9210,7 +9312,7 @@
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:9214: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9316: \"$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
@@ -9234,12 +9336,12 @@
xe_msg_checking="for ldap_open in -lldap"
test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking
using extra libs -llber -lkrb"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:9238: checking "$xe_msg_checking"" >&5
+echo "configure:9340: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lldap -llber -lkrb"
cat > conftest.$ac_ext <<EOF
-#line 9243 "configure"
+#line 9345 "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
@@ -9250,7 +9352,7 @@
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:9254: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9356: \"$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
@@ -9274,12 +9376,12 @@
xe_msg_checking="for ldap_open in -lldap"
test -n "-llber -lkrb -ldes" &&
xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:9278: checking "$xe_msg_checking"" >&5
+echo "configure:9380: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lldap -llber -lkrb -ldes"
cat > conftest.$ac_ext <<EOF
-#line 9283 "configure"
+#line 9385 "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
@@ -9290,7 +9392,7 @@
ldap_open()
; return 0; }
EOF
-if { (eval echo configure:9294: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9396: \"$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
@@ -9312,12 +9414,12 @@
}
test "$with_ldap_lber" != "yes" && {
echo $ac_n "checking for ber_pvt_opt_on in -llber""... $ac_c"
1>&6
-echo "configure:9316: checking for ber_pvt_opt_on in -llber" >&5
+echo "configure:9418: checking for ber_pvt_opt_on in -llber" >&5
ac_lib_var=`echo lber'_'ber_pvt_opt_on | sed 'y%./+-%__p_%'`
xe_check_libs=" -llber "
cat > conftest.$ac_ext <<EOF
-#line 9321 "configure"
+#line 9423 "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
@@ -9328,7 +9430,7 @@
ber_pvt_opt_on()
; return 0; }
EOF
-if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9434: \"$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
@@ -9372,10 +9474,10 @@
for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:9376: checking for $ac_func" >&5
+echo "configure:9478: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 9379 "configure"
+#line 9481 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -9398,7 +9500,7 @@
; return 0; }
EOF
-if { (eval echo configure:9402: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9504: \"$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
@@ -9437,20 +9539,20 @@
postgresql_libs=
if test "$with_postgresql" != "no"; then
echo "checking for PostgreSQL" 1>&6
-echo "configure:9441: checking for PostgreSQL" >&5
+echo "configure:9543: checking for PostgreSQL" >&5
for header_dir in "" "pgsql/" "postgresql/"; do
ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c"
1>&6
-echo "configure:9446: checking for ${header_dir}libpq-fe.h" >&5
+echo "configure:9548: checking for ${header_dir}libpq-fe.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9449 "configure"
+#line 9551 "configure"
#include "confdefs.h"
#include <${header_dir}libpq-fe.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9454: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9556: \"$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*
@@ -9474,12 +9576,12 @@
test -n "$libpq_fe_h_file" && {
echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c"
1>&6
-echo "configure:9478: checking for PQconnectdb in -lpq" >&5
+echo "configure:9580: checking for PQconnectdb in -lpq" >&5
ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 9483 "configure"
+#line 9585 "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
@@ -9490,7 +9592,7 @@
PQconnectdb()
; return 0; }
EOF
-if { (eval echo configure:9494: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9596: \"$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
@@ -9523,12 +9625,12 @@
echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c"
1>&6
-echo "configure:9527: checking for PQconnectStart in -lpq" >&5
+echo "configure:9629: checking for PQconnectStart in -lpq" >&5
ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpq "
cat > conftest.$ac_ext <<EOF
-#line 9532 "configure"
+#line 9634 "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
@@ -9539,7 +9641,7 @@
PQconnectStart()
; return 0; }
EOF
-if { (eval echo configure:9543: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9645: \"$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
@@ -9564,159 +9666,42 @@
else
echo "$ac_t""no" 1>&6
-fi
-
-
- { test "$extra_verbose" = "yes" && cat << EOF
- Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
-EOF
-cat >> confdefs.h <<EOF
-#define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
-EOF
-}
-
- postgresql_libs="-lpq $postgresql_libs" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lpq\" to \$postgresql_libs"; fi
- MAKE_SUBDIR="$MAKE_SUBDIR modules/postgresql" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"modules/postgresql\" to \$MAKE_SUBDIR"; fi
- need_modules_common=yes
- if test "$with_modules" = "yes"; then
- INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR modules/postgresql"
&& if test "$extra_verbose" = "yes"; then echo "
Appending \"modules/postgresql\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
- fi
- elif test "$with_postgresql" = "yes"; then
- { echo "Error:" "Required PostgreSQL support cannot be provided.
Check --site-prefixes." >&2; exit 1; }
- fi
-fi
-
-
-
-if test "$window_system" != "none"; then
- echo "checking for graphics libraries" 1>&6
-echo "configure:9594: checking for graphics libraries" >&5
-
- libpath_xpm=
- incpath_xpm=
- case "$opsys" in
- cygwin*)
- cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_top=`eval "dirname ${cygwin_top}"`;
- cygwin_top="${cygwin_top}/..";
- case "$window_system" in
- x11) ;;
- msw) libpath_xpm="-L${cygwin_top}/lib/noX"
- incpath_xpm="-I${cygwin_top}/include/noX"
- ;;
- gtk) ;;
- none) ;;
- *) ;;
- esac
- ;;
- *) ;;
- esac
- xpm_problem=""
- if test -z "$with_xpm"; then
- CFLAGS=""$incpath_xpm" $CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$incpath_xpm"\" to \$CFLAGS"; fi
- LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$libpath_xpm"\" to \$LDFLAGS"; fi
- echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c"
1>&6
-echo "configure:9620: checking for Xpm - no older than 3.4f" >&5
- xe_check_libs=-lXpm
- cat > conftest.$ac_ext <<EOF
-#line 9623 "configure"
-#include "confdefs.h"
-#define XPM_NUMBERS
-#include <X11/xpm.h>
- int main(int c, char **v) {
- return c == 1 ? 0 :
- XpmIncludeVersion != XpmLibraryVersion() ? 1 :
- XpmIncludeVersion < 30406 ? 2 : 0 ;}
-EOF
-if { (eval echo configure:9632: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
-then
- ./conftest dummy_arg; xpm_status=$?;
- if test "$xpm_status" = "0"; then
- with_xpm=yes;
- else
- with_xpm=no;
- if test "$xpm_status" = "1"; then
- xpm_problem="Xpm library version and header file version don't
match!"
- elif test "$xpm_status" = "2"; then
- xpm_problem="Xpm library version is too old!"
- else
- xpm_problem="Internal xpm detection logic error!"
- fi
- echo "
-*** WARNING *** $xpm_problem
- I'm not touching that with a 10-foot pole!
- If you really want to use the installed version of Xpm, rerun
- configure and add '--with-xpm=yes', but don't blame me if XEmacs
crashes!"
- fi
-else
- conftest_rc="$?"
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- with_xpm=no
-fi
-rm -fr conftest*
- xe_check_libs=
- echo "$ac_t""$with_xpm" 1>&6
- fi
- if test "$with_xpm" = "yes"; then
- { test "$extra_verbose" = "yes" && cat
<< \EOF
- Defining HAVE_XPM
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_XPM 1
-EOF
-}
-
- LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$libpath_xpm"\" to \$LDFLAGS"; fi
- libs_x="-lXpm $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi
- CFLAGS=""$incpath_xpm" $CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$incpath_xpm"\" to \$CFLAGS"; fi
- echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c"
1>&6
-echo "configure:9676: checking for \"FOR_MSW\" xpm" >&5
- xe_check_libs=-lXpm
- cat > conftest.$ac_ext <<EOF
-#line 9679 "configure"
-#include "confdefs.h"
-
-int main() {
-XpmCreatePixmapFromData()
-; return 0; }
-EOF
-if { (eval echo configure:9686: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- xpm_for_msw=no
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- xpm_for_msw=yes
-fi
-rm -f conftest*
- xe_check_libs=
- echo "$ac_t""$xpm_for_msw" 1>&6
- if test "$xpm_for_msw" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining FOR_MSW
+fi
+
+
+ { test "$extra_verbose" = "yes" && cat << EOF
+ Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
EOF
-cat >> confdefs.h <<\EOF
-#define FOR_MSW 1
+cat >> confdefs.h <<EOF
+#define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
EOF
}
+ postgresql_libs="-lpq $postgresql_libs" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lpq\" to \$postgresql_libs"; fi
+ MAKE_SUBDIR="$MAKE_SUBDIR modules/postgresql" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"modules/postgresql\" to \$MAKE_SUBDIR"; fi
+ need_modules_common=yes
+ if test "$with_modules" = "yes"; then
+ INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR modules/postgresql"
&& if test "$extra_verbose" = "yes"; then echo "
Appending \"modules/postgresql\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
fi
+ elif test "$with_postgresql" = "yes"; then
+ { echo "Error:" "Required PostgreSQL support cannot be provided.
Check --site-prefixes." >&2; exit 1; }
fi
+fi
+
+
+
test -z "$with_xface" && { ac_safe=`echo "compface.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:9712: checking for compface.h" >&5
+echo "configure:9697: checking for compface.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9715 "configure"
+#line 9700 "configure"
#include "confdefs.h"
#include <compface.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9720: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9705: \"$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*
@@ -9739,12 +9724,12 @@
}
test -z "$with_xface" && {
echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c"
1>&6
-echo "configure:9743: checking for UnGenFace in -lcompface" >&5
+echo "configure:9728: checking for UnGenFace in -lcompface" >&5
ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcompface "
cat > conftest.$ac_ext <<EOF
-#line 9748 "configure"
+#line 9733 "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
@@ -9755,7 +9740,7 @@
UnGenFace()
; return 0; }
EOF
-if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9744: \"$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
@@ -9786,7 +9771,7 @@
EOF
}
- libs_x="-lcompface $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lcompface\" to \$libs_x"; fi
+ libs_win="-lcompface $libs_win" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lcompface\" to \$libs_win"; fi
fi
if test "$with_gif" != "no"; then
@@ -9804,12 +9789,12 @@
if test "$with_png $with_tiff" != "no no"; then
echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
-echo "configure:9808: checking for inflate in -lc" >&5
+echo "configure:9793: checking for inflate in -lc" >&5
ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lc "
cat > conftest.$ac_ext <<EOF
-#line 9813 "configure"
+#line 9798 "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
@@ -9820,7 +9805,7 @@
inflate()
; return 0; }
EOF
-if { (eval echo configure:9824: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9809: \"$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
@@ -9839,12 +9824,12 @@
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
-echo "configure:9843: checking for inflate in -lz" >&5
+echo "configure:9828: checking for inflate in -lz" >&5
ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lz "
cat > conftest.$ac_ext <<EOF
-#line 9848 "configure"
+#line 9833 "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
@@ -9855,7 +9840,7 @@
inflate()
; return 0; }
EOF
-if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9844: \"$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
@@ -9869,17 +9854,17 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- libs_x="-lz $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lz\" to \$libs_x"; fi
+ libs_win="-lz $libs_win" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lz\" to \$libs_win"; fi
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
-echo "configure:9878: checking for inflate in -lgz" >&5
+echo "configure:9863: checking for inflate in -lgz" >&5
ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgz "
cat > conftest.$ac_ext <<EOF
-#line 9883 "configure"
+#line 9868 "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
@@ -9890,7 +9875,7 @@
inflate()
; return 0; }
EOF
-if { (eval echo configure:9894: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9879: \"$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
@@ -9904,7 +9889,7 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
- libs_x="-lgz $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lgz\" to \$libs_x"; fi
+ libs_win="-lgz $libs_win" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lgz\" to \$libs_win";
fi
else
echo "$ac_t""no" 1>&6
fi
@@ -9920,15 +9905,15 @@
test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
-echo "configure:9924: checking for jpeglib.h" >&5
+echo "configure:9909: checking for jpeglib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 9927 "configure"
+#line 9912 "configure"
#include "confdefs.h"
#include <jpeglib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:9932: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:9917: \"$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*
@@ -9951,12 +9936,12 @@
}
test -z "$with_jpeg" && {
echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""...
$ac_c" 1>&6
-echo "configure:9955: checking for jpeg_destroy_decompress in -ljpeg"
>&5
+echo "configure:9940: checking for jpeg_destroy_decompress in -ljpeg"
>&5
ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
xe_check_libs=" -ljpeg "
cat > conftest.$ac_ext <<EOF
-#line 9960 "configure"
+#line 9945 "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
@@ -9967,7 +9952,7 @@
jpeg_destroy_decompress()
; return 0; }
EOF
-if { (eval echo configure:9971: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:9956: \"$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
@@ -9998,15 +9983,15 @@
EOF
}
- libs_x="-ljpeg $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-ljpeg\" to \$libs_x";
fi
+ libs_win="-ljpeg $libs_win" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-ljpeg\" to \$libs_win"; fi
fi
png_problem=""
test -z "$with_png" && { echo $ac_n "checking for
pow""... $ac_c" 1>&6
-echo "configure:10007: checking for pow" >&5
+echo "configure:9992: checking for pow" >&5
cat > conftest.$ac_ext <<EOF
-#line 10010 "configure"
+#line 9995 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char pow(); below. */
@@ -10029,7 +10014,7 @@
; return 0; }
EOF
-if { (eval echo configure:10033: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10018: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_pow=yes"
else
@@ -10050,15 +10035,15 @@
}
test -z "$with_png" && { ac_safe=`echo "png.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for png.h""... $ac_c" 1>&6
-echo "configure:10054: checking for png.h" >&5
+echo "configure:10039: checking for png.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10057 "configure"
+#line 10042 "configure"
#include "confdefs.h"
#include <png.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10062: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10047: \"$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*
@@ -10081,12 +10066,12 @@
}
test -z "$with_png" && {
echo $ac_n "checking for png_read_image in -lpng""... $ac_c"
1>&6
-echo "configure:10085: checking for png_read_image in -lpng" >&5
+echo "configure:10070: checking for png_read_image in -lpng" >&5
ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
xe_check_libs=" -lpng "
cat > conftest.$ac_ext <<EOF
-#line 10090 "configure"
+#line 10075 "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
@@ -10097,7 +10082,7 @@
png_read_image()
; return 0; }
EOF
-if { (eval echo configure:10101: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10086: \"$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
@@ -10120,10 +10105,10 @@
}
if test -z "$with_png"; then
echo $ac_n "checking for workable png version information""...
$ac_c" 1>&6
-echo "configure:10124: checking for workable png version information"
>&5
+echo "configure:10109: checking for workable png version information"
>&5
xe_check_libs="-lpng -lz"
cat > conftest.$ac_ext <<EOF
-#line 10127 "configure"
+#line 10112 "configure"
#include "confdefs.h"
#include <png.h>
int main(int c, char **v) {
@@ -10131,7 +10116,7 @@
if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
EOF
-if { (eval echo configure:10135: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:10120: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
./conftest dummy_arg; png_status=$?;
if test "$png_status" = "0"; then
@@ -10169,20 +10154,20 @@
EOF
}
- libs_x="-lpng $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lpng\" to \$libs_x"; fi
+ libs_win="-lpng $libs_win" && if test "$extra_verbose"
= "yes"; then echo " Prepending \"-lpng\" to \$libs_win";
fi
fi
test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
-echo "configure:10178: checking for tiffio.h" >&5
+echo "configure:10163: checking for tiffio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10181 "configure"
+#line 10166 "configure"
#include "confdefs.h"
#include <tiffio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10186: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10171: \"$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*
@@ -10205,12 +10190,12 @@
}
test -z "$with_tiff" && {
echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c"
1>&6
-echo "configure:10209: checking for TIFFClientOpen in -ltiff" >&5
+echo "configure:10194: checking for TIFFClientOpen in -ltiff" >&5
ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
xe_check_libs=" -ltiff "
cat > conftest.$ac_ext <<EOF
-#line 10214 "configure"
+#line 10199 "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
@@ -10221,7 +10206,7 @@
TIFFClientOpen()
; return 0; }
EOF
-if { (eval echo configure:10225: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10210: \"$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
@@ -10251,131 +10236,48 @@
#define HAVE_TIFF 1
EOF
}
-
- libs_x="-ltiff $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-ltiff\" to \$libs_x";
fi
- fi
-fi
-
-
-if test "$with_gtk" = "yes"; then
- test -z "$with_xface" && { ac_safe=`echo "compface.h" |
sed 'y%./+-%__p_%'`
-echo $ac_n "checking for compface.h""... $ac_c" 1>&6
-echo "configure:10264: checking for compface.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10267 "configure"
-#include "confdefs.h"
-#include <compface.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10272: \"$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*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-with_xface=no
-fi
- }
- test -z "$with_xface" && {
-echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c"
1>&6
-echo "configure:10295: checking for UnGenFace in -lcompface" >&5
-ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lcompface "
-cat > conftest.$ac_ext <<EOF
-#line 10300 "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 UnGenFace();
-
-int main() {
-UnGenFace()
-; return 0; }
-EOF
-if { (eval echo configure:10311: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- :
-else
- echo "$ac_t""no" 1>&6
-with_xface=no
-fi
-
- }
- test -z "$with_xface" && with_xface=yes
- if test "$with_xface" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_XFACE
-EOF
-cat >> confdefs.h <<\EOF
-#define HAVE_XFACE 1
-EOF
-}
- libs_gtk="-lcompface $libs_gtk" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lcompface\" to \$libs_gtk"; fi
+ libs_win="-ltiff $libs_win" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-ltiff\" to \$libs_win"; fi
fi
fi
-
if test "$with_x11" = "yes"; then
echo "checking for X11 graphics libraries" 1>&6
-echo "configure:10350: checking for X11 graphics libraries" >&5
-fi
+echo "configure:10248: checking for X11 graphics libraries" >&5
-case "$with_widgets" in
- "yes" | "athena") detect_athena=yes ;;
- *) detect_athena=no ;;
-esac
-
-if test "$with_x11" = "yes" -a "$detect_athena" =
"yes" ; then
- echo "checking for the Athena widgets" 1>&6
-echo "configure:10360: checking for the Athena widgets" >&5
-
- case "$with_athena" in
- "xaw" | "") athena_variant=Xaw athena_3d=no ;;
- "3d") athena_variant=Xaw3d athena_3d=yes ;;
- "next") athena_variant=neXtaw athena_3d=yes ;;
- "95") athena_variant=Xaw95 athena_3d=yes ;;
- "xpm") athena_variant=XawXpm athena_3d=yes ;;
- *) { echo "Error:" "Unknown Athena widget set \`$with_athena'.
This should not happen." >&2; exit 1; } ;;
+ case "$with_widgets" in
+ "yes" | "athena") detect_athena=yes ;;
+ *)
+ case "$with_dialogs" in
+ "yes" | "athena") detect_athena=yes ;;
+ *) detect_athena=no ;;
+ esac
+ ;;
esac
- if test "$athena_3d" = "no"; then
-
+ if test "$detect_athena" = "yes" ; then
+ echo "checking for the Athena widgets" 1>&6
+echo "configure:10262: checking for the Athena widgets" >&5
+
+ case "$with_athena" in
+ "xaw" | "") athena_variant=Xaw athena_3d=no ;;
+ "3d") athena_variant=Xaw3d athena_3d=yes ;;
+ "next") athena_variant=neXtaw athena_3d=yes ;;
+ "95") athena_variant=Xaw95 athena_3d=yes ;;
+ "xpm") athena_variant=XawXpm athena_3d=yes ;;
+ *) { echo "Error:" "Unknown Athena widget set
\`$with_athena'. This should not happen." >&2; exit 1; } ;;
+ esac
+
+ if test "$athena_3d" = "no"; then
+
echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""...
$ac_c" 1>&6
-echo "configure:10374: checking for XawScrollbarSetThumb in
-l$athena_variant" >&5
+echo "configure:10276: checking for XawScrollbarSetThumb in
-l$athena_variant" >&5
ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed
'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 10379 "configure"
+#line 10281 "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
@@ -10386,7 +10288,7 @@
XawScrollbarSetThumb()
; return 0; }
EOF
-if { (eval echo configure:10390: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10292: \"$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
@@ -10400,14 +10302,14 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
-
+
echo $ac_n "checking for threeDClassRec in -l$athena_variant""...
$ac_c" 1>&6
-echo "configure:10406: checking for threeDClassRec in -l$athena_variant"
>&5
+echo "configure:10308: checking for threeDClassRec in -l$athena_variant"
>&5
ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed
'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 10411 "configure"
+#line 10313 "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
@@ -10418,7 +10320,7 @@
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10324: \"$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
@@ -10439,22 +10341,22 @@
fi
-
+
else
echo "$ac_t""no" 1>&6
echo "configure: warning: Could not find an Athena widget library."
1>&2
fi
- else
-
+ else
+
echo $ac_n "checking for threeDClassRec in -l$athena_variant""...
$ac_c" 1>&6
-echo "configure:10453: checking for threeDClassRec in -l$athena_variant"
>&5
+echo "configure:10355: checking for threeDClassRec in -l$athena_variant"
>&5
ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed
'y%./+-%__p_%'`
xe_check_libs=" -l$athena_variant "
cat > conftest.$ac_ext <<EOF
-#line 10458 "configure"
+#line 10360 "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
@@ -10465,7 +10367,7 @@
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:10469: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10371: \"$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
@@ -10483,12 +10385,12 @@
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c"
1>&6
-echo "configure:10487: checking for threeDClassRec in -lXaw" >&5
+echo "configure:10389: checking for threeDClassRec in -lXaw" >&5
ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXaw "
cat > conftest.$ac_ext <<EOF
-#line 10492 "configure"
+#line 10394 "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
@@ -10499,7 +10401,7 @@
threeDClassRec()
; return 0; }
EOF
-if { (eval echo configure:10503: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:10405: \"$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
@@ -10514,8 +10416,8 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
echo "$ac_t""yes" 1>&6
athena_lib=Xaw;
- echo "configure: warning: Assuming that libXaw is actually
$athena_variant." 1>&2;
-
+ echo "configure: warning: Assuming that libXaw is actually
$athena_variant." 1>&2;
+
else
echo "$ac_t""no" 1>&6
echo "configure: warning: Could not find a 3d Athena widget library that looked
like $athena_variant." 1>&2
@@ -10524,21 +10426,21 @@
fi
-
- fi
- if test "$athena_3d" = "no"; then
- ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
+ fi
+
+ if test "$athena_3d" = "no"; then
+ ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:10534: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:10436: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10537 "configure"
+#line 10439 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10542: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10444: \"$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*
@@ -10558,15 +10460,15 @@
echo "$ac_t""no" 1>&6
ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
-echo "configure:10562: checking for X11/Xaw/XawInit.h" >&5
+echo "configure:10464: checking for X11/Xaw/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10565 "configure"
+#line 10467 "configure"
#include "confdefs.h"
#include <X11/Xaw/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10570: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10472: \"$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*
@@ -10589,18 +10491,18 @@
fi
- else
- ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed
'y%./+-%__p_%'`
+ else
+ ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c"
1>&6
-echo "configure:10596: checking for X11/$athena_variant/XawInit.h"
>&5
+echo "configure:10498: checking for X11/$athena_variant/XawInit.h"
>&5
cat > conftest.$ac_ext <<EOF
-#line 10599 "configure"
+#line 10501 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10604: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10506: \"$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*
@@ -10617,15 +10519,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c"
1>&6
-echo "configure:10621: checking for X11/$athena_variant/ThreeD.h" >&5
+echo "configure:10523: checking for X11/$athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10624 "configure"
+#line 10526 "configure"
#include "confdefs.h"
#include <X11/$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10629: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10531: \"$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*
@@ -10648,20 +10550,20 @@
else
echo "$ac_t""no" 1>&6
fi
-
- if test -z "$athena_h_path"; then
- ac_safe=`echo "$athena_variant/XawInit.h" | sed
'y%./+-%__p_%'`
+
+ if test -z "$athena_h_path"; then
+ ac_safe=`echo "$athena_variant/XawInit.h" | sed
'y%./+-%__p_%'`
echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c"
1>&6
-echo "configure:10657: checking for $athena_variant/XawInit.h" >&5
+echo "configure:10559: checking for $athena_variant/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10660 "configure"
+#line 10562 "configure"
#include "confdefs.h"
#include <$athena_variant/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10665: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10567: \"$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*
@@ -10678,15 +10580,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c"
1>&6
-echo "configure:10682: checking for $athena_variant/ThreeD.h" >&5
+echo "configure:10584: checking for $athena_variant/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10685 "configure"
+#line 10587 "configure"
#include "confdefs.h"
#include <$athena_variant/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10690: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10592: \"$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*
@@ -10709,21 +10611,21 @@
else
echo "$ac_t""no" 1>&6
fi
-
- fi
- if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
- ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
+ fi
+
+ if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
+ ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c"
1>&6
-echo "configure:10719: checking for X11/Xaw3d/XawInit.h" >&5
+echo "configure:10621: checking for X11/Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10722 "configure"
+#line 10624 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10727: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10629: \"$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*
@@ -10740,15 +10642,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c"
1>&6
-echo "configure:10744: checking for X11/Xaw3d/ThreeD.h" >&5
+echo "configure:10646: checking for X11/Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10747 "configure"
+#line 10649 "configure"
#include "confdefs.h"
#include <X11/Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10752: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10654: \"$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*
@@ -10764,9 +10666,9 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo "configure: warning: Assuming that X11/Xaw3d headers are suitable
for $athena_variant." 1>&2
- athena_h_path=X11/Xaw3d
-
+ echo "configure: warning: Assuming that X11/Xaw3d headers are
suitable for $athena_variant." 1>&2
+ athena_h_path=X11/Xaw3d
+
else
echo "$ac_t""no" 1>&6
fi
@@ -10774,21 +10676,21 @@
else
echo "$ac_t""no" 1>&6
fi
-
- fi
- if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
- ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
+ fi
+
+ if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
+ ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
-echo "configure:10784: checking for Xaw3d/XawInit.h" >&5
+echo "configure:10686: checking for Xaw3d/XawInit.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10787 "configure"
+#line 10689 "configure"
#include "confdefs.h"
#include <Xaw3d/XawInit.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10792: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10694: \"$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*
@@ -10805,15 +10707,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
-echo "configure:10809: checking for Xaw3d/ThreeD.h" >&5
+echo "configure:10711: checking for Xaw3d/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10812 "configure"
+#line 10714 "configure"
#include "confdefs.h"
#include <Xaw3d/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10817: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10719: \"$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*
@@ -10829,9 +10731,9 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo "configure: warning: Assuming that Xaw3d headers are suitable for
$athena_variant." 1>&2
- athena_h_path=Xaw3d
-
+ echo "configure: warning: Assuming that Xaw3d headers are suitable
for $athena_variant." 1>&2
+ athena_h_path=Xaw3d
+
else
echo "$ac_t""no" 1>&6
fi
@@ -10839,21 +10741,21 @@
else
echo "$ac_t""no" 1>&6
fi
-
- fi
- if test -z "$athena_h_path"; then
- ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
+ fi
+
+ if test -z "$athena_h_path"; then
+ ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
-echo "configure:10849: checking for X11/Xaw/ThreeD.h" >&5
+echo "configure:10751: checking for X11/Xaw/ThreeD.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 10852 "configure"
+#line 10754 "configure"
#include "confdefs.h"
#include <X11/Xaw/ThreeD.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10857: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:10759: \"$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*
@@ -10869,158 +10771,59 @@
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
echo "$ac_t""yes" 1>&6
- echo "configure: warning: Assuming that X11/Xaw headers are suitable for
$athena_variant." 1>&2
- athena_h_path=X11/Xaw
-
+ echo "configure: warning: Assuming that X11/Xaw headers are suitable
for $athena_variant." 1>&2
+ athena_h_path=X11/Xaw
+
else
echo "$ac_t""no" 1>&6
echo "configure: warning: Could not find a suitable 3d Athena header set."
1>&2
fi
+ fi
fi
- fi
-
- if test -n "$athena_lib" -a -n "$athena_h_path"; then
- have_xaw=yes
- else
- have_xaw=no
- fi
-
-else
- have_xaw=no
-fi
-if test "$with_x11" = "yes"; then
- ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
-echo "configure:10896: checking for Xm/Xm.h" >&5
-
-cat > conftest.$ac_ext <<EOF
-#line 10899 "configure"
-#include "confdefs.h"
-#include <Xm/Xm.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:10904: \"$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*
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes";
then
- echo "$ac_t""yes" 1>&6
-echo $ac_n "checking for XmStringFree in -lXm""... $ac_c"
1>&6
-echo "configure:10921: checking for XmStringFree in -lXm" >&5
-ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
-
-xe_check_libs=" -lXm "
-cat > conftest.$ac_ext <<EOF
-#line 10926 "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 XmStringFree();
-
-int main() {
-XmStringFree()
-; return 0; }
-EOF
-if { (eval echo configure:10937: \"$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*
-xe_check_libs=""
-
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ;
then
- echo "$ac_t""yes" 1>&6
- have_motif=yes
-else
- echo "$ac_t""no" 1>&6
-have_motif=no
-fi
-
-
-else
- echo "$ac_t""no" 1>&6
-have_motif=no
-fi
-
-
- if test "$have_motif" = "yes"; then
- echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
-echo "configure:10966: checking for Lesstif" >&5
- cat > conftest.$ac_ext <<EOF
-#line 10968 "configure"
-#include "confdefs.h"
-#include <Xm/Xm.h>
-#ifdef LESSTIF_VERSION
-yes
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- have_lesstif=yes
-else
- rm -rf conftest*
- have_lesstif=no
-fi
-rm -f conftest*
-
- echo "$ac_t""$have_lesstif" 1>&6
- fi
-
-fi
-
-case "$with_menubars" in "" | "yes" | "athena"
)
- with_menubars="lucid" ;;
-esac
-case "$with_dialogs" in "" | "yes" | "lucid" )
- if test "$have_motif" = "yes"; then
with_dialogs="motif"
- elif test "$have_xaw" = "yes"; then
with_dialogs="athena"
- elif test "$with_msw" = "yes"; then
with_dialogs="msw"
- else with_dialogs=no
- fi ;;
-esac
-case "$with_scrollbars" in "" | "yes" )
- with_scrollbars="lucid" ;;
-esac
-case "$with_widgets" in "" | "yes" | "lucid")
- if test "$have_motif" = "yes"; then
with_widgets="motif"
- elif test "$have_xaw" = "yes"; then
with_widgets="athena"
- elif test "$with_msw" = "yes"; then
with_widgets="msw"
- else with_widgets=no
- fi ;;
-esac
-
-all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars
$with_widgets"
-
-case "$all_widgets" in
- *athena* )
- if test "$have_xaw" != "yes"; then
- { echo "Error:" "Could not find a suitable Athena library to build
with." >&2; exit 1; }
+ if test -n "$athena_lib" -a -n "$athena_h_path"; then
+ have_xaw=yes
+ else
+ have_xaw=no
fi
-
- lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xaw.o\" to \$lwlib_objs"; fi
-
- libs_x="-l$athena_lib $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-l$athena_lib\" to \$libs_x"; fi
+
+ else
+ have_xaw=no
+ fi
+
+ case "$with_menubars" in "" | "yes" |
"athena" )
+ with_menubars="lucid" ;;
+ esac
+ case "$with_scrollbars" in "" | "yes" )
+ with_scrollbars="lucid" ;;
+ esac
+ case "$with_dialogs" in "" | "yes" |
"lucid" )
+ if test "$have_motif" = "yes"; then
with_dialogs="motif"
+ elif test "$have_xaw" = "yes"; then
with_dialogs="athena"
+ elif test "$with_msw" != "yes" -a "$with_gtk" !=
"yes"; then with_dialogs="no"
+ fi ;;
+ esac
+ case "$with_widgets" in "" | "yes" |
"lucid")
+ if test "$have_motif" = "yes"; then
with_widgets="motif"
+ elif test "$have_xaw" = "yes"; then
with_widgets="athena"
+ elif test "$with_msw" != "yes" -a "$with_gtk" !=
"yes"; then with_widgets="no"
+ fi ;;
+ esac
- { test "$extra_verbose" = "yes" && cat
<< EOF
+ all_gui="$with_menubars $with_scrollbars $with_dialogs $with_toolbars
$with_widgets"
+
+ case "$all_gui" in
+ *athena* )
+ if test "$have_xaw" != "yes"; then
+ { echo "Error:" "Could not find a suitable Athena library to
build with." >&2; exit 1; }
+ fi
+
+ lwlib_objs="$lwlib_objs lwlib-Xaw.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xaw.o\" to \$lwlib_objs"; fi
+
+ libs_x="-l$athena_lib $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-l$athena_lib\" to \$libs_x"; fi
+
+ { test "$extra_verbose" = "yes"
&& cat << EOF
Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
EOF
cat >> confdefs.h <<EOF
@@ -11028,7 +10831,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
EOF
cat >> confdefs.h <<EOF
@@ -11036,7 +10839,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
EOF
cat >> confdefs.h <<EOF
@@ -11044,7 +10847,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
EOF
cat >> confdefs.h <<EOF
@@ -11052,7 +10855,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
EOF
cat >> confdefs.h <<EOF
@@ -11060,7 +10863,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
EOF
cat >> confdefs.h <<EOF
@@ -11068,7 +10871,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
EOF
cat >> confdefs.h <<EOF
@@ -11076,7 +10879,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
EOF
cat >> confdefs.h <<EOF
@@ -11084,7 +10887,7 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
EOF
cat >> confdefs.h <<EOF
@@ -11092,16 +10895,16 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << EOF
+ { test "$extra_verbose" = "yes" && cat << EOF
Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
EOF
cat >> confdefs.h <<EOF
#define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
EOF
}
-
- { test "$extra_verbose" = "yes" && cat << \EOF
+
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_USES_ATHENA
EOF
cat >> confdefs.h <<\EOF
@@ -11109,31 +10912,31 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << \EOF
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining NEED_ATHENA
EOF
cat >> confdefs.h <<\EOF
#define NEED_ATHENA 1
EOF
}
-
- need_athena="yes"
- if test "$athena_3d" = "yes"; then
- { test "$extra_verbose" = "yes" && cat << \EOF
+ need_athena="yes"
+
+ if test "$athena_3d" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat <<
\EOF
Defining HAVE_ATHENA_3D
EOF
cat >> confdefs.h <<\EOF
#define HAVE_ATHENA_3D 1
EOF
}
-
- fi
- ;;
-esac
-case "$all_widgets" in *motif* )
- { test "$extra_verbose" = "yes" && cat << \EOF
+ fi
+ ;;
+ esac
+
+ case "$all_gui" in *motif* )
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_USES_MOTIF
EOF
cat >> confdefs.h <<\EOF
@@ -11141,41 +10944,38 @@
EOF
}
- { test "$extra_verbose" = "yes" && cat << \EOF
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining NEED_MOTIF
EOF
cat >> confdefs.h <<\EOF
#define NEED_MOTIF 1
EOF
}
-
- lwlib_objs="$lwlib_objs lwlib-Xm.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xm.o\" to \$lwlib_objs"; fi
- need_motif=yes ;;
-esac
-test "$with_menubars" = "lucid" &&
lwlib_objs="$lwlib_objs xlwmenu.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwmenu.o\" to \$lwlib_objs"; fi
-test "$with_menubars" = "motif" &&
lwlib_objs="$lwlib_objs xlwmenu.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwmenu.o\" to \$lwlib_objs"; fi
-test "$with_scrollbars" = "lucid" &&
lwlib_objs="$lwlib_objs xlwscrollbar.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwscrollbar.o\" to \$lwlib_objs"; fi
-test "$with_widgets" != "no" && test
"$with_widgets" != "msw" && \
- lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
-case "$with_widgets" in athena* )
- lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" && if
test "$extra_verbose" = "yes"; then echo " Appending
\"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi;;
-esac
-case "$all_widgets" in *lucid* )
- { test "$extra_verbose" = "yes" && cat << \EOF
+ lwlib_objs="$lwlib_objs lwlib-Xm.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xm.o\" to \$lwlib_objs"; fi
+ need_motif=yes ;;
+ esac
+
+ test "$with_menubars" = "lucid" &&
lwlib_objs="$lwlib_objs xlwmenu.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwmenu.o\" to \$lwlib_objs"; fi
+ test "$with_menubars" = "motif" &&
lwlib_objs="$lwlib_objs xlwmenu.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwmenu.o\" to \$lwlib_objs"; fi
+ test "$with_scrollbars" = "lucid" &&
lwlib_objs="$lwlib_objs xlwscrollbar.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwscrollbar.o\" to \$lwlib_objs"; fi
+ test "$with_widgets" = "motif" -o "$with_widgets" =
"athena" && \
+ lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
+ test "$with_widgets" = "athena" && \
+ lwlib_objs="$lwlib_objs xlwradio.o xlwcheckbox.o xlwgauge.o" &&
if test "$extra_verbose" = "yes"; then echo " Appending
\"xlwradio.o xlwcheckbox.o xlwgauge.o\" to \$lwlib_objs"; fi
+ case "$all_gui" in *lucid* )
+ { test "$extra_verbose" = "yes" && cat << \EOF
Defining NEED_LUCID
EOF
cat >> confdefs.h <<\EOF
#define NEED_LUCID 1
EOF
}
-
- lwlib_objs="$lwlib_objs lwlib-Xlw.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
-esac
-
-
-test "$with_scrollbars" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ lwlib_objs="$lwlib_objs lwlib-Xlw.o" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
+ esac
+
+ test "$with_scrollbars" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_SCROLLBARS_ATHENA
EOF
cat >> confdefs.h <<\EOF
@@ -11183,7 +10983,7 @@
EOF
}
-test "$with_dialogs" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ test "$with_dialogs" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_DIALOGS_ATHENA
EOF
cat >> confdefs.h <<\EOF
@@ -11191,9 +10991,9 @@
EOF
}
-
-if test "$athena_3d" = "yes"; then
- test "$with_scrollbars" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
+
+ if test "$athena_3d" = "yes"; then
+ test "$with_scrollbars" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_SCROLLBARS_ATHENA3D
EOF
cat >> confdefs.h <<\EOF
@@ -11201,121 +11001,131 @@
EOF
}
- test "$with_dialogs" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ test "$with_dialogs" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
Defining LWLIB_DIALOGS_ATHENA3D
EOF
cat >> confdefs.h <<\EOF
#define LWLIB_DIALOGS_ATHENA3D 1
EOF
}
-
-fi
-case "$with_widgets" in athena* ) { test "$extra_verbose" =
"yes" && cat << \EOF
- Defining LWLIB_WIDGETS_ATHENA
+ fi
+
+ test "$with_widgets" = "motif" -o "$with_widgets" =
"athena" && \
+ { test "$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_TABS_LUCID
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_WIDGETS_ATHENA 1
+#define LWLIB_TABS_LUCID 1
EOF
}
-;; esac
-test "$with_widgets" != "no" && test
"$with_widgets" != "msw" && \
- { test "$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_TABS_LUCID
+
+ test "$with_widgets" = "athena" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_WIDGETS_ATHENA
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_TABS_LUCID 1
+#define LWLIB_WIDGETS_ATHENA 1
EOF
}
-
-test "$with_menubars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_MENUBARS
+
+ test "$with_menubars" = "lucid" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_MENUBARS_LUCID
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_MENUBARS 1
+#define LWLIB_MENUBARS_LUCID 1
EOF
}
-test "$with_scrollbars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_SCROLLBARS
+ test "$with_scrollbars" = "lucid" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_SCROLLBARS_LUCID
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_SCROLLBARS 1
+#define LWLIB_SCROLLBARS_LUCID 1
EOF
}
-test "$with_dialogs" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_DIALOGS
+
+ test "$with_menubars" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_MENUBARS_MOTIF
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_DIALOGS 1
+#define LWLIB_MENUBARS_MOTIF 1
EOF
}
-test "$with_toolbars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_TOOLBARS
+ test "$with_scrollbars" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_SCROLLBARS_MOTIF
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_TOOLBARS 1
+#define LWLIB_SCROLLBARS_MOTIF 1
EOF
}
-test "$with_widgets" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining HAVE_WIDGETS
+ test "$with_dialogs" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_DIALOGS_MOTIF
EOF
cat >> confdefs.h <<\EOF
-#define HAVE_WIDGETS 1
+#define LWLIB_DIALOGS_MOTIF 1
EOF
}
-
-test "$with_menubars" = "lucid" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_MENUBARS_LUCID
+ test "$with_widgets" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining LWLIB_WIDGETS_MOTIF
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_MENUBARS_LUCID 1
+#define LWLIB_WIDGETS_MOTIF 1
EOF
}
-test "$with_scrollbars" = "lucid" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_SCROLLBARS_LUCID
+fi
+
+
+if test "$have_window_system" = "no" ; then
+ with_menubars=no
+ with_scrollbars=no
+ with_toolbars=no
+ with_widgets=no
+ with_dialogs=no
+fi
+
+test "$with_menubars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_MENUBARS
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_SCROLLBARS_LUCID 1
+#define HAVE_MENUBARS 1
EOF
}
-
-test "$with_menubars" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_MENUBARS_MOTIF
+test "$with_scrollbars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_SCROLLBARS
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_MENUBARS_MOTIF 1
+#define HAVE_SCROLLBARS 1
EOF
}
-test "$with_scrollbars" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_SCROLLBARS_MOTIF
+test "$with_dialogs" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_DIALOGS
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_SCROLLBARS_MOTIF 1
+#define HAVE_DIALOGS 1
EOF
}
-test "$with_dialogs" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_DIALOGS_MOTIF
+test "$with_toolbars" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_TOOLBARS
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_DIALOGS_MOTIF 1
+#define HAVE_TOOLBARS 1
EOF
}
-test "$with_widgets" = "motif" && { test
"$extra_verbose" = "yes" && cat << \EOF
- Defining LWLIB_WIDGETS_MOTIF
+test "$with_widgets" != "no" && { test
"$extra_verbose" = "yes" && cat << \EOF
+ Defining HAVE_WIDGETS
EOF
cat >> confdefs.h <<\EOF
-#define LWLIB_WIDGETS_MOTIF 1
+#define HAVE_WIDGETS 1
EOF
}
@@ -11337,7 +11147,7 @@
if test "$with_mule" = "yes" ; then
echo "checking for Mule-related features" 1>&6
-echo "configure:11341: checking for Mule-related features" >&5
+echo "configure:11151: checking for Mule-related features" >&5
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining MULE
EOF
@@ -11351,15 +11161,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:11355: checking for $ac_hdr" >&5
+echo "configure:11165: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 11358 "configure"
+#line 11168 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11363: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11173: \"$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*
@@ -11390,12 +11200,12 @@
echo $ac_n "checking for strerror in -lintl""... $ac_c"
1>&6
-echo "configure:11394: checking for strerror in -lintl" >&5
+echo "configure:11204: checking for strerror in -lintl" >&5
ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
xe_check_libs=" -lintl "
cat > conftest.$ac_ext <<EOF
-#line 11399 "configure"
+#line 11209 "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
@@ -11406,7 +11216,7 @@
strerror()
; return 0; }
EOF
-if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11220: \"$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
@@ -11439,18 +11249,18 @@
echo "checking for Mule input methods" 1>&6
-echo "configure:11443: checking for Mule input methods" >&5
+echo "configure:11253: checking for Mule input methods" >&5
case "$with_xim" in "" | "yes" )
echo "checking for XIM" 1>&6
-echo "configure:11446: checking for XIM" >&5
+echo "configure:11256: checking for XIM" >&5
echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
-echo "configure:11449: checking for XOpenIM in -lX11" >&5
+echo "configure:11259: checking for XOpenIM in -lX11" >&5
ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 11454 "configure"
+#line 11264 "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
@@ -11461,7 +11271,7 @@
XOpenIM()
; return 0; }
EOF
-if { (eval echo configure:11465: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11275: \"$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
@@ -11485,12 +11295,12 @@
if test "$have_motif $have_lesstif" = "yes no"; then
echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c"
1>&6
-echo "configure:11489: checking for XmImMbLookupString in -lXm" >&5
+echo "configure:11299: checking for XmImMbLookupString in -lXm" >&5
ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
xe_check_libs=" -lXm "
cat > conftest.$ac_ext <<EOF
-#line 11494 "configure"
+#line 11304 "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
@@ -11501,7 +11311,7 @@
XmImMbLookupString()
; return 0; }
EOF
-if { (eval echo configure:11505: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11315: \"$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
@@ -11566,15 +11376,15 @@
if test "$with_xfs" = "yes" ; then
echo "checking for XFontSet" 1>&6
-echo "configure:11570: checking for XFontSet" >&5
+echo "configure:11380: checking for XFontSet" >&5
echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c"
1>&6
-echo "configure:11573: checking for XmbDrawString in -lX11" >&5
+echo "configure:11383: checking for XmbDrawString in -lX11" >&5
ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
xe_check_libs=" -lX11 "
cat > conftest.$ac_ext <<EOF
-#line 11578 "configure"
+#line 11388 "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
@@ -11585,7 +11395,7 @@
XmbDrawString()
; return 0; }
EOF
-if { (eval echo configure:11589: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11399: \"$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
@@ -11625,15 +11435,15 @@
test "$with_wnn6" = "yes" && with_wnn=yes # wnn6
implies wnn support
test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
-echo "configure:11629: checking for wnn/jllib.h" >&5
+echo "configure:11439: checking for wnn/jllib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11632 "configure"
+#line 11442 "configure"
#include "confdefs.h"
#include <wnn/jllib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11637: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11447: \"$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*
@@ -11656,15 +11466,15 @@
}
test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h"
| sed 'y%./+-%__p_%'`
echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
-echo "configure:11660: checking for wnn/commonhd.h" >&5
+echo "configure:11470: checking for wnn/commonhd.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 11663 "configure"
+#line 11473 "configure"
#include "confdefs.h"
#include <wnn/commonhd.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:11668: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11478: \"$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*
@@ -11689,10 +11499,10 @@
for ac_func in crypt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:11693: checking for $ac_func" >&5
+echo "configure:11503: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 11696 "configure"
+#line 11506 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -11715,7 +11525,7 @@
; return 0; }
EOF
-if { (eval echo configure:11719: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11529: \"$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
@@ -11744,12 +11554,12 @@
test "$ac_cv_func_crypt" != "yes" && {
echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:11748: checking for crypt in -lcrypt" >&5
+echo "configure:11558: checking for crypt in -lcrypt" >&5
ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcrypt "
cat > conftest.$ac_ext <<EOF
-#line 11753 "configure"
+#line 11563 "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
@@ -11760,7 +11570,7 @@
crypt()
; return 0; }
EOF
-if { (eval echo configure:11764: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11574: \"$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
@@ -11795,12 +11605,12 @@
if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c"
1>&6
-echo "configure:11799: checking for jl_dic_list_e in -lwnn" >&5
+echo "configure:11609: checking for jl_dic_list_e in -lwnn" >&5
ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
xe_check_libs=" -lwnn "
cat > conftest.$ac_ext <<EOF
-#line 11804 "configure"
+#line 11614 "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
@@ -11811,7 +11621,7 @@
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:11815: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11625: \"$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
@@ -11829,12 +11639,12 @@
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c"
1>&6
-echo "configure:11833: checking for jl_dic_list_e in -lwnn4" >&5
+echo "configure:11643: checking for jl_dic_list_e in -lwnn4" >&5
ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
xe_check_libs=" -lwnn4 "
cat > conftest.$ac_ext <<EOF
-#line 11838 "configure"
+#line 11648 "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
@@ -11845,7 +11655,7 @@
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:11849: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11659: \"$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
@@ -11863,12 +11673,12 @@
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c"
1>&6
-echo "configure:11867: checking for jl_dic_list_e in -lwnn6" >&5
+echo "configure:11677: checking for jl_dic_list_e in -lwnn6" >&5
ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
xe_check_libs=" -lwnn6 "
cat > conftest.$ac_ext <<EOF
-#line 11872 "configure"
+#line 11682 "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
@@ -11879,7 +11689,7 @@
jl_dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:11883: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11693: \"$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
@@ -11897,12 +11707,12 @@
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c"
1>&6
-echo "configure:11901: checking for dic_list_e in -lwnn6_fromsrc" >&5
+echo "configure:11711: checking for dic_list_e in -lwnn6_fromsrc" >&5
ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
xe_check_libs=" -lwnn6_fromsrc "
cat > conftest.$ac_ext <<EOF
-#line 11906 "configure"
+#line 11716 "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
@@ -11913,7 +11723,7 @@
dic_list_e()
; return 0; }
EOF
-if { (eval echo configure:11917: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11727: \"$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
@@ -11954,16 +11764,16 @@
EOF
}
- libs_x="-l$libwnn $libs_x" && if test "$extra_verbose"
= "yes"; then echo " Prepending \"-l$libwnn\" to
\$libs_x"; fi
+ libs_mule="-l$libwnn $libs_mule" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-l$libwnn\" to \$libs_mule"; fi
if test "$with_wnn6" != "no"; then
echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c"
1>&6
-echo "configure:11962: checking for jl_fi_dic_list in -l$libwnn" >&5
+echo "configure:11772: checking for jl_fi_dic_list in -l$libwnn" >&5
ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$libwnn "
cat > conftest.$ac_ext <<EOF
-#line 11967 "configure"
+#line 11777 "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
@@ -11974,7 +11784,7 @@
jl_fi_dic_list()
; return 0; }
EOF
-if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11788: \"$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
@@ -12009,15 +11819,15 @@
if test "$with_canna" != "no"; then
ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:12013: checking for canna/jrkanji.h" >&5
+echo "configure:11823: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12016 "configure"
+#line 11826 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12021: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11831: \"$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*
@@ -12044,15 +11854,15 @@
c_switch_site="$c_switch_site -I/usr/local/canna/include"
ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
-echo "configure:12048: checking for canna/jrkanji.h" >&5
+echo "configure:11858: checking for canna/jrkanji.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12051 "configure"
+#line 11861 "configure"
#include "confdefs.h"
#include <canna/jrkanji.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12056: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11866: \"$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*
@@ -12080,15 +11890,15 @@
test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" |
sed 'y%./+-%__p_%'`
echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
-echo "configure:12084: checking for canna/RK.h" >&5
+echo "configure:11894: checking for canna/RK.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 12087 "configure"
+#line 11897 "configure"
#include "confdefs.h"
#include <canna/RK.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12092: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:11902: \"$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*
@@ -12111,12 +11921,12 @@
}
test -z "$with_canna" && {
echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
-echo "configure:12115: checking for RkBgnBun in -lRKC" >&5
+echo "configure:11925: checking for RkBgnBun in -lRKC" >&5
ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
xe_check_libs=" -lRKC "
cat > conftest.$ac_ext <<EOF
-#line 12120 "configure"
+#line 11930 "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
@@ -12127,7 +11937,7 @@
RkBgnBun()
; return 0; }
EOF
-if { (eval echo configure:12131: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11941: \"$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
@@ -12150,12 +11960,12 @@
}
test -z "$with_canna" && {
echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c"
1>&6
-echo "configure:12154: checking for jrKanjiControl in -lcanna" >&5
+echo "configure:11964: checking for jrKanjiControl in -lcanna" >&5
ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcanna "
cat > conftest.$ac_ext <<EOF
-#line 12159 "configure"
+#line 11969 "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
@@ -12166,7 +11976,7 @@
jrKanjiControl()
; return 0; }
EOF
-if { (eval echo configure:12170: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:11980: \"$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
@@ -12197,7 +12007,7 @@
EOF
}
- libs_x="-lcanna -lRKC $libs_x" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lcanna -lRKC\" to \$libs_x"; fi
+ libs_mule="-lcanna -lRKC $libs_mule" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lcanna -lRKC\" to \$libs_mule"; fi
fi
else for feature in xim canna wnn; do
@@ -12207,17 +12017,134 @@
eval "with_${feature}=no"
done
fi
+if test "$have_window_system" != "no"; then
+ echo "checking for Xpm" 1>&6
+echo "configure:12023: checking for Xpm" >&5
+
+ libpath_xpm=
+ incpath_xpm=
+ case "$opsys" in
+ cygwin*)
+ if test "$with_msw" = "yes" -a "$with_x11" !=
"yes" ; then
+ cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
+ cygwin_top=`eval "dirname ${cygwin_top}"`;
+ cygwin_top="${cygwin_top}/..";
+ libpath_xpm="-L${cygwin_top}/lib/noX"
+ incpath_xpm="-I${cygwin_top}/include/noX"
+ fi
+ ;;
+ *) ;;
+ esac
+ xpm_problem=""
+ if test -z "$with_xpm"; then
+ CFLAGS=""$incpath_xpm" $CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$incpath_xpm"\" to \$CFLAGS"; fi
+ LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$libpath_xpm"\" to \$LDFLAGS"; fi
+ echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c"
1>&6
+echo "configure:12044: checking for Xpm - no older than 3.4f" >&5
+ xe_check_libs=-lXpm
+ cat > conftest.$ac_ext <<EOF
+#line 12047 "configure"
+#include "confdefs.h"
+#define XPM_NUMBERS
+#include <X11/xpm.h>
+ int main(int c, char **v) {
+ return c == 1 ? 0 :
+ XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+ XpmIncludeVersion < 30406 ? 2 : 0 ;}
+EOF
+if { (eval echo configure:12056: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+then
+ ./conftest dummy_arg; xpm_status=$?;
+ if test "$xpm_status" = "0"; then
+ with_xpm=yes;
+ else
+ with_xpm=no;
+ if test "$xpm_status" = "1"; then
+ xpm_problem="Xpm library version and header file version don't
match!"
+ elif test "$xpm_status" = "2"; then
+ xpm_problem="Xpm library version is too old!"
+ else
+ xpm_problem="Internal xpm detection logic error!"
+ fi
+ echo "
+*** WARNING *** $xpm_problem
+ I'm not touching that with a 10-foot pole!
+ If you really want to use the installed version of Xpm, rerun
+ configure and add '--with-xpm=yes', but don't blame me if XEmacs
crashes!"
+ fi
+else
+ conftest_rc="$?"
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ with_xpm=no
+fi
+rm -fr conftest*
+ xe_check_libs=
+ echo "$ac_t""$with_xpm" 1>&6
+ fi
+ if test "$with_xpm" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat
<< \EOF
+ Defining HAVE_XPM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XPM 1
+EOF
+}
+
+ if test "$need_motif" != "yes" -o "$have_xpm_in_xm"
!= "yes" ; then
+ LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$libpath_xpm"\" to \$LDFLAGS"; fi
+ libs_win="-lXpm $libs_win" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"-lXpm\" to \$libs_win"; fi
+ CFLAGS=""$incpath_xpm" $CFLAGS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\""$incpath_xpm"\" to \$CFLAGS"; fi
+ echo $ac_n "checking for \"FOR_MSW\" xpm""...
$ac_c" 1>&6
+echo "configure:12101: checking for \"FOR_MSW\" xpm" >&5
+ xe_check_libs=-lXpm
+ cat > conftest.$ac_ext <<EOF
+#line 12104 "configure"
+#include "confdefs.h"
+
+int main() {
+XpmCreatePixmapFromData()
+; return 0; }
+EOF
+if { (eval echo configure:12111: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ xpm_for_msw=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ xpm_for_msw=yes
+fi
+rm -f conftest*
+ xe_check_libs=
+ echo "$ac_t""$xpm_for_msw" 1>&6
+ if test "$xpm_for_msw" = "yes"; then
+ { test "$extra_verbose" = "yes" && cat <<
\EOF
+ Defining FOR_MSW
+EOF
+cat >> confdefs.h <<\EOF
+#define FOR_MSW 1
+EOF
+}
+
+ fi
+ else
+ echo "$ac_t""Xpm will be found in Motif." 1>&6
+ fi
+ fi
+fi
if test "$need_motif" = "yes" ; then
libs_x="-lXm $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi
echo $ac_n "checking for layout_object_getvalue in -li18n""...
$ac_c" 1>&6
-echo "configure:12216: checking for layout_object_getvalue in -li18n"
>&5
+echo "configure:12143: checking for layout_object_getvalue in -li18n"
>&5
ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
xe_check_libs=" -li18n "
cat > conftest.$ac_ext <<EOF
-#line 12221 "configure"
+#line 12148 "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
@@ -12228,7 +12155,7 @@
layout_object_getvalue()
; return 0; }
EOF
-if { (eval echo configure:12232: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12159: \"$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
@@ -12315,10 +12242,10 @@
for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime ftruncate
getaddrinfo gethostname getnameinfo getpagesize getrlimit gettimeofday getcwd link logb
lrand48 matherr mkdir mktime perror poll random readlink rename res_init rint rmdir select
setitimer setpgid setsid sigblock sighold sigprocmask snprintf strerror strlwr strupr
symlink tzset ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12319: checking for $ac_func" >&5
+echo "configure:12246: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 12322 "configure"
+#line 12249 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12341,7 +12268,7 @@
; return 0; }
EOF
-if { (eval echo configure:12345: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12272: \"$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
@@ -12382,10 +12309,10 @@
for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12386: checking for $ac_func" >&5
+echo "configure:12313: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 12389 "configure"
+#line 12316 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12408,7 +12335,7 @@
; return 0; }
EOF
-if { (eval echo configure:12412: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12339: \"$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
@@ -12437,10 +12364,10 @@
echo $ac_n "checking for openpty""... $ac_c" 1>&6
-echo "configure:12441: checking for openpty" >&5
+echo "configure:12368: checking for openpty" >&5
cat > conftest.$ac_ext <<EOF
-#line 12444 "configure"
+#line 12371 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char openpty(); below. */
@@ -12463,7 +12390,7 @@
; return 0; }
EOF
-if { (eval echo configure:12467: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12394: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_openpty=yes"
else
@@ -12482,12 +12409,12 @@
echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
-echo "configure:12486: checking for openpty in -lutil" >&5
+echo "configure:12413: checking for openpty in -lutil" >&5
ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
xe_check_libs=" -lutil "
cat > conftest.$ac_ext <<EOF
-#line 12491 "configure"
+#line 12418 "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
@@ -12498,7 +12425,7 @@
openpty()
; return 0; }
EOF
-if { (eval echo configure:12502: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12429: \"$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
@@ -12533,15 +12460,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12537: checking for $ac_hdr" >&5
+echo "configure:12464: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12540 "configure"
+#line 12467 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12545: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12472: \"$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*
@@ -12578,15 +12505,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12582: checking for $ac_hdr" >&5
+echo "configure:12509: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12585 "configure"
+#line 12512 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12590: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12517: \"$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*
@@ -12619,15 +12546,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12623: checking for $ac_hdr" >&5
+echo "configure:12550: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12626 "configure"
+#line 12553 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12631: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12558: \"$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*
@@ -12660,15 +12587,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12664: checking for $ac_hdr" >&5
+echo "configure:12591: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12667 "configure"
+#line 12594 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12672: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12599: \"$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*
@@ -12704,15 +12631,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12708: checking for $ac_hdr" >&5
+echo "configure:12635: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12711 "configure"
+#line 12638 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12716: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12643: \"$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*
@@ -12745,10 +12672,10 @@
for ac_func in isastream
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12749: checking for $ac_func" >&5
+echo "configure:12676: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 12752 "configure"
+#line 12679 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12771,7 +12698,7 @@
; return 0; }
EOF
-if { (eval echo configure:12775: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12702: \"$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
@@ -12802,15 +12729,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12806: checking for $ac_hdr" >&5
+echo "configure:12733: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12809 "configure"
+#line 12736 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12814: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12741: \"$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*
@@ -12843,10 +12770,10 @@
for ac_func in getloadavg
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:12847: checking for $ac_func" >&5
+echo "configure:12774: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 12850 "configure"
+#line 12777 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -12869,7 +12796,7 @@
; return 0; }
EOF
-if { (eval echo configure:12873: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12800: \"$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
@@ -12902,15 +12829,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:12906: checking for $ac_hdr" >&5
+echo "configure:12833: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 12909 "configure"
+#line 12836 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:12914: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12841: \"$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*
@@ -12946,12 +12873,12 @@
echo $ac_n "checking for kstat_open in -lkstat""... $ac_c"
1>&6
-echo "configure:12950: checking for kstat_open in -lkstat" >&5
+echo "configure:12877: checking for kstat_open in -lkstat" >&5
ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lkstat "
cat > conftest.$ac_ext <<EOF
-#line 12955 "configure"
+#line 12882 "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
@@ -12962,7 +12889,7 @@
kstat_open()
; return 0; }
EOF
-if { (eval echo configure:12966: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12893: \"$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
@@ -12997,15 +12924,15 @@
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:13001: checking for $ac_hdr" >&5
+echo "configure:12928: checking for $ac_hdr" >&5
cat > conftest.$ac_ext <<EOF
-#line 13004 "configure"
+#line 12931 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:13009: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:12936: \"$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*
@@ -13037,12 +12964,12 @@
echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
-echo "configure:13041: checking for kvm_read in -lkvm" >&5
+echo "configure:12968: checking for kvm_read in -lkvm" >&5
ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
xe_check_libs=" -lkvm "
cat > conftest.$ac_ext <<EOF
-#line 13046 "configure"
+#line 12973 "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
@@ -13053,7 +12980,7 @@
kvm_read()
; return 0; }
EOF
-if { (eval echo configure:13057: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:12984: \"$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
@@ -13087,16 +13014,16 @@
fi
echo $ac_n "checking whether netdb declares h_errno""... $ac_c"
1>&6
-echo "configure:13091: checking whether netdb declares h_errno" >&5
+echo "configure:13018: checking whether netdb declares h_errno" >&5
cat > conftest.$ac_ext <<EOF
-#line 13093 "configure"
+#line 13020 "configure"
#include "confdefs.h"
#include <netdb.h>
int main() {
return h_errno;
; return 0; }
EOF
-if { (eval echo configure:13100: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13027: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
{ test "$extra_verbose" = "yes" && cat << \EOF
@@ -13116,16 +13043,16 @@
rm -f conftest*
echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
-echo "configure:13120: checking for sigsetjmp" >&5
+echo "configure:13047: checking for sigsetjmp" >&5
cat > conftest.$ac_ext <<EOF
-#line 13122 "configure"
+#line 13049 "configure"
#include "confdefs.h"
#include <setjmp.h>
int main() {
sigjmp_buf bar; sigsetjmp (bar, 0);
; return 0; }
EOF
-if { (eval echo configure:13129: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:13056: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6
{ test "$extra_verbose" = "yes" && cat << \EOF
@@ -13145,11 +13072,11 @@
rm -f conftest*
echo $ac_n "checking whether localtime caches TZ""... $ac_c"
1>&6
-echo "configure:13149: checking whether localtime caches TZ" >&5
+echo "configure:13076: checking whether localtime caches TZ" >&5
if test "$ac_cv_func_tzset" = "yes"; then
cat > conftest.$ac_ext <<EOF
-#line 13153 "configure"
+#line 13080 "configure"
#include "confdefs.h"
#include <time.h>
#if STDC_HEADERS
@@ -13184,7 +13111,7 @@
exit (0);
}
EOF
-if { (eval echo configure:13188: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13115: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
emacs_cv_localtime_cache=no
else
@@ -13214,9 +13141,9 @@
if test "$HAVE_TIMEVAL" = "yes"; then
echo $ac_n "checking whether gettimeofday accepts one or two
arguments""... $ac_c" 1>&6
-echo "configure:13218: checking whether gettimeofday accepts one or two
arguments" >&5
+echo "configure:13145: checking whether gettimeofday accepts one or two
arguments" >&5
cat > conftest.$ac_ext <<EOF
-#line 13220 "configure"
+#line 13147 "configure"
#include "confdefs.h"
#ifdef TIME_WITH_SYS_TIME
@@ -13237,7 +13164,7 @@
; return 0; }
EOF
-if { (eval echo configure:13241: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13168: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""two" 1>&6
else
@@ -13259,19 +13186,19 @@
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:13263: checking for inline" >&5
+echo "configure:13190: checking for inline" >&5
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat > conftest.$ac_ext <<EOF
-#line 13268 "configure"
+#line 13195 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:13275: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:13202: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -13308,16 +13235,16 @@
fi
echo $ac_n "checking for typeof""... $ac_c" 1>&6
-echo "configure:13312: checking for typeof" >&5
+echo "configure:13239: checking for typeof" >&5
cat > conftest.$ac_ext <<EOF
-#line 13314 "configure"
+#line 13241 "configure"
#include "confdefs.h"
int main() {
int i; __typeof__(i) j;
; return 0; }
EOF
-if { (eval echo configure:13321: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:13248: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
typeofname="__typeof__"
else
@@ -13325,14 +13252,14 @@
cat conftest.$ac_ext >&5
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 13329 "configure"
+#line 13256 "configure"
#include "confdefs.h"
int main() {
int i; typeof(i) j;
; return 0; }
EOF
-if { (eval echo configure:13336: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:13263: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
typeofname="typeof"
else
@@ -13361,17 +13288,17 @@
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:13365: checking for working alloca.h" >&5
+echo "configure:13292: checking for working alloca.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 13368 "configure"
+#line 13295 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:13375: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@@ -13395,10 +13322,10 @@
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:13399: checking for alloca" >&5
+echo "configure:13326: checking for alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 13402 "configure"
+#line 13329 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -13426,7 +13353,7 @@
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:13430: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13357: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@@ -13465,10 +13392,10 @@
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c"
1>&6
-echo "configure:13469: checking whether alloca needs Cray hooks" >&5
+echo "configure:13396: checking whether alloca needs Cray hooks" >&5
cat > conftest.$ac_ext <<EOF
-#line 13472 "configure"
+#line 13399 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -13492,10 +13419,10 @@
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13496: checking for $ac_func" >&5
+echo "configure:13423: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 13499 "configure"
+#line 13426 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -13518,7 +13445,7 @@
; return 0; }
EOF
-if { (eval echo configure:13522: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13449: \"$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
@@ -13548,10 +13475,10 @@
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c"
1>&6
-echo "configure:13552: checking stack direction for C alloca" >&5
+echo "configure:13479: checking stack direction for C alloca" >&5
cat > conftest.$ac_ext <<EOF
-#line 13555 "configure"
+#line 13482 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -13570,7 +13497,7 @@
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:13574: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13501: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_c_stack_direction=1
else
@@ -13599,9 +13526,9 @@
fi
echo $ac_n "checking for working alloca in function calls""...
$ac_c" 1>&6
-echo "configure:13603: checking for working alloca in function calls"
>&5
+echo "configure:13530: checking for working alloca in function calls"
>&5
cat > conftest.$ac_ext <<EOF
-#line 13605 "configure"
+#line 13532 "configure"
#include "confdefs.h"
#if defined (__CYGWIN__)
@@ -13654,7 +13581,7 @@
}
EOF
-if { (eval echo configure:13658: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13585: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
working_alloca_in_function_calls=yes
else
@@ -13677,9 +13604,9 @@
echo $ac_n "checking for working scanf""... $ac_c" 1>&6
-echo "configure:13681: checking for working scanf" >&5
+echo "configure:13608: checking for working scanf" >&5
cat > conftest.$ac_ext <<EOF
-#line 13683 "configure"
+#line 13610 "configure"
#include "confdefs.h"
int
@@ -13694,7 +13621,7 @@
}
EOF
-if { (eval echo configure:13698: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13625: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
working_scanf=yes
else
@@ -13717,10 +13644,10 @@
echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
-echo "configure:13721: checking for working strcoll" >&5
+echo "configure:13648: checking for working strcoll" >&5
cat > conftest.$ac_ext <<EOF
-#line 13724 "configure"
+#line 13651 "configure"
#include "confdefs.h"
#include <string.h>
main ()
@@ -13730,7 +13657,7 @@
strcoll ("123", "456") >= 0);
}
EOF
-if { (eval echo configure:13734: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13661: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_func_strcoll_works=yes
else
@@ -13758,10 +13685,10 @@
for ac_func in getpgrp
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:13762: checking for $ac_func" >&5
+echo "configure:13689: checking for $ac_func" >&5
cat > conftest.$ac_ext <<EOF
-#line 13765 "configure"
+#line 13692 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -13784,7 +13711,7 @@
; return 0; }
EOF
-if { (eval echo configure:13788: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:13715: \"$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
@@ -13812,10 +13739,10 @@
done
echo $ac_n "checking whether getpgrp takes no argument""... $ac_c"
1>&6
-echo "configure:13816: checking whether getpgrp takes no argument"
>&5
+echo "configure:13743: checking whether getpgrp takes no argument"
>&5
cat > conftest.$ac_ext <<EOF
-#line 13819 "configure"
+#line 13746 "configure"
#include "confdefs.h"
/*
@@ -13870,7 +13797,7 @@
}
EOF
-if { (eval echo configure:13874: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13801: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
ac_cv_func_getpgrp_void=yes
else
@@ -13897,10 +13824,10 @@
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:13901: checking for working mmap" >&5
+echo "configure:13828: checking for working mmap" >&5
case "$opsys" in ultrix* ) have_mmap=no ;; *)
cat > conftest.$ac_ext <<EOF
-#line 13904 "configure"
+#line 13831 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <unistd.h>
@@ -13933,7 +13860,7 @@
return 1;
}
EOF
-if { (eval echo configure:13937: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:13864: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
have_mmap=yes
else
@@ -13962,9 +13889,9 @@
if test "$rel_alloc $have_mmap" = "default yes"; then
if test "$doug_lea_malloc" = "yes"; then
echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c"
1>&6
-echo "configure:13966: checking for M_MMAP_THRESHOLD" >&5
+echo "configure:13893: checking for M_MMAP_THRESHOLD" >&5
cat > conftest.$ac_ext <<EOF
-#line 13968 "configure"
+#line 13895 "configure"
#include "confdefs.h"
#include <malloc.h>
int main() {
@@ -13976,7 +13903,7 @@
; return 0; }
EOF
-if { (eval echo configure:13980: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:13907: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
rel_alloc=no; echo "$ac_t""yes" 1>&6;
else
@@ -14001,15 +13928,15 @@
ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for termios.h""... $ac_c" 1>&6
-echo "configure:14005: checking for termios.h" >&5
+echo "configure:13932: checking for termios.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14008 "configure"
+#line 13935 "configure"
#include "confdefs.h"
#include <termios.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14013: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:13940: \"$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*
@@ -14052,15 +13979,15 @@
echo "$ac_t""no" 1>&6
ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for termio.h""... $ac_c" 1>&6
-echo "configure:14056: checking for termio.h" >&5
+echo "configure:13983: checking for termio.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14059 "configure"
+#line 13986 "configure"
#include "confdefs.h"
#include <termio.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14064: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:13991: \"$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*
@@ -14092,10 +14019,10 @@
echo $ac_n "checking for socket""... $ac_c" 1>&6
-echo "configure:14096: checking for socket" >&5
+echo "configure:14023: checking for socket" >&5
cat > conftest.$ac_ext <<EOF
-#line 14099 "configure"
+#line 14026 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char socket(); below. */
@@ -14118,7 +14045,7 @@
; return 0; }
EOF
-if { (eval echo configure:14122: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14049: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_socket=yes"
else
@@ -14133,15 +14060,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
-echo "configure:14137: checking for netinet/in.h" >&5
+echo "configure:14064: checking for netinet/in.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14140 "configure"
+#line 14067 "configure"
#include "confdefs.h"
#include <netinet/in.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14145: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14072: \"$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*
@@ -14158,15 +14085,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
-echo "configure:14162: checking for arpa/inet.h" >&5
+echo "configure:14089: checking for arpa/inet.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14165 "configure"
+#line 14092 "configure"
#include "confdefs.h"
#include <arpa/inet.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14170: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14097: \"$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*
@@ -14191,9 +14118,9 @@
}
echo $ac_n "checking "for sun_len member in struct
sockaddr_un"""... $ac_c" 1>&6
-echo "configure:14195: checking "for sun_len member in struct
sockaddr_un"" >&5
+echo "configure:14122: checking "for sun_len member in struct
sockaddr_un"" >&5
cat > conftest.$ac_ext <<EOF
-#line 14197 "configure"
+#line 14124 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -14204,7 +14131,7 @@
static struct sockaddr_un x; x.sun_len = 1;
; return 0; }
EOF
-if { (eval echo configure:14208: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14135: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; { test "$extra_verbose"
= "yes" && cat << \EOF
Defining HAVE_SOCKADDR_SUN_LEN
@@ -14222,9 +14149,9 @@
fi
rm -f conftest*
echo $ac_n "checking "for ip_mreq struct in
netinet/in.h"""... $ac_c" 1>&6
-echo "configure:14226: checking "for ip_mreq struct in
netinet/in.h"" >&5
+echo "configure:14153: checking "for ip_mreq struct in
netinet/in.h"" >&5
cat > conftest.$ac_ext <<EOF
-#line 14228 "configure"
+#line 14155 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -14234,7 +14161,7 @@
static struct ip_mreq x;
; return 0; }
EOF
-if { (eval echo configure:14238: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14165: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""yes" 1>&6; { test "$extra_verbose"
= "yes" && cat << \EOF
Defining HAVE_MULTICAST
@@ -14265,10 +14192,10 @@
echo $ac_n "checking for msgget""... $ac_c" 1>&6
-echo "configure:14269: checking for msgget" >&5
+echo "configure:14196: checking for msgget" >&5
cat > conftest.$ac_ext <<EOF
-#line 14272 "configure"
+#line 14199 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char msgget(); below. */
@@ -14291,7 +14218,7 @@
; return 0; }
EOF
-if { (eval echo configure:14295: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14222: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_msgget=yes"
else
@@ -14306,15 +14233,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
-echo "configure:14310: checking for sys/ipc.h" >&5
+echo "configure:14237: checking for sys/ipc.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14313 "configure"
+#line 14240 "configure"
#include "confdefs.h"
#include <sys/ipc.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14318: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14245: \"$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*
@@ -14331,15 +14258,15 @@
echo "$ac_t""yes" 1>&6
ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
-echo "configure:14335: checking for sys/msg.h" >&5
+echo "configure:14262: checking for sys/msg.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14338 "configure"
+#line 14265 "configure"
#include "confdefs.h"
#include <sys/msg.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14343: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14270: \"$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*
@@ -14377,15 +14304,15 @@
ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
-echo "configure:14381: checking for dirent.h" >&5
+echo "configure:14308: checking for dirent.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14384 "configure"
+#line 14311 "configure"
#include "confdefs.h"
#include <dirent.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14389: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14316: \"$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*
@@ -14412,15 +14339,15 @@
echo "$ac_t""no" 1>&6
ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
-echo "configure:14416: checking for sys/dir.h" >&5
+echo "configure:14343: checking for sys/dir.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14419 "configure"
+#line 14346 "configure"
#include "confdefs.h"
#include <sys/dir.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14424: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14351: \"$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*
@@ -14453,15 +14380,15 @@
ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
-echo "configure:14457: checking for nlist.h" >&5
+echo "configure:14384: checking for nlist.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14460 "configure"
+#line 14387 "configure"
#include "confdefs.h"
#include <nlist.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14465: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14392: \"$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*
@@ -14491,22 +14418,22 @@
echo "checking "for sound support"" 1>&6
-echo "configure:14495: checking "for sound support"" >&5
+echo "configure:14422: checking "for sound support"" >&5
test -z "$with_native_sound" -a -n "$native_sound_lib" &&
with_native_sound=yes
if test "$with_native_sound" != "no"; then
if test -n "$native_sound_lib"; then
ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for multimedia/audio_device.h""... $ac_c"
1>&6
-echo "configure:14502: checking for multimedia/audio_device.h" >&5
+echo "configure:14429: checking for multimedia/audio_device.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14505 "configure"
+#line 14432 "configure"
#include "confdefs.h"
#include <multimedia/audio_device.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14510: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14437: \"$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*
@@ -14562,12 +14489,12 @@
if test -z "$native_sound_lib"; then
echo $ac_n "checking for ALopenport in -laudio""... $ac_c"
1>&6
-echo "configure:14566: checking for ALopenport in -laudio" >&5
+echo "configure:14493: checking for ALopenport in -laudio" >&5
ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
xe_check_libs=" -laudio "
cat > conftest.$ac_ext <<EOF
-#line 14571 "configure"
+#line 14498 "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
@@ -14578,7 +14505,7 @@
ALopenport()
; return 0; }
EOF
-if { (eval echo configure:14582: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14509: \"$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
@@ -14609,12 +14536,12 @@
if test -z "$native_sound_lib"; then
echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c"
1>&6
-echo "configure:14613: checking for AOpenAudio in -lAlib" >&5
+echo "configure:14540: checking for AOpenAudio in -lAlib" >&5
ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
xe_check_libs=" -lAlib "
cat > conftest.$ac_ext <<EOF
-#line 14618 "configure"
+#line 14545 "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
@@ -14625,7 +14552,7 @@
AOpenAudio()
; return 0; }
EOF
-if { (eval echo configure:14629: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14556: \"$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
@@ -14673,15 +14600,15 @@
for dir in "machine" "sys" "linux"; do
ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c"
1>&6
-echo "configure:14677: checking for ${dir}/soundcard.h" >&5
+echo "configure:14604: checking for ${dir}/soundcard.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14680 "configure"
+#line 14607 "configure"
#include "confdefs.h"
#include <${dir}/soundcard.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14685: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14612: \"$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*
@@ -14723,12 +14650,12 @@
if test "$opsys" = "netbsd" ; then
echo $ac_n "checking for _oss_ioctl in -lossaudio""... $ac_c"
1>&6
-echo "configure:14727: checking for _oss_ioctl in -lossaudio" >&5
+echo "configure:14654: checking for _oss_ioctl in -lossaudio" >&5
ac_lib_var=`echo ossaudio'_'_oss_ioctl | sed 'y%./+-%__p_%'`
xe_check_libs=" -lossaudio "
cat > conftest.$ac_ext <<EOF
-#line 14732 "configure"
+#line 14659 "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
@@ -14739,7 +14666,7 @@
_oss_ioctl()
; return 0; }
EOF
-if { (eval echo configure:14743: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14670: \"$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
@@ -14778,15 +14705,15 @@
if test "$with_nas_sound" != "no"; then
ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
-echo "configure:14782: checking for audio/audiolib.h" >&5
+echo "configure:14709: checking for audio/audiolib.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 14785 "configure"
+#line 14712 "configure"
#include "confdefs.h"
#include <audio/audiolib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:14790: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14717: \"$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*
@@ -14804,12 +14731,12 @@
echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c"
1>&6
-echo "configure:14808: checking for AuOpenServer in -laudio" >&5
+echo "configure:14735: checking for AuOpenServer in -laudio" >&5
ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
xe_check_libs=" -laudio "
cat > conftest.$ac_ext <<EOF
-#line 14813 "configure"
+#line 14740 "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
@@ -14820,7 +14747,7 @@
AuOpenServer()
; return 0; }
EOF
-if { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14751: \"$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
@@ -14859,7 +14786,7 @@
fi
libs_x="-laudio $libs_x" && if test "$extra_verbose" =
"yes"; then echo " Prepending \"-laudio\" to \$libs_x";
fi
cat > conftest.$ac_ext <<EOF
-#line 14863 "configure"
+#line 14790 "configure"
#include "confdefs.h"
#include <audio/Xtutil.h>
EOF
@@ -14890,7 +14817,7 @@
# Extract the first word of "esd-config", so it can be a program name with
args.
set dummy esd-config; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:14894: checking for $ac_word" >&5
+echo "configure:14821: checking for $ac_word" >&5
if test -n "$have_esd_config"; then
ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the
test.
@@ -14919,10 +14846,10 @@
c_switch_site="$c_switch_site `esd-config --cflags`" && if test
"$extra_verbose" = "yes"; then echo " Appending
\"`esd-config --cflags`\" to \$c_switch_site"; fi
LIBS="`esd-config --libs` $LIBS" && if test
"$extra_verbose" = "yes"; then echo " Prepending
\"`esd-config --libs`\" to \$LIBS"; fi
echo $ac_n "checking for esd_play_stream""... $ac_c"
1>&6
-echo "configure:14923: checking for esd_play_stream" >&5
+echo "configure:14850: checking for esd_play_stream" >&5
cat > conftest.$ac_ext <<EOF
-#line 14926 "configure"
+#line 14853 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char esd_play_stream(); below. */
@@ -14945,7 +14872,7 @@
; return 0; }
EOF
-if { (eval echo configure:14949: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14876: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_esd_play_stream=yes"
else
@@ -14996,7 +14923,7 @@
if test "$with_tty" = "yes" ; then
echo "checking for TTY-related features" 1>&6
-echo "configure:15000: checking for TTY-related features" >&5
+echo "configure:14927: checking for TTY-related features" >&5
{ test "$extra_verbose" = "yes" && cat << \EOF
Defining HAVE_TTY
EOF
@@ -15009,12 +14936,12 @@
if test -z "$with_ncurses"; then
echo $ac_n "checking for tgetent in -lncurses""... $ac_c"
1>&6
-echo "configure:15013: checking for tgetent in -lncurses" >&5
+echo "configure:14940: checking for tgetent in -lncurses" >&5
ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -lncurses "
cat > conftest.$ac_ext <<EOF
-#line 15018 "configure"
+#line 14945 "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
@@ -15025,7 +14952,7 @@
tgetent()
; return 0; }
EOF
-if { (eval echo configure:15029: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:14956: \"$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
@@ -15058,15 +14985,15 @@
ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:15062: checking for ncurses/curses.h" >&5
+echo "configure:14989: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15065 "configure"
+#line 14992 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15070: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:14997: \"$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*
@@ -15088,15 +15015,15 @@
ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
-echo "configure:15092: checking for ncurses/term.h" >&5
+echo "configure:15019: checking for ncurses/term.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15095 "configure"
+#line 15022 "configure"
#include "confdefs.h"
#include <ncurses/term.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15100: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15027: \"$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*
@@ -15126,15 +15053,15 @@
c_switch_site="$c_switch_site -I/usr/include/ncurses"
ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
-echo "configure:15130: checking for ncurses/curses.h" >&5
+echo "configure:15057: checking for ncurses/curses.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15133 "configure"
+#line 15060 "configure"
#include "confdefs.h"
#include <ncurses/curses.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15138: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15065: \"$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*
@@ -15169,12 +15096,12 @@
for lib in curses termlib termcap; do
echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
-echo "configure:15173: checking for tgetent in -l$lib" >&5
+echo "configure:15100: checking for tgetent in -l$lib" >&5
ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -l$lib "
cat > conftest.$ac_ext <<EOF
-#line 15178 "configure"
+#line 15105 "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
@@ -15185,7 +15112,7 @@
tgetent()
; return 0; }
EOF
-if { (eval echo configure:15189: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15116: \"$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
@@ -15216,12 +15143,12 @@
else
echo $ac_n "checking for tgetent in -lcurses""... $ac_c"
1>&6
-echo "configure:15220: checking for tgetent in -lcurses" >&5
+echo "configure:15147: checking for tgetent in -lcurses" >&5
ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -lcurses "
cat > conftest.$ac_ext <<EOF
-#line 15225 "configure"
+#line 15152 "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
@@ -15232,7 +15159,7 @@
tgetent()
; return 0; }
EOF
-if { (eval echo configure:15236: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15163: \"$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
@@ -15250,12 +15177,12 @@
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for tgetent in -ltermcap""... $ac_c"
1>&6
-echo "configure:15254: checking for tgetent in -ltermcap" >&5
+echo "configure:15181: checking for tgetent in -ltermcap" >&5
ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
xe_check_libs=" -ltermcap "
cat > conftest.$ac_ext <<EOF
-#line 15259 "configure"
+#line 15186 "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
@@ -15266,7 +15193,7 @@
tgetent()
; return 0; }
EOF
-if { (eval echo configure:15270: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15197: \"$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
@@ -15315,15 +15242,15 @@
if test "$with_gpm" != "no"; then
ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
-echo "configure:15319: checking for gpm.h" >&5
+echo "configure:15246: checking for gpm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15322 "configure"
+#line 15249 "configure"
#include "confdefs.h"
#include <gpm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15327: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15254: \"$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*
@@ -15341,12 +15268,12 @@
echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
-echo "configure:15345: checking for Gpm_Open in -lgpm" >&5
+echo "configure:15272: checking for Gpm_Open in -lgpm" >&5
ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgpm "
cat > conftest.$ac_ext <<EOF
-#line 15350 "configure"
+#line 15277 "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
@@ -15357,7 +15284,7 @@
Gpm_Open()
; return 0; }
EOF
-if { (eval echo configure:15361: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15288: \"$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
@@ -15409,20 +15336,20 @@
test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
!= "no no no" && echo "checking for database support"
1>&6
-echo "configure:15413: checking for database support" >&5
+echo "configure:15340: checking for database support" >&5
if test "$with_database_gdbm $with_database_dbm" != "no no"; then
ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
-echo "configure:15418: checking for ndbm.h" >&5
+echo "configure:15345: checking for ndbm.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15421 "configure"
+#line 15348 "configure"
#include "confdefs.h"
#include <ndbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15426: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15353: \"$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*
@@ -15452,12 +15379,12 @@
if test "$with_database_gdbm" != "no"; then
echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c"
1>&6
-echo "configure:15456: checking for dbm_open in -lgdbm" >&5
+echo "configure:15383: checking for dbm_open in -lgdbm" >&5
ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgdbm "
cat > conftest.$ac_ext <<EOF
-#line 15461 "configure"
+#line 15388 "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
@@ -15468,7 +15395,7 @@
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:15472: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15399: \"$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
@@ -15496,10 +15423,10 @@
if test "$with_database_dbm" != "no"; then
echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
-echo "configure:15500: checking for dbm_open" >&5
+echo "configure:15427: checking for dbm_open" >&5
cat > conftest.$ac_ext <<EOF
-#line 15503 "configure"
+#line 15430 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dbm_open(); below. */
@@ -15522,7 +15449,7 @@
; return 0; }
EOF
-if { (eval echo configure:15526: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15453: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_dbm_open=yes"
else
@@ -15541,12 +15468,12 @@
echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
-echo "configure:15545: checking for dbm_open in -ldbm" >&5
+echo "configure:15472: checking for dbm_open in -ldbm" >&5
ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldbm "
cat > conftest.$ac_ext <<EOF
-#line 15550 "configure"
+#line 15477 "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
@@ -15557,7 +15484,7 @@
dbm_open()
; return 0; }
EOF
-if { (eval echo configure:15561: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15488: \"$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
@@ -15598,10 +15525,10 @@
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
-echo "configure:15602: checking for Berkeley db.h" >&5
+echo "configure:15529: checking for Berkeley db.h" >&5
for header in "db/db.h" "db.h"; do
cat > conftest.$ac_ext <<EOF
-#line 15605 "configure"
+#line 15532 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -15623,7 +15550,7 @@
; return 0; }
EOF
-if { (eval echo configure:15627: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
+if { (eval echo configure:15554: \"$ac_compile\") 1>&5; (eval
$ac_compile) 2>&5; }; then
rm -rf conftest*
db_h_file="$header"; break
else
@@ -15639,9 +15566,9 @@
if test "$with_database_berkdb" != "no"; then
echo $ac_n "checking for Berkeley DB version""... $ac_c"
1>&6
-echo "configure:15643: checking for Berkeley DB version" >&5
+echo "configure:15570: checking for Berkeley DB version" >&5
cat > conftest.$ac_ext <<EOF
-#line 15645 "configure"
+#line 15572 "configure"
#include "confdefs.h"
#include <$db_h_file>
#if DB_VERSION_MAJOR > 1
@@ -15653,7 +15580,7 @@
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 15657 "configure"
+#line 15584 "configure"
#include "confdefs.h"
#include <$db_h_file>
#if DB_VERSION_MAJOR > 2
@@ -15665,7 +15592,7 @@
egrep "yes" >/dev/null 2>&1; then
rm -rf conftest*
cat > conftest.$ac_ext <<EOF
-#line 15669 "configure"
+#line 15596 "configure"
#include "confdefs.h"
#include <$db_h_file>
#if DB_VERSION_MAJOR > 3
@@ -15699,10 +15626,10 @@
rm -f conftest*
echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
-echo "configure:15703: checking for $dbfunc" >&5
+echo "configure:15630: checking for $dbfunc" >&5
cat > conftest.$ac_ext <<EOF
-#line 15706 "configure"
+#line 15633 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $dbfunc(); below. */
@@ -15725,7 +15652,7 @@
; return 0; }
EOF
-if { (eval echo configure:15729: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15656: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$dbfunc=yes"
else
@@ -15744,12 +15671,12 @@
echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:15748: checking for $dbfunc in -ldb" >&5
+echo "configure:15675: checking for $dbfunc in -ldb" >&5
ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldb "
cat > conftest.$ac_ext <<EOF
-#line 15753 "configure"
+#line 15680 "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
@@ -15760,7 +15687,7 @@
$dbfunc()
; return 0; }
EOF
-if { (eval echo configure:15764: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15691: \"$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
@@ -15794,12 +15721,12 @@
echo "configure: warning: "db_create is really $dbfunc""
1>&2
echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
-echo "configure:15798: checking for $dbfunc in -ldb" >&5
+echo "configure:15725: checking for $dbfunc in -ldb" >&5
ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
xe_check_libs=" -ldb "
cat > conftest.$ac_ext <<EOF
-#line 15803 "configure"
+#line 15730 "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
@@ -15810,7 +15737,7 @@
$dbfunc()
; return 0; }
EOF
-if { (eval echo configure:15814: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15741: \"$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
@@ -15869,12 +15796,12 @@
if test "$with_socks" = "yes"; then
echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c"
1>&6
-echo "configure:15873: checking for SOCKSinit in -lsocks" >&5
+echo "configure:15800: checking for SOCKSinit in -lsocks" >&5
ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
xe_check_libs=" -lsocks "
cat > conftest.$ac_ext <<EOF
-#line 15878 "configure"
+#line 15805 "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
@@ -15885,7 +15812,7 @@
SOCKSinit()
; return 0; }
EOF
-if { (eval echo configure:15889: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15816: \"$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
@@ -15941,15 +15868,15 @@
if test "$use_number_lib" = "gmp"; then
ac_safe=`echo "gmp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gmp.h""... $ac_c" 1>&6
-echo "configure:15945: checking for gmp.h" >&5
+echo "configure:15872: checking for gmp.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 15948 "configure"
+#line 15875 "configure"
#include "confdefs.h"
#include <gmp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:15953: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15880: \"$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*
@@ -15967,12 +15894,12 @@
echo $ac_n "checking for __gmpz_init in -lgmp""... $ac_c"
1>&6
-echo "configure:15971: checking for __gmpz_init in -lgmp" >&5
+echo "configure:15898: checking for __gmpz_init in -lgmp" >&5
ac_lib_var=`echo gmp'_'__gmpz_init | sed 'y%./+-%__p_%'`
xe_check_libs=" -lgmp "
cat > conftest.$ac_ext <<EOF
-#line 15976 "configure"
+#line 15903 "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
@@ -15983,7 +15910,7 @@
__gmpz_init()
; return 0; }
EOF
-if { (eval echo configure:15987: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:15914: \"$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
@@ -16032,15 +15959,15 @@
for library in "" "-lcrypto"; do
ac_safe=`echo "mp.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for mp.h""... $ac_c" 1>&6
-echo "configure:16036: checking for mp.h" >&5
+echo "configure:15963: checking for mp.h" >&5
cat > conftest.$ac_ext <<EOF
-#line 16039 "configure"
+#line 15966 "configure"
#include "confdefs.h"
#include <mp.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:16044: \"$ac_try\") 1>&5; (eval $ac_try)
2>&5; }
+{ (eval echo configure:15971: \"$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*
@@ -16060,12 +15987,12 @@
xe_msg_checking="for mp_mfree in -lmp"
test -n "$library" && xe_msg_checking="$xe_msg_checking using
extra libs $library"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:16064: checking "$xe_msg_checking"" >&5
+echo "configure:15991: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo mp'_'mp_mfree | sed 'y%./+-%__p_%'`
xe_check_libs=" -lmp $library"
cat > conftest.$ac_ext <<EOF
-#line 16069 "configure"
+#line 15996 "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
@@ -16076,7 +16003,7 @@
mp_mfree()
; return 0; }
EOF
-if { (eval echo configure:16080: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16007: \"$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
@@ -16097,12 +16024,12 @@
xe_msg_checking="for mfree in -lmp"
test -n "$library" && xe_msg_checking="$xe_msg_checking using
extra libs $library"
echo $ac_n "checking "$xe_msg_checking"""... $ac_c"
1>&6
-echo "configure:16101: checking "$xe_msg_checking"" >&5
+echo "configure:16028: checking "$xe_msg_checking"" >&5
ac_lib_var=`echo mp'_'mfree | sed 'y%./+-%__p_%'`
xe_check_libs=" -lmp $library"
cat > conftest.$ac_ext <<EOF
-#line 16106 "configure"
+#line 16033 "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
@@ -16113,7 +16040,7 @@
mfree()
; return 0; }
EOF
-if { (eval echo configure:16117: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16044: \"$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
@@ -16155,10 +16082,10 @@
LIBS="$LIBS $library" && if test "$extra_verbose" =
"yes"; then echo " Appending \"$library\" to \$LIBS"; fi
fi
echo $ac_n "checking for mp_move""... $ac_c" 1>&6
-echo "configure:16159: checking for mp_move" >&5
+echo "configure:16086: checking for mp_move" >&5
cat > conftest.$ac_ext <<EOF
-#line 16162 "configure"
+#line 16089 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mp_move(); below. */
@@ -16181,7 +16108,7 @@
; return 0; }
EOF
-if { (eval echo configure:16185: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16112: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_mp_move=yes"
else
@@ -16212,10 +16139,10 @@
LIBS="$LIBS $library" && if test "$extra_verbose" =
"yes"; then echo " Appending \"$library\" to \$LIBS"; fi
fi
echo $ac_n "checking for move""... $ac_c" 1>&6
-echo "configure:16216: checking for move" >&5
+echo "configure:16143: checking for move" >&5
cat > conftest.$ac_ext <<EOF
-#line 16219 "configure"
+#line 16146 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char move(); below. */
@@ -16238,7 +16165,7 @@
; return 0; }
EOF
-if { (eval echo configure:16242: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:16169: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_move=yes"
else
@@ -16285,11 +16212,11 @@
fi
cat > conftest.$ac_ext <<EOF
-#line 16289 "configure"
+#line 16216 "configure"
#include "confdefs.h"
int main(int c,char *v[]){return 0;}
EOF
-if { (eval echo configure:16293: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
+if { (eval echo configure:16220: \"$ac_link\") 1>&5; (eval $ac_link)
2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
then
:
else
@@ -16385,7 +16312,7 @@
T=""
-for W in $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS; do if test -z "$T";
then T="$W"; else T="$T $W"; fi; done
+for W in $X_EXTRA_LIBS $libs_mule $libs_win $libs_x $libs_gtk $X_PRE_LIBS; do if test
-z "$T"; then T="$W"; else T="$T $W"; fi; done
ld_libs_window_system="$T"
@@ -16960,10 +16887,25 @@
echo "
Window System:"
if test "$with_msw" = "yes"; then
- echo " Compiling in support for the Microsoft window system."
+ echo " Compiling in support for MS-Windows."
+fi
+
+if test "$with_gtk" = "yes" ; then
+ if test "$with_gnome" = "yes"; then
+ echo " Compiling in support for GNOME."
+ else
+ echo " Compiling in support for GTK w/o GNOME."
+ fi
+fi
+
+if test "$with_tty" = "yes" ; then
+ echo " Compiling in support for TTY's."
+elif test "$have_window_system" = "no" ; then
+ echo " NOTE: No support for any display type. XEmacs can be run in batch mode
only."
fi
+
if test "$with_x11" = "yes"; then
- echo " Compiling in support for the X window system:"
+ echo " Compiling in support for the X Window System:"
echo " - X Windows headers location: $x_includes"
echo " - X Windows libraries location: $x_libraries"
if test "$with_xauth" != yes; then
@@ -16982,23 +16924,18 @@
echo " - Athena library to link: $athena_lib"
fi
case "$with_menubars" in
- gtk ) echo " Using GTK menubars." ;;
lucid ) echo " Using Lucid menubars." ;;
motif ) echo " Using Motif menubars."
echo " *WARNING* The Motif menubar implementation is currently
buggy."
echo " We recommend using the Lucid menubar instead."
echo " Re-run configure with
--with-menubars='lucid'." ;;
- msw ) echo " Using MS-Windows menubars." ;;
-esac
+ esac
case "$with_scrollbars" in
- gtk ) echo " Using GTK scrollbars." ;;
lucid ) echo " Using Lucid scrollbars." ;;
motif ) echo " Using Motif scrollbars." ;;
athena ) echo " Using Athena scrollbars." ;;
- msw ) echo " Using MS-Windows scrollbars." ;;
esac
case "$with_dialogs" in
- gtk ) echo " Using GTK dialog boxes." ;;
motif ) echo " Using Motif dialog boxes."
if test "$unexec" = "unexaix.o"; then if test
"`uname -v`" = 4 -a "`uname -r`" -ge 3; then
echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3
and higher."
@@ -17007,15 +16944,12 @@
echo " Read the PROBLEMS file for more
information."
fi; fi ;;
athena ) echo " Using Athena dialog boxes." ;;
- msw ) echo " Using MS-Windows dialog boxes." ;;
esac
case "$with_widgets" in
- gtk ) echo " Using GTK native widgets." ;;
motif ) echo " Using Motif native widgets." ;;
athena ) echo " Using Athena native widgets." ;;
- msw ) echo " Using MS-Windows native widgets." ;;
esac
-if test "$with_dragndrop" = yes; then
+if test -n "$dragndrop_proto" ; then
echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
echo " - Drag'n'Drop prototype:
$dragndrop_proto."
fi
@@ -17030,7 +16964,7 @@
test "$with_gif" = yes && echo " Compiling in support for GIF
images (builtin)."
if test "$with_xpm" = yes; then
echo " Compiling in support for XPM images."
-elif test "$with_x11" = yes; then
+elif test "$have_window_system" != "no"; then
echo " WARNING:
-----------------------------------------------------------"
echo " WARNING: Compiling without XPM image support."
if test "$xpm_problem" != ""; then
@@ -17043,7 +16977,7 @@
fi
if test "$with_png" = yes; then
echo " Compiling in support for PNG images."
-elif test "$window_system" != "none"; then
+elif test "$have_window_system" != "no"; then
echo " WARNING:
-----------------------------------------------------------"
echo " WARNING: Compiling without PNG image support."
if test "$png_problem" != ""; then
@@ -17253,11 +17187,11 @@
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@YACC@%$YACC%g
s%@SET_MAKE@%$SET_MAKE%g
-s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@X_CFLAGS@%$X_CFLAGS%g
s%@X_PRE_LIBS@%$X_PRE_LIBS%g
s%@X_LIBS@%$X_LIBS%g
s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@GTK_CONFIG@%$GTK_CONFIG%g
s%@install_pp@%$install_pp%g
s%@libs_xauth@%$libs_xauth%g
s%@dnd_objs@%$dnd_objs%g
1.238.2.1 +604 -640 XEmacs/xemacs/configure.in
Index: configure.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.in,v
retrieving revision 1.238
retrieving revision 1.238.2.1
diff -u -r1.238 -r1.238.2.1
--- configure.in 2005/02/03 17:33:53 1.238
+++ configure.in 2005/02/15 01:16:23 1.238.2.1
@@ -6,7 +6,7 @@
#### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software
Foundation, Inc.
#### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
#### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
-#### Copyright (C) 1995, 1996, 2002, 2003, 2004 Ben Wing.
+#### Copyright (C) 1995, 1996, 2002, 2003, 2004, 2005 Ben Wing.
#### Copyright (C) 2000, 2001 Martin Buchholz.
#### Copyright (C) 1998, 1999 J. Kean Johnston.
@@ -208,7 +208,7 @@
dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
1>&AC_FD_CC'
xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system
$c_switch_x_site $X_CFLAGS'
xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system
$ld_switch_x_site $ld_switch_run'
-xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS
$LIBS $libs_machine $libs_system $libs_standard'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_mule $libs_win $libs_x
$libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
ac_cpp='$CPP '"$xe_cppflags"
ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext
1>&AC_FD_CC'
ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags
$xe_ldflags"' conftest.$ac_ext '"$xe_libs"'
1>&AC_FD_CC'
@@ -371,8 +371,12 @@
with_site_lisp='no'
with_site_modules='yes'
need_modules_common=''
+dnl The following five are used (a) to indicate whether or not we want support for
these
+dnl graphical entities, and (b) for X, which toolkit is used.
+dnl #### Can't yet independently control GUI support for different window systems.
with_menubars=''
with_scrollbars=''
+with_toolbars=''
with_widgets=''
with_dialogs=''
cpp='' cppflags='' libs='' ldflags=''
@@ -390,13 +394,14 @@
native_sound_lib=''
dnl These should be set to the empty string when we want gtk / gnome to
dnl be auto-detected instead of manually specified.
-with_gtk='no'
-with_gnome='no'
+dnl with_gtk='no'
+dnl with_gnome='no'
+with_gtk=''
+with_gnome=''
dnl use_assertions should be 'yes' by default. Too many people in this
dnl world have core dumps turned off by default or \"cannot find where the
dnl core file went\". At least we should get some useful output ...
use_assertions="yes"
-with_toolbars=""
with_tty=""
use_union_type="no"
with_dnet=""
@@ -404,8 +409,9 @@
dnl pdump defaults per opsys, do not default it here
pdump=""
dnl dragndrop is still experimental, except on Windows. When it is stable,
-dnl comment out the following line:
-with_dragndrop_default="no"
+dnl change the following.
+with_dragndrop_windows="yes"
+with_dragndrop_nonwindows="no"
dnl Too annoying, even if mandated by IPv6 (and I'm not even sure of that)
dnl Change this to yes when somebody understands IPv6 and handle bugs.
with_ipv6_cname="no"
@@ -701,8 +707,8 @@
flock ) val=flock ;;
file | dot ) val=file ;;
locking ) val=locking ;;
- mmdf ) val=mmdf ;;
- pop ) val=pop ;;
+ mmdf ) val=mmdf ;;
+ pop ) val=pop ;;
* ) USAGE_ERROR(["The \`--$optname' option must have one of these
values:
\`lockf', \`flock', \`file', \`dot', \`locking', \`mmdf', or
\`pop'."]) ;;
esac
@@ -842,12 +848,10 @@
a | at | ath | athe | athen | athena ) val=athena ;;
n | no | non | none ) val=no ;;
y | ye | yes ) val=yes ;;
- dnl Explicit --with-widgets on command line means yes.
+ dnl Explicit --with-widgets etc. on command line means yes.
"") val=yes ;;
- g | gt | gtk ) val=gtk ;;
- ms | msw ) val=msw ;;
* ) USAGE_ERROR(["The \`--$optname' option must have one of these
values:
- \`gtk', \`lucid', \`motif', \`athena', \`yes', or
\`no'."]) ;;
+ \`lucid', \`motif', \`athena', \`yes', or \`no'."]) ;;
esac
eval "$opt=\"$val\""
;;
@@ -2922,144 +2926,22 @@
dnl Choose a window system
dnl ----------------------
-AC_CHECKING("for specified window system")
-
-dnl Autodetection of Gdk libraries and includes
-dnl -------------------------------------------
-dnl On some systems (FreeBSD springs to mind), they use
-dnl versions on the utility routines, so instead of gtk-config
-dnl you must use gtk12-config, etc, etc.
-
-GNOME_CONFIG=no
-GTK_CONFIG=no
-
-if test "$with_gnome" != "no"; then
- AC_MSG_CHECKING(for GNOME configuration script)
- for possible in gnome-config
- do
- possible_version=`${possible} --version 2> /dev/null`
- if test "x${possible_version}" != "x"; then
- GNOME_CONFIG="${possible}"
- with_gnome=yes
- with_gtk=yes
- break
- fi
- done
- AC_MSG_RESULT([${GNOME_CONFIG}])
+if test -n "$with_dragndrop" ; then
+ with_dragndrop_windows="$with_dragndrop"
+ with_dragndrop_nonwindows="$with_dragndrop"
fi
-
-if test "${GNOME_CONFIG}" != "no"; then
- GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
- GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
- AC_DEFINE(HAVE_GNOME)
- XE_APPEND(${GNOME_LIBS}, libs_gtk)
- XE_APPEND(${GNOME_CFLAGS}, c_switch_gtk)
-fi
-
-if test "$with_gtk" != "no";then
- AC_MSG_CHECKING(for GTK configuration script)
- for possible in gtk12-config gtk14-config gtk-config
- do
- possible_version=`${possible} --version 2> /dev/null`
- if test "x${possible_version}" != "x"; then
- GTK_CONFIG="${possible}"
- case "${possible_version}" in
- 1.0.*) AC_MSG_WARN([GTK 1.2 is required, please upgrade your version of
GTK.]); with_gtk=no;;
- 1.3.*) AC_MSG_WARN([GTK 1.3 is not supported right now]); with_gtk=no;;
- 1.2.*)
- with_gtk=yes
- break
- ;;
- *) AC_MSG_WARN([Found unsupported version of GTK: $possible_version]);;
- esac
- fi
- done
- AC_MSG_RESULT([${GTK_CONFIG}])
-fi
-
-if test "${GTK_CONFIG}" != "no"; then
- AC_MSG_CHECKING(gtk version)
- GTK_VERSION=`${GTK_CONFIG} --version`
- AC_MSG_RESULT(${GTK_VERSION})
-
- AC_MSG_CHECKING(gtk libs)
- GTK_LIBS=`${GTK_CONFIG} --libs`
- XE_APPEND(${GTK_LIBS}, libs_gtk)
- AC_MSG_RESULT(${GTK_LIBS})
-
- AC_MSG_CHECKING(gtk cflags)
- GTK_CFLAGS=`${GTK_CONFIG} --cflags`
- if test "$GCC" = "yes"; then
- GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
- fi
- XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
- AC_MSG_RESULT(${GTK_CFLAGS})
-
- AC_CHECK_LIB(gdk_imlib, main, XE_PREPEND(-lgdk_imlib, libs_gtk))
- AC_CHECK_LIB(Imlib, Imlib_init, XE_APPEND(-lImlib, libs_gtk))
- AC_CHECK_FUNCS(gdk_imlib_init)
-
- AC_DEFINE(HAVE_XPM)
- AC_DEFINE(HAVE_GTK)
- AC_SUBST(GTK_CONFIG)
-
- window_system=gtk
- with_gtk=yes
- if test "$with_x11" != "no"; then
- AC_MSG_WARN([Configuring GTK, forcing with_x11 to no])
- with_x11=no
- fi
-
- for feature in scrollbars toolbars menubars dialogs widgets
- do
- eval "feature_value=\${with_${feature}}"
- case "${feature_value}" in
- yes|no|gtk|"" )
- ;;
- * )
- feature_conflict_with_gtk=yes
- AC_MSG_WARN([--with-${feature}=${feature_value} is incompatible with --with-gtk])
;;
- esac
- done
- if test "${feature_conflict_with_gtk}" = "yes"; then
- XE_DIE(["One or more GUI toolkit features conflict with GTK"])
- fi
- test "${with_scrollbars}" != "no" &&
with_scrollbars=gtk
- test "${with_toolbars}" != "no" && with_toolbars=gtk
- test "${with_menubars}" != "no" && with_menubars=gtk
- test "${with_dialogs}" != "no" && with_dialogs=gtk
- test "${with_widgets}" != "no" && with_widgets=gtk
-
- dnl Check for libglade support (it rocks)
- OLD_CFLAGS="${CFLAGS}"
- OLD_CPPFLAGS="${CPPFLAGS}"
- OLD_LDFLAGS="${LDFLAGS}"
- CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
- CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
- LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
- AC_CHECK_HEADERS(glade/glade.h glade.h)
- AC_CHECK_LIB(xml, main, XE_PREPEND(-lxml, libs_gtk))
- AC_CHECK_LIB(glade, main, XE_PREPEND(-lglade, libs_gtk))
- AC_CHECK_LIB(glade-gnome, main, XE_PREPEND(-lglade-gnome, libs_gtk))
- AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
- [AC_MSG_RESULT(yes)
- AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
- [AC_MSG_RESULT(no)])
- CFLAGS="${OLD_CFLAGS}"
- CPPFLAGS="${OLD_CPPFLAGS}"
- LDFLAGS="${OLD_LDFLAGS}"
-fi
+AC_CHECKING("for window-system support")
-dnl We may eventually prefer gtk/gdk over vanilla X11...
+dnl Autodetection of X11
+dnl --------------------
if test "$with_x11" != "no"; then
dnl User-specified --x-includes or --x-libraries implies --with-x11.
test "$x_includes $x_libraries" != "NONE NONE" && \
- window_system=x11 with_x11=yes
+ with_x11=yes
dnl Autodetection of X11 libraries and includes
- dnl -------------------------------------------
dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
dnl it often gets it wrong, so we only use it as a last resort.
@@ -3092,17 +2974,11 @@
AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
if test "$no_x" = "yes"
- then with_x11=no window_system=none HAVE_X_WINDOWS=no
- else with_x11=yes window_system=x11 HAVE_X_WINDOWS=yes
+ then with_x11=no
+ else with_x11=yes
fi
fi
-dnl #### wmperry:: !x11 != NONE
-dnl case "$with_x11" in
-dnl yes ) window_system=x11 HAVE_X_WINDOWS=yes ;;
-dnl no ) window_system=none HAVE_X_WINDOWS=no ;;
-dnl esac
-
if test "$with_x11" = "yes"; then
AC_DEFINE(HAVE_X_WINDOWS)
XE_APPEND(lwlib, MAKE_SUBDIR)
@@ -3285,6 +3161,31 @@
dnl #### Someone, please add a better function than main
AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
+ dnl autodetect -lXmu
+
+ dnl autodetect -lXm (Motif) -- but only add to libs_x later (if necessary)
+ AC_CHECK_HEADER(Xm/Xm.h,
+ [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
+ have_motif=no)
+
+ dnl Further Motif-specific checks
+ if test "$have_motif" = "yes"; then
+ dnl autodetect lesstif
+ AC_MSG_CHECKING(for Lesstif)
+ AC_EGREP_CPP(yes,
+[#include <Xm/Xm.h>
+#ifdef LESSTIF_VERSION
+yes
+#endif
+], have_lesstif=yes, have_lesstif=no)
+
+ AC_MSG_RESULT($have_lesstif)
+ AC_MSG_CHECKING(for Xpm built into Xm)
+ AC_CHECK_LIB(Xm, XpmCreatePixmapFromBuffer, have_xpm_in_xm=yes)
+ if test "$have_xpm_in_xm" = "yes" ; then
+ AC_DEFINE(XPM_BUILT_INTO_XM)
+ fi
+
dnl Problem with the MIT distribution of X on AIX
if test "$unexec" = "unexaix.o" -a "$x11_release" =
"6"; then
dnl X11R6 requires thread-safe code on AIX for some reason
@@ -3302,6 +3203,118 @@
fi dnl $with_x11 = yes
+dnl Autodetection of Gdk libraries and includes
+dnl -------------------------------------------
+dnl On some systems (FreeBSD springs to mind), they use
+dnl versions on the utility routines, so instead of gtk-config
+dnl you must use gtk12-config, etc, etc.
+
+GNOME_CONFIG=no
+GTK_CONFIG=no
+
+if test "$with_gnome" != "no"; then
+ AC_MSG_CHECKING(for GNOME configuration script)
+ for possible in gnome-config
+ do
+ { possible_version="`${possible} --version`" ; } 2> /dev/null
+ if test "x${possible_version}" != "x"; then
+ GNOME_CONFIG="${possible}"
+ with_gnome=yes
+ with_gtk=yes
+ break
+ fi
+ done
+ AC_MSG_RESULT([${GNOME_CONFIG}])
+fi
+
+if test "${GNOME_CONFIG}" != "no"; then
+ GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
+ GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
+ AC_DEFINE(HAVE_GNOME)
+ XE_APPEND(${GNOME_LIBS}, libs_gtk)
+ XE_APPEND(${GNOME_CFLAGS}, c_switch_gtk)
+fi
+
+if test "$with_gtk" != "no";then
+ AC_MSG_CHECKING(for GTK configuration script)
+ for possible in gtk12-config gtk14-config gtk-config
+ do
+ { possible_version="`${possible} --version`" ; } 2> /dev/null
+ if test "x${possible_version}" != "x"; then
+ GTK_CONFIG="${possible}"
+ case "${possible_version}" in
+ 1.0.*) AC_MSG_WARN([GTK 1.2 is required, please upgrade your version of GTK.]);
with_gtk=no;;
+ 1.3.*) AC_MSG_WARN([GTK 1.3 is not supported right now]); with_gtk=no;;
+ 1.2.*)
+ with_gtk=yes
+ break
+ ;;
+ *) AC_MSG_WARN([Found unsupported version of GTK: $possible_version]);;
+ esac
+ fi
+ done
+ AC_MSG_RESULT([${GTK_CONFIG}])
+fi
+
+if test "${GTK_CONFIG}" != "no"; then
+ AC_MSG_CHECKING(gtk version)
+ GTK_VERSION=`${GTK_CONFIG} --version`
+ AC_MSG_RESULT(${GTK_VERSION})
+
+ AC_MSG_CHECKING(gtk libs)
+ GTK_LIBS=`${GTK_CONFIG} --libs`
+ XE_APPEND(${GTK_LIBS}, libs_gtk)
+
+ AC_MSG_CHECKING(gtk cflags)
+ GTK_CFLAGS=`${GTK_CONFIG} --cflags`
+ if test "$GCC" = "yes"; then
+ GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
+ fi
+ dnl Add any necessary -I flags for glade
+ if test "${GNOME_CONFIG}" != "no"; then
+ GTK_CFLAGS="`${GNOME_CONFIG} --cflags libglade 2> /dev/null`
${GTK_CFLAGS}"
+ fi
+ XE_APPEND(${GTK_CFLAGS}, c_switch_gtk)
+
+ AC_CHECK_LIB(gdk_imlib, main, XE_PREPEND(-lgdk_imlib, libs_gtk))
+ AC_CHECK_LIB(Imlib, Imlib_init, XE_APPEND(-lImlib, libs_gtk))
+ AC_CHECK_FUNCS(gdk_imlib_init)
+
+ dnl GTK seems to provide XPM automatically. #### Does it automatically
+ dnl link to -lXpm? Doesn't appear to. Are the functions embedded in
+ dnl a particular file?
+ AC_DEFINE(HAVE_XPM)
+ AC_DEFINE(HAVE_GTK)
+ AC_SUBST(GTK_CONFIG)
+
+ with_gtk=yes
+
+ test "$with_dragndrop_nonwindows" = "yes" &&
XE_APPEND(GTK, dragndrop_proto)
+
+ dnl Check for libglade support (it rocks)
+ OLD_CFLAGS="${CFLAGS}"
+ OLD_CPPFLAGS="${CPPFLAGS}"
+ OLD_LDFLAGS="${LDFLAGS}"
+ CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
+ CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
+ LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
+ AC_CHECK_HEADERS(glade/glade.h glade.h)
+ AC_CHECK_LIB(xml, main, XE_PREPEND(-lxml, libs_gtk))
+ AC_CHECK_LIB(glade, main, XE_PREPEND(-lglade, libs_gtk))
+ AC_CHECK_LIB(glade-gnome, main, XE_PREPEND(-lglade-gnome, libs_gtk))
+ AC_MSG_CHECKING(the name of the GladeXML textdomain field)
+ AC_EGREP_HEADER([char \*txtdomain;], [glade/glade-xml.h],
+ [AC_MSG_RESULT(txtdomain)
+ AC_DEFINE(LIBGLADE_XML_TXTDOMAIN,1)],
+ [AC_MSG_RESULT(textdomain)])
+ CFLAGS="${OLD_CFLAGS}"
+ CPPFLAGS="${OLD_CPPFLAGS}"
+ LDFLAGS="${OLD_LDFLAGS}"
+fi
+
+dnl Autodetection of MS Windows
+dnl ---------------------------
+
if test "$with_msw" != "no"; then
AC_CHECKING(for MS-Windows)
AC_CHECK_LIB(gdi32,main,with_msw=yes)
@@ -3317,18 +3330,7 @@
install_pp="$srcdir/lib-src/installexe.sh"
XE_APPEND(-limm32 -lshell32 -lgdi32 -luser32 -lcomdlg32 -lcomctl32 -lole32 -luuid
-lwinspool -lmpr, libs_system)
- if test "$with_dragndrop" != no; then
- XE_APPEND(msw, dragndrop_proto)
- with_dragndrop=yes
- fi
- if test "$window_system" != x11; then
- window_system=msw
- test "$with_scrollbars" != "no" &&
with_scrollbars=msw
- test "$with_menubars" != "no" && with_menubars=msw
- test "$with_toolbars" != "no" && with_toolbars=msw
- test "$with_dialogs" != "no" && with_dialogs=msw
- test "$with_widgets" != "no" && with_widgets=msw
- fi
+ test "$with_dragndrop_windows" = "yes" &&
XE_APPEND(msw, dragndrop_proto)
dnl check for our special version of select
AC_TRY_RUN([#include <fcntl.h>
int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1;
}],
@@ -3338,12 +3340,15 @@
AC_SUBST(install_pp)
-test -z "$with_dragndrop" &&
with_dragndrop="$with_dragndrop_default"
-test -z "$window_system" && window_system="none"
+if test "$with_x11" = "yes" -o "$with_msw" =
"yes" -o "$with_gtk" = "yes" ; then
+ have_window_system=yes
+else
+ have_window_system=no
+fi
dnl Test for features that require a window system - ANY window system
-if test "$window_system" = "none"; then
- for feature in menubars scrollbars toolbars dialogs dragndrop xface
+if test "$have_window_system" = "no"; then
+ for feature in menubars scrollbars toolbars dialogs dragndrop gif jpeg png tiff xpm
xface
do
if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
AC_MSG_WARN([--with-$feature ignored: Not valid without window system
support])
@@ -3354,27 +3359,8 @@
test -z "$with_toolbars" && with_toolbars=yes
fi
-dnl ### Test for features that require mswindows support - currently none
-dnl ### MS-Windows folks: add code here..... (martin)
-if test "$with_msw" != "yes"; then
- for feature in MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
- do
- if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
- AC_MSG_WARN([--with-$feature ignored: Not valid without MS-Windows support])
- fi
- eval "with_${feature}=no"
- done
-else
- :
-fi
-
dnl Test for features that require X11 support
if test "$with_x11" != "yes"; then
- dnl It ought to be reasonable to have no output device at all, and only use
- dnl XEmacs in --batch mode.
- dnl if test "$with_tty" = "no" ; then
- dnl AC_MSG_ERROR([No window system support and no TTY support - Unable to
proceed.])
- dnl fi
for feature in tooltalk cde offix wmcommand xim xmu nas_sound
do
if eval "test -n \"\$with_${feature}\" -a
\"\$with_${feature}\" != no" ; then
@@ -3395,17 +3381,6 @@
dnl FSF 19.29 has some bitmapdir stuff here.
bitmapdir=
-case "$window_system" in
- x11 ) HAVE_X_WINDOWS=yes; echo " Using X11." ;;
- msw ) HAVE_X_WINDOWS=no ; echo " Using MS-Windows." ;;
- gtk )
- HAVE_X_WINDOWS=no
- test "$with_gnome" = "yes" && echo " Using
GNOME."
- test "$with_gnome" = "no" && echo " Using
GTK."
- ;;
- none ) HAVE_X_WINDOWS=no ; echo " Using no window system." ;;
-esac
-
case "$x_libraries" in *X11R4* )
test "$opsys" = "hpux9" &&
opsysfile="s/hpux9-x11r4.h"
test "$opsys" = "hpux9-shr" &&
opsysfile="s/hpux9shxr4.h"
@@ -3420,7 +3395,7 @@
dnl Autodetect Xauth
dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
-test -z "$with_xauth" && test "$window_system" =
"none" && with_xauth=no
+test -z "$with_xauth" && test "$with_x11" !=
"yes" && with_xauth=no
test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h,
,with_xauth=no) }
test -z "$with_xauth" && { AC_CHECK_LIB(Xau,
XauGetAuthByAddr,[:],with_xauth=no) }
test -z "$with_xauth" && with_xauth=yes
@@ -3447,99 +3422,118 @@
AC_SUBST(LIBSTDCPP)
dnl This must come before the detection code for anything that is in a module
-if test "$with_modules" != "no"; then
- AC_CHECKING(for module support)
- case "$opsys" in
- mingw* | cygwin* ) have_dl=yes ;;
- darwin ) have_dl=yes
- AC_DEFINE(HAVE_DYLD)
- ;;
- * )
- dnl Check for the ELFish dlopen()
- AC_CHECK_HEADER(dlfcn.h, [
- AC_MSG_CHECKING([for dlopen in -lc])
- AC_TRY_LINK([#include <dlfcn.h>],dnl
- [dlopen ("", 0);], [ have_dl=yes ], [
- AC_MSG_CHECKING([for dlopen in -ldl])
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -ldl"
- AC_TRY_LINK([#include <dlfcn.h>],dnl
- [dlopen ("", 0);], [ have_dl=yes ], [
- AC_MSG_CHECKING([for dlopen in -lsvld])
- LIBS="$ac_save_LIBS -lsvld"
- AC_TRY_LINK([#include <dlfcn.h>],dnl
- [dlopen ("", 0);], [ have_dl=yes ],
[LIBS="$ac_save_LIBS"])])])])
+AC_CHECKING(for dll support)
+
+dnl (MODULE: Step 1) Check if we can load in a DLL file
+
+case "$opsys" in
+ mingw* | cygwin* ) have_dl=yes ;;
+ darwin ) have_dl=yes
+ AC_DEFINE(HAVE_DYLD)
+ ;;
+ * )
+ dnl Check for the ELFish dlopen()
+ AC_CHECK_HEADER(dlfcn.h, [
+ AC_MSG_CHECKING([for dlopen in -lc])
+ AC_TRY_LINK([#include <dlfcn.h>],dnl
+ [dlopen ("", 0);], [ have_dl=yes ], [
+ AC_MSG_CHECKING([for dlopen in -ldl])
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldl"
+ AC_TRY_LINK([#include <dlfcn.h>],dnl
+ [dlopen ("", 0);], [ have_dl=yes ], [
+ AC_MSG_CHECKING([for dlopen in -lsvld])
+ LIBS="$ac_save_LIBS -lsvld"
+ AC_TRY_LINK([#include <dlfcn.h>],dnl
+ [dlopen ("", 0);], [ have_dl=yes ],
[LIBS="$ac_save_LIBS"])])])])
+ if test "$have_dl" = "yes"; then
+ AC_DEFINE(HAVE_DLOPEN)
+ else
+ dnl Check for HP/UX shl_load
+ AC_CHECK_HEADER(dl.h, [
+ AC_MSG_CHECKING([for shl_load in -lc])
+ AC_TRY_LINK([#include <dl.h>],dnl
+ [shl_load ("", 0, 0);], [have_dl=yes], [
+ AC_MSG_CHECKING([for shl_load in -ldl])
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -ldld"
+ AC_TRY_LINK([#include <dl.h>],dnl
+ [shl_load ("", 0, 0);], [have_dl=yes],
[LIBS="$ac_save_LIBS"])])])
if test "$have_dl" = "yes"; then
- AC_DEFINE(HAVE_DLOPEN)
+ AC_DEFINE(HAVE_SHL_LOAD)
else
- dnl Check for HP/UX shl_load
- AC_CHECK_HEADER(dl.h, [
- AC_MSG_CHECKING([for shl_load in -lc])
- AC_TRY_LINK([#include <dl.h>],dnl
- [shl_load ("", 0, 0);], [have_dl=yes], [
- AC_MSG_CHECKING([for shl_load in -ldl])
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -ldld"
- AC_TRY_LINK([#include <dl.h>],dnl
- [shl_load ("", 0, 0);], [have_dl=yes],
[LIBS="$ac_save_LIBS"])])])
- if test "$have_dl" = "yes"; then
- AC_DEFINE(HAVE_SHL_LOAD)
- else
- dnl Check for libtool's libltdl
- AC_CHECK_HEADER(ltdl.h, [
- AC_MSG_CHECKING([for lt_dlinit in -lltdl])
- ac_save_LIBS="$LIBS"
- LIBS="$LIBS -lltdl"
- AC_TRY_LINK([#include <ltdl.h>],dnl
- [lt_dlinit ();], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
- if test "$have_dl" = "yes"; then
- AC_DEFINE(HAVE_LTDL)
- fi
- dnl end !HP/UX
- fi
- dnl end !dlopen
+ dnl Check for libtool's libltdl
+ AC_CHECK_HEADER(ltdl.h, [
+ AC_MSG_CHECKING([for lt_dlinit in -lltdl])
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS -lltdl"
+ AC_TRY_LINK([#include <ltdl.h>],dnl
+ [lt_dlinit ();], [have_dl=yes], [LIBS="$ac_save_LIBS"])])
+ if test "$have_dl" = "yes"; then
+ AC_DEFINE(HAVE_LTDL)
+ fi
+ dnl end !HP/UX
fi
- ac_save_LIBS=
- dnl end !darwin
- esac
+ dnl end !dlopen
+ fi
+ ac_save_LIBS=
+dnl end !darwin
+esac
- if test -n "$have_dl"; then
+if test -n "$have_dl"; then
+ dnl (MODULE: Step 1 End) We support reading shared libraries (DLL's).
+ AC_DEFINE(HAVE_SHLIB)
+ test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS)
+ AC_CHECK_FUNCS(dlerror _dlerror)
+
+ dnl (MODULE: Step 2) Check if we have support for creating DLL's.
+ if test "$with_modules" != "no" ; then
dnl XE_SHLIB_STUFF (in aclocal.m4) defines $can_build_shared
XE_SHLIB_STUFF
fi
+fi
+
+dnl The Tricky thing is that even if with-modules=no, some of the shared-
+dnl library stuff is still active. Do all the tests at base level, regardless
+dnl of various settings.
+
+dnl with-modules requires can-build-shared and nothing else. So if it was
+dnl left unspecified, autodetect it from the value of can-build-shared.
+dnl If specified as yes, but we can't support it, bomb out.
+dnl (#### Should we just force it to no?)
- if test "$can_build_shared" = "yes"; then
- AC_DEFINE(HAVE_SHLIB)
- dnl src must be built before modules on MacOSX and Windows platforms, since
- dnl the binary must be available to properly link the modules
- dnl For no-module builds, this is added *after* the module directories
- XE_APPEND(src, MAKE_SUBDIR)
- XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR)
- test -n "$libdl" && XE_PREPEND(-l${libdl}, LIBS)
- AC_CHECK_FUNCS(dlerror _dlerror)
- with_modules=yes
- MOD_CC="../../lib-src/ellcc"
- MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src
-I\$(srcdir)/../../src"
- INSTALLPATH="\$(moduledir)"
- MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
- OBJECT_TO_BUILD="\$(MODNAME).ell"
+if test "$can_build_shared" = "yes"; then
+ test -z "$with_modules" && with_modules=yes
+else
+ if test "$with_modules" = "yes"; then
+ XE_DIE("Required module support cannot be provided.")
else
- if test "$with_modules" = "yes"; then
- XE_DIE("Required module support cannot be provided.")
- else
- echo " No module support."
- fi
- with_modules=no
+ echo " No module support."
fi
+ with_modules=no
fi
-if test "$with_modules" != "yes"; then
+
+if test "$with_modules" = "yes"; then
+ AC_DEFINE(HAVE_MODULES)
+ dnl src must be built before modules on MacOSX and Windows platforms,
+ dnl since the binary must be available to properly link the modules
+ dnl For no-module builds, this is added *after* the module directories
+ XE_APPEND(src, MAKE_SUBDIR)
+ XE_APPEND(src, INSTALL_ARCH_DEP_SUBDIR)
+ MOD_CC="../../lib-src/ellcc"
+ MODCFLAGS="\$(CFLAGS) --mode=compile --mod-output=\$@ -I../../src
-I\$(srcdir)/../../src"
+ INSTALLPATH="\$(moduledir)"
+ MOD_INSTALL_PROGRAM=${INSTALL_PROGRAM}
+ OBJECT_TO_BUILD="\$(MODNAME).ell"
+else
MOD_CC="$XEMACS_CC"
MODCFLAGS="\$(XE_CFLAGS) -I../../src -I\$(srcdir)/../../src"
INSTALLPATH=""
MOD_INSTALL_PROGRAM="true"
OBJECT_TO_BUILD="\$(MODNAME).o"
fi
+
MODARCHDIR=
MAKE_DOCFILE="../../lib-src/make-docfile"
AC_SUBST(with_modules)
@@ -3585,14 +3579,14 @@
fi
dnl Autodetect CDE
-test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, ,
with_cde=no) }
-test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:],
with_cde=no) }
-if test "$with_dragndrop" = "no" ; then
+if test "$with_dragndrop_nonwindows" = "no" ; then
if test "$with_cde" = "yes" ; then
AC_MSG_WARN([--with-cde forced to \`no'; no generic Drag'n'Drop
support])
fi
with_cde=no
fi
+test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h, ,
with_cde=no) }
+test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:],
with_cde=no) }
test -z "$with_cde" && with_cde=yes
if test "$with_cde" = "yes" ; then
AC_DEFINE(HAVE_CDE)
@@ -3602,19 +3596,19 @@
need_motif=yes # CDE requires Motif
fi
-dnl Always compile OffiX unless --without-offix is given, no
+dnl [[ Always compile OffiX unless --without-offix is given, no
dnl X11 support is compiled in, no standard Xmu is available,
-dnl or dragndrop support is disabled
+dnl or dragndrop support is disabled ]]
dnl Because OffiX support currently loses when more than one display
dnl is in use, we now disable it by default -slb 07/10/1998.
-test "$window_system" != "x11" && with_offix=no
-if test "$with_xmu" != yes -a "$with_x11" = yes; then
+test "$with_x11" != "yes" && with_offix=no
+if test "$with_xmu" != "yes" -a "$with_x11" =
"yes"; then
if test "$with_offix" = "yes" ; then
AC_MSG_WARN([--with-offix forced to \`no'; no real Xmu support])
fi
with_offix=no
fi
-if test "$with_dragndrop" = no; then
+if test "$with_dragndrop_nonwindows" = "no" ; then
if test "$with_offix" = "yes" ; then
AC_MSG_WARN([--with-offix forced to \`no'; no generic Drag'n'Drop
support])
fi
@@ -3632,23 +3626,10 @@
XE_APPEND(offix.o, dnd_objs)
XE_APPEND(OffiX, dragndrop_proto)
fi
-if test "$with_gtk" = "yes"; then
- XE_APPEND(GTK, dragndrop_proto)
-fi
-dnl Autodetect Drag'n'Drop support
-dnl always included if CDE, Offix, or MSWindows are defined
-if test "$with_dragndrop" != "no" ; then
- AC_MSG_CHECKING(if drag and drop API is needed)
- if test -n "$dragndrop_proto" ; then
- with_dragndrop=yes
- AC_MSG_RESULT([yes (${dragndrop_proto} )])
- AC_DEFINE(HAVE_DRAGNDROP)
- XE_APPEND(dragdrop.o, extra_objs)
- else
- with_dragndrop=no
- AC_MSG_RESULT(no)
- fi
+if test -n "$dragndrop_proto" ; then
+ AC_DEFINE(HAVE_DRAGNDROP)
+ XE_APPEND(dragdrop.o, extra_objs)
fi
dnl Autodetect LDAP
@@ -3731,102 +3712,22 @@
fi
AC_SUBST(postgresql_libs)
-dnl ----------------------
+dnl ------------------
dnl Graphics libraries
-dnl ----------------------
-
-if test "$window_system" != "none"; then
- AC_CHECKING(for graphics libraries)
-
- dnl add special code to handle xpm-nox on Cygwin (csw)
- dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW
&& !WITH_X
- libpath_xpm=
- incpath_xpm=
- case "$opsys" in
- cygwin*)
- cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_top=`eval "dirname ${cygwin_top}"`;
- cygwin_top="${cygwin_top}/..";
- case "$window_system" in
- dnl use "standard" search pattern
- x11) ;;
- dnl hardcode "standard" non-X11 xpm lib/inc dirs
- msw) libpath_xpm="-L${cygwin_top}/lib/noX"
- incpath_xpm="-I${cygwin_top}/include/noX"
- ;;
- dnl not supported on cygwin (yet?)
- gtk) ;;
- dnl probably not reached...
- none) ;;
- dnl ditto
- *) ;;
- esac
- ;;
- dnl use "standard" search pattern for all other OS's
- *) ;;
- esac
- dnl Autodetect Xpm
- xpm_problem=""
- if test -z "$with_xpm"; then
- XE_PREPEND("$incpath_xpm", CFLAGS)
- XE_PREPEND("$libpath_xpm", LDFLAGS)
- AC_MSG_CHECKING(for Xpm - no older than 3.4f)
- xe_check_libs=-lXpm
- AC_TRY_RUN([#define XPM_NUMBERS
-#include <X11/xpm.h>
- int main(int c, char **v) {
- return c == 1 ? 0 :
- XpmIncludeVersion != XpmLibraryVersion() ? 1 :
- XpmIncludeVersion < 30406 ? 2 : 0 ;}],
- [./conftest dummy_arg; xpm_status=$?;
- if test "$xpm_status" = "0"; then
- with_xpm=yes;
- else
- with_xpm=no;
- if test "$xpm_status" = "1"; then
- xpm_problem="Xpm library version and header file version don't
match!"
- elif test "$xpm_status" = "2"; then
- xpm_problem="Xpm library version is too old!"
- else
- xpm_problem="Internal xpm detection logic error!"
- fi
- echo "
-*** WARNING *** $xpm_problem
- I'm not touching that with a 10-foot pole!
- If you really want to use the installed version of Xpm, rerun
- configure and add '--with-xpm=yes', but don't blame me if XEmacs
crashes!"
- fi],
- [with_xpm=no])
- xe_check_libs=
- AC_MSG_RESULT($with_xpm)
- fi
- if test "$with_xpm" = "yes"; then
- dnl #### This code assumes that if AC_CHECK_LIB fails,
- dnl #### then it will succeed if FOR_MSW is defined,
- dnl #### but doesn't actually verify this assumption.
- AC_DEFINE(HAVE_XPM)
- XE_PREPEND("$libpath_xpm", LDFLAGS)
- XE_PREPEND(-lXpm, libs_x)
- XE_PREPEND("$incpath_xpm", CFLAGS)
- AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
- xe_check_libs=-lXpm
- AC_TRY_LINK(, [XpmCreatePixmapFromData()],
- [xpm_for_msw=no],
- [xpm_for_msw=yes])
- xe_check_libs=
- AC_MSG_RESULT($xpm_for_msw)
- if test "$xpm_for_msw" = "yes"; then
- AC_DEFINE(FOR_MSW)
- fi
- fi
+dnl ------------------
+ dnl XPM moved down below, right next to code to link with Motif if
+ dnl necessary, and after all stuff that sets `need_motif'. Motif may
+ dnl contain XPM, so we need to know whether we're linking with Motif
+ dnl before specifying whether we link with XPM.
+
dnl Autodetect XFACE
test -z "$with_xface" && { AC_CHECK_HEADER(compface.h,
,with_xface=no) }
test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:]
,with_xface=no) }
test -z "$with_xface" && with_xface=yes
if test "$with_xface" = "yes"; then
AC_DEFINE(HAVE_XFACE)
- XE_PREPEND(-lcompface, libs_x)
+ XE_PREPEND(-lcompface, libs_win)
fi
dnl For a brief period we had the GIF code split out into a separate library,
@@ -3841,8 +3742,8 @@
dnl So we always search for libz compression support.
if test "$with_png $with_tiff" != "no no"; then
AC_CHECK_LIB(c, inflate, [:], [
- AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_x)],[
- AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
+ AC_CHECK_LIB(z, inflate, [XE_PREPEND(-lz, libs_win)],[
+ AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_win)])])])
fi
dnl autodetect JPEG
@@ -3851,7 +3752,7 @@
test -z "$with_jpeg" && with_jpeg=yes
if test "$with_jpeg" = "yes"; then
AC_DEFINE(HAVE_JPEG)
- XE_PREPEND(-ljpeg, libs_x)
+ XE_PREPEND(-ljpeg, libs_win)
fi
dnl autodetect PNG
@@ -3889,7 +3790,7 @@
fi
if test "$with_png" = "yes"; then
AC_DEFINE(HAVE_PNG)
- XE_PREPEND(-lpng, libs_x)
+ XE_PREPEND(-lpng, libs_win)
fi
dnl autodetect TIFF
@@ -3898,275 +3799,250 @@
test -z "$with_tiff" && with_tiff=yes
if test "$with_tiff" = "yes"; then
AC_DEFINE(HAVE_TIFF)
- XE_PREPEND(-ltiff, libs_x)
+ XE_PREPEND(-ltiff, libs_win)
fi
fi
-dnl ----------------------
-dnl GTK-Specific Graphics libraries
-dnl ----------------------
-
-if test "$with_gtk" = "yes"; then
- dnl Autodetect XFACE
- test -z "$with_xface" && { AC_CHECK_HEADER(compface.h,
,with_xface=no) }
- test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:]
,with_xface=no) }
- test -z "$with_xface" && with_xface=yes
- if test "$with_xface" = "yes"; then
- AC_DEFINE(HAVE_XFACE)
- XE_PREPEND(-lcompface, libs_gtk)
- fi
-fi
-
-
-dnl ----------------------
+dnl -----------------------------
dnl X-Specific Graphics libraries
-dnl ----------------------
+dnl -----------------------------
if test "$with_x11" = "yes"; then
AC_CHECKING(for X11 graphics libraries)
-fi
-
-dnl We don't automatically trigger widgets if athena is present
-dnl because of stability concerns.
-dnl But if the user wants widgets, still offer him autodetections
-case "$with_widgets" in
- "yes" | "athena") detect_athena=yes ;;
- *) detect_athena=no ;;
-esac
-
-if test "$with_x11" = "yes" -a "$detect_athena" =
"yes" ; then
- AC_CHECKING(for the Athena widgets)
- dnl What in heck did the user actually want?
- case "$with_athena" in
- dnl This is the default, old fashioned flat Athena.
- "xaw" | "") athena_variant=Xaw athena_3d=no ;;
- "3d") athena_variant=Xaw3d athena_3d=yes ;;
- "next") athena_variant=neXtaw athena_3d=yes ;;
- "95") athena_variant=Xaw95 athena_3d=yes ;;
- "xpm") athena_variant=XawXpm athena_3d=yes ;;
- *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not
happen.") ;;
+ dnl We don't automatically trigger widgets if athena is present
+ dnl because of stability concerns.
+ dnl But if the user wants widgets, still offer him autodetections
+ case "$with_widgets" in
+ "yes" | "athena") detect_athena=yes ;;
+ *)
+ case "$with_dialogs" in
+ "yes" | "athena") detect_athena=yes ;;
+ *) detect_athena=no ;;
+ esac
+ ;;
esac
- dnl Search for the Athena library...
- if test "$athena_3d" = "no"; then
- AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
- [
- dnl Must not be a 3d library...
- AC_CHECK_LIB($athena_variant, threeDClassRec,
- AC_MSG_WARN([Could not find a non-3d Athena widget library.]),
- athena_lib=$athena_variant)
- ],
- AC_MSG_WARN([Could not find an Athena widget library.]))
- else
- dnl The real configuration, need 3d library
- AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
- dnl OK, couldn't find it with a proper name, try the standard Athena lib
- dnl If that is 3d, presume the user asked for what they have installed.
- AC_CHECK_LIB(Xaw, threeDClassRec,
+ if test "$detect_athena" = "yes" ; then
+ AC_CHECKING(for the Athena widgets)
+
+ dnl What in heck did the user actually want?
+ case "$with_athena" in
+ dnl This is the default, old fashioned flat Athena.
+ "xaw" | "") athena_variant=Xaw athena_3d=no ;;
+ "3d") athena_variant=Xaw3d athena_3d=yes ;;
+ "next") athena_variant=neXtaw athena_3d=yes ;;
+ "95") athena_variant=Xaw95 athena_3d=yes ;;
+ "xpm") athena_variant=XawXpm athena_3d=yes ;;
+ *) XE_DIE("Unknown Athena widget set \`$with_athena'. This should not
happen.") ;;
+ esac
+
+ dnl Search for the Athena library...
+ if test "$athena_3d" = "no"; then
+ AC_CHECK_LIB($athena_variant, XawScrollbarSetThumb,
[
- athena_lib=Xaw;
- AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
+ dnl Must not be a 3d library...
+ AC_CHECK_LIB($athena_variant, threeDClassRec,
+ AC_MSG_WARN([Could not find a non-3d Athena widget library.]),
+ athena_lib=$athena_variant)
],
- AC_MSG_WARN([Could not find a 3d Athena widget library that looked like
$athena_variant.])))
- fi
-
- dnl Now we locate the Athena headers that we need.
- if test "$athena_3d" = "no"; then
- AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
- AC_MSG_WARN([Could not find a non-3d Athena header set.]),
- AC_CHECK_HEADER(X11/Xaw/XawInit.h,
- athena_h_path=X11/Xaw,
- AC_MSG_WARN([Could not find a non-3d Athena header set.])))
- else
- dnl The three-d Athena headers are so much more slippery.
- dnl Curse this `Lets replace standard libraries' thing that they did. :/
- AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
- AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
- athena_h_path=X11/$athena_variant,))
-
- dnl Is the variant specific header directory directly under include?
- if test -z "$athena_h_path"; then
- AC_CHECK_HEADER($athena_variant/XawInit.h,
- AC_CHECK_HEADER($athena_variant/ThreeD.h,
- athena_h_path=$athena_variant,))
- fi
-
- dnl If we couldn't find the specific variant, try the generic Athena 3d
headers
- if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
- AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
- AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
+ AC_MSG_WARN([Could not find an Athena widget library.]))
+ else
+ dnl The real configuration, need 3d library
+ AC_CHECK_LIB($athena_variant, threeDClassRec, athena_lib=$athena_variant,
+ dnl OK, couldn't find it with a proper name, try the standard Athena lib
+ dnl If that is 3d, presume the user asked for what they have installed.
+ AC_CHECK_LIB(Xaw, threeDClassRec,
[
- AC_MSG_WARN([Assuming that X11/Xaw3d headers are suitable for
$athena_variant.])
- athena_h_path=X11/Xaw3d
- ],))
+ athena_lib=Xaw;
+ AC_MSG_WARN([Assuming that libXaw is actually $athena_variant.]);
+ ],
+ AC_MSG_WARN([Could not find a 3d Athena widget library that looked like
$athena_variant.])))
fi
-
- dnl Also generic 3d headers directly under include dir
- if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
- AC_CHECK_HEADER(Xaw3d/XawInit.h,
- AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+
+ dnl Now we locate the Athena headers that we need.
+ if test "$athena_3d" = "no"; then
+ AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
+ AC_MSG_WARN([Could not find a non-3d Athena header set.]),
+ AC_CHECK_HEADER(X11/Xaw/XawInit.h,
+ athena_h_path=X11/Xaw,
+ AC_MSG_WARN([Could not find a non-3d Athena header set.])))
+ else
+ dnl The three-d Athena headers are so much more slippery.
+ dnl Curse this `Lets replace standard libraries' thing that they did. :/
+ AC_CHECK_HEADER(X11/$athena_variant/XawInit.h,
+ AC_CHECK_HEADER(X11/$athena_variant/ThreeD.h,
+ athena_h_path=X11/$athena_variant,))
+
+ dnl Is the variant specific header directory directly under include?
+ if test -z "$athena_h_path"; then
+ AC_CHECK_HEADER($athena_variant/XawInit.h,
+ AC_CHECK_HEADER($athena_variant/ThreeD.h,
+ athena_h_path=$athena_variant,))
+ fi
+
+ dnl If we couldn't find the specific variant, try the generic Athena 3d
headers
+ if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
+ AC_CHECK_HEADER(X11/Xaw3d/XawInit.h,
+ AC_CHECK_HEADER(X11/Xaw3d/ThreeD.h,
+ [
+ AC_MSG_WARN([Assuming that X11/Xaw3d headers are suitable for
$athena_variant.])
+ athena_h_path=X11/Xaw3d
+ ],))
+ fi
+
+ dnl Also generic 3d headers directly under include dir
+ if test -z "$athena_h_path" -a "$athena_variant" !=
"Xaw3d"; then
+ AC_CHECK_HEADER(Xaw3d/XawInit.h,
+ AC_CHECK_HEADER(Xaw3d/ThreeD.h,
+ [
+ AC_MSG_WARN([Assuming that Xaw3d headers are suitable for
$athena_variant.])
+ athena_h_path=Xaw3d
+ ],))
+ fi
+
+ dnl If nothing yet found, see if Xaw is a 3d header set...
+ dnl We AC_MSG_WARN if we fail because I am all out of ideas...
+ if test -z "$athena_h_path"; then
+ AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
[
- AC_MSG_WARN([Assuming that Xaw3d headers are suitable for
$athena_variant.])
- athena_h_path=Xaw3d
- ],))
+ AC_MSG_WARN([Assuming that X11/Xaw headers are suitable for
$athena_variant.])
+ athena_h_path=X11/Xaw
+ ],
+ AC_MSG_WARN([Could not find a suitable 3d Athena header set.]))
+ fi
fi
-
- dnl If nothing yet found, see if Xaw is a 3d header set...
- dnl We AC_MSG_WARN if we fail because I am all out of ideas...
- if test -z "$athena_h_path"; then
- AC_CHECK_HEADER(X11/Xaw/ThreeD.h,
- [
- AC_MSG_WARN([Assuming that X11/Xaw headers are suitable for
$athena_variant.])
- athena_h_path=X11/Xaw
- ],
- AC_MSG_WARN([Could not find a suitable 3d Athena header set.]))
+
+ dnl Do we actually have a usable Athena widget set? Please?
+ if test -n "$athena_lib" -a -n "$athena_h_path"; then
+ have_xaw=yes
+ else
+ have_xaw=no
fi
- fi
-
- dnl Do we actually have a usable Athena widget set? Please?
- if test -n "$athena_lib" -a -n "$athena_h_path"; then
- have_xaw=yes
+
else
have_xaw=no
- fi
+ fi dnl "detect_athena" = "yes"
-else
- have_xaw=no
-fi dnl "$with_x11" = "yes" -a "detect_athena" =
"yes"
+ dnl Finish ensuring that we have values for the various toolkit items.
+ dnl Not all toolkits support all widgets.
-if test "$with_x11" = "yes"; then
- dnl autodetect Motif - but only add to libs_x later (if necessary)
- AC_CHECK_HEADER(Xm/Xm.h,
- [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
- have_motif=no)
+ case "$with_menubars" in "" | "yes" |
"athena" )
+ with_menubars="lucid" ;;
+ esac
+ case "$with_scrollbars" in "" | "yes" )
+ with_scrollbars="lucid" ;;
+ esac
+ dnl No Lucid dialogs or widgets. If X is our only window system, and we can't
handle
+ dnl Motif or Athena, then we have no support at all for these.
+ case "$with_dialogs" in "" | "yes" | "lucid"
)
+ if test "$have_motif" = "yes"; then
with_dialogs="motif"
+ elif test "$have_xaw" = "yes"; then
with_dialogs="athena"
+ elif test "$with_msw" != "yes" -a "$with_gtk" !=
"yes"; then with_dialogs="no"
+ fi ;;
+ esac
+ case "$with_widgets" in "" | "yes" |
"lucid")
+ if test "$have_motif" = "yes"; then
with_widgets="motif"
+ elif test "$have_xaw" = "yes"; then
with_widgets="athena"
+ elif test "$with_msw" != "yes" -a "$with_gtk" !=
"yes"; then with_widgets="no"
+ fi ;;
+ esac
- if test "$have_motif" = "yes"; then
- dnl autodetect lesstif
- AC_MSG_CHECKING(for Lesstif)
- AC_EGREP_CPP(yes,
-[#include <Xm/Xm.h>
-#ifdef LESSTIF_VERSION
-yes
-#endif
-], have_lesstif=yes, have_lesstif=no)
- AC_MSG_RESULT($have_lesstif)
+ all_gui="$with_menubars $with_scrollbars $with_dialogs $with_toolbars
$with_widgets"
+
+ case "$all_gui" in
+ *athena* )
+ if test "$have_xaw" != "yes"; then
+ XE_DIE("Could not find a suitable Athena library to build with.")
+ fi
+
+ dnl Add the Lucid widget Athena code
+ XE_APPEND(lwlib-Xaw.o, lwlib_objs)
+
+ dnl Add the Athena widget library we located earlier
+ XE_PREPEND(-l$athena_lib, libs_x)
+
+ dnl Tell lwlib where to find the Athena header files.
+ dnl Many people have tried to create a `smart' way of doing this,
+ dnl but all have failed. Before changing the following ugly definitions,
+ dnl consult the veterans of many a battle.
+ AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h")
+ AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h")
+ AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h")
+ AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h")
+ AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h")
+ AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h")
+ AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h")
+ AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h")
+ AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h")
+ AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
+
+ AC_DEFINE(LWLIB_USES_ATHENA)
+ AC_DEFINE(NEED_ATHENA)
+ need_athena="yes"
+
+ if test "$athena_3d" = "yes"; then
+ AC_DEFINE(HAVE_ATHENA_3D)
+ fi
+ ;;
+ esac
+
+ case "$all_gui" in *motif* )
+ AC_DEFINE(LWLIB_USES_MOTIF)
+ AC_DEFINE(NEED_MOTIF)
+ XE_APPEND(lwlib-Xm.o, lwlib_objs)
+ need_motif=yes ;;
+ esac
+
+ test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o,
lwlib_objs)
+ test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o,
lwlib_objs)
+ test "$with_scrollbars" = "lucid" &&
XE_APPEND(xlwscrollbar.o, lwlib_objs)
+ test "$with_widgets" = "motif" -o "$with_widgets" =
"athena" && \
+ XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs)
+ test "$with_widgets" = "athena" && \
+ XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs)
+ case "$all_gui" in *lucid* )
+ AC_DEFINE(NEED_LUCID)
+ XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
+ esac
+
+ test "$with_scrollbars" = "athena" &&
AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
+ test "$with_dialogs" = "athena" &&
AC_DEFINE(LWLIB_DIALOGS_ATHENA)
+
+ if test "$athena_3d" = "yes"; then
+ test "$with_scrollbars" = "athena" &&
AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
+ test "$with_dialogs" = "athena" &&
AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
fi
-
+
+ test "$with_widgets" = "motif" -o "$with_widgets" =
"athena" && \
+ AC_DEFINE(LWLIB_TABS_LUCID)
+ test "$with_widgets" = "athena" &&
AC_DEFINE(LWLIB_WIDGETS_ATHENA)
+
+ test "$with_menubars" = "lucid" &&
AC_DEFINE(LWLIB_MENUBARS_LUCID)
+ test "$with_scrollbars" = "lucid" &&
AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
+
+ test "$with_menubars" = "motif" &&
AC_DEFINE(LWLIB_MENUBARS_MOTIF)
+ test "$with_scrollbars" = "motif" &&
AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
+ test "$with_dialogs" = "motif" &&
AC_DEFINE(LWLIB_DIALOGS_MOTIF)
+ test "$with_widgets" = "motif" &&
AC_DEFINE(LWLIB_WIDGETS_MOTIF)
fi dnl "$with_x11" = "yes"
-
-dnl Finish ensuring that we have values for the various toolkit items.
-dnl Not all toolkits support all widgets
-dnl if Motif is available we use it for the dialog boxes.
-
-case "$with_menubars" in "" | "yes" | "athena"
)
- with_menubars="lucid" ;;
-esac
-case "$with_dialogs" in "" | "yes" | "lucid" )
- if test "$have_motif" = "yes"; then
with_dialogs="motif"
- elif test "$have_xaw" = "yes"; then
with_dialogs="athena"
- elif test "$with_msw" = "yes"; then
with_dialogs="msw"
- else with_dialogs=no
- fi ;;
-esac
-case "$with_scrollbars" in "" | "yes" )
- with_scrollbars="lucid" ;;
-esac
-case "$with_widgets" in "" | "yes" | "lucid")
- if test "$have_motif" = "yes"; then
with_widgets="motif"
- elif test "$have_xaw" = "yes"; then
with_widgets="athena"
- elif test "$with_msw" = "yes"; then
with_widgets="msw"
- else with_widgets=no
- fi ;;
-esac
-
-all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars
$with_widgets"
-
-case "$all_widgets" in
- *athena* )
- if test "$have_xaw" != "yes"; then
- XE_DIE("Could not find a suitable Athena library to build with.")
- fi
-
- dnl Add the Lucid widget Athena code
- XE_APPEND(lwlib-Xaw.o, lwlib_objs)
-
- dnl Add the Athena widget library we located earlier
- XE_PREPEND(-l$athena_lib, libs_x)
-
- dnl Tell lwlib where to find the Athena header files.
- dnl Many people have tried to create a `smart' way of doing this,
- dnl but all have failed. Before changing the following ugly definitions,
- dnl consult the veterans of many a battle.
- AC_DEFINE_UNQUOTED(ATHENA_Scrollbar_h_,"$athena_h_path/Scrollbar.h")
- AC_DEFINE_UNQUOTED(ATHENA_Dialog_h_,"$athena_h_path/Dialog.h")
- AC_DEFINE_UNQUOTED(ATHENA_Form_h_,"$athena_h_path/Form.h")
- AC_DEFINE_UNQUOTED(ATHENA_Command_h_,"$athena_h_path/Command.h")
- AC_DEFINE_UNQUOTED(ATHENA_Label_h_,"$athena_h_path/Label.h")
- AC_DEFINE_UNQUOTED(ATHENA_LabelP_h_,"$athena_h_path/LabelP.h")
- AC_DEFINE_UNQUOTED(ATHENA_Toggle_h_,"$athena_h_path/Toggle.h")
- AC_DEFINE_UNQUOTED(ATHENA_ToggleP_h_,"$athena_h_path/ToggleP.h")
- AC_DEFINE_UNQUOTED(ATHENA_AsciiText_h_,"$athena_h_path/AsciiText.h")
- AC_DEFINE_UNQUOTED(ATHENA_XawInit_h_,"$athena_h_path/XawInit.h")
-
- AC_DEFINE(LWLIB_USES_ATHENA)
- AC_DEFINE(NEED_ATHENA)
- need_athena="yes"
-
- if test "$athena_3d" = "yes"; then
- AC_DEFINE(HAVE_ATHENA_3D)
- fi
- ;;
-esac
-
-case "$all_widgets" in *motif* )
- AC_DEFINE(LWLIB_USES_MOTIF)
- AC_DEFINE(NEED_MOTIF)
- XE_APPEND(lwlib-Xm.o, lwlib_objs)
- need_motif=yes ;;
-esac
-
-test "$with_menubars" = "lucid" && XE_APPEND(xlwmenu.o,
lwlib_objs)
-test "$with_menubars" = "motif" && XE_APPEND(xlwmenu.o,
lwlib_objs)
-test "$with_scrollbars" = "lucid" &&
XE_APPEND(xlwscrollbar.o, lwlib_objs)
-test "$with_widgets" != "no" && test
"$with_widgets" != "msw" && \
- XE_APPEND(xlwtabs.o xlwgcs.o, lwlib_objs)
-case "$with_widgets" in athena* )
- XE_APPEND(xlwradio.o xlwcheckbox.o xlwgauge.o, lwlib_objs);;
-esac
-case "$all_widgets" in *lucid* )
- AC_DEFINE(NEED_LUCID)
- XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
-esac
-
+
AC_SUBST(lwlib_objs)
-
-test "$with_scrollbars" = "athena" &&
AC_DEFINE(LWLIB_SCROLLBARS_ATHENA)
-test "$with_dialogs" = "athena" &&
AC_DEFINE(LWLIB_DIALOGS_ATHENA)
-
-if test "$athena_3d" = "yes"; then
- test "$with_scrollbars" = "athena" &&
AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
- test "$with_dialogs" = "athena" &&
AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
+
+if test "$have_window_system" = "no" ; then
+ with_menubars=no
+ with_scrollbars=no
+ with_toolbars=no
+ with_widgets=no
+ with_dialogs=no
fi
-case "$with_widgets" in athena* ) AC_DEFINE(LWLIB_WIDGETS_ATHENA);; esac
-test "$with_widgets" != "no" && test
"$with_widgets" != "msw" && \
- AC_DEFINE(LWLIB_TABS_LUCID)
-
test "$with_menubars" != "no" &&
AC_DEFINE(HAVE_MENUBARS)
test "$with_scrollbars" != "no" &&
AC_DEFINE(HAVE_SCROLLBARS)
test "$with_dialogs" != "no" &&
AC_DEFINE(HAVE_DIALOGS)
test "$with_toolbars" != "no" &&
AC_DEFINE(HAVE_TOOLBARS)
test "$with_widgets" != "no" &&
AC_DEFINE(HAVE_WIDGETS)
-test "$with_menubars" = "lucid" &&
AC_DEFINE(LWLIB_MENUBARS_LUCID)
-test "$with_scrollbars" = "lucid" &&
AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
-
-test "$with_menubars" = "motif" &&
AC_DEFINE(LWLIB_MENUBARS_MOTIF)
-test "$with_scrollbars" = "motif" &&
AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
-test "$with_dialogs" = "motif" &&
AC_DEFINE(LWLIB_DIALOGS_MOTIF)
-test "$with_widgets" = "motif" &&
AC_DEFINE(LWLIB_WIDGETS_MOTIF)
-
dnl ----------------------
dnl Mule-dependent options
dnl ----------------------
@@ -4252,7 +4128,7 @@
test -z "$with_wnn" && with_wnn=yes
if test "$with_wnn" = "yes"; then
AC_DEFINE(HAVE_WNN)
- XE_PREPEND(-l$libwnn, libs_x)
+ XE_PREPEND(-l$libwnn, libs_mule)
if test "$with_wnn6" != "no"; then
AC_CHECK_LIB($libwnn, jl_fi_dic_list, with_wnn6=yes)
test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
@@ -4281,7 +4157,7 @@
test -z "$with_canna" && with_canna=yes
if test "$with_canna" = "yes"; then
AC_DEFINE(HAVE_CANNA)
- XE_PREPEND(-lcanna -lRKC, libs_x)
+ XE_PREPEND(-lcanna -lRKC, libs_mule)
fi
else dnl "$with_mule" = "no"
@@ -4293,6 +4169,86 @@
done
fi dnl with_mule
+if test "$have_window_system" != "no"; then
+ AC_CHECKING(for Xpm)
+
+ dnl add special code to handle xpm-nox on Cygwin (csw)
+ dnl -- should only happen if CYGWIN && WITH_XPM && WITH_MSW
&& !WITH_X
+ libpath_xpm=
+ incpath_xpm=
+ case "$opsys" in
+ cygwin*)
+ if test "$with_msw" = "yes" -a "$with_x11" !=
"yes" ; then
+ dnl hardcode "standard" non-X11 xpm lib/inc dirs
+ cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
+ cygwin_top=`eval "dirname ${cygwin_top}"`;
+ cygwin_top="${cygwin_top}/..";
+ libpath_xpm="-L${cygwin_top}/lib/noX"
+ incpath_xpm="-I${cygwin_top}/include/noX"
+ fi
+ ;;
+ dnl use "standard" search pattern for all other OS's
+ *) ;;
+ esac
+ dnl Autodetect Xpm
+ xpm_problem=""
+ if test -z "$with_xpm"; then
+ XE_PREPEND("$incpath_xpm", CFLAGS)
+ XE_PREPEND("$libpath_xpm", LDFLAGS)
+ AC_MSG_CHECKING(for Xpm - no older than 3.4f)
+ xe_check_libs=-lXpm
+ AC_TRY_RUN([#define XPM_NUMBERS
+#include <X11/xpm.h>
+ int main(int c, char **v) {
+ return c == 1 ? 0 :
+ XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+ XpmIncludeVersion < 30406 ? 2 : 0 ;}],
+ [./conftest dummy_arg; xpm_status=$?;
+ if test "$xpm_status" = "0"; then
+ with_xpm=yes;
+ else
+ with_xpm=no;
+ if test "$xpm_status" = "1"; then
+ xpm_problem="Xpm library version and header file version don't
match!"
+ elif test "$xpm_status" = "2"; then
+ xpm_problem="Xpm library version is too old!"
+ else
+ xpm_problem="Internal xpm detection logic error!"
+ fi
+ echo "
+*** WARNING *** $xpm_problem
+ I'm not touching that with a 10-foot pole!
+ If you really want to use the installed version of Xpm, rerun
+ configure and add '--with-xpm=yes', but don't blame me if XEmacs
crashes!"
+ fi],
+ [with_xpm=no])
+ xe_check_libs=
+ AC_MSG_RESULT($with_xpm)
+ fi
+ if test "$with_xpm" = "yes"; then
+ dnl #### This code assumes that if AC_CHECK_LIB fails,
+ dnl #### then it will succeed if FOR_MSW is defined,
+ dnl #### but doesn't actually verify this assumption.
+ AC_DEFINE(HAVE_XPM)
+ if test "$need_motif" != "yes" -o "$have_xpm_in_xm"
!= "yes" ; then
+ XE_PREPEND("$libpath_xpm", LDFLAGS)
+ XE_PREPEND(-lXpm, libs_win)
+ XE_PREPEND("$incpath_xpm", CFLAGS)
+ AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
+ xe_check_libs=-lXpm
+ AC_TRY_LINK(, [XpmCreatePixmapFromData()],
+ [xpm_for_msw=no],
+ [xpm_for_msw=yes])
+ xe_check_libs=
+ AC_MSG_RESULT($xpm_for_msw)
+ if test "$xpm_for_msw" = "yes"; then
+ AC_DEFINE(FOR_MSW)
+ fi
+ else
+ AC_MSG_RESULT(Xpm will be found in Motif.)
+ fi
+ fi
+fi
dnl At this point, we know whether we need the motif lib or not.
if test "$need_motif" = "yes" ; then
@@ -5128,7 +5084,7 @@
XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
-XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS)
+XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_mule $libs_win $libs_x $libs_gtk
$X_PRE_LIBS)
XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general $ld_libs_module)
dnl For no-module builds, make the src dir last
@@ -5547,10 +5503,25 @@
echo "
Window System:"
if test "$with_msw" = "yes"; then
- echo " Compiling in support for the Microsoft window system."
+ echo " Compiling in support for MS-Windows."
fi
+
+if test "$with_gtk" = "yes" ; then
+ if test "$with_gnome" = "yes"; then
+ echo " Compiling in support for GNOME."
+ else
+ echo " Compiling in support for GTK w/o GNOME."
+ fi
+fi
+
+if test "$with_tty" = "yes" ; then
+ echo " Compiling in support for TTY's."
+elif test "$have_window_system" = "no" ; then
+ echo " NOTE: No support for any display type. XEmacs can be run in batch mode
only."
+fi
+
if test "$with_x11" = "yes"; then
- echo " Compiling in support for the X window system:"
+ echo " Compiling in support for the X Window System:"
echo " - X Windows headers location: $x_includes"
echo " - X Windows libraries location: $x_libraries"
if test "$with_xauth" != yes; then
@@ -5569,23 +5540,19 @@
echo " - Athena library to link: $athena_lib"
fi
case "$with_menubars" in
- gtk ) echo " Using GTK menubars." ;;
lucid ) echo " Using Lucid menubars." ;;
motif ) echo " Using Motif menubars."
echo " *WARNING* The Motif menubar implementation is currently
buggy."
echo " We recommend using the Lucid menubar instead."
echo " Re-run configure with
--with-menubars='lucid'." ;;
- msw ) echo " Using MS-Windows menubars." ;;
+ dnl Athena menubars were overridden with Lucid ones. (#### Why?)
esac
case "$with_scrollbars" in
- gtk ) echo " Using GTK scrollbars." ;;
lucid ) echo " Using Lucid scrollbars." ;;
motif ) echo " Using Motif scrollbars." ;;
athena ) echo " Using Athena scrollbars." ;;
- msw ) echo " Using MS-Windows scrollbars." ;;
esac
case "$with_dialogs" in
- gtk ) echo " Using GTK dialog boxes." ;;
motif ) echo " Using Motif dialog boxes."
if test "$unexec" = "unexaix.o"; then if test
"`uname -v`" = 4 -a "`uname -r`" -ge 3; then
echo " *WARNING* The Motif dialog boxes cause problems on AIX 4.3
and higher."
@@ -5594,15 +5561,12 @@
echo " Read the PROBLEMS file for more
information."
fi; fi ;;
athena ) echo " Using Athena dialog boxes." ;;
- msw ) echo " Using MS-Windows dialog boxes." ;;
esac
case "$with_widgets" in
- gtk ) echo " Using GTK native widgets." ;;
motif ) echo " Using Motif native widgets." ;;
athena ) echo " Using Athena native widgets." ;;
- msw ) echo " Using MS-Windows native widgets." ;;
esac
-if test "$with_dragndrop" = yes; then
+if test -n "$dragndrop_proto" ; then
echo " Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
echo " - Drag'n'Drop prototype:
$dragndrop_proto."
fi
@@ -5617,7 +5581,7 @@
test "$with_gif" = yes && echo " Compiling in support for GIF
images (builtin)."
if test "$with_xpm" = yes; then
echo " Compiling in support for XPM images."
-elif test "$with_x11" = yes; then
+elif test "$have_window_system" != "no"; then
echo " WARNING:
-----------------------------------------------------------"
echo " WARNING: Compiling without XPM image support."
if test "$xpm_problem" != ""; then
@@ -5630,7 +5594,7 @@
fi
if test "$with_png" = yes; then
echo " Compiling in support for PNG images."
-elif test "$window_system" != "none"; then
+elif test "$have_window_system" != "no"; then
echo " WARNING:
-----------------------------------------------------------"
echo " WARNING: Compiling without PNG image support."
if test "$png_problem" != ""; then
1.38.2.1 +31 -24 XEmacs/xemacs/configure.usage
Index: configure.usage
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.usage,v
retrieving revision 1.38
retrieving revision 1.38.2.1
diff -u -r1.38 -r1.38.2.1
--- configure.usage 2005/01/26 10:02:13 1.38
+++ configure.usage 2005/02/15 01:16:25 1.38.2.1
@@ -145,38 +145,43 @@
Window-system options:
----------------------
---with-gtk Support GTK on the X Window System. (EXPERIMENTAL)
---with-gnome Support GNOME on the X Window System. (EXPERIMENTAL)
---with-x11 (*) Support the X Window System.
---x-includes=DIR Search for X header files in DIR.
---x-libraries=DIR Search for X libraries in DIR.
+--with-gtk (*) Support GTK on the X Window System. (EXPERIMENTAL)
+--with-gnome (*) Support GNOME on the X Window System. (EXPERIMENTAL)
+--with-x11 (*) Support plain X Window System frames.
+--x-includes=DIR (*) Search for X header files in DIR.
+--x-libraries=DIR (*) Search for X libraries in DIR.
--with-msw (*) Support MS Windows as a window system (only under
Cygwin and MinGW). `--with-msw=no' may be needed on
*nix systems with Wine installed.
--with-toolbars=no Don't compile with any toolbar support.
---with-wmcommand=no Compile without realized leader window which will
+--with-wmcommand=no Compile without a realized leader window which will
keep the WM_COMMAND property.
--with-athena=TYPE Use TYPE Athena widgets (xaw, 3d, next, 95, or xpm).
---with-menubars=TYPE Use TYPE menubars (lucid, motif, or no). The Lucid
- widgets emulate Motif (mostly) but are faster.
+--with-menubars=TYPE (*) Use TYPE menubars (yes, lucid, motif, athena, or no).
+ The Lucid widgets emulate Motif (mostly) but are
+ faster. There is no actual support for Athena
+ menubars; if this option is given, Lucid menubars are
+ used instead. Lucid menubars are the default.
*WARNING* The Motif menubar is currently broken.
- Lucid menubars are the default.
---with-scrollbars=TYPE Use TYPE scrollbars (lucid, motif, athena, or no).
- Lucid scrollbars are the default.
---with-dialogs=TYPE Use TYPE dialog boxes (lucid, motif, athena, or no).
- There are no true Lucid dialogs; Motif dialogs will be
- used if Motif can be found, else Athena is used.
---with-widgets=TYPE Use TYPE native widgets (lucid, motif, athena, or no).
- Other widget types are currently unsupported.
- There are no true Lucid widgets; Motif widgets will be
- used if Motif can be found, else Athena is used.
---with-dragndrop Compile in the generic drag and drop API. This is
+--with-scrollbars=TYPE (*) Use TYPE scrollbars (yes, lucid, motif, athena, or
+ no). Lucid scrollbars are the default.
+--with-dialogs=TYPE (*) Use TYPE dialog boxes (yes, motif, athena, or no).
+--with-widgets=TYPE (*) Use TYPE widgets (yes, lucid, motif, athena, or no).
+ There are no true Lucid dialogs or widgets.
+ Motif dialog boxes and widgets will be used if Motif
+ can be found; else, Athena dialog boxes and widgets
+ will be used if available; else, no support for dialog
+ boxes and widgets will exist under plain X. Motif
+ is autodetected. For stability reasons, Athena is
+ autodetected only if `--with-athena=TYPE' or
+ `--with-{dialogs|widgets}={yes|athena}' has been given.
+--with-dragndrop (*) Compile in the generic drag and drop API. This is
automatically added if one of the drag and drop
- protocols is found (currently CDE, OffiX, MSWindows,
+ protocols is found (currently CDE, OffiX, MS-Windows,
and GTK).
*WARNING* The Drag'n'drop support is under
development
and is considered experimental.
---with-cde Compile in support for CDE drag and drop.
+--with-cde (*) Compile in support for CDE drag and drop.
--with-offix Compile in support for OffiX drag and drop.
*WARNING* If you compile in OffiX, you may not be
able to use multiple X displays success-
@@ -184,13 +189,15 @@
different vendors, the results may be
unpredictable.
--with-xmu=no (*) For those unfortunates whose vendors don't ship Xmu.
---external-widget Compile with external widget support.
+--external-widget Compile with external widget support -- allows you
+ to open an XEmacs frame as a widget inside of another
+ program. May not currently work.
TTY (character terminal) options:
---------------------------------
---with-tty=no Don't support ttys.
+--with-tty=no Don't support TTY's.
--with-ncurses (*) Use the ncurses library for tty support.
--with-gpm (*) Compile in GPM mouse support for ttys.
@@ -214,7 +221,7 @@
--with-xface (*) Compile with support for X-Face mail headers.
Requires the compface package. Of doubtful
usefulness.
---with-gif=no Compile without the (builtin) support for GIF images.
+--with-gif=no Compile without the (built-in) support for GIF images.
Sound options:
No revision
No revision
1.3.4.1 +1 -1 XEmacs/xemacs/etc/photos/james.png
<<Binary file>>
1.3.4.1 +1 -1 XEmacs/xemacs/etc/photos/jamesm.png
<<Binary file>>
No revision
No revision
1.46.4.1 +1 -1 XEmacs/xemacs/lib-src/Makefile.in.in
Index: Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/Makefile.in.in,v
retrieving revision 1.46
retrieving revision 1.46.4.1
diff -u -r1.46 -r1.46.4.1
--- Makefile.in.in 2004/04/15 20:56:17 1.46
+++ Makefile.in.in 2005/02/15 01:17:23 1.46.4.1
@@ -85,7 +85,7 @@
#ifdef INSTALL_GNUSERV
gnuclient\
#endif
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
ellcc\
#endif
#ifdef HAVE_MS_WINDOWS
1.8.4.1 +2 -2 XEmacs/xemacs/lib-src/ellcc.c
Index: ellcc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lib-src/ellcc.c,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -u -r1.8 -r1.8.4.1
--- ellcc.c 2003/10/14 05:02:57 1.8
+++ ellcc.c 2005/02/15 01:17:23 1.8.4.1
@@ -80,7 +80,7 @@
#include <ellcc.h> /* Generated files must be included using <...> */
#include "compiler.h"
-#ifndef HAVE_SHLIB
+#ifndef HAVE_MODULES
int
main (int argc, char *argv[])
{
@@ -732,4 +732,4 @@
return exec_argv;
}
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
No revision
No revision
1.19.4.1 +1 -1 XEmacs/xemacs/lisp/code-files.el
Index: code-files.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-files.el,v
retrieving revision 1.19
retrieving revision 1.19.4.1
diff -u -r1.19 -r1.19.4.1
--- code-files.el 2003/10/07 21:52:15 1.19
+++ code-files.el 2005/02/15 01:17:36 1.19.4.1
@@ -3,7 +3,7 @@
;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
;; Copyright (C) 1995 Amdahl Corporation.
;; Copyright (C) 1995 Sun Microsystems.
-;; Copyright (C) 2001, 2002 Ben Wing.
+;; Copyright (C) 2001, 2002, 2003 Ben Wing.
;; This file is part of XEmacs.
1.13.6.1 +2 -2 XEmacs/xemacs/lisp/dialog.el
Index: dialog.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/dialog.el,v
retrieving revision 1.13
retrieving revision 1.13.6.1
diff -u -r1.13 -r1.13.6.1
--- dialog.el 2002/11/28 12:34:44 1.13
+++ dialog.el 2005/02/15 01:17:36 1.13.6.1
@@ -1,7 +1,7 @@
;;; dialog.el --- Dialog-box support for XEmacs
;; Copyright (C) 1991-4, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 2000, 2002 Ben Wing.
+;; Copyright (C) 2000, 2002, 2003 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, internal, dumped
@@ -722,7 +722,7 @@
`(popup
,cl-parent initially-unmapped t
menubar-visible-p nil
- has-modeline-p nil
+ modeline-visible-p nil
default-toolbar-visible-p nil
top-gutter-visible-p t
top-gutter-height ,(* dfheight fonth)
1.54.2.1 +0 -1 XEmacs/xemacs/lisp/dumped-lisp.el
Index: dumped-lisp.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/dumped-lisp.el,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -r1.54 -r1.54.2.1
--- dumped-lisp.el 2005/02/10 03:26:15 1.54
+++ dumped-lisp.el 2005/02/15 01:17:36 1.54.2.1
@@ -281,7 +281,6 @@
;; '("tooltalk-macros" "tooltalk-util"
"tooltalk-init"))
;; "vc-hooks" ; Packaged. Available in two versions.
;; "ediff-hook" ; Packaged.
- "fontl-hooks"
"auto-show"
"paragraphs" ; needs easy-mmode, coding
"resize-minibuffer"
1.5.22.1 +54 -1 XEmacs/xemacs/lisp/extents.el
Index: extents.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/extents.el,v
retrieving revision 1.5
retrieving revision 1.5.22.1
diff -u -r1.5 -r1.5.22.1
--- extents.el 2001/04/12 18:21:17 1.5
+++ extents.el 2005/02/15 01:17:36 1.5.22.1
@@ -1,7 +1,7 @@
;;; extents.el --- miscellaneous extent functions not written in C
;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 2000 Ben Wing.
+;; Copyright (C) 2000, 2003 Ben Wing.
;; Keywords: internal, dumped
@@ -119,5 +119,58 @@
(defun extent-keymap (extent)
"Return EXTENT's `keymap' property."
(extent-property extent 'keymap))
+
+(defun set-extent-face (extent face)
+ "Make the given EXTENT have the graphic attributes specified by FACE.
+FACE can also be a list of faces, and all faces listed will apply,
+with faces earlier in the list taking priority over those later in the
+list.
+
+See `set-extent-property' for more information."
+ (set-extent-property extent 'face face))
+
+(defun set-extent-mouse-face (extent face)
+ "Set the face used to highlight EXTENT when the mouse passes over it.
+FACE can also be a list of faces, and all faces listed will apply,
+with faces earlier in the list taking priority over those later in the
+list.
+
+See `set-extent-property' for more information."
+ (set-extent-property extent 'mouse-face face))
+
+(defun set-extent-begin-glyph (extent glyph &optional layout)
+ "Display a bitmap, subwindow or string at the beginning of EXTENT.
+GLYPH must be a glyph object. Also set the `begin-glyph-layout'
+property if LAYOUT is non-nil.
+
+See `set-extent-property' for more information."
+ (set-extent-property extent 'begin-glyph glyph)
+ (when layout
+ (set-extent-property extent 'begin-glyph-layout layout)))
+
+(defun set-extent-end-glyph (extent glyph &optional layout)
+ "Display a bitmap, subwindow or string at the end of EXTENT.
+GLYPH must be a glyph object. Also set the `end-glyph-layout'
+property if LAYOUT is non-nil.
+
+See `set-extent-property' for more information."
+ (set-extent-property extent 'end-glyph glyph)
+ (when layout
+ (set-extent-property extent 'end-glyph-layout layout)))
+
+(defun set-extent-begin-glyph-layout (extent layout)
+ "Set the layout policy of EXTENT's begin glyph.
+See `set-extent-property' for more information."
+ (set-extent-property extent 'begin-glyph-layout layout))
+
+(defun set-extent-end-glyph-layout (extent layout)
+ "Set the layout policy of EXTENT's end glyph.
+See `set-extent-property' for more information."
+ (set-extent-property extent 'end-glyph-layout layout))
+
+(defun set-extent-priority (extent value)
+ "Set EXTENT's redisplay priority to VALUE.
+See `set-extent-property' for more information."
+ (set-extent-property extent 'priority value))
;;; extents.el ends here
1.29.2.1 +2964 -1335XEmacs/xemacs/lisp/font-lock.el
Index: font-lock.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/font-lock.el,v
retrieving revision 1.29
retrieving revision 1.29.2.1
diff -u -r1.29 -r1.29.2.1
--- font-lock.el 2005/01/26 04:18:15 1.29
+++ font-lock.el 2005/02/15 01:17:37 1.29.2.1
@@ -10,6 +10,7 @@
;; Next Author: RMS
;; Next Author: Simon Marshall <simon(a)gnu.ai.mit.edu>
;; Latest XEmacs Author: Ben Wing
+;; Synched to FSF 21.2 by Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: languages, faces
@@ -30,8 +31,11 @@
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-;;; Synched up with: FSF 19.30 except for the code to initialize the faces.
+;;; Synched up with: FSF 21.2 except for the Java keywords.
+;;; Sync sections specifically marked.
+;; BEGIN SYNCHED WITH FSF 21.2.
+
;;; Commentary:
;; Font-lock-mode is a minor mode that causes your comments to be
@@ -45,73 +49,175 @@
;; displayed in `font-lock-function-name-face'.
;; Reserved words will be displayed in `font-lock-keyword-face'.
;;
+;; Regexps are used to display selected patterns in other faces.
+;;
+;; To make the text you type be fontified, use M-x font-lock-mode RET.
+;; When this minor mode is on, the faces of the current line are updated with
+;; every insertion or deletion.
+;;
+;; To turn Font Lock mode on automatically, add this to your ~/.emacs file:
+;;
+;; (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
+;;
+;; Or if you want to turn Font Lock mode on in many modes:
+;;
+;; (global-font-lock-mode t)
+;;
+;; Fontification for a particular mode may be available in a number of levels
+;; of decoration. The higher the level, the more decoration, but the more time
+;; it takes to fontify. See the variable `font-lock-maximum-decoration', and
+;; also the variable `font-lock-maximum-size'. Support modes for Font Lock
+;; mode can be used to speed up Font Lock mode. See `font-lock-support-mode'.
+
;; Don't let the name fool you: you can highlight things using different
;; colors or background stipples instead of fonts, though that is not the
;; default. See the variables `font-lock-use-colors' and
;; `font-lock-use-fonts' for broad control over this, or see the
;; documentation on faces and how to change their attributes for
;; fine-grained control.
+
+;;; How Font Lock mode fontifies:
+
+;; When Font Lock mode is turned on in a buffer, it (a) fontifies the entire
+;; buffer and (b) installs one of its fontification functions on one of the
+;; hook variables that are run by Emacs after every buffer change (i.e., an
+;; insertion or deletion). Fontification means the replacement of `face' text
+;; properties in a given region; Emacs displays text with these `face' text
+;; properties appropriately.
+;;
+;; Fontification normally involves syntactic (i.e., strings and comments) and
+;; regexp (i.e., keywords and everything else) passes. There are actually
+;; three passes; (a) the syntactic keyword pass, (b) the syntactic pass and (c)
+;; the keyword pass. Confused?
+;;
+;; The syntactic keyword pass places `syntax-table' text properties in the
+;; buffer according to the variable `font-lock-syntactic-keywords'. It is
+;; necessary because Emacs' syntax table is not powerful enough to describe all
+;; the different syntactic constructs required by the sort of people who decide
+;; that a single quote can be syntactic or not depending on the time of day.
+;; (What sort of person could decide to overload the meaning of a quote?)
+;; Obviously the syntactic keyword pass must occur before the syntactic pass.
+;;
+;; The syntactic pass places `face' text properties in the buffer according to
+;; syntactic context, i.e., according to the buffer's syntax table and buffer
+;; text's `syntax-table' text properties. It involves using a syntax parsing
+;; function to determine the context of different parts of a region of text. A
+;; syntax parsing function is necessary because generally strings and/or
+;; comments can span lines, and so the context of a given region is not
+;; necessarily apparent from the content of that region. Because the keyword
+;; pass only works within a given region, it is not generally appropriate for
+;; syntactic fontification. This is the first fontification pass that makes
+;; changes visible to the user; it fontifies strings and comments.
+;;
+;; The keyword pass places `face' text properties in the buffer according to
+;; the variable `font-lock-keywords'. It involves searching for given regexps
+;; (or calling given search functions) within the given region. This is the
+;; second fontification pass that makes changes visible to the user; it
+;; fontifies language reserved words, etc.
+;;
+;; Oh, and the answer is, "Yes, obviously just about everything should be done
+;; in a single syntactic pass, but the only syntactic parser available
+;; understands only strings and comments." Perhaps one day someone will write
+;; some syntactic parsers for common languages and a son-of-font-lock.el could
+;; use them rather then relying so heavily on the keyword (regexp) pass.
+
+;;; How Font Lock mode supports modes or is supported by modes:
+
+;; Modes that support Font Lock mode do so by defining one or more variables
+;; whose values specify the fontification. Font Lock mode knows of these
+;; variable names from (a) the buffer local variable `font-lock-defaults', if
+;; non-nil, or (b) the global variable `font-lock-defaults-alist', if the major
+;; mode has an entry. (Font Lock mode is set up via (a) where a mode's
+;; patterns are distributed with the mode's package library, and (b) where a
+;; mode's patterns are distributed with font-lock.el itself. An example of (a)
+;; is Pascal mode, an example of (b) is Lisp mode. Normally, the mechanism is
+;; (a); (b) is used where it is not clear which package library should contain
+;; the pattern definitions.) Font Lock mode chooses which variable to use for
+;; fontification based on `font-lock-maximum-decoration'.
+;;
+;; Font Lock mode fontification behaviour can be modified in a number of ways.
+;; See the below comments and the comments distributed throughout this file.
+
+;;; Constructing patterns:
+
+;; See the documentation for the variable `font-lock-keywords'.
+;;
+;; Efficient regexps for use as MATCHERs for `font-lock-keywords' and
+;; `font-lock-syntactic-keywords' can be generated via the function
+;; `regexp-opt'.
+
+;;; Adding patterns for modes that already support Font Lock:
+
+;; Though Font Lock highlighting patterns already exist for many modes, it's
+;; likely there's something that you want fontified that currently isn't, even
+;; at the maximum fontification level. You can add highlighting patterns via
+;; `font-lock-add-keywords'. For example, say in some C
+;; header file you #define the token `and' to expand to `&&', etc., to
make
+;; your C code almost readable. In your ~/.emacs there could be:
+;;
+;; (font-lock-add-keywords 'c-mode
'("\\<\\(and\\|or\\|not\\)\\>"))
+;;
+;; Some modes provide specific ways to modify patterns based on the values of
+;; other variables. For example, additional C types can be specified via the
+;; variable `c-font-lock-extra-types'.
+
+;;; Adding patterns for modes that do not support Font Lock:
+
+;; Not all modes support Font Lock mode. If you (as a user of the mode) add
+;; patterns for a new mode, you must define in your ~/.emacs a variable or
+;; variables that specify regexp fontification. Then, you should indicate to
+;; Font Lock mode, via the mode hook setting `font-lock-defaults', exactly what
+;; support is required. For example, say Foo mode should have the following
+;; regexps fontified case-sensitively, and comments and strings should not be
+;; fontified automagically. In your ~/.emacs there could be:
+;;
+;; (defvar foo-font-lock-keywords
+;; '(("\\<\\(one\\|two\\|three\\)\\>" . font-lock-keyword-face)
+;; ("\\<\\(four\\|five\\|six\\)\\>" . font-lock-type-face))
+;; "Default expressions to highlight in Foo mode.")
+;;
+;; (add-hook 'foo-mode-hook
+;; (function (lambda ()
+;; (make-local-variable 'font-lock-defaults)
+;; (setq font-lock-defaults '(foo-font-lock-keywords t)))))
+
+;;; Adding Font Lock support for modes:
+
+;; Of course, it would be better that the mode already supports Font Lock mode.
+;; The package author would do something similar to above. The mode must
+;; define at the top-level a variable or variables that specify regexp
+;; fontification. Then, the mode command should indicate to Font Lock mode,
+;; via `font-lock-defaults', exactly what support is required. For example,
+;; say Bar mode should have the following regexps fontified case-insensitively,
+;; and comments and strings should be fontified automagically. In bar.el there
+;; could be:
+;;
+;; (defvar bar-font-lock-keywords
+;; '(("\\<\\(uno\\|due\\|tre\\)\\>" . font-lock-keyword-face)
+;; ("\\<\\(quattro\\|cinque\\|sei\\)\\>" . font-lock-type-face))
+;; "Default expressions to highlight in Bar mode.")
;;
-;; To make the text you type be fontified, use M-x font-lock-mode. When
-;; this minor mode is on, the fonts of the current line will be updated
-;; with every insertion or deletion.
-;;
-;; By default, font-lock will automatically put newly loaded files
-;; into font-lock-mode if it knows about the file's mode. See the
-;; variables `font-lock-auto-fontify', `font-lock-mode-enable-list',
-;; and `font-lock-mode-disable-list' for control over this.
-;;
-;; The `font-lock-keywords' variable defines other patterns to highlight.
-;; The default font-lock-mode-hook sets it to the value of the variables
-;; lisp-font-lock-keywords, c-font-lock-keywords, etc, as appropriate.
-;; The easiest way to change the highlighting patterns is to change the
-;; values of c-font-lock-keywords and related variables. See the doc
-;; string of the variable `font-lock-keywords' for the appropriate syntax.
-;;
-;; The default value for `lisp-font-lock-keywords' is the value of the variable
-;; `lisp-font-lock-keywords-1'. You may like `lisp-font-lock-keywords-2'
-;; better; it highlights many more words, but is slower and makes your buffers
-;; be very visually noisy.
-;;
-;; The same is true of `c-font-lock-keywords-1' and `c-font-lock-keywords-2';
-;; the former is subdued, the latter is loud.
-;;
-;; You can make font-lock default to the gaudier variety of keyword
-;; highlighting by setting the variable `font-lock-maximum-decoration'
-;; before loading font-lock, or by calling the functions
-;; `font-lock-use-default-maximal-decoration' or
-;; `font-lock-use-default-minimal-decoration'.
-;;
-;; On a Sparc10, the initial fontification takes about 6 seconds for a typical
-;; 140k file of C code, using the default configuration. The actual speed
-;; depends heavily on the type of code in the file, and how many non-syntactic
-;; patterns match; for example, Xlib.h takes 23 seconds for 101k, because many
-;; patterns match in it. You can speed this up substantially by removing some
-;; of the patterns that are highlighted by default. Fontifying lisp code is
-;; significantly faster, because lisp has a more regular syntax than C, so the
-;; regular expressions don't have to be as complicated.
+;; and within `bar-mode' there could be:
;;
+;; (make-local-variable 'font-lock-defaults)
+;; (setq font-lock-defaults '(bar-font-lock-keywords nil t))
+
+;;
;; It's called font-lock-mode here because on the Lispms it was called
;; "Electric Font Lock Mode." It was called that because there was an older
;; mode called "Electric Caps Lock Mode" which had the function of causing
all
;; of your source code to be in upper case except for strings and comments,
;; without you having to blip the caps lock key by hand all the time (thus the
-;; "electric", as in `electric-c-brace'.)
+;; "electric", as in `electric-c-brace').
-;; See also the related packages `fast-lock' and `lazy-lock'. Both
-;; attempt to speed up the initial fontification. `fast-lock' saves
-;; the fontification info when you exit Emacs and reloads it next time
-;; you load the file, so that the file doesn't have to be fontified
-;; again. `lazy-lock' does "lazy" fontification -- i.e. it only
-;; fontifies the text as it becomes visible rather than fontifying
-;; the whole file when it's first loaded in.
-
-;; Further comments from the FSF:
-
-;; Nasty regexps of the form
"bar\\(\\|lo\\)\\|f\\(oo\\|u\\(\\|bar\\)\\)\\|lo"
-;; are made thusly: (regexp-opt '("foo" "fu" "fubar"
"bar" "barlo" "lo")) for
-;; efficiency.
-
+;; See also the related packages `fast-lock', `lazy-lock' and `lazy-shot'.
+;; All attempt to speed up the initial fontification. `fast-lock' saves
+;; the fontification info when you exit Emacs and reloads it next time you
+;; load the file, so that the file doesn't have to be fontified again.
+;; `lazy-lock' does "lazy" fontification -- i.e. it only fontifies the
text
+;; as it becomes visible rather than fontifying the whole file when it's
+;; first loaded in.
+
;; What is fontification for? You might say, "It's to make my code look
nice."
;; I think it should be for adding information in the form of cues. These cues
;; should provide you with enough information to both (a) distinguish between
@@ -121,15 +227,18 @@
;; doesn't work. Or maybe it allows you to think less and drift off to sleep.
;;
;; So, here are my opinions/advice/guidelines:
-;;
+;;
+;; - Highlight conceptual objects, such as function and variable names, and
+;; different objects types differently, i.e., (a) and (b) above, highlight
+;; function names differently to variable names.
+;; - Keep the faces distinct from each other as far as possible.
+;; i.e., (a) above.
;; - Use the same face for the same conceptual object, across all modes.
;; i.e., (b) above, all modes that have items that can be thought of as, say,
;; keywords, should be highlighted with the same face, etc.
-;; - Keep the faces distinct from each other as far as possible.
-;; i.e., (a) above.
;; - Make the face attributes fit the concept as far as possible.
-;; i.e., function names might be a bold color such as blue, comments might
-;; be a bright color such as red, character strings might be brown, because,
+;; i.e., function names might be a bold colour such as blue, comments might
+;; be a bright colour such as red, character strings might be brown, because,
;; err, strings are brown (that was not the reason, please believe me).
;; - Don't use a non-nil OVERRIDE unless you have a good reason.
;; Only use OVERRIDE for special things that are easy to define, such as the
@@ -140,10 +249,6 @@
;;; Code:
-(require 'fontl-hooks)
-
-;;;;;;;;;;;;;;;;;;;;;; user variables ;;;;;;;;;;;;;;;;;;;;;;
-
(defgroup font-lock nil
"Decorate source files with fonts/colors based on syntax.
Font-lock-mode is a minor mode that causes your comments to be
@@ -157,19 +262,49 @@
in `font-lock-function-name-face'.
Reserved words will be displayed in `font-lock-keyword-face'.
Preprocessor conditionals will be displayed in
`font-lock-preprocessor-face'."
+ :link '(custom-manual "(emacs)Font Lock")
+ :link '(custom-manual "(elisp)Font Lock Mode")
:group 'languages)
+;; Called font-lock-highlighting-faces in FSF 21.2.
(defgroup font-lock-faces nil
- "Faces used by the font-lock package."
+ "Faces for highlighting text using the font-lock package."
+ :prefix "font-lock-"
:group 'font-lock
:group 'faces)
+(defgroup font-lock-extra-types nil
+ "Extra mode-specific type names for highlighting declarations."
+ :group 'font-lock)
+
+;; Define support mode groups here to impose `font-lock' group order.
+(defgroup fast-lock nil
+ "Font Lock support mode to cache fontification."
+ :link '(custom-manual "(emacs)Support Modes")
+ :load 'fast-lock
+ :group 'font-lock)
-(defcustom font-lock-verbose t
- "*If non-nil, means show status messages when fontifying.
-See also `font-lock-message-threshold'."
- :type 'boolean
+(defgroup lazy-lock nil
+ "Font Lock support mode to fontify lazily."
+ :link '(custom-manual "(emacs)Support Modes")
+ :load 'lazy-lock
+ :group 'font-lock)
+
+(defgroup lazy-shot nil
+ "Font Lock support mode to fontify with lazy-shot."
+ :link '(custom-manual "(emacs)Support Modes")
+ :version "21.1"
+ :load 'lazy-shot
+ :group 'font-lock)
+
+(defgroup jit-lock nil
+ "Font Lock support mode to fontify just-in-time."
+ :link '(custom-manual "(emacs)Support Modes")
+ :version "21.1"
+ :load 'jit-lock
:group 'font-lock)
+
+;; User variables.
(defcustom font-lock-message-threshold 6000
"*Minimum size of region being fontified for status messages to appear.
@@ -187,28 +322,6 @@
:group 'font-lock)
;;;###autoload
-(defcustom font-lock-auto-fontify t
- "*Whether font-lock should automatically fontify files as they're loaded.
-This will only happen if font-lock has fontifying keywords for the major
-mode of the file. You can get finer-grained control over auto-fontification
-by using this variable in combination with `font-lock-mode-enable-list' or
-`font-lock-mode-disable-list'."
- :type 'boolean
- :group 'font-lock)
-
-;;;###autoload
-(defcustom font-lock-mode-enable-list nil
- "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil."
- :type '(repeat (symbol :tag "Mode"))
- :group 'font-lock)
-
-;;;###autoload
-(defcustom font-lock-mode-disable-list nil
- "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is
t."
- :type '(repeat (symbol :tag "Mode"))
- :group 'font-lock)
-
-;;;###autoload
(defcustom font-lock-use-colors '(color)
"*Specification for when Font Lock will set up color defaults.
Normally this should be '(color), meaning that Font Lock will set up
@@ -261,16 +374,39 @@
:group 'font-lock)
;;;###autoload
+(defcustom font-lock-maximum-size 256000
+ "*Maximum size of a buffer for buffer fontification.
+Only buffers less than this can be fontified when Font Lock mode is turned on.
+If nil, means size is irrelevant.
+If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
+where MAJOR-MODE is a symbol or t (meaning the default). For example:
+ ((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576))
+means that the maximum size is 250K for buffers in C or C++ modes, one megabyte
+for buffers in Rmail mode, and size is irrelevant otherwise."
+ :type '(choice (const :tag "none" nil)
+ (integer :tag "size")
+ (repeat :menu-tag "mode specific" :tag "mode specific"
+ :value ((t . nil))
+ (cons :tag "Instance"
+ (radio :tag "Mode"
+ (const :tag "all" t)
+ (symbol :tag "name"))
+ (radio :tag "Size"
+ (const :tag "none" nil)
+ (integer :tag "size")))))
+ :group 'font-lock)
+
+;;;###autoload
(defcustom font-lock-maximum-decoration t
- "*If non-nil, the maximum decoration level for fontifying.
-If nil, use the minimum decoration (equivalent to level 0).
+ "*Maximum decoration level for fontification.
+If nil, use the default decoration (typically the minimum available).
If t, use the maximum decoration available.
If a number, use that level of decoration (or if not available the maximum).
If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),
where MAJOR-MODE is a symbol or t (meaning the default). For example:
- ((c++-mode . 2) (c-mode . t) (t . 1))
-means use level 2 decoration for buffers in `c++-mode', the maximum decoration
-available for buffers in `c-mode', and level 1 decoration otherwise."
+ ((c-mode . t) (c++-mode . 2) (t . 1))
+means use the maximum decoration available for buffers in C mode, level 2
+decoration for buffers in C++ mode, and level 1 decoration otherwise."
:type '(choice (const :tag "default" nil)
(const :tag "maximum" t)
(integer :tag "level" 1)
@@ -286,31 +422,12 @@
(integer :tag "level" 1)))))
:group 'font-lock)
-;;;###autoload
-(define-obsolete-variable-alias 'font-lock-use-maximal-decoration
- 'font-lock-maximum-decoration)
-
-;;;###autoload
-(defcustom font-lock-maximum-size (* 250 1024)
- "*If non-nil, the maximum size for buffers for fontifying.
-Only buffers less than this can be fontified when Font Lock mode is turned on.
-If nil, means size is irrelevant.
-If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
-where MAJOR-MODE is a symbol or t (meaning the default). For example:
- ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))
-means that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one
-megabyte for buffers in `rmail-mode', and size is irrelevant otherwise."
- :type '(choice (const :tag "none" nil)
- (integer :tag "size")
- (repeat :menu-tag "mode specific" :tag "mode specific"
- :value ((t . nil))
- (cons :tag "Instance"
- (radio :tag "Mode"
- (const :tag "all" t)
- (symbol :tag "name"))
- (radio :tag "Size"
- (const :tag "none" nil)
- (integer :tag "size")))))
+(defcustom font-lock-verbose 0
+ "*If non-nil, means show status messages for buffer fontification.
+If a number, only buffers greater than this size have fontification messages."
+ :type '(choice (const :tag "never" nil)
+ (other :tag "always" t)
+ (integer :tag "size"))
:group 'font-lock)
;;;###autoload
@@ -327,6 +444,90 @@
:type '(choice string
(const :tag "none" nil))
:group 'font-lock)
+
+
+;;; Initialization of faces.
+
+;; #### barf gag retch. Horrid FSF lossage that we need to
+;; keep around for compatibility with font-lock-keywords that
+;; forget to properly quote their faces. I tried just let-binding
+;; them when we eval the face expression, but that fails because
+;; some files actually use the variables directly in their init code
+;; without quoting them. --ben
+
+;; FSF 21.2 says:
+
+;; Originally these variable values were face names such as `bold' etc.
+;; Now we create our own faces, but we keep these variables for compatibility
+;; and they give users another mechanism for changing face appearance.
+;; We now allow a FACENAME in `font-lock-keywords' to be any expression that
+;; returns a face. So the easiest thing is to continue using these variables,
+;; rather than sometimes evaling FACENAME and sometimes not. sm.
+(defvar font-lock-comment-face 'font-lock-comment-face
+ "Face name to use for comments. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-string-face 'font-lock-string-face
+ "Face name to use for strings. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-doc-string-face 'font-lock-doc-string-face
+ "Face name to use for documentation. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+;; GNU compatibility
+(define-compatible-variable-alias
+ 'font-lock-doc-face 'font-lock-doc-string-face)
+(defvar font-lock-keyword-face 'font-lock-keyword-face
+ "Face name to use for keywords. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-builtin-face 'font-lock-builtin-face
+ "Face name to use for builtins. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-function-name-face 'font-lock-function-name-face
+ "Face name to use for function names. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-variable-name-face 'font-lock-variable-name-face
+ "Face name to use for variable names. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-type-face 'font-lock-type-face
+ "Face name to use for type and class names. This variable should not be set.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-constant-face 'font-lock-constant-face
+ "Face name to use for constants and label names. Do not set this variable.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-warning-face 'font-lock-warning-face
+ "Face name to use for things that should stand out. Do not set this variable.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face
+ "Face name to use for processor declarations. Do not set this variable.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+(defvar font-lock-reference-face 'font-lock-constant-face
+ "This variable is obsolete. Use `font-lock-constant-face'.
+Do not set this variable.
+It is present only for horrid FSF compatibility reasons.
+The corresponding face should be set using `edit-faces' or the
+`set-face-*' functions.")
+
;; Fontification variables:
@@ -347,15 +548,25 @@
| A variable containing a regexp to search for.
| A function to call to make the search.
It is called with one arg, the limit of the search,
- and should leave MATCH results in the XEmacs global
- match data.
+ and should return non-nil if it succeeds and leave
+ MATCH results in the XEmacs global match data.
+ MATCHER regexps can be generated via the function
+ `regexp-opt'.
MATCH :== An integer match subexpression number from MATCHER.
FACE-FORM :== The symbol naming a defined face.
- | Expression whos value is the face name to use. If you
+ | Expression whose value is the face name to use. If you
want FACE-FORM to be a symbol that evaluates to a face,
- use a form like \"(progn sym)\".
+ use a form like \"(progn sym)\". Face default
+ attributes can be modified via \\[customize]. Instead
+ of a face, FACE-FORM can evaluate to a property list of
+ the form (face VAL1 PROP2 VAL2 PROP3 VAL3 ...) in which
+ case all the listed text-properties will be set rather
+ than just `face'. In such a case, you will most likely
+ want to put those properties in
+ `font-lock-extra-managed-props' or to override
+ `font-lock-unfontify-region-function'.
HIGHLIGHT :== MATCH-HIGHLIGHT
| MATCH-ANCHORED
@@ -436,78 +647,47 @@
Therefore \"item\" is initially searched for starting from the end of the
match of \"anchor\", and searching for subsequent instance of
\"anchor\"
resumes from where searching for \"item\" concluded.)
-
-For highlighting single items, typically only MATCH-HIGHLIGHT is required.
-However, if an item or (typically) several items are to be highlighted
-following the instance of another item (the anchor) then MATCH-ANCHORED may be
-required.
-
-These regular expressions should not match text which spans lines. While
-\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating when you
-edit the buffer does not, since it considers text one line at a time.
-
-Be very careful composing regexps for this list; the wrong pattern can
-dramatically slow things down!
-")
-;;;###autoload
-(make-variable-buffer-local 'font-lock-keywords)
-
-;;;###autoload
-(defvar font-lock-syntactic-keywords nil
- "A list of the syntactic keywords to highlight.
-Can be the list or the name of a function or variable whose value is the list.
-See `font-lock-keywords' for a description of the form of this list;
-the differences are listed below. MATCH-HIGHLIGHT should be of the form:
-
- (MATCH SYNTAX OVERRIDE LAXMATCH)
-
-where SYNTAX can be of the form (SYNTAX-CODE . MATCHING-CHAR), the name of a
-syntax table, or an expression whose value is such a form or a syntax table.
-OVERRIDE cannot be `prepend' or `append'.
-
-For example, an element of the form highlights syntactically:
-
- (\"\\\\$\\\\(#\\\\)\" 1 (1 . nil))
- a hash character when following a dollar character, with a SYNTAX-CODE of
- 1 (meaning punctuation syntax). Assuming that the buffer syntax table does
- specify hash characters to have comment start syntax, the element will only
- highlight hash characters that do not follow dollar characters as comments
- syntactically.
-
- (\"\\\\('\\\\).\\\\('\\\\)\"
- (1 (7 . ?'))
- (2 (7 . ?')))
-
- both single quotes which surround a single character, with a SYNTAX-CODE of
- 7 (meaning string quote syntax) and a MATCHING-CHAR of a single quote (meaning
- a single quote matches a single quote). Assuming that the buffer syntax table
- does not specify single quotes to have quote syntax, the element will only
- highlight single quotes of the form 'c' as strings syntactically.
- Other forms, such as foo'bar or 'fubar', will not be highlighted as
strings.
+For highlighting single items, for example each instance of the word
+\"foo\", typically only MATCH-HIGHLIGHT is required. However, if an item
+or (typically) items are to be highlighted following the instance of
+another item (the anchor), for example each instance of the word \"bar\"
+following the word \"anchor\" then MATCH-ANCHORED may be required.
+
+These regular expressions can match text which spans lines, although it is
+better to avoid it if possible since updating them while editing text is
+slower, and while \\[font-lock-fontify-buffer] handles multi-line patterns
+correctly, updating when you edit the buffer may not, and you may also run into
+problems with support modes like jit-lock or lazy-lock.
+
+This variable is set by major modes via the variable `font-lock-defaults'.
+Be careful when composing regexps for this list; a poorly written pattern can
+dramatically slow things down!")
-This is normally set via `font-lock-defaults'."
-)
+;;; XEmacs addition:
;;;###autoload
-(make-variable-buffer-local 'font-lock-syntactic-keywords)
+(make-variable-buffer-local 'font-lock-keywords)
+;; This variable is used by mode packages that support Font Lock mode by
+;; defining their own keywords to use for `font-lock-keywords'. (The mode
+;; command should make it buffer-local and set it to provide the set up.)
(defvar font-lock-defaults nil
- "The defaults font Font Lock mode for the current buffer.
+ "Defaults for Font Lock mode specified by the major mode.
Normally, do not set this directly. If you are writing a major mode,
put a property of `font-lock-defaults' on the major-mode symbol with
the desired value.
-It should be a list
+Defaults should be of the form:
-\(KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN)
+ (KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN ...)
-KEYWORDS may be a symbol (a variable or function whose value is the keywords
-to use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil,
-syntactic fontification (strings and comments) is not performed. If CASE-FOLD
-is non-nil, the case of the keywords is ignored when fontifying. If
-SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form (CHAR
-. STRING) used to set the local Font Lock syntax table, for keyword and
-syntactic fontification (see `modify-syntax-entry').
+KEYWORDS may be a symbol (a variable or function whose value is the keywords to
+use for fontification) or a list of symbols. If KEYWORDS-ONLY is non-nil,
+syntactic fontification (strings and comments) is not performed.
+If CASE-FOLD is non-nil, the case of the keywords is ignored when fontifying.
+If SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form
+\(CHAR-OR-STRING . STRING) used to set the local Font Lock syntax table, for
+keyword and syntactic fontification (see `modify-syntax-entry').
If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move
backwards outside any enclosing syntactic block, for syntactic fontification.
@@ -521,11 +701,30 @@
`font-lock-keywords', `font-lock-keywords-only',
`font-lock-keywords-case-fold-search', `font-lock-syntax-table' and
`font-lock-beginning-of-syntax-function', respectively.
+
+Further item elements are alists of the form (VARIABLE . VALUE) and are in no
+particular order. Each VARIABLE is made buffer-local before set to VALUE.
-Alternatively, if the value is a symbol, it should name a major mode,
-and the defaults for that mode will apply.")
+Currently, appropriate variables include `font-lock-mark-block-function'.
+If this is non-nil, it should be a function with no args used to mark any
+enclosing block of text, for fontification via \\[font-lock-fontify-block].
+Typical values are `mark-defun' for programming modes or `mark-paragraph' for
+textual modes (i.e., the mode-dependent function is known to put point and mark
+around a text block relevant to that mode).
+
+Other variables include that for syntactic keyword fontification,
+`font-lock-syntactic-keywords'
+and those for buffer-specialised fontification functions,
+`font-lock-fontify-buffer-function', `font-lock-unfontify-buffer-function',
+`font-lock-fontify-region-function', `font-lock-unfontify-region-function',
+`font-lock-inhibit-thing-lock' and `font-lock-maximum-size'.")
+;;;###autoload
(make-variable-buffer-local 'font-lock-defaults)
+;; #### OLD COMMENT FROM THE PREVIOUS DOC STRING IN XEMACS:
+;; Alternatively, if the value is a symbol, it should name a major mode,
+;; and the defaults for that mode will apply.
+
;; FSF uses `font-lock-defaults-alist' and expects the major mode to
;; set a value for `font-lock-defaults', but I don't like either of
;; these -- requiring the mode to set `font-lock-defaults' makes it
@@ -534,8 +733,69 @@
;; decentralized. (Who knows what strange modes might want
;; font-locking?)
+; ;; This variable is used where font-lock.el itself supplies the keywords.
+; (defvar font-lock-defaults-alist
+; (let (;; We use `beginning-of-defun', rather than nil, for SYNTAX-BEGIN.
+; ;; Thus the calculation of the cache is usually faster but not
+; ;; infallible, so we risk mis-fontification. sm.
+; (c-mode-defaults
+; '((c-font-lock-keywords c-font-lock-keywords-1
+; c-font-lock-keywords-2 c-font-lock-keywords-3)
+; nil nil ((?_ . "w")) beginning-of-defun
+; (font-lock-mark-block-function . mark-defun)))
+; (c++-mode-defaults
+; '((c++-font-lock-keywords c++-font-lock-keywords-1
+; c++-font-lock-keywords-2 c++-font-lock-keywords-3)
+; nil nil ((?_ . "w")) beginning-of-defun
+; (font-lock-mark-block-function . mark-defun)))
+; (objc-mode-defaults
+; '((objc-font-lock-keywords objc-font-lock-keywords-1
+; objc-font-lock-keywords-2 objc-font-lock-keywords-3)
+; nil nil ((?_ . "w") (?$ . "w")) nil
+; (font-lock-mark-block-function . mark-defun)))
+; (java-mode-defaults
+; '((java-font-lock-keywords java-font-lock-keywords-1
+; java-font-lock-keywords-2 java-font-lock-keywords-3)
+; nil nil ((?_ . "w") (?$ . "w")) nil
+; (font-lock-mark-block-function . mark-defun)))
+; (lisp-mode-defaults
+; '((lisp-font-lock-keywords
+; lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
+; nil nil (("+-*/.<>=!?$%_&~^:" . "w"))
beginning-of-defun
+; (font-lock-mark-block-function . mark-defun))))
+; (list
+; (cons 'c-mode c-mode-defaults)
+; (cons 'c++-mode c++-mode-defaults)
+; (cons 'objc-mode objc-mode-defaults)
+; (cons 'java-mode java-mode-defaults)
+; (cons 'emacs-lisp-mode lisp-mode-defaults)
+; (cons 'lisp-mode lisp-mode-defaults)
+; (cons 'lisp-interaction-mode lisp-mode-defaults)))
+; "Alist of fall-back Font Lock defaults for major modes.
+
+; This variable should not be used any more.
+; Set the buffer-local `font-lock-keywords' in the major mode instead.
+
+; Each item should be a list of the form:
+
+; (MAJOR-MODE . FONT-LOCK-DEFAULTS)
+
+; where MAJOR-MODE is a symbol and FONT-LOCK-DEFAULTS is a list of default
+; settings. See the variable `font-lock-defaults', which takes precedence.")
+; (make-obsolete-variable 'font-lock-defaults-alist 'font-lock-defaults)
+
+(defvar font-lock-keywords-alist nil
+ "*Alist of `font-lock-keywords' local to a `major-mode'.
+This is normally set via `font-lock-add-keywords' and
+`font-lock-remove-keywords'.")
+
+(defvar font-lock-removed-keywords-alist nil
+ "*Alist of `font-lock-keywords' removed from `major-mode'.
+This is normally set via `font-lock-add-keywords' and
+`font-lock-remove-keywords'.")
+
(defvar font-lock-keywords-only nil
- "Non-nil means Font Lock should not do syntactic fontification.
+ "*Non-nil means Font Lock should not do syntactic fontification.
This is normally set via `font-lock-defaults'.
This should be nil for all ``language'' modes, but other modes, like
@@ -550,37 +810,97 @@
(make-variable-buffer-local 'font-lock-keywords-only)
(defvar font-lock-keywords-case-fold-search nil
- "Whether the strings in `font-lock-keywords' should be case-folded.
-This variable is automatically buffer-local, as the correct value depends
-on the language in use.")
+ "*Non-nil means the patterns in `font-lock-keywords' are case-insensitive.
+This is normally set via `font-lock-defaults'.")
(make-variable-buffer-local 'font-lock-keywords-case-fold-search)
+(defvar font-lock-syntactically-fontified 0
+ "Point up to which `font-lock-syntactic-keywords' has been applied.
+If nil, this is ignored, in which case the syntactic fontification may
+sometimes be slightly incorrect.")
+(make-variable-buffer-local 'font-lock-syntactically-fontified)
+
+(defvar font-lock-syntactic-face-function
+ (lambda (state)
+ (if (nth 3 state)
+ ;; XEmacs addition to separate doc-string face from string face
+ ;; #### Do we really want to keep doing this?
+ (if (and (= (nth 0 state) 1) ;; depth is 1
+ (font-lock-lisp-like major-mode))
+ font-lock-doc-string-face
+ font-lock-string-face)
+ font-lock-comment-face))
+ "Function to determine which face to use when fontifying syntactically.
+The function is called with a single parameter (the state as returned by
+`parse-partial-sexp' at the beginning of the region to highlight) and
+should return a face.")
+
+;;;###autoload
+(defvar font-lock-syntactic-keywords nil
+ "A list of the syntactic keywords to highlight.
+Can be the list or the name of a function or variable whose value is the list.
+See `font-lock-keywords' for a description of the form of this list;
+the differences are listed below. MATCH-HIGHLIGHT should be of the form:
+
+ (MATCH SYNTAX OVERRIDE LAXMATCH)
+
+where SYNTAX can be a string (as taken by `modify-syntax-entry'), a syntax
+table, a cons cell (as returned by `string-to-syntax') or an expression whose
+value is such a form. OVERRIDE cannot be `prepend' or `append'.
+
+For example, an element of the form highlights syntactically:
+
+ (\"\\\\$\\\\(#\\\\)\" 1 \".\")
+
+ a hash character when following a dollar character, with a SYNTAX of
+ \".\" (meaning punctuation syntax). Assuming that the buffer syntax table
does
+ specify hash characters to have comment start syntax, the element will only
+ highlight hash characters that do not follow dollar characters as comments
+ syntactically.
+
+ (\"\\\\('\\\\).\\\\('\\\\)\"
+ (1 \"\\\"\")
+ (2 \"\\\"\"))
+
+ both single quotes which surround a single character, with a SYNTAX of
+ \"\\\"\" (meaning string quote syntax). Assuming that the buffer
syntax table
+ does not specify single quotes to have quote syntax, the element will only
+ highlight single quotes of the form 'c' as strings syntactically.
+ Other forms, such as foo'bar or 'fubar', will not be highlighted as
strings.
+
+This is normally set via `font-lock-defaults'.")
+
+;;;###autoload
+(make-variable-buffer-local 'font-lock-syntactic-keywords)
+
+;; XEmacs addition:
(defvar font-lock-after-fontify-buffer-hook nil
"Function or functions to run after completion of
font-lock-fontify-buffer.")
+;; XEmacs addition:
+(defvar font-lock-after-unfontify-buffer-hook nil
+ "Function or functions to run after completion of
font-lock-fontify-buffer.")
+
(defvar font-lock-syntax-table nil
"Non-nil means use this syntax table for fontifying.
If this is nil, the major mode's syntax table is used.
This is normally set via `font-lock-defaults'.")
(make-variable-buffer-local 'font-lock-syntax-table)
-;; These record the parse state at a particular position, always the start of a
-;; line. Used to make `font-lock-fontify-syntactically-region' faster.
-;; Previously, `font-lock-cache-position' was just a buffer position. However,
-;; under certain situations, this occasionally resulted in mis-fontification.
-;; I think the "situations" were deletion with Lazy Lock mode's deferral.
sm.
-(defvar font-lock-cache-state nil)
-(defvar font-lock-cache-position nil)
-(make-variable-buffer-local 'font-lock-cache-state)
-(make-variable-buffer-local 'font-lock-cache-position)
-
;; If this is nil, we only use the beginning of the buffer if we can't use
;; `font-lock-cache-position' and `font-lock-cache-state'.
(defvar font-lock-beginning-of-syntax-function nil
- "Non-nil means use this function to move back outside of a syntactic block.
+ "*Non-nil means use this function to move back outside of a syntactic block.
+When called with no args it should leave point at the beginning of any
+enclosing syntactic block.
If this is nil, the beginning of the buffer is used (in the worst case).
+This is normally set via `font-lock-defaults'.")
+
+(defvar font-lock-mark-block-function nil
+ "*Non-nil means use this function to mark a block of text.
+When called with no args it should leave point at the beginning of any
+enclosing textual block and mark at the end.
This is normally set via `font-lock-defaults'.")
-(make-variable-buffer-local 'font-lock-beginning-of-syntax-function)
(defvar font-lock-fontify-buffer-function 'font-lock-default-fontify-buffer
"Function to use for fontifying the buffer.
@@ -607,6 +927,13 @@
Currently, valid mode names as `fast-lock-mode' and `lazy-lock-mode'.
This is normally set via `font-lock-defaults'.")
+(defvar font-lock-multiline nil
+ "Whether font-lock should cater to multiline keywords.
+If nil, don't try to handle multiline patterns.
+If t, always handle multiline patterns.
+If `undecided', don't try to handle multiline patterns until you see one.
+Major/minor modes can set this variable if they know which option applies.")
+
;;;###autoload
(defcustom font-lock-mode nil ;; customized for the option menu. dverna
"Non nil means `font-lock-mode' is on"
@@ -617,258 +944,15 @@
:set #'(lambda (var val) (font-lock-mode (or val 0)))
)
-(defvar font-lock-fontified nil) ; whether we have hacked this buffer
+(defvar font-lock-fontified nil) ; Whether we have fontified the buffer.
(put 'font-lock-fontified 'permanent-local t)
-;;;###autoload
-(defvar font-lock-mode-hook nil
- "Function or functions to run on entry to font-lock-mode.")
-
-; whether font-lock-set-defaults has already been run.
-(defvar font-lock-defaults-computed nil)
-(make-variable-buffer-local 'font-lock-defaults-computed)
+(defvar font-lock-set-defaults nil) ; Whether we have set up defaults.
+(make-variable-buffer-local 'font-lock-set-defaults)
-;;; Initialization of faces.
+;; Font Lock mode: The user level functions.
-;; #### barf gag retch. Horrid FSF lossage that we need to
-;; keep around for compatibility with font-lock-keywords that
-;; forget to properly quote their faces. I tried just let-binding
-;; them when we eval the face expression, but that fails because
-;; some files actually use the variables directly in their init code
-;; without quoting them. --ben
-(defvar font-lock-comment-face 'font-lock-comment-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-doc-string-face 'font-lock-doc-string-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-;; GNU compatibility
-(define-compatible-variable-alias
- 'font-lock-doc-face 'font-lock-doc-string-face)
-(defvar font-lock-string-face 'font-lock-string-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-keyword-face 'font-lock-keyword-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-builtin-face 'font-lock-builtin-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-function-name-face 'font-lock-function-name-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-variable-name-face 'font-lock-variable-name-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-type-face 'font-lock-type-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-constant-face 'font-lock-constant-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-reference-face 'font-lock-reference-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face
- "This variable should not be set.
-It is present only for horrid FSF compatibility reasons.
-The corresponding face should be set using `edit-faces' or the
-`set-face-*' functions.")
-
-(defconst font-lock-face-list
- '(font-lock-comment-face
- font-lock-string-face
- font-lock-doc-string-face
- font-lock-keyword-face
- font-lock-builtin-face
- font-lock-function-name-face
- font-lock-variable-name-face
- font-lock-type-face
- font-lock-constant-face
- font-lock-reference-face
- font-lock-preprocessor-face
- font-lock-warning-face))
-
-(defface font-lock-comment-face
- '((((class color) (background dark)) (:foreground "gray80"))
- ;; blue4 is hardly different from black on windows.
- (((class color) (background light) (type mswindows)) (:foreground
"blue"))
- (((class color) (background light)) (:foreground "blue4"))
- (((class grayscale) (background light))
- (:foreground "DimGray" :bold t :italic t))
- (((class grayscale) (background dark))
- (:foreground "LightGray" :bold t :italic t))
- (t (:bold t)))
- "Font Lock mode face used to highlight comments."
- :group 'font-lock-faces)
-
-(defface font-lock-string-face
- '((((class color) (background dark)) (:foreground "tan"))
- (((class color) (background light)) (:foreground "green4"))
- (((class grayscale) (background light)) (:foreground "DimGray" :italic
t))
- (((class grayscale) (background dark)) (:foreground "LightGray" :italic
t))
- (t (:bold t)))
- "Font Lock mode face used to highlight strings."
- :group 'font-lock-faces)
-
-(defface font-lock-doc-string-face
- '((((class color) (background dark)) (:foreground "light coral"))
- (((class color) (background light)) (:foreground "green4"))
- (t (:bold t)))
- "Font Lock mode face used to highlight documentation strings.
-This is currently supported only in Lisp-like modes, which are those
-with \"lisp\" or \"scheme\" in their name. You can explicitly
make
-a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property
-on the major mode's symbol."
- :group 'font-lock-faces)
-
-(defface font-lock-keyword-face
- '((((class color) (background dark)) (:foreground "cyan"))
- ;; red4 is hardly different from black on windows.
- (((class color) (background light) (type mswindows)) (:foreground
"red"))
- (((class color) (background light)) (:foreground "red4"))
- (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
- (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
- (t (:bold t)))
- "Font Lock mode face used to highlight keywords."
- :group 'font-lock-faces)
-
-(defface font-lock-builtin-face
- '((((class color) (background light)) (:foreground "Purple"))
- (((class color) (background dark)) (:foreground "Cyan"))
- (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
- (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
- (t (:bold t)))
- "Font Lock mode face used to highlight builtins."
- :group 'font-lock-faces)
-
-(defface font-lock-function-name-face
- '((((class color) (background dark)) (:foreground "aquamarine"))
- ;; brown4 is hardly different from black on windows.
- ;; I changed it to red because IMO it's pointless and ugly to
- ;; use a million slightly different colors for niggly syntactic
- ;; differences. --ben
- (((class color) (background light) (type mswindows)) (:foreground
"red"))
- (((class color) (background light)) (:foreground "brown4"))
- (t (:bold t :underline t)))
- "Font Lock mode face used to highlight function names."
- :group 'font-lock-faces)
-
-(defface font-lock-variable-name-face
- '((((class color) (background dark)) (:foreground "cyan3"))
- (((class color) (background light)) (:foreground "magenta4"))
- (((class grayscale) (background light))
- (:foreground "Gray90" :bold t :italic t))
- (((class grayscale) (background dark))
- (:foreground "DimGray" :bold t :italic t))
- (t (:underline t)))
- "Font Lock mode face used to highlight variable names."
- :group 'font-lock-faces)
-
-(defface font-lock-type-face
- '((((class color) (background dark)) (:foreground "wheat"))
- (((class color) (background light)) (:foreground "steelblue"))
- (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
- (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
- (t (:bold t)))
- "Font Lock mode face used to highlight types."
- :group 'font-lock-faces)
-
-(defface font-lock-constant-face
- '((((class color) (background light)) (:foreground "CadetBlue"))
- (((class color) (background dark)) (:foreground "Aquamarine"))
- (((class grayscale) (background light))
- (:foreground "LightGray" :bold t :underline t))
- (((class grayscale) (background dark))
- (:foreground "Gray50" :bold t :underline t))
- (t (:bold t :underline t)))
- "Font Lock mode face used to highlight constants and labels."
- :group 'font-lock-faces)
-
-(defface font-lock-reference-face
- '((((class color) (background dark)) (:foreground "cadetblue2"))
- (((class color) (background light)) (:foreground "red3"))
- (((class grayscale) (background light))
- (:foreground "LightGray" :bold t :underline t))
- (((class grayscale) (background dark))
- (:foreground "Gray50" :bold t :underline t)))
- "Font Lock mode face used to highlight references."
- :group 'font-lock-faces)
-
-(defface font-lock-preprocessor-face
- '((((class color) (background dark)) (:foreground "steelblue1"))
- (((class color) (background light)) (:foreground "blue3"))
- (t (:underline t)))
- "Font Lock Mode face used to highlight preprocessor conditionals."
- :group 'font-lock-faces)
-
-(defface font-lock-warning-face
- '((((class color) (background light)) (:foreground "Red" :bold t))
- (((class color) (background dark)) (:foreground "Pink" :bold t))
- (t (:inverse-video t :bold t)))
- "Font Lock mode face used to highlight warnings."
- :group 'font-lock-faces)
-
-(defun font-lock-recompute-variables ()
- ;; Is this a Draconian thing to do?
- (mapc #'(lambda (buffer)
- (with-current-buffer buffer
- (font-lock-mode 0)
- (font-lock-set-defaults t)))
- (buffer-list)))
-
-;; Backwards-compatible crud.
-
-(defun font-lock-reset-all-faces ()
- (dolist (face font-lock-face-list)
- (face-spec-set face (get face 'face-defface-spec))))
-
-(defun font-lock-use-default-fonts ()
- "Reset the font-lock faces to a default set of fonts."
- (interactive)
- ;; #### !!!!
- (font-lock-reset-all-faces))
-
-(defun font-lock-use-default-colors ()
- "Reset the font-lock faces to a default set of colors."
- (interactive)
- ;; #### !!!!
- (font-lock-reset-all-faces))
-
-(defun font-lock-use-default-minimal-decoration ()
- "Reset the font-lock patterns to a fast, minimal set of decorations."
- (and font-lock-maximum-decoration
- (setq font-lock-maximum-decoration nil)
- (font-lock-recompute-variables)))
-
-(defun font-lock-use-default-maximal-decoration ()
- "Reset the font-lock patterns to a larger set of decorations."
- (and (not (eq t font-lock-maximum-decoration))
- (setq font-lock-maximum-decoration t)
- (font-lock-recompute-variables)))
-
-
;;;;;;;;;;;;;;;;;;;;;; actual code ;;;;;;;;;;;;;;;;;;;;;;
;;; To fontify the whole buffer by language syntax, we go through it a
@@ -899,115 +983,568 @@
;;; for example, inserting spaces into `intfoo () {}'.
;;;
-
-;; The user level functions
+(eval-when-compile
+ ;;
+ ;; We don't do this at the top-level as we only use non-autoloaded macros.
+ (require 'cl)
+ ;;
+ ;; Borrowed from lazy-lock.el.
+ ;; We use this to preserve or protect things when modifying text properties.
+ (defmacro save-buffer-state (varlist &rest body)
+ "Bind variables according to VARLIST and eval BODY restoring buffer
state."
+ `(let* ,(append varlist
+ '((modified (buffer-modified-p)) (buffer-undo-list t)
+ (inhibit-read-only t)
+ ;; FSF 21.2: (inhibit-point-motion-hooks t)
+ ;; FSF 21.2: (inhibit-modification-hooks t)
+ ;; FSF 21.2: deactivate-mark
+ buffer-file-name buffer-file-truename))
+ ,@body
+ (when (and (not modified) (buffer-modified-p))
+ (set-buffer-modified-p nil))))
+ (put 'save-buffer-state 'lisp-indent-function 1)
+ ;; FSF 21.2: (def-edebug-spec save-buffer-state let)
+ ;;
+ ;; Shut up the byte compiler.
+ (defvar font-lock-face-attributes)) ; Obsolete but respected if set.
;;;###autoload
-(defun font-lock-mode (&optional arg)
+(define-minor-mode font-lock-mode
"Toggle Font Lock Mode.
-With arg, turn font-lock mode on if and only if arg is positive.
-
-When Font Lock mode is enabled, text is fontified as you type it:
-
- - Comments are displayed in `font-lock-comment-face';
- - Strings are displayed in `font-lock-string-face';
- - Documentation strings (in Lisp-like languages) are displayed in
+With arg, turn Font Lock mode off if and only if arg is a non-positive
+number; if arg is nil, toggle Font Lock mode; anything else turns Font
+Lock on.
+\(Font Lock is also known as \"syntax highlighting\".)
+
+When Font Lock mode is enabled, text is fontified as you type it, in the
+following faces:
+
+ - Comments in `font-lock-comment-face';
+ - Strings in `font-lock-string-face';
+ - Documentation strings (in Lisp-like languages) in
`font-lock-doc-string-face';
- - Language keywords (\"reserved words\") are displayed in
- `font-lock-keyword-face';
- - Function names in their defining form are displayed in
- `font-lock-function-name-face';
- - Variable names in their defining form are displayed in
- `font-lock-variable-name-face';
- - Type names are displayed in `font-lock-type-face';
- - References appearing in help files and the like are displayed
- in `font-lock-reference-face';
- - Preprocessor declarations are displayed in
- `font-lock-preprocessor-face';
+ - Language keywords (\"reserved words\") in `font-lock-keyword-face';
+ - Builtins in `font-lock-builtin-face';
+ - Function names in their defining form in `font-lock-function-name-face';
+ - Variable names in their defining form in `font-lock-variable-name-face';
+ - Type and class names in `font-lock-type-face';
+ - Constants and label names in `font-lock-constant-face';
+ - Things that should stand out in `font-lock-warning-face';
+ - Preprocessor declarations in `font-lock-preprocessor-face';
and
- Certain other expressions are displayed in other faces according
to the value of the variable `font-lock-keywords'.
+
+To customize the faces (colors, fonts, etc.) used by Font Lock for
+fontifying different parts of buffer text, use \\[customize-face].
-Where modes support different levels of fontification, you can use the variable
+You can enable Font Lock mode in any major mode automatically by turning on in
+the major mode's hook. For example, put in your ~/.emacs:
+
+ (add-hook 'c-mode-hook 'turn-on-font-lock)
+
+Alternatively, you can use Global Font Lock mode to automagically turn on Font
+Lock mode in buffers whose major mode supports it and whose major mode is one
+of `font-lock-global-modes'. For example, put in your ~/.emacs:
+
+ (global-font-lock-mode t)
+
+There are a number of support modes that may be used to speed up Font Lock mode
+in various ways, specified via the variable `font-lock-support-mode'. Where
+major modes support different levels of fontification, you can use the variable
`font-lock-maximum-decoration' to specify which level you generally prefer.
When you turn Font Lock mode on/off the buffer is fontified/defontified, though
fontification occurs only if the buffer is less than `font-lock-maximum-size'.
-To fontify a buffer without turning on Font Lock mode, and regardless of buffer
+
+For example, to specify that Font Lock mode use use Lazy Lock mode as a support
+mode and use maximum levels of fontification, put in your ~/.emacs:
+
+ (setq font-lock-support-mode 'lazy-lock-mode)
+ (setq font-lock-maximum-decoration t)
+
+To add your own highlighting for some major mode, and modify the highlighting
+selected automatically via the variable `font-lock-maximum-decoration', you can
+use `font-lock-add-keywords'.
+
+To fontify a buffer, without turning on Font Lock mode and regardless of buffer
size, you can use \\[font-lock-fontify-buffer].
-See the variable `font-lock-keywords' for customization."
- (interactive "P")
- (let ((on-p (if arg (> (prefix-numeric-value arg) 0) (not font-lock-mode)))
- (maximum-size (if (not (consp font-lock-maximum-size))
- font-lock-maximum-size
- (cdr (or (assq major-mode font-lock-maximum-size)
- (assq t font-lock-maximum-size))))))
- ;; Font-lock mode will refuse to turn itself on if in batch mode
- ;; to avoid potential (probably not actual, though) slowdown. We
- ;; used to try to "be nice" by avoiding doing this in temporary
- ;; buffers. But with the deferral code we don't need this, and it
- ;; definitely screws some things up.
- (if (noninteractive)
- (setq on-p nil))
- (cond (on-p
- (make-local-hook 'after-change-functions)
- (add-hook 'after-change-functions
- 'font-lock-after-change-function nil t)
- (add-hook 'pre-idle-hook 'font-lock-pre-idle-hook))
- (t
- (remove-hook 'after-change-functions
- 'font-lock-after-change-function t)
- (setq font-lock-defaults-computed nil
- font-lock-keywords nil)
- ;; We have no business doing this here, since
- ;; pre-idle-hook is global. Other buffers may
- ;; still be in font-lock mode. -dkindred(a)cs.cmu.edu
- ;; (remove-hook 'pre-idle-hook 'font-lock-pre-idle-hook)
- ))
- (set (make-local-variable 'font-lock-mode) on-p)
- (cond (on-p
- (font-lock-set-defaults-1)
- (run-hooks 'font-lock-mode-hook)
- (cond (font-lock-fontified
- nil)
- ((or (null maximum-size) (<= (buffer-size) maximum-size))
- (font-lock-fontify-buffer))
- (font-lock-verbose
- (progress-feedback-with-label
- 'font-lock
- "Fontifying %s... buffer too big." 'abort
- (buffer-name)))))
- (font-lock-fontified
- (setq font-lock-fontified nil)
- (font-lock-unfontify-region (point-min) (point-max))
- (font-lock-thing-lock-cleanup))
- (t
- (font-lock-thing-lock-cleanup)))
- (redraw-modeline)))
+To fontify a block (the function or paragraph containing point, or a number of
+lines around point), perhaps because modification on the current line caused
+syntactic change on other lines, you can use \\[font-lock-fontify-block].
+
+The Font Lock mode default settings can be found by retrieving a property
+named `font-lock-defaults' on the symbol naming the major mode. You can
+set your own default settings for some mode, by setting a buffer local
+value for `font-lock-defaults', via its mode hook.
+
+See the variable `font-lock-keywords' for a description of the format of
+the settings."
+ nil nil nil
+ ;; Font-lock mode will refuse to turn itself on if in batch mode to avoid
+ ;; potential (probably not actual, though) slowdown. We used to try to
+ ;; "be nice" by avoiding doing this in temporary (aka invisible) buffers.
+ ;; But with the deferral code we don't need this, and it definitely
+ ;; screws some things up.
+ (when (or (noninteractive)
+ ;; (eq (aref (buffer-name) 0) ?\ ))
+ )
+ (setq font-lock-mode nil))
+
+ ;; Turn on Font Lock mode.
+ (when font-lock-mode
+ (add-hook 'after-change-functions 'font-lock-after-change-function t t)
+ (add-hook 'pre-idle-hook 'font-lock-pre-idle-hook)
+ (font-lock-set-defaults)
+ (font-lock-turn-on-thing-lock)
+ ;; Fontify the buffer if we have to.
+ (let ((max-size (font-lock-value-in-major-mode font-lock-maximum-size)))
+ (cond (font-lock-fontified
+ nil)
+ ((or (null max-size) (> max-size (buffer-size)))
+ (font-lock-fontify-buffer))
+ (font-lock-verbose
+ (progress-feedback-with-label
+ 'font-lock
+ "Fontifying %s...buffer too big." 'abort
+ (buffer-name))))))
+
+ ;; Turn off Font Lock mode.
+ (unless font-lock-mode
+ (remove-hook 'after-change-functions 'font-lock-after-change-function t)
+ ;; We have no business doing this here, since
+ ;; pre-idle-hook is global. Other buffers may
+ ;; still be in font-lock mode. -dkindred(a)cs.cmu.edu
+ ;; (remove-hook 'pre-idle-hook 'font-lock-pre-idle-hook)
+ (font-lock-unfontify-buffer)
+ (font-lock-turn-off-thing-lock)
+ (font-lock-unset-defaults)))
;; For init-file hooks
;;;###autoload
(defun turn-on-font-lock ()
"Unconditionally turn on Font Lock mode."
(interactive)
- (font-lock-mode 1))
+ (unless font-lock-mode
+ (font-lock-mode)))
;;;###autoload
(defun turn-off-font-lock ()
"Unconditionally turn off Font Lock mode."
(interactive)
- (font-lock-mode 0))
+ (when font-lock-mode
+ (font-lock-mode)))
+
+;;;###autoload
+(defun font-lock-add-keywords (mode keywords &optional append)
+ "Add highlighting KEYWORDS for MODE.
+MODE should be a symbol, the major mode command name, such as `c-mode'
+or nil. If nil, highlighting keywords are added for the current buffer.
+KEYWORDS should be a list; see the variable `font-lock-keywords'.
+By default they are added at the beginning of the current highlighting list.
+If optional argument APPEND is `set', they are used to replace the current
+highlighting list. If APPEND is any other non-nil value, they are added at the
+end of the current highlighting list.
+
+For example:
+
+ (font-lock-add-keywords 'c-mode
+ '((\"\\\\\\=<\\\\(FIXME\\\\):\" 1 font-lock-warning-face prepend)
+ (\"\\\\\\=<\\\\(and\\\\|or\\\\|not\\\\)\\\\\\=>\" .
font-lock-keyword-face)))
+
+adds two fontification patterns for C mode, to fontify `FIXME:' words, even in
+comments, and to fontify `and', `or' and `not' words as keywords.
+
+When used from an elisp package (such as a minor mode), it is recommended
+to use nil for MODE (and place the call in a loop or on a hook) to avoid
+subtle problems due to details of the implementation.
+
+Note that some modes have specialised support for additional patterns, e.g.,
+see the variables `c-font-lock-extra-types', `c++-font-lock-extra-types',
+`objc-font-lock-extra-types' and `java-font-lock-extra-types'."
+ (cond (mode
+ ;; If MODE is non-nil, add the KEYWORDS and APPEND spec to
+ ;; `font-lock-keywords-alist' so `font-lock-set-defaults' uses them.
+ (let ((spec (cons keywords append)) cell)
+ (if (setq cell (assq mode font-lock-keywords-alist))
+ (if (eq append 'set)
+ (setcdr cell (list spec))
+ (setcdr cell (append (cdr cell) (list spec))))
+ (push (list mode spec) font-lock-keywords-alist)))
+ ;; Make sure that `font-lock-removed-keywords-alist' does not
+ ;; contain the new keywords.
+ (font-lock-update-removed-keyword-alist mode keywords append))
+ (t
+ ;; Otherwise set or add the keywords now.
+ (font-lock-set-defaults)
+ (if (eq append 'set)
+ (setq font-lock-keywords keywords)
+ (font-lock-remove-keywords nil keywords) ;to avoid duplicates
+ (let ((old (if (eq (car-safe font-lock-keywords) t)
+ (cdr font-lock-keywords)
+ font-lock-keywords)))
+ (setq font-lock-keywords (if append
+ (append old keywords)
+ (append keywords old))))))))
+
+(defun font-lock-update-removed-keyword-alist (mode keywords append)
+ ;; Update `font-lock-removed-keywords-alist' when adding new
+ ;; KEYWORDS to MODE.
+ ;;
+ ;; When font-lock is enabled first all keywords in the list
+ ;; `font-lock-keywords-alist' are added, then all keywords in the
+ ;; list `font-lock-removed-keywords-alist' are removed. If a
+ ;; keyword was once added, removed, and then added again it must be
+ ;; removed from the removed-keywords list. Otherwise the second add
+ ;; will not take effect.
+ (let ((cell (assq mode font-lock-removed-keywords-alist)))
+ (if cell
+ (if (eq append 'set)
+ ;; A new set of keywords is defined. Forget all about
+ ;; our old keywords that should be removed.
+ (setq font-lock-removed-keywords-alist
+ (delq cell font-lock-removed-keywords-alist))
+ ;; Delete all previously removed keywords.
+ (dolist (kword keywords)
+ (setcdr cell (delete kword (cdr cell))))
+ ;; Delete the mode cell if empty.
+ (if (null (cdr cell))
+ (setq font-lock-removed-keywords-alist
+ (delq cell font-lock-removed-keywords-alist)))))))
+
+;; Written by Anders Lindgren <andersl(a)andersl.com>.
+;;
+;; Case study:
+;; (I) The keywords are removed from a major mode.
+;; In this case the keyword could be local (i.e. added earlier by
+;; `font-lock-add-keywords'), global, or both.
+;;
+;; (a) In the local case we remove the keywords from the variable
+;; `font-lock-keywords-alist'.
+;;
+;; (b) The actual global keywords are not known at this time.
+;; All keywords are added to `font-lock-removed-keywords-alist',
+;; when font-lock is enabled those keywords are removed.
+;;
+;; Note that added keywords are taken out of the list of removed
+;; keywords. This ensure correct operation when the same keyword
+;; is added and removed several times.
+;;
+;; (II) The keywords are removed from the current buffer.
+;;;###autoload
+(defun font-lock-remove-keywords (mode keywords)
+ "Remove highlighting KEYWORDS for MODE.
-;;; FSF has here:
+MODE should be a symbol, the major mode command name, such as `c-mode'
+or nil. If nil, highlighting keywords are removed for the current buffer.
-;; support for add-keywords, global-font-lock-mode and
-;; font-lock-support-mode (unified support for various *-lock modes).
+When used from an elisp package (such as a minor mode), it is recommended
+to use nil for MODE (and place the call in a loop or on a hook) to avoid
+subtle problems due to details of the implementation."
+ (cond (mode
+ ;; Remove one keyword at the time.
+ (dolist (keyword keywords)
+ (let ((top-cell (assq mode font-lock-keywords-alist)))
+ ;; If MODE is non-nil, remove the KEYWORD from
+ ;; `font-lock-keywords-alist'.
+ (when top-cell
+ (dolist (keyword-list-append-pair (cdr top-cell))
+ ;; `keywords-list-append-pair' is a cons with a list of
+ ;; keywords in the car top-cell and the original append
+ ;; argument in the cdr top-cell.
+ (setcar keyword-list-append-pair
+ (delete keyword (car keyword-list-append-pair))))
+ ;; Remove keyword list/append pair when the keyword list
+ ;; is empty and append doesn't specify `set'. (If it
+ ;; should be deleted then previously deleted keywords
+ ;; would appear again.)
+ (let ((cell top-cell))
+ (while (cdr cell)
+ (if (and (null (car (car (cdr cell))))
+ (not (eq (cdr (car (cdr cell))) 'set)))
+ (setcdr cell (cdr (cdr cell)))
+ (setq cell (cdr cell)))))
+ ;; Final cleanup, remove major mode cell if last keyword
+ ;; was deleted.
+ (if (null (cdr top-cell))
+ (setq font-lock-keywords-alist
+ (delq top-cell font-lock-keywords-alist))))
+ ;; Remember the keyword in case it is not local.
+ (let ((cell (assq mode font-lock-removed-keywords-alist)))
+ (if cell
+ (unless (member keyword (cdr cell))
+ (nconc cell (list keyword)))
+ (push (cons mode (list keyword))
+ font-lock-removed-keywords-alist))))))
+ (t
+ ;; Otherwise remove it immediately.
+ (font-lock-set-defaults)
+ (setq font-lock-keywords (copy-sequence font-lock-keywords))
+ (dolist (keyword keywords)
+ (setq font-lock-keywords
+ (delete keyword
+ ;; The keywords might be compiled.
+ (delete (font-lock-compile-keyword keyword)
+ font-lock-keywords)))))))
+
+;;; Global Font Lock mode.
+
+;; XEmacs: Formerly, we had a mechanism where, if `font-lock-auto-fontify' was
+;; non-nil, loading `font-lock' automatically turned on font lock and
+;; insinuated itself into various modes -- all by default for which font-lock
+;; had keywords. Variables `font-lock-mode-enable-list' or
+;; `font-lock-mode-disable-list' could get you finer-grained control. The new
+;; scheme is clearly better -- instead of having a one-time non-reversible way
+;; of turning on font-lock for many modes, and the no-no of having things
+;; automatically happen when a file is loaded, there's a
+;; `global-font-lock-mode' to turn font lock on and off globally whenever you
+;; want. The new `font-lock-global-modes' is allows for finer grained control
+;; ala the two lists we had before. We could try to implement backwards
+;; compatibility for the lists, but since we can't (and won't) be
+;; backwards-compatible with `font-lock-auto-fontify' and the automagical
+;; behavior of loading font-lock, we may as well just make the user adjust
+;; completely to the new scheme. It's not hard by any means. We should be
+;; able to keep option menu compatibility, though.
+
+;; Old variables:
+
+; ;;;###autoload
+; (defcustom font-lock-auto-fontify t
+; "*Whether font-lock should automatically fontify files as they're loaded.
+; This will only happen if font-lock has fontifying keywords for the major
+; mode of the file. You can get finer-grained control over auto-fontification
+; by using this variable in combination with `font-lock-mode-enable-list' or
+; `font-lock-mode-disable-list'."
+; :type 'boolean
+; :group 'font-lock)
+
+; ;;;###autoload
+; (defcustom font-lock-mode-enable-list nil
+; "*List of modes to auto-fontify, if `font-lock-auto-fontify' is
nil."
+; :type '(repeat (symbol :tag "Mode"))
+; :group 'font-lock)
+
+; ;;;###autoload
+; (defcustom font-lock-mode-disable-list nil
+; "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is
t."
+; :type '(repeat (symbol :tag "Mode"))
+; :group 'font-lock)
+
+;; A few people have hassled in the past for a way to make it easier to turn on
+;; Font Lock mode, without the user needing to know for which modes s/he has to
+;; turn it on, perhaps the same way hilit19.el/hl319.el does. I've always
+;; balked at that way, as I see it as just re-moulding the same problem in
+;; another form. That is; some person would still have to keep track of which
+;; modes (which may not even be distributed with Emacs) support Font Lock mode.
+;; The list would always be out of date. And that person might have to be me.
+;; Implementation.
+;;
+;; In a previous discussion the following hack came to mind. It is a gross
+;; hack, but it generally works. We use the convention that major modes start
+;; by calling the function `kill-all-local-variables', which in turn runs
+;; functions on the hook variable `change-major-mode-hook'. We attach our
+;; function `font-lock-change-major-mode' to that hook. Of course, when this
+;; hook is run, the major mode is in the process of being changed and we do not
+;; know what the final major mode will be. So, `font-lock-change-major-mode'
+;; only (a) notes the name of the current buffer, and (b) adds our function
+;; `turn-on-font-lock-if-enabled' to the hook variables `find-file-hooks' and
+;; `post-command-hook' (for buffers that are not visiting files). By the time
+;; the functions on the first of these hooks to be run are run, the new major
+;; mode is assumed to be in place. This way we get a Font Lock function run
+;; when a major mode is turned on, without knowing major modes or their hooks.
+;;
+;; Naturally this requires that (a) major modes run `kill-all-local-variables',
+;; as they are supposed to do, and (b) the major mode is in place after the
+;; file is visited or the command that ran `kill-all-local-variables' has
+;; finished, whichever the sooner. Arguably, any major mode that does not
+;; follow the convension (a) is broken, and I can't think of any reason why (b)
+;; would not be met (except `gnudoit' on non-files). However, it is not clean.
+;;
+;; Probably the cleanest solution is to have each major mode function run some
+;; hook, e.g., `major-mode-hook', but maybe implementing that change is
+;; impractical. I am personally against making `setq' a macro or be advised,
+;; or have a special function such as `set-major-mode', but maybe someone can
+;; come up with another solution?
+
+;; User interface.
+;;
+;; Although Global Font Lock mode is a pseudo-mode, I think that the user
+;; interface should conform to the usual Emacs convention for modes, i.e., a
+;; command to toggle the feature (`global-font-lock-mode') with a variable for
+;; finer control of the mode's behaviour (`font-lock-global-modes').
+;;
+;; The feature should not be enabled by loading font-lock.el, since other
+;; mechanisms for turning on Font Lock mode, such as M-x font-lock-mode RET or
+;; (add-hook 'c-mode-hook 'turn-on-font-lock), would cause Font Lock mode to
be
+;; turned on everywhere. That would not be intuitive or informative because
+;; loading a file tells you nothing about the feature or how to control it. It
+;; would also be contrary to the Principle of Least Surprise. sm.
+
+(defcustom font-lock-global-modes t
+ "*Modes for which Font Lock mode is automagically turned on.
+Global Font Lock mode is controlled by the command `global-font-lock-mode'.
+If nil, means no modes have Font Lock mode automatically turned on.
+If t, all modes that support Font Lock mode have it automatically turned on.
+If a list, it should be a list of `major-mode' symbol names for which Font Lock
+mode should be automatically turned on. The sense of the list is negated if it
+begins with `not'. For example:
+ (c-mode c++-mode)
+means that Font Lock mode is turned on for buffers in C and C++ modes only."
+ :type '(choice (const :tag "none" nil)
+ (const :tag "all" t)
+ (set :menu-tag "mode specific" :tag "modes"
+ :value (not)
+ (const :tag "Except" not)
+ (repeat :inline t (symbol :tag "mode"))))
+ :group 'font-lock)
+
+(defun turn-on-font-lock-if-enabled ()
+ (when (and (or font-lock-defaults
+ (font-lock-find-font-lock-defaults major-mode))
+ (or (eq font-lock-global-modes t)
+ (if (eq (car-safe font-lock-global-modes) 'not)
+ (not (memq major-mode (cdr font-lock-global-modes)))
+ (memq major-mode font-lock-global-modes))))
+ (let (inhibit-quit)
+ (turn-on-font-lock))))
+
+;;;###autoload
+(easy-mmode-define-global-mode
+ global-font-lock-mode font-lock-mode turn-on-font-lock-if-enabled
+ :extra-args (dummy))
+
+;;; End of Global Font Lock mode.
-;; Fontification functions.
+;;; Font Lock Support mode.
+
+;; This is the code used to interface font-lock.el with any of its add-on
+;; packages, and provide the user interface. Packages that have their own
+;; local buffer fontification functions (see below) may have to call
+;; `font-lock-after-fontify-buffer' and/or `font-lock-after-unfontify-buffer'
+;; themselves.
+
+(defcustom font-lock-support-mode 'lazy-lock-mode
+ "*Support mode for Font Lock mode.
+Support modes speed up Font Lock mode by being choosy about when
+fontification occurs. Known support modes are Fast Lock mode (symbol
+`fast-lock-mode'), Lazy Lock mode (symbol `lazy-lock-mode'), Lazy Shot mode
+\(symbol `lazy-shot-mode'), and Just-in-time Lock mode (symbol
+`jit-lock-mode'). See those modes for more info.
+If nil, means support for Font Lock mode is never performed.
+If a symbol, use that support mode.
+If a list, each element should be of the form (MAJOR-MODE . SUPPORT-MODE),
+where MAJOR-MODE is a symbol or t (meaning the default). For example:
+ ((c-mode . fast-lock-mode) (c++-mode . fast-lock-mode) (t . lazy-lock-mode))
+means that Fast Lock mode is used to support Font Lock mode for buffers in C or
+C++ modes, and Lazy Lock mode is used to support Font Lock mode otherwise.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type '(choice (const :tag "none" nil)
+ (const :tag "fast lock" fast-lock-mode)
+ (const :tag "lazy lock" lazy-lock-mode)
+ (const :tag "lazy shot" lazy-shot-mode)
+ (const :tag "jit lock" jit-lock-mode)
+ (repeat :menu-tag "mode specific" :tag "mode specific"
+ :value ((t . jit-lock-mode))
+ (cons :tag "Instance"
+ (radio :tag "Mode"
+ (const :tag "all" t)
+ (symbol :tag "name"))
+ (radio :tag "Support"
+ (const :tag "none" nil)
+ (const :tag "fast lock" fast-lock-mode)
+ (const :tag "lazy lock" lazy-lock-mode)
+ (const :tag "lazy shot" lazy-shot-mode)
+ (const :tag "JIT lock" jit-lock-mode)))
+ ))
+ :version "21.1"
+ :group 'font-lock)
+
+(defvar fast-lock-mode nil)
+(defvar lazy-lock-mode nil)
+(defvar lazy-shot-mode nil)
+(defvar jit-lock-mode nil)
+
+(defun font-lock-turn-on-thing-lock ()
+ (let ((thing-mode (font-lock-value-in-major-mode font-lock-support-mode)))
+ (cond ((eq thing-mode 'fast-lock-mode)
+ (declare-fboundp (fast-lock-mode t)))
+ ((eq thing-mode 'lazy-lock-mode)
+ (declare-fboundp (lazy-lock-mode t)))
+ ((eq thing-mode 'lazy-shot-mode)
+ (declare-fboundp (lazy-shot-mode t)))
+ ((eq thing-mode 'jit-lock-mode)
+ ;; Prepare for jit-lock
+ (remove-hook 'after-change-functions
+ 'font-lock-after-change-function t)
+ (set (make-local-variable 'font-lock-fontify-buffer-function)
+ 'jit-lock-refontify)
+ ;; Don't fontify eagerly (and don't abort is the buffer is large).
+ (set (make-local-variable 'font-lock-fontified) t)
+ ;; Use jit-lock.
+ (declare-fboundp
+ (jit-lock-register 'font-lock-fontify-region
+ (not font-lock-keywords-only)))))))
+
+(defun font-lock-turn-off-thing-lock ()
+ (cond (fast-lock-mode
+ (declare-fboundp (fast-lock-mode -1)))
+ (jit-lock-mode
+ (declare-fboundp
+ (jit-lock-unregister 'font-lock-fontify-region))
+ ;; Reset local vars to the non-jit-lock case.
+ (kill-local-variable 'font-lock-fontify-buffer-function))
+ (lazy-lock-mode
+ (declare-fboundp (lazy-lock-mode -1)))
+ (lazy-shot-mode
+ (declare-fboundp (lazy-shot-mode -1)))))
+
+
+;; Various functions.
+
+;; FSF, for inexplicable reasons that make sense only to rms, does not use a
+;; hook for obvious hook-like functions, instead hard-coding the calls.
+;; There's really no reason to be this bizarre so we go ahead and have hooks.
+
+;; Turn off other related packages if they're on. I prefer a hook. --sm.
+;; These explicit calls are easier to understand
+;; because people know what they will do.
+;; A hook is a mystery because it might do anything whatever. --rms.
+
+
+(defun font-lock-after-fontify-buffer ()
+ (run-hooks 'font-lock-after-fontify-buffer-hook)
+; (cond ((and-boundp 'fast-lock-mode fast-lock-mode)
+; (declare-fboundp (fast-lock-after-fontify-buffer)))
+; ;; Useless now that jit-lock intercepts font-lock-fontify-buffer. -sm
+; ;;((and-boundp 'jit-lock-mode jit-lock-mode)
+; ;; (declare-fboundp (jit-lock-after-fontify-buffer)))
+; ((and-boundp 'lazy-lock-mode lazy-lock-mode)
+; (declare-fboundp (lazy-lock-after-fontify-buffer))))
+ )
+(defun font-lock-after-unfontify-buffer ()
+ (run-hooks 'font-lock-after-unfontify-buffer-hook)
+; (cond ((and-boundp 'fast-lock-mode fast-lock-mode)
+; (declare-fboundp (fast-lock-after-unfontify-buffer)))
+; ;; Useless as well. It's only called when:
+; ;; - turning off font-lock: it does not matter if we leave spurious
+; ;; `fontified' text props around since jit-lock-mode is also off.
+; ;; - font-lock-default-fontify-buffer fails: this is not run
+; ;; any more anyway. -sm
+; ;;
+; ;;((and-boundp 'jit-lock-mode jit-lock-mode)
+; ;; (declare-fboundp (jit-lock-after-unfontify-buffer)))
+; ((and-boundp 'lazy-lock-mode lazy-lock-mode)
+; (declare-fboundp (lazy-lock-after-unfontify-buffer))))
+ )
+
+;;; End of Font Lock Support mode.
+
+
;; We first define some defsubsts to encapsulate the way we add
;; faces to a region of text. I am planning on modifying the
;; text-property mechanism so that multiple independent classes
@@ -1026,9 +1563,7 @@
(defsubst font-lock-remove-face (start end)
;; Remove any syntax highlighting on the characters in the range.
(put-nonduplicable-text-property start end 'face nil)
- (put-nonduplicable-text-property start end 'font-lock nil)
- (if lookup-syntax-properties
- (put-nonduplicable-text-property start end 'syntax-table nil)))
+ (put-nonduplicable-text-property start end 'font-lock nil))
(defsubst font-lock-set-syntax (start end syntax)
;; Set the face on the characters in the range.
@@ -1052,6 +1587,7 @@
;; of `text-property-not-all'. #### If so, `text-property-not-all'
;; should be fixed ...
;;
+ ;;(text-property-not-all start end 'font-lock nil)
(map-extents 'extent-property (current-buffer) start (1- end) 'font-lock))
@@ -1099,8 +1635,6 @@
;;;###autoload
(defun font-lock-fontify-buffer ()
"Fontify the current buffer the way `font-lock-mode' would.
-See `font-lock-mode' for details.
-
This can take a while for large buffers."
(interactive)
(let ((font-lock-verbose (or font-lock-verbose (interactive-p))))
@@ -1116,62 +1650,96 @@
(funcall font-lock-unfontify-region-function beg end loudly))
(defun font-lock-default-fontify-buffer ()
- (interactive)
- ;; if we don't widen, then the C code will fail to
- ;; realize that we're inside a comment.
- (save-restriction
- (widen)
- (let ((was-on font-lock-mode)
- (font-lock-verbose (or font-lock-verbose (interactive-p)))
- (font-lock-message-threshold 0)
- (aborted nil))
- ;; Turn it on to run hooks and get the right font-lock-keywords.
- (or was-on (font-lock-mode 1))
- (font-lock-unfontify-region (point-min) (point-max) t)
- ;; (buffer-syntactic-context-flush-cache)
-
- ;; If a ^G is typed during fontification, abort the fontification, but
- ;; return normally (do not signal.) This is to make it easy to abort
- ;; fontification if it's taking a long time, without also causing the
- ;; buffer not to pop up. If a real abort is desired, the user can ^G
- ;; again.
- ;;
- ;; Possibly this should happen down in font-lock-fontify-region instead
- ;; of here, but since that happens from the after-change-hook (meaning
- ;; much more frequently) I'm afraid of the bad consequences of stealing
- ;; the interrupt character at inopportune times.
- ;;
- (condition-case nil
- (save-excursion
- (font-lock-fontify-region (point-min) (point-max)))
- (t
- (setq aborted t)))
-
- (or was-on ; turn it off if it was off.
- (let ((font-lock-fontified nil)) ; kludge to prevent defontification
- (font-lock-mode 0)))
- (set (make-local-variable 'font-lock-fontified) t)
- (when (and aborted font-lock-verbose)
- (progress-feedback-with-label 'font-lock "Fontifying %s... aborted."
- 'abort (buffer-name))))
- (run-hooks 'font-lock-after-fontify-buffer-hook)))
+ (let* (
+ ;; XEmacs addition: Various stuff relating to messages. Sync
+ ;; carefully!
+ (font-lock-verbose (or font-lock-verbose (interactive-p)))
+ (verbose (if (numberp font-lock-verbose)
+ (> (buffer-size) font-lock-verbose)
+ font-lock-verbose))
+ aborted)
+ (unwind-protect
+ (progn
+ (when verbose
+ (progress-feedback-with-label 'font-lock "Fontifying %s..." 0
+ (buffer-name)))
+ ;; Make sure we have the right `font-lock-keywords' etc.
+ (unless font-lock-mode
+ (font-lock-set-defaults))
+ ;; Make sure we fontify etc. in the whole buffer.
+ (save-restriction
+ (widen)
+ ;; (buffer-syntactic-context-flush-cache)
+ ;; If a ^G is typed during fontification, abort the
+ ;; fontification, but return normally (do not signal.) This is
+ ;; to make it easy to abort fontification if it's taking a long
+ ;; time, without also causing the buffer not to pop up. If a
+ ;; real abort is desired, the user can ^G
+ ;; again.
+ ;;
+ ;; Possibly this should happen down in font-lock-fontify-region
+ ;; instead of here, but since that happens from the
+ ;; after-change-hook (meaning much more frequently) I'm afraid
+ ;; of the bad consequences of stealing the interrupt character
+ ;; at inopportune times.
+ ;;
+ (condition-case nil
+ (save-excursion
+ (save-match-data
+ (font-lock-fontify-region (point-min) (point-max) verbose)
+ (font-lock-after-fontify-buffer)
+ (setq font-lock-fontified t)))
+ ;; We don't restore the old fontification, so it's best to
+ ;; unfontify.
+ (quit (setq aborted t) (font-lock-unfontify-buffer))))
+ ;; Make sure we undo `font-lock-keywords' etc.
+ (unless font-lock-mode
+ (font-lock-unset-defaults)))
+ (when verbose
+ (if aborted
+ (progress-feedback-with-label 'font-lock
+ "Fontifying %s... aborted."
+ 'abort (buffer-name))
+ (clear-progress-feedback 'font-lock))))))
(defun font-lock-default-unfontify-buffer ()
- (font-lock-unfontify-region (point-min) (point-max))
- (set (make-local-variable 'font-lock-fontified) nil))
+ ;; Make sure we unfontify etc. in the whole buffer.
+ (save-restriction
+ (widen)
+ (font-lock-unfontify-region (point-min) (point-max))
+ (font-lock-after-unfontify-buffer)
+ (setq font-lock-fontified nil)))
;; This used to be `font-lock-fontify-region', and before that,
;; `font-lock-fontify-region' used to be the name used for what is now
;; `font-lock-fontify-syntactically-region'.
(defun font-lock-default-fontify-region (beg end &optional loudly)
- (let ((modified (buffer-modified-p))
- (buffer-undo-list t) (inhibit-read-only t)
- (old-syntax-table (syntax-table))
- buffer-file-name buffer-file-truename)
+ (save-buffer-state
+ ((parse-sexp-lookup-properties font-lock-syntactic-keywords)
+ (old-syntax-table (syntax-table)))
(unwind-protect
- (progn
+ (save-restriction
+ (widen)
;; Use the fontification syntax table, if any.
- (if font-lock-syntax-table (set-syntax-table font-lock-syntax-table))
+ (when font-lock-syntax-table
+ (set-syntax-table font-lock-syntax-table))
+ ;; check to see if we should expand the beg/end area for
+ ;; proper multiline matches
+ (when (and font-lock-multiline
+ (> beg (point-min))
+ (get-text-property (1- beg) 'font-lock-multiline))
+ ;; We are just after or in a multiline match.
+ (setq beg (or (previous-single-property-change
+ beg 'font-lock-multiline)
+ (point-min)))
+ (goto-char beg)
+ (setq beg (line-beginning-position)))
+ (when font-lock-multiline
+ (setq end (or (text-property-any end (point-max)
+ 'font-lock-multiline nil)
+ (point-max))))
+ (goto-char end)
+ (setq end (line-beginning-position 2))
;; Now do the fontification.
(font-lock-unfontify-region beg end)
(when font-lock-syntactic-keywords
@@ -1180,8 +1748,7 @@
(font-lock-fontify-syntactically-region beg end loudly))
(font-lock-fontify-keywords-region beg end loudly))
;; Clean up.
- (set-syntax-table old-syntax-table)
- (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))
+ (set-syntax-table old-syntax-table))))
;; The following must be rethought, since keywords can override fontification.
; ;; Now scan for keywords, but not if we are inside a comment now.
@@ -1191,16 +1758,17 @@
; (or (nth 4 state) (nth 7 state))))
; (font-lock-fontify-keywords-region beg end))
-(defun font-lock-default-unfontify-region (beg end &optional maybe-loudly)
- (when (and maybe-loudly font-lock-verbose
+(defun font-lock-default-unfontify-region (beg end &optional loudly)
+ (when (and loudly
(>= (- end beg) font-lock-message-threshold))
(progress-feedback-with-label 'font-lock "Fontifying %s..." 0
(buffer-name)))
- (let ((modified (buffer-modified-p))
- (buffer-undo-list t) (inhibit-read-only t)
- buffer-file-name buffer-file-truename)
+ (save-buffer-state nil
(font-lock-remove-face beg end)
- (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil))))
+ (remove-text-properties beg end
+ (if font-lock-syntactic-keywords
+ '(syntax-table nil font-lock-multiline nil)
+ '(font-lock-multiline nil)))))
;; Following is the original FSF version (similar to our original
;; version, before the deferred stuff was added).
@@ -1209,13 +1777,14 @@
;; Those efforts should be merged.
;; Called when any modification is made to buffer text.
-;(defun font-lock-after-change-function (beg end old-len)
-; (save-excursion
-; (save-match-data
-; ;; Rescan between start of line from `beg' and start of line after
`end'.
-; (font-lock-fontify-region
-; (progn (goto-char beg) (beginning-of-line) (point))
-; (progn (goto-char end) (forward-line 1) (point))))))
+; (defun font-lock-after-change-function (beg end old-len)
+; (let ((inhibit-point-motion-hooks t))
+; (save-excursion
+; (save-match-data
+; ;; Rescan between start of lines enclosing the region.
+; (font-lock-fontify-region
+; (progn (goto-char beg) (beginning-of-line) (point))
+; (progn (goto-char end) (forward-line 1) (point)))))))
(defvar font-lock-always-fontify-immediately nil
"Set this to non-nil to disable font-lock deferral.
@@ -1310,93 +1879,42 @@
(font-lock-fontify-region beg end))
font-lock-range-table))))))
font-lock-pending-buffer-table)))
-
-;; Syntactic fontification functions.
-(defun font-lock-lisp-like (mode)
- ;; Note: (or (get mode 'font-lock-lisp-like) (string-match ...)) is
- ;; not enough because the property needs to be able to specify a nil
- ;; value.
- (if (plist-member (symbol-plist mode) 'font-lock-lisp-like)
- (get mode 'font-lock-lisp-like)
- ;; If the property is not specified, guess. Similar logic exists
- ;; in add-log, but I think this encompasses more modes.
- (string-match "lisp\\|scheme" (symbol-name mode))))
-
-;; fontify-syntactically-region used to use syntactically-sectionize, which
-;; was supposedly much faster than the FSF version because it was written in
-;; C. However, the FSF version uses parse-partial-sexp, which is also
-;; written in C, and the benchmarking I did showed the
-;; syntactically-sectionize code to be slower overall. So here's the FSF
-;; version, modified to support font-lock-doc-string-face.
-;; -- mct 2000-12-29
-(defun font-lock-fontify-syntactically-region (start end &optional loudly)
- "Put proper face on each string and comment between START and END.
-START should be at the beginning of a line."
- (if font-lock-keywords-only
- nil
+(defun font-lock-fontify-block (&optional arg)
+ "Fontify some lines the way `font-lock-fontify-buffer' would.
+The lines could be a function or paragraph, or a specified number of lines.
+If ARG is given, fontify that many lines before and after point, or 16 lines if
+no ARG is given and `font-lock-mark-block-function' is nil.
+If `font-lock-mark-block-function' non-nil and no ARG is given, it is used to
+delimit the region to fontify."
+ (interactive "P")
+ (let (;FSF 21.2 (inhibit-point-motion-hooks t)
+ font-lock-beginning-of-syntax-function
+ ;FSF 21.2 deactivate-mark
+ )
+ ;; Make sure we have the right `font-lock-keywords' etc.
+ (if (not font-lock-mode) (font-lock-set-defaults))
+ (save-excursion
+ (save-match-data
+ (condition-case error-data
+ (if (or arg (not font-lock-mark-block-function))
+ (let ((lines (if arg (prefix-numeric-value arg) 16)))
+ (font-lock-fontify-region
+ (save-excursion (forward-line (- lines)) (point))
+ (save-excursion (forward-line lines) (point))))
+ (funcall font-lock-mark-block-function)
+ (font-lock-fontify-region (point) (mark)))
+ ((error quit) (message "Fontifying block...%s" error-data)))))))
- ;; #### Shouldn't this just be using 'loudly??
- (when (and font-lock-verbose
- (>= (- end start) font-lock-message-threshold))
- (progress-feedback-with-label 'font-lock
- "Fontifying %s... (syntactically)" 5
- (buffer-name)))
- (goto-char start)
+;; FSF 21.2.
+;;(define-key facemenu-keymap "\M-g" 'font-lock-fontify-block)
- (let ((lisp-like (font-lock-lisp-like major-mode))
- (cache (marker-position font-lock-cache-position))
- state string beg depth)
- ;;
- ;; Find the state at the `beginning-of-line' before `start'.
- (if (eq start cache)
- ;; Use the cache for the state of `start'.
- (setq state font-lock-cache-state)
- ;; Find the state of `start'.
- (if (null font-lock-beginning-of-syntax-function)
- ;; Use the state at the previous cache position, if any, or
- ;; otherwise calculate from `point-min'.
- (if (or (null cache) (< start cache))
- (setq state (parse-partial-sexp (point-min) start))
- (setq state (parse-partial-sexp cache start nil nil
- font-lock-cache-state)))
- ;; Call the function to move outside any syntactic block.
- (funcall font-lock-beginning-of-syntax-function)
- (setq state (parse-partial-sexp (point) start)))
- ;; Cache the state and position of `start'.
- (setq font-lock-cache-state state)
- (set-marker font-lock-cache-position start))
- ;;
- ;; If the region starts inside a string or comment, show the extent of it.
- (when (or (nth 3 state) (nth 4 state))
- (setq string (nth 3 state) beg (point))
- (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
- (font-lock-set-face beg (point) (if string
- font-lock-string-face
- font-lock-comment-face)))
- ;;
- ;; Find each interesting place between here and `end'.
- (while (and (< (point) end)
- (progn
- (setq state (parse-partial-sexp (point) end nil nil state
- 'syntax-table))
- (or (nth 3 state) (nth 4 state))))
- (setq depth (nth 0 state) string (nth 3 state) beg (nth 8 state))
- (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
- (if string
- ;; #### It would be nice if we handled Python and other
- ;; non-Lisp languages with docstrings correctly.
- (let ((face (if (and lisp-like (= depth 1))
- 'font-lock-doc-string-face
- 'font-lock-string-face)))
- (if font-lock-fontify-string-delimiters
- (font-lock-set-face beg (point) face)
- (font-lock-set-face (+ beg 1) (- (point) 1) face)))
- (font-lock-set-face beg (point)
- font-lock-comment-face))))))
+;;; End of Fontification functions.
;;; Additional text property functions.
+;;;; We write:
+
;; The following three text property functions are not generally available (and
;; it's not certain that they should be) so they are inlined for speed.
;; The case for `fillin-text-property' is simple; it may or not be generally
@@ -1411,17 +1929,17 @@
;; the first one to take both SETPROP and MARKPROP, in accordance with the
;; changed definitions of `font-lock-any-faces-p' and `font-lock-set-face'.
-(defsubst font-lock-fillin-text-property (start end setprop markprop value
&optional object)
- "Fill in one property of the text from START to END.
-Arguments PROP and VALUE specify the property and value to put where none are
-already in place. Therefore existing property values are not overwritten.
-Optional argument OBJECT is the string or buffer containing the text."
- (let ((start (text-property-any start end markprop nil object)) next)
- (while start
- (setq next (next-single-property-change start markprop object end))
- (put-nonduplicable-text-property start next setprop value object)
- (put-nonduplicable-text-property start next markprop value object)
- (setq start (text-property-any next end markprop nil object)))))
+;;;; FSF writes:
+
+;; The following text property functions should be builtins. This means they
+;; should be written in C and put with all the other text property functions.
+;; In the meantime, those that are used by font-lock.el are defined in Lisp
+;; below and given a `font-lock-' prefix. Those that are not used are defined
+;; in Lisp below and commented out. sm.
+
+;;;; XEmacs: We also have some additions here: call font-lock-unique in
+;;;; certain places, allow for two different properties in
+;;;; font-lock-fillin-text-property.
;; This function (from simon's unique.el) is rewritten and inlined for speed.
;(defun unique (list function)
@@ -1476,6 +1994,52 @@
(font-lock-unique (append (if (listp prev) prev (list prev)) val))
object)
(setq start next))))
+
+(defsubst font-lock-fillin-text-property (start end setprop markprop value
&optional object)
+ "Fill in one property of the text from START to END.
+Arguments PROP and VALUE specify the property and value to put where none are
+already in place. Therefore existing property values are not overwritten.
+Optional argument OBJECT is the string or buffer containing the text."
+ (let ((start (text-property-any start end markprop nil object)) next)
+ (while start
+ (setq next (next-single-property-change start markprop object end))
+ (put-nonduplicable-text-property start next setprop value object)
+ (put-nonduplicable-text-property start next markprop value object)
+ (setq start (text-property-any next end markprop nil object)))))
+
+;; For completeness: this is to `remove-text-properties' as
`put-text-property'
+;; is to `add-text-properties', etc.
+;(defun remove-text-property (start end property &optional object)
+; "Remove a property from text from START to END.
+;Argument PROPERTY is the property to remove.
+;Optional argument OBJECT is the string or buffer containing the text.
+;Return t if the property was actually removed, nil otherwise."
+; (remove-text-properties start end (list property) object))
+
+;; For consistency: maybe this should be called `remove-single-property' like
+;; `next-single-property-change' (not `next-single-text-property-change'),
etc.
+;(defun remove-single-text-property (start end prop value &optional object)
+; "Remove a specific property value from text from START to END.
+;Arguments PROP and VALUE specify the property and value to remove. The
+;resulting property values are not equal to VALUE nor lists containing VALUE.
+;Optional argument OBJECT is the string or buffer containing the text."
+; (let ((start (text-property-not-all start end prop nil object)) next prev)
+; (while start
+; (setq next (next-single-property-change start prop object end)
+; prev (get-text-property start prop object))
+; (cond ((and (symbolp prev) (eq value prev))
+; (remove-text-property start next prop object))
+; ((and (listp prev) (memq value prev))
+; (let ((new (delq value prev)))
+; (cond ((null new)
+; (remove-text-property start next prop object))
+; ((= (length new) 1)
+; (put-text-property start next prop (car new) object))
+; (t
+; (put-text-property start next prop new object))))))
+; (setq start (text-property-not-all next end prop nil object)))))
+
+;;; End of Additional text property functions.
;;; Syntactic regexp fontification functions (taken from FSF Emacs 20.7.1)
@@ -1492,17 +2056,29 @@
HIGHLIGHT should be of the form MATCH-HIGHLIGHT,
see `font-lock-syntactic-keywords'."
(let* ((match (nth 0 highlight))
- (start (match-beginning match)) (end (match-end match))
- (value (nth 1 highlight))
- (override (nth 2 highlight)))
- (unless (numberp (car-safe value))
+ (start (match-beginning match)) (end (match-end match))
+ (value (nth 1 highlight))
+ (override (nth 2 highlight)))
+ (when (and (consp value) (not (numberp (car value))))
(setq value (eval value)))
+ (when (stringp value) (setq value (string-to-syntax value)))
(cond ((not start)
;; No match but we might not signal an error.
(or (nth 3 highlight)
(error "No match %d in highlight %S" match highlight)))
((not override)
+ ;; FSF 21.2 version. #### Need to investigate here the use of
+ ;; map-extents vs. text-property-not-all, which should be just
+ ;; as fast, if not faster.
;; Cannot override existing fontification.
+; (or (text-property-not-all start end 'syntax-table nil)
+; (put-text-property start end 'syntax-table value)))
+; ((eq override t)
+; ;; Override existing fontification.
+; (put-text-property start end 'syntax-table value))
+; ((eq override 'keep)
+; ;; Keep existing fontification.
+; (font-lock-fillin-text-property start end 'syntax-table value)))))
(or (map-extents 'extent-property (current-buffer)
start end 'syntax-table)
(font-lock-set-syntax start end value)))
@@ -1516,66 +2092,163 @@
(defun font-lock-fontify-syntactic-anchored-keywords (keywords limit)
"Fontify according to KEYWORDS until LIMIT.
- KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
- LIMIT can be modified by the value of its PRE-MATCH-FORM."
+KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
+LIMIT can be modified by the value of its PRE-MATCH-FORM."
(let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights
- ;; Evaluate PRE-MATCH-FORM.
- (pre-match-value (eval (nth 1 keywords))))
+ ;; Evaluate PRE-MATCH-FORM.
+ (pre-match-value (eval (nth 1 keywords))))
;; Set LIMIT to value of PRE-MATCH-FORM or the end of line.
(if (and (numberp pre-match-value) (> pre-match-value (point)))
- (setq limit pre-match-value)
- (save-excursion (end-of-line) (setq limit (point))))
+ (setq limit pre-match-value)
+ (setq limit (line-end-position)))
(save-match-data
;; Find an occurrence of `matcher' before `limit'.
(while (if (stringp matcher)
- (re-search-forward matcher limit t)
- (funcall matcher limit))
- ;; Apply each highlight to this instance of `matcher'.
- (setq highlights lowdarks)
- (while highlights
- (font-lock-apply-syntactic-highlight (car highlights))
- (setq highlights (cdr highlights)))))
+ (re-search-forward matcher limit t)
+ (funcall matcher limit))
+ ;; Apply each highlight to this instance of `matcher'.
+ (setq highlights lowdarks)
+ (while highlights
+ (font-lock-apply-syntactic-highlight (car highlights))
+ (setq highlights (cdr highlights)))))
;; Evaluate POST-MATCH-FORM.
(eval (nth 2 keywords))))
(defun font-lock-fontify-syntactic-keywords-region (start end)
"Fontify according to `font-lock-syntactic-keywords' between START and END.
+START should be at the beginning of a line."
+ ;; Ensure the beginning of the file is properly syntactic-fontified.
+ (when (and font-lock-syntactically-fontified
+ (< font-lock-syntactically-fontified start))
+ (setq start (max font-lock-syntactically-fontified (point-min)))
+ (setq font-lock-syntactically-fontified end))
+ ;; If `font-lock-syntactic-keywords' is a symbol, get the real keywords.
+ (when (symbolp font-lock-syntactic-keywords)
+ (setq font-lock-syntactic-keywords (font-lock-eval-keywords
+ font-lock-syntactic-keywords)))
+ ;; If `font-lock-syntactic-keywords' is not compiled, compile it.
+ (unless (eq (car font-lock-syntactic-keywords) t)
+ (setq font-lock-syntactic-keywords (font-lock-compile-keywords
+ font-lock-syntactic-keywords)))
+ ;; Get down to business.
+ (let ((case-fold-search font-lock-keywords-case-fold-search)
+ (keywords (cdr font-lock-syntactic-keywords))
+ keyword matcher highlights)
+ (while keywords
+ ;; Find an occurrence of `matcher' from `start' to `end'.
+ (setq keyword (car keywords) matcher (car keyword))
+ (goto-char start)
+ (while (if (stringp matcher)
+ (re-search-forward matcher end t)
+ (funcall matcher end))
+ ;; Apply each highlight to this instance of `matcher', which may be
+ ;; specific highlights or more keywords anchored to `matcher'.
+ (setq highlights (cdr keyword))
+ (while highlights
+ (if (numberp (car (car highlights)))
+ (font-lock-apply-syntactic-highlight (car highlights))
+ (font-lock-fontify-syntactic-anchored-keywords (car highlights)
+ end))
+ (setq highlights (cdr highlights))))
+ (setq keywords (cdr keywords)))))
+
+;;; End of Syntactic regexp fontification functions.
+
+
+;; Syntactic fontification functions.
+
+;; These record the parse state at a particular position, always the start of a
+;; line. Used to make `font-lock-fontify-syntactically-region' faster.
+;; Previously, `font-lock-cache-position' was just a buffer position. However,
+;; under certain situations, this occasionally resulted in mis-fontification.
+;; I think the "situations" were deletion with Lazy Lock mode's deferral.
sm.
+(defvar font-lock-cache-state nil)
+(defvar font-lock-cache-position nil)
+(make-variable-buffer-local 'font-lock-cache-state)
+(make-variable-buffer-local 'font-lock-cache-position)
+
+(defun font-lock-lisp-like (mode)
+ ;; Note: (or (get mode 'font-lock-lisp-like) (string-match ...)) is
+ ;; not enough because the property needs to be able to specify a nil
+ ;; value.
+ (if (plist-member (symbol-plist mode) 'font-lock-lisp-like)
+ (get mode 'font-lock-lisp-like)
+ ;; If the property is not specified, guess. Similar logic exists
+ ;; in add-log, but I think this encompasses more modes.
+ (string-match "lisp\\|scheme" (symbol-name mode))))
+
+;; fontify-syntactically-region used to use syntactically-sectionize, which
+;; was supposedly much faster than the FSF version because it was written in
+;; C. However, the FSF version uses parse-partial-sexp, which is also
+;; written in C, and the benchmarking I did showed the
+;; syntactically-sectionize code to be slower overall. So here's the FSF
+;; version, modified to support font-lock-doc-string-face.
+;; -- mct 2000-12-29
+;; Now synched with 21.2. --ben
+(defun font-lock-fontify-syntactically-region (start end &optional loudly)
+ "Put proper face on each string and comment between START and END.
START should be at the beginning of a line."
-;; ;; If `font-lock-syntactic-keywords' is a symbol, get the real keywords.
- (when (symbolp font-lock-syntactic-keywords)
- (setq font-lock-syntactic-keywords (font-lock-eval-keywords
- font-lock-syntactic-keywords)))
- ;; If `font-lock-syntactic-keywords' is not compiled, compile it.
- (unless (eq (car font-lock-syntactic-keywords) t)
- (setq font-lock-syntactic-keywords (font-lock-compile-keywords
- font-lock-syntactic-keywords)))
- ;; Get down to business.
- (let ((case-fold-search font-lock-keywords-case-fold-search)
- (keywords (cdr font-lock-syntactic-keywords))
- keyword matcher highlights)
- (while keywords
- ;; Find an occurrence of `matcher' from `start' to `end'.
- (setq keyword (car keywords) matcher (car keyword))
- (goto-char start)
- (while (if (stringp matcher)
- (re-search-forward matcher end t)
- (funcall matcher end))
- ;; Apply each highlight to this instance of `matcher', which may be
- ;; specific highlights or more keywords anchored to `matcher'.
- (setq highlights (cdr keyword))
- (while highlights
- (if (numberp (car (car highlights)))
- (font-lock-apply-syntactic-highlight (car highlights))
- (font-lock-fontify-syntactic-anchored-keywords (car highlights)
- end))
- (setq highlights (cdr highlights))))
- (setq keywords (cdr keywords)))))
+ (let ((cache (marker-position font-lock-cache-position))
+ state face beg stringp) ;; STRINGP is XEmacs addition
+ ;; XEmacs: implement font-lock-message-threshold and progress bars.
+ (if (and loudly (>= (- end start) font-lock-message-threshold))
+ (progress-feedback-with-label
+ 'font-lock "Fontifying %s... (syntactically...)" 5
+ (buffer-name)))
+ (goto-char start)
+ ;;
+ ;; Find the state at the `beginning-of-line' before `start'.
+ (if (eq start cache)
+ ;; Use the cache for the state of `start'.
+ (setq state font-lock-cache-state)
+ ;; Find the state of `start'.
+ (if (null font-lock-beginning-of-syntax-function)
+ ;; Use the state at the previous cache position, if any, or
+ ;; otherwise calculate from `point-min'.
+ (if (or (null cache) (< start cache))
+ (setq state (parse-partial-sexp (point-min) start))
+ (setq state (parse-partial-sexp cache start nil nil
+ font-lock-cache-state)))
+ ;; Call the function to move outside any syntactic block.
+ (funcall font-lock-beginning-of-syntax-function)
+ (setq state (parse-partial-sexp (point) start)))
+ ;; Cache the state and position of `start'.
+ (setq font-lock-cache-state state)
+ (set-marker font-lock-cache-position start))
+ ;;
+ ;; If the region starts inside a string or comment, show the extent of it.
+ (when (or (nth 3 state) (nth 4 state))
+ (setq face (funcall font-lock-syntactic-face-function state) beg (point))
+ (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
+ ;; XEmacs change: call font-lock-set-face
+ (font-lock-set-face beg (point) face))
+ ;;
+ ;; Find each interesting place between here and `end'.
+ (while (and (< (point) end)
+ (progn
+ (setq state (parse-partial-sexp (point) end nil nil state
+ 'syntax-table))
+ (or (nth 3 state) (nth 4 state))))
+ (setq face (funcall font-lock-syntactic-face-function state)
+ stringp (nth 3 state)
+ beg (nth 8 state))
+ (setq state (parse-partial-sexp (point) end nil nil state 'syntax-table))
+ ;; XEmacs change: call font-lock-set-face, handle
+ ;; font-lock-fontify-string-delimiters.
+ (if (and stringp (not font-lock-fontify-string-delimiters))
+ (font-lock-set-face (+ beg 1) (- (point) 1) face)
+ (font-lock-set-face beg (point) face)))))
+
+;;; End of Syntactic fontification functions.
+
;;; Regexp fontification functions.
(defsubst font-lock-apply-highlight (highlight)
"Apply HIGHLIGHT following a match.
HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'."
+ ;; XEmacs changes to this. The FSF function is basically unchanged from
+ ;; 19.34 through 21.2 but we have some additions -- e.g. NEWFACE.
(let* ((match (nth 0 highlight))
(start (match-beginning match)) (end (match-end match))
(override (nth 2 highlight)))
@@ -1610,17 +2283,27 @@
KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
LIMIT can be modified by the value of its PRE-MATCH-FORM."
(let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights
+ (lead-start (match-beginning 0))
;; Evaluate PRE-MATCH-FORM.
(pre-match-value (eval (nth 1 keywords))))
;; Set LIMIT to value of PRE-MATCH-FORM or the end of line.
- (if (and (numberp pre-match-value) (> pre-match-value (point)))
- (setq limit pre-match-value)
- (save-excursion (end-of-line) (setq limit (point))))
+ (if (not (and (numberp pre-match-value) (> pre-match-value (point))))
+ (setq limit (line-end-position))
+ (setq limit pre-match-value)
+ (when (and font-lock-multiline (>= limit (line-beginning-position 2)))
+ ;; this is a multiline anchored match
+ ;; (setq font-lock-multiline t)
+ (put-text-property (if (= limit (line-beginning-position 2))
+ (1- limit)
+ (min lead-start (point)))
+ limit
+ 'font-lock-multiline t)))
(save-match-data
;; Find an occurrence of `matcher' before `limit'.
- (while (if (stringp matcher)
- (re-search-forward matcher limit t)
- (funcall matcher limit))
+ (while (and (< (point) limit)
+ (if (stringp matcher)
+ (re-search-forward matcher limit t)
+ (funcall matcher limit)))
;; Apply each highlight to this instance of `matcher'.
(setq highlights lowdarks)
(while highlights
@@ -1629,10 +2312,11 @@
;; Evaluate POST-MATCH-FORM.
(eval (nth 2 keywords))))
-(defun font-lock-fontify-keywords-region (start end &optional loudvar)
+(defun font-lock-fontify-keywords-region (start end &optional loudly)
"Fontify according to `font-lock-keywords' between START and END.
START should be at the beginning of a line."
- (let ((loudly (and font-lock-verbose
+ ;; XEmacs addition: font-lock-message-threshold
+ (let ((loudly (and loudly
(>= (- end start) font-lock-message-threshold))))
;; If `font-lock-keywords' is not compiled, compile it.
(unless (eq (car-safe font-lock-keywords) t)
@@ -1640,11 +2324,12 @@
font-lock-keywords)))
(let* ((case-fold-search font-lock-keywords-case-fold-search)
(keywords (cdr font-lock-keywords))
- (bufname (buffer-name))
+ (bufname (buffer-name)) (count 0)
+ keyword matcher highlights
+ ;; XEmacs addition: for progress gauge
+ regexp-dots
(progress 5) (old-progress 5)
- (iter 0)
- (nkeywords (length keywords))
- keyword matcher highlights)
+ (nkeywords (length keywords)))
;;
;; Fontify each item in `font-lock-keywords' from `start' to `end'.
;; In order to measure progress accurately we need to know how
@@ -1652,6 +2337,8 @@
;; is ((pos - start)/ (end - start) * nkeywords
;; + iteration / nkeywords) * 100
(while keywords
+ ;; XEmacs: message display is down below.
+ (setq regexp-dots (make-string (incf count) ?.))
;;
;; Find an occurrence of `matcher' from `start' to `end'.
(setq keyword (car keywords) matcher (car keyword))
@@ -1660,78 +2347,78 @@
(if (stringp matcher)
(re-search-forward matcher end t)
(funcall matcher end)))
- ;; calculate progress
+ ;; XEmacs: calculate progress, display
(setq progress
(+ (/ (* (- (point) start) 95) (* (- end start) nkeywords))
- (/ (* iter 95) nkeywords) 5))
+ (/ (* (1- count) 95) nkeywords) 5))
(when (and loudly (> progress old-progress))
(progress-feedback-with-label 'font-lock
- "Fontifying %s... (regexps)"
- progress bufname))
+ "Fontifying %s... (regexps..%s)"
+ progress bufname regexp-dots))
(setq old-progress progress)
+ (when (and font-lock-multiline
+ (>= (point)
+ (save-excursion (goto-char (match-beginning 0))
+ (forward-line 1) (point))))
+ ;; this is a multiline regexp match
+ ;; (setq font-lock-multiline t)
+ (put-nonduplicable-text-property
+ (if (= (point)
+ (save-excursion
+ (goto-char (match-beginning 0))
+ (forward-line 1) (point)))
+ (1- (point))
+ (match-beginning 0))
+ (point)
+ 'font-lock-multiline t))
;; Apply each highlight to this instance of `matcher', which may be
;; specific highlights or more keywords anchored to `matcher'.
(setq highlights (cdr keyword))
(while highlights
(if (numberp (car (car highlights)))
+ ;; XEmacs addition (next line)
(let ((end (match-end (car (car highlights)))))
(font-lock-apply-highlight (car highlights))
- ;; restart search just after the end of the
- ;; keyword so keywords can share bracketing
- ;; expressions.
+ ;; XEmacs addition (Kyle Jones, 1997): restart search
+ ;; just after the end of the keyword so keywords can
+ ;; share bracketing expressions.
(and end (goto-char end)))
(font-lock-fontify-anchored-keywords (car highlights) end))
(setq highlights (cdr highlights))))
- (setq iter (1+ iter))
(setq keywords (cdr keywords))))
(if loudly
(progress-feedback-with-label 'font-lock "Fontifying %s... " 100
(buffer-name)))))
-
-
-;; Various functions.
-
-;; Turn off other related packages if they're on. I prefer a hook. --sm.
-;; These explicit calls are easier to understand
-;; because people know what they will do.
-;; A hook is a mystery because it might do anything whatever. --rms.
-(defun font-lock-thing-lock-cleanup ()
- (cond ((and-boundp 'fast-lock-mode fast-lock-mode)
- (declare-fboundp (fast-lock-mode -1)))
- ((and-boundp 'lazy-lock-mode lazy-lock-mode)
- (declare-fboundp (lazy-lock-mode -1)))
- ((and-boundp 'lazy-shot-mode lazy-shot-mode)
- (declare-fboundp (lazy-shot-mode -1)))))
-
-; Do something special for these packages after fontifying. I prefer a hook.
-(defun font-lock-after-fontify-buffer ()
- (cond ((and-boundp 'fast-lock-mode fast-lock-mode)
- (declare-fboundp (fast-lock-after-fontify-buffer)))
- ((and-boundp 'lazy-lock-mode lazy-lock-mode)
- (declare-fboundp (lazy-lock-after-fontify-buffer)))))
+;;; End of Keyword regexp fontification functions.
;; Various functions.
(defun font-lock-compile-keywords (keywords)
- "Compile KEYWORDS (a list) and return the list of compiled keywords.
-Each keyword has the form (MATCHER HIGHLIGHT ...). See
`font-lock-keywords'."
+ "Compile KEYWORDS into the form (t KEYWORD ...).
+Here KEYWORD is of the form (MATCHER HIGHLIGHT ...) as shown in the
+`font-lock-keywords' doc string."
(if (eq (car-safe keywords) t)
keywords
(cons t (mapcar 'font-lock-compile-keyword keywords))))
(defun font-lock-compile-keyword (keyword)
- (cond ((nlistp keyword) ; Just MATCHER
+ (cond ((nlistp keyword) ; MATCHER
(list keyword '(0 font-lock-keyword-face)))
- ((eq (car keyword) 'eval) ; Specified (eval . FORM)
+ ((eq (car keyword) 'eval) ; (eval . FORM)
(font-lock-compile-keyword (eval (cdr keyword))))
- ((numberp (cdr keyword)) ; Specified (MATCHER . MATCH)
+ ((eq (car-safe (cdr keyword)) 'quote) ; (MATCHER . 'FORM)
+ ;; If FORM is a FACENAME then quote it. Otherwise ignore the quote.
+ (if (symbolp (nth 2 keyword))
+ (list (car keyword) (list 0 (cdr keyword)))
+ (font-lock-compile-keyword (cons (car keyword) (nth 2 keyword)))))
+ ((numberp (cdr keyword)) ; (MATCHER . MATCH)
(list (car keyword) (list (cdr keyword) 'font-lock-keyword-face)))
- ((symbolp (cdr keyword)) ; Specified (MATCHER . FACENAME)
+ ((symbolp (cdr keyword)) ; (MATCHER . FACENAME)
(list (car keyword) (list 0 (cdr keyword))))
- ((nlistp (nth 1 keyword)) ; Specified (MATCHER . HIGHLIGHT)
+ ((nlistp (nth 1 keyword)) ; (MATCHER . HIGHLIGHT)
(list (car keyword) (cdr keyword)))
- (t ; Hopefully (MATCHER HIGHLIGHT ...)
+ (t ; (MATCHER HIGHLIGHT ...)
keyword)))
(defun font-lock-eval-keywords (keywords)
@@ -1742,9 +2429,19 @@
(funcall keywords)
(eval keywords)))))
+(defun font-lock-value-in-major-mode (alist)
+ "Return value in ALIST for `major-mode', or ALIST if it is not an alist.
+Structure is ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t."
+ (if (consp alist)
+ (cdr (or (assq major-mode alist) (assq t alist)))
+ alist))
+
(defun font-lock-choose-keywords (keywords level)
- ;; Return LEVELth element of KEYWORDS. A LEVEL of nil is equal to a
- ;; LEVEL of 0, a LEVEL of t is equal to (1- (length KEYWORDS)).
+ "Return LEVELth element of KEYWORDS.
+A LEVEL of nil is equal to a LEVEL of 0, a LEVEL of t is equal to
+\(1- (length KEYWORDS))."
+ ;; XEmacs: This function is rather different because it supports LEVEL
+ ;; being a cons of data, from which we have to extract the correct value.
(let ((level (if (not (consp level))
level
(cdr (or (assq major-mode level) (assq t level))))))
@@ -1771,122 +2468,490 @@
)
raw-defaults))
-(defun font-lock-examine-syntax-table ()
- ; Computes the value of font-lock-keywords-only for this buffer.
- (if (eq (syntax-table) (standard-syntax-table))
- ;; Assume that modes which haven't bothered to install their own
- ;; syntax table don't do anything syntactically interesting.
- ;; Really, the standard-syntax-table shouldn't have comments and
- ;; strings in it, but changing that now might break things.
- nil
- ;; else map over the syntax table looking for strings or comments.
- (let (got-one)
- ;; XEmacs 20.0 ...
- (if (fboundp 'map-syntax-table)
- (setq got-one
- (map-syntax-table
- #'(lambda (key value)
- (memq (char-syntax-from-code value)
- '(?\" ?\< ?\> ?\$)))
- (syntax-table)))
- ;; older Emacsen.
- (let ((i (1- (length (syntax-table)))))
- (while (>= i 0)
- (if (memq (char-syntax i) '(?\" ?\< ?\> ?\$))
- (setq got-one t i 0))
- (setq i (1- i)))))
- (set (make-local-variable 'font-lock-keywords-only) (not got-one)))))
+;;;###autoload
+(defun font-lock-set-defaults (&optional explicit-defaults)
+ "Set fontification defaults appropriately for this mode.
+
+If EXPLICIT-DEFAULTS is not nil and not t, it is used to compute the
+defaults; else, if `font-lock-defaults' is currently set, it is used;
+else, the symbol naming the major mode is examined for a `font-lock-defaults'
+property.
+
+The value of `font-lock-maximum-decoration' is used to determine which
+set of keywords applies, if more than one exists.
+
+Calling this function multiple times in the same buffer is safe -- this
+function keeps track of whether it has already been called in this buffer, and
+does nothing if so (unless EXPLICIT-DEFAULTS is non-nil). This allows for
+multiple ways of getting Font Lock properly initialized in a buffer, to deal
+with existing major modes that do not call this function. (For example, Font
+Lock adds this function to `find-file-hooks'.)
+
+Major modes that have any font-lock defaults specified should call this
+function during their initialization process, after they have set
+the variable `major-mode'."
+ ;; Set fontification defaults iff not previously set (or if EXPLICIT-DEFAULTS
+ ;; is specified).
+ (unless (and font-lock-set-defaults (not explicit-defaults))
+ (set (make-local-variable 'font-lock-set-defaults) t)
+ (set (make-local-variable 'font-lock-cache-state) nil)
+ (set (make-local-variable 'font-lock-cache-position) (make-marker))
+ (make-local-variable 'font-lock-fontified)
+ (make-local-variable 'font-lock-multiline)
+ (let* ((defaults (or ;; XEmacs
+ ;; Explicit defaults given.
+ (and (not (eq t explicit-defaults))
+ explicit-defaults)
+ ;; in case modes decide to set
+ ;; `font-lock-defaults' themselves,
+ ;; as in FSF Emacs.
+ font-lock-defaults
+ ;; FSF 21.2:
+ ;; (cdr (assq major-mode font-lock-defaults-alist))
+ (font-lock-find-font-lock-defaults major-mode)))
+ (keywords
+ (font-lock-choose-keywords (nth 0 defaults)
+ (font-lock-value-in-major-mode font-lock-maximum-decoration)))
+ (local (cdr (assq major-mode font-lock-keywords-alist)))
+ (removed-keywords
+ (cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
+ ;; Previous XEmacs code here. This dates back at least to 1994 and is
+ ;; undocumented, so there seems no reason to keep it.
+; (or keywords
+; ;; older way:
+; ;; try to look for a variable `foo-mode-font-lock-keywords',
+; ;; or similar.
+; (let ((major (symbol-name major-mode))
+; (try #'(lambda (n)
+; (if (stringp n) (setq n (intern-soft n)))
+; (if (and n
+; (boundp n))
+; n
+; nil))))
+; (setq keywords
+; (symbol-value
+; (or (funcall try (get major-mode 'font-lock-keywords))
+; (funcall try (concat major "-font-lock-keywords"))
+; (funcall try (and (string-match "-mode\\'" major)
+; (concat (substring
+; major 0
+; (match-beginning 0))
+; "-font-lock-keywords")))
+; 'font-lock-keywords)))))
+ ;; Regexp fontification?
+ (set (make-local-variable 'font-lock-keywords)
+ (font-lock-compile-keywords (font-lock-eval-keywords keywords)))
+ ;; Local fontification?
+ (while local
+ (font-lock-add-keywords nil (car (car local)) (cdr (car local)))
+ (setq local (cdr local)))
+ (when removed-keywords
+ (font-lock-remove-keywords nil removed-keywords))
+ ;; Syntactic fontification?
+ (when (nth 1 defaults)
+ (set (make-local-variable 'font-lock-keywords-only) t))
+ ;; Case fold during regexp fontification?
+ (when (nth 2 defaults)
+ (set (make-local-variable 'font-lock-keywords-case-fold-search) t))
+ ;; Syntax table for regexp and syntactic fontification?
+ (when (nth 3 defaults)
+ (let ((slist (nth 3 defaults)))
+ (set (make-local-variable 'font-lock-syntax-table)
+ (copy-syntax-table (syntax-table)))
+ (while slist
+ ;; The character to modify may be a single CHAR or a STRING.
+ ;; XEmacs: numberp -> characterp
+ (let ((chars (if (characterp (car (car slist)))
+ (list (car (car slist)))
+ (mapcar 'identity (car (car slist)))))
+ (syntax (cdr (car slist))))
+ (while chars
+ (modify-syntax-entry (car chars) syntax font-lock-syntax-table)
+ (setq chars (cdr chars)))
+ (setq slist (cdr slist))))))
+ ;; Syntax function for syntactic fontification?
+ (when (nth 4 defaults)
+ (set (make-local-variable 'font-lock-beginning-of-syntax-function)
+ (nth 4 defaults)))
+ ;; Variable alist?
+ (dolist (x (nthcdr 5 defaults))
+ (let ((variable (car x)) (value (cdr x)))
+ (unless (boundp variable)
+ (set variable nil)) ;why ?
+ (set (make-local-variable variable) value))))))
+
+(defun font-lock-unset-defaults ()
+ "Unset fontification defaults. See function
`font-lock-set-defaults'."
+ (setq font-lock-set-defaults nil
+ font-lock-keywords nil
+ font-lock-keywords-only nil
+ font-lock-keywords-case-fold-search nil
+ font-lock-syntax-table nil
+ font-lock-beginning-of-syntax-function nil)
+ (let* ((defaults (or font-lock-defaults
+ ;; FSF 21.2:
+ ;; (cdr (assq major-mode font-lock-defaults-alist))
+ (font-lock-find-font-lock-defaults major-mode)))
+ (alist (nthcdr 5 defaults)))
+ (while alist
+ (set (car (car alist)) (default-value (car (car alist))))
+ (setq alist (cdr alist)))))
+
+;;; Colour etc. support.
-;; font-lock-set-defaults is in fontl-hooks.el.
+;; FSF has:
-;;;###autoload
-(defun font-lock-set-defaults-1 (&optional explicit-defaults)
- ;; does everything that font-lock-set-defaults does except
- ;; enable font-lock-mode. This is called by `font-lock-mode'.
- ;; Note that the return value is used!
-
- (if (and font-lock-defaults-computed (not explicit-defaults))
- ;; nothing to do.
- nil
-
- (or font-lock-keywords
- (let* ((defaults (or (and (not (eq t explicit-defaults))
- explicit-defaults)
- ;; in case modes decide to set
- ;; `font-lock-defaults' themselves,
- ;; as in FSF Emacs.
- font-lock-defaults
- (font-lock-find-font-lock-defaults major-mode)))
- (keywords (font-lock-choose-keywords
- (nth 0 defaults) font-lock-maximum-decoration)))
-
- ;; Keywords?
- (setq font-lock-keywords (if (fboundp keywords)
- (funcall keywords)
- (eval keywords)))
- (or font-lock-keywords
- ;; older way:
- ;; try to look for a variable `foo-mode-font-lock-keywords',
- ;; or similar.
- (let ((major (symbol-name major-mode))
- (try #'(lambda (n)
- (if (stringp n) (setq n (intern-soft n)))
- (if (and n
- (boundp n))
- n
- nil))))
- (setq font-lock-keywords
- (symbol-value
- (or (funcall try (get major-mode 'font-lock-keywords))
- (funcall try (concat major "-font-lock-keywords"))
- (funcall try (and (string-match "-mode\\'" major)
- (concat (substring
- major 0
- (match-beginning 0))
- "-font-lock-keywords")))
- 'font-lock-keywords)))))
-
- ;; Case fold?
- (if (>= (length defaults) 3)
- (setq font-lock-keywords-case-fold-search (nth 2 defaults))
- ;; older way:
- ;; look for a property 'font-lock-keywords-case-fold-search on
- ;; the major-mode symbol.
- (let* ((nonexist (make-symbol ""))
- (value (get major-mode 'font-lock-keywords-case-fold-search
- nonexist)))
- (if (not (eq nonexist value))
- (setq font-lock-keywords-case-fold-search value))))
-
- ;; Syntactic?
- (if (>= (length defaults) 2)
- (setq font-lock-keywords-only (nth 1 defaults))
- ;; older way:
- ;; cleverly examine the syntax table.
- (font-lock-examine-syntax-table))
-
- ;; Syntax table?
- (if (nth 3 defaults)
- (let ((slist (nth 3 defaults)))
- (setq font-lock-syntax-table
- (copy-syntax-table (syntax-table)))
- (while slist
- (modify-syntax-entry (car (car slist)) (cdr (car slist))
- font-lock-syntax-table)
- (setq slist (cdr slist)))))
-
- ;; Syntax function?
- (cond (defaults
- (setq font-lock-beginning-of-syntax-function
- (nth 4 defaults)))
- (t
- ;; older way:
- ;; defaults not specified at all, so use `beginning-of-defun'.
- (setq font-lock-beginning-of-syntax-function
- 'beginning-of-defun)))))
+;; Originally face attributes were specified via `font-lock-face-attributes'.
+;; Users then changed the default face attributes by setting that variable.
+;; However, we try and be back-compatible and respect its value if set except
+;; for faces where M-x customize has been used to save changes for the face.
+
+;;(when (boundp 'font-lock-face-attributes)
+;; ...
+
+;; Since we never had it, we don't need to be backwards-compatible.
+
+
+(defconst font-lock-face-list
+ '(font-lock-comment-face
+ font-lock-string-face
+ font-lock-doc-string-face
+ font-lock-keyword-face
+ font-lock-builtin-face
+ font-lock-function-name-face
+ font-lock-variable-name-face
+ font-lock-type-face
+ font-lock-constant-face
+ font-lock-preprocessor-face
+ font-lock-warning-face))
+
+;; These are our old definitions, quite different from FSF.
+;; I've temporarily substituted the FSF definitions to see if I like them.
+
+; (defface font-lock-comment-face
+; '((((class color) (background dark)) (:foreground "gray80"))
+; ;; blue4 is hardly different from black on windows.
+; (((class color) (background light) (type mswindows)) (:foreground
"blue"))
+; (((class color) (background light)) (:foreground "blue4"))
+; (((class grayscale) (background light))
+; (:foreground "DimGray" :bold t :italic t))
+; (((class grayscale) (background dark))
+; (:foreground "LightGray" :bold t :italic t))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight comments."
+; :group 'font-lock-faces)
+
+; (defface font-lock-string-face
+; '((((class color) (background dark)) (:foreground "tan"))
+; (((class color) (background light)) (:foreground "green4"))
+; (((class grayscale) (background light)) (:foreground "DimGray" :italic
t))
+; (((class grayscale) (background dark)) (:foreground "LightGray" :italic
t))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight strings."
+; :group 'font-lock-faces)
+
+; (defface font-lock-doc-string-face
+; '((((class color) (background dark)) (:foreground "light coral"))
+; (((class color) (background light)) (:foreground "green4"))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight documentation strings.
+; This is currently supported only in Lisp-like modes, which are those
+; with \"lisp\" or \"scheme\" in their name. You can explicitly
make
+; a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property
+; on the major mode's symbol."
+; :group 'font-lock-faces)
+
+; (defface font-lock-keyword-face
+; '((((class color) (background dark)) (:foreground "cyan"))
+; ;; red4 is hardly different from black on windows.
+; (((class color) (background light) (type mswindows)) (:foreground
"red"))
+; (((class color) (background light)) (:foreground "red4"))
+; (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
+; (((class grayscale) (background dark)) (:foreground "DimGray" :bold
t))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight keywords."
+; :group 'font-lock-faces)
+
+; (defface font-lock-builtin-face
+; '((((class color) (background light)) (:foreground "Purple"))
+; (((class color) (background dark)) (:foreground "Cyan"))
+; (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
+; (((class grayscale) (background dark)) (:foreground "DimGray" :bold
t))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight builtins."
+; :group 'font-lock-faces)
+
+; (defface font-lock-function-name-face
+; '((((class color) (background dark)) (:foreground "aquamarine"))
+; ;; brown4 is hardly different from black on windows.
+; ;; I changed it to red because IMO it's pointless and ugly to
+; ;; use a million slightly different colors for niggly syntactic
+; ;; differences. --ben
+; (((class color) (background light) (type mswindows)) (:foreground
"red"))
+; (((class color) (background light)) (:foreground "brown4"))
+; (t (:bold t :underline t)))
+; "Font Lock mode face used to highlight function names."
+; :group 'font-lock-faces)
+
+; (defface font-lock-variable-name-face
+; '((((class color) (background dark)) (:foreground "cyan3"))
+; (((class color) (background light)) (:foreground "magenta4"))
+; (((class grayscale) (background light))
+; (:foreground "Gray90" :bold t :italic t))
+; (((class grayscale) (background dark))
+; (:foreground "DimGray" :bold t :italic t))
+; (t (:underline t)))
+; "Font Lock mode face used to highlight variable names."
+; :group 'font-lock-faces)
+
+; (defface font-lock-type-face
+; '((((class color) (background dark)) (:foreground "wheat"))
+; (((class color) (background light)) (:foreground "steelblue"))
+; (((class grayscale) (background light)) (:foreground "Gray90" :bold
t))
+; (((class grayscale) (background dark)) (:foreground "DimGray" :bold
t))
+; (t (:bold t)))
+; "Font Lock mode face used to highlight types."
+; :group 'font-lock-faces)
+
+; (defface font-lock-constant-face
+; '((((class color) (background light)) (:foreground "CadetBlue"))
+; (((class color) (background dark)) (:foreground "Aquamarine"))
+; (((class grayscale) (background light))
+; (:foreground "LightGray" :bold t :underline t))
+; (((class grayscale) (background dark))
+; (:foreground "Gray50" :bold t :underline t))
+; (t (:bold t :underline t)))
+; "Font Lock mode face used to highlight constants and labels."
+; :group 'font-lock-faces)
+
+; (defface font-lock-reference-face
+; '((((class color) (background dark)) (:foreground "cadetblue2"))
+; (((class color) (background light)) (:foreground "red3"))
+; (((class grayscale) (background light))
+; (:foreground "LightGray" :bold t :underline t))
+; (((class grayscale) (background dark))
+; (:foreground "Gray50" :bold t :underline t)))
+; "Font Lock mode face used to highlight references."
+; :group 'font-lock-faces)
+
+; (defface font-lock-preprocessor-face
+; '((((class color) (background dark)) (:foreground "steelblue1"))
+; (((class color) (background light)) (:foreground "blue3"))
+; (t (:underline t)))
+; "Font Lock Mode face used to highlight preprocessor conditionals."
+; :group 'font-lock-faces)
+
+; (defface font-lock-warning-face
+; '((((class color) (background light)) (:foreground "Red" :bold t))
+; (((class color) (background dark)) (:foreground "Pink" :bold t))
+; (t (:inverse-video t :bold t)))
+; "Font Lock mode face used to highlight warnings."
+; :group 'font-lock-faces)
+
+(defface font-lock-comment-face
+ '((((type tty pc) (class color) (background light)) (:foreground
"red"))
+ (((type tty pc) (class color) (background dark)) (:foreground "red1"))
+ (((class grayscale) (background light))
+ (:foreground "DimGray" :bold t :italic t))
+ (((class grayscale) (background dark))
+ (:foreground "LightGray" :bold t :italic t))
+ (((class color) (background light)) (:foreground "Firebrick"))
+ (((class color) (background dark)) (:foreground "chocolate1"))
+ (t (:bold t :italic t)))
+ "Font Lock mode face used to highlight comments."
+ :group 'font-lock-faces)
+
+(defface font-lock-string-face
+ '((((type tty) (class color)) (:foreground "green"))
+ (((class grayscale) (background light)) (:foreground "DimGray" :italic
t))
+ (((class grayscale) (background dark)) (:foreground "LightGray" :italic
t))
+ (((class color) (background light)) (:foreground "RosyBrown"))
+ (((class color) (background dark)) (:foreground "LightSalmon"))
+ (t (:italic t)))
+ "Font Lock mode face used to highlight strings."
+ :group 'font-lock-faces)
+
+(defface font-lock-doc-string-face
+ '((t :inherit font-lock-string-face))
+ "Font Lock mode face used to highlight documentation strings.
+This is currently supported only in Lisp-like modes, which are those
+with \"lisp\" or \"scheme\" in their name. You can explicitly
make
+a mode Lisp-like by putting a non-nil `font-lock-lisp-like' property
+on the major mode's symbol."
+ :group 'font-lock-faces)
+
+(defface font-lock-keyword-face
+ '((((type tty) (class color)) (:foreground "cyan" :weight bold))
+ (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
+ (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+ (((class color) (background light)) (:foreground "Purple"))
+ (((class color) (background dark)) (:foreground "Cyan"))
+ (t (:bold t)))
+ "Font Lock mode face used to highlight keywords."
+ :group 'font-lock-faces)
+
+(defface font-lock-builtin-face
+ '((((type tty) (class color)) (:foreground "blue" :weight light))
+ (((class grayscale) (background light)) (:foreground "LightGray" :bold
t))
+ (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+ (((class color) (background light)) (:foreground "Orchid"))
+ (((class color) (background dark)) (:foreground "LightSteelBlue"))
+ (t (:bold t)))
+ "Font Lock mode face used to highlight builtins."
+ :group 'font-lock-faces)
+
+(defface font-lock-function-name-face
+ '((((type tty) (class color)) (:foreground "blue" :weight bold))
+ (((class color) (background light)) (:foreground "Blue"))
+ (((class color) (background dark)) (:foreground "LightSkyBlue"))
+ (t (:inverse-video t :bold t)))
+ "Font Lock mode face used to highlight function names."
+ :group 'font-lock-faces)
+
+(defface font-lock-variable-name-face
+ '((((type tty) (class color)) (:foreground "yellow" :weight light))
+ (((class grayscale) (background light))
+ (:foreground "Gray90" :bold t :italic t))
+ (((class grayscale) (background dark))
+ (:foreground "DimGray" :bold t :italic t))
+ (((class color) (background light)) (:foreground "DarkGoldenrod"))
+ (((class color) (background dark)) (:foreground "LightGoldenrod"))
+ (t (:bold t :italic t)))
+ "Font Lock mode face used to highlight variable names."
+ :group 'font-lock-faces)
- (setq font-lock-cache-position (make-marker))
- (setq font-lock-defaults-computed t)))
+(defface font-lock-type-face
+ '((((type tty) (class color)) (:foreground "green"))
+ (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
+ (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+ (((class color) (background light)) (:foreground "ForestGreen"))
+ (((class color) (background dark)) (:foreground "PaleGreen"))
+ (t (:bold t :underline t)))
+ "Font Lock mode face used to highlight type and classes."
+ :group 'font-lock-faces)
+
+(defface font-lock-constant-face
+ '((((type tty) (class color)) (:foreground "magenta"))
+ (((class grayscale) (background light))
+ (:foreground "LightGray" :bold t :underline t))
+ (((class grayscale) (background dark))
+ (:foreground "Gray50" :bold t :underline t))
+ (((class color) (background light)) (:foreground "CadetBlue"))
+ (((class color) (background dark)) (:foreground "Aquamarine"))
+ (t (:bold t :underline t)))
+ "Font Lock mode face used to highlight constants and labels."
+ :group 'font-lock-faces)
+
+(defface font-lock-preprocessor-face
+ '((((class color) (background dark)) (:foreground "steelblue1"))
+ (((class color) (background light)) (:foreground "blue3"))
+ (t (:underline t)))
+ "Font Lock Mode face used to highlight preprocessor conditionals."
+ :group 'font-lock-faces)
+
+(defface font-lock-warning-face
+ '((((type tty) (class color)) (:foreground "red"))
+ (((class color) (background light)) (:foreground "Red" :bold t))
+ (((class color) (background dark)) (:foreground "Pink" :bold t))
+ (t (:inverse-video t :bold t)))
+ "Font Lock mode face used to highlight warnings."
+ :group 'font-lock-faces)
+
+;; Backwards-compatible crud. XEmacs only.
+
+(defun font-lock-recompute-variables ()
+ ;; Is this a Draconian thing to do?
+ (mapc #'(lambda (buffer)
+ (with-current-buffer buffer
+ (font-lock-mode 0)
+ (font-lock-set-defaults t)))
+ (buffer-list)))
+
+(defun font-lock-reset-all-faces ()
+ (dolist (face font-lock-face-list)
+ (face-spec-set face (get face 'face-defface-spec))))
+
+(defun font-lock-use-default-fonts ()
+ "Reset the font-lock faces to a default set of fonts."
+ (interactive)
+ ;; #### !!!!
+ (font-lock-reset-all-faces))
+
+(defun font-lock-use-default-colors ()
+ "Reset the font-lock faces to a default set of colors."
+ (interactive)
+ ;; #### !!!!
+ (font-lock-reset-all-faces))
+
+(defun font-lock-use-default-minimal-decoration ()
+ "Reset the font-lock patterns to a fast, minimal set of decorations."
+ (and font-lock-maximum-decoration
+ (setq font-lock-maximum-decoration nil)
+ (font-lock-recompute-variables)))
+
+(defun font-lock-use-default-maximal-decoration ()
+ "Reset the font-lock patterns to a larger set of decorations."
+ (and (not (eq t font-lock-maximum-decoration))
+ (setq font-lock-maximum-decoration t)
+ (font-lock-recompute-variables)))
+
+;;; End of Colour etc. support.
+
+;;; Menu support.
+
+;;; FSF writes:
+
+;; This section of code is commented out because Emacs does not have real menu
+;; buttons. (We can mimic them by putting "( ) " or "(X) " at the
beginning of
+;; the menu entry text, but with Xt it looks both ugly and embarrassingly
+;; amateur.) If/When Emacs gets real menus buttons, put in menu-bar.el after
+;; the entry for "Text Properties" something like:
+
+;; We DO have real menu buttons, and all the code in this section seems to
+;; mimic the option menu.
+
+;; ...
+
+;;; End of Menu support.
+
+;;; Various regexp information shared by several modes.
+;;; Information specific to a single mode should go in its load library.
+
+;; Font Lock support for C, C++, Objective-C and Java modes will one day be in
+;; some cc-font.el (and required by cc-mode.el). However, the below function
+;; should stay in font-lock.el, since it is used by other libraries. sm.
+
+(defun font-lock-match-c-style-declaration-item-and-skip-to-next (limit)
+ "Match, and move over, any declaration/definition item after point.
+Matches after point, but ignores leading whitespace and `*' characters.
+Does not move further than LIMIT.
+
+The expected syntax of a declaration/definition item is `word' (preceded by
+optional whitespace and `*' characters and proceeded by optional whitespace)
+optionally followed by a `('. Everything following the item (but belonging to
+it) is expected to by skip-able by `scan-sexps', and items are expected to be
+separated with a `,' and to be terminated with a `;'.
+
+Thus the regexp matches after point: word (
+ ^^^^ ^
+Where the match subexpressions are: 1 2
+
+The item is delimited by (match-beginning 1) and (match-end 1).
+If (match-beginning 2) is non-nil, the item is followed by a `('.
+
+This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords'
item."
+ (when (looking-at "[ \t*]*\\(\\sw+\\)[ \t]*\\((\\)?")
+ (save-match-data
+ (condition-case nil
+ (save-restriction
+ ;; Restrict to the end of line, currently guaranteed to be LIMIT.
+ (narrow-to-region (point-min) limit)
+ (goto-char (match-end 1))
+ ;; Move over any item value, etc., to the next item.
+ (while (not (looking-at "[ \t]*\\(\\(,\\)\\|;\\|$\\)"))
+ (goto-char (or (scan-sexps (point) 1) (point-max))))
+ (goto-char (match-end 2)))
+ (error t)))))
;;;;;;;;;;;;;;;;;;;;;; keywords ;;;;;;;;;;;;;;;;;;;;;;
@@ -1901,73 +2966,17 @@
;; for SYNTAX-BEGIN. Thus the calculation of the cache is usually
;; faster but not infallible, so we risk mis-fontification. --sm.
-(put 'c-mode 'font-lock-defaults
- '((c-font-lock-keywords
- c-font-lock-keywords-1 c-font-lock-keywords-2 c-font-lock-keywords-3)
- nil nil ((?_ . "w")) beginning-of-defun))
-(put 'c++-c-mode 'font-lock-defaults 'c-mode)
-(put 'elec-c-mode 'font-lock-defaults 'c-mode)
-
-(put 'c++-mode 'font-lock-defaults
- '((c++-font-lock-keywords
- c++-font-lock-keywords-1 c++-font-lock-keywords-2
- c++-font-lock-keywords-3)
- nil nil ((?_ . "w") (?~ . "w")) beginning-of-defun))
-
-(put 'java-mode 'font-lock-defaults
- '((java-font-lock-keywords
- java-font-lock-keywords-1 java-font-lock-keywords-2
- java-font-lock-keywords-3)
- nil nil ((?_ . "w")) beginning-of-defun
- (font-lock-mark-block-function . mark-defun)))
-
-(put 'lisp-mode 'font-lock-defaults
- '((lisp-font-lock-keywords
- lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
- nil nil
- ((?: . "w") (?- . "w") (?* . "w") (?+ .
"w") (?. . "w") (?< . "w")
- (?> . "w") (?= . "w") (?! . "w") (?? . "w")
(?$ . "w") (?% . "w")
- (?_ . "w") (?& . "w") (?~ . "w") (?^ .
"w") (?/ . "w"))
- beginning-of-defun))
-(put 'emacs-lisp-mode 'font-lock-defaults 'lisp-mode)
-(put 'lisp-interaction-mode 'font-lock-defaults 'lisp-mode)
-
-(put 'scheme-mode 'font-lock-defaults
- '(scheme-font-lock-keywords
- nil t
- ((?: . "w") (?- . "w") (?* . "w") (?+ .
"w") (?. . "w") (?< . "w")
- (?> . "w") (?= . "w") (?! . "w") (?? . "w")
(?$ . "w") (?% . "w")
- (?_ . "w") (?& . "w") (?~ . "w") (?^ .
"w") (?/ . "w"))
- beginning-of-defun))
-(put 'inferior-scheme-mode 'font-lock-defaults 'scheme-mode)
-(put 'scheme-interaction-mode 'font-lock-defaults 'scheme-mode)
-
-(put 'tex-mode 'font-lock-defaults
- ;; For TeX modes we could use `backward-paragraph' for the same reason.
- '(tex-font-lock-keywords nil nil ((?$ . "\""))))
-;; the nine billion names of TeX mode...
-(put 'bibtex-mode 'font-lock-defaults 'tex-mode)
-(put 'plain-tex-mode 'font-lock-defaults 'tex-mode)
-(put 'slitex-tex-mode 'font-lock-defaults 'tex-mode)
-(put 'SliTeX-mode 'font-lock-defaults 'tex-mode)
-(put 'slitex-mode 'font-lock-defaults 'tex-mode)
-(put 'latex-tex-mode 'font-lock-defaults 'tex-mode)
-(put 'LaTex-tex-mode 'font-lock-defaults 'tex-mode)
-(put 'latex-mode 'font-lock-defaults 'tex-mode)
-(put 'LaTeX-mode 'font-lock-defaults 'tex-mode)
-(put 'japanese-LaTeX-mode 'font-lock-defaults 'tex-mode)
-(put 'japanese-SliTeX-mode 'font-lock-defaults 'tex-mode)
-(put 'FoilTeX-mode 'font-lock-defaults 'tex-mode)
-(put 'LATeX-MoDe 'font-lock-defaults 'tex-mode)
-(put 'lATEx-mODe 'font-lock-defaults 'tex-mode)
-;; ok, this is getting a bit silly ...
-(put 'eDOm-xETAl 'font-lock-defaults 'tex-mode)
-
;;; Various regexp information shared by several modes.
;;; Information specific to a single mode should go in its load library.
+
+;; Lisp.
+
(defconst lisp-font-lock-keywords-1
(list
+ ;;
+ ;; Definitions.
+ ;;
;; Anything not a function or type declaration is fontified as a
;; variable. It would be cleaner to allow preceding whitespace, but it
;; would also be about five times slower. We used to fontify unknown
@@ -1977,16 +2986,15 @@
;; different, which looks better.
(list (concat
"^(\\(" lisp-function-and-type-regexp
- ;; Former variable declarations, but woefully inadequate.
- ;; "\\|def\\(const\\(\\|ant\\)\\|ine-key\\(\\|-after\\)\\|"
- ;; "var\\|custom\\)"
- ;; Everything else is a variable declaration.
- ;; anything else is a variable
+ ;; Former variable declarations (FSF 21.2), but woefully inadequate.
+ ;; "\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
+ ;; Anything else is a variable.
"\\|def\\([^ \t\n\(\)]+\\)"
- ;; make sure we are at end of word.
+ ;; Make sure we are at end of word.
"\\)\\>"
;; Any whitespace following and declared object.
"[ \t'\(]*"
+ ;; FSF 21.2: "\\(setf[ \t]+\\sw+)\\|\\sw+\\)?")
"\\([^ \t\n\(\)]+\\)?")
;; Note about numbering: #1 is the grouping around the whole
;; keyword. #2 - #4 are in lisp-function-and-type-regexp.
@@ -1997,66 +3005,90 @@
((match-beginning 4) 'font-lock-type-face)
(t 'font-lock-variable-name-face))
nil t))
+ ;;
+ ;; Emacs Lisp autoload cookies.
+ '("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend)
)
"Subdued level highlighting Lisp modes.")
+;; Macro to break up generated regexp-opt strings for easier reading and
+;; substitution into code, if we go back to expanding the regexp-opt call
+;; manually.
+;;
+;;(setq last-kbd-macro
+;; (read-kbd-macro "\" C-7 C-1 <right> C-r \\\\| 3*<right>
\" RET"))
+
(defconst lisp-font-lock-keywords-2
(append lisp-font-lock-keywords-1
- (list
- ;;
- ;; Control structures. ELisp and CLisp combined.
- ;;
- (cons
- (concat
- "(\\("
- ;; beginning of generated stuff
- ;; to regenerate, use the regexp-opt below, then delete the outermost
- ;; grouping, then use the macro below to break up the string.
- ;; (regexp-opt
- ;; '("cond" "if" "while" "let"
"let*" "prog" "progn" "prog1"
- ;; "prog2" "progv" "catch" "throw"
"save-restriction"
- ;; "save-excursion" "save-window-excursion"
- ;; "save-current-buffer" "with-current-buffer"
- ;; "save-selected-window" "with-selected-window"
- ;; "save-selected-frame" "with-selected-frame"
- ;; "with-temp-file" "with-temp-buffer"
"with-output-to-string"
- ;; "with-string-as-buffer-contents"
- ;; "save-match-data" "unwind-protect"
"call-with-condition-handler"
- ;; "condition-case" "track-mouse" "autoload"
- ;; "eval-after-load" "eval-and-compile"
"eval-when-compile"
- ;; "when" "unless" "do" "dolist"
"dotimes" "flet" "labels"
- ;; "lambda" "block" "return"
"return-from" "loop") t)
- ;; (setq last-kbd-macro
- ;; (read-kbd-macro "\" C-6 C-9 <right> C-r \\\\|
3*<right> \" RET"))
- "autoload\\|block\\|c\\(?:a\\(?:ll-with-condition-handler\\|tch\\)\\|"
- "ond\\(?:ition-case\\)?\\)\\|do\\(?:list\\|times\\)?\\|"
-
"eval-\\(?:a\\(?:fter-load\\|nd-compile\\)\\|when-compile\\)\\|flet\\|"
- "if\\|l\\(?:a\\(?:bels\\|mbda\\)\\|et\\*?\\|oop\\)\\|prog[12nv]?\\|"
- "return\\(?:-from\\)?\\|save-\\(?:current-buffer\\|excursion\\|"
- "match-data\\|restriction\\|selected-\\(?:frame\\|window\\)\\|"
- "window-excursion\\)\\|t\\(?:hrow\\|rack-mouse\\)\\|un\\(?:less\\|"
-
"wind-protect\\)\\|w\\(?:h\\(?:en\\|ile\\)\\|ith-\\(?:current-buffer\\|"
- "output-to-string\\|s\\(?:elected-\\(?:frame\\|window\\)\\|"
- "tring-as-buffer-contents\\)\\|temp-\\(?:buffer\\|file\\)\\)\\)"
- ;; end of generated stuff
- "\\)\\>") 1)
- ;;
- ;; Feature symbols as references.
- '("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
- ;;
- ;; Words inside \\[] tend to be for `substitute-command-keys'.
- '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-reference-face prepend)
- ;;
- ;; Words inside `' tend to be symbol names.
- '("`\\(\\sw\\sw+\\)'" 1 font-lock-reference-face prepend)
- ;;
- ;; CLisp `:' keywords as references.
- '("\\<:\\sw+\\>" 0 font-lock-reference-face prepend)
- ;;
- ;; ELisp and CLisp `&' keywords as types.
- '("\\<\\&\\(optional\\|rest\\|whole\\)\\>" .
font-lock-type-face)
- ))
+ (eval-when-compile
+ (list
+ ;;
+ ;; Control structures. Emacs Lisp forms.
+ (cons (concat
+ "(" (regexp-opt
+ '("cond" "if" "while" "let"
"let*"
+ "prog" "progn" "progv" "prog1"
"prog2" "prog*"
+ "inline" "lambda" "save-restriction"
"save-excursion"
+ "save-window-excursion" "save-selected-window"
+ "save-match-data" "save-current-buffer"
"unwind-protect"
+ "condition-case" "track-mouse"
+ "eval-after-load" "eval-and-compile"
"eval-when-compile"
+ "eval-when"
+ "with-current-buffer" "with-electric-help"
+ "with-output-to-string" "with-output-to-temp-buffer"
+ "with-temp-buffer" "with-temp-file"
"with-temp-message"
+ "with-timeout"
+ ;; XEmacs additions:
+ "catch" "throw" "with-selected-window"
+ "save-selected-frame" "with-selected-frame"
+ "with-string-as-buffer-contents"
+ "call-with-condition-handler"
+ "autoload"
+ ) t)
+ "\\>")
+ 1)
+ ;;
+ ;; Control structures. Common Lisp forms.
+ (cons (concat
+ "(" (regexp-opt
+ '("when" "unless" "case" "ecase"
"typecase" "etypecase"
+ "ccase" "ctypecase" "handler-case"
"handler-bind"
+ "restart-bind" "restart-case" "in-package"
+ "cerror" "break" "ignore-errors"
+ "loop" "do" "do*" "dotimes"
"dolist" "the" "locally"
+ "proclaim" "declaim" "declare"
"symbol-macrolet"
+ "lexical-let" "lexical-let*" "flet"
"labels" "compiler-let"
+ "destructuring-bind" "macrolet" "tagbody"
"block"
+ "return" "return-from") t)
+ "\\>")
+ 1)
+ ;;
+ ;; Exit/Feature symbols as constants.
+ (list (concat
"(\\(catch\\|throw\\|featurep\\|provide\\|require\\)\\>"
+ "[ \t']*\\(\\sw+\\)?")
+ '(1 font-lock-keyword-face)
+ '(2 font-lock-constant-face nil t))
+ ;;
+ ;; Erroneous structures.
+ '("(\\(abort\\|assert\\|error\\|signal\\)\\>" 1
font-lock-warning-face)
+ ;;
+ ;; Words inside \\[] tend to be for `substitute-command-keys'.
+ '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
+ ;;
+ ;; Words inside `' tend to be symbol names.
+ '("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
+ ;;
+ ;; Constant values.
+ '("\\<:\\sw\\sw+\\>" 0 font-lock-builtin-face)
+ ;;
+ ;; ELisp and CLisp `&' keywords as types.
+ ;; Former XEmacs version:
+ ;; '("\\<\\&\\(optional\\|rest\\|whole\\)\\>" .
font-lock-type-face)
+ '("\\&\\sw+\\>" . font-lock-type-face)
+ ;;
+ ;; CL `with-' and `do-' constructs
+ '("(\\(\\(do-\\|with-\\)\\(\\s_\\|\\w\\)*\\)" 1
font-lock-keyword-face)
+ )))
"Gaudy level highlighting for Lisp modes.")
(defvar lisp-font-lock-keywords lisp-font-lock-keywords-1
@@ -2106,56 +3138,64 @@
;
;This does a lot more highlighting.")
-(defvar scheme-font-lock-keywords
+(defconst scheme-font-lock-keywords-1
(eval-when-compile
(list
;;
;; Declarations. Hannes Haug <hannes.haug(a)student.uni-tuebingen.de> says
;; this works for SOS, STklos, SCOOPS, Meroon and Tiny CLOS.
- (list (concat "(\\(define\\("
+ (list (concat "(\\(define\\*?\\("
;; Function names.
- "\\(\\|-\\(generic\\(\\|-procedure\\)\\|method\\)\\)\\|"
+ "\\(\\|-public\\|-method\\|-generic\\(-procedure\\)?\\)\\|"
;; Macro names, as variable names. A bit dubious, this.
- "\\(-syntax\\)\\|"
+ "\\(-syntax\\|-macro\\)\\|"
;; Class names.
- "\\(-class\\)"
+ "-class"
+ ;; Guile modules.
+ "\\|-module"
"\\)\\)\\>"
;; Any whitespace and declared object.
"[ \t]*(?"
"\\(\\sw+\\)?")
'(1 font-lock-keyword-face)
- '(8 (cond ((match-beginning 3) 'font-lock-function-name-face)
- ((match-beginning 6) 'font-lock-variable-name-face)
- (t 'font-lock-type-face))
+ '(6 (cond ((match-beginning 3) font-lock-function-name-face)
+ ((match-beginning 5) font-lock-variable-name-face)
+ (t font-lock-type-face))
nil t))
- ;;
- ;; Control structures.
-;(regexp-opt '("begin" "call-with-current-continuation"
"call/cc"
-; "call-with-input-file" "call-with-output-file"
"case" "cond"
-; "do" "else" "for-each" "if"
"lambda"
-; "let\\*?" "let-syntax" "letrec"
"letrec-syntax"
-; ;; Hannes Haug <hannes.haug(a)student.uni-tuebingen.de> wants:
-; "and" "or" "delay"
-; ;; Stefan Monnier <stefan.monnier(a)epfl.ch> says don't bother:
-; ;;"quasiquote" "quote" "unquote"
"unquote-splicing"
-; "map" "syntax" "syntax-rules"))
- (cons
- (concat "(\\("
- "and\\|begin\\|c\\(a\\(ll\\(-with-\\(current-continuation\\|"
- "input-file\\|output-file\\)\\|/cc\\)\\|se\\)\\|ond\\)\\|"
- "d\\(elay\\|o\\)\\|else\\|for-each\\|if\\|"
- "l\\(ambda\\|et\\(-syntax\\|\\*?\\|rec\\(\\|-syntax\\)\\)\\)\\|"
- "map\\|or\\|syntax\\(\\|-rules\\)"
- "\\)\\>") 1)
- ;;
- ;; David Fox <fox(a)graphics.cs.nyu.edu> for SOS/STklos class specifiers.
- '("\\<<\\sw+>\\>" . font-lock-type-face)
- ;;
- ;; Scheme `:' keywords as references.
- '("\\<:\\sw+\\>" . font-lock-reference-face)
))
-"Default expressions to highlight in Scheme modes.")
+ "Subdued expressions to highlight in Scheme modes.")
+(defconst scheme-font-lock-keywords-2
+ (append scheme-font-lock-keywords-1
+ (eval-when-compile
+ (list
+ ;;
+ ;; Control structures.
+ (cons
+ (concat
+ "(" (regexp-opt
+ '("begin" "call-with-current-continuation"
"call/cc"
+ "call-with-input-file" "call-with-output-file"
"case" "cond"
+ "do" "else" "for-each" "if"
"lambda"
+ "let" "let*" "let-syntax" "letrec"
"letrec-syntax"
+ ;; Hannes Haug <hannes.haug(a)student.uni-tuebingen.de> wants:
+ "and" "or" "delay"
+ ;; Stefan Monnier <stefan.monnier(a)epfl.ch> says don't bother:
+ ;;"quasiquote" "quote" "unquote"
"unquote-splicing"
+ "map" "syntax" "syntax-rules") t)
+ "\\>") 1)
+ ;;
+ ;; David Fox <fox(a)graphics.cs.nyu.edu> for SOS/STklos class specifiers.
+ '("\\<<\\sw+>\\>" . font-lock-type-face)
+ ;;
+ ;; Scheme `:' keywords as builtins.
+ '("\\<:\\sw+\\>" . font-lock-builtin-face)
+ )))
+ "Gaudy expressions to highlight in Scheme modes.")
+
+(defvar scheme-font-lock-keywords scheme-font-lock-keywords-1
+ "Default expressions to highlight in Scheme modes.")
+
;; The previous version, before replacing it with the FSF version.
;(defconst scheme-font-lock-keywords (purecopy
; '(("(define[ \t]+(?\\([^ \t\n\)]+\\)" 1 font-lock-function-name-face)
@@ -2164,126 +3204,173 @@
; ("(\\(quote\\|unquote\\|quasiquote\\|unquote-splicing\\)[ \t\n]" . 1)
; ("(\\(syntax\\|syntax-rules\\|define-syntax\\|let-syntax\\|letrec-syntax\\)[
\t\n]" . 1)))
; "Expressions to highlight in Scheme buffers.")
-
-(defconst c-font-lock-keywords-1 nil
- "Subdued level highlighting for C modes.")
-(defconst c-font-lock-keywords-2 nil
- "Medium level highlighting for C modes.")
+(put 'lisp-mode 'font-lock-defaults
+ '((lisp-font-lock-keywords
+ lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
+ nil nil (("+-*/.<>=!?$%_&~^:" . "w"))
beginning-of-defun
+ (font-lock-mark-block-function . mark-defun)))
+(put 'emacs-lisp-mode 'font-lock-defaults 'lisp-mode)
+(put 'lisp-interaction-mode 'font-lock-defaults 'lisp-mode)
-(defconst c-font-lock-keywords-3 nil
- "Gaudy level highlighting for C modes.")
+(put 'scheme-mode 'font-lock-defaults
+ '((scheme-font-lock-keywords
+ scheme-font-lock-keywords-1 scheme-font-lock-keywords-2)
+ nil t (("+-*/.<>=!?$%_&~^:" . "w"))
beginning-of-defun
+ (font-lock-mark-block-function . mark-defun)))
+(put 'inferior-scheme-mode 'font-lock-defaults 'scheme-mode)
+(put 'scheme-interaction-mode 'font-lock-defaults 'scheme-mode)
-(defconst xemacs-c-font-lock-keywords-2 nil
- "Medium level highlighting for XEmacs C source code.")
+
+;;; User choices.
-(defconst xemacs-c-font-lock-keywords-3 nil
- "Gaudy level highlighting for XEmacs C source code.")
+;; These provide a means to fontify types not defined by the language. Those
+;; types might be the user's own or they might be generally accepted and used.
+;; Generally accepted types are used to provide default variable values.
+
+(define-widget 'font-lock-extra-types-widget 'radio
+ "Widget `:type' for members of the custom group
`font-lock-extra-types'.
+Members should `:load' the package `font-lock' to use this widget."
+ :args '((const :tag "none" nil)
+ (repeat :tag "types" regexp)))
+
+(defcustom c-font-lock-extra-types '("FILE" "\\sw+_t"
"Lisp_Object")
+ "*List of extra types to fontify in C mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"FILE\" \"\\\\sw+_t\") means the word
FILE and words
+ending in _t are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defconst xemacs-c-font-lock-extra-types
+ '("FILE" "\\sw+_t"
+ "Ibyte" "CIbyte" "Extbyte" "UExtbyte"
"WExtbyte"
+ "Ascbyte" "UAscbyte" "Rawbyte" "CRawbyte"
"Binbyte" "CBinbyte"
+ "SBinbyte" "Boolbyte" "Ichar" "Raw_Ichar"
"Itext" "Textcount"
+ "Bytecount" "Charcount" "Charbpos"
"Bytebpos" "Membpos" "Charxpos"
+ "Bytexpos" "Memxpos" "Elemcount" "Hashcode"
"EMACS_INT" "USID"
+ "face_index" "glyph_index" "Lisp_Object")
+ "Value of `c-font-lock-extra-types' appropriate for XEmacs source
code.")
+
+(defcustom c++-font-lock-extra-types
+ '("\\sw+_t"
+ "\\([iof]\\|str\\)+stream\\(buf\\)?" "ios"
+ "string" "rope"
+ "list" "slist"
+ "deque" "vector" "bit_vector"
+ "set" "multiset"
+ "map" "multimap"
+ "hash\\(_\\(m\\(ap\\|ulti\\(map\\|set\\)\\)\\|set\\)\\)?"
+ "stack" "queue" "priority_queue"
+ "type_info"
+ "iterator" "const_iterator" "reverse_iterator"
"const_reverse_iterator"
+ "reference" "const_reference")
+ "*List of extra types to fontify in C++ mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"string\") means the word string is treated as a
type
+name.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defcustom objc-font-lock-extra-types '("Class" "BOOL"
"IMP" "SEL")
+ "*List of extra types to fontify in Objective-C mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"Class\" \"BOOL\" \"IMP\"
\"SEL\") means the words
+Class, BOOL, IMP and SEL are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+(defcustom java-font-lock-extra-types
+ '("[A-Z\300-\326\330-\337]\\sw*[a-z]\\sw*")
+ "*List of extra types to fontify in Java mode.
+Each list item should be a regexp not containing word-delimiters.
+For example, a value of (\"[A-Z\300-\326\330-\337]\\\\sw*[a-z]\\\\sw*\")
means capitalised
+words (and words conforming to the Java id spec) are treated as type names.
+
+The value of this variable is used when Font Lock mode is turned on."
+ :type 'font-lock-extra-types-widget
+ :group 'font-lock-extra-types)
+
+;;; C.
-(defconst c++-font-lock-keywords-1 nil
- "Subdued level highlighting for C++ modes.")
+;; [Murmur murmur murmur] Maestro, drum-roll please... [Murmur murmur murmur.]
+;; Ahem. [Murmur murmur murmur] Lay-dees an Gennel-men. [Murmur murmur shhh!]
+;; I am most proud and humbly honoured today [murmur murmur cough] to present
+;; to you good people, the winner of the Second Millennium Award for The Most
+;; Hairy Language Syntax. [Ahhh!] All rise please. [Shuffle shuffle
+;; shuffle.] And a round of applause please. For... The C Language! [Roar.]
+;;
+;; Thank you... You are too kind... It is with a feeling of great privilege
+;; and indeed emotion [sob] that I accept this award. It has been a long hard
+;; road. But we know our destiny. And our future. For we must not rest.
+;; There are more tokens to overload, more shoehorn, more methodologies. But
+;; more is a plus! [Ha ha ha.] And more means plus! [Ho ho ho.] The future
+;; is C++! [Ohhh!] The Third Millennium Award... Will be ours! [Roar.]
-(defconst c++-font-lock-keywords-2 nil
- "Medium level highlighting for C++ modes.")
+(defconst c-font-lock-keywords-1 nil
+ "Subdued level highlighting for C mode.")
-(defconst c++-font-lock-keywords-3 nil
- "Gaudy level highlighting for C++ modes.")
+(defconst c-font-lock-keywords-2 nil
+ "Medium level highlighting for C mode.
+See also `c-font-lock-extra-types'.")
-(defun font-lock-match-c++-style-declaration-item-and-skip-to-next (limit)
- ;; Match, and move over, any declaration/definition item after point.
- ;; The expect syntax of an item is "word" or "word::word",
possibly ending
- ;; with optional whitespace and a "(". Everything following the item (but
- ;; belonging to it) is expected to by skip-able by `forward-sexp', and items
- ;; are expected to be separated with a "," or ";".
- (if (looking-at "[
\t*&]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\(::\\(\\(?:\\sw\\|\\s_\\)+\\)\\)?[
\t]*\\((\\)?")
- (save-match-data
- (condition-case nil
- (save-restriction
- ;; Restrict to the end of line, currently guaranteed to be LIMIT.
- (narrow-to-region (point-min) limit)
- (goto-char (match-end 1))
- ;; Move over any item value, etc., to the next item.
- (while (not (looking-at "[ \t]*\\([,;]\\|$\\)"))
- (goto-char (or (scan-sexps (point) 1) (point-max))))
- (goto-char (match-end 0)))
- (error t)))))
+(defconst c-font-lock-keywords-3 nil
+ "Gaudy level highlighting for C mode.
+See also `c-font-lock-extra-types'.")
-(let ((c-keywords
-; ("break" "continue" "do" "else"
"for" "if" "return" "switch" "while")
- "break\\|continue\\|do\\|else\\|for\\|if\\|return\\|switch\\|while")
- (xemacs-c-type-types
- ;(regexp-opt '("Ibyte" "CIbyte" "Extbyte"
"UExtbyte" "WExtbyte"
- ; "Ascbyte" "UAscbyte" "Rawbyte"
"CRawbyte" "Binbyte" "CBinbyte"
- ; "SBinbyte" "Boolbyte" "Ichar"
"Raw_Ichar" "Itext" "Textcount"
- ; "Bytecount" "Charcount" "Charbpos"
"Bytebpos" "Membpos" "Charxpos"
- ; "Bytexpos" "Memxpos" "Elemcount"
"Hashcode" "EMACS_INT" "USID"
- ; "face_index" "glyph_index" "Lisp_Object"))
- ;; see below (search for last-kbd-macro) for how to auto-generate
- ;; what's below from what's above.
- (concat
- "Ascbyte\\|B\\(?:inbyte\\|oolbyte\\|yte\\(?:bpos\\|count\\|"
- "xpos\\)\\)\\|C\\(?:Binbyte\\|Ibyte\\|Rawbyte\\|har\\(?:bpos\\|"
- "count\\|xpos\\)\\)\\|E\\(?:MACS_INT\\|lemcount\\|xtbyte\\)\\|"
- "Hashcode\\|I\\(?:byte\\|char\\|text\\)\\|Lisp_Object\\|"
- "Mem\\(?:bpos\\|xpos\\)\\|Raw\\(?:_Ichar\\|byte\\)\\|SBinbyte\\|"
- "Textcount\\|U\\(?:Ascbyte\\|Extbyte\\|SID\\)\\|WExtbyte\\|"
- "face_index\\|glyph_index"))
- (c-type-types
-; ("auto" "extern" "register" "static"
"typedef" "struct" "union" "enum"
-; "signed" "unsigned" "short" "long"
"int" "char" "wchar_t" "float"
-; "double" "void" "volatile" "const")
- ;; This regexp is (just) 6 parens deep ...
- ;; This regexp is (just) 6 parens deep ...
- ;; This regexp is (just) 6 parens deep ...
- ;; repeat ad nauseum
- (concat "auto\\|c\\(har\\|onst\\)\\|double\\|e\\(num\\|xtern\\)\\|"
- "float\\|int\\|long\\|register\\|"
- "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|typedef\\|"
- "un\\(ion\\|signed\\)\\|vo\\(id\\|latile\\)\\|wchar_t"))
- (c++-keywords
-; ("break" "continue" "do" "else"
"for" "if" "return" "switch" "while"
-; "asm" "catch" "delete" "new"
"operator" "sizeof" "this" "throw"
"try"
-; "protected" "private" "public"
"const_cast" "dynamic_cast" "reinterpret_cast"
-; "static_cast" "and" "bitor" "or"
"xor" "compl" "bitand" "and_eq"
-; "or_eq" "xor_eq" "not" "not_eq"
"typeid" "false" "true")
- (concat "a\\(nd\\(\\|_eq\\)\\|sm\\)\\|"
- "b\\(it\\(or\\|and\\)\\|reak\\)\\|"
- "c\\(atch\\|o\\(mpl\\|n\\(tinue\\|st_cast\\)\\)\\)\\|"
- "d\\(elete\\|o\\|ynamic_cast\\)\\|"
- "else\\|"
- "f\\(alse\\|or\\)\\|if\\|"
- "n\\(ew\\|ot\\(\\|_eq\\)\\)\\|"
- "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|"
- "or\\(\\|_eq\\)\\|"
- "re\\(interpret_cast\\|turn\\)\\|"
- "s\\(izeof\\|tatic_cast\\|witch\\)\\|"
- "t\\(h\\(is\\|row\\)\\|r\\(ue\\|y\\)\\|ypeid\\)\\|"
- "xor\\(\\|_eq\\)\\|while"))
- (c++-type-types
-; ("auto" "extern" "register" "static"
"typedef" "struct" "union" "enum"
-; "signed" "unsigned" "short" "long"
"int" "char" "float" "double"
-; "void" "volatile" "const" "class"
"inline" "friend" "bool"
-; "virtual" "complex" "template" "explicit"
"mutable" "export" "namespace"
-; "using" "typename" "wchar_t")
- (concat "auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|"
- "double\\|"
- "e\\(num\\|x\\(p\\(licit\\|ort\\)\\|tern\\)\\)\\|"
- "f\\(loat\\|riend\\)\\|"
- "in\\(line\\|t\\)\\|long\\|mutable\\|namespace\\|register\\|"
- "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|"
- "t\\(emplate\\|ype\\(def\\|name\\)\\)\\|"
- "u\\(\\(n\\(ion\\|signed\\)\\|sing\\)\\)\\|"
- "v\\(irtual\\|o\\(id\\|latile\\)\\)\\|"
- "wchar_t")) ; 11 ()s deep.
- (ctoken "\\(\\sw\\|\\s_\\|[:~*&]\\)+")
- )
+(let* ((c-keywords
+ (eval-when-compile
+ (regexp-opt '("break" "continue" "do"
"else" "for" "if" "return"
+ "switch" "while" "sizeof"
+ ;; Type related, but we don't do anything special.
+ "typedef" "extern" "auto" "register"
"static"
+ "volatile" "const"
+ ;; Dan Nicolaescu <done(a)gnu.org> says this is new.
+ "restrict"))))
+ (c-type-specs
+ (eval-when-compile
+ (regexp-opt '("enum" "struct" "union"))))
+ (c-type-specs-depth
+ (regexp-opt-depth c-type-specs))
+ (c-type-names
+ `(mapconcat 'identity
+ (cons
+ ,(eval-when-compile
+ (regexp-opt
+ '("char" "short" "int" "long"
"signed" "unsigned"
+ "float" "double" "void" "complex")))
+ c-font-lock-extra-types)
+ "\\|"))
+ (c-type-names-depth
+ `(regexp-opt-depth ,c-type-names))
+ (c-preprocessor-directives
+ (eval-when-compile
+ (regexp-opt
+ '("define" "elif" "else" "endif"
"error" "file" "if" "ifdef"
+ "ifndef" "include" "line" "pragma"
"undef"))))
+ (c-preprocessor-directives-depth
+ (regexp-opt-depth c-preprocessor-directives))
+ ;; XEmacs:
+ (ctoken "\\(\\sw\\|\\s_\\|[:~*&]\\)+"))
(setq c-font-lock-keywords-1
(list
;;
;; These are all anchored at the beginning of line for speed.
+ ;; Note that `c++-font-lock-keywords-1' depends on
`c-font-lock-keywords-1'.
;;
;; Fontify function name definitions (GNU style; without type on line).
-
+ ;;
+ ;; FSF 21.2 has:
+ ;'("^\\(\\sw+\\)[ \t]*(" 1 font-lock-function-name-face)
+ ;;
+ ;; We have all the following down to just before the error directives.
+
;; In FSF this has the simpler definition of "\\sw+" for ctoken.
;; I'm not sure if ours is more correct.
;; This is a subset of the next rule, and is slower when present. --dmoore
@@ -2311,159 +3398,275 @@
;; This is faster but not by much. I don't see why not.
;(list (concat "^\\(" ctoken "\\)[ \t]*(") 1
'font-lock-function-name-face)
;;
- ;; Added next two; they're both jolly-good fastmatch candidates so
- ;; should be fast. --ben
+ ;; [[ Added next two; they're both jolly-good fastmatch candidates so
+ ;; should be fast. --ben ]]
;;
- ;; Fontify structure names (in structure definition form).
- (list (concat "^\\(typedef[ \t]+struct\\|struct\\|static[ \t]+struct\\)"
- "[ \t]+\\(" ctoken "\\)[ \t]*\\(\{\\|$\\)")
- 2 'font-lock-function-name-face)
+ ;; Matchers for these are down below in ...-keywords-2. Move them up
+ ;; if we want them here. --ben
;;
- ;; Fontify case clauses. This is fast because its anchored on the left.
- '("case[ \t]+\\(\\(\\sw\\|\\s_\\)+\\)[ \t]+:". 1)
+; ;; Fontify structure names (in structure definition form).
+; (list (concat "^\\(typedef[ \t]+struct\\|struct\\|static[
\t]+struct\\)"
+; "[ \t]+\\(" ctoken "\\)[ \t]*\\(\{\\|$\\)")
+; 2 'font-lock-function-name-face)
+; ;;
+; ;; Fontify case clauses. This is fast because it's anchored on the left.
+; '("case[ \t]+\\(\\(\\sw\\|\\s_\\)+\\)[ \t]+:". 1)
+; ;;
+; '("\\<\\(default\\):". 1)
+; ;;
+ ;; Fontify error directives.
+ '("^#[ \t]*error[ \t]+\\(.+\\)" 1 font-lock-warning-face prepend)
;;
- '("\\<\\(default\\):". 1)
;; Fontify filenames in #include <...> preprocessor directives as strings.
- '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1
font-lock-string-face)
+ '("^#[ \t]*\\(import\\|include\\)[
\t]*\\(<[^>\"\n]*>?\\)"
+ 2 font-lock-string-face)
;;
;; Fontify function macro names.
+;FSF'("^#[ \t]*define[ \t]+\\(\\sw+\\)(" 1 font-lock-function-name-face)
+ ;; #### Is this really any different?
'("^#[ \t]*define[ \t]+\\(\\(\\sw+\\)(\\)" 2
font-lock-function-name-face)
- ;;
- ;; Fontify symbol names in #if ... defined preprocessor directives.
- '("^#[ \t]*if\\>"
- ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
- (1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t)))
;;
- ;; Fontify symbol names in #elif ... defined preprocessor directives.
- '("^#[ \t]*elif\\>"
+ ;; Fontify symbol names in #elif or #if ... defined preprocessor directives.
+ '("^#[ \t]*\\(elif\\|if\\)\\>"
("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
+;FSF (1 font-lock-builtin-face) (2 font-lock-variable-name-face nil t)))
(1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t)))
;;
;; Fontify otherwise as symbol names, and the preprocessor directive names.
- '("^\\(#[ \t]*[a-z]+\\)\\>[ \t]*\\(\\sw+\\)?"
- (1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t))
- ))
+ (list
+;FSF(concat "^#[ \t]*\\(" c-preprocessor-directives
+ (concat "^\\(#[ \t]*" c-preprocessor-directives
+ "\\)\\>[ \t!]*\\(\\sw+\\)?")
+;FSF'(1 font-lock-builtin-face)
+ '(1 font-lock-preprocessor-face)
+ (list (+ 2 c-preprocessor-directives-depth)
+ 'font-lock-variable-name-face nil t))))
- (let ((cflk2-part-1
- (list
- ;;
- ;; Simple regexps for speed.
- ;;
- ;; Fontify all type specifiers.
- (cons (concat "\\<\\(" c-type-types "\\)\\>")
'font-lock-type-face)))
- (cflk2-part-2
- (list
- ;; Fontify all builtin keywords (except case, default and goto;
- ;; see below).
- (cons (concat "\\<\\(" c-keywords "\\)\\>")
'font-lock-keyword-face)
- ;;
- ;; Fontify case/goto keywords and targets, and case default/goto tags.
- '("\\<\\(case\\|goto\\)\\>[ \t]*\\([^ \t\n:;]+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
- '("^[ \t]*\\(\\sw+\\)[ \t]*:" 1 font-lock-reference-face)))
- (cflk3-part-1
- ;;
- ;; More complicated regexps for more complete highlighting for
- ;; types. We still have to fontify type specifiers individually,
- ;; as C is so hairy.
- (list
- ;;
- ;; Fontify all storage classes and type specifiers, plus their items.
- (list (concat "\\<\\(" c-type-types "\\)\\>"
- "\\([ \t*&]+\\sw+\\>\\)*")
- ;; Fontify each declaration item.
- '(font-lock-match-c++-style-declaration-item-and-skip-to-next
- ;; Start with point after all type specifiers.
- (goto-char (or (match-beginning 8) (match-end 1)))
- ;; Finish with point after first type specifier.
- (goto-char (match-end 1))
- ;; Fontify as a variable or function name.
- (1 (if (match-beginning 4)
- font-lock-function-name-face
- font-lock-variable-name-face))))))
- (cflk3-part-2
- (list
- ;;
- ;; Fontify structures, or typedef names, plus their items.
- '("\\(}\\)[ \t*]*\\sw"
- (font-lock-match-c++-style-declaration-item-and-skip-to-next
- (goto-char (match-end 1)) nil
- (1 (if (match-beginning 4)
- font-lock-function-name-face
- font-lock-variable-name-face))))
- ;;
- ;; Fontify anything at beginning of line as a declaration or
- ;; definition.
- '("^\\(\\sw+\\)\\>\\([ \t*]+\\sw+\\>\\)*"
- (1 font-lock-type-face)
- (font-lock-match-c++-style-declaration-item-and-skip-to-next
- (goto-char (or (match-beginning 2) (match-end 1))) nil
- (1 (if (match-beginning 4)
- font-lock-function-name-face
- font-lock-variable-name-face))))))
- (xcflk2-part-1
- (list
- ;; Fontify all simple type specifiers used in XEmacs code.
- (cons (concat "\\<\\(" xemacs-c-type-types "\\)\\>")
- 'font-lock-type-face)))
- (xcflk3-part-1
- ;;
- ;; More complicated regexps for more complete highlighting for
- ;; types. We still have to fontify type specifiers individually,
- ;; as C is so hairy.
- (list
- ;;
- ;; Fontify all storage classes and type specifiers, plus their items.
- (list (concat "\\<\\(" xemacs-c-type-types "\\)\\>"
- "\\([ \t*&]+\\sw+\\>\\)*")
- ;; Fontify each declaration item.
- '(font-lock-match-c++-style-declaration-item-and-skip-to-next
- ;; Start with point after all type specifiers.
- (goto-char (or (match-beginning 8) (match-end 1)))
- ;; Finish with point after first type specifier.
- (goto-char (match-end 1))
- ;; Fontify as a variable or function name.
- (1 (if (match-beginning 4)
- font-lock-function-name-face
- font-lock-variable-name-face)))))))
-
- (setq c-font-lock-keywords-2
- (append c-font-lock-keywords-1
- cflk2-part-1
- cflk2-part-2))
-
- (setq c-font-lock-keywords-3
- (append c-font-lock-keywords-2
- cflk3-part-1
- cflk3-part-2))
-
- (setq xemacs-c-font-lock-keywords-2
- (append c-font-lock-keywords-1
- cflk2-part-1
- xcflk2-part-1
- cflk2-part-2))
-
- (setq xemacs-c-font-lock-keywords-3
- (append xemacs-c-font-lock-keywords-2
- cflk3-part-1
- xcflk3-part-1
- cflk3-part-2)))
+ (setq c-font-lock-keywords-2
+ (append c-font-lock-keywords-1
+ (list
+ ;;
+ ;; Simple regexps for speed.
+ ;;
+ ;; Fontify all type names.
+ `(eval .
+ (cons (concat "\\<\\(" ,c-type-names "\\)\\>")
'font-lock-type-face))
+ ;;
+ ;; Fontify all builtin keywords (except case, default and goto; see below).
+ (concat "\\<\\(" c-keywords "\\|" c-type-specs
"\\)\\>")
+ ;;
+ ;; Fontify case/goto keywords and targets, and case default/goto tags.
+ '("\\<\\(case\\|goto\\)\\>"
+ (1 font-lock-keyword-face)
+ ("\\(-[0-9]+\\|\\sw+\\)"
+ ;; Return limit of search.
+ (save-excursion (skip-chars-forward "^:\n") (point))
+ nil
+ (1 font-lock-constant-face nil t)))
+ ;; Anders Lindgren <andersl(a)andersl.com> points out that it is quicker to
+ ;; use MATCH-ANCHORED to effectively anchor the regexp on the left.
+ ;; This must come after the one for keywords and targets.
+ '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
+ (beginning-of-line) (end-of-line)
+ (1 font-lock-constant-face)))
+ )))
+
+ (setq c-font-lock-keywords-3
+ (append c-font-lock-keywords-2
+ ;;
+ ;; More complicated regexps for more complete highlighting for types.
+ ;; We still have to fontify type specifiers individually, as C is so hairy.
+ (list
+ ;;
+ ;; Fontify all storage types, plus their items.
+ `(eval .
+ (list (concat "\\<\\(" ,c-type-names "\\)\\>"
+ "\\([ \t*&]+\\sw+\\>\\)*")
+ ;; Fontify each declaration item.
+ (list 'font-lock-match-c-style-declaration-item-and-skip-to-next
+ ;; Start with point after all type specifiers.
+ (list 'goto-char (list 'or
+ (list 'match-beginning
+ (+ ,c-type-names-depth 2))
+ '(match-end 1)))
+ ;; Finish with point after first type specifier.
+ '(goto-char (match-end 1))
+ ;; Fontify as a variable or function name.
+ '(1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face)))))
+ ;;
+ ;; Fontify all storage specs and types, plus their items.
+ `(eval .
+ (list (concat "\\<\\(" ,c-type-specs "\\)\\>"
+ "[ \t]*\\(\\sw+\\)?")
+ (list 1 'font-lock-keyword-face)
+ (list ,(+ c-type-specs-depth 2) 'font-lock-type-face nil t)
+ (list 'font-lock-match-c-style-declaration-item-and-skip-to-next
+ nil
+ ;; Finish with point after the variable name if
+ ;; there is one.
+ `(if (match-end 2)
+ (goto-char (match-end 2)))
+ ;; Fontify as a variable or function name.
+ '(1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face) nil t))))
+ ;;
+ ;; Fontify structures, or typedef names, plus their items.
+ '("\\(}\\)[ \t*]*\\sw"
+ (font-lock-match-c-style-declaration-item-and-skip-to-next
+ (goto-char (match-end 1)) nil
+ (1 font-lock-type-face)))
+ ;;
+ ;; Fontify anything at beginning of line as a declaration or definition.
+ '("^\\(\\sw+\\)\\>\\([ \t*]+\\sw+\\>\\)*"
+ (1 font-lock-type-face)
+ (font-lock-match-c-style-declaration-item-and-skip-to-next
+ (goto-char (or (match-beginning 2) (match-end 1))) nil
+ (1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face))))
+ )))
+ )
+
+(defvar c-font-lock-keywords c-font-lock-keywords-1
+ "Default expressions to highlight in C mode.
+See also `c-font-lock-extra-types'.")
+
+;;; C++.
+
+(defconst c++-font-lock-keywords-1 nil
+ "Subdued level highlighting for C++ modes.")
+
+(defconst c++-font-lock-keywords-2 nil
+ "Medium level highlighting for C++ modes.")
+
+(defconst c++-font-lock-keywords-3 nil
+ "Gaudy level highlighting for C++ modes.")
+
+(defun font-lock-match-c++-style-declaration-item-and-skip-to-next (limit)
+ ;; Match, and move over, any declaration/definition item after point.
+ ;; The expect syntax of an item is "word" or "word::word",
possibly ending
+ ;; with optional whitespace and a "(". Everything following the item (but
+ ;; belonging to it) is expected to by skip-able by `forward-sexp', and items
+ ;; are expected to be separated with a "," or ";".
+ (if (looking-at "[
\t*&]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\(::\\(\\(?:\\sw\\|\\s_\\)+\\)\\)?[
\t]*\\((\\)?")
+ (save-match-data
+ (condition-case nil
+ (save-restriction
+ ;; Restrict to the end of line, currently guaranteed to be LIMIT.
+ (narrow-to-region (point-min) limit)
+ (goto-char (match-end 1))
+ ;; Move over any item value, etc., to the next item.
+ (while (not (looking-at "[ \t]*\\([,;]\\|$\\)"))
+ (goto-char (or (scan-sexps (point) 1) (point-max))))
+ (goto-char (match-end 0)))
+ (error t)))))
+
+(defun font-lock-match-c++-structor-declaration (limit)
+ ;; Match C++ constructors and destructors inside class declarations.
+ (let ((res nil)
+ (regexp (concat "^\\s-+\\(\\(virtual\\|explicit\\)\\s-+\\)*~?\\(\\<"
+ (mapconcat 'identity
+ c++-font-lock-extra-types "\\|")
+ "\\>\\)\\s-*("
+ ;; Don't match function pointer declarations, e.g.:
+ ;; Foo (*fptr)();
+ "\\s-*[^*( \t]")))
+ (while (progn (setq res (re-search-forward regexp limit t))
+ (and res
+ (save-excursion
+ (beginning-of-line)
+ (save-match-data
+ (not (vectorp (c-at-toplevel-p))))))))
+ res))
+
+(let* ((c++-keywords
+ (eval-when-compile
+ (regexp-opt
+ '("break" "continue" "do" "else"
"for" "if" "return" "switch"
+ "while" "asm" "catch" "delete"
"new" "sizeof" "this" "throw" "try"
+ "typeid"
+ ;; XEmacs:
+ "false" "true"
+ ;; Branko Cibej <branko.cibej(a)hermes.si> says this is new.
+ "export"
+ ;; Mark Mitchell <mmitchell(a)usa.net> says these are new.
+ "mutable" "explicit"
+ ;; Alain Picard <ap(a)abelard.apana.org.au> suggests treating these
+ ;; as keywords not types.
+ "typedef" "template"
+ "extern" "auto" "register" "const"
"volatile" "static"
+ "inline" "friend" "virtual"
+ ;; Standard C++ operator names.
+ "and" "and_eq" "bitand" "bitor"
"compl" "not" "not_eq"
+ "or" "or_eq" "xor" "xor_eq"))))
+ (c++-operators
+ (eval-when-compile
+ (regexp-opt
+ ;; Taken from Stroustrup, minus keywords otherwise fontified.
+ '("+" "-" "*" "/" "%"
"^" "&" "|" "~" "!" "="
"<" ">" "+=" "-="
+ "*=" "/=" "%=" "^=" "&="
"|=" "<<" ">>" ">>="
"<<=" "==" "!="
+ "<=" ">=" "&&" "||"
"++" "--" "->*" "," "->"
"[]" "()"))))
+ (c++-type-specs
+ (eval-when-compile
+ (regexp-opt
+ '("class" "public" "private"
"protected" "typename"
+ "struct" "union" "enum" "namespace"
"using"
+ ;; Eric Hopper <hopper(a)omnifarious.mn.org> says these are new.
+ "static_cast" "dynamic_cast" "const_cast"
"reinterpret_cast"
+ ;; XEmacs:
+ "wchar_t"
+ ) t)))
+ (c++-type-specs-depth
+ (regexp-opt-depth c++-type-specs))
+ (c++-type-names
+ `(mapconcat 'identity
+ (cons
+ ,(eval-when-compile
+ (regexp-opt
+ '("signed" "unsigned" "short"
"long"
+ "int" "char" "float" "double"
"void"
+ "bool" "complex")))
+ c++-font-lock-extra-types)
+ "\\|"))
+ (c++-type-names-depth `(regexp-opt-depth ,c++-type-names))
+ ;;
+ ;; A brave attempt to match templates following a type and/or match
+ ;; class membership. See and sync the above function
+ ;; `font-lock-match-c++-style-declaration-item-and-skip-to-next'.
+ (c++-type-suffix (concat "\\([ \t]*<\\([^>\n]+\\)[
\t*&]*>\\)?"
+ "\\([ \t]*::[ \t*~]*\\(\\sw+\\)\\)*"))
+ (c++-type-suffix-depth (regexp-opt-depth c++-type-suffix))
+ ;; If the string is a type, it may be followed by the cruft above.
+ (c++-type-spec (concat "\\(\\sw+\\)\\>" c++-type-suffix))
+ ;FSF 21.2 (unused) (c++-type-spec-depth (regexp-opt-depth c++-type-spec))
+ ;;
+ ;; Parenthesis depth of user-defined types not forgetting their cruft.
+ (c++-type-depth `(regexp-opt-depth
+ (concat ,c++-type-names ,c++-type-suffix)))
+ )
(setq c++-font-lock-keywords-1
(append
;;
;; The list `c-font-lock-keywords-1' less that for function names.
- ;; the simple function form regexp has been removed. --dmoore
- ;;(cdr c-font-lock-keywords-1)
+;FSF(cdr c-font-lock-keywords-1)
+ ;; XEmacs: the simple function form regexp has been removed. --dmoore
c-font-lock-keywords-1
;;
- ;; Fontify function name definitions, possibly incorporating class name.
(list
- '("^\\(\\sw+\\)\\(::\\(\\sw+\\)\\)?[ \t]*("
- (1 (if (match-beginning 2)
- font-lock-type-face
- font-lock-function-name-face))
- (3 (if (match-beginning 2) font-lock-function-name-face) nil t))
+ ;;
+ ;; Fontify function name definitions, possibly incorporating class names.
+ (list (concat "^" c++-type-spec "[ \t]*(")
+ '(1 (if (or (match-beginning 2) (match-beginning 4))
+ font-lock-type-face
+ font-lock-function-name-face))
+ '(3 font-lock-type-face nil t)
+;FSF '(5 font-lock-function-name-face nil t))
+ '(5 (if (or (match-beginning 2) (match-beginning 4))
+ font-lock-function-name-face) nil t))
)))
(setq c++-font-lock-keywords-2
@@ -2471,19 +3674,40 @@
(list
;;
;; The list `c-font-lock-keywords-2' for C++ plus operator overloading.
- (cons (concat "\\<\\(" c++-type-types "\\)\\>")
'font-lock-type-face)
+ `(eval .
+ (cons (concat "\\<\\(" ,c++-type-names "\\)\\>")
+ 'font-lock-type-face))
;;
- ;; Fontify operator function name overloading.
- '("\\<\\(operator\\)\\>[
\t]*\\([][)(><!=+-][][)(><!=+-]?\\)?"
- (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
+ ;; Fontify operator overloading.
+ (list (concat "\\<\\(operator\\)\\>[ \t]*\\(" c++-operators
"\\)?")
+ '(1 font-lock-keyword-face)
+ '(2 font-lock-builtin-face nil t))
;;
;; Fontify case/goto keywords and targets, and case default/goto tags.
- '("\\<\\(case\\|goto\\)\\>[ \t]*\\([^ \t\n:;]+\\)?"
- (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
- '("^[ \t]*\\(\\sw+\\)[ \t]*:[^:]" 1 font-lock-reference-face)
+ '("\\<\\(case\\|goto\\)\\>"
+ (1 font-lock-keyword-face)
+ ("\\(-[0-9]+\\|\\sw+\\)[ \t]*\\(::\\)?"
+ ;; Return limit of search.
+ (save-excursion
+ (while (progn
+ (skip-chars-forward "^:\n")
+ (looking-at "::"))
+ (forward-char 2))
+ (point))
+ nil
+ (1 (if (match-beginning 2)
+ font-lock-type-face
+ font-lock-constant-face) nil t)))
+ ;; This must come after the one for keywords and targets.
+ '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:\\($\\|[^:]\\)"
+ (beginning-of-line) (end-of-line)
+ (1 font-lock-constant-face)))
;;
;; Fontify other builtin keywords.
- (cons (concat "\\<\\(" c++-keywords "\\)\\>")
'font-lock-keyword-face)
+ (concat "\\<\\(" c++-keywords "\\|" c++-type-specs
"\\)\\>")
+ ;;
+ ;; Eric Hopper <hopper(a)omnifarious.mn.org> says `true' and `false'
are new.
+ '("\\<\\(false\\|true\\)\\>" . font-lock-constant-face)
)))
(setq c++-font-lock-keywords-3
@@ -2493,49 +3717,248 @@
(list
;;
;; Fontify all storage classes and type specifiers, plus their items.
- (list (concat "\\<\\(" c++-type-types "\\)\\>"
- "\\([ \t*&]+\\sw+\\>\\)*")
- ;; Fontify each declaration item.
+ `(eval .
+ (list (concat "\\<\\(" ,c++-type-names "\\)\\>"
,c++-type-suffix
+ "\\([ \t*&]+" ,c++-type-spec "\\)*")
+ ;; The name of any template type.
+ (list (+ ,c++-type-names-depth 3) 'font-lock-type-face nil t)
+ ;; Fontify each declaration item.
+ (list 'font-lock-match-c++-style-declaration-item-and-skip-to-next
+ ;; Start with point after all type specifiers.
+ (list 'goto-char (list 'or (list 'match-beginning
+ (+ ,c++-type-depth 2))
+ '(match-end 1)))
+ ;; Finish with point after first type specifier.
+ '(goto-char (match-end 1))
+ ;; Fontify as a variable or function name.
+ '(1 (cond ((or (match-beginning 2) (match-beginning 4))
+ font-lock-type-face)
+ ((and (match-beginning 6) (c-at-toplevel-p))
+ font-lock-function-name-face)
+ (t
+ font-lock-variable-name-face)))
+ '(3 font-lock-type-face nil t)
+ '(5 (if (match-beginning 6)
+ font-lock-function-name-face
+ font-lock-variable-name-face) nil t))))
+ ;;
+ ;; Fontify all storage specs and types, plus their items.
+ `(eval .
+ (list (concat "\\<" ,c++-type-specs "\\>"
,c++-type-suffix
+ "[ \t]*\\(" ,c++-type-spec "\\)?")
+ ;; The name of any template type.
+ (list ,(+ c++-type-specs-depth 2) 'font-lock-type-face nil t)
+ ;; The name of any type.
+ (list (+ ,c++-type-specs-depth ,c++-type-suffix-depth 2)
+ 'font-lock-type-face nil t)
+ ;; Fontify each declaration item.
+ (list 'font-lock-match-c++-style-declaration-item-and-skip-to-next
+ ;; Start with point after all type specifiers.
+ nil
+ ;; Finish with point after first type specifier.
+ nil
+ ;; Fontify as a variable or function name.
+ '(1 (cond ((or (match-beginning 2) (match-beginning 4))
+ font-lock-type-face)
+ ((and (match-beginning 6) (c-at-toplevel-p))
+ font-lock-function-name-face)
+ (t
+ font-lock-variable-name-face)))
+ '(3 font-lock-type-face nil t)
+ '(5 (if (match-beginning 6)
+ font-lock-function-name-face
+ font-lock-variable-name-face) nil t))
+ ))
+ ;;
+ ;; Fontify structures, or typedef names, plus their items.
+ '("\\(}\\)[ \t*]*\\sw"
+ (font-lock-match-c++-style-declaration-item-and-skip-to-next
+ (goto-char (match-end 1)) nil
+ (1 font-lock-type-face)))
+ ;;
+ ;; Fontify anything at beginning of line as a declaration or definition.
+ (list (concat "^\\(" c++-type-spec "[ \t*&]*\\)+")
'(font-lock-match-c++-style-declaration-item-and-skip-to-next
- ;; Start with point after all type specifiers.
- (goto-char (or (match-beginning 13) (match-end 1)))
- ;; Finish with point after first type specifier.
+ (goto-char (match-beginning 1))
(goto-char (match-end 1))
- ;; Fontify as a variable or function name.
- (1 (cond ((match-beginning 2) 'font-lock-type-face)
- ((match-beginning 4) 'font-lock-function-name-face)
- (t 'font-lock-variable-name-face)))
- (3 (if (match-beginning 4)
- 'font-lock-function-name-face
- 'font-lock-variable-name-face) nil t)))
+ (1 (cond ((or (match-beginning 2) (match-beginning 4))
+ font-lock-type-face)
+ ((match-beginning 6) font-lock-function-name-face)
+ (t font-lock-variable-name-face)))
+ (3 font-lock-type-face nil t)
+ (5 (if (match-beginning 6)
+ font-lock-function-name-face
+ font-lock-variable-name-face) nil t)))
+ ;;
+ ;; Fontify constructors and destructors inside class declarations.
+ '(font-lock-match-c++-structor-declaration
+ (3 font-lock-function-name-face t))
+ )))
+ )
+
+(defvar c++-font-lock-keywords c++-font-lock-keywords-1
+ "Default expressions to highlight in C++ mode.
+See also `c++-font-lock-extra-types'.")
+
+;;; Objective-C.
+
+(defconst objc-font-lock-keywords-1 nil
+ "Subdued level highlighting for Objective-C mode.")
+
+(defconst objc-font-lock-keywords-2 nil
+ "Medium level highlighting for Objective-C mode.
+See also `objc-font-lock-extra-types'.")
+
+(defconst objc-font-lock-keywords-3 nil
+ "Gaudy level highlighting for Objective-C mode.
+See also `objc-font-lock-extra-types'.")
+
+;; Regexps written with help from Stephen Peters <speters(a)us.oracle.com> and
+;; Jacques Duthen Prestataire <duthen(a)cegelec-red.fr>.
+(let* ((objc-keywords
+ (eval-when-compile
+ (regexp-opt '("break" "continue" "do"
"else" "for" "if" "return"
+ "switch" "while" "sizeof" "self"
"super"
+ "typedef" "auto" "extern" "static"
+ "volatile" "const"))))
+ (objc-type-specs
+ (eval-when-compile
+ (regexp-opt
+ '("register" "struct" "union" "enum"
+ "oneway" "in" "out" "inout"
"bycopy" "byref") t)))
+ (objc-type-specs-depth
+ (regexp-opt-depth objc-type-specs))
+ (objc-type-names
+ `(mapconcat 'identity
+ (cons
+ ,(eval-when-compile
+ (regexp-opt
+ '("signed" "unsigned" "short"
"long"
+ "int" "char" "float" "double"
"void"
+ "id")))
+ objc-font-lock-extra-types)
+ "\\|"))
+ (objc-type-names-depth
+ `(regexp-opt-depth ,objc-type-names))
+ )
+ (setq objc-font-lock-keywords-1
+ (append
+ ;;
+ ;; The list `c-font-lock-keywords-1' less that for function names.
+ (cdr c-font-lock-keywords-1)
+ (list
+ ;;
+ ;; Fontify compiler directives.
+ '("@\\(\\sw+\\)\\>"
+ (1 font-lock-keyword-face)
+ ("\\=[ \t:<,]*\\(\\sw+\\)" nil nil
+ (1 font-lock-type-face)))
+ ;;
+ ;; Fontify method names and arguments. Oh Lordy!
+ ;; First, on the same line as the function declaration.
+ '("^[+-][ \t]*\\(PRIVATE\\>\\)?[ \t]*\\(([^)\n]+)\\)?[
\t]*\\(\\sw+\\)"
+ (1 font-lock-keyword-face nil t)
+ (3 font-lock-function-name-face)
+ ("\\=[ \t]*\\(\\sw+\\)?:[ \t]*\\(([^)\n]+)\\)?[ \t]*\\(\\sw+\\)"
+ nil nil
+ (1 font-lock-function-name-face nil t)
+ (3 font-lock-variable-name-face)))
+ ;; Second, on lines following the function declaration.
+ '(":" ("^[ \t]*\\(\\sw+\\)?:[ \t]*\\(([^)\n]+)\\)?[
\t]*\\(\\sw+\\)"
+ (beginning-of-line) (end-of-line)
+ (1 font-lock-function-name-face nil t)
+ (3 font-lock-variable-name-face)))
+ )))
+
+ (setq objc-font-lock-keywords-2
+ (append objc-font-lock-keywords-1
+ (list
+ ;;
+ ;; Simple regexps for speed.
+ ;;
+ ;; Fontify all type specifiers.
+ `(eval .
+ (cons (concat "\\<\\(" ,objc-type-names "\\)\\>")
+ 'font-lock-type-face))
+ ;;
+ ;; Fontify all builtin keywords (except case, default and goto; see below).
+ (concat "\\<\\(" objc-keywords "\\|" objc-type-specs
"\\)\\>")
+ ;;
+ ;; Fontify case/goto keywords and targets, and case default/goto tags.
+ '("\\<\\(case\\|goto\\)\\>[ \t]*\\(-?\\sw+\\)?"
+ (1 font-lock-keyword-face) (2 font-lock-constant-face nil t))
+ ;; Fontify tags iff sole statement on line, otherwise we detect selectors.
+ ;; This must come after the one for keywords and targets.
+ '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
+ (beginning-of-line) (end-of-line)
+ (1 font-lock-constant-face)))
+ ;;
+ ;; Fontify null object pointers.
+ '("\\<[Nn]il\\>" . font-lock-constant-face)
+ )))
+
+ (setq objc-font-lock-keywords-3
+ (append objc-font-lock-keywords-2
+ ;;
+ ;; More complicated regexps for more complete highlighting for types.
+ ;; We still have to fontify type specifiers individually, as C is so hairy.
+ (list
+ ;;
+ ;; Fontify all storage classes and type specifiers, plus their items.
+ `(eval .
+ (list (concat "\\<\\(" ,objc-type-names "\\)\\>"
+ "\\([ \t*&]+\\sw+\\>\\)*")
+ ;; Fontify each declaration item.
+ (list 'font-lock-match-c-style-declaration-item-and-skip-to-next
+ ;; Start with point after all type specifiers.
+ (list 'goto-char
+ (list 'or (list 'match-beginning
+ (+ ,objc-type-names-depth 2))
+ '(match-end 1)))
+ ;; Finish with point after first type specifier.
+ '(goto-char (match-end 1))
+ ;; Fontify as a variable or function name.
+ '(1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face)))))
+ ;;
+ ;; Fontify all storage specs and types, plus their items.
+ `(eval .
+ (list (concat "\\<\\(" ,objc-type-specs "[
\t]*\\)+\\>"
+ "[ \t]*\\(\\sw+\\)?")
+ ;; The name of any type.
+ (list ,(+ objc-type-specs-depth 2) 'font-lock-type-face nil t)
+ ;; Fontify each declaration item.
+ (list 'font-lock-match-c++-style-declaration-item-and-skip-to-next
+ nil nil
+ ;; Fontify as a variable or function name.
+ '(1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face)))
+ ))
;;
;; Fontify structures, or typedef names, plus their items.
'("\\(}\\)[ \t*]*\\sw"
- (font-lock-match-c++-style-declaration-item-and-skip-to-next
+ (font-lock-match-c-style-declaration-item-and-skip-to-next
(goto-char (match-end 1)) nil
- (1 (if (match-beginning 4)
- font-lock-function-name-face
- font-lock-variable-name-face))))
+ (1 font-lock-type-face)))
;;
;; Fontify anything at beginning of line as a declaration or definition.
'("^\\(\\sw+\\)\\>\\([ \t*]+\\sw+\\>\\)*"
(1 font-lock-type-face)
- (font-lock-match-c++-style-declaration-item-and-skip-to-next
+ (font-lock-match-c-style-declaration-item-and-skip-to-next
(goto-char (or (match-beginning 2) (match-end 1))) nil
- (1 (cond ((match-beginning 2) 'font-lock-type-face)
- ((match-beginning 4) 'font-lock-function-name-face)
- (t 'font-lock-variable-name-face)))
- (3 (if (match-beginning 4)
- 'font-lock-function-name-face
- 'font-lock-variable-name-face) nil t)))
+ (1 (if (match-beginning 2)
+ font-lock-function-name-face
+ font-lock-variable-name-face))))
)))
)
-(defvar c-font-lock-keywords c-font-lock-keywords-1
- "Default expressions to highlight in C mode.")
+(defvar objc-font-lock-keywords objc-font-lock-keywords-1
+ "Default expressions to highlight in Objective-C mode.
+See also `objc-font-lock-extra-types'.")
-(defvar c++-font-lock-keywords c++-font-lock-keywords-1
- "Default expressions to highlight in C++ mode.")
+;; END SYNCHED WITH FSF 21.2.
;;; Java.
@@ -2823,6 +4246,212 @@
(goto-char (match-end 2))) ; non-nil
(error t))))))
+
+;;; FSF version of Java (21.2):
+
+; ;;; Java.
+
+; (defconst java-font-lock-keywords-1 nil
+; "Subdued level highlighting for Java mode.")
+
+; (defconst java-font-lock-keywords-2 nil
+; "Medium level highlighting for Java mode.
+; See also `java-font-lock-extra-types'.")
+
+; (defconst java-font-lock-keywords-3 nil
+; "Gaudy level highlighting for Java mode.
+; See also `java-font-lock-extra-types'.")
+
+; ;; Regexps written with help from Fred White <fwhite(a)bbn.com>,
+; ;; Anders Lindgren <andersl(a)andersl.com> and Carl Manning
<caroma(a)ai.mit.edu>.
+; (let* ((java-keywords
+; (eval-when-compile
+; (regexp-opt
+; '("catch" "do" "else" "super"
"this" "finally" "for" "if"
+; ;; Anders Lindgren <andersl(a)andersl.com> says these have gone.
+; ;; "cast" "byvalue" "future" "generic"
"operator" "var"
+; ;; "inner" "outer" "rest"
+; "implements" "extends" "throws"
"instanceof" "new"
+; "interface" "return" "switch" "throw"
"try" "while"))))
+; ;;
+; ;; Classes immediately followed by an object name.
+; (java-type-names
+; `(mapconcat 'identity
+; (cons
+; ,(eval-when-compile
+; (regexp-opt '("boolean" "char" "byte"
"short" "int" "long"
+; "float" "double" "void")))
+; java-font-lock-extra-types)
+; "\\|"))
+; (java-type-names-depth `(regexp-opt-depth ,java-type-names))
+; ;;
+; ;; These are eventually followed by an object name.
+; (java-type-specs
+; (eval-when-compile
+; (regexp-opt
+; '("abstract" "const" "final"
"synchronized" "transient" "static"
+; ;; Anders Lindgren <andersl(a)andersl.com> says this has gone.
+; ;; "threadsafe"
+; "volatile" "public" "private"
"protected" "native"
+; ;; Carl Manning <caroma(a)ai.mit.edu> says this is new.
+; "strictfp"))))
+; )
+; (setq java-font-lock-keywords-1
+; (list
+; ;;
+; ;; Fontify class names.
+; '("\\<\\(class\\)\\>[ \t]*\\(\\sw+\\)?"
+; (1 font-lock-keyword-face) (2 font-lock-type-face nil t))
+; ;;
+; ;; Fontify package names in import directives.
+; '("\\<\\(import\\|package\\)\\>[ \t]*\\(\\sw+\\)?"
+; (1 font-lock-keyword-face)
+; (2 font-lock-constant-face nil t)
+; ("\\=\\.\\(\\*\\|\\sw+\\)" nil nil
+; (1 font-lock-constant-face nil t)))
+; ))
+
+; (setq java-font-lock-keywords-2
+; (append java-font-lock-keywords-1
+; (list
+; ;;
+; ;; Fontify class names.
+; `(eval .
+; (cons (concat "\\<\\(" ,java-type-names
"\\)\\>[^.]")
+; '(1 font-lock-type-face)))
+; ;;
+; ;; Fontify all builtin keywords (except below).
+; (concat "\\<\\(" java-keywords "\\|" java-type-specs
"\\)\\>")
+; ;;
+; ;; Fontify keywords and targets, and case default/goto tags.
+; (list "\\<\\(break\\|case\\|continue\\|goto\\)\\>[
\t]*\\(-?\\sw+\\)?"
+; '(1 font-lock-keyword-face) '(2 font-lock-constant-face nil t))
+; ;; This must come after the one for keywords and targets.
+; '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
+; (beginning-of-line) (end-of-line)
+; (1 font-lock-constant-face)))
+; ;;
+; ;; Fontify all constants.
+; '("\\<\\(false\\|null\\|true\\)\\>" .
font-lock-constant-face)
+; ;;
+; ;; Javadoc tags within comments.
+; (list
+; (concat "@\\("
+; "author\\|deprecated\\|exception"
+; "\\|link\\|return\\|see\\|serial\\|serialData\\|serialField"
+; "\\|since\\|throws"
+; "\\|version"
+; "\\)\\>")
+; '(1 font-lock-constant-face prepend))
+; '("@\\(param\\)\\>[ \t]*\\(\\sw+\\)?"
+; (1 font-lock-constant-face prepend)
+; (2 font-lock-variable-name-face prepend t))
+; '("@\\(exception\\|throws\\)\\>[ \t]*\\(\\S-+\\)?"
+; (1 font-lock-constant-face prepend)
+; (2 font-lock-type-face prepend t))
+; )))
+
+; (setq java-font-lock-keywords-3
+; (append java-font-lock-keywords-2
+; ;;
+; ;; More complicated regexps for more complete highlighting for types.
+; ;; We still have to fontify type specifiers individually, as Java is hairy.
+; (list
+; ;;
+; ;; Fontify random types immediately followed by an item or items.
+; `(eval .
+; (list (concat "\\<\\(" ,java-type-names "\\)\\>"
+; "\\([ \t]*\\[[ \t]*\\]\\)*"
+; "\\([ \t]*\\sw\\)")
+; ;; Fontify each declaration item.
+; (list 'font-lock-match-c-style-declaration-item-and-skip-to-next
+; ;; Start and finish with point after the type specifier.
+; (list 'goto-char (list 'match-beginning
+; (+ ,java-type-names-depth 3)))
+; (list 'goto-char (list 'match-beginning
+; (+ ,java-type-names-depth 3)))
+; ;; Fontify as a variable or function name.
+; '(1 (if (match-beginning 2)
+; font-lock-function-name-face
+; font-lock-variable-name-face)))))
+; ;;
+; ;; Fontify those that are eventually followed by an item or items.
+; (list (concat "\\<\\(" java-type-specs "\\)\\>"
+; "\\([ \t]+\\sw+\\>"
+; "\\([ \t]*\\[[ \t]*\\]\\)*"
+; "\\)*")
+; ;; Fontify each declaration item.
+; '(font-lock-match-c-style-declaration-item-and-skip-to-next
+; ;; Start with point after all type specifiers.
+; (goto-char (or (match-beginning 5) (match-end 1)))
+; ;; Finish with point after first type specifier.
+; (goto-char (match-end 1))
+; ;; Fontify as a variable or function name.
+; (1 (if (match-beginning 2)
+; font-lock-function-name-face
+; font-lock-variable-name-face))))
+; )))
+; )
+
+; (defvar java-font-lock-keywords java-font-lock-keywords-1
+; "Default expressions to highlight in Java mode.
+; See also `java-font-lock-extra-types'.")
+
+
+;; BEGIN SYNCHED WITH FSF 21.2.
+
+(put 'c-mode 'font-lock-defaults
+ '((c-font-lock-keywords c-font-lock-keywords-1
+ c-font-lock-keywords-2 c-font-lock-keywords-3)
+ nil nil ((?_ . "w")) beginning-of-defun
+ (font-lock-mark-block-function . mark-defun)))
+(put 'c++-c-mode 'font-lock-defaults 'c-mode)
+(put 'elec-c-mode 'font-lock-defaults 'c-mode)
+
+(put 'c++-mode 'font-lock-defaults
+ '((c++-font-lock-keywords c++-font-lock-keywords-1
+ c++-font-lock-keywords-2 c++-font-lock-keywords-3)
+;FSF nil nil ((?_ . "w")) beginning-of-defun
+ nil nil (("_~" . "w")) beginning-of-defun
+ (font-lock-mark-block-function . mark-defun)))
+
+(put 'obj-c-mode 'font-lock-defaults
+ '((objc-font-lock-keywords objc-font-lock-keywords-1
+ objc-font-lock-keywords-2 objc-font-lock-keywords-3)
+ nil nil ((?_ . "w") (?$ . "w")) nil
+ (font-lock-mark-block-function . mark-defun)))
+
+(put 'java-mode 'font-lock-defaults
+ '((java-font-lock-keywords java-font-lock-keywords-1
+ java-font-lock-keywords-2 java-font-lock-keywords-3)
+ nil nil ((?_ . "w") (?$ . "w")) nil
+ (font-lock-mark-block-function . mark-defun)))
+
+;; END SYNCHED WITH FSF 21.2.
+
+
+;; TeX
+
+(put 'tex-mode 'font-lock-defaults
+ ;; For TeX modes we could use `backward-paragraph' for the same reason.
+ '(tex-font-lock-keywords nil nil ((?$ . "\""))))
+;; the nine billion names of TeX mode...
+(put 'bibtex-mode 'font-lock-defaults 'tex-mode)
+(put 'plain-tex-mode 'font-lock-defaults 'tex-mode)
+(put 'slitex-tex-mode 'font-lock-defaults 'tex-mode)
+(put 'SliTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'slitex-mode 'font-lock-defaults 'tex-mode)
+(put 'latex-tex-mode 'font-lock-defaults 'tex-mode)
+(put 'LaTex-tex-mode 'font-lock-defaults 'tex-mode)
+(put 'latex-mode 'font-lock-defaults 'tex-mode)
+(put 'LaTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'japanese-LaTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'japanese-SliTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'FoilTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'LATeX-MoDe 'font-lock-defaults 'tex-mode)
+(put 'lATEx-mODe 'font-lock-defaults 'tex-mode)
+;; ok, this is getting a bit silly ...
+(put 'eDOm-xETAl 'font-lock-defaults 'tex-mode)
(defvar tex-font-lock-keywords
; ;; Regexps updated with help from Ulrik Dickow <dickow(a)nbi.dk>.
@@ -2855,6 +4484,9 @@
3 (if (match-beginning 2) 'bold 'italic) keep))
"Default expressions to highlight in TeX modes.")
+
+;; Shell modes.
+
(defconst ksh-font-lock-keywords
(list
'("\\(^\\|[^\$\\\]\\)#.*" . font-lock-comment-face)
@@ -2874,15 +4506,12 @@
"Additional expressions to highlight in sh-mode.")
-;; Install ourselves:
-
-(add-hook 'find-file-hooks 'font-lock-set-defaults t)
-
-;;;###autoload
-(add-minor-mode 'font-lock-mode 'font-lock-mode-line-string)
-
;; Provide ourselves:
(provide 'font-lock)
+
+;; FSF 21.2:
+;(when (eq font-lock-support-mode 'jit-lock-mode)
+; (require 'jit-lock))
;;; font-lock.el ends here
1.1.36.1 +1 -51 XEmacs/xemacs/lisp/fontl-hooks.el
Index: fontl-hooks.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/fontl-hooks.el,v
retrieving revision 1.1
retrieving revision 1.1.36.1
diff -u -r1.1 -r1.1.36.1
--- fontl-hooks.el 1997/11/22 06:47:48 1.1
+++ fontl-hooks.el 2005/02/15 01:17:38 1.1.36.1
@@ -2,7 +2,7 @@
;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
;; Copyright (C) 1995 Amdahl Corporation.
-;; Copyright (C) 1996 Ben Wing.
+;; Copyright (C) 1996, 2003 Ben Wing.
;; This file is part of XEmacs.
@@ -31,56 +31,6 @@
;; because loading font-lock.el automatically turns font-lock on.
;;; Code:
-
-(defun font-lock-set-defaults (&optional explicit-defaults)
- "Set fontification defaults appropriately for this mode.
-Sets `font-lock-keywords', `font-lock-keywords-only',
`font-lock-syntax-table',
-`font-lock-beginning-of-syntax-function' and
-`font-lock-keywords-case-fold-search'.
-
-If `font-lock-defaults' is currently set, it is used. Otherwise, the
-symbol naming the major mode is examined for a `font-lock-defaults'
-property. If that is not present, but a variable `foo-mode-font-lock-keywords'
-is, the value of that variable is used as the default for
-`font-lock-keywords'. Various other backward-compatible behaviors also
-exist -- if you're curious, look at the source.
-
-The value of `font-lock-maximum-decoration' is used to determine which
-set of keywords applies, if more than one exists.
-
-This will also put the buffer into Font Lock mode if any keywords exist
-and if auto-fontification is called for, as determined by
-`font-lock-auto-fontify', `font-lock-mode-enable-list', and
-`font-lock-mode-disable-list'.
-
-Calling this function multiple times in the same buffer is safe -- this
-function keeps track of whether it has already been called in this
-buffer, and does nothing if so. This allows for multiple ways of getting
-Font Lock properly initialized in a buffer, to deal with existing major
-modes that do not call this function. (For example, Font Lock adds this
-function to `find-file-hooks'.)
-
-Major modes that have any font-lock defaults specified should call this
-function during their initialization process, after they have set
-the variable `major-mode'.
-
-If EXPLICIT-DEFAULTS is t, this function will not check whether it
-has already been run in this buffer, and will always do the full
-computation.
-
-If EXPLICIT-DEFAULTS is not nil and not t, it should be something
-that is allowable as a value for `font-lock-defaults' and will be
-used to initialize the Font Lock variables."
-
- (when
- (and
- (featurep 'font-lock)
- (if font-lock-auto-fontify
- (not (memq major-mode font-lock-mode-disable-list))
- (memq major-mode font-lock-mode-enable-list))
- (font-lock-set-defaults-1 explicit-defaults)
- font-lock-keywords)
- (turn-on-font-lock)))
(provide 'fontl-hooks)
1.24.2.1 +235 -50 XEmacs/xemacs/lisp/frame.el
Index: frame.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/frame.el,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -r1.24 -r1.24.2.1
--- frame.el 2005/01/28 02:58:40 1.24
+++ frame.el 2005/02/15 01:17:38 1.24.2.1
@@ -2,7 +2,7 @@
;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003
;; Free Software Foundation, Inc.
-;; Copyright (C) 1995, 1996 Ben Wing.
+;; Copyright (C) 1995, 1996, 2003, 2005 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: internal, dumped
@@ -39,7 +39,7 @@
;; XEmacs change: No need for `frame-creation-function'.
-;; XEmacs change: Emacs no longer specifies the minibuffer property here.
+;; XEmacs change: GNU Emacs no longer specifies the minibuffer property here.
;;; The initial value given here for this must ask for a minibuffer.
;;; There must always exist a frame with a minibuffer, and after we
;;; delete the terminal frame, this will be the only frame.
@@ -201,6 +201,77 @@
(setq initial-frame-plist (safe-alist-to-plist initial-frame-plist))
(setq default-frame-plist (safe-alist-to-plist default-frame-plist)))
+(defvar initial-splash-frame nil)
+
+(defun startup-make-splash-frame ()
+ "Create the initial splash frame.
+It will be centered and have no modelines, menubars, or toolbars."
+ (let* ((device (car (delq terminal-device (device-list))))
+ (offset-ws (device-system-metric device 'offset-workspace))
+ (size-ws (device-system-metric device 'size-workspace))
+ (fleft (car offset-ws))
+ (ftop (cdr offset-ws))
+ (fwidth (car size-ws))
+ (fheight (cdr size-ws))
+ (fonth (font-height (face-font 'default) device))
+ (fontw (font-width (face-font 'default) device))
+ ;;(props (append props dialog-frame-plist))
+ (dfheight 17)
+ (dfwidth 80)
+ ;; under FVWM at least, if I don't specify the initial position,
+ ;; it ends up always at (0, 0). xwininfo doesn't tell me
+ ;; that there are any program-specified position hints, so
+ ;; it must be an FVWM bug. So just be smashing and position
+ ;; in the center of the selected frame.
+ (frame
+ (progn
+ (make-frame
+ (append nil ;props
+ `(popup t
+ no-title-bar t
+ width ,dfwidth
+ height ,dfheight
+ initially-unmapped t
+ ; minibuffer nil
+ menubar-visible-p nil
+ has-modeline-p nil
+ ;;modeline-visible-p nil
+ vertical-scrollbar-visible-p nil
+ horizontal-scrollbar-visible-p nil
+ default-toolbar-visible-p nil
+ default-gutter-visible-p nil
+ text-cursor-visible-p nil
+ modeline-shadow-thickness 0
+ left ,(+ fleft (- (/ fwidth 2)
+ (/ (* dfwidth fontw)
+ 2)))
+ top ,(+ ftop (- (/ fheight 2)
+ (/ (* dfheight fonth)
+ 2)))))
+ device))))
+ (setq initial-splash-frame frame)
+ (set-face-foreground 'modeline [default foreground] frame)
+ (set-face-background 'modeline [default background] frame)
+ (let ((newbuf (generate-new-buffer " *splash screen*")))
+ (set-buffer-dedicated-frame newbuf frame)
+ (set-frame-property frame 'splash-frame-buffer newbuf)
+ (set-window-buffer (frame-root-window frame) newbuf)
+ (with-current-buffer newbuf
+ (set (make-local-variable 'frame-title-format) "XEmacs")
+ (add-local-hook 'delete-frame-hook
+ #'(lambda (frame)
+ (kill-buffer
+ (frame-property
+ frame
+ 'splash-frame-buffer-buffer))))
+ (display-splash-screen-beginning initial-splash-frame-body)
+ (goto-char (point-min))
+ (set-window-start (frame-root-window frame) 1)))
+ (make-frame-visible frame)
+ (message nil)
+ (sit-for 0)
+ frame))
+
;; startup.el calls this function before loading the user's init
;; file - if there is no frame with a minibuffer open now, create
;; one to display messages while loading the init file.
@@ -219,32 +290,39 @@
;; frame, then we need to create the opening frame. Make sure
;; it has a minibuffer, but let initial-frame-plist omit the
;; minibuffer spec.
- (or (delq terminal-frame (minibuffer-frame-list))
- (progn
- (setq frame-initial-frame-plist
- (append initial-frame-plist default-frame-plist))
- ;; XEmacs change: omit the scrollbar settings
-; (or (assq 'horizontal-scroll-bars frame-initial-frame-alist)
-; (setq frame-initial-frame-alist
-; (cons '(horizontal-scroll-bars . t)
-; frame-initial-frame-alist)))
- (setq default-minibuffer-frame
- (setq frame-initial-frame
- (make-frame initial-frame-plist
- (car (delq terminal-device
- (device-list))))))
- ;; Delete any specifications for window geometry properties
- ;; so that we won't reapply them in frame-notice-user-settings.
- ;; It would be wrong to reapply them then,
- ;; because that would override explicit user resizing.
- (setq initial-frame-plist
- (frame-remove-geometry-props initial-frame-plist))))
+ ;; FSF (or (delq terminal-frame (minibuffer-frame-list))
+ (progn
+ (setq frame-initial-frame-plist
+ (append initial-frame-plist default-frame-plist))
+; ;; XEmacs change: omit the scrollbar settings
+; (or (assq 'horizontal-scroll-bars frame-initial-frame-alist)
+; (setq frame-initial-frame-alist
+; (cons '(horizontal-scroll-bars . t)
+; frame-initial-frame-alist)))
+ (setq default-minibuffer-frame
+ (setq frame-initial-frame
+ (make-frame initial-frame-plist
+ (car (delq terminal-device
+ (device-list))))))
+ ;; Delete any specifications for window geometry properties
+ ;; so that we won't reapply them in frame-notice-user-settings.
+ ;; It would be wrong to reapply them then,
+ ;; because that would override explicit user resizing.
+ (setq initial-frame-plist
+ (frame-remove-geometry-props initial-frame-plist)))
;; At this point, we know that we have a frame open, so we
;; can delete the terminal frame.
;; XEmacs change: Do it the same way Fkill_emacs does it. -slb
(delete-console terminal-console)
- (setq terminal-frame nil))
+ (setq terminal-frame nil)
+ (when initial-splash-frame
+ (delete-frame initial-splash-frame)
+ (setq initial-splash-frame nil))
+
+ (sit-for 0)
+
+ )
;; XEmacs change: omit the pc window-system stuff.
; ;; No, we're not running a window system. Use make-terminal-frame if
; ;; we support that feature, otherwise arrange to cause errors.
@@ -627,7 +705,7 @@
;(select-frame-set-input-focus (selected-frame))
)
-;; XEmacs change: Emacs has make-frame-on-display
+;; XEmacs change: GNU Emacs has make-frame-on-display
(defun make-frame-on-device (type connection &optional props)
"Create a frame of type TYPE on CONNECTION.
TYPE should be a symbol naming the device type, i.e. one of
@@ -654,7 +732,7 @@
a new connection is opened."
(make-frame props (make-device type connection props)))
-;; XEmacs omission: Emacs has make-frame-command here, but it reduces to
+;; XEmacs omission: GNU Emacs has make-frame-command here, but it reduces to
;; make-frame for us.
;; XEmacs omission: the following 2 variables are not yet implemented.
@@ -672,8 +750,8 @@
(defalias 'new-frame 'make-frame)
(make-obsolete 'new-frame 'make-frame)
-;; XEmacs change: Emacs has make-frame here. We have it in C, so no need for
-;; frame-creation-function.
+;; XEmacs change: GNU Emacs has make-frame here. We have it in C, so no
+;; need for frame-creation-function.
;; XEmacs addition: support optional DEVICE argument.
(defun filtered-frame-list (predicate &optional device)
@@ -699,7 +777,7 @@
(eq frame (window-frame (minibuffer-window frame))))
device))
-;; XEmacs omission: Emacs has frames-on-display-list here, but that is
+;; XEmacs omission: GNU Emacs has frames-on-display-list here, but that is
;; essentially equivalent to supplying the optional DEVICE argument to
;; filtered-frame-list.
@@ -726,8 +804,8 @@
((consolep display) (car (console-device-list display)))
(t (error 'wrong-type-argument "Not a frame, device, or console"
display))))
-;; Emacs compatibility function. We do not allow display names of the type
-;; HOST:SERVER.SCREEN as Emacs does, but we do handle devices and consoles.
+;; GNU Emacs compatibility function. We do not allow display names of the type
+;; HOST:SERVER.SCREEN as GNU Emacs does, but we do handle devices and consoles.
(defun framep-on-display (&optional display)
"Return the type of frames on DISPLAY.
DISPLAY may be a frame, a device, or a console. If it is a frame, its type
@@ -740,7 +818,7 @@
((consolep display) (console-type display))
(t (error 'wrong-type-argument "Not a frame, device, or console"
display))))
-;; XEmacs addition: Emacs does not have this function.
+;; XEmacs addition: GNU Emacs does not have this function.
(defun frame-minibuffer-only-p (frame)
"Return non-nil if FRAME is a minibuffer-only frame."
(eq (frame-root-window frame) (minibuffer-window frame)))
@@ -763,7 +841,7 @@
'(height width top left user-size user-position))
plist)
-;; XEmacs change: Emacs has focus-follows-mouse here, which lets them
+;; XEmacs change: GNU Emacs has focus-follows-mouse here, which lets them
;; Customize it. XEmacs has it builtin. Should that change?
;; XEmacs change: we have focus-frame instead of multiple foo-focus-frame
@@ -862,7 +940,7 @@
(select-frame ,frame)
,@body))
-; This is in C in Emacs
+; This is in C in GNU Emacs
(defun frame-list ()
"Return a list of all frames on all devices/consoles."
;; Lists are copies, so nconc is safe here.
@@ -953,7 +1031,7 @@
(mapc #'iconify-frame frames-to-delete)
(mapc #'delete-frame frames-to-delete))))
-; XEmacs change: this function is in subr.el in Emacs.
+; XEmacs change: this function is in subr.el in GNU Emacs.
; That's because they don't always include frame.el, while we do.
(defun frame-configuration-p (object)
@@ -965,7 +1043,7 @@
;;;; Convenience functions for accessing and interactively changing
-;;;; frame parameters.
+;;;; frame properties.
(defun frame-height (&optional frame)
"Return number of lines available for display on FRAME.
@@ -979,7 +1057,7 @@
(defalias 'set-default-font 'set-frame-font)
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-frame-font (font-name &optional keep-size)
"Set the font of the selected frame to FONT-NAME.
When called interactively, prompt for the name of the font to use.
@@ -1019,10 +1097,119 @@
(run-hooks 'after-setting-font-hook))
(defun set-frame-property (frame prop val)
- "Set property PROP of FRAME to VAL. See `set-frame-properties'."
+ "Set property PROP of FRAME to VAL.
+PLIST is a property list.
+If you are changing many properties at once, it may be more efficient to
+use `set-frame-properties'.
+
+Frame properties can be retrieved using `frame-property' or
`frame-properties'.
+
+The following symbols etc. have predefined meanings for all frames:
+
+ name Name of the frame. Used with X resources.
+ Unchangeable after creation.
+
+ height Height of the frame, in lines.
+
+ width Width of the frame, in characters.
+
+ minibuffer Gives the minibuffer behavior for this frame. Either
+ t (frame has its own minibuffer), `only' (frame is
+ a minibuffer-only frame), `none' (frame has no minibuffer)
+ or a window (frame uses that window, which is on another
+ frame, as the minibuffer).
+
+ unsplittable If non-nil, frame cannot be split by `display-buffer'.
+
+ buffer-predicate
+ A form that is used when `other-buffer' is called to
+ compute the most recently selected buffer. It will be
+ called with one argument, a potential buffer to return,
+ and if returns nil, then that buffer will be skipped.
+
+
+The following symbols etc. have predefined meanings for window-system frames:
+
+ initially-unmapped If non-nil, the frame will not be visible
+ when it is created. In this case, you
+ need to call `make-frame-visible' to make
+ the frame appear.
+ popup If non-nil, it should be a frame, and this
+ frame will be created as a \"popup\" frame
+ whose parent is the given frame. This
+ will make the window manager treat the
+ frame as a dialog box, which may entail
+ doing different things (e.g. not asking
+ for positioning, and not iconifying
+ separate from its parent).
+ top Y position (in pixels) of the upper-left
+ outermost corner of the frame (i.e. the
+ upper-left of the window-manager
+ decorations).
+ left X position (in pixels) of the upper-left
+ outermost corner of the frame (i.e. the
+ upper-left of the window-manager
+ decorations).
+
+
+ current-display-table, menubar-visible-p, left-margin-width,
+ right-margin-width, minimum-line-ascent, minimum-line-descent,
+ use-left-overflow, use-right-overflow, scrollbar-width, scrollbar-height,
+ default-toolbar, top-toolbar, bottom-toolbar, left-toolbar, right-toolbar,
+ default-toolbar-height, default-toolbar-width, top-toolbar-height,
+ bottom-toolbar-height, left-toolbar-width, right-toolbar-width,
+ default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p,
+ left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
+ top-toolbar-border-width, bottom-toolbar-border-width,
+ left-toolbar-border-width, right-toolbar-border-width,
+ modeline-shadow-thickness, modeline-visible-p,
+ default-gutter, top-gutter, bottom-gutter, left-gutter, right-gutter,
+ default-gutter-height, default-gutter-width, top-gutter-height,
+ bottom-gutter-height, left-gutter-width, right-gutter-width,
+ default-gutter-visible-p, top-gutter-visible-p, bottom-gutter-visible-p,
+ left-gutter-visible-p, right-gutter-visible-p, top-gutter-border-width,
+ bottom-gutter-border-width, left-gutter-border-width,
+ right-gutter-border-width, toolbar-shadow-thickness, etc.
+ [Giving the name of any built-in specifier variable is
+ equivalent to calling `set-specifier' on the specifier,
+ with a locale of FRAME. Giving the name to `frame-property'
+ calls `specifier-instance' on the specifier.]
+
+ text-pointer-glyph, nontext-pointer-glyph, modeline-pointer-glyph,
+ selection-pointer-glyph, busy-pointer-glyph, toolbar-pointer-glyph,
+ menubar-pointer-glyph, scrollbar-pointer-glyph, gc-pointer-glyph,
+ octal-escape-glyph, control-arrow-glyph, invisible-text-glyph,
+ hscroll-glyph, truncation-glyph, continuation-glyph
+ [Giving the name of any glyph variable is equivalent to
+ calling `set-glyph-image' on the glyph, with a locale
+ of FRAME. Giving the name to `frame-property' calls
+ `glyph-image-instance' on the glyph.]
+
+ [default foreground], [default background], [default font],
+ [modeline foreground], [modeline background], [modeline font],
+ etc.
+ [Giving a vector of a face and a property is equivalent
+ to calling `set-face-property' on the face and property,
+ with a locale of FRAME. Giving the vector to
+ `frame-property' calls `face-property-instance' on the
+ face and property.]
+
+Finally, if a frame property symbol has the property `frame-property-alias'
+on it, then the value will be used in place of that symbol when looking
+up and setting frame property values. This allows you to alias one
+frame property name to another.
+
+See the variables `default-x-frame-plist', `default-tty-frame-plist',
+`default-mswindows-frame-plist', and `default-gtk-frame-plist' for a
+description of the properties recognized for particular types of frames.
+
+Default values of frame properties for newly-created frames are controlled
+by `default-frame-plist'. Values specific to the first Emacs frame are
+controlled with `initial-frame-plist'. Values specific to the separate
+minibuffer frame are controlled with `minibuffer-frame-plist'."
(set-frame-properties frame (list prop val)))
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-background-color (color-name)
"Set the background color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
@@ -1032,7 +1219,7 @@
;; (set-face-foreground 'text-cursor color-name (selected-frame))
(set-face-background 'default color-name (selected-frame)))
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-foreground-color (color-name)
"Set the foreground color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
@@ -1041,7 +1228,7 @@
(interactive (list (read-color "Color: ")))
(set-face-foreground 'default color-name (selected-frame)))
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-cursor-color (color-name)
"Set the text cursor color of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
@@ -1050,7 +1237,7 @@
(interactive (list (read-color "Color: ")))
(set-face-background 'text-cursor color-name (selected-frame)))
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-mouse-color (color-name)
"Set the color of the mouse pointer of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
@@ -1059,7 +1246,7 @@
(interactive (list (read-color "Color: ")))
(set-face-foreground 'pointer color-name (selected-frame)))
-;; XEmacs change: this function differs significantly from Emacs.
+;; XEmacs change: this function differs significantly from GNU Emacs.
(defun set-border-color (color-name)
"Set the color of the border of the selected frame to COLOR-NAME.
When called interactively, prompt for the name of the color to use.
@@ -1104,10 +1291,10 @@
(add-hook 'deselect-frame-hook 'default-deselect-frame-hook))
;;; END XEmacs addition
-;;; Following is the Emacs auto-raise/auto-lower interface, which lets the
+;;; Following is the GNU Emacs auto-raise/auto-lower interface, which lets the
;;; user select individual frames to auto-raise and auto-lower
-;; XEmacs addition: the next two variables do not appear in Emacs
+;; XEmacs addition: the next two variables do not appear in GNU Emacs
(defvar auto-raise-specifier (make-boolean-specifier auto-raise-frame)
"Specifier that determines which frames should auto-raise.
A value of `t' means that a frame auto-raises; `nil' means it does not.")
@@ -1475,7 +1662,7 @@
;(define-key ctl-x-5-map "o" 'other-frame)
-;;; XEmacs addition: nothing below this point appears in the Emacs version.
+;;; XEmacs addition: nothing below this point appears in the GNU Emacs version.
;;; Iconifying emacs.
;;;
@@ -1548,7 +1735,7 @@
(setq iconification-data (cdr iconification-data))))
(defun suspend-or-iconify-emacs ()
- "Call iconify-emacs if using a window system, otherwise suspend Emacs."
+ "Call iconify-emacs if using a window system, otherwise suspend XEmacs."
(interactive)
(cond ((device-on-window-system-p)
(iconify-emacs))
@@ -1564,7 +1751,7 @@
;; different things depending on window-system. We can't do the same,
;; because we allow simultaneous X and TTY consoles.
(defun suspend-emacs-or-iconify-frame ()
- "Iconify the selected frame if using a window system, otherwise suspend
Emacs."
+ "Iconify the selected frame if using a window system, otherwise suspend
XEmacs."
(interactive)
(cond ((device-on-window-system-p)
(iconify-frame))
@@ -1997,10 +2184,8 @@
-;; frame properties.
-
(put 'cursor-color 'frame-property-alias [text-cursor background])
-(put 'modeline 'frame-property-alias 'has-modeline-p)
+(put 'modeline 'frame-property-alias 'modeline-visible-p)
(provide 'frame)
1.7.2.1 +34 -33 XEmacs/xemacs/lisp/gtk-marshal.el
Index: gtk-marshal.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/gtk-marshal.el,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- gtk-marshal.el 2005/01/28 00:32:20 1.7
+++ gtk-marshal.el 2005/02/15 01:17:39 1.7.2.1
@@ -5,6 +5,7 @@
'(("INT" . "gint")
("CALLBACK" . "GtkCallback")
("OBJECT" . "GtkObject *")
+ ("ARRAY" . "void *")
("POINTER" . "void *")
("STRING" . "gchar *")
("BOOL" . "gboolean")
@@ -29,25 +30,23 @@
(setq name (get-marshaller-name rval args))
(if (member name defined-marshallers)
- (error "Attempt to define the same marshaller more than once! %s" name))
+ (error "Attempt to define the same marshaller more than once! %s"
+ name))
(set-buffer (get-buffer-create "emacs-marshals.c"))
(goto-char (point-max))
- (if (or (member "FLOAT" args) (member "DOUBLE" args))
- ;; We need to special case anything with FLOAT in the argument
- ;; list or the parameters get screwed up royally.
- (progn
- (setq func-proto (concat (format "__%s__" rval)
- (mapconcat 'identity args "_")
- "_fn"))
- (insert "typedef "
- (or (cdr internal-rval) "void")
- " (*"
- func-proto ")("
- (mapconcat (lambda (x)
- (cdr (assoc x name-to-return-type))) args ", ")
- ");\n")))
+ (progn
+ (setq func-proto (concat (format "__%s__" rval)
+ (mapconcat 'identity args "_")
+ "_fn"))
+ (insert "typedef "
+ (or (cdr internal-rval) "void")
+ " (*"
+ func-proto ")("
+ (mapconcat (lambda (x)
+ (cdr (assoc x name-to-return-type))) args ", ")
+ ");\n"))
(insert "\n"
"static void\n"
@@ -60,7 +59,8 @@
(if (cdr internal-rval)
;; It has a return type to worry about
(insert " " (cdr internal-rval) " *return_val;\n\n"
- (format " return_val = GTK_RETLOC_%s (args[%d]);\n" rval (length args))
+ (format " return_val = GTK_RETLOC_%s (args[%d]);\n" rval
+ (length args))
" *return_val = ")
(insert " "))
(insert "(*rfunc) (")
@@ -78,7 +78,8 @@
(erase-buffer)
(setq defined-marshallers nil)
- (insert "/* This file was automatically generated by ../lisp/gtk-marshal.el
*/\n"
+ (insert "/* This file was automatically generated by "
+ "../lisp/gtk-marshal.el */\n"
"/* DO NOT EDIT BY HAND!!! */\n")
(insert "#define GTK_VALUE_ARRAY(x) GTK_VALUE_POINTER(x)\n\n")
(insert "#define GTK_VALUE_LIST(x) GTK_VALUE_POINTER(x)\n\n")
@@ -131,7 +132,8 @@
("NONE" "OBJECT" "INT" "BOOL")
("NONE" "OBJECT" "INT" "FLOAT"
"BOOL")
("NONE" "OBJECT" "INT" "FLOAT")
- ("NONE" "OBJECT" "INT" "INT"
"ARRAY" "ARRAY" "ARRAY" "ARRAY" "ARRAY"
"ARRAY")
+ ("NONE" "OBJECT" "INT" "INT"
"ARRAY" "ARRAY" "ARRAY" "ARRAY"
+ "ARRAY" "ARRAY")
("NONE" "OBJECT" "INT" "INT"
"ARRAY")
("NONE" "OBJECT" "INT" "INT"
"FLOAT" "FLOAT")
("NONE" "OBJECT" "INT" "INT" "INT"
"INT")
@@ -264,31 +266,30 @@
static struct hash_table *marshaller_hashtable;
-static void initialize_marshaller_storage (void)
+static void
+initialize_marshaller_storage (void)
{
- if (!marshaller_hashtable)
- {
- marshaller_hashtable = make_string_hash_table (100);
+ if (!marshaller_hashtable)
+ {
+ marshaller_hashtable = make_string_hash_table (100);
")
(mapc (lambda (x)
(let ((name (get-marshaller-name (car x) (cdr x))))
- (insert (format "\t\tputhash (\"%s\", (void *) %s,
marshaller_hashtable);\n" name name))))
+ (insert (format " puthash (\"%s\", (void *) %s,
marshaller_hashtable);\n" name name))))
todo)
- (insert "\t};\n"
+ (insert " };\n"
"}\n"
"
-static void *find_marshaller (const char *func_name)
+static void *
+find_marshaller (const Ibyte *func_name)
{
- void *fn = NULL;
- initialize_marshaller_storage ();
+ void *fn = NULL;
+ initialize_marshaller_storage ();
- if (gethash (func_name, marshaller_hashtable, (const void **)&fn))
- {
- return (fn);
- }
-
- return (NULL);
+ if (gethash (func_name, marshaller_hashtable, (const void **) &fn))
+ return (fn);
+ return (NULL);
}
"))
1.8.10.1 +1 -1 XEmacs/xemacs/lisp/gui.el
Index: gui.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/gui.el,v
retrieving revision 1.8
retrieving revision 1.8.10.1
diff -u -r1.8 -r1.8.10.1
--- gui.el 2002/03/15 07:43:19 1.8
+++ gui.el 2005/02/15 01:17:39 1.8.10.1
@@ -62,7 +62,7 @@
(append props
`(popup ,parent initially-unmapped t
menubar-visible-p nil
- has-modeline-p nil
+ modeline-visible-p nil
default-toolbar-visible-p nil
default-gutter-visible-p nil
modeline-shadow-thickness 0
1.15.4.1 +32 -0 XEmacs/xemacs/lisp/hyper-apropos.el
Index: hyper-apropos.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/hyper-apropos.el,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -u -r1.15 -r1.15.4.1
--- hyper-apropos.el 2004/09/15 08:30:27 1.15
+++ hyper-apropos.el 2005/02/15 01:17:40 1.15.4.1
@@ -1376,6 +1376,38 @@
(define-obsolete-function-alias
'hypropos-popup-menu 'hyper-apropos-popup-menu)
+(defvar hyper-apropos-orig-functions nil
+ "Alist of original function replaced during remapping.")
+
+(defvar hyper-apropos-mapped-functions
+ '((describe-variable . hyper-describe-variable)
+ (describe-key . hyper-describe-key)
+ (describe-key-briefly . hyper-describe-key-briefly)
+ ;(describe-face . hyper-describe-face)
+ (describe-function . hyper-describe-function)
+ (help-mode . hyper-apropos-help-mode))
+ "Alist of functions remapped by `install-hyper-apropos-help'.")
+
+(defun install-hyper-apropos-help ()
+ "Install hyper-apropos as the standard Help system."
+ (interactive)
+ (loop for (x . y) in hyper-apropos-mapped-functions do
+ (or (assq x hyper-apropos-orig-functions)
+ (setq hyper-apropos-orig-functions
+ (acons x (symbol-function x) hyper-apropos-orig-functions)))
+ (defalias x y)
+ (print x)
+ (print y)))
+
+(defun uninstall-hyper-apropos-help ()
+ "Install hyper-apropos as the standard Help system."
+ (interactive)
+ (loop for (x . y) in hyper-apropos-mapped-functions do
+ (let ((orig (cdr (assq x hyper-apropos-orig-functions))))
+ (if orig
+ (fset x orig)
+ (warn "Internal Error, can't undo change to %s" x)))))
+
(provide 'hyper-apropos)
;; end of hyper-apropos.el
1.23.4.1 +8 -5 XEmacs/xemacs/lisp/lisp-mode.el
Index: lisp-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/lisp-mode.el,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -u -r1.23 -r1.23.4.1
--- lisp-mode.el 2004/06/06 23:58:44 1.23
+++ lisp-mode.el 2005/02/15 01:17:40 1.23.4.1
@@ -2,7 +2,7 @@
;; Copyright (C) 1985, 1996, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Tinker Systems.
-;; Copyright (C) 2002 Ben Wing.
+;; Copyright (C) 2002, 2003 Ben Wing.
;; Maintainer: FSF
;; Keywords: lisp, languages, dumped
@@ -686,7 +686,7 @@
(defvar lisp-function-and-type-regexp
(concat "def\\("
;; def but not define-.
- "\\(un\\|advice\\|alias\\|macro\\*?\\|setf\\|subst\\*?\\|"
+ "\\(un\\*?\\|advice\\|alias\\|macro\\*?\\|setf\\|subst\\*?\\|"
"-edebug-spec\\|"
;; CLOS
"method\\|generic\\|"
@@ -694,14 +694,17 @@
"ine-\\(?:"
;; basic Lisp stuff
"compiler-macro\\|function\\|function-when-void\\|modify-macro\\|"
- "setf-method\\|"
+ "setf-method\\|symbol-macro\\|"
+ ;; CL?
+ "condition\\|method-combination\\|setf-expander\\|"
;; obsolete/compatible support, XEmacs-specific
"compatible-function-alias\\|obsolete-function-alias\\|"
;; XEmacs-specific, supporting stuff inside of XEmacs
- "ccl-program\\|device-method\\*?\\|prefix-command\\|skeleton"
+ "ccl-program\\|device-method\\*?\\|prefix-command\\|skeleton\\|"
+ "\\(?:derived\\|minor\\)-mode\\|widget"
"\\)\\)\\|"
;; Structure declarations.
- "\\(class\\|struct\\|type\\)\\)\\>")
+ "\\(class\\|group\\|package\\|struct\\|type\\)\\)\\>")
"Regular expression to match the function and type keywords used in Lisp.
This matches, for example, the string \"defun\", as well as defsetf,
defsubst*, define-prefix-command, etc. Match string 1 matches everything
1.23.10.1 +4 -2 XEmacs/xemacs/lisp/modeline.el
Index: modeline.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/modeline.el,v
retrieving revision 1.23
retrieving revision 1.23.10.1
diff -u -r1.23 -r1.23.10.1
--- modeline.el 2002/03/13 08:52:07 1.23
+++ modeline.el 2005/02/15 01:17:40 1.23.10.1
@@ -1,7 +1,7 @@
;;; modeline.el --- modeline hackery.
;; Copyright (C) 1988, 1992-1994, 1997 Free Software Foundation, Inc.
-;; Copyright (C) 1995, 1996, 2002 Ben Wing.
+;; Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: extensions, dumped
@@ -39,6 +39,8 @@
"Modeline customizations."
:group 'environment)
+(define-obsolete-variable-alias 'has-modeline-p 'modeline-visible-p)
+
(defcustom modeline-3d-p ;; added for the options menu
(let ((thickness
(specifier-instance modeline-shadow-thickness)))
@@ -166,7 +168,7 @@
(% (window-pixel-height start-event-window)
default-line-height))
modeline-height
- (if (specifier-instance has-modeline-p start-event-window)
+ (if (specifier-instance modeline-visible-p start-event-window)
(+ (face-height 'modeline start-event-window)
(* 2 (specifier-instance modeline-shadow-thickness
start-event-window)))
1.18.2.1 +1 -7 XEmacs/xemacs/lisp/obsolete.el
Index: obsolete.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/obsolete.el,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -u -r1.18 -r1.18.2.1
--- obsolete.el 2005/01/28 02:58:41 1.18
+++ obsolete.el 2005/02/15 01:17:41 1.18.2.1
@@ -3,7 +3,7 @@
;; Copyright (C) 1985-1994, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1994, 1995 Amdahl Corporation.
;; Copyright (C) 1995 Sun Microsystems.
-;; Copyright (C) 2002, 2004 Ben Wing.
+;; Copyright (C) 2002-2004 Ben Wing.
;; Maintainer: XEmacs Development Team
;; Keywords: internal, dumped
@@ -200,12 +200,6 @@
"use before-change-functions; which is a list of functions rather than a single
function.")
(make-obsolete-variable 'after-change-function
"use after-change-functions; which is a list of functions rather than a single
function.")
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;; insertion and deletion
-
-(define-compatible-function-alias 'insert-and-inherit 'insert)
-(define-compatible-function-alias 'insert-before-markers-and-inherit
- 'insert-before-markers)
;;;;;;;;;;;;;;;;;;;;;;;;;;;; keymaps
1.17.4.1 +2 -3 XEmacs/xemacs/lisp/printer.el
Index: printer.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/printer.el,v
retrieving revision 1.17
retrieving revision 1.17.4.1
diff -u -r1.17 -r1.17.4.1
--- printer.el 2003/03/09 02:27:33 1.17
+++ printer.el 2005/02/15 01:17:41 1.17.4.1
@@ -334,9 +334,8 @@
(concat
(substitute ?_ ?. (buffer-name buffer))
" - XEmacs")
- '(menubar-visible-p
- nil
- has-modeline-p nil
+ '(menubar-visible-p nil
+ modeline-visible-p nil
default-toolbar-visible-p nil
default-gutter-visible-p nil
minibuffer none
1.49.2.1 +0 -4 XEmacs/xemacs/lisp/simple.el
Index: simple.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/simple.el,v
retrieving revision 1.49
retrieving revision 1.49.2.1
diff -u -r1.49 -r1.49.2.1
--- simple.el 2005/01/17 11:23:01 1.49
+++ simple.el 2005/02/15 01:17:41 1.49.2.1
@@ -3295,10 +3295,6 @@
;; buffer-quit-function
;; keyboard-escape-quit
-(defun assoc-ignore-case (key alist)
- "Like `assoc', but assumes KEY is a string and ignores case when
comparing."
- (assoc* key alist :test #'equalp))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; mail composition code ;;
1.53.2.1 +89 -37 XEmacs/xemacs/lisp/startup.el
Index: startup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/startup.el,v
retrieving revision 1.53
retrieving revision 1.53.2.1
diff -u -r1.53 -r1.53.2.1
--- startup.el 2005/01/26 04:56:18 1.53
+++ startup.el 2005/02/15 01:17:42 1.53.2.1
@@ -222,6 +222,8 @@
(defvar initial-frame-unmapped-p nil)
+(defvar show-initial-splash-frame t)
+
(defvar command-switch-alist
@@ -273,19 +275,31 @@
Display options:
- -nw Open the initial frame on the current TTY, instead of
- a window system.
+ -msw Open an initial MS Windows frame.
+ -x Open an initial plain X frame.
+ -gnome Open an initial Gnome (GTK) frame.
+ -gtk Same as -gnome.
+ -tty Open the initial frame on the current TTY.
+ -nw Same as -tty.
-t <device> Use TTY <device> instead of the current TTY for
input
and output. This implies the -nw option.
-display <display> Standard X option, to specify the display connection.
- If this option is given, or if the environment
- variable DISPLAY is set, an initial X frame will be
- created. Otherwise, an initial Windows frame will be
- created if Windows support exists and neither -nw nor
- -t is given. Otherwise, a TTY frame is created.
+ Implies -x.
-unmapped Do not display the initial frame. Useful to create
a \"server\" that can accept `gnuclient'
connections.
+ If none of the above options is given:
+
+ -- If support for plain X or for Gnome exists, XEmacs will check if the
+ environment variable DISPLAY is set, and if so, open an initial X
+ frame will be created, or a Gnome frame if support for Gnome but
+ not plain X exists. (This order may change.)
+ -- If DISPLAY is not set, and support for MS Windows exists, XEmacs will
+ open an initial MS Windows frame.
+ -- Else, if support for TTY's exists, XEmacs will open an initial frame on
+ the current TTY.
+ -- Else, -batch must be given, or XEmacs will abort.
+
Noninteractive options:
{-help}
@@ -511,6 +525,16 @@
;; during normal noninteractive running.
(when (getenv "XEMACSDEBUG")
(eval (read (getenv "XEMACSDEBUG"))))
+
+ ;; Run the window system's init function and create the splash frame.
+ ;; tty is considered to be a type of window system for this purpose.
+ ;; This creates the initial (non stdio) device.
+ (when (and initial-window-system (not noninteractive))
+ (funcall (intern (concat "init-"
+ (symbol-name initial-window-system)
+ "-win")))
+ (when show-initial-splash-frame (startup-make-splash-frame)))
+
;; Canonicalize HOME (PWD is canonicalized by init_buffer in buffer.c)
(let ((value (user-home-directory)))
(if (and value
@@ -670,6 +694,31 @@
(nreverse new-args))))
+(defun startup-create-initial-frame ()
+ (when (eq system-type 'windows-nt)
+ (declare-fboundp (init-mswindows-at-startup)))
+
+ ;; Setup the toolbar icon directory
+ (when (featurep 'toolbar)
+ (init-toolbar-location))
+
+ (if (featurep 'toolbar)
+ (if (featurep 'infodock)
+ (require 'id-x-toolbar)
+ (init-toolbar)))
+
+; ;; Run the window system's init function. tty is considered to be
+; ;; a type of window system for this purpose. This creates the
+; ;; initial (non stdio) device.
+; (when (and initial-window-system (not noninteractive))
+; (funcall (intern (concat "init-"
+; (symbol-name initial-window-system)
+; "-win"))))
+
+ ;; When not in batch mode, this creates the first visible frame,
+ ;; and deletes the stdio device.
+ (frame-initialize))
+
(defconst initial-scratch-message "\
;; This buffer is for notes you don't want to save, and for Lisp evaluation.
;; If you want to create a file, first visit that file with C-x C-f,
@@ -696,30 +745,8 @@
;; handled here instead of down in C.
(setq command-line-args-left (command-line-early command-line-args-left))
- (when (eq system-type 'windows-nt)
- (declare-fboundp (init-mswindows-at-startup)))
+ (startup-create-initial-frame))
- ;; Setup the toolbar icon directory
- (when (featurep 'toolbar)
- (init-toolbar-location))
-
- (if (featurep 'toolbar)
- (if (featurep 'infodock)
- (require 'id-x-toolbar)
- (init-toolbar)))
-
- ;; Run the window system's init function. tty is considered to be
- ;; a type of window system for this purpose. This creates the
- ;; initial (non stdio) device.
- (when (and initial-window-system (not noninteractive))
- (funcall (intern (concat "init-"
- (symbol-name initial-window-system)
- "-win"))))
-
- ;; When not in batch mode, this creates the first visible frame,
- ;; and deletes the stdio device.
- (frame-initialize))
-
;; Reinitialize faces if necessary. This function changes face if
;; it is created during auto-autoloads loading. Otherwise, it
;; does nothing.
@@ -936,20 +963,20 @@
(delete-file old-custom-file))))
(defun load-user-init-file ()
- "This function actually reads the init file."
+ "This function actually reads the init and custom files."
(if (not user-init-file)
(setq user-init-file
(find-user-init-file user-init-directory)))
(if (not custom-file)
(setq custom-file (make-custom-file-name user-init-file)))
- (if (and user-init-file
- (file-readable-p user-init-file))
- (load user-init-file t t t))
(if (and custom-file
(or (not user-init-file)
(not (string= custom-file user-init-file)))
(file-readable-p custom-file))
(load custom-file t t t))
+ (if (and user-init-file
+ (file-readable-p user-init-file))
+ (load user-init-file t t t))
(unless inhibit-default-init
(let ((inhibit-startup-message nil))
;; Users are supposed to be told their rights.
@@ -962,6 +989,22 @@
;;; site-init-file's docstring.
;;; Load user's init file and default ones.
(defun load-init-file ()
+ "Load the site-start file and the user's init and custom files.
+This arranges for errors to be trapped and handled specially as a result of
+the loading.
+
+Current loading order is:
+
+(1) site-start file (`site-start-file')
+(2) custom file (`(make-custom-file-name user-init-file)')
+(3) init file (`user-init-file')
+
+Prior to 21.5, the init file was loaded before the custom file, but this
+is logically the wrong order as it doesn't allow the user's init file to
+make further refinements to the settings set up in the custom file.
+
+The hook `before-init-hook' is run before loading any files, and
+`after-init-hook' after loading the files."
(run-hooks 'before-init-hook)
;; Run the site-start library if it exists. The point of this file is
@@ -1314,6 +1357,10 @@
; ((key undo) ": undo changes; ")
))
+(defconst initial-splash-frame-body
+ ;; #### FIX ME!
+ `(,(emacs-version) "\n"))
+
;; I really hate global variables, oh well.
;(defvar xemacs-startup-logo-function nil
; "If non-nil, function called to provide the startup logo.
@@ -1326,7 +1373,7 @@
(define-obsolete-variable-alias 'splash-frame-static-body
'splash-screen-static-body)
-(defun display-splash-screen ()
+(defun display-splash-screen-beginning (text)
;; display the splash screen in the current buffer and put it in the
;; current window.
(let ((logo xemacs-logo)
@@ -1338,8 +1385,13 @@
(set-extent-begin-glyph (make-extent (point) (point)) logo)
;;(splash-screen-present-hack (make-extent p (point)) 'about-xemacs))
(insert "\n\n"))
- (splash-screen-present splash-screen-static-body)
- (splash-hack-version-string)
+ (splash-screen-present text)
+ (splash-hack-version-string)))
+
+(defun display-splash-screen ()
+ (display-splash-screen-beginning splash-screen-static-body)
+ (let ((buffer-read-only nil)
+ (tty (eq 'tty (console-type))))
(goto-char (point-max))
(let* ((after-change-functions nil) ; no font-lock, thank you
(elements (cond (tty (splash-screen-tty-body))
1.36.2.1 +2 -0 XEmacs/xemacs/lisp/subr.el
Index: subr.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/subr.el,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -u -r1.36 -r1.36.2.1
--- subr.el 2005/01/28 02:05:05 1.36
+++ subr.el 2005/02/15 01:17:43 1.36.2.1
@@ -218,6 +218,8 @@
;;;; Hook manipulation functions.
+;; BEGIN SYNCHED WITH FSF 21.2
+
;; (defconst run-hooks 'run-hooks ...)
(defun make-local-hook (hook)
1.4.14.1 +8 -4 XEmacs/xemacs/lisp/syntax.el
Index: syntax.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/syntax.el,v
retrieving revision 1.4
retrieving revision 1.4.14.1
diff -u -r1.4 -r1.4.14.1
--- syntax.el 2001/05/04 22:42:15 1.4
+++ syntax.el 2005/02/15 01:17:43 1.4.14.1
@@ -99,10 +99,12 @@
(if prefix (write-char ?p)))))))
(defun syntax-string-to-code (string)
- "Return the internal syntax code equivalent to STRING.
-STRING should be something acceptable as the second argument to
-`modify-syntax-entry'.
-If STRING is invalid, signal an error."
+ "Convert a syntax specification STRING into syntax cell form.
+STRING should be a string acceptable as the second argument to
+`modify-syntax-entry'. Returned value is the internal syntax code
+CODE equivalent to STRING, or a cons cell (CODE . MATCHING-CHAR) if
+a matching character was specified, and can be used as value of a
+`syntax-table' text property."
(let* ((bflag nil)
(b3 0)
(ch0 (aref string 0))
@@ -146,6 +148,8 @@
(/= (aref string 1) ?\ ))
(setq code (cons code (aref string 1))))
code))
+
+(define-compatible-function-alias 'string-to-syntax 'syntax-string-to-code)
(defun modify-syntax-entry (char-range spec &optional syntax-table)
"Set syntax for the characters CHAR-RANGE according to string SPEC.
1.5.4.1 +56 -131 XEmacs/xemacs/lisp/text-props.el
Index: text-props.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/text-props.el,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- text-props.el 2003/02/08 02:29:53 1.5
+++ text-props.el 2005/02/15 01:17:44 1.5.4.1
@@ -2,7 +2,7 @@
;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
;; Copyright (C) 1995 Amdahl Corporation.
-;; Copyright (C) 1995 Ben Wing.
+;; Copyright (C) 1995, 2003 Ben Wing.
;; Author: Jamie Zawinski <jwz(a)jwz.org>
;; Maintainer: XEmacs Development Team
@@ -31,21 +31,6 @@
;; This file is dumped with XEmacs.
-;; This is a nearly complete implementation of the FSF19 text properties API.
-;; Please let me know if you notice any differences in behavior between
-;; this implementation and the FSF implementation.
-
-;; However, keep in mind that this interface has been implemented because it
-;; is useful. Compatibility with code written for FSF19 is a secondary goal
-;; to having a clean and useful interface.
-
-;; The cruftier parts of the FSF API, such as the special handling of
-;; properties like `mouse-face', `front-sticky', and other properties whose
-;; value is a list of names of *other* properties set at this position, are
-;; not implemented. The reason for this is that if you feel you need that
-;; kind of functionality, it's a good hint that you should be using extents
-;; instead of text properties.
-
;; When should I use Text Properties, and when should I use Extents?
;; ==================================================================
@@ -80,10 +65,18 @@
;; free reign over the endpoints of any extent with that property. It will
;; not alter any extent which does not have that property.
-;; Right now, the text-property functions create one extent for each distinct
-;; property; that is, if a range of text has two text-properties on it, there
-;; will be two extents. As the set of text-properties is going to be small,
-;; this is probably not a big deal. It would be possible to share extents.
+;; We used to create one extent for each distinct property; that is, if a
+;; range of text has two text-properties on it, there would be two extents.
+;; The problem is that the extent code gets much slower in this case,
+;; especially when you have one extent that straddles the entire buffer --
+;; and this is exactly what happens with lazy-lock, which sets
+;; `lazy-lock-fontified' to t on all regions that are up-to-date.
+
+;; Therefore, we now use just one extent to track all text properties in a
+;; region, and have *NO* overlapping text-property extents (#### Not
+;; actually true if duplicable and non-duplicable properties are mixed).
+;; The value of `text-prop' is a list indicating all properties being
+;; governed.
;; One tricky bit is that undo/kill/yank must be made to not fragment things:
;; these extents must not be allowed to overlap. We accomplish this by using
@@ -116,39 +109,8 @@
;;; Code:
-(defun set-text-properties (start end props &optional buffer-or-string)
- "You should NEVER use this function. It is ideologically blasphemous.
-It is provided only to ease porting of broken FSF Emacs programs.
-Instead, use `remove-text-properties' to remove the specific properties
-you do not want.
-
-Completely replace properties of text from START to END.
-The third argument PROPS is the new property list.
-The optional fourth argument, BUFFER-OR-STRING,
-is the string or buffer containing the text."
- (map-extents #'(lambda (extent ignored)
- ;; #### dmoore - shouldn't this use
- ;; (extent-start-position extent)
- ;; (extent-end-position extent)
- (remove-text-properties start end
- (list (extent-property extent
- 'text-prop)
- nil)
- buffer-or-string)
- nil)
- buffer-or-string start end nil nil 'text-prop)
- (add-text-properties start end props buffer-or-string))
-
-
;;; The following functions can probably stay in lisp, since they're so simple.
-;(defun get-text-property (pos prop &optional buffer)
-; "Returns the value of the PROP property at the given position."
-; (let ((e (extent-at pos buffer prop)))
-; (if e
-; (extent-property e prop)
-; nil)))
-
(defun extent-properties-at-1 (position buffer-or-string text-props-only)
(let ((extent nil)
(props nil)
@@ -156,47 +118,49 @@
(while (setq extent (extent-at position buffer-or-string
(if text-props-only 'text-prop nil)
extent))
- (if text-props-only
- ;; Only return the one prop which the `text-prop' property points at.
- (let ((prop (extent-property extent 'text-prop)))
- (setq new-props (list prop (extent-property extent prop))))
- ;; Return all the properties...
- (setq new-props (extent-properties extent))
- ;; ...but! Don't return the `begin-glyph' or `end-glyph' properties
- ;; unless the position is exactly at the appropriate endpoint. Yeah,
- ;; this is kind of a kludge.
- ;; #### Bug, this doesn't work for end-glyphs (on end-open extents)
- ;; because we've already passed the extent with the glyph by the time
- ;; it's appropriate to return the glyph. We could return the end
- ;; glyph one character early I guess... But then next-property-change
- ;; would have to stop one character early as well. It could back up
- ;; when it hit an end-glyph...
- ;; #### Another bug, if there are multiple glyphs at the same position,
- ;; we only see the first one.
- (cond ((or (extent-begin-glyph extent) (extent-end-glyph extent))
- (if (/= position (if (extent-property extent 'begin-glyph)
- (extent-start-position extent)
- (extent-end-position extent)))
- (let ((rest new-props)
- prev)
- (while rest
- (cond ((or (eq (car rest) 'begin-glyph)
- (eq (car rest) 'end-glyph))
- (if prev
- (setcdr prev (cdr (cdr rest)))
- (setq new-props (cdr (cdr new-props))))
- (setq rest nil)))
- (setq prev rest
- rest (cdr rest))))))))
- (cond ((null props)
- (setq props new-props))
- (t
- (while new-props
- (or (getf props (car new-props))
- (setq props (cons (car new-props)
- (cons (car (cdr new-props))
- props))))
- (setq new-props (cdr (cdr new-props)))))))
+ (setq new-props
+ (if text-props-only
+ ;; Only return the governed text properties.
+ (loop for prop in (extent-property extent 'text-prop)
+ nconc (list prop (extent-property extent prop)))
+ ;; Return all the properties.
+ (extent-properties extent)))
+
+ ;; ...but! Don't return the `begin-glyph' or `end-glyph' properties
+ ;; unless the position is exactly at the appropriate endpoint. Yeah,
+ ;; this is kind of a kludge.
+ ;; #### Bug, this doesn't work for end-glyphs (on end-open extents)
+ ;; because we've already passed the extent with the glyph by the time
+ ;; it's appropriate to return the glyph. We could return the end
+ ;; glyph one character early I guess... But then next-property-change
+ ;; would have to stop one character early as well. It could back up
+ ;; when it hit an end-glyph...
+ ;; #### Another bug, if there are multiple glyphs at the same position,
+ ;; we only see the first one.
+ (cond ((or (extent-begin-glyph extent) (extent-end-glyph extent))
+ (if (/= position (if (extent-property extent 'begin-glyph)
+ (extent-start-position extent)
+ (extent-end-position extent)))
+ (let ((rest new-props)
+ prev)
+ (while rest
+ (cond ((or (eq (car rest) 'begin-glyph)
+ (eq (car rest) 'end-glyph))
+ (if prev
+ (setcdr prev (cdr (cdr rest)))
+ (setq new-props (cdr (cdr new-props))))
+ (setq rest nil)))
+ (setq prev rest
+ rest (cdr rest))))))))
+ (cond ((null props)
+ (setq props new-props))
+ (t
+ (while new-props
+ (or (getf props (car new-props))
+ (setq props (cons (car new-props)
+ (cons (car (cdr new-props))
+ props))))
+ (setq new-props (cdr (cdr new-props))))))
props))
(defun extent-properties-at (position &optional object)
@@ -249,45 +213,6 @@
;; we have to insert a special check for end due to the illogical
;; definition of previous-single-property-change (blame FSF for this).
(if (and retval (>= retval end)) nil retval))))
-
-;; Older versions that only work sometimes (when VALUE is non-nil
-;; for text-property-any, and maybe only when VALUE is nil for
-;; text-property-not-all). They might be faster in those cases,
-;; but that's not obvious.
-
-;(defun text-property-any (start end prop value &optional buffer)
-; "Check text from START to END to see if PROP is ever `eq' to VALUE.
-;If so, return the position of the first character whose PROP is `eq'
-;to VALUE. Otherwise return nil."
-; ;; #### what should (text-property-any x y 'foo nil) return when there
-; ;; is no foo property between x and y? Either t or nil seems sensible,
-; ;; since a character with a property of nil is indistinguishable from
-; ;; a character without that property set.
-; (map-extents
-; #'(lambda (e ignore)
-; (if (eq value (extent-property e prop))
-; ;; return non-nil to stop mapping
-; (max start (extent-start-position e))
-; nil))
-; nil start end buffer))
-;
-;(defun text-property-not-all (start end prop value &optional buffer)
-; "Check text from START to END to see if PROP is ever not `eq' to VALUE.
-;If so, return the position of the first character whose PROP is not
-;`eq' to VALUE. Otherwise, return nil."
-; (let (maxend)
-; (map-extents
-; #'(lambda (e ignore)
-; ;;### no, actually, this is harder. We need to collect all props
-; ;; for a given character, and then determine whether no extent
-; ;; contributes the given value. Doing this without consing lots
-; ;; of lists is the tricky part.
-; (if (eq value (extent-property e prop))
-; (progn
-; (setq maxend (extent-end-position e))
-; nil)
-; (max start maxend)))
-; nil start end buffer)))
(defun next-property-change (pos &optional buffer-or-string limit)
"Return the position of next property change.
No revision
No revision
1.64.4.1 +17 -0 XEmacs/xemacs/lwlib/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.64
retrieving revision 1.64.4.1
diff -u -r1.64 -r1.64.4.1
--- ChangeLog 2004/10/22 05:18:10 1.64
+++ ChangeLog 2005/02/15 01:18:30 1.64.4.1
@@ -1,3 +1,20 @@
+2002-12-16 Ben Wing <ben(a)xemacs.org>
+
+ * lwlib-Xlw.c (xlw_update_one_widget):
+ * lwlib-Xm.c (xm_update_one_widget):
+ * lwlib-Xm.c (xm_update_one_value):
+ * lwlib.c:
+ * lwlib.c (merge_scrollbar_values):
+ * xlwmenu.c:
+ * xlwmenu.c (display_menu):
+ * xlwmenu.c (XlwMenuInitialize):
+ * xlwmenu.c (XlwMenuSetValues):
+ * xlwradio.c:
+ * xlwradio.c (RadioClassPartInit):
+ * xlwradio.c (RadioSet):
+ * xlwradio.c (RadioUnset):
+ class -> class_, new -> new_.
+
2004-10-22 Stephen J. Turnbull <stephen(a)xemacs.org>
* XEmacs 21.5.18 "chestnut" is released.
No revision
No revision
1.36.4.1 +5 -0 XEmacs/xemacs/modules/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/ChangeLog,v
retrieving revision 1.36
retrieving revision 1.36.4.1
diff -u -r1.36 -r1.36.4.1
--- ChangeLog 2004/11/14 01:43:02 1.36
+++ ChangeLog 2005/02/15 01:18:38 1.36.4.1
@@ -1,3 +1,8 @@
+2002-12-16 Ben Wing <ben(a)xemacs.org>
+
+ * postgresql/postgresql.c:
+ remove ifdef USE_KKCC.
+
2004-11-13 Ben Wing <ben(a)xemacs.org>
* ldap/eldap.c (Fldap_modify):
No revision
No revision
1.12.4.1 +2 -2 XEmacs/xemacs/modules/ldap/eldap.c
Index: eldap.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/ldap/eldap.c,v
retrieving revision 1.12
retrieving revision 1.12.4.1
diff -u -r1.12 -r1.12.4.1
--- eldap.c 2004/11/14 01:43:12 1.12
+++ eldap.c 2005/02/15 01:18:48 1.12.4.1
@@ -875,7 +875,7 @@
}
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
EXTERN_C void unload_eldap (void);
void
unload_eldap (void)
@@ -904,4 +904,4 @@
unstaticpro_nodump (&Qadd);
unstaticpro_nodump (&Qreplace);
}
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
No revision
No revision
1.6.4.1 +3 -3 XEmacs/xemacs/modules/postgresql/postgresql.c
Index: postgresql.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/postgresql/postgresql.c,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -r1.6 -r1.6.4.1
--- postgresql.c 2004/09/20 19:19:29 1.6
+++ postgresql.c 2005/02/15 01:18:58 1.6.4.1
@@ -1813,7 +1813,7 @@
The initial value is set from the PGDATESTYLE environment variable.
*/ );
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* If we are building this as a module, we need the initializing function to
run at module load time. */
init_postgresql_from_environment ();
@@ -1865,7 +1865,7 @@
}
}
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
EXTERN_C void unload_postgresql (void);
void
unload_postgresql (void)
@@ -1911,4 +1911,4 @@
unstaticpro_nodump (&Qpgres_polling_ok);
unstaticpro_nodump (&Qpgres_polling_active);
}
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
No revision
No revision
1.1.8.1 +1 -1 XEmacs/xemacs/modules/sample/external/sample.c
Index: sample.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/modules/sample/external/sample.c,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -r1.1 -r1.1.8.1
--- sample.c 2002/09/10 15:27:24 1.1
+++ sample.c 2005/02/15 01:19:07 1.1.8.1
@@ -97,7 +97,7 @@
*/ );
}
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
void
unload_sample()
{
No revision
No revision
1.9.10.1 +546 -546 XEmacs/xemacs/netinstall/res.rc
Index: res.rc
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/netinstall/res.rc,v
retrieving revision 1.9
retrieving revision 1.9.10.1
diff -u -r1.9 -r1.9.10.1
--- res.rc 2002/04/25 18:03:43 1.9
+++ res.rc 2005/02/15 01:19:17 1.9.10.1
@@ -1,546 +1,546 @@
-//Microsoft Developer Studio generated resource script.
-//
-#include "resource.h"
-
-#define APSTUDIO_READONLY_SYMBOLS
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 2 resource.
-//
-#define APSTUDIO_HIDDEN_SYMBOLS
-#include "windows.h"
-#undef APSTUDIO_HIDDEN_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-#undef APSTUDIO_READONLY_SYMBOLS
-
-/////////////////////////////////////////////////////////////////////////////
-// English (U.S.) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-#ifdef _WIN32
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
-#endif //_WIN32
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Dialog
-//
-
-IDD_SOURCE DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- CONTROL "Download from the
Internet",IDC_SOURCE_DOWNLOAD,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,127,102,152,10
- CONTROL "Install from the
Internet",IDC_SOURCE_NETINST,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,127,121,87,10
- CONTROL "Install from Local
Directory",IDC_SOURCE_CWD,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,127,140,104,10
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Setup will use the following installation method.",
- IDC_STATIC,112,11,170,17
- LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
- 32,166,17
- GROUPBOX "Installation method",IDC_STATIC,113,84,188,77
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Local package directory"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,176,45,15,WS_DISABLED
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- EDITTEXT IDC_LOCAL_DIR,120,138,122,12,ES_AUTOHSCROLL
- PUSHBUTTON "Browse...",IDC_LOCAL_DIR_BROWSE,252,137,38,14
- LTEXT "Setup will use the following folder to install XEmacs and /
or packages from.",
- IDC_STATIC,112,10,170,17
- LTEXT "To select a different folder, click Browse and select another
folder.",
- IDC_STATIC,112,36,170,18
- LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
- 63,166,17
- GROUPBOX "Local Package Directory",IDC_STATIC,112,126,186,31
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_ROOT DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- EDITTEXT IDC_ROOT_DIR,120,138,122,12,ES_AUTOHSCROLL
- PUSHBUTTON "Browse...",IDC_ROOT_BROWSE,252,137,38,14
- LTEXT "Setup will use the following folder in which to install
XEmacs and / or packages.",
- IDC_STATIC,112,10,170,17
- LTEXT "To select a different folder, click Browse and select another
folder.",
- IDC_STATIC,112,35,170,18
- LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
- 63,166,17
- GROUPBOX "Installation Root Directory",IDC_STATIC,112,126,186,31
- CONTROL
"All",IDC_ROOT_SYSTEM,"Button",BS_AUTORADIOBUTTON |
- WS_GROUP,177,110,25,8
- CONTROL "Just
Me",IDC_ROOT_USER,"Button",BS_AUTORADIOBUTTON,220,
- 110,50,8
- LTEXT "Installation Type :",IDC_STATIC,112,95,60,8
- LTEXT "Install For :",IDC_STATIC,112,110,43,8
- CONTROL
"Native",IDC_INSTALL_NATIVE,"Button",BS_AUTORADIOBUTTON,
- 177,93,37,10
- CONTROL
"Cygwin",IDC_INSTALL_CYGWIN,"Button",BS_AUTORADIOBUTTON,
- 220,93,39,10
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_SITE DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Select Download Site",IDC_STATIC,113,11,135,11
- LISTBOX IDC_URL_LIST,121,24,179,136,LBS_NOINTEGRALHEIGHT |
- WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_OTHER_URL DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- EDITTEXT IDC_OTHER_URL,120,138,170,12,ES_AUTOHSCROLL
- LTEXT "Setup will use the following URL to install XEmacs and / or
packages from.",
- IDC_STATIC,112,10,170,17
- LTEXT "To select a different URL, edit the text.",IDC_STATIC,
- 112,36,170,18
- LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
- 58,166,17
- GROUPBOX "Select URL to download from",IDC_STATIC,112,126,186,31
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_NET DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Setup will use the following connection method.",
- IDC_STATIC,112,11,170,17,NOT WS_GROUP
- LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
- 32,166,17,NOT WS_GROUP
- CONTROL "Use IE5 Settings",IDC_NET_IE5,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,128,93,69,10
- CONTROL "Direct Connection",IDC_NET_DIRECT,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,128,109,73,10
- CONTROL "Use HTTP/FTP Proxy:",IDC_NET_PROXY,"Button",
- BS_AUTORADIOBUTTON | WS_TABSTOP,128,124,88,10
- EDITTEXT IDC_PROXY_HOST,128,141,80,12,ES_AUTOHSCROLL |
- WS_DISABLED
- LTEXT "Proxy",IDC_STATIC,10,55,50,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- LTEXT "Port",IDC_STATIC,229,139,20,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- EDITTEXT IDC_PROXY_PORT,257,141,30,12,ES_AUTOHSCROLL |
- WS_DISABLED
- GROUPBOX "Installation method",IDC_STATIC,113,78,188,83
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Downloading Packages",IDC_STATIC,112,10,170,17
- LTEXT "(URL)",IDC_DLS_URL,112,26,170,11
- LTEXT "(RATE)",IDC_DLS_RATE,112,41,166,11
- CONTROL
"Progress1",IDC_DLS_PROGRESS,"msctls_progress32",
- WS_BORDER,123,143,165,10
- GROUPBOX "Progress",IDC_STATIC,112,130,186,31
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Installing Packages",IDC_STATIC,112,10,170,17
- LTEXT "(PKG)",IDC_INS_PKG,112,26,170,11
- LTEXT "(FILE)",IDC_INS_FILE,112,41,183,11
- CONTROL
"Progress1",IDC_INS_DISKFULL,"msctls_progress32",
- WS_BORDER,123,143,165,10
- CONTROL
"Progress1",IDC_INS_IPROGRESS,"msctls_progress32",
- WS_BORDER,125,106,163,10
- CONTROL
"Progress1",IDC_INS_PPROGRESS,"msctls_progress32",
- WS_BORDER,125,67,163,10
- GROUPBOX "Disk",IDC_STATIC,112,130,186,31
- GROUPBOX "Package",IDC_STATIC,112,54,186,31
- GROUPBOX "Total",IDC_STATIC,112,93,186,31
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_UNINSTALL DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "Uninstall XEmacs"
-FONT 8, "MS Sans Serif"
-BEGIN
- PUSHBUTTON "Cancel",IDCANCEL,199,176,45,15
- DEFPUSHBUTTON "Uninstall",IDOK,256,176,45,15
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Uninstalling Packages",IDC_STATIC,112,10,170,17
- LTEXT "(PKG)",IDC_UNINS_PKG,112,26,170,11
- LTEXT "(FILE)",IDC_UNINS_FILE,112,41,166,11
- CONTROL
"Progress1",IDC_UNINS_DISKFULL,"msctls_progress32",
- WS_BORDER,123,143,165,10
- CONTROL
"Progress1",IDC_UNINS_IPROGRESS,"msctls_progress32",
- WS_BORDER,125,106,163,10
- CONTROL
"Progress1",IDC_UNINS_PPROGRESS,"msctls_progress32",
- WS_BORDER,125,67,163,10
- GROUPBOX "Disk",IDC_STATIC,112,130,186,31
- GROUPBOX "Package",IDC_STATIC,112,54,186,31
- GROUPBOX "Total",IDC_STATIC,112,93,186,31
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- ICON IDI_XEMACS,IDC_STATIC,5,5,20,20
- EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
- LTEXT "Proxy User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- LTEXT "Proxy Authorization Required",IDC_STATIC,65,10,145,10
- DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED
- PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
-END
-
-IDD_NET_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- ICON IDI_XEMACS,IDC_STATIC,5,5,20,20
- EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
- LTEXT "User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL
- LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE,
- WS_EX_RIGHT
- LTEXT "Server Authorization Required",IDC_STATIC,65,10,145,10
- DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED
- PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
-END
-
-IDD_SPLASH DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- ICON IDI_XEMACS,IDC_STATIC,107,10,20,20
- LTEXT "Welcome to the XEmacs Net Release Setup Program. This will
install XEmacs and/or associated packages on your computer.",
- IDC_STATIC,133,10,158,29
- LTEXT "Version (unknown)",IDC_VERSION,112,117,120,10
- LTEXT "Copyright (C) 2000 Red Hat Inc",IDC_STATIC,111,132,135,
- 8
- LTEXT "http://www.xemacs.org/",IDC_STATIC,111,147,150,10
- LTEXT "It is strongly recommended that you exit all Windows programs
before running this utility.",
- IDC_STATIC,110,43,191,19
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
-END
-
-IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 311, 239
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Next >",IDOK,199,214,45,15
- PUSHBUTTON "< Back",IDC_BACK,154,214,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,214,45,15
- LTEXT "",IDC_STATIC,10,201,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "Select packages to install",IDC_STATIC,55,5,85,8
- ICON IDI_XEMACS,IDC_STATIC,5,5,21,20
- LTEXT "",IDC_LISTVIEW_POS,55,15,230,155,SS_SUNKEN | NOT
- WS_VISIBLE | NOT WS_GROUP
- CONTROL
"SPIN",IDC_STATIC,"Static",SS_BITMAP,55,170,15,13
- LTEXT "= click to choose action, (p) = previous version, (x) =
experimental",
- IDC_STATIC,65,170,220,8
- PUSHBUTTON "Full/Part",IDC_CHOOSE_FULLPART,250,5,35,10
- PUSHBUTTON "Exp",IDC_CHOOSE_EXP,215,5,25,10
- PUSHBUTTON "Curr",IDC_CHOOSE_CURR,190,5,25,10
- PUSHBUTTON "Prev",IDC_CHOOSE_PREV,165,5,25,10
-END
-
-IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 311, 201
-STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
-CAPTION "XEmacs Setup"
-FONT 8, "MS Sans Serif"
-BEGIN
- DEFPUSHBUTTON "Finish",IDOK,199,176,45,15
- PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
- PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
- LTEXT "Setup has now finished. To create desktop shortcuts, please
select from the following options.",
- IDC_STATIC,112,11,170,17
- LTEXT "To complete setup click Finish.",IDC_STATIC,112,32,166,
- 17
- CONTROL "Create Desktop
Icon",IDC_ROOT_DESKTOP,"Button",
- BS_AUTOCHECKBOX,113,50,100,8
- CONTROL "Add to Start Menu",IDC_ROOT_MENU,"Button",
- BS_AUTOCHECKBOX,113,66,100,8
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
- CONTROL
"Text",IDC_TXT_TYPE,"Button",BS_AUTOCHECKBOX,209,101,38,
- 8
- CONTROL
"Java",IDC_JAVA_TYPE,"Button",BS_AUTOCHECKBOX,113,100,50,
- 8
- CONTROL
"C",IDC_C_TYPE,"Button",BS_AUTOCHECKBOX,113,116,41,8
- CONTROL
"C++",IDC_CPP_TYPE,"Button",BS_AUTOCHECKBOX,113,133,38,8
- CONTROL
"E-Lisp",IDC_ELISP_TYPE,"Button",BS_AUTOCHECKBOX,113,148,
- 38,8
- LTEXT "Register XEmacs for these file types:",IDC_STATIC,113,
- 84,166,13
- LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
- LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
- CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
- CONTROL
"IDL",IDC_IDL_TYPE,"Button",BS_AUTOCHECKBOX,209,116,38,8
-END
-
-
-#ifdef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// TEXTINCLUDE
-//
-
-1 TEXTINCLUDE DISCARDABLE
-BEGIN
- "resource.h\0"
-END
-
-2 TEXTINCLUDE DISCARDABLE
-BEGIN
- "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "#include ""windows.h""\r\n"
- "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
- "\0"
-END
-
-3 TEXTINCLUDE DISCARDABLE
-BEGIN
- "\r\n"
- "\0"
-END
-
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDI_XEMACS ICON DISCARDABLE "xemacs.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// FILE
-//
-
-XEMACS.ICON FILE DISCARDABLE "xemacs.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// DESIGNINFO
-//
-
-#ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE
-BEGIN
- IDD_SOURCE, DIALOG
- BEGIN
- VERTGUIDE, 113
- VERTGUIDE, 127
- END
-
- IDD_LOCAL_DIR, DIALOG
- BEGIN
- VERTGUIDE, 112
- HORZGUIDE, 10
- END
-
- IDD_ROOT, DIALOG
- BEGIN
- VERTGUIDE, 112
- HORZGUIDE, 103
- HORZGUIDE, 118
- END
-
- IDD_SITE, DIALOG
- BEGIN
- HORZGUIDE, 11
- HORZGUIDE, 161
- END
-
- IDD_NET, DIALOG
- BEGIN
- VERTGUIDE, 128
- BOTTOMMARGIN, 191
- HORZGUIDE, 153
- END
-
- IDD_INSTATUS, DIALOG
- BEGIN
- VERTGUIDE, 112
- VERTGUIDE, 125
- VERTGUIDE, 288
- END
-
- IDD_PROXY_AUTH, DIALOG
- BEGIN
- BOTTOMMARGIN, 49
- END
-
- IDD_NET_AUTH, DIALOG
- BEGIN
- BOTTOMMARGIN, 49
- END
-
- IDD_SPLASH, DIALOG
- BEGIN
- LEFTMARGIN, 10
- RIGHTMARGIN, 301
- TOPMARGIN, 10
- BOTTOMMARGIN, 191
- END
-
- IDD_CHOOSE, DIALOG
- BEGIN
- BOTTOMMARGIN, 229
- HORZGUIDE, 214
- END
-
- IDD_DESKTOP, DIALOG
- BEGIN
- VERTGUIDE, 113
- VERTGUIDE, 209
- HORZGUIDE, 124
- END
-END
-#endif // APSTUDIO_INVOKED
-
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Bitmap
-//
-
-SPIN BITMAP DISCARDABLE "choose-spin.bmp"
-IDB_SPIN BITMAP DISCARDABLE "choose-spin.bmp"
-IDB_RTARROW BITMAP DISCARDABLE "choose-rtarrow.bmp"
-IDB_CHECK_YES BITMAP DISCARDABLE "check-yes.bmp"
-IDB_CHECK_NO BITMAP DISCARDABLE "check-no.bmp"
-IDB_CHECK_NA BITMAP DISCARDABLE "check-na.bmp"
-GNU BITMAP DISCARDABLE "gnu.bmp"
-IDB_GNU BITMAP DISCARDABLE "gnu.bmp"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// String Table
-//
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_ROOT_SLASH "Warning: we recommend you do NOT use the root of your
hard drive as the XEmacs root. Proceed anyway?"
- IDS_ROOT_SPACE "You should not choose a root path that include spaces
in directory names. Proceed anyway?"
- IDS_MIRROR_LST "http://www.xemacs.org/Download/mirrors.lst"
- IDS_DIALOG_FAILED "Unable to create Dialog Box"
- IDS_CYGWIN_FUNC_MISSING "Error: unable to find function `%s' in %s"
- IDS_DOWNLOAD_SHORT "Download error: %s too short (%d, wanted %d)"
- IDS_ERR_OPEN_WRITE "Can't open %s for writing: %s"
- IDS_SETUPINI_MISSING "Unable to get setup.ini from %s"
- IDS_OLD_SETUPINI "This setup.ini is older than the one you used last
time you installed cygwin. Proceed anyway?"
- IDS_ERR_RENAME "Can't rename %s to %s: %s"
- IDS_NOTHING_INSTALLED "Nothing needed to be installed"
- IDS_INSTALL_COMPLETE "Installation Complete"
-END
-
-STRINGTABLE DISCARDABLE
-BEGIN
- IDS_ERR_OPEN_READ "Can't open %s for reading: %s"
- IDS_ROOT_ABSOLUTE "The install directory must be absolute, with both a
drive letter and leading slash, like C:\\Cygwin"
- IDS_DOWNLOAD_COMPLETE "Download Complete"
- IDS_CVSID "\n%%% $Id: res.rc,v 1.9 2002/04/25 18:03:43 andyp Exp
$\n"
- IDS_NOLOGFILE "Cannot open log file %s for writing"
- IDS_UNINSTALL_COMPLETE "Uninstalls complete."
- IDS_WININET "Unable to find or load the Internet Explorer 5
DLLs"
- IDS_ERR_CHDIR "Could not change dir to %s"
- IDS_OLD_SETUP_VERSION "This setup is version %s, but setup.ini claims
version %s is available.\nYou might want to upgrade to get the latest features and bug
fixes."
- IDS_DOWNLOAD_FAILED "Unable to download %s"
- IDS_DOWNLOAD_INCOMPLETE "Download Incomplete. Try again?"
- IDS_INSTALL_INCOMPLETE "Installation incomplete. Check /setup.log.full for
details"
- IDS_ROOT_NOCYGWIN "You should not install the Cygwin version without
Cygwin installed. Proceed anyway?"
- IDS_CREATE_DIR "The directory %s does not exist, create it?"
-END
-
-#endif // English (U.S.) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-
-#ifndef APSTUDIO_INVOKED
-/////////////////////////////////////////////////////////////////////////////
-//
-// Generated from the TEXTINCLUDE 3 resource.
-//
-
-
-/////////////////////////////////////////////////////////////////////////////
-#endif // not APSTUDIO_INVOKED
-
+//Microsoft Developer Studio generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_SOURCE DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ CONTROL "Download from the
Internet",IDC_SOURCE_DOWNLOAD,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,127,102,152,10
+ CONTROL "Install from the
Internet",IDC_SOURCE_NETINST,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,127,121,87,10
+ CONTROL "Install from Local
Directory",IDC_SOURCE_CWD,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,127,140,104,10
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Setup will use the following installation method.",
+ IDC_STATIC,112,11,170,17
+ LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
+ 32,166,17
+ GROUPBOX "Installation method",IDC_STATIC,113,84,188,77
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_LOCAL_DIR DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Local package directory"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,176,45,15,WS_DISABLED
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ EDITTEXT IDC_LOCAL_DIR,120,138,122,12,ES_AUTOHSCROLL
+ PUSHBUTTON "Browse...",IDC_LOCAL_DIR_BROWSE,252,137,38,14
+ LTEXT "Setup will use the following folder to install XEmacs and /
or packages from.",
+ IDC_STATIC,112,10,170,17
+ LTEXT "To select a different folder, click Browse and select another
folder.",
+ IDC_STATIC,112,36,170,18
+ LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
+ 63,166,17
+ GROUPBOX "Local Package Directory",IDC_STATIC,112,126,186,31
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_ROOT DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ EDITTEXT IDC_ROOT_DIR,120,138,122,12,ES_AUTOHSCROLL
+ PUSHBUTTON "Browse...",IDC_ROOT_BROWSE,252,137,38,14
+ LTEXT "Setup will use the following folder in which to install
XEmacs and / or packages.",
+ IDC_STATIC,112,10,170,17
+ LTEXT "To select a different folder, click Browse and select another
folder.",
+ IDC_STATIC,112,35,170,18
+ LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
+ 63,166,17
+ GROUPBOX "Installation Root Directory",IDC_STATIC,112,126,186,31
+ CONTROL
"All",IDC_ROOT_SYSTEM,"Button",BS_AUTORADIOBUTTON |
+ WS_GROUP,177,110,25,8
+ CONTROL "Just
Me",IDC_ROOT_USER,"Button",BS_AUTORADIOBUTTON,220,
+ 110,50,8
+ LTEXT "Installation Type :",IDC_STATIC,112,95,60,8
+ LTEXT "Install For :",IDC_STATIC,112,110,43,8
+ CONTROL
"Native",IDC_INSTALL_NATIVE,"Button",BS_AUTORADIOBUTTON,
+ 177,93,37,10
+ CONTROL
"Cygwin",IDC_INSTALL_CYGWIN,"Button",BS_AUTORADIOBUTTON,
+ 220,93,39,10
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_SITE DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Select Download Site",IDC_STATIC,113,11,135,11
+ LISTBOX IDC_URL_LIST,121,24,179,136,LBS_NOINTEGRALHEIGHT |
+ WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_OTHER_URL DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ EDITTEXT IDC_OTHER_URL,120,138,170,12,ES_AUTOHSCROLL
+ LTEXT "Setup will use the following URL to install XEmacs and / or
packages from.",
+ IDC_STATIC,112,10,170,17
+ LTEXT "To select a different URL, edit the text.",IDC_STATIC,
+ 112,36,170,18
+ LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
+ 58,166,17
+ GROUPBOX "Select URL to download from",IDC_STATIC,112,126,186,31
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_NET DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Next >",IDOK,199,176,45,15,WS_GROUP
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Setup will use the following connection method.",
+ IDC_STATIC,112,11,170,17,NOT WS_GROUP
+ LTEXT "To exit setup click Cancel at any
time.",IDC_STATIC,112,
+ 32,166,17,NOT WS_GROUP
+ CONTROL "Use IE5 Settings",IDC_NET_IE5,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,128,93,69,10
+ CONTROL "Direct Connection",IDC_NET_DIRECT,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,128,109,73,10
+ CONTROL "Use HTTP/FTP Proxy:",IDC_NET_PROXY,"Button",
+ BS_AUTORADIOBUTTON | WS_TABSTOP,128,124,88,10
+ EDITTEXT IDC_PROXY_HOST,128,141,80,12,ES_AUTOHSCROLL |
+ WS_DISABLED
+ LTEXT "Proxy",IDC_STATIC,10,55,50,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ LTEXT "Port",IDC_STATIC,229,139,20,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ EDITTEXT IDC_PROXY_PORT,257,141,30,12,ES_AUTOHSCROLL |
+ WS_DISABLED
+ GROUPBOX "Installation method",IDC_STATIC,113,78,188,83
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_DLSTATUS DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Downloading Packages",IDC_STATIC,112,10,170,17
+ LTEXT "(URL)",IDC_DLS_URL,112,26,170,11
+ LTEXT "(RATE)",IDC_DLS_RATE,112,41,166,11
+ CONTROL
"Progress1",IDC_DLS_PROGRESS,"msctls_progress32",
+ WS_BORDER,123,143,165,10
+ GROUPBOX "Progress",IDC_STATIC,112,130,186,31
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_INSTATUS DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | WS_POPUP | WS_VISIBLE |
+ WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Installing Packages",IDC_STATIC,112,10,170,17
+ LTEXT "(PKG)",IDC_INS_PKG,112,26,170,11
+ LTEXT "(FILE)",IDC_INS_FILE,112,41,183,11
+ CONTROL
"Progress1",IDC_INS_DISKFULL,"msctls_progress32",
+ WS_BORDER,123,143,165,10
+ CONTROL
"Progress1",IDC_INS_IPROGRESS,"msctls_progress32",
+ WS_BORDER,125,106,163,10
+ CONTROL
"Progress1",IDC_INS_PPROGRESS,"msctls_progress32",
+ WS_BORDER,125,67,163,10
+ GROUPBOX "Disk",IDC_STATIC,112,130,186,31
+ GROUPBOX "Package",IDC_STATIC,112,54,186,31
+ GROUPBOX "Total",IDC_STATIC,112,93,186,31
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_UNINSTALL DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Uninstall XEmacs"
+FONT 8, "MS Sans Serif"
+BEGIN
+ PUSHBUTTON "Cancel",IDCANCEL,199,176,45,15
+ DEFPUSHBUTTON "Uninstall",IDOK,256,176,45,15
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Uninstalling Packages",IDC_STATIC,112,10,170,17
+ LTEXT "(PKG)",IDC_UNINS_PKG,112,26,170,11
+ LTEXT "(FILE)",IDC_UNINS_FILE,112,41,166,11
+ CONTROL
"Progress1",IDC_UNINS_DISKFULL,"msctls_progress32",
+ WS_BORDER,123,143,165,10
+ CONTROL
"Progress1",IDC_UNINS_IPROGRESS,"msctls_progress32",
+ WS_BORDER,125,106,163,10
+ CONTROL
"Progress1",IDC_UNINS_PPROGRESS,"msctls_progress32",
+ WS_BORDER,125,67,163,10
+ GROUPBOX "Disk",IDC_STATIC,112,130,186,31
+ GROUPBOX "Package",IDC_STATIC,112,54,186,31
+ GROUPBOX "Total",IDC_STATIC,112,93,186,31
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_PROXY_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ ICON IDI_XEMACS,IDC_STATIC,5,5,20,20
+ EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
+ LTEXT "Proxy User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL
+ LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ LTEXT "Proxy Authorization Required",IDC_STATIC,65,10,145,10
+ DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED
+ PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
+END
+
+IDD_NET_AUTH DIALOG DISCARDABLE 0, 0, 215, 95
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ ICON IDI_XEMACS,IDC_STATIC,5,5,20,20
+ EDITTEXT IDC_NET_USER,65,28,145,12,ES_AUTOHSCROLL
+ LTEXT "User ID",IDC_STATIC,5,28,55,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ EDITTEXT IDC_NET_PASSWD,65,43,145,12,ES_PASSWORD | ES_AUTOHSCROLL
+ LTEXT "Password",IDC_STATIC,10,43,50,15,SS_CENTERIMAGE,
+ WS_EX_RIGHT
+ LTEXT "Server Authorization Required",IDC_STATIC,65,10,145,10
+ DEFPUSHBUTTON "OK",IDOK,100,75,45,15,WS_DISABLED
+ PUSHBUTTON "Cancel",IDCANCEL,165,75,45,15
+END
+
+IDD_SPLASH DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ ICON IDI_XEMACS,IDC_STATIC,107,10,20,20
+ LTEXT "Welcome to the XEmacs Net Release Setup Program. This will
install XEmacs and/or associated packages on your computer.",
+ IDC_STATIC,133,10,158,29
+ LTEXT "Version (unknown)",IDC_VERSION,112,117,120,10
+ LTEXT "Copyright (C) 2000 Red Hat Inc",IDC_STATIC,111,132,135,
+ 8
+ LTEXT "http://www.xemacs.org/",IDC_STATIC,111,147,150,10
+ LTEXT "It is strongly recommended that you exit all Windows programs
before running this utility.",
+ IDC_STATIC,110,43,191,19
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+END
+
+IDD_CHOOSE DIALOG DISCARDABLE 0, 0, 311, 239
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Next >",IDOK,199,214,45,15
+ PUSHBUTTON "< Back",IDC_BACK,154,214,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,214,45,15
+ LTEXT "",IDC_STATIC,10,201,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "Select packages to install",IDC_STATIC,55,5,85,8
+ ICON IDI_XEMACS,IDC_STATIC,5,5,21,20
+ LTEXT "",IDC_LISTVIEW_POS,55,15,230,155,SS_SUNKEN | NOT
+ WS_VISIBLE | NOT WS_GROUP
+ CONTROL
"SPIN",IDC_STATIC,"Static",SS_BITMAP,55,170,15,13
+ LTEXT "= click to choose action, (p) = previous version, (x) =
experimental",
+ IDC_STATIC,65,170,220,8
+ PUSHBUTTON "Full/Part",IDC_CHOOSE_FULLPART,250,5,35,10
+ PUSHBUTTON "Exp",IDC_CHOOSE_EXP,215,5,25,10
+ PUSHBUTTON "Curr",IDC_CHOOSE_CURR,190,5,25,10
+ PUSHBUTTON "Prev",IDC_CHOOSE_PREV,165,5,25,10
+END
+
+IDD_DESKTOP DIALOG DISCARDABLE 0, 0, 311, 201
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "XEmacs Setup"
+FONT 8, "MS Sans Serif"
+BEGIN
+ DEFPUSHBUTTON "Finish",IDOK,199,176,45,15
+ PUSHBUTTON "< Back",IDC_BACK,154,176,45,15
+ PUSHBUTTON "Cancel",IDCANCEL,256,176,45,15
+ LTEXT "Setup has now finished. To create desktop shortcuts, please
select from the following options.",
+ IDC_STATIC,112,11,170,17
+ LTEXT "To complete setup click Finish.",IDC_STATIC,112,32,166,
+ 17
+ CONTROL "Create Desktop
Icon",IDC_ROOT_DESKTOP,"Button",
+ BS_AUTOCHECKBOX,113,50,100,8
+ CONTROL "Add to Start Menu",IDC_ROOT_MENU,"Button",
+ BS_AUTOCHECKBOX,113,66,100,8
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+ CONTROL
"Text",IDC_TXT_TYPE,"Button",BS_AUTOCHECKBOX,209,101,38,
+ 8
+ CONTROL
"Java",IDC_JAVA_TYPE,"Button",BS_AUTOCHECKBOX,113,100,50,
+ 8
+ CONTROL
"C",IDC_C_TYPE,"Button",BS_AUTOCHECKBOX,113,116,41,8
+ CONTROL
"C++",IDC_CPP_TYPE,"Button",BS_AUTOCHECKBOX,113,133,38,8
+ CONTROL
"E-Lisp",IDC_ELISP_TYPE,"Button",BS_AUTOCHECKBOX,113,148,
+ 38,8
+ LTEXT "Register XEmacs for these file types:",IDC_STATIC,113,
+ 84,166,13
+ LTEXT "",IDC_STATIC,10,169,291,1,SS_SUNKEN | NOT WS_GROUP
+ LTEXT "",IDC_STATIC,10,10,87,151,SS_SUNKEN | NOT WS_GROUP
+ CONTROL
"GNU",IDC_STATIC,"Static",SS_BITMAP,19,36,69,62
+ CONTROL
"IDL",IDC_IDL_TYPE,"Button",BS_AUTOCHECKBOX,209,116,38,8
+END
+
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "#include ""windows.h""\r\n"
+ "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDI_XEMACS ICON DISCARDABLE "xemacs.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// FILE
+//
+
+XEMACS.ICON FILE DISCARDABLE "xemacs.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO DISCARDABLE
+BEGIN
+ IDD_SOURCE, DIALOG
+ BEGIN
+ VERTGUIDE, 113
+ VERTGUIDE, 127
+ END
+
+ IDD_LOCAL_DIR, DIALOG
+ BEGIN
+ VERTGUIDE, 112
+ HORZGUIDE, 10
+ END
+
+ IDD_ROOT, DIALOG
+ BEGIN
+ VERTGUIDE, 112
+ HORZGUIDE, 103
+ HORZGUIDE, 118
+ END
+
+ IDD_SITE, DIALOG
+ BEGIN
+ HORZGUIDE, 11
+ HORZGUIDE, 161
+ END
+
+ IDD_NET, DIALOG
+ BEGIN
+ VERTGUIDE, 128
+ BOTTOMMARGIN, 191
+ HORZGUIDE, 153
+ END
+
+ IDD_INSTATUS, DIALOG
+ BEGIN
+ VERTGUIDE, 112
+ VERTGUIDE, 125
+ VERTGUIDE, 288
+ END
+
+ IDD_PROXY_AUTH, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 49
+ END
+
+ IDD_NET_AUTH, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 49
+ END
+
+ IDD_SPLASH, DIALOG
+ BEGIN
+ LEFTMARGIN, 10
+ RIGHTMARGIN, 301
+ TOPMARGIN, 10
+ BOTTOMMARGIN, 191
+ END
+
+ IDD_CHOOSE, DIALOG
+ BEGIN
+ BOTTOMMARGIN, 229
+ HORZGUIDE, 214
+ END
+
+ IDD_DESKTOP, DIALOG
+ BEGIN
+ VERTGUIDE, 113
+ VERTGUIDE, 209
+ HORZGUIDE, 124
+ END
+END
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Bitmap
+//
+
+SPIN BITMAP DISCARDABLE "choose-spin.bmp"
+IDB_SPIN BITMAP DISCARDABLE "choose-spin.bmp"
+IDB_RTARROW BITMAP DISCARDABLE "choose-rtarrow.bmp"
+IDB_CHECK_YES BITMAP DISCARDABLE "check-yes.bmp"
+IDB_CHECK_NO BITMAP DISCARDABLE "check-no.bmp"
+IDB_CHECK_NA BITMAP DISCARDABLE "check-na.bmp"
+GNU BITMAP DISCARDABLE "gnu.bmp"
+IDB_GNU BITMAP DISCARDABLE "gnu.bmp"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ROOT_SLASH "Warning: we recommend you do NOT use the root of your
hard drive as the XEmacs root. Proceed anyway?"
+ IDS_ROOT_SPACE "You should not choose a root path that include spaces
in directory names. Proceed anyway?"
+ IDS_MIRROR_LST "http://www.xemacs.org/Download/mirrors.lst"
+ IDS_DIALOG_FAILED "Unable to create Dialog Box"
+ IDS_CYGWIN_FUNC_MISSING "Error: unable to find function `%s' in %s"
+ IDS_DOWNLOAD_SHORT "Download error: %s too short (%d, wanted %d)"
+ IDS_ERR_OPEN_WRITE "Can't open %s for writing: %s"
+ IDS_SETUPINI_MISSING "Unable to get setup.ini from %s"
+ IDS_OLD_SETUPINI "This setup.ini is older than the one you used last
time you installed cygwin. Proceed anyway?"
+ IDS_ERR_RENAME "Can't rename %s to %s: %s"
+ IDS_NOTHING_INSTALLED "Nothing needed to be installed"
+ IDS_INSTALL_COMPLETE "Installation Complete"
+END
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_ERR_OPEN_READ "Can't open %s for reading: %s"
+ IDS_ROOT_ABSOLUTE "The install directory must be absolute, with both a
drive letter and leading slash, like C:\\Cygwin"
+ IDS_DOWNLOAD_COMPLETE "Download Complete"
+ IDS_CVSID "\n%%% $Id: res.rc,v 1.9.10.1 2005/02/15 01:19:17 ben
Exp $\n"
+ IDS_NOLOGFILE "Cannot open log file %s for writing"
+ IDS_UNINSTALL_COMPLETE "Uninstalls complete."
+ IDS_WININET "Unable to find or load the Internet Explorer 5
DLLs"
+ IDS_ERR_CHDIR "Could not change dir to %s"
+ IDS_OLD_SETUP_VERSION "This setup is version %s, but setup.ini claims
version %s is available.\nYou might want to upgrade to get the latest features and bug
fixes."
+ IDS_DOWNLOAD_FAILED "Unable to download %s"
+ IDS_DOWNLOAD_INCOMPLETE "Download Incomplete. Try again?"
+ IDS_INSTALL_INCOMPLETE "Installation incomplete. Check /setup.log.full for
details"
+ IDS_ROOT_NOCYGWIN "You should not install the Cygwin version without
Cygwin installed. Proceed anyway?"
+ IDS_CREATE_DIR "The directory %s does not exist, create it?"
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
No revision
No revision
1.181.2.1 +44 -0 XEmacs/xemacs/nt/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/ChangeLog,v
retrieving revision 1.181
retrieving revision 1.181.2.1
diff -u -r1.181 -r1.181.2.1
--- ChangeLog 2005/02/04 02:58:32 1.181
+++ ChangeLog 2005/02/15 01:19:25 1.181.2.1
@@ -1,12 +1,56 @@
+2002-12-16 Ben Wing <ben(a)xemacs.org>
2005-02-03 Ben Wing <ben(a)xemacs.org>
+ * README (NOTE):
+ * config.inc.samp:
+ * config.inc.samp (PACKAGE_PREFIX):
+ * config.inc.samp (GTK_DIR):
* config.inc.samp (COMPFACE_DIR):
+ * config.inc.samp (USE_FASTCALL):
+ * config.inc.samp (HAVE_VC6): New.
+ * config.inc.samp (PROFILE_SUPPORT):
+ * config.inc.samp (DEBUG_XEMACS):
+ * config.inc.samp (USE_PORTABLE_DUMPER):
+ * config.inc.samp (USE_KKCC): New.
+ * config.inc.samp (USE_UNION_TYPE): New.
+ * xemacs.dsp (CFG):
+ * xemacs.mak (HAVE_VC6):
+ * xemacs.mak (ERROR_CHECK_ALL): New.
+ * xemacs.mak (CPLUSPLUS_COMPILE): New.
+ * xemacs.mak (USE_KKCC): New.
+ * xemacs.mak (USE_UNION_TYPE): New.
+ * xemacs.mak (USE_PORTABLE_DUMPER):
+ * xemacs.mak (PROFILE_FLAGS):
+ * xemacs.mak (CPLUSPLUS_COMPILE_FLAGS): New.
+ * xemacs.mak (DUMPER_DEFINES):
+ * xemacs.mak (KKCC_DEFINES): New.
+ * xemacs.mak (DEFINES):
+ * xemacs.mak (LASTFILE_FLAGS):
+ * xemacs.mak (TEMACS_CPP_FLAGS_NO_CFLAGS):
+ * xemacs.mak (OS):
+ * config.inc.samp (COMPFACE_DIR):
Change version to 1.5.1 in accordance with FTP site.
+ Support C++ compilation, KKCC compilation. See src/ChangeLog.
+ Add stuff about the evilness of USE_UNION_TYPE.
2005-01-31 Ben Wing <ben(a)xemacs.org>
+2004-11-17 Ben Wing <ben(a)xemacs.org>
* xemacs.mak (install):
Also copy BUGS, README, COPYING and Installation.
+
+ * config.inc.samp:
+ * xemacs.mak (HAVE_WIDGETS):
+ * xemacs.mak (MSW_DEFINES):
+ * xemacs.mak ( NOTE):
+
+2004-11-13 Ben Wing <ben(a)xemacs.org>
+
+ * config.inc.samp:
+ * xemacs.mak (HAVE_WIDGETS):
+ * xemacs.mak (MSW_DEFINES):
+ * xemacs.mak ( NOTE):
+ Support HAVE_WINDOWS_SHORTCUTS_AS_LINKS.
2005-01-27 Ben Wing <ben(a)xemacs.org>
1.6.4.1 +25 -2 XEmacs/xemacs/nt/xemacs.dsp
Index: xemacs.dsp
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.dsp,v
retrieving revision 1.6
retrieving revision 1.6.4.1
diff -u -r1.6 -r1.6.4.1
--- xemacs.dsp 2004/09/14 14:40:02 1.6
+++ xemacs.dsp 2005/02/15 01:19:26 1.6.4.1
@@ -4,7 +4,7 @@
# TARGTYPE "Win32 (x86) External Target" 0x0106
-CFG=xemacs - Win32 Debug
+CFG=xemacs - Win32 Debug Continue Build
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
@@ -13,12 +13,13 @@
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
-!MESSAGE NMAKE /f "xemacs.mak" CFG="xemacs - Win32 Debug"
+!MESSAGE NMAKE /f "xemacs.mak" CFG="xemacs - Win32 Debug Continue
Build"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "xemacs - Win32 Release" (based on "Win32 (x86) External
Target")
!MESSAGE "xemacs - Win32 Debug" (based on "Win32 (x86) External
Target")
+!MESSAGE "xemacs - Win32 Debug Continue Build" (based on "Win32 (x86)
External Target")
!MESSAGE
# Begin Project
@@ -58,6 +59,25 @@
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "..\src"
# PROP Intermediate_Dir "obj"
+# PROP Cmd_Line "NMAKE /f xemacs.mak"
+# PROP Rebuild_Opt "/a"
+# PROP Target_File "..\src\xemacs.exe"
+# PROP Bsc_Name "..\src\temacs.bsc"
+# PROP Target_Dir ""
+
+!ELSEIF "$(CFG)" == "xemacs - Win32 Debug Continue Build"
+
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "xemacs___Win32_Debug_Continue_Build"
+# PROP BASE Intermediate_Dir "xemacs___Win32_Debug_Continue_Build"
+# PROP BASE Cmd_Line "NMAKE /k /f xemacs.mak"
+# PROP BASE Rebuild_Opt "/a"
+# PROP BASE Target_File "..\src\xemacs.exe"
+# PROP BASE Bsc_Name "..\src\temacs.bsc"
+# PROP BASE Target_Dir ""
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "xemacs___Win32_Debug_Continue_Build"
+# PROP Intermediate_Dir "xemacs___Win32_Debug_Continue_Build"
# PROP Cmd_Line "NMAKE /k /f xemacs.mak"
# PROP Rebuild_Opt "/a"
# PROP Target_File "..\src\xemacs.exe"
@@ -70,10 +90,13 @@
# Name "xemacs - Win32 Release"
# Name "xemacs - Win32 Debug"
+# Name "xemacs - Win32 Debug Continue Build"
!IF "$(CFG)" == "xemacs - Win32 Release"
!ELSEIF "$(CFG)" == "xemacs - Win32 Debug"
+
+!ELSEIF "$(CFG)" == "xemacs - Win32 Debug Continue Build"
!ENDIF
1.112.2.1 +25 -1 XEmacs/xemacs/nt/xemacs.mak
Index: xemacs.mak
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/nt/xemacs.mak,v
retrieving revision 1.112
retrieving revision 1.112.2.1
diff -u -r1.112 -r1.112.2.1
--- xemacs.mak 2005/01/31 20:08:52 1.112
+++ xemacs.mak 2005/02/15 01:19:26 1.112.2.1
@@ -428,14 +428,17 @@
!if $(HAVE_MENUBARS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_MENUBARS
MSW_MENUBAR_OBJ=$(OUTDIR)\menubar.obj $(OUTDIR)\menubar-msw.obj
+GTK_MENUBAR_OBJ=$(OUTDIR)\menubar-gtk.obj
!endif
!if $(HAVE_SCROLLBARS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_SCROLLBARS
MSW_SCROLLBAR_OBJ=$(OUTDIR)\scrollbar.obj $(OUTDIR)\scrollbar-msw.obj
+GTK_SCROLLBAR_OBJ=$(OUTDIR)\scrollbar-gtk.obj
!endif
!if $(HAVE_TOOLBARS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_TOOLBARS
MSW_TOOLBAR_OBJ=$(OUTDIR)\toolbar.obj $(OUTDIR)\toolbar-msw.obj
+GTK_TOOLBAR_OBJ=$(OUTDIR)\toolbar-gtk.obj $(OUTDIR)\toolbar-common.obj
!endif
!if $(HAVE_WIDGETS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_WIDGETS
@@ -443,6 +446,7 @@
!if $(HAVE_DIALOGS)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_DIALOGS
MSW_DIALOG_OBJ=$(OUTDIR)\dialog.obj $(OUTDIR)\dialog-msw.obj
+GTK_DIALOG_OBJ=$(OUTDIR)\dialog-gtk.obj
!endif
!if $(HAVE_NATIVE_SOUND)
MSW_DEFINES=$(MSW_DEFINES) -DHAVE_NATIVE_SOUND
@@ -468,6 +472,26 @@
# end !if $(HAVE_MS_WINDOWS)
!endif
+!if $(HAVE_GTK)
+TEMACS_GTK_OBJS=\
+ $(OUTDIR)\console-gtk.obj \
+ $(OUTDIR)\device-gtk.obj \
+ $(OUTDIR)\event-gtk.obj \
+ $(OUTDIR)\frame-gtk.obj \
+ $(OUTDIR)\gccache-gtk.obj \
+ $(OUTDIR)\glyphs-gtk.obj \
+ $(OUTDIR)\gtk-xemacs.obj \
+ $(OUTDIR)\intl-gtk.obj \
+ $(OUTDIR)\objects-gtk.obj \
+ $(OUTDIR)\redisplay-gtk.obj \
+ $(OUTDIR)\select-gtk.obj
+ $(OUTDIR)\ui-gtk.obj \
+ $(GTK_MENUBAR_OBJ) \
+ $(GTK_SCROLLBAR_OBJ) \
+ $(GTK_TOOLBAR_OBJ) \
+ $(GTK_DIALOG_OBJ)
+!endif
+
!if $(MULE)
MULE_DEFINES=-DMULE
TEMACS_MULE_OBJS=\
@@ -1152,7 +1176,7 @@
--------------------------------------------------------------------
NOTE: You specified HAVE_GTK=1, but we are compiling WITHOUT GTK support.
NOTE: gtk-xemacs is not currently supported on MS Windows (mingw or msvc).
- NOTE: Yes, we know that gtk has been ported to native MS Windows, but
+ NOTE: Yes, we know that GTK has been ported to native MS Windows, but
NOTE: XEmacs is not yet ready to use that port.
--------------------------------------------------------------------
!endif
No revision
No revision
1.7.2.1 +17 -4 XEmacs/xemacs/src/EmacsShell-sub.c
Index: EmacsShell-sub.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/EmacsShell-sub.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- EmacsShell-sub.c 2005/01/24 23:33:46 1.7
+++ EmacsShell-sub.c 2005/02/15 01:19:39 1.7.2.1
@@ -1,5 +1,6 @@
/* Emacs shell widget -- define the two widgets.
Copyright (C) 1994, 1995 Sun Microsystems, Inc.
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -112,9 +113,19 @@
#define EMACS_SHELL_CLASS_NAME "TransientEmacsShell"
#define EMACS_SHELL_WIDGET_CLASS transientEmacsShellWidgetClass
#define EMACS_SHELL_UPDATE_SIZE_HINTS TransientEmacsShellUpdateSizeHints
+#elif defined (DEFINE_OVERRIDE_EMACS_SHELL)
+#define EMACS_SHELL_WIDGET OverrideEmacsShellWidget
+#define SUPERCLASS_WIDGET_CLASS overrideShellWidgetClass
+#define SUPERCLASS_CLASS_REC overrideShellClassRec
+#define EMACS_SHELL_REC OverrideEmacsShellRec
+#define EMACS_SHELL_CLASS_REC overrideEmacsShellClassRec
+#define EMACS_SHELL_CLASS_REC_TYPE OverrideEmacsShellClassRec
+#define EMACS_SHELL_CLASS_NAME "OverrideEmacsShell"
+#define EMACS_SHELL_WIDGET_CLASS overrideEmacsShellWidgetClass
+#define EMACS_SHELL_UPDATE_SIZE_HINTS OverrideEmacsShellUpdateSizeHints
#else
-Error. Must define either DEFINE_TOP_LEVEL_EMACS_SHELL or
-DEFINE_TRANSIENT_EMACS_SHELL.
+Error. Must define either DEFINE_TOP_LEVEL_EMACS_SHELL,
+DEFINE_TRANSIENT_EMACS_SHELL or DEFINE_OVERRIDE_EMACS_SHELL.
#endif
typedef struct {
@@ -220,12 +231,14 @@
/* extension */ (XtPointer)&compositeClassExtRec
},{ /* Shell */
/* extension */ (XtPointer)&shellClassExtRec
+#ifdef DEFINE_OVERRIDE_EMACS_SHELL
},{ /* WMShell */
/* extension */ NULL
},{ /* VendorShell */
/* extension */ NULL
- },{ /* TopLevelShell or TransientShell */
- /* both have exactly one XtPointer here. */
+#endif
+ },{ /* TopLevelShell, TransientShell, OverrideShell */
+ /* all have exactly one XtPointer here. */
/* extension */ NULL
},{ /* EmacsShell */
0
1.3.2.1 +1 -1 XEmacs/xemacs/src/EmacsShell.c
Index: EmacsShell.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/EmacsShell.c,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -r1.3 -r1.3.2.1
--- EmacsShell.c 2005/01/24 23:33:46 1.3
+++ EmacsShell.c 2005/02/15 01:19:39 1.3.2.1
@@ -158,7 +158,7 @@
TopLevelEmacsShellUpdateSizeHints (gw);
#ifdef EXTERNAL_WIDGET
else if (XtIsSubclass (gw, externalShellWidgetClass))
- /* do what ??? Don't abort! */;
+ /* do what ??? Don't ABORT! */;
#endif
else if (XtIsSubclass (gw, transientEmacsShellWidgetClass))
TransientEmacsShellUpdateSizeHints (gw);
1.114.2.1 +43 -29 XEmacs/xemacs/src/Makefile.in.in
Index: Makefile.in.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/Makefile.in.in,v
retrieving revision 1.114
retrieving revision 1.114.2.1
diff -u -r1.114 -r1.114.2.1
--- Makefile.in.in 2005/01/26 03:40:15 1.114
+++ Makefile.in.in 2005/02/15 01:19:40 1.114.2.1
@@ -3,7 +3,7 @@
## Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
## Copyright (C) 1996, 1997 Sun Microsystems, Inc.
## Copyright (C) 1998, 1999 J. Kean Johnston.
-## Copyright (C) 2001, 2002, 2003 Ben Wing.
+## Copyright (C) 2001, 2002, 2003, 2005 Ben Wing.
## This file is part of XEmacs.
@@ -132,11 +132,8 @@
#ifdef HAVE_X_WINDOWS
x_objs=console-x.o device-x.o event-Xt.o frame-x.o \
- glyphs-x.o objects-x.o redisplay-x.o select-x.o xgccache.o intl-x.o
+ glyphs-x.o objects-x.o redisplay-x.o select-x.o gccache-x.o intl-x.o
x_gui_objs=$(gui_objs:.o=-x.o)
-#ifdef HAVE_TOOLBARS
-x_gui_objs += toolbar-common.o
-#endif
#endif
#ifdef HAVE_MS_WINDOWS
@@ -151,12 +148,16 @@
#endif
#ifdef HAVE_GTK
-gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o \
- objects-gtk.o redisplay-gtk.o glyphs-gtk.o select-gtk.o gccache-gtk.o \
- gtk-xemacs.o ui-gtk.o
+gtk_objs=console-gtk.o device-gtk.o event-gtk.o frame-gtk.o gccache-gtk.o \
+ glyphs-gtk.o gtk-xemacs.o intl-gtk.o objects-gtk.o redisplay-gtk.o \
+ select-gtk.o ui-gtk.o
gtk_gui_objs=$(gui_objs:.o=-gtk.o)
+#endif
+
+#ifdef HAVE_XLIKE /* X or GTK */
+xlike_objs=event-xlike.o
#ifdef HAVE_TOOLBARS
-gtk_gui_objs += toolbar-common.o
+xlike_objs += toolbar-common.o
#endif
#endif
@@ -188,7 +189,7 @@
gpm_objs=gpmevent.o
#endif
-#if defined(HAVE_LDAP) && !defined(HAVE_SHLIB)
+#if defined (HAVE_LDAP) && !defined (HAVE_MODULES)
ldap_objs=$(BLDMODULES)/ldap/eldap.o
#endif
@@ -211,7 +212,7 @@
number_objs=number-mp.o number.o
#endif
-#if defined(HAVE_POSTGRESQL) && !defined(HAVE_SHLIB)
+#if defined (HAVE_POSTGRESQL) && !defined (HAVE_MODULES)
postgresql_objs=$(BLDMODULES)/postgresql/postgresql.o
#endif
@@ -231,11 +232,12 @@
#ifdef HAVE_SHLIB
shlib_objs=sysdll.o
-# ifdef HAVE_MS_WINDOWS
+#endif
+
+#if defined (HAVE_MODULES) && defined (HAVE_MS_WINDOWS)
export_lib=xemacs-export.o
xemacs-export.o: xemacs.def
dlltool -D xemacs-${version}.exe -d $< -l xemacs-import.a -e $@
-# endif
#endif
#ifdef SUNPRO
@@ -262,26 +264,27 @@
$(balloon_help_objs) blocktype.o buffer.o bytecode.o \
callint.o casefiddle.o casetab.o chartab.o \
$(clash_detection_objs) cmdloop.o cmds.o $(coding_system_objs) console.o \
- console-stream.o\
- data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o\
+ console-stream.o \
+ data.o $(database_objs) $(debug_objs) device.o dired.o doc.o doprnt.o \
dynarr.o \
- editfns.o elhash.o emacs.o emodules.o eval.o events.o\
- event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o\
+ editfns.o elhash.o emacs.o emodules.o eval.o events.o \
+ event-stream.o $(event_unixoid_objs) $(extra_objs) extents.o \
faces.o file-coding.o fileio.o $(LOCK_OBJ) filemode.o floatfns.o fns.o \
- font-lock.o frame.o\
- general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o\
+ font-lock.o frame.o \
+ general.o $(gif_objs) glyphs.o glyphs-eimage.o glyphs-shared.o \
glyphs-widget.o $(gpm_objs) $(gtk_objs) $(gtk_gui_objs) $(gui_objs) \
gutter.o\
hash.o imgproc.o indent.o insdel.o intl.o\
- keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o\
- macros.o marker.o md5.o minibuf.o $(mswindows_objs) $(mswindows_gui_objs)\
- $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) $(number_objs) objects.o\
- opaque.o $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs)\
- rangetab.o realpath.o redisplay.o redisplay-output.o regex.o\
- search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o\
- specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o\
- text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs)\
- widget.o window.o $(win32_objs)
+ keymap.o $(RTC_patch_objs) line-number.o $(ldap_objs) lread.o lstream.o \
+ macros.o marker.o md5.o minibuf.o $(mswindows_objs) \
+ $(mswindows_gui_objs) $(mule_objs) $(mule_canna_objs) $(mule_wnn_objs) \
+ $(number_objs) objects.o opaque.o \
+ $(postgresql_objs) print.o process.o $(process_objs) $(profile_objs) \
+ rangetab.o realpath.o redisplay.o redisplay-output.o regex.o \
+ search.o select.o $(sheap_objs) $(shlib_objs) signal.o sound.o \
+ specifier.o strftime.o $(sunpro_objs) symbols.o syntax.o sysdep.o \
+ text.o $(tooltalk_objs) $(tty_objs) undo.o unicode.o $(x_objs) $(x_gui_objs) \
+ $(xlike_objs) widget.o window.o $(win32_objs)
obj_rtl = $(objs:.o=.c.rtl)
@@ -710,10 +713,21 @@
$(CC) -dr -c $(cflags) -DDEFINE_TRANSIENT_EMACS_SHELL $(SRC)/EmacsShell-sub.c
mv EmacsShell-sub.c.rtl TransientEmacsShell.c.rtl
+OverrideEmacsShell.o : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h
xintrinsicp.h EmacsShellP.h
+ $(CC) -c $(cflags) -DDEFINE_OVERRIDE_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
+ mv EmacsShell-sub.o OverrideEmacsShell.o
+
+OverrideEmacsShell.c.rtl : ${srcdir}/EmacsShell-sub.c TopLevelEmacsShell.o config.h
xintrinsicp.h EmacsShellP.h
+ $(CC) -dr -c $(cflags) -DDEFINE_OVERRIDE_EMACS_SHELL ${srcdir}/EmacsShell-sub.c
+ mv EmacsShell-sub.c.rtl OverrideEmacsShell.c.rtl
+
## The above rules are subject to a race condition if using a parallel make.
TransientEmacsShell.o : TopLevelEmacsShell.o
TransientEmacsShell.c.rtl : TopLevelEmacsShell.c.rtl
+OverrideEmacsShell.o : TransientEmacsShell.o
+OverrideEmacsShell.c.rtl : TransientEmacsShell.c.rtl
+
## Position-independent code for shared library creation
#if USE_GCC
pic_arg = -fpic
@@ -1037,7 +1051,7 @@
###################### Installation
## Header files for ellcc
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
MAKEPATH=../lib-src/make-path
install: $(PROGNAME)
$(MAKEPATH) $(archlibdir)/include $(archlibdir)/include/m $(archlibdir)/include/s
1.106.2.1 +251 -178 XEmacs/xemacs/src/alloc.c
Index: alloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/alloc.c,v
retrieving revision 1.106
retrieving revision 1.106.2.1
diff -u -r1.106 -r1.106.2.1
--- alloc.c 2005/02/03 16:14:04 1.106
+++ alloc.c 2005/02/15 01:19:40 1.106.2.1
@@ -649,142 +649,130 @@
/* Fixed-size type macros */
/************************************************************************/
-/* For fixed-size types that are commonly used, we malloc() large blocks
- of memory at a time and subdivide them into chunks of the correct
- size for an object of that type. This is more efficient than
- malloc()ing each object separately because we save on malloc() time
- and overhead due to the fewer number of malloc()ed blocks, and
- also because we don't need any extra pointers within each object
- to keep them threaded together for GC purposes. For less common
- (and frequently large-size) types, we use lcrecords, which are
- malloc()ed individually and chained together through a pointer
- in the lcrecord header. lcrecords do not need to be fixed-size
- (i.e. two objects of the same type need not have the same size;
- however, the size of a particular object cannot vary dynamically).
+/* For fixed-size types that are commonly used, we malloc() large blocks of
+ memory at a time and subdivide them into chunks of the correct size for
+ an object of that type. This is more efficient than malloc()ing each
+ object separately because we save on malloc() time and overhead due to
+ the fewer number of malloc()ed blocks, and also because we don't need
+ any extra pointers within each object to keep them threaded together for
+ GC purposes. For less common (and frequently large-size) types, we use
+ lcrecords, which are malloc()ed individually and chained together
+ through a pointer in the lcrecord header. lcrecords do not need to be
+ fixed-size (i.e. two objects of the same type need not have the same
+ size; however, the size of a particular object cannot vary dynamically).
It is also much easier to create a new lcrecord type because no
- additional code needs to be added to alloc.c. Finally, lcrecords
- may be more efficient when there are only a small number of them.
+ additional code needs to be added to alloc.c. Finally, lcrecords may be
+ more efficient when there are only a small number of them.
- The types that are stored in these large blocks (or "frob blocks")
- are cons, all number types except fixnum, compiled-function, symbol,
- marker, extent, event, and string.
-
- Note that strings are special in that they are actually stored in
- two parts: a structure containing information about the string, and
- the actual data associated with the string. The former structure
- (a struct Lisp_String) is a fixed-size structure and is managed the
- same way as all the other such types. This structure contains a
- pointer to the actual string data, which is stored in structures of
- type struct string_chars_block. Each string_chars_block consists
- of a pointer to a struct Lisp_String, followed by the data for that
- string, followed by another pointer to a Lisp_String, followed by
- the data for that string, etc. At GC time, the data in these
- blocks is compacted by searching sequentially through all the
- blocks and compressing out any holes created by unmarked strings.
- Strings that are more than a certain size (bigger than the size of
- a string_chars_block, although something like half as big might
- make more sense) are malloc()ed separately and not stored in
- string_chars_blocks. Furthermore, no one string stretches across
- two string_chars_blocks.
+ The types that are stored in these large blocks (or "frob blocks") are
+ those of which there should be many -- cons, all number types except
+ fixnum, compiled-function, symbol, marker, extent, event, string, etc.
+
+ Note that strings are special in that they are actually stored in two
+ parts: a structure containing information about the string, and the
+ actual data associated with the string. The former structure (a struct
+ Lisp_String) is a fixed-size structure and is managed the same way as
+ all the other such types. This structure contains a pointer to the
+ actual string data, which is stored in structures of type struct
+ string_chars_block. Each string_chars_block consists of a pointer to a
+ struct Lisp_String, followed by the data for that string, followed by
+ another pointer to a Lisp_String, followed by the data for that string,
+ etc. At GC time, the data in these blocks is compacted by searching
+ sequentially through all the blocks and compressing out any holes
+ created by unmarked strings. Strings that are more than a certain size
+ (bigger than the size of a string_chars_block, although something like
+ half as big might make more sense) are malloc()ed separately and not
+ stored in string_chars_blocks. Furthermore, no one string stretches
+ across two string_chars_blocks.
Vectors are each malloc()ed separately as lcrecords.
In the following discussion, we use conses, but it applies equally
well to the other fixed-size types.
- We store cons cells inside of cons_blocks, allocating a new
- cons_block with malloc() whenever necessary. Cons cells reclaimed
- by GC are put on a free list to be reallocated before allocating
- any new cons cells from the latest cons_block. Each cons_block is
- just under 2^n - MALLOC_OVERHEAD bytes long, since malloc (at least
- the versions in malloc.c and gmalloc.c) really allocates in units
- of powers of two and uses 4 bytes for its own overhead.
-
- What GC actually does is to search through all the cons_blocks,
- from the most recently allocated to the oldest, and put all
- cons cells that are not marked (whether or not they're already
- free) on a cons_free_list. The cons_free_list is a stack, and
- so the cons cells in the oldest-allocated cons_block end up
- at the head of the stack and are the first to be reallocated.
- If any cons_block is entirely free, it is freed with free()
- and its cons cells removed from the cons_free_list. Because
- the cons_free_list ends up basically in memory order, we have
- a high locality of reference (assuming a reasonable turnover
- of allocating and freeing) and have a reasonable probability
- of entirely freeing up cons_blocks that have been more recently
- allocated. This stage is called the "sweep stage" of GC, and
- is executed after the "mark stage", which involves starting
- from all places that are known to point to in-use Lisp objects
- (e.g. the obarray, where are all symbols are stored; the
- current catches and condition-cases; the backtrace list of
- currently executing functions; the gcpro list; etc.) and
- recursively marking all objects that are accessible.
-
- At the beginning of the sweep stage, the conses in the cons blocks
- are in one of three states: in use and marked, in use but not
- marked, and not in use (already freed). Any conses that are marked
- have been marked in the mark stage just executed, because as part
- of the sweep stage we unmark any marked objects. The way we tell
- whether or not a cons cell is in use is through the LRECORD_FREE_P
- macro. This uses a special lrecord type `lrecord_type_free',
- which is never associated with any valid object.
-
- Conses on the free_cons_list are threaded through a pointer stored
- in the conses themselves. Because the cons is still in a
- cons_block and needs to remain marked as not in use for the next
- time that GC happens, we need room to store both the "free"
- indicator and the chaining pointer. So this pointer is stored
- after the lrecord header (actually where C places a pointer after
- the lrecord header; they are not necessarily contiguous). This
- implies that all fixed-size types must be big enough to contain at
- least one pointer. This is true for all current fixed-size types,
- with the possible exception of Lisp_Floats, for which we define the
- meat of the struct using a union of a pointer and a double to
- ensure adequate space for the free list chain pointer.
-
- Some types of objects need additional "finalization" done
- when an object is converted from in use to not in use;
- this is the purpose of the ADDITIONAL_FREE_type macro.
- For example, markers need to be removed from the chain
- of markers that is kept in each buffer. This is because
- markers in a buffer automatically disappear if the marker
- is no longer referenced anywhere (the same does not
- apply to extents, however).
+ We store cons cells inside of cons_blocks, allocating a new cons_block
+ with malloc() whenever necessary. Cons cells reclaimed by GC are put on
+ a free list to be reallocated before allocating any new cons cells from
+ the latest cons_block. Each cons_block is just under 2^n -
+ MALLOC_OVERHEAD bytes long, since malloc (at least the versions in
+ malloc.c and gmalloc.c) really allocates in units of powers of two and
+ uses 4 bytes for its own overhead.
+
+ What GC actually does is to search through all the cons_blocks, from the
+ most recently allocated to the oldest, and put all cons cells that are
+ not marked (whether or not they're already free) on a cons_free_list.
+ The cons_free_list is a stack, and so the cons cells in the
+ oldest-allocated cons_block end up at the head of the stack and are the
+ first to be reallocated. If any cons_block is entirely free, it is
+ freed with free() and its cons cells removed from the cons_free_list.
+ Because the cons_free_list ends up basically in memory order, we have a
+ high locality of reference (assuming a reasonable turnover of allocating
+ and freeing) and have a reasonable probability of entirely freeing up
+ cons_blocks that have been more recently allocated. This stage is
+ called the "sweep stage" of GC, and is executed after the "mark
stage",
+ which involves starting from all places that are known to point to
+ in-use Lisp objects (e.g. the obarray, where are all symbols are stored;
+ the current catches and condition-cases; the backtrace list of currently
+ executing functions; the gcpro list; etc.) and recursively marking all
+ objects that are accessible.
+
+ At the beginning of the sweep stage, the conses in the cons blocks are
+ in one of three states: in use and marked, in use but not marked, and
+ not in use (already freed). Any conses that are marked have been marked
+ in the mark stage just executed, because as part of the sweep stage we
+ unmark any marked objects. The way we tell whether or not a cons cell
+ is in use is through the LRECORD_FREE_P macro. This uses a special
+ lrecord type `lrecord_type_free', which is never associated with any
+ valid object.
+
+ Conses on the free_cons_list are threaded through a pointer stored in
+ the conses themselves. Because the cons is still in a cons_block and
+ needs to remain marked as not in use for the next time that GC happens,
+ we need room to store both the "free" indicator and the chaining
+ pointer. So this pointer is stored after the lrecord header (actually
+ where C places a pointer after the lrecord header; they are not
+ necessarily contiguous). This implies that all fixed-size types must be
+ big enough to contain at least one pointer. This is true for all
+ current fixed-size types, with the possible exception of Lisp_Floats,
+ for which we define the meat of the struct using a union of a pointer
+ and a double to ensure adequate space for the free list chain pointer.
+
+ Some types of objects need additional "finalization" done when an object
+ is converted from in use to not in use; this is the purpose of the
+ ADDITIONAL_FREE_type macro. For example, markers need to be removed
+ from the chain of markers that is kept in each buffer. This is because
+ markers in a buffer automatically disappear if the marker is no longer
+ referenced anywhere (the same does not apply to extents, however).
- WARNING: Things are in an extremely bizarre state when
- the ADDITIONAL_FREE_type macros are called, so beware!
+ WARNING: Things are in an extremely bizarre state when the
+ ADDITIONAL_FREE_type macros are called, so beware!
When ERROR_CHECK_GC is defined, we do things differently so as to
maximize our chances of catching places where there is insufficient
- GCPROing. The thing we want to avoid is having an object that
- we're using but didn't GCPRO get freed by GC and then reallocated
- while we're in the process of using it -- this will result in
- something seemingly unrelated getting trashed, and is extremely
- difficult to track down. If the object gets freed but not
- reallocated, we can usually catch this because we set most of the
- bytes of a freed object to 0xDEADBEEF. (The lisp object type is set
- to the invalid type `lrecord_type_free', however, and a pointer
- used to chain freed objects together is stored after the lrecord
- header; we play some tricks with this pointer to make it more
- bogus, so crashes are more likely to occur right away.)
-
- We want freed objects to stay free as long as possible,
- so instead of doing what we do above, we maintain the
- free objects in a first-in first-out queue. We also
- don't recompute the free list each GC, unlike above;
- this ensures that the queue ordering is preserved.
- [This means that we are likely to have worse locality
- of reference, and that we can never free a frob block
- once it's allocated. (Even if we know that all cells
- in it are free, there's no easy way to remove all those
- cells from the free list because the objects on the
- free list are unlikely to be in memory order.)]
- Furthermore, we never take objects off the free list
- unless there's a large number (usually 1000, but
- varies depending on type) of them already on the list.
- This way, we ensure that an object that gets freed will
- remain free for the next 1000 (or whatever) times that
- an object of that type is allocated. */
+ GCPROing. The thing we want to avoid is having an object that we're
+ using but didn't GCPRO get freed by GC and then reallocated while we're
+ in the process of using it -- this will result in something seemingly
+ unrelated getting trashed, and is extremely difficult to track down. If
+ the object gets freed but not reallocated, we can usually catch this
+ because we set most of the bytes of a freed object to 0xDEADBEEF. (The
+ lisp object type is set to the invalid type `lrecord_type_free',
+ however, and a pointer used to chain freed objects together is stored
+ after the lrecord header; we play some tricks with this pointer to make
+ it more bogus, so crashes are more likely to occur right away.)
+
+ We want freed objects to stay free as long as possible, so instead of
+ doing what we do above, we maintain the free objects in a first-in
+ first-out queue. We also don't recompute the free list each GC, unlike
+ above; this ensures that the queue ordering is preserved. [This means
+ that we are likely to have worse locality of reference, and that we can
+ never free a frob block once it's allocated. (Even if we know that all
+ cells in it are free, there's no easy way to remove all those cells from
+ the free list because the objects on the free list are unlikely to be in
+ memory order.)] Furthermore, we never take objects off the free list
+ unless there's a large number (usually 1000, but varies depending on
+ type) of them already on the list. This way, we ensure that an object
+ that gets freed will remain free for the next 1000 (or whatever) times
+ that an object of that type is allocated. */
#ifndef MALLOC_OVERHEAD
#ifdef GNU_MALLOC
@@ -811,14 +799,22 @@
}
#endif
+/* TYPE_ALLOC_SIZE is the number of elements allocated in a frob block
+ for objects of type TYPE (the C name for the type, e.g. `cons') and
+ stored in structures of type STRUCTTYPE (e.g. `Lisp_Cons'). */
+
#ifdef ALLOC_NO_POOLS
-# define TYPE_ALLOC_SIZE(type, structtype) 1
+
+# define TYPE_ALLOC_SIZE_1(type, structtype) 1
#else
-# define TYPE_ALLOC_SIZE(type, structtype) \
+# define TYPE_ALLOC_SIZE_1(type, structtype) \
((2048 - MALLOC_OVERHEAD - sizeof (struct type##_block *)) \
/ sizeof (structtype))
#endif /* ALLOC_NO_POOLS */
+#define TYPE_ALLOC_SIZE(type, structtype) \
+ TYPE_ALLOC_SIZE_1 (type, sizeof (structtype))
+
#define DECLARE_FIXED_TYPE_ALLOC(type, structtype) \
\
struct type##_block \
@@ -1725,18 +1721,9 @@
#ifdef COMPILED_FUNCTION_ANNOTATION_HACK
if (!NILP (Vcurrent_compiled_function_annotation))
- f->annotated = Fcopy (Vcurrent_compiled_function_annotation);
- else if (!NILP (Vload_file_name_internal_the_purecopy))
- f->annotated = Vload_file_name_internal_the_purecopy;
+ f->annotated = Fcopy_sequence (Vcurrent_compiled_function_annotation);
else if (!NILP (Vload_file_name_internal))
- {
- struct gcpro gcpro1;
- GCPRO1 (fun); /* don't let fun get reaped */
- Vload_file_name_internal_the_purecopy =
- Ffile_name_nondirectory (Vload_file_name_internal);
- f->annotated = Vload_file_name_internal_the_purecopy;
- UNGCPRO;
- }
+ f->annotated = Fcopy_sequence (Vload_file_name_internal);
#endif /* COMPILED_FUNCTION_ANNOTATION_HACK */
/* doc_string may be nil, string, int, or a cons (string . int).
@@ -1808,13 +1795,14 @@
ALLOCATE_FIXED_TYPE (extent, struct extent, e);
set_lheader_implementation (&e->lheader, &lrecord_extent);
extent_object (e) = Qnil;
- set_extent_start (e, -1);
- set_extent_end (e, -1);
+ extent_start_mem (e) = -1;
+ extent_end_mem (e) = -1;
e->plist = Qnil;
+ e->face = Qnil;
+ e->text_prop = Qnil;
xzero (e->flags);
- extent_face (e) = Qnil;
e->flags.end_open = 1; /* default is for endpoints to behave like markers */
e->flags.detachable = 1;
@@ -1823,6 +1811,26 @@
/************************************************************************/
+/* Extent-Auxiliary allocation */
+/************************************************************************/
+
+DECLARE_FIXED_TYPE_ALLOC (extent_auxiliary, struct extent_auxiliary);
+#define MINIMUM_ALLOWED_FIXED_TYPE_CELLS_extent_auxiliary 1000
+
+void
+allocate_extent_auxiliary (EXTENT ext)
+{
+ struct extent_auxiliary *e;
+
+ ALLOCATE_FIXED_TYPE (extent_auxiliary, struct extent_auxiliary, e);
+ *e = extent_auxiliary_defaults;
+ set_lheader_implementation (&e->lheader, &lrecord_extent_auxiliary);
+ ext->plist = Fcons (wrap_extent_auxiliary (e), ext->plist);
+ ext->flags.has_aux = 1;
+}
+
+
+/************************************************************************/
/* Event allocation */
/************************************************************************/
@@ -2270,9 +2278,9 @@
set_lheader_implementation (&s->u.lheader, &lrecord_string);
set_lispstringp_data (s, BIG_STRING_FULLSIZE_P (fullsize)
- ? allocate_big_string_chars (length + 1)
- : allocate_string_chars_struct (wrap_string (s),
- fullsize)->chars);
+ ? allocate_big_string_chars (length + 1)
+ : allocate_string_chars_struct (wrap_string (s),
+ fullsize)->chars);
set_lispstringp_length (s, length);
s->plist = Qnil;
@@ -2281,6 +2289,28 @@
return wrap_string (s);
}
+/* You REALLY REALLY do not want to be calling this. This creates a string
+ with no text, used to keep track of extents when building up strings
+ piece-by-piece (in such cases, the data is typically stored in a
+ resizable-buffer dynarr and only made into a real string at the end). */
+
+Lisp_Object
+make_fake_string (void)
+{
+ Lisp_String *s;
+
+ /* Allocate the string header */
+ ALLOCATE_FIXED_TYPE (string, Lisp_String, s);
+ xzero (*s);
+ set_lheader_implementation (&s->u.lheader, &lrecord_string);
+
+ set_lispstringp_data (s, 0);
+ set_lispstringp_length (s, 0);
+ s->plist = Qnil;
+
+ return wrap_string (s);
+}
+
#ifdef VERIFY_STRING_CHARS_INTEGRITY
static void verify_string_chars_integrity (void);
#endif
@@ -2577,7 +2607,7 @@
/* Take some raw memory, encoded in some external data format,
and convert it into a Lisp string. */
Lisp_Object
-make_ext_string (const Extbyte *contents, EMACS_INT length,
+make_ext_string (const Extbyte *contents, Bytecount length,
Lisp_Object coding_system)
{
Lisp_Object string;
@@ -2968,7 +2998,7 @@
Dynarr_add (staticpro_nodump_names, varname);
}
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* Stop treating the Lisp_Object at non-heap VARADDRESS as a root object
for garbage collection, but not for dumping. */
void
@@ -3018,7 +3048,7 @@
Dynarr_add (staticpros_nodump, varaddress);
}
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* Unmark the Lisp_Object at non-heap VARADDRESS as a root object for
garbage collection, but not for dumping. */
void
@@ -3260,8 +3290,10 @@
EMACS_INT offset = lispdesc_indirect_count (desc[pos].offset, desc, obj);
if (offset == max_offset)
{
+#if 0 /* This legitimately occurs in gap arrays */
stderr_out ("Two relocatable elements at same offset?\n");
ABORT ();
+#endif
}
else if (offset > max_offset)
{
@@ -3989,6 +4021,15 @@
}
static void
+sweep_extent_auxiliaries (void)
+{
+#define UNMARK_extent_auxiliary(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
+#define ADDITIONAL_FREE_extent_auxiliary(ptr)
+
+ SWEEP_FIXED_TYPE_BLOCK (extent_auxiliary, struct extent_auxiliary);
+}
+
+static void
sweep_events (void)
{
#define UNMARK_event(ptr) UNMARK_RECORD_HEADER (&((ptr)->lheader))
@@ -4350,7 +4391,8 @@
} while (0)
#define ADDITIONAL_FREE_string(ptr) do { \
Bytecount size = ptr->size_; \
- if (BIG_STRING_SIZE_P (size)) \
+ /* data_ might be NULL f(a fake string) */ \
+ if (BIG_STRING_SIZE_P (size) && ptr->data_) \
xfree (ptr->data_, Ibyte *); \
} while (0)
@@ -4412,40 +4454,25 @@
of large unmarked strings */
sweep_strings ();
- /* Put all unmarked conses on free list */
+ /* For all simple lrecord types, put all unmarked objects on free list.
+ For markers, also dechain each one first from the buffer into which it
+ points. For compiled functions, also free some auxiliary data. */
sweep_conses ();
-
- /* Free all unmarked compiled-function objects */
sweep_compiled_functions ();
-
- /* Put all unmarked floats on free list */
sweep_floats ();
-
#ifdef HAVE_BIGNUM
- /* Put all unmarked bignums on free list */
sweep_bignums ();
#endif
-
#ifdef HAVE_RATIO
- /* Put all unmarked ratios on free list */
sweep_ratios ();
#endif
-
#ifdef HAVE_BIGFLOAT
- /* Put all unmarked bigfloats on free list */
sweep_bigfloats ();
#endif
-
- /* Put all unmarked symbols on free list */
sweep_symbols ();
-
- /* Put all unmarked extents on free list */
sweep_extents ();
-
- /* Put all unmarked markers on free list.
- Dechain each one first from the buffer into which it points. */
+ sweep_extent_auxiliaries ();
sweep_markers ();
-
sweep_events ();
#ifdef EVENT_DATA_AS_OBJECTS
@@ -4987,6 +5014,13 @@
HACK_O_MATIC (extent, "extent-storage", pl);
pl = gc_plist_hack ("extents-free", gc_count_num_extent_freelist, pl);
pl = gc_plist_hack ("extents-used", gc_count_num_extent_in_use, pl);
+ HACK_O_MATIC (extent_auxiliary, "extent-auxiliary-storage", pl);
+ /* #### should this be `extent-auxiliaries-...'? Would that interfere
+ with automatic gc-output-parsing code? */
+ pl = gc_plist_hack ("extent-auxiliarys-free",
+ gc_count_num_extent_auxiliary_freelist, pl);
+ pl = gc_plist_hack ("extent-auxiliarys-used",
+ gc_count_num_extent_auxiliary_in_use, pl);
HACK_O_MATIC (event, "event-storage", pl);
pl = gc_plist_hack ("events-free", gc_count_num_event_freelist, pl);
pl = gc_plist_hack ("events-used", gc_count_num_event_in_use, pl);
@@ -5246,19 +5280,57 @@
}
Bytecount
-fixed_type_block_overhead (Bytecount size)
+list_cons_usage (Lisp_Object list)
{
- Bytecount per_block = TYPE_ALLOC_SIZE (cons, unsigned char);
- Bytecount overhead = 0;
- Bytecount storage_size = malloced_storage_size (0, per_block, 0);
- while (size >= per_block)
- {
- size -= per_block;
- overhead += sizeof (void *) + per_block - storage_size;
- }
- if (rand () % per_block < size)
- overhead += sizeof (void *) + per_block - storage_size;
- return overhead;
+ Bytecount val = 0;
+
+ for (; CONSP (list); list = XCDR (list))
+ val += sizeof (Lisp_Cons);
+
+ return val;
+}
+
+/* Given a memory usage of NUMELS of elements of size OBJ_SIZE in fixed-type
+ blocks (frob blocks), compute the total memory usage, return it, and
+ store relevant statistics in OVSTATS.
+
+ Note that for sizes that are fractions of a frob block it's not possible
+ to determine completely accurately */
+
+double
+compute_fixed_type_block_usage (Elemcount numels, Bytecount obj_size,
+ struct overhead_stats *ovstats)
+{
+ double total = 0;
+ /* Number of elements in a frob block */
+ Elemcount els_per_block = TYPE_ALLOC_SIZE_1 (cons, obj_size);
+ /* Size of each frob block (each block is a struct with ELS_PER_BLOCK
+ elements and a pointer to the previous block) */
+ Bytecount per_block =
+ TYPE_ALLOC_SIZE_1 (cons, obj_size) * obj_size + sizeof (void *);
+ /* Overhead for each block; we include the chain pointer. #### Claiming
+ that the chain pointer is malloc overhead is not really right, but it
+ has to go somewhere. */
+ Bytecount overhead_per_block =
+ sizeof (void *) + malloced_storage_size (0, per_block, 0) - per_block;
+
+ total += numels * obj_size;
+ ovstats->was_requested += numels * obj_size;
+
+ while (numels >= els_per_block)
+ {
+ numels -= els_per_block;
+ ovstats->malloc_overhead += overhead_per_block;
+ total += overhead_per_block;
+ }
+
+ /* For what's left, compute fractional usage */
+ ovstats->malloc_overhead +=
+ overhead_per_block * ((double) numels / els_per_block);
+ total +=
+ overhead_per_block * ((double) numels / els_per_block);
+
+ return total;
}
#endif /* MEMORY_USAGE_STATS */
@@ -5307,6 +5379,7 @@
#endif
init_marker_alloc ();
init_extent_alloc ();
+ init_extent_auxiliary_alloc ();
init_event_alloc ();
#ifdef EVENT_DATA_AS_OBJECTS
init_key_data_alloc ();
1.11.4.1 +3 -14 XEmacs/xemacs/src/balloon_help.c
Index: balloon_help.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/balloon_help.c,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -r1.11 -r1.11.4.1
--- balloon_help.c 2004/09/20 19:19:35 1.11
+++ balloon_help.c 2005/02/15 01:19:41 1.11.4.1
@@ -1,5 +1,6 @@
/* Balloon Help
Copyright (c) 1997 Douglas Keller
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -33,23 +34,11 @@
*/
#include <config.h>
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
+#include "lisp.h"
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
-#include <X11/extensions/shape.h>
-
-#include "compiler.h"
-#include "xintrinsic.h"
-
#include "balloon_help.h"
-#ifndef max
-#define max(x,y) (x>y?x:y)
-#endif
+#include <X11/extensions/shape.h>
#undef bool
#define bool int
1.70.2.1 +15 -31 XEmacs/xemacs/src/buffer.c
Index: buffer.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/buffer.c,v
retrieving revision 1.70
retrieving revision 1.70.2.1
diff -u -r1.70 -r1.70.2.1
--- buffer.c 2005/02/03 16:14:04 1.70
+++ buffer.c 2005/02/15 01:19:42 1.70.2.1
@@ -167,12 +167,6 @@
Lisp_Object Vbefore_change_functions;
Lisp_Object Vafter_change_functions;
-/* #### Obsolete, for compatibility */
-Lisp_Object Qbefore_change_function;
-Lisp_Object Qafter_change_function;
-Lisp_Object Vbefore_change_function;
-Lisp_Object Vafter_change_function;
-
#if 0 /* FSFmacs */
Lisp_Object Vtransient_mark_mode;
#endif
@@ -1034,6 +1028,9 @@
is provided, then the ordering is for that frame. If the second arg
is t, then the global ordering is returned.
+This consults the frame property `buffer-predicate' on FRAME, if any.
+See `set-frame-property'.
+
Note: In FSF Emacs, this function takes two arguments: BUFFER and
VISIBLE-OK.
*/
@@ -1243,7 +1240,7 @@
GCPRO1 (buf);
- LIST_LOOP (rest, b->indirect_children)
+ OLD_LIST_LOOP (rest, b->indirect_children)
{
Fkill_buffer (XCAR (rest));
/* Keep indirect_children updated in case a
@@ -1512,7 +1509,7 @@
/* Look down buffer's list of local Lisp variables
to find and update any that forward into C variables. */
- LIST_LOOP (tail, b->local_var_alist)
+ OLD_LIST_LOOP (tail, b->local_var_alist)
{
Lisp_Object sym = XCAR (XCAR (tail));
Lisp_Object valcontents = XSYMBOL (sym)->value;
@@ -1530,7 +1527,7 @@
if (old_buf)
{
- LIST_LOOP (tail, old_buf->local_var_alist)
+ OLD_LIST_LOOP (tail, old_buf->local_var_alist)
{
Lisp_Object sym = XCAR (XCAR (tail));
Lisp_Object valcontents = XSYMBOL (sym)->value;
@@ -1733,16 +1730,16 @@
struct buffer_stats
{
- int text;
- int markers;
- int extents;
- int other;
+ Bytecount text;
+ Bytecount markers;
+ Bytecount extents;
+ Bytecount other;
};
static Bytecount
compute_buffer_text_usage (struct buffer *b, struct overhead_stats *ovstats)
{
- int was_requested = b->text->z - 1;
+ Bytecount was_requested = b->text->z - 1;
Bytecount gap = b->text->gap_size + b->text->end_gap_size;
Bytecount malloc_use = malloced_storage_size (b->text->beg, was_requested +
gap, 0);
@@ -1759,8 +1756,8 @@
xzero (*stats);
stats->other += malloced_storage_size (b, sizeof (*b), ovstats);
stats->text += compute_buffer_text_usage (b, ovstats);
- stats->markers += compute_buffer_marker_usage (b, ovstats);
- stats->extents += compute_buffer_extent_usage (b, ovstats);
+ stats->markers += (Bytecount) compute_buffer_marker_usage (b, ovstats);
+ stats->extents += (Bytecount) compute_buffer_extent_usage (b, ovstats);
}
DEFUN ("buffer-memory-usage", Fbuffer_memory_usage, 1, 1, 0, /*
@@ -1798,7 +1795,8 @@
val = acons (Qother, make_int (stats.other), val);
val = Fcons (Qnil, val);
val = acons (Qactually_requested, make_int (ovstats.was_requested), val);
- val = acons (Qmalloc_overhead, make_int (ovstats.malloc_overhead), val);
+ val = acons (Qmalloc_overhead,
+ make_int ((Bytecount) ovstats.malloc_overhead), val);
val = acons (Qgap_overhead, make_int (ovstats.gap_overhead), val);
val = acons (Qdynarr_overhead, make_int (ovstats.dynarr_overhead), val);
@@ -1901,10 +1899,6 @@
DEFSYMBOL (Qbefore_change_functions);
DEFSYMBOL (Qafter_change_functions);
- /* #### Obsolete, for compatibility */
- DEFSYMBOL (Qbefore_change_function);
- DEFSYMBOL (Qafter_change_function);
-
DEFSYMBOL (Qdefault_directory);
DEFSYMBOL (Qget_file_buffer);
@@ -2050,16 +2044,6 @@
don't call any before-change or after-change functions.
*/ );
Vafter_change_functions = Qnil;
-
- DEFVAR_LISP ("before-change-function", &Vbefore_change_function /*
-
-*/ ); /* obsoleteness will be documented */
- Vbefore_change_function = Qnil;
-
- DEFVAR_LISP ("after-change-function", &Vafter_change_function /*
-
-*/ ); /* obsoleteness will be documented */
- Vafter_change_function = Qnil;
DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook /*
A list of functions to call before changing a buffer which is unmodified.
1.29.4.1 +1 -1 XEmacs/xemacs/src/callint.c
Index: callint.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/callint.c,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -u -r1.29 -r1.29.4.1
--- callint.c 2004/11/04 23:06:16 1.29
+++ callint.c 2005/02/15 01:19:43 1.29.4.1
@@ -1,6 +1,6 @@
/* Call a Lisp function interactively.
Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2001, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
1.10.2.1 +2 -1 XEmacs/xemacs/src/charset.h
Index: charset.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/charset.h,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- charset.h 2005/01/24 23:33:47 1.10
+++ charset.h 2005/02/15 01:19:44 1.10.2.1
@@ -1,7 +1,7 @@
/* Header for charsets.
Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -546,6 +546,7 @@
void get_charset_limits (Lisp_Object charset, int *low, int *high);
int ichar_to_unicode (Ichar chr);
+Ichar unicode_to_ichar (int code, Lisp_Object_dynarr *charsets);
#endif /* MULE */
1.33.2.1 +43 -0 XEmacs/xemacs/src/chartab.c
Index: chartab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/chartab.c,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -r1.33 -r1.33.2.1
--- chartab.c 2005/01/24 23:33:47 1.33
+++ chartab.c 2005/02/15 01:19:44 1.33.2.1
@@ -768,6 +768,47 @@
return Qnil;
}
+DEFUN ("char-table-parent", Fchar_table_parent, 1, 1, 0, /*
+Return the parent char-table of CHAR-TABLE.
+The value is either nil or another char-table.
+If CHAR-TABLE holds nil for a given character,
+then the actual applicable value is inherited from the parent char-table
+\(or from its parents, if necessary).
+*/
+ (char_table))
+{
+ CHECK_CHAR_TABLE (char_table);
+
+ return XCHAR_TABLE (char_table)->parent;
+}
+
+DEFUN ("set-char-table-parent", Fset_char_table_parent, 2, 2, 0, /*
+Set the parent char-table of CHAR-TABLE to PARENT.
+PARENT must be either nil or another char-table.
+
+#### WARNING: Char table parents not currently implemented in XEmacs.
+*/
+ (char_table, parent))
+{
+ Lisp_Object temp;
+
+ CHECK_CHAR_TABLE (char_table);
+
+ if (!NILP (parent))
+ {
+ CHECK_CHAR_TABLE (parent);
+
+ for (temp = parent; !NILP (temp); temp = XCHAR_TABLE (temp)->parent)
+ if (EQ (temp, char_table))
+ invalid_change ("Attempt to make a char-table be its own parent",
+ char_table);
+ }
+
+ XCHAR_TABLE (char_table)->parent = parent;
+
+ return parent;
+}
+
DEFUN ("get-char-table", Fget_char_table, 2, 2, 0, /*
Find value for CHARACTER in CHAR-TABLE.
*/
@@ -1823,6 +1864,8 @@
DEFSUBR (Fchar_table_type);
DEFSUBR (Fchar_table_default);
DEFSUBR (Fset_char_table_default);
+ DEFSUBR (Fchar_table_parent);
+ DEFSUBR (Fset_char_table_parent);
DEFSUBR (Freset_char_table);
DEFSUBR (Fmake_char_table);
DEFSUBR (Fcopy_char_table);
1.17.8.1 +9 -7 XEmacs/xemacs/src/cmds.c
Index: cmds.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/cmds.c,v
retrieving revision 1.17
retrieving revision 1.17.8.1
diff -u -r1.17 -r1.17.8.1
--- cmds.c 2002/06/20 21:18:22 1.17
+++ cmds.c 2005/02/15 01:19:44 1.17.8.1
@@ -1,6 +1,6 @@
/* Simple built-in editing commands.
Copyright (C) 1985, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -23,11 +23,12 @@
#include <config.h>
#include "lisp.h"
-#include "commands.h"
+
#include "buffer.h"
+#include "commands.h"
#include "extents.h"
-#include "syntax.h"
#include "insdel.h"
+#include "syntax.h"
Lisp_Object Qkill_forward_chars;
Lisp_Object Qself_insert_command;
@@ -383,8 +384,7 @@
/* No, this is very bad, it makes undo *always* undo a character at a time
instead of grouping consecutive self-inserts together. Nasty nasty.
*/
- if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions)
- || !NILP (Vbefore_change_function) || !NILP (Vafter_change_function))
+ if (!NILP (Vbefore_change_functions) || !NILP (Vafter_change_functions))
hairy = 1;
#endif
@@ -447,7 +447,7 @@
&& !noautofill
&& !NILP (buf->auto_fill_function))
{
- buffer_insert_emacs_char (buf, c1);
+ buffer_insert_emacs_char_1 (buf, -1, c1, INSDEL_INHERIT);
if (c1 == '\n')
/* After inserting a newline, move to previous line and fill */
/* that. Must have the newline in place already so filling and */
@@ -459,7 +459,7 @@
/* hairy = 2; */
}
else
- buffer_insert_emacs_char (buf, c1);
+ buffer_insert_emacs_char_1 (buf, -1, c1, INSDEL_INHERIT);
/* If previous command specified a face to use, use it. */
if (!NILP (Vself_insert_face)
@@ -468,10 +468,12 @@
Lisp_Object before = make_int (BUF_PT (buf) - 1);
Lisp_Object after = make_int (BUF_PT (buf));
Fput_text_property (before, after, Qface, Vself_insert_face, Qnil);
+#ifndef NEW_TEXT_PROPERTY_MODEL
Fput_text_property (before, after, Qstart_open, Qt, Qnil);
Fput_text_property (before, after, Qend_open, Qnil, Qnil);
/* #### FSFmacs properties are normally closed ("sticky") on the
end but not the beginning. It's the opposite for us. */
+#endif
Vself_insert_face = Qnil;
}
synt = SYNTAX (syntax_table, c1);
1.96.2.1 +17 -2 XEmacs/xemacs/src/config.h.in
Index: config.h.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/config.h.in,v
retrieving revision 1.96
retrieving revision 1.96.2.1
diff -u -r1.96 -r1.96.2.1
--- config.h.in 2005/02/03 16:30:35 1.96
+++ config.h.in 2005/02/15 01:19:45 1.96.2.1
@@ -1,6 +1,6 @@
/* XEmacs site configuration template file. -*- C -*-
Copyright (C) 1986, 1991-1994, 1998, 1999 Free Software Foundation, Inc.
- Copyright (C) 2000, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing.
This file is part of XEmacs.
@@ -308,6 +308,7 @@
#undef CLASH_DETECTION
/* Have shared library support */
+#undef HAVE_SHLIB
#undef HAVE_DLOPEN
#undef HAVE_DLERROR
#undef HAVE__DLERROR
@@ -315,8 +316,10 @@
#undef HAVE_DYLD
#undef HAVE_LTDL
#undef DLSYM_NEEDS_UNDERSCORE
-#undef HAVE_SHLIB
+/* Have support for loadable modules */
+#undef HAVE_MODULES
+
#undef HAVE_LIBINTL
#undef HAVE_LIBDNET
#undef HAVE_LIBRESOLV
@@ -460,6 +463,7 @@
/* Compile in support for X pixmaps via the `xpm' library? */
#undef HAVE_XPM
#undef FOR_MSW
+#undef XPM_BUILT_INTO_XM
/* Compile in support for "X faces" via the `compface' library?
This enables graphical display of X-face headers in mail/news messages */
@@ -1052,6 +1056,17 @@
#### font-lock does its own version using parse-partial-sexp. We should
merge the two. */
#define USE_C_FONT_LOCK
+
+/* This records in compiled functions the file they were loaded from.
+ Steve ifdeffed this out when adding load-history, but load-history is
+ NOT a suitable replacement. It won't help if you have an actual
+ compiled-function object in your hand (and not a symbol), which is in
+ fact the very reason I added this -- and it will get screwed up if
+ someone fsets the symbol to something else, which will not happen using
+ the annotation "hack". On the other hand, load-history *IS* useful in
+ some cases where the annotation hack won't help, e.g. defaliases and
+ such. */
+#define COMPILED_FUNCTION_ANNOTATION_HACK
#ifdef ERROR_CHECK_ALL
#define ERROR_CHECK_EXTENTS
1.5.4.1 +3 -13 XEmacs/xemacs/src/console-gtk-impl.h
Index: console-gtk-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-gtk-impl.h,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- console-gtk-impl.h 2004/07/07 12:01:06 1.5
+++ console-gtk-impl.h 2005/02/15 01:19:45 1.5.4.1
@@ -1,7 +1,7 @@
/* Define GTK specific console, device, and frame object for XEmacs.
Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -39,7 +39,7 @@
#include "console-impl.h"
#include "console-gtk.h"
-#include <X11/Xlib.h>
+#include "console-xlike.h"
#define GDK_DRAWABLE(x) (GdkDrawable *) (x)
#define GET_GTK_WIDGET_WINDOW(x) (GTK_WIDGET (x)->window)
@@ -67,17 +67,7 @@
one of these per device. */
Lisp_Object WM_COMMAND_frame;
- /* The following items are all used exclusively in event-gtk.c. */
- int MetaMask, HyperMask, SuperMask, AltMask, ModeMask;
- KeySym lock_interpretation;
-
- XModifierKeymap *x_modifier_keymap;
-
- KeySym *x_keysym_map;
- int x_keysym_map_min_code;
- int x_keysym_map_max_code;
- int x_keysym_map_keysyms_per_code;
- Lisp_Object x_keysym_map_hashtable;
+ struct xlike_event_key_data key;
/* #### It's not clear that there is much distinction anymore
between mouse_timestamp and global_mouse_timestamp, now that
1.9.4.1 +23 -7 XEmacs/xemacs/src/console-gtk.h
Index: console-gtk.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-gtk.h,v
retrieving revision 1.9
retrieving revision 1.9.4.1
diff -u -r1.9 -r1.9.4.1
--- console-gtk.h 2004/07/07 12:01:06 1.9
+++ console-gtk.h 2005/02/15 01:19:46 1.9.4.1
@@ -25,9 +25,8 @@
/* Authorship:
- Ultimately based on FSF, then later on JWZ work for Lemacs.
- Rewritten over time by Ben Wing and Chuck Thompson (original
- multi-device work by Chuck Thompson).
+ Bill Perry, based on console-x.h.
+ Cleaned up, Mule-ized by Ben Wing.
*/
#ifndef _XEMACS_CONSOLE_GTK_H_
@@ -43,6 +42,19 @@
extern Lisp_Object Vx_gc_pointer_shape;
extern Lisp_Object Vx_scrollbar_pointer_shape;
+extern Lisp_Object Vgtk_text_encoding;
+
+#define LISP_STRING_TO_GTK_TEXT(lstr) \
+ ((gchar *) NEW_LISP_STRING_TO_EXTERNAL (lstr, Vgtk_text_encoding))
+#define LISP_STRING_TO_GTK_TEXT_MALLOC(lstr) \
+ ((gchar *) NEW_LISP_STRING_TO_EXTERNAL_MALLOC (lstr, Vgtk_text_encoding))
+#define GTK_TEXT_TO_C_STRING(str) \
+ NEW_EXTERNAL_TO_C_STRING (str, Vgtk_text_encoding)
+#define C_STRING_TO_GTK_TEXT(str) \
+ NEW_C_STRING_TO_EXTERNAL (str, Vgtk_text_encoding)
+#define INTERN_GTK_TEXT(str) \
+ intern_int (GTK_TEXT_TO_C_STRING (str))
+
/* Number of pixels below each line. */
extern int gtk_interline_space;
@@ -70,13 +82,10 @@
Lisp_Object bg_pmap, Lisp_Object lwidth);
int gtk_initialize_frame_menubar (struct frame *f);
-void gtk_init_modifier_mapping (struct device *d);
-
-void Initialize_Locale (void);
extern Lisp_Object Vgtk_initial_argv_list; /* #### ugh! */
-const char *gtk_event_name (GdkEventType event_type);
+const gchar *gtk_event_name (GdkEventType event_type);
void reinit_console_type_create_gtk (void);
@@ -98,6 +107,13 @@
extern void gcpro_popup_callbacks (GUI_ID id, Lisp_Object data);
extern void ungcpro_popup_callbacks (GUI_ID id);
extern Lisp_Object get_gcpro_popup_callbacks (GUI_ID id);
+
+/* gccache */
+
+struct gc_cache;
+struct gc_cache *gtk_make_gc_cache (GtkWidget *);
+void gtk_free_gc_cache (struct gc_cache *cache);
+GdkGC *gtk_gc_cache_lookup (struct gc_cache *, GdkGCValues *, unsigned long mask);
#endif /* HAVE_GTK */
#endif /* _XEMACS_DEVICE_X_H_ */
1.8.2.1 +12 -3 XEmacs/xemacs/src/console-impl.h
Index: console-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-impl.h,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- console-impl.h 2005/01/28 02:58:51 1.8
+++ console-impl.h 2005/02/15 01:19:46 1.8.2.1
@@ -258,6 +258,16 @@
Lisp_Object face,
int* width, int* height,
Lisp_Object domain);
+ void (*xbm_instantiate_1_method)
+ (Lisp_Image_Instance *ii, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int width, int height, const Binbyte *bits,
+ enum image_instance_type type, Lisp_Object device,
+ Lisp_Object mask_data, Lisp_Object mask_file,
+ Lisp_Object foreground, Lisp_Object background);
+ void (*initialize_pixmap_image_instance_data_method)
+ (struct Lisp_Image_Instance *ii, int slices);
+
Lisp_Object image_conversion_list;
#ifdef HAVE_TOOLBARS
@@ -288,9 +298,8 @@
scrollbar_instance *);
void (*scrollbar_pointer_changed_in_window_method) (struct window *w);
#ifdef MEMORY_USAGE_STATS
- int (*compute_scrollbar_instance_usage_method) (struct device *,
- struct scrollbar_instance *,
- struct overhead_stats *);
+ Bytecount (*compute_scrollbar_instance_usage_method)
+ (struct device *, struct scrollbar_instance *, struct overhead_stats *);
#endif
/* Paint the window's deadbox, a rectangle between window
borders and two short edges of both scrollbars. */
1.18.4.1 +5 -8 XEmacs/xemacs/src/console-msw.c
Index: console-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-msw.c,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- console-msw.c 2004/11/04 23:06:18 1.18
+++ console-msw.c 2005/02/15 01:19:46 1.18.4.1
@@ -1,5 +1,5 @@
/* Console functions for mswindows.
- Copyright (C) 1996, 2000, 2001, 2002 Ben Wing.
+ Copyright (C) 1996, 2000, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -245,9 +245,8 @@
{
const Extbyte *extptr;
Bytecount extlen;
- TO_EXTERNAL_FORMAT (DATA, (ptr, len),
- ALLOCA, (extptr, extlen),
- Qmswindows_tstr);
+ SIZED_C_STRING_TO_SIZED_EXTERNAL (ptr, len, extptr, extlen,
+ Qmswindows_tstr);
return qxeWriteConsole (mswindows_console_buffer, extptr,
extlen / XETCHAR_SIZE, &num_written, NULL);
}
@@ -289,9 +288,7 @@
const Extbyte *extptr;
if (initialized && !inhibit_non_essential_conversion_operations)
{
- TO_EXTERNAL_FORMAT (DATA, (str, len),
- C_STRING_ALLOCA, extptr,
- Qmswindows_tstr);
+ SIZED_C_STRING_TO_EXTERNAL (str, len, extptr, Qmswindows_tstr);
qxeOutputDebugString (extptr);
}
else
@@ -312,7 +309,7 @@
/*
* Random helper functions for debugging.
* Intended for use in the MSVC "Watch" window which doesn't like
- * the aborts that the error_check_foo() functions can make.
+ * the ABORTs that the error_check_foo() functions can make.
*/
struct lrecord_header *DHEADER (Lisp_Object obj);
struct lrecord_header *
1.25.2.1 +1 -1 XEmacs/xemacs/src/console-stream.c
Index: console-stream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-stream.c,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- console-stream.c 2005/01/24 23:33:48 1.25
+++ console-stream.c 2005/02/15 01:19:47 1.25.2.1
@@ -219,7 +219,7 @@
/* We used to try and check for redisplaying on stream devices (e.g. in
redisplay_device(), and beg out if so. However, we didn't always manage
- completely. Now we do manage completely, and to verify this we abort if
+ completely. Now we do manage completely, and to verify this we ABORT if
we try to display a stream device. This might fix some crashes I've
been getting in pdump -- the only difference between crash and non-crash
is a few changes to the redisplay critical-section handling. */
1.3.4.1 +3 -13 XEmacs/xemacs/src/console-x-impl.h
Index: console-x-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-x-impl.h,v
retrieving revision 1.3
retrieving revision 1.3.4.1
diff -u -r1.3 -r1.3.4.1
--- console-x-impl.h 2004/11/04 23:06:18 1.3
+++ console-x-impl.h 2005/02/15 01:19:48 1.3.4.1
@@ -37,6 +37,7 @@
#include "console-impl.h"
#include "console-x.h"
+#include "console-xlike.h"
DECLARE_CONSOLE_TYPE (x);
@@ -99,22 +100,12 @@
Atom Xatom_CHARSET_REGISTRY;
Atom Xatom_CHARSET_ENCODING;
- /* The following items are all used exclusively in event-Xt.c. */
- int MetaMask, HyperMask, SuperMask, AltMask, ModeMask;
- KeySym lock_interpretation;
-
- XModifierKeymap *x_modifier_keymap;
-
- KeySym *x_keysym_map;
- int x_keysym_map_min_code;
- int x_keysym_map_max_code;
- int x_keysym_map_keysyms_per_code;
- Lisp_Object x_keysym_map_hash_table;
-
/* frame that holds the WM_COMMAND property; there should be exactly
one of these per device. */
Lisp_Object WM_COMMAND_frame;
+ struct xlike_event_key_data key;
+
/* #### It's not clear that there is much distinction anymore
between mouse_timestamp and global_mouse_timestamp, now that
Emacs doesn't see most (all?) events not destined for it. */
@@ -174,7 +165,6 @@
#define DEVICE_X_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA (d)->mouse_timestamp)
#define DEVICE_X_GLOBAL_MOUSE_TIMESTAMP(d) (DEVICE_X_DATA
(d)->global_mouse_timestamp)
#define DEVICE_X_LAST_SERVER_TIMESTAMP(d) (DEVICE_X_DATA
(d)->last_server_timestamp)
-#define DEVICE_X_KEYSYM_MAP_HASH_TABLE(d) (DEVICE_X_DATA
(d)->x_keysym_map_hash_table)
/* #define DEVICE_X_X_COMPOSE_STATUS(d) (DEVICE_X_DATA (d)->x_compose_status) */
#ifdef HAVE_XIM
#define DEVICE_X_XIM(d) (DEVICE_X_DATA (d)->xim)
1.21.2.1 +23 -8 XEmacs/xemacs/src/console-x.h
Index: console-x.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console-x.h,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- console-x.h 2005/01/17 10:10:18 1.21
+++ console-x.h 2005/02/15 01:19:48 1.21.2.1
@@ -1,7 +1,7 @@
/* Define X specific console, device, and frame object for XEmacs.
Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1996, 2002, 2003 Ben Wing.
+ Copyright (C) 1996, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -22,12 +22,11 @@
/* Synched up with: Not in FSF. */
-
/* Authorship:
Ultimately based on FSF, then later on JWZ work for Lemacs.
- Rewritten over time by Ben Wing and Chuck Thompson (original
- multi-device work by Chuck Thompson).
+ Original multi-device work by Chuck Thompson.
+ Rewritten over time by Ben Wing.
*/
#ifndef INCLUDED_console_x_h_
@@ -107,7 +106,7 @@
void x_wm_set_cell_size (Widget wmshell, int cw, int ch);
void x_wm_set_variable_size (Widget wmshell, int width, int height);
-const char *x_event_name (int event_type);
+const Ascbyte *x_event_name (int event_type);
int check_if_pending_expose_event (struct device *d);
int x_error_handler (Display *disp, XErrorEvent *event);
void expect_x_error (Display *dpy);
@@ -155,8 +154,19 @@
unsigned long background,
unsigned long core_background);
+enum external_x_data
+{
+ X_ASCII,
+ X_LATIN_1,
+ X_COMPOUND_TEXT
+};
+
+enum external_x_data x_convert_to_external_property_data (const Ibyte *src,
+ Bytecount srclen,
+ Extbyte **dst,
+ Bytecount *dstlen);
+
int x_initialize_frame_menubar (struct frame *f);
-void x_init_modifier_mapping (struct device *d);
int x_frame_window_state (struct frame *f);
@@ -166,8 +176,6 @@
#define HANDLING_X_ERROR(dpy, body) \
(expect_x_error (dpy), body, signal_if_x_error (dpy, 0))
-void Initialize_Locale (void);
-
#ifdef HAVE_XIM
/* X Input Method `methods' */
@@ -215,6 +223,13 @@
extern int in_specifier_change_function;
extern Lisp_Object Vx_initial_argv_list; /* #### ugh! */
+
+/* gccache */
+
+struct gc_cache;
+struct gc_cache *x_make_gc_cache (Display *, Window);
+void x_free_gc_cache (struct gc_cache *cache);
+GC x_gc_cache_lookup (struct gc_cache *, XGCValues *, unsigned long mask);
#endif /* HAVE_X_WINDOWS */
1.40.2.1 +2 -4 XEmacs/xemacs/src/console.c
Index: console.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.c,v
retrieving revision 1.40
retrieving revision 1.40.2.1
diff -u -r1.40 -r1.40.2.1
--- console.c 2005/02/03 16:14:04 1.40
+++ console.c 2005/02/15 01:19:48 1.40.2.1
@@ -1,6 +1,6 @@
/* The console object.
Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 1996, 2002 Ben Wing.
+ Copyright (C) 1996, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -1000,9 +1000,7 @@
Bytecount count;
Extbyte *p;
- TO_EXTERNAL_FORMAT (LISP_STRING, stuffstring,
- ALLOCA, (p, count),
- Qkeyboard);
+ LISP_STRING_TO_SIZED_EXTERNAL (stuffstring, p, count, Qkeyboard);
while (count-- > 0)
stuff_char (XCONSOLE (Vcontrolling_terminal), *p++);
stuff_char (XCONSOLE (Vcontrolling_terminal), '\n');
1.42.4.1 +3 -3 XEmacs/xemacs/src/console.h
Index: console.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/console.h,v
retrieving revision 1.42
retrieving revision 1.42.4.1
diff -u -r1.42 -r1.42.4.1
--- console.h 2004/03/08 15:23:02 1.42
+++ console.h 2005/02/15 01:19:49 1.42.4.1
@@ -1,5 +1,5 @@
/* Define console object for XEmacs.
- Copyright (C) 1996, 2002 Ben Wing
+ Copyright (C) 1996, 2002, 2003 Ben Wing
This file is part of XEmacs.
@@ -110,9 +110,9 @@
: ((CONSOLEP (obj) && CONSOLE_LIVE_P (XCONSOLE (obj))) ? obj \
: Qnil))))
-#define CONSOLE_LOOP(concons) LIST_LOOP (concons, Vconsole_list)
+#define CONSOLE_LOOP(concons) OLD_LIST_LOOP (concons, Vconsole_list)
#define CONSOLE_DEVICE_LOOP(devcons, con) \
- LIST_LOOP (devcons, CONSOLE_DEVICE_LIST (con))
+ OLD_LIST_LOOP (devcons, CONSOLE_DEVICE_LIST (con))
EXFUN (Fconsole_disable_input, 1);
EXFUN (Fdelete_console, 2);
1.62.2.1 +40 -17 XEmacs/xemacs/src/data.c
Index: data.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/data.c,v
retrieving revision 1.62
retrieving revision 1.62.2.1
diff -u -r1.62 -r1.62.2.1
--- data.c 2005/02/03 16:14:04 1.62
+++ data.c 2005/02/15 01:19:49 1.62.2.1
@@ -1,7 +1,7 @@
/* Primitive operations on Lisp data types for XEmacs Lisp interpreter.
Copyright (C) 1985, 1986, 1988, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
- Copyright (C) 2000, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -893,8 +893,22 @@
}
}
-#ifdef WITH_NUMBER_TYPES
+#define HALFSPACE_ULONG (1UL + (ULONG_MAX >> 1))
+
+/* Implement A < B according to the halfspace algorithm, useful for
+ correctly comparing values that may wrap around (timestamps and the
+ like). */
+int
+halfspace_lessp_unsigned_long (unsigned long a, unsigned long b)
+{
+ if (a < b)
+ return b - a < HALFSPACE_ULONG;
+ else
+ return !(a - b < HALFSPACE_ULONG);
+}
+
+#ifdef WITH_NUMBER_TYPES
#ifdef HAVE_BIGNUM
#define BIGNUM_CASE(op) \
case BIGNUM_T: \
@@ -1174,15 +1188,15 @@
if (FLOATP (number))
{
- char pigbuf[350]; /* see comments in float_to_string */
+ Ibyte pigbuf[350]; /* see comments in float_to_string */
float_to_string (pigbuf, XFLOAT_DATA (number));
- return build_string (pigbuf);
+ return build_intstring (pigbuf);
}
#ifdef HAVE_BIGNUM
if (BIGNUMP (number))
{
- char *str = bignum_to_string (XBIGNUM_DATA (number), 10);
+ Ascbyte *str = bignum_to_string (XBIGNUM_DATA (number), 10);
Lisp_Object retval = build_string (str);
xfree (str, char *);
return retval;
@@ -1191,7 +1205,7 @@
#ifdef HAVE_RATIO
if (RATIOP (number))
{
- char *str = ratio_to_string (XRATIO_DATA (number), 10);
+ Ascbyte *str = ratio_to_string (XRATIO_DATA (number), 10);
Lisp_Object retval = build_string (str);
xfree (str, char *);
return retval;
@@ -1200,7 +1214,7 @@
#ifdef HAVE_BIGFLOAT
if (BIGFLOATP (number))
{
- char *str = bigfloat_to_string (XBIGFLOAT_DATA (number), 10);
+ Ascbyte *str = bigfloat_to_string (XBIGFLOAT_DATA (number), 10);
Lisp_Object retval = build_string (str);
xfree (str, char *);
return retval;
@@ -1208,10 +1222,10 @@
#endif
{
- char buffer[DECIMAL_PRINT_SIZE (long)];
+ Ibyte buffer[DECIMAL_PRINT_SIZE (long)];
long_to_string (buffer, XINT (number));
- return build_string (buffer);
+ return build_intstring (buffer);
}
}
@@ -1262,12 +1276,12 @@
while (*p == ' ' || *p == '\t')
p++;
- if (isfloat_string ((const char *) p) && b == 10)
+ if (isfloat_string (p) && b == 10)
{
#ifdef HAVE_BIGFLOAT
if (ZEROP (Vdefault_float_precision))
#endif
- return make_float (atof ((const char *) p));
+ return make_float (atof ((const Ascbyte *) p));
#ifdef HAVE_BIGFLOAT
else
{
@@ -1278,7 +1292,7 @@
if (*p == '+')
p++;
bigfloat_set_prec (scratch_bigfloat, bigfloat_get_default_prec ());
- bigfloat_set_string (scratch_bigfloat, (const char *) p, b);
+ bigfloat_set_string (scratch_bigfloat, (const Ascbyte *) p, b);
return make_bigfloat_bf (scratch_bigfloat);
}
#endif
@@ -1326,7 +1340,7 @@
}
save = *end;
*end = '\0';
- ratio_set_string (scratch_ratio, (const char *) p, b);
+ ratio_set_string (scratch_ratio, (const Ascbyte *) p, b);
*end = save;
ratio_canonicalize (scratch_ratio);
return make_ratio_rt (scratch_ratio);
@@ -1363,7 +1377,7 @@
retval = make_int (0);
else
{
- bignum_set_string (scratch_bignum, (const char *) p, b);
+ bignum_set_string (scratch_bignum, (const Ascbyte *) p, b);
retval = Fcanonicalize_number (make_bignum_bg (scratch_bignum));
}
*end = save;
@@ -1374,11 +1388,11 @@
{
/* Use the system-provided functions for base 10. */
#if SIZEOF_EMACS_INT == SIZEOF_INT
- return make_int (atoi ((char*) p));
+ return make_int (atoi ((Ascbyte *) p));
#elif SIZEOF_EMACS_INT == SIZEOF_LONG
- return make_int (atol ((char*) p));
+ return make_int (atol ((Ascbyte *) p));
#elif SIZEOF_EMACS_INT == SIZEOF_LONG_LONG
- return make_int (atoll ((char*) p));
+ return make_int (atoll ((Ascbyte *) p));
#endif
}
else
@@ -2973,6 +2987,15 @@
return new_list;
}
+/* Store the usage of the weak list itself in OVSTATS and return the
+ number of conses used as the return value. */
+Elemcount
+weak_list_usage (Lisp_Object list, struct overhead_stats *ovstats)
+{
+ malloced_storage_size (XWEAK_LIST (list), sizeof (struct weak_list),
+ ovstats);
+ return XINT (Fsafe_length (XWEAK_LIST_LIST (list)));
+}
/************************************************************************/
/* weak boxes */
1.33.2.1 +18 -28 XEmacs/xemacs/src/database.c
Index: database.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/database.c,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -r1.33 -r1.33.2.1
--- database.c 2005/01/21 20:07:06 1.33
+++ database.c 2005/02/15 01:19:50 1.33.2.1
@@ -1,6 +1,6 @@
/* Database access routines
Copyright (C) 1996, William M. Perry
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -286,9 +286,8 @@
{
datum keydatum, valdatum;
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.dptr, keydatum.dsize),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.dptr, keydatum.dsize,
+ db->coding_system);
valdatum = dbm_fetch (db->dbm_handle, keydatum);
return (valdatum.dptr
@@ -303,12 +302,10 @@
{
datum keydatum, valdatum;
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- ALLOCA, (valdatum.dptr, valdatum.dsize),
- db->coding_system);
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.dptr, keydatum.dsize),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (val, valdatum.dptr, valdatum.dsize,
+ db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.dptr, keydatum.dsize,
+ db->coding_system);
return !dbm_store (db->dbm_handle, keydatum, valdatum,
NILP (replace) ? DBM_INSERT : DBM_REPLACE);
@@ -319,9 +316,8 @@
{
datum keydatum;
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.dptr, keydatum.dsize),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.dptr, keydatum.dsize,
+ db->coding_system);
return dbm_delete (db->dbm_handle, keydatum);
}
@@ -408,9 +404,8 @@
xzero (keydatum);
xzero (valdatum);
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.data, keydatum.size),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.data, keydatum.size,
+ db->coding_system);
#if DB_VERSION_MAJOR == 1
status = db->db_handle->get (db->db_handle, &keydatum, &valdatum,
0);
@@ -444,12 +439,10 @@
xzero (keydatum);
xzero (valdatum);
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.data, keydatum.size),
- db->coding_system);
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- ALLOCA, (valdatum.data, valdatum.size),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.data, keydatum.size,
+ db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (val, valdatum.data, valdatum.size,
+ db->coding_system);
#if DB_VERSION_MAJOR == 1
status = db->db_handle->put (db->db_handle, &keydatum, &valdatum,
NILP (replace) ? R_NOOVERWRITE : 0);
@@ -472,9 +465,8 @@
/* DB Version 2 requires DBT's to be zeroed before use. */
xzero (keydatum);
- TO_EXTERNAL_FORMAT (LISP_STRING, key,
- ALLOCA, (keydatum.data, keydatum.size),
- db->coding_system);
+ LISP_STRING_TO_SIZED_EXTERNAL (key, keydatum.data, keydatum.size,
+ db->coding_system);
#if DB_VERSION_MAJOR == 1
status = db->db_handle->del (db->db_handle, &keydatum, 0);
@@ -607,9 +599,7 @@
file = Fexpand_file_name (file, Qnil);
UNGCPRO;
- TO_EXTERNAL_FORMAT (LISP_STRING, file,
- C_STRING_ALLOCA, filename,
- Qfile_name);
+ LISP_STRING_TO_EXTERNAL (file, filename, Qfile_name);
if (NILP (access_))
{
1.10.4.1 +2 -2 XEmacs/xemacs/src/debug.c
Index: debug.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/debug.c,v
retrieving revision 1.10
retrieving revision 1.10.4.1
diff -u -r1.10 -r1.10.4.1
--- debug.c 2004/11/04 23:06:19 1.10
+++ debug.c 2005/02/15 01:19:50 1.10.4.1
@@ -143,13 +143,13 @@
/* Make sure all objects in the list are valid. If anyone is not
valid, reject the entire list without doing anything. */
- LIST_LOOP (rest, classes)
+ OLD_LIST_LOOP (rest, classes)
{
if (NILP (xemacs_debug_loop (X_VALIDATE, XCAR (rest), Qnil)))
sferror ("Invalid object in class list", Qunbound);
}
- LIST_LOOP (rest, classes)
+ OLD_LIST_LOOP (rest, classes)
Fadd_debug_class_to_check (XCAR (rest));
return (xemacs_debug_loop (X_ACTIVE, Qnil, Qnil));
1.14.4.1 +25 -16 XEmacs/xemacs/src/device-gtk.c
Index: device-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-gtk.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -r1.14 -r1.14.4.1
--- device-gtk.c 2004/09/20 19:19:37 1.14
+++ device-gtk.c 2005/02/15 01:19:51 1.14.4.1
@@ -1,7 +1,7 @@
/* Device functions for X windows.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -40,7 +40,6 @@
#include "window.h"
#include "console-gtk-impl.h"
-#include "gccache-gtk.h"
#include "glyphs-gtk.h"
#include "objects-gtk.h"
#include "gtk-xemacs.h"
@@ -68,7 +67,8 @@
static void gtk_device_init_x_specific_cruft (struct device *d);
static const struct memory_description gtk_device_data_description_1 [] = {
- { XD_LISP_OBJECT, offsetof (struct gtk_device, x_keysym_map_hashtable) },
+ { XD_LISP_OBJECT, offsetof (struct gtk_device, key.x_keysym_map_hash_table)
+ },
{ XD_LISP_OBJECT, offsetof (struct gtk_device, WM_COMMAND_frame) },
{ XD_END }
};
@@ -107,7 +107,7 @@
allocate_gtk_device_struct (struct device *d)
{
d->device_data = xnew_and_zero (struct gtk_device);
- DEVICE_GTK_DATA (d)->x_keysym_map_hashtable = Qnil;
+ DEVICE_GTK_DATA (d)->key.x_keysym_map_hash_table = Qnil;
}
static void
@@ -219,7 +219,8 @@
/* Attempt to load a site-specific gtkrc */
{
- Lisp_Object gtkrc = Fexpand_file_name (build_string ("gtkrc"),
Vdata_directory);
+ Lisp_Object gtkrc = Fexpand_file_name (build_string ("gtkrc"),
+ Vdata_directory);
gchar **default_files = gtk_rc_get_default_files ();
gint num_files;
@@ -233,15 +234,15 @@
new_rc_files = xnew_array_and_zero (gchar *, num_files + 3);
- LISP_STRING_TO_EXTERNAL (gtkrc, new_rc_files[0], Qfile_name);
-
+ LISP_STRING_TO_EXTERNAL (gtkrc, new_rc_files[0],
+ Vgtk_text_encoding);
for (ctr = 1; default_files[ctr-1]; ctr++)
new_rc_files[ctr] = g_strdup (default_files[ctr-1]);
gtk_rc_set_default_files (new_rc_files);
for (ctr = 1; new_rc_files[ctr]; ctr++)
- free(new_rc_files[ctr]);
+ free (new_rc_files[ctr]);
xfree (new_rc_files, gchar **);
}
@@ -311,14 +312,15 @@
DEVICE_GTK_WM_COMMAND_FRAME (d) = Qnil;
- gtk_init_modifier_mapping (d);
+ /* In event-xlike.c */
+ xlike_init_modifier_mapping (d, &DEVICE_GTK_DATA (d)->key);
gtk_device_init_x_specific_cruft (d);
init_baud_rate (d);
init_one_device (d);
- DEVICE_GTK_GC_CACHE (d) = make_gc_cache (GTK_WIDGET (app_shell));
+ DEVICE_GTK_GC_CACHE (d) = gtk_make_gc_cache (GTK_WIDGET (app_shell));
DEVICE_GTK_GRAY_PIXMAP (d) = NULL;
gtk_init_device_class (d);
@@ -337,7 +339,7 @@
gtk_mark_device (struct device *d)
{
mark_object (DEVICE_GTK_WM_COMMAND_FRAME (d));
- mark_object (DEVICE_GTK_DATA (d)->x_keysym_map_hashtable);
+ mark_object (DEVICE_GTK_DATA (d)->key.x_keysym_map_hash_table);
}
@@ -368,8 +370,10 @@
if (checking_free)
disable_strict_free_check ();
#endif
+
+ gtk_free_gc_cache (DEVICE_GTK_GC_CACHE (d));
- free_gc_cache (DEVICE_GTK_GC_CACHE (d));
+ free_xlike_event_key_data (&DEVICE_GTK_DATA (d)->key);
#ifdef FREE_CHECKING
if (checking_free)
@@ -385,7 +389,7 @@
/* handle X errors */
/************************************************************************/
-const char *
+const gchar *
gtk_event_name (GdkEventType event_type)
{
GtkEnumValue *vals = gtk_type_enum_get_values (GTK_TYPE_GDK_EVENT_TYPE);
@@ -513,8 +517,10 @@
if (!DEVICE_GTK_P (d))
gui_error ("Not a GTK device", device);
- return (NILP (Fgethash (keysym, DEVICE_GTK_DATA (d)->x_keysym_map_hashtable,
Qnil)) ?
- Qnil : Qt);
+ return !NILP (Fgethash (keysym,
+ DEVICE_GTK_DATA (d)->key.x_keysym_map_hash_table,
+ Qnil))
+ ? Qt : Qnil;
}
@@ -657,7 +663,10 @@
result = nconc2 (result, list2 (Qfont, convert_font (style->font)));
-#define FROB_PIXMAP(state) (style->rc_style->bg_pixmap_name[state] ? build_string
(style->rc_style->bg_pixmap_name[state]) : Qnil)
+#define FROB_PIXMAP(state) \
+ (style->rc_style->bg_pixmap_name[state] ? \
+ build_ext_string (style->rc_style->bg_pixmap_name[state], \
+ Vgtk_text_encoding) : Qnil)
if (style->rc_style)
result = nconc2 (result, list2 (Qbackground,
1.61.2.1 +36 -31 XEmacs/xemacs/src/device-x.c
Index: device-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device-x.c,v
retrieving revision 1.61
retrieving revision 1.61.2.1
diff -u -r1.61 -r1.61.2.1
--- device-x.c 2005/02/03 16:30:35 1.61
+++ device-x.c 2005/02/15 01:19:51 1.61.2.1
@@ -1,7 +1,7 @@
/* Device functions for X windows.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Ben Wing.
This file is part of XEmacs.
@@ -51,11 +51,10 @@
#include <X11/CoreP.h> /* Numerous places access the fields of
a core widget directly. We could
use XtGetValues(), but ... */
-#include "xgccache.h"
#include <X11/Shell.h>
#include "xmu.h"
-#if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) &&
!defined(HAVE_ATHENA_3D)
+#if defined (HAVE_SHLIB) && defined (LWLIB_USES_ATHENA) && !defined
(HAVE_ATHENA_3D)
#include "sysdll.h"
#endif /* HAVE_SHLIB and LWLIB_USES_ATHENA and not HAVE_ATHENA_3D */
@@ -103,7 +102,7 @@
};
static const struct memory_description x_device_data_description_1 [] = {
- { XD_LISP_OBJECT, offsetof (struct x_device, x_keysym_map_hash_table) },
+ { XD_LISP_OBJECT, offsetof (struct x_device, key.x_keysym_map_hash_table) },
{ XD_LISP_OBJECT, offsetof (struct x_device, WM_COMMAND_frame) },
{ XD_END }
};
@@ -184,7 +183,7 @@
{
#ifdef MULE
const Extbyte *locale = XrmLocaleOfDatabase (db);
- Lisp_Object localestr = build_ext_string (locale, Qbinary);
+ Lisp_Object localestr = build_ext_string (locale, Qlocale_name_encoding);
return call1 (Qget_coding_system_from_locale, localestr);
#else
return Qbinary;
@@ -357,7 +356,7 @@
Bytecount len;
Extbyte *data;
- TO_EXTERNAL_FORMAT (LISP_STRING, str, ALLOCA, (data, len), Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (str, data, len, Qx_resource_name_encoding);
Dynarr_add_many (cda, data, len);
validify_resource_component (Dynarr_atp (cda, Dynarr_length (cda) - len),
len);
@@ -510,7 +509,7 @@
/* */
int best_visual_found = 0;
-#if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) &&
!defined(HAVE_ATHENA_3D)
+#if defined (HAVE_SHLIB) && defined (LWLIB_USES_ATHENA) && !defined
(HAVE_ATHENA_3D)
/*
* In order to avoid the lossage with flat Athena widgets dynamically
* linking to one of the ThreeD variants, using the dynamic symbol helpers
@@ -587,7 +586,7 @@
make_argc_argv (Vx_initial_argv_list, &argc, &argv);
- LISP_STRING_TO_EXTERNAL (display, disp_name, Qctext);
+ LISP_STRING_TO_EXTERNAL (display, disp_name, Qx_display_name_encoding);
/*
* Break apart the old XtOpenDisplay call into XOpenDisplay and
@@ -611,7 +610,8 @@
if (STRINGP (Vx_emacs_application_class) &&
XSTRING_LENGTH (Vx_emacs_application_class) > 0)
- LISP_STRING_TO_EXTERNAL (Vx_emacs_application_class, app_class, Qctext);
+ LISP_STRING_TO_EXTERNAL (Vx_emacs_application_class, app_class,
+ Qx_application_class_encoding);
else
{
app_class = (NILP (Vx_emacs_application_class) &&
@@ -837,14 +837,14 @@
sanity_check_geometry_resource (dpy);
- /* In event-Xt.c */
- x_init_modifier_mapping (d);
+ /* In event-xlike.c */
+ xlike_init_modifier_mapping (d, &DEVICE_X_DATA (d)->key);
DEVICE_INFD (d) = DEVICE_OUTFD (d) = ConnectionNumber (dpy);
init_baud_rate (d);
init_one_device (d);
- DEVICE_X_GC_CACHE (d) = make_gc_cache (dpy, XtWindow (app_shell));
+ DEVICE_X_GC_CACHE (d) = x_make_gc_cache (dpy, XtWindow (app_shell));
DEVICE_X_GRAY_PIXMAP (d) = None;
Xatoms_of_device_x (d);
Xatoms_of_select_x (d);
@@ -865,7 +865,7 @@
x_mark_device (struct device *d)
{
mark_object (DEVICE_X_WM_COMMAND_FRAME (d));
- mark_object (DEVICE_X_DATA (d)->x_keysym_map_hash_table);
+ mark_object (DEVICE_X_DATA (d)->key.x_keysym_map_hash_table);
}
@@ -900,12 +900,10 @@
disable_strict_free_check ();
#endif
- free_gc_cache (DEVICE_X_GC_CACHE (d));
- if (DEVICE_X_DATA (d)->x_modifier_keymap)
- XFreeModifiermap (DEVICE_X_DATA (d)->x_modifier_keymap);
- if (DEVICE_X_DATA (d)->x_keysym_map)
- XFree ((char *) DEVICE_X_DATA (d)->x_keysym_map);
+ x_free_gc_cache (DEVICE_X_GC_CACHE (d));
+ free_xlike_event_key_data (&DEVICE_X_DATA (d)->key);
+
if (DEVICE_XT_APP_SHELL (d))
{
XtDestroyWidget (DEVICE_XT_APP_SHELL (d));
@@ -928,7 +926,7 @@
/* handle X errors */
/************************************************************************/
-const char *
+const Ascbyte *
x_event_name (int event_type)
{
static const char *events[] =
@@ -1484,9 +1482,11 @@
db = XtDatabase (display);
codesys = coding_system_of_xrm_database (db);
Dynarr_add (name_Extbyte_dynarr, '.');
- Dynarr_add_lisp_string (name_Extbyte_dynarr, name, Qbinary);
+ Dynarr_add_lisp_string (name_Extbyte_dynarr, name,
+ Qx_resource_name_encoding);
Dynarr_add (class_Extbyte_dynarr, '.');
- Dynarr_add_lisp_string (class_Extbyte_dynarr, class_, Qbinary);
+ Dynarr_add_lisp_string (class_Extbyte_dynarr, class_,
+ Qx_resource_name_encoding);
Dynarr_add (name_Extbyte_dynarr, '\0');
Dynarr_add (class_Extbyte_dynarr, '\0');
@@ -1538,7 +1538,7 @@
return Fcons (Qt, Qnil);
return maybe_signal_continuable_error_2
(Qinvalid_operation, "Can't convert to a Boolean",
- build_ext_string (name_string, Qbinary),
+ build_ext_string (name_string, Qx_resource_name_encoding),
build_ext_string (raw_result, codesys), Qresource,
errb);
}
@@ -1549,13 +1549,14 @@
if (1 != sscanf (raw_result, "%d%c", &i, &c))
return maybe_signal_continuable_error_2
(Qinvalid_operation, "Can't convert to an integer",
- build_ext_string (name_string, Qbinary),
+ build_ext_string (name_string, Qx_resource_name_encoding),
build_ext_string (raw_result, codesys), Qresource,
errb);
else if (EQ (type, Qnatnum) && i < 0)
return maybe_signal_continuable_error_2
(Qinvalid_argument, "Invalid numerical value for resource",
- make_int (i), build_ext_string (name_string, Qbinary),
+ make_int (i), build_ext_string (name_string,
+ Qx_resource_name_encoding),
Qresource, errb);
else
return make_int (i);
@@ -1751,7 +1752,7 @@
const Extbyte *keysym_ext;
CHECK_STRING (keysym);
- LISP_STRING_TO_EXTERNAL (keysym, keysym_ext, Qctext);
+ LISP_STRING_TO_EXTERNAL (keysym, keysym_ext, Qx_keysym_encoding);
return XStringToKeysym (keysym_ext) ? Qt : Qnil;
}
@@ -1766,7 +1767,7 @@
if (!DEVICE_X_P (d))
gui_error ("Not an X device", device);
- return DEVICE_X_DATA (d)->x_keysym_map_hash_table;
+ return DEVICE_X_DATA (d)->key.x_keysym_map_hash_table;
}
DEFUN ("x-keysym-on-keyboard-sans-modifiers-p",
Fx_keysym_on_keyboard_sans_modifiers_p,
@@ -1787,9 +1788,11 @@
if (!DEVICE_X_P (d))
gui_error ("Not an X device", device);
- return (EQ (Qsans_modifiers,
- Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASH_TABLE (d), Qnil)) ?
- Qt : Qnil);
+ return EQ (Qsans_modifiers,
+ Fgethash (keysym,
+ DEVICE_X_DATA (d)->key.x_keysym_map_hash_table,
+ Qnil))
+ ? Qt : Qnil;
}
@@ -1810,8 +1813,10 @@
if (!DEVICE_X_P (d))
gui_error ("Not an X device", device);
- return (NILP (Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASH_TABLE (d), Qnil)) ?
- Qnil : Qt);
+ return !NILP (Fgethash (keysym,
+ DEVICE_X_DATA (d)->key.x_keysym_map_hash_table,
+ Qnil))
+ ? Qt : Qnil;
}
1.18.4.1 +2 -2 XEmacs/xemacs/src/device.h
Index: device.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/device.h,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- device.h 2003/01/12 11:08:11 1.18
+++ device.h 2005/02/15 01:19:52 1.18.4.1
@@ -1,6 +1,6 @@
/* Define device-object for XEmacs.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 2002 Ben Wing
+ Copyright (C) 1995, 2002, 2003 Ben Wing
Copyright (C) 1995 Sun Microsystems
This file is part of XEmacs.
@@ -83,7 +83,7 @@
CONSOLE_LOOP (concons) \
CONSOLE_DEVICE_LOOP (devcons, XCONSOLE (XCAR (concons)))
#define DEVICE_FRAME_LOOP(frmcons, d) \
- LIST_LOOP (frmcons, DEVICE_FRAME_LIST (d))
+ OLD_LIST_LOOP (frmcons, DEVICE_FRAME_LIST (d))
#define CONSOLE_FRAME_LOOP_NO_BREAK(frmcons, devcons, con) \
CONSOLE_DEVICE_LOOP (devcons, con) \
DEVICE_FRAME_LOOP (frmcons, XDEVICE (XCAR (devcons)))
1.32.2.1 +2 -3 XEmacs/xemacs/src/dialog-msw.c
Index: dialog-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dialog-msw.c,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -r1.32 -r1.32.2.1
--- dialog-msw.c 2004/12/06 03:52:03 1.32
+++ dialog-msw.c 2005/02/15 01:19:53 1.32.2.1
@@ -250,9 +250,8 @@
int length;
Extbyte *uni_string;
- TO_EXTERNAL_FORMAT (LISP_STRING, string,
- ALLOCA, (uni_string, length),
- Qmswindows_unicode);
+ LISP_STRING_TO_SIZED_EXTERNAL (string, uni_string, length,
+ Qmswindows_unicode);
Dynarr_add_many (dynarr, uni_string, length);
Dynarr_add (dynarr, '\0');
Dynarr_add (dynarr, '\0');
1.19.2.1 +1 -1 XEmacs/xemacs/src/dired-msw.c
Index: dired-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dired-msw.c,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- dired-msw.c 2005/01/28 02:36:24 1.19
+++ dired-msw.c 2005/02/15 01:19:53 1.19.2.1
@@ -581,7 +581,7 @@
Lisp_Object fmtfile =
mswindows_format_file (Dynarr_atp (files, i), display_size, TRUE);
NGCPRO1 (fmtfile);
- buffer_insert1 (current_buffer, fmtfile);
+ buffer_insert1 (current_buffer, fmtfile, 0);
NUNGCPRO;
}
for (i = 0; i < Dynarr_length (files); ++i)
1.38.4.1 +1 -1 XEmacs/xemacs/src/dired.c
Index: dired.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dired.c,v
retrieving revision 1.38
retrieving revision 1.38.4.1
diff -u -r1.38 -r1.38.4.1
--- dired.c 2004/11/04 23:06:21 1.38
+++ dired.c 2005/02/15 01:19:53 1.38.4.1
@@ -1,6 +1,6 @@
/* Lisp functions for making directory listings.
Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
1.34.4.1 +1 -1 XEmacs/xemacs/src/doc.c
Index: doc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/doc.c,v
retrieving revision 1.34
retrieving revision 1.34.4.1
diff -u -r1.34 -r1.34.4.1
--- doc.c 2004/11/04 23:06:21 1.34
+++ doc.c 2005/02/15 01:19:54 1.34.4.1
@@ -294,7 +294,7 @@
*/
(function, raw))
{
- /* This function can GC */
+ /* This function can GC (KEYMAPP) */
Lisp_Object fun;
Lisp_Object doc;
1.30.2.1 +64 -48 XEmacs/xemacs/src/doprnt.c
Index: doprnt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/doprnt.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- doprnt.c 2005/01/24 23:33:50 1.30
+++ doprnt.c 2005/02/15 01:19:54 1.30.2.1
@@ -2,7 +2,7 @@
Also takes args differently: pass one pointer to an array of strings
in addition to the format string which is separate.
Copyright (C) 1995 Free Software Foundation, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003, 2005 Ben Wing.
Rewritten by mly to use varargs.h.
Rewritten from scratch by Ben Wing (February 1995) for Mule; expanded
to full printf spec.
@@ -53,8 +53,7 @@
static const char * const bigfloat_converters = "FhHkK";
#endif
-typedef struct printf_spec printf_spec;
-struct printf_spec
+typedef struct
{
int argnum; /* which argument does this spec want? This is one-based:
The first argument given is numbered 1, the second
@@ -75,17 +74,16 @@
Bytecount text_before; /* position of the first character of the
block of literal text before this spec */
Bytecount text_before_len; /* length of that text */
-};
+} printf_spec;
-typedef union printf_arg printf_arg;
-union printf_arg
+typedef union
{
long l;
unsigned long ul;
double d;
Ibyte *bp;
Lisp_Object obj;
-};
+} printf_arg;
/* We maintain a list of all the % specs in the specification,
along with the offset and length of the block of literal text
@@ -95,31 +93,43 @@
typedef struct
{
- Dynarr_declare (struct printf_spec);
+ Dynarr_declare (printf_spec);
} printf_spec_dynarr;
typedef struct
{
- Dynarr_declare (union printf_arg);
+ Dynarr_declare (printf_arg);
} printf_arg_dynarr;
-/* Append STRING (of length LEN bytes) to STREAM.
+/* Append text (either from RELOC or NONRELOC, position OFFSET, length LEN)
+ to STREAM.
MINLEN is the minimum field width.
If MINUS_FLAG is set, left-justify the string in its field;
otherwise, right-justify.
If ZERO_FLAG is set, pad with 0's; otherwise pad with spaces.
If MAXLEN is non-negative, the string is first truncated on the
right to that many characters.
+ If the string came from a Lisp string, SOURCE is that Lisp string and
+ SOURCE_POS is the position in the string, and the relevant info will
+ be copied.
- Note that MINLEN and MAXLEN are Charcounts but LEN is a Bytecount. */
+ Note that MINLEN and MAXLEN are Charcounts but OFFSET and LEN
+ are Bytecounts. */
static void
-doprnt_2 (Lisp_Object stream, const Ibyte *string, Bytecount len,
+doprnt_2 (Lisp_Object stream, const Ibyte *nonreloc,
+ Lisp_Object reloc, Bytecount offset, Bytecount len,
Charcount minlen, Charcount maxlen, int minus_flag, int zero_flag)
{
Lstream *lstr = XLSTREAM (stream);
- Charcount cclen = bytecount_to_charcount (string, len);
- int to_add = minlen - cclen;
+ Charcount cclen;
+ int to_add;
+
+ if (!NILP (reloc))
+ nonreloc = XSTRING_DATA (reloc);
+
+ cclen = bytecount_to_charcount (nonreloc + offset, len);
+ to_add = minlen - cclen;
/* Padding at beginning to right-justify ... */
if (!minus_flag)
@@ -127,9 +137,13 @@
Lstream_putc (lstr, zero_flag ? '0' : ' ');
if (0 <= maxlen && maxlen < cclen)
- len = charcount_to_bytecount (string, maxlen);
- Lstream_write (lstr, string, len);
+ len = charcount_to_bytecount (nonreloc + offset, maxlen);
+ if (!NILP (reloc))
+ write_string_to_lstream (lstr, reloc, offset, len);
+ else
+ Lstream_write (lstr, nonreloc + offset, len);
+
/* Padding at end to left-justify ... */
if (minus_flag)
while (to_add-- > 0)
@@ -184,7 +198,7 @@
while (1)
{
- struct printf_spec spec;
+ printf_spec spec;
const Ibyte *text_end;
Ibyte ch;
@@ -256,7 +270,7 @@
if (fmt != fmt_end && *fmt == '*')
{
spec.converter = '*';
- RESOLVE_FLAG_CONFLICTS(spec);
+ RESOLVE_FLAG_CONFLICTS (spec);
Dynarr_add (specs, spec);
xzero (spec);
spec.argnum = ++prev_argnum;
@@ -284,7 +298,7 @@
{
spec.converter = '*';
spec.forwarding_precision = 1;
- RESOLVE_FLAG_CONFLICTS(spec);
+ RESOLVE_FLAG_CONFLICTS (spec);
Dynarr_add (specs, spec);
xzero (spec);
spec.argnum = ++prev_argnum;
@@ -317,11 +331,11 @@
spec.converter = ch;
}
- RESOLVE_FLAG_CONFLICTS(spec);
+ RESOLVE_FLAG_CONFLICTS (spec);
Dynarr_add (specs, spec);
}
- RETURN_NOT_REACHED(specs); /* suppress compiler warning */
+ RETURN_NOT_REACHED (specs); /* suppress compiler warning */
}
static int
@@ -354,7 +368,7 @@
get_doprnt_args (printf_spec_dynarr *specs, va_list vargs)
{
printf_arg_dynarr *args = Dynarr_new (printf_arg);
- union printf_arg arg;
+ printf_arg arg;
REGISTER int i;
int args_needed = get_args_needed (specs);
@@ -363,7 +377,7 @@
{
int j;
char ch;
- struct printf_spec *spec = 0;
+ printf_spec *spec = 0;
for (j = 0; j < Dynarr_length (specs); j++)
{
@@ -425,7 +439,10 @@
stored into STREAM. Arguments are either C-type arguments in
va_list VARGS, or an array of Lisp objects in LARGS of size
NARGS. (Behavior is different in the two cases -- you either get
- standard sprintf() behavior or `format' behavior.) */
+ standard sprintf() behavior or `format' behavior.) If EXTENTS is
+ non-zero, it should be an empty dynarr, and a list of data indicating
+ how to copy extents/text properties into a destination string will be
+ recorded in it. */
static Bytecount
emacs_doprnt_1 (Lisp_Object stream, const Ibyte *format_nonreloc,
@@ -467,14 +484,14 @@
for (i = 0; i < Dynarr_length (specs); i++)
{
- struct printf_spec *spec = Dynarr_atp (specs, i);
+ printf_spec *spec = Dynarr_atp (specs, i);
char ch;
/* Copy the text before */
if (!NILP (format_reloc)) /* refetch in case of GC below */
format_nonreloc = XSTRING_DATA (format_reloc);
- doprnt_2 (stream, format_nonreloc + spec->text_before,
+ doprnt_2 (stream, format_nonreloc, format_reloc, spec->text_before,
spec->text_before_len, 0, -1, 0, 0);
ch = spec->converter;
@@ -484,7 +501,7 @@
if (ch == '%')
{
- doprnt_2 (stream, (Ibyte *) &ch, 1, 0, -1, 0, 0);
+ doprnt_2 (stream, (Ibyte *) &ch, Qnil, 0, 1, 0, -1, 0, 0);
continue;
}
@@ -493,7 +510,7 @@
it to the next spec, to which it will apply. */
if (ch == '*')
{
- struct printf_spec *nextspec = Dynarr_atp (specs, i + 1);
+ printf_spec *nextspec = Dynarr_atp (specs, i + 1);
Lisp_Object obj = largs[spec->argnum - 1];
if (INTP (obj))
@@ -527,8 +544,9 @@
else if (ch == 'S' || ch == 's')
{
- Ibyte *string;
+ Ibyte *string = 0;
Bytecount string_len;
+ Lisp_Object ls = Qnil;
if (!largs)
{
@@ -552,7 +570,6 @@
else
{
Lisp_Object obj = largs[spec->argnum - 1];
- Lisp_Object ls;
if (ch == 'S')
{
@@ -569,18 +586,17 @@
/* convert to string using princ. */
ls = Fprin1_to_string (obj, Qt);
}
- string = XSTRING_DATA (ls);
string_len = XSTRING_LENGTH (ls);
}
- doprnt_2 (stream, string, string_len, spec->minwidth,
+ doprnt_2 (stream, string, ls, 0, string_len, spec->minwidth,
spec->precision, spec->minus_flag, spec->zero_flag);
}
else
{
/* Must be a number. */
- union printf_arg arg;
+ printf_arg arg;
if (!largs)
{
@@ -727,7 +743,7 @@
}
charlen = set_itext_ichar (charbuf, a);
- doprnt_2 (stream, charbuf, charlen, spec->minwidth,
+ doprnt_2 (stream, charbuf, Qnil, 0, charlen, spec->minwidth,
-1, spec->minus_flag, spec->zero_flag);
}
#if defined(HAVE_BIGNUM) || defined(HAVE_RATIO)
@@ -741,7 +757,7 @@
ch == 'n' ? 10 :
(ch == 'p' ? 8 : 16));
doprnt_2 (stream, text_to_print,
- strlen ((const char *) text_to_print),
+ qxestrlen (text_to_print),
spec->minwidth, -1, spec->minus_flag,
spec->zero_flag);
xfree (text_to_print, Ibyte *);
@@ -755,7 +771,7 @@
ch == 'n' ? 10 :
(ch == 'p' ? 8 : 16));
doprnt_2 (stream, text_to_print,
- strlen ((const char *) text_to_print),
+ qxestrlen (text_to_print),
spec->minwidth, -1, spec->minus_flag,
spec->zero_flag);
xfree (text_to_print, Ibyte *);
@@ -769,7 +785,7 @@
Ibyte *text_to_print =
(Ibyte *) bigfloat_to_string (XBIGFLOAT_DATA (arg.obj), 10);
doprnt_2 (stream, text_to_print,
- strlen ((const char *) text_to_print),
+ qxestrlen (text_to_print),
spec->minwidth, -1, spec->minus_flag, spec->zero_flag);
xfree (text_to_print, Ibyte *);
}
@@ -778,14 +794,14 @@
{
/* ASCII Decimal representation uses 2.4 times as many
bits as machine binary. */
- char *text_to_print =
- alloca_array (char, 32 +
+ Ibyte *text_to_print =
+ alloca_array (Ibyte, 32 +
max (spec->minwidth,
(int) max (sizeof (double),
sizeof (long)) * 3 +
max (spec->precision, 0)));
- char constructed_spec[100];
- char *p = constructed_spec;
+ CIbyte constructed_spec[100];
+ Ibyte *p = (Ibyte *) constructed_spec;
/* Mostly reconstruct the spec and use sprintf() to
format the string. */
@@ -800,20 +816,20 @@
if (spec->minwidth >= 0)
{
long_to_string (p, spec->minwidth);
- p += strlen (p);
+ p += qxestrlen (p);
}
if (spec->precision >= 0)
{
*p++ = '.';
long_to_string (p, spec->precision);
- p += strlen (p);
+ p += qxestrlen (p);
}
if (strchr (double_converters, ch))
{
*p++ = ch;
*p++ = '\0';
- sprintf (text_to_print, constructed_spec, arg.d);
+ qxesprintf (text_to_print, constructed_spec, arg.d);
}
else
{
@@ -822,13 +838,13 @@
*p++ = '\0';
if (strchr (unsigned_int_converters, ch))
- sprintf (text_to_print, constructed_spec, arg.ul);
+ qxesprintf (text_to_print, constructed_spec, arg.ul);
else
- sprintf (text_to_print, constructed_spec, arg.l);
+ qxesprintf (text_to_print, constructed_spec, arg.l);
}
- doprnt_2 (stream, (Ibyte *) text_to_print,
- strlen (text_to_print), 0, -1, 0, 0);
+ doprnt_2 (stream, text_to_print, Qnil, 0,
+ qxestrlen (text_to_print), 0, -1, 0, 0);
}
}
}
1.8.4.1 +1 -1 XEmacs/xemacs/src/dragdrop.c
Index: dragdrop.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/dragdrop.c,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -u -r1.8 -r1.8.4.1
--- dragdrop.c 2004/11/04 23:06:21 1.8
+++ dragdrop.c 2005/02/15 01:19:55 1.8.4.1
@@ -22,7 +22,7 @@
/* Synched up with: Not in FSF. */
-/* This file should be Mule-ized. */
+/* This file is Mule-ized. */
/* A short introduction to the new Drag'n'Drop Model:
1.51.2.1 +66 -31 XEmacs/xemacs/src/editfns.c
Index: editfns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/editfns.c,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -u -r1.51 -r1.51.2.1
--- editfns.c 2004/12/06 03:52:03 1.51
+++ editfns.c 2005/02/15 01:19:56 1.51.2.1
@@ -1,7 +1,7 @@
/* Lisp functions pertaining to editing.
Copyright (C) 1985-1987, 1989, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
- Copyright (C) 1996, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -1438,7 +1438,7 @@
void
-buffer_insert1 (struct buffer *buf, Lisp_Object arg)
+buffer_insert1 (struct buffer *buf, Lisp_Object arg, int flags)
{
/* This function can GC */
struct gcpro gcpro1;
@@ -1446,11 +1446,11 @@
retry:
if (CHAR_OR_CHAR_INTP (arg))
{
- buffer_insert_emacs_char (buf, XCHAR_OR_CHAR_INT (arg));
+ buffer_insert_emacs_char_1 (buf, -1, XCHAR_OR_CHAR_INT (arg), flags);
}
else if (STRINGP (arg))
{
- buffer_insert_lisp_string (buf, arg);
+ buffer_insert_lisp_string_1 (buf, -1, arg, flags);
}
else
{
@@ -1460,7 +1460,6 @@
UNGCPRO;
}
-
/* Callers passing one argument to Finsert need not gcpro the
argument "array", since the only element of the array will
not be used after calling insert_emacs_char or insert_lisp_string,
@@ -1478,48 +1477,82 @@
REGISTER int argnum;
for (argnum = 0; argnum < nargs; argnum++)
- {
- buffer_insert1 (current_buffer, args[argnum]);
- }
+ buffer_insert1 (current_buffer, args[argnum], 0);
return Qnil;
}
+DEFUN ("insert-and-inherit", Finsert_and_inherit, 0, MANY, 0, /*
+Insert the arguments at point, inheriting adjoining text properties.
+Arguments may be strings or markers. Point moves forward so that it ends up
+after the inserted text. Any other markers at the point of insertion remain
+before the text. If a string has non-null string-extent-data, new extents
+will be created.
+
+Note that "inherit" here refers strictly to text properties as set using
+the text property interface (e.g. `put-text-property'), not to properties
+set on extents directly using the extent interface. The inheritance of
+extent properties is controlled by the `start-open' and `end-closed'
+properties of the extent, and works irrespective of whether `insert' or
+`insert-and-inherit' is called. However, text properties set using the
+text property interface are not inherited at all when `insert' is used, and
+are inherited according to the `front-sticky' and `rear-nonsticky'
+properties when `insert-and-inherit' is used. See `set-extent-property'
+for a description of these properties.
+*/
+ (int nargs, Lisp_Object *args))
+{
+ /* This function can GC */
+ REGISTER int argnum;
+
+ for (argnum = 0; argnum < nargs; argnum++)
+ buffer_insert1 (current_buffer, args[argnum], INSDEL_INHERIT);
+
+ return Qnil;
+}
+
DEFUN ("insert-before-markers", Finsert_before_markers, 0, MANY, 0, /*
Insert strings or characters at point, relocating markers after the text.
Point moves forward so that it ends up after the inserted text.
Any other markers at the point of insertion also end up after the text.
+If a string has non-null string-extent-data, new extents will be created.
*/
(int nargs, Lisp_Object *args))
{
/* This function can GC */
REGISTER int argnum;
- REGISTER Lisp_Object tem;
for (argnum = 0; argnum < nargs; argnum++)
- {
- tem = args[argnum];
- retry:
- if (CHAR_OR_CHAR_INTP (tem))
- {
- buffer_insert_emacs_char_1 (current_buffer, -1,
- XCHAR_OR_CHAR_INT (tem),
- INSDEL_BEFORE_MARKERS);
- }
- else if (STRINGP (tem))
- {
- buffer_insert_lisp_string_1 (current_buffer, -1, tem,
- INSDEL_BEFORE_MARKERS);
- }
- else
- {
- tem = wrong_type_argument (Qchar_or_string_p, tem);
- goto retry;
- }
- }
+ buffer_insert1 (current_buffer, args[argnum], INSDEL_BEFORE_MARKERS);
+
return Qnil;
}
+DEFUN ("insert-before-markers-and-inherit",
Finsert_before_markers_and_inherit,
+ 0, MANY, 0, /*
+Insert arguments at point, relocating markers and inheriting text properties.
+Arguments may be strings or markers. Point moves forward so that it ends up
+after the inserted text. Any other markers at the point of insertion also
+end up after the text. If a string has non-null string-extent-data, new
+extents will be created.
+
+Note that "inherit" here refers strictly to text properties as set using
+the text property interface (e.g. `put-text-property'), not to properties
+set on extents directly using the extent interface. See `insert-and-inherit'
+for more information.
+*/
+ (int nargs, Lisp_Object *args))
+{
+ /* This function can GC */
+ REGISTER int argnum;
+
+ for (argnum = 0; argnum < nargs; argnum++)
+ buffer_insert1 (current_buffer, args[argnum],
+ INSDEL_BEFORE_MARKERS | INSDEL_INHERIT);
+
+ return Qnil;
+}
+
DEFUN ("insert-string", Finsert_string, 1, 2, 0, /*
Insert STRING into BUFFER at BUFFER's point.
Point moves forward so that it ends up after the inserted text.
@@ -1553,7 +1586,7 @@
The optional fourth arg BUFFER specifies the buffer to insert the
text into. If BUFFER is nil, the current buffer is assumed.
*/
- (character, count, UNUSED (ignored), buffer))
+ (character, count, UNUSED (inherit), buffer))
{
/* This function can GC */
REGISTER Ibyte *string;
@@ -1636,7 +1669,6 @@
*/
(start, end, buffer))
{
- /* This function can GC */
Charbpos begv, zv;
struct buffer *b = decode_buffer (buffer, 1);
@@ -2331,6 +2363,7 @@
*/
(start1, end1, start2, end2, UNUSED (leave_markers)))
{
+ /* This function can GC */
Charbpos startr1, endr1, startr2, endr2;
Charcount len1, len2;
Lisp_Object string1, string2;
@@ -2408,8 +2441,10 @@
DEFSUBR (Fchar_after);
DEFSUBR (Fchar_before);
DEFSUBR (Finsert);
+ DEFSUBR (Finsert_and_inherit);
DEFSUBR (Finsert_string);
DEFSUBR (Finsert_before_markers);
+ DEFSUBR (Finsert_before_markers_and_inherit);
DEFSUBR (Finsert_char);
DEFSUBR (Ftemp_directory);
1.9.2.1 +493 -341 XEmacs/xemacs/src/emacs-marshals.c
Index: emacs-marshals.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs-marshals.c,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -r1.9 -r1.9.2.1
--- emacs-marshals.c 2005/01/26 10:22:25 1.9
+++ emacs-marshals.c 2005/02/15 01:19:57 1.9.2.1
@@ -4,91 +4,100 @@
#define GTK_VALUE_LIST(x) GTK_VALUE_POINTER(x)
+typedef gboolean (*__BOOL__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_BOOL__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_INT_fn rfunc = (__BOOL__OBJECT_INT_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef gboolean (*__BOOL__OBJECT_OBJECT_OBJECT_fn)(GtkObject *, GtkObject *, GtkObject
*);
static void
emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_OBJECT_OBJECT_fn rfunc = (__BOOL__OBJECT_OBJECT_OBJECT_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]),
GTK_VALUE_OBJECT (args[2]));
}
+typedef gboolean (*__BOOL__OBJECT_OBJECT_fn)(GtkObject *, GtkObject *);
static void
emacs_gtk_marshal_BOOL__OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_OBJECT_fn rfunc = (__BOOL__OBJECT_OBJECT_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]));
}
+typedef gboolean (*__BOOL__OBJECT_POINTER_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_BOOL__OBJECT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_POINTER_fn rfunc = (__BOOL__OBJECT_POINTER_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef gboolean (*__BOOL__OBJECT_STRING_fn)(GtkObject *, gchar *);
static void
emacs_gtk_marshal_BOOL__OBJECT_STRING (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_STRING_fn rfunc = (__BOOL__OBJECT_STRING_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef gboolean (*__BOOL__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_BOOL__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__OBJECT_fn rfunc = (__BOOL__OBJECT_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef gboolean (*__BOOL__POINTER_BOOL_fn)(void *, gboolean);
static void
emacs_gtk_marshal_BOOL__POINTER_BOOL (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__POINTER_BOOL_fn rfunc = (__BOOL__POINTER_BOOL_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_BOOL (args[1]));
}
+typedef gboolean (*__BOOL__POINTER_fn)(void *);
static void
emacs_gtk_marshal_BOOL__POINTER (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL__POINTER_fn rfunc = (__BOOL__POINTER_fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[1]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]));
}
+typedef gboolean (*__BOOL___fn)();
static void
emacs_gtk_marshal_BOOL__NONE (ffi_actual_function func, GtkArg *args)
{
- __BOOL_fn rfunc = (__BOOL_fn) func;
+ __BOOL___fn rfunc = (__BOOL___fn) func;
gboolean *return_val;
return_val = GTK_RETLOC_BOOL (args[0]);
@@ -105,276 +114,305 @@
return_val = GTK_RETLOC_FLOAT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_FLOAT (args[1]));
}
+typedef gfloat (*__FLOAT__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_FLOAT__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __FLOAT_fn rfunc = (__FLOAT_fn) func;
+ __FLOAT__OBJECT_fn rfunc = (__FLOAT__OBJECT_fn) func;
gfloat *return_val;
return_val = GTK_RETLOC_FLOAT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef gint (*__INT__BOOL_fn)(gboolean);
static void
emacs_gtk_marshal_INT__BOOL (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__BOOL_fn rfunc = (__INT__BOOL_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_BOOL (args[0]));
}
+typedef gint (*__INT__OBJECT_ARRAY_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_INT__OBJECT_ARRAY (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_ARRAY_fn rfunc = (__INT__OBJECT_ARRAY_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_ARRAY (args[1]));
}
+typedef gint (*__INT__OBJECT_INT_ARRAY_fn)(GtkObject *, gint, void *);
static void
emacs_gtk_marshal_INT__OBJECT_INT_ARRAY (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_INT_ARRAY_fn rfunc = (__INT__OBJECT_INT_ARRAY_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_ARRAY (args[2]));
}
+typedef gint (*__INT__OBJECT_INT_INT_fn)(GtkObject *, gint, gint);
static void
emacs_gtk_marshal_INT__OBJECT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_INT_INT_fn rfunc = (__INT__OBJECT_INT_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef gint (*__INT__OBJECT_INT_STRING_fn)(GtkObject *, gint, gchar *);
static void
emacs_gtk_marshal_INT__OBJECT_INT_STRING (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_INT_STRING_fn rfunc = (__INT__OBJECT_INT_STRING_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_STRING (args[2]));
}
+typedef gint (*__INT__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_INT__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_INT_fn rfunc = (__INT__OBJECT_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef gint (*__INT__OBJECT_OBJECT_fn)(GtkObject *, GtkObject *);
static void
emacs_gtk_marshal_INT__OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_OBJECT_fn rfunc = (__INT__OBJECT_OBJECT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]));
}
+typedef gint (*__INT__OBJECT_POINTER_INT_INT_fn)(GtkObject *, void *, gint, gint);
static void
emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_POINTER_INT_INT_fn rfunc = (__INT__OBJECT_POINTER_INT_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[4]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]),
GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3]));
}
+typedef gint (*__INT__OBJECT_POINTER_INT_fn)(GtkObject *, void *, gint);
static void
emacs_gtk_marshal_INT__OBJECT_POINTER_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_POINTER_INT_fn rfunc = (__INT__OBJECT_POINTER_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef gint (*__INT__OBJECT_POINTER_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_INT__OBJECT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_POINTER_fn rfunc = (__INT__OBJECT_POINTER_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef gint (*__INT__OBJECT_STRING_fn)(GtkObject *, gchar *);
static void
emacs_gtk_marshal_INT__OBJECT_STRING (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_STRING_fn rfunc = (__INT__OBJECT_STRING_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef gint (*__INT__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_INT__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__OBJECT_fn rfunc = (__INT__OBJECT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef gint (*__INT__POINTER_INT_fn)(void *, gint);
static void
emacs_gtk_marshal_INT__POINTER_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__POINTER_INT_fn rfunc = (__INT__POINTER_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef gint (*__INT__POINTER_STRING_INT_fn)(void *, gchar *, gint);
static void
emacs_gtk_marshal_INT__POINTER_STRING_INT (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__POINTER_STRING_INT_fn rfunc = (__INT__POINTER_STRING_INT_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef gint (*__INT__POINTER_STRING_STRING_fn)(void *, gchar *, gchar *);
static void
emacs_gtk_marshal_INT__POINTER_STRING_STRING (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__POINTER_STRING_STRING_fn rfunc = (__INT__POINTER_STRING_STRING_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_STRING (args[2]));
}
+typedef gint (*__INT__POINTER_STRING_fn)(void *, gchar *);
static void
emacs_gtk_marshal_INT__POINTER_STRING (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__POINTER_STRING_fn rfunc = (__INT__POINTER_STRING_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef gint (*__INT__POINTER_fn)(void *);
static void
emacs_gtk_marshal_INT__POINTER (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__POINTER_fn rfunc = (__INT__POINTER_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]));
}
+typedef gint (*__INT__STRING_STRING_INT_ARRAY_fn)(gchar *, gchar *, gint, void *);
static void
emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY (ffi_actual_function func, GtkArg
*args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__STRING_STRING_INT_ARRAY_fn rfunc = (__INT__STRING_STRING_INT_ARRAY_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[4]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_INT (args[2]), GTK_VALUE_ARRAY (args[3]));
}
+typedef gint (*__INT__STRING_fn)(gchar *);
static void
emacs_gtk_marshal_INT__STRING (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT__STRING_fn rfunc = (__INT__STRING_fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]));
}
+typedef gint (*__INT___fn)();
static void
emacs_gtk_marshal_INT__NONE (ffi_actual_function func, GtkArg *args)
{
- __INT_fn rfunc = (__INT_fn) func;
+ __INT___fn rfunc = (__INT___fn) func;
gint *return_val;
return_val = GTK_RETLOC_INT (args[0]);
*return_val = (*rfunc) ();
}
+typedef void * (*__LIST__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_LIST__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __LIST_fn rfunc = (__LIST_fn) func;
+ __LIST__OBJECT_fn rfunc = (__LIST__OBJECT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef void * (*__LIST___fn)();
static void
emacs_gtk_marshal_LIST__NONE (ffi_actual_function func, GtkArg *args)
{
- __LIST_fn rfunc = (__LIST_fn) func;
+ __LIST___fn rfunc = (__LIST___fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[0]);
*return_val = (*rfunc) ();
}
+typedef void (*__NONE__BOOL_fn)(gboolean);
static void
emacs_gtk_marshal_NONE__BOOL (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__BOOL_fn rfunc = (__NONE__BOOL_fn) func;
(*rfunc) (GTK_VALUE_BOOL (args[0]));
}
+typedef void (*__NONE__INT_INT_INT_INT_fn)(gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__INT_INT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__INT_INT_INT_INT_fn rfunc = (__NONE__INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT (args[2]),
GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__INT_INT_fn)(gint, gint);
static void
emacs_gtk_marshal_NONE__INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__INT_INT_fn rfunc = (__NONE__INT_INT_fn) func;
(*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void (*__NONE__INT_fn)(gint);
static void
emacs_gtk_marshal_NONE__INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__INT_fn rfunc = (__NONE__INT_fn) func;
(*rfunc) (GTK_VALUE_INT (args[0]));
}
+typedef void (*__NONE__OBJECT_BOOL_INT_fn)(GtkObject *, gboolean, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_BOOL_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_BOOL_INT_fn rfunc = (__NONE__OBJECT_BOOL_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_BOOL (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__OBJECT_BOOL_fn)(GtkObject *, gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_BOOL (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_BOOL_fn rfunc = (__NONE__OBJECT_BOOL_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_BOOL (args[1]));
}
typedef void (*__NONE__OBJECT_FLOAT_FLOAT_FLOAT_BOOL_fn)(GtkObject *, gfloat, gfloat,
gfloat, gboolean);
@@ -417,11 +455,12 @@
__NONE__OBJECT_FLOAT_fn rfunc = (__NONE__OBJECT_FLOAT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_FLOAT (args[1]));
}
+typedef void (*__NONE__OBJECT_INT_BOOL_fn)(GtkObject *, gint, gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_BOOL (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_BOOL_fn rfunc = (__NONE__OBJECT_INT_BOOL_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_BOOL
(args[2]));
}
typedef void (*__NONE__OBJECT_INT_FLOAT_BOOL_fn)(GtkObject *, gint, gfloat, gboolean);
@@ -440,18 +479,20 @@
__NONE__OBJECT_INT_FLOAT_fn rfunc = (__NONE__OBJECT_INT_FLOAT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_FLOAT
(args[2]));
}
+typedef void (*__NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_fn)(GtkObject
*, gint, gint, void *, void *, void *, void *, void *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_fn rfunc =
(__NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_ARRAY (args[3]), GTK_VALUE_ARRAY (args[4]), GTK_VALUE_ARRAY
(args[5]), GTK_VALUE_ARRAY (args[6]), GTK_VALUE_ARRAY (args[7]), GTK_VALUE_ARRAY
(args[8]));
}
+typedef void (*__NONE__OBJECT_INT_INT_ARRAY_fn)(GtkObject *, gint, gint, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_ARRAY_fn rfunc = (__NONE__OBJECT_INT_INT_ARRAY_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_ARRAY (args[3]));
}
typedef void (*__NONE__OBJECT_INT_INT_FLOAT_FLOAT_fn)(GtkObject *, gint, gint, gfloat,
gfloat);
@@ -462,116 +503,132 @@
__NONE__OBJECT_INT_INT_FLOAT_FLOAT_fn rfunc = (__NONE__OBJECT_INT_INT_FLOAT_FLOAT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_FLOAT (args[3]), GTK_VALUE_FLOAT (args[4]));
}
+typedef void (*__NONE__OBJECT_INT_INT_INT_INT_fn)(GtkObject *, gint, gint, gint,
gint);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_INT_INT_fn rfunc = (__NONE__OBJECT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_INT_INT_INT_fn)(GtkObject *, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_INT_fn rfunc = (__NONE__OBJECT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__OBJECT_INT_INT_POINTER_POINTER_fn)(GtkObject *, gint, gint, void
*, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER_POINTER (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_POINTER_POINTER_fn rfunc =
(__NONE__OBJECT_INT_INT_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_POINTER (args[3]), GTK_VALUE_POINTER (args[4]));
}
+typedef void (*__NONE__OBJECT_INT_INT_POINTER_fn)(GtkObject *, gint, gint, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_POINTER_fn rfunc = (__NONE__OBJECT_INT_INT_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_POINTER (args[3]));
}
+typedef void (*__NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER_fn)(GtkObject *, gint,
gint, gchar *, gint, void *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER (ffi_actual_function
func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER_fn rfunc =
(__NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_STRING (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_POINTER
(args[5]), GTK_VALUE_POINTER (args[6]));
}
+typedef void (*__NONE__OBJECT_INT_INT_STRING_fn)(GtkObject *, gint, gint, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_STRING_fn rfunc = (__NONE__OBJECT_INT_INT_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_STRING (args[3]));
}
+typedef void (*__NONE__OBJECT_INT_INT_fn)(GtkObject *, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_INT_fn rfunc = (__NONE__OBJECT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__OBJECT_INT_OBJECT_fn)(GtkObject *, gint, GtkObject *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_OBJECT_fn rfunc = (__NONE__OBJECT_INT_OBJECT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_OBJECT
(args[2]));
}
+typedef void (*__NONE__OBJECT_INT_POINTER_fn)(GtkObject *, gint, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_POINTER_fn rfunc = (__NONE__OBJECT_INT_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_POINTER
(args[2]));
}
+typedef void (*__NONE__OBJECT_INT_STRING_fn)(GtkObject *, gint, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_INT_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_STRING_fn rfunc = (__NONE__OBJECT_INT_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_STRING
(args[2]));
}
+typedef void (*__NONE__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_INT_fn rfunc = (__NONE__OBJECT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void (*__NONE__OBJECT_LIST_INT_fn)(GtkObject *, void *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_LIST_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_LIST_INT_fn rfunc = (__NONE__OBJECT_LIST_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_LIST (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__OBJECT_LIST_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_LIST (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_LIST_fn rfunc = (__NONE__OBJECT_LIST_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_LIST (args[1]));
}
+typedef void (*__NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT_fn)(GtkObject *, GtkObject *,
gboolean, gboolean, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_BOOL
(args[2]), GTK_VALUE_BOOL (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]));
}
+typedef void (*__NONE__OBJECT_OBJECT_BOOL_BOOL_INT_fn)(GtkObject *, GtkObject *,
gboolean, gboolean, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_BOOL_BOOL_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_BOOL_BOOL_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_BOOL
(args[2]), GTK_VALUE_BOOL (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_OBJECT_BOOL_BOOL_fn)(GtkObject *, GtkObject *, gboolean,
gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_BOOL_BOOL_fn rfunc = (__NONE__OBJECT_OBJECT_BOOL_BOOL_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_BOOL
(args[2]), GTK_VALUE_BOOL (args[3]));
}
typedef void (*__NONE__OBJECT_OBJECT_FLOAT_INT_fn)(GtkObject *, GtkObject *, gfloat,
gint);
@@ -582,123 +639,140 @@
__NONE__OBJECT_OBJECT_FLOAT_INT_fn rfunc = (__NONE__OBJECT_OBJECT_FLOAT_INT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_FLOAT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT_fn)(GtkObject *,
GtkObject *, gint, gint, gint, gint, gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]),
GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]), GTK_VALUE_INT
(args[9]));
}
+typedef void (*__NONE__OBJECT_OBJECT_INT_INT_INT_INT_fn)(GtkObject *, GtkObject *,
gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_INT_INT_INT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]));
}
+typedef void (*__NONE__OBJECT_OBJECT_INT_INT_INT_fn)(GtkObject *, GtkObject *, gint,
gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_INT_INT_INT_fn rfunc = (__NONE__OBJECT_OBJECT_INT_INT_INT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_OBJECT_INT_INT_fn)(GtkObject *, GtkObject *, gint,
gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_INT_INT_fn rfunc = (__NONE__OBJECT_OBJECT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__OBJECT_OBJECT_INT_fn)(GtkObject *, GtkObject *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_INT_fn rfunc = (__NONE__OBJECT_OBJECT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__OBJECT_OBJECT_OBJECT_INT_fn)(GtkObject *, GtkObject *, GtkObject
*, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_OBJECT_INT_fn rfunc = (__NONE__OBJECT_OBJECT_OBJECT_INT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_OBJECT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT_fn)(GtkObject *, GtkObject *,
GtkObject *, GtkObject *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_OBJECT
(args[2]), GTK_VALUE_OBJECT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_OBJECT_OBJECT_OBJECT_fn)(GtkObject *, GtkObject *,
GtkObject *, GtkObject *);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_OBJECT_OBJECT_fn rfunc =
(__NONE__OBJECT_OBJECT_OBJECT_OBJECT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_OBJECT
(args[2]), GTK_VALUE_OBJECT (args[3]));
}
+typedef void (*__NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT_fn)(GtkObject *,
GtkObject *, GtkObject *, void *, void *, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_OBJECT
(args[2]), GTK_VALUE_POINTER (args[3]), GTK_VALUE_POINTER (args[4]), GTK_VALUE_INT
(args[5]), GTK_VALUE_INT (args[6]));
}
+typedef void (*__NONE__OBJECT_OBJECT_OBJECT_fn)(GtkObject *, GtkObject *, GtkObject
*);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_OBJECT_fn rfunc = (__NONE__OBJECT_OBJECT_OBJECT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_OBJECT
(args[2]));
}
+typedef void (*__NONE__OBJECT_OBJECT_POINTER_fn)(GtkObject *, GtkObject *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_POINTER_fn rfunc = (__NONE__OBJECT_OBJECT_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_POINTER
(args[2]));
}
+typedef void (*__NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT_fn)(GtkObject *,
GtkObject *, gchar *, gint, gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT (ffi_actual_function
func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_STRING
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]),
GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]));
}
+typedef void (*__NONE__OBJECT_OBJECT_STRING_STRING_INT_fn)(GtkObject *, GtkObject *,
gchar *, gchar *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_STRING_STRING_INT_fn rfunc =
(__NONE__OBJECT_OBJECT_STRING_STRING_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_STRING
(args[2]), GTK_VALUE_STRING (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_OBJECT_STRING_STRING_fn)(GtkObject *, GtkObject *, gchar
*, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_STRING_STRING_fn rfunc =
(__NONE__OBJECT_OBJECT_STRING_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_STRING
(args[2]), GTK_VALUE_STRING (args[3]));
}
+typedef void (*__NONE__OBJECT_OBJECT_STRING_fn)(GtkObject *, GtkObject *, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_STRING_fn rfunc = (__NONE__OBJECT_OBJECT_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]), GTK_VALUE_STRING
(args[2]));
}
+typedef void (*__NONE__OBJECT_OBJECT_fn)(GtkObject *, GtkObject *);
static void
emacs_gtk_marshal_NONE__OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_OBJECT_fn rfunc = (__NONE__OBJECT_OBJECT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]));
}
+typedef void (*__NONE__OBJECT_POINTER_BOOL_fn)(GtkObject *, void *, gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_BOOL (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_BOOL_fn rfunc = (__NONE__OBJECT_POINTER_BOOL_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_BOOL
(args[2]));
}
typedef void (*__NONE__OBJECT_POINTER_INT_FLOAT_FLOAT_fn)(GtkObject *, void *, gint,
gfloat, gfloat);
@@ -709,259 +783,295 @@
__NONE__OBJECT_POINTER_INT_FLOAT_FLOAT_fn rfunc =
(__NONE__OBJECT_POINTER_INT_FLOAT_FLOAT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_FLOAT (args[3]), GTK_VALUE_FLOAT (args[4]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_INT_INT_fn)(GtkObject *, void *, gint, gint,
gint);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_INT_INT_fn rfunc = (__NONE__OBJECT_POINTER_INT_INT_INT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_INT_fn)(GtkObject *, void *, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_INT_fn rfunc = (__NONE__OBJECT_POINTER_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_POINTER_POINTER_fn)(GtkObject *, void *,
gint, void *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER_POINTER (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_POINTER_POINTER_fn rfunc =
(__NONE__OBJECT_POINTER_INT_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_POINTER (args[3]), GTK_VALUE_POINTER (args[4]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_POINTER_fn)(GtkObject *, void *, gint, void
*);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_POINTER_fn rfunc = (__NONE__OBJECT_POINTER_INT_POINTER_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_POINTER (args[3]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER_fn)(GtkObject *,
void *, gint, gchar *, gint, void *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER_fn rfunc =
(__NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_STRING (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_POINTER
(args[5]), GTK_VALUE_POINTER (args[6]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_STRING_fn)(GtkObject *, void *, gint, gchar
*);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_STRING_fn rfunc = (__NONE__OBJECT_POINTER_INT_STRING_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_STRING (args[3]));
}
+typedef void (*__NONE__OBJECT_POINTER_INT_fn)(GtkObject *, void *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_INT_fn rfunc = (__NONE__OBJECT_POINTER_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT_fn)(GtkObject *,
void *, void *, gint, gint, gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT_fn rfunc =
(__NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]),
GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]));
}
+typedef void (*__NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT_fn)(GtkObject *, void
*, void *, void *, gchar *, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT (ffi_actual_function
func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT_fn rfunc =
(__NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_POINTER (args[3]), GTK_VALUE_STRING (args[4]), GTK_VALUE_INT
(args[5]));
}
+typedef void (*__NONE__OBJECT_POINTER_POINTER_POINTER_fn)(GtkObject *, void *, void *,
void *);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_POINTER_POINTER_fn rfunc =
(__NONE__OBJECT_POINTER_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_POINTER (args[3]));
}
+typedef void (*__NONE__OBJECT_POINTER_POINTER_fn)(GtkObject *, void *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_POINTER_fn rfunc = (__NONE__OBJECT_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]));
}
+typedef void
(*__NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn)(GtkObject
*, void *, gchar *, gint, void *, void *, void *, void *, gboolean, gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn rfunc
= (__NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_STRING
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_POINTER (args[4]), GTK_VALUE_POINTER
(args[5]), GTK_VALUE_POINTER (args[6]), GTK_VALUE_POINTER (args[7]), GTK_VALUE_BOOL
(args[8]), GTK_VALUE_BOOL (args[9]));
}
+typedef void (*__NONE__OBJECT_POINTER_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_NONE__OBJECT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_POINTER_fn rfunc = (__NONE__OBJECT_POINTER_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef void (*__NONE__OBJECT_STRING_BOOL_fn)(GtkObject *, gchar *, gboolean);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING_BOOL (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_BOOL_fn rfunc = (__NONE__OBJECT_STRING_BOOL_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_BOOL
(args[2]));
}
+typedef void (*__NONE__OBJECT_STRING_INT_INT_INT_fn)(GtkObject *, gchar *, gint, gint,
gint);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING_INT_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_INT_INT_INT_fn rfunc = (__NONE__OBJECT_STRING_INT_INT_INT_fn)
func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_STRING_POINTER_INT_INT_INT_fn)(GtkObject *, gchar *, void
*, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_POINTER_INT_INT_INT_fn rfunc =
(__NONE__OBJECT_STRING_POINTER_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]));
}
+typedef void (*__NONE__OBJECT_STRING_POINTER_INT_INT_fn)(GtkObject *, gchar *, void *,
gint, gint);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_POINTER_INT_INT_fn rfunc =
(__NONE__OBJECT_STRING_POINTER_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]));
}
+typedef void (*__NONE__OBJECT_STRING_STRING_fn)(GtkObject *, gchar *, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_STRING_fn rfunc = (__NONE__OBJECT_STRING_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_STRING
(args[2]));
}
+typedef void (*__NONE__OBJECT_STRING_fn)(GtkObject *, gchar *);
static void
emacs_gtk_marshal_NONE__OBJECT_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_STRING_fn rfunc = (__NONE__OBJECT_STRING_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef void (*__NONE__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_NONE__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__OBJECT_fn rfunc = (__NONE__OBJECT_fn) func;
(*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef void (*__NONE__POINTER_INT_INT_fn)(void *, gint, gint);
static void
emacs_gtk_marshal_NONE__POINTER_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_INT_INT_fn rfunc = (__NONE__POINTER_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]), GTK_VALUE_INT
(args[2]));
}
+typedef void (*__NONE__POINTER_INT_fn)(void *, gint);
static void
emacs_gtk_marshal_NONE__POINTER_INT (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_INT_fn rfunc = (__NONE__POINTER_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void (*__NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT_fn)(void *, void *,
gboolean, gint, gint, gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT
(ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT_fn rfunc =
(__NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_BOOL
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]),
GTK_VALUE_INT (args[6]), GTK_VALUE_INT (args[7]), GTK_VALUE_INT (args[8]));
}
+typedef void (*__NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_fn)(void *, void *,
gboolean, gint, gint, gint, gint);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_fn rfunc =
(__NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_BOOL
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]),
GTK_VALUE_INT (args[6]));
}
+typedef void (*__NONE__POINTER_POINTER_INT_INT_INT_INT_fn)(void *, void *, gint, gint,
gint, gint);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_INT_INT_INT_INT_fn rfunc =
(__NONE__POINTER_POINTER_INT_INT_INT_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT (args[5]));
}
+typedef void (*__NONE__POINTER_POINTER_INT_INT_fn)(void *, void *, gint, gint);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_INT_INT_fn rfunc = (__NONE__POINTER_POINTER_INT_INT_fn)
func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_INT
(args[2]), GTK_VALUE_INT (args[3]));
}
+typedef void (*__NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT_fn)(void *, void *,
void *, gint, gint, gchar *, gint);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT (ffi_actual_function
func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT_fn rfunc =
(__NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_STRING (args[5]),
GTK_VALUE_INT (args[6]));
}
+typedef void (*__NONE__POINTER_POINTER_POINTER_INT_INT_STRING_fn)(void *, void *, void
*, gint, gint, gchar *);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING (ffi_actual_function
func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_POINTER_INT_INT_STRING_fn rfunc =
(__NONE__POINTER_POINTER_POINTER_INT_INT_STRING_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_STRING (args[5]));
}
+typedef void (*__NONE__POINTER_POINTER_POINTER_POINTER_fn)(void *, void *, void *, void
*);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER (ffi_actual_function func,
GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_POINTER_POINTER_fn rfunc =
(__NONE__POINTER_POINTER_POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), GTK_VALUE_POINTER
(args[2]), GTK_VALUE_POINTER (args[3]));
}
+typedef void (*__NONE__POINTER_POINTER_fn)(void *, void *);
static void
emacs_gtk_marshal_NONE__POINTER_POINTER (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_POINTER_fn rfunc = (__NONE__POINTER_POINTER_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef void (*__NONE__POINTER_STRING_STRING_fn)(void *, gchar *, gchar *);
static void
emacs_gtk_marshal_NONE__POINTER_STRING_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_STRING_STRING_fn rfunc = (__NONE__POINTER_STRING_STRING_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]), GTK_VALUE_STRING
(args[2]));
}
+typedef void (*__NONE__POINTER_STRING_fn)(void *, gchar *);
static void
emacs_gtk_marshal_NONE__POINTER_STRING (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_STRING_fn rfunc = (__NONE__POINTER_STRING_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef void (*__NONE__POINTER_fn)(void *);
static void
emacs_gtk_marshal_NONE__POINTER (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE__POINTER_fn rfunc = (__NONE__POINTER_fn) func;
(*rfunc) (GTK_VALUE_POINTER (args[0]));
}
+typedef void (*__NONE___fn)();
static void
emacs_gtk_marshal_NONE__NONE (ffi_actual_function func, GtkArg *args)
{
- __NONE_fn rfunc = (__NONE_fn) func;
+ __NONE___fn rfunc = (__NONE___fn) func;
(*rfunc) ();
}
+typedef GtkObject * (*__OBJECT__BOOL_BOOL_INT_fn)(gboolean, gboolean, gint);
static void
emacs_gtk_marshal_OBJECT__BOOL_BOOL_INT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__BOOL_BOOL_INT_fn rfunc = (__OBJECT__BOOL_BOOL_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_BOOL (args[0]), GTK_VALUE_BOOL (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef GtkObject * (*__OBJECT__BOOL_INT_fn)(gboolean, gint);
static void
emacs_gtk_marshal_OBJECT__BOOL_INT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__BOOL_INT_fn rfunc = (__OBJECT__BOOL_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
@@ -1000,71 +1110,78 @@
return_val = GTK_RETLOC_OBJECT (args[4]);
*return_val = (*rfunc) (GTK_VALUE_FLOAT (args[0]), GTK_VALUE_FLOAT (args[1]),
GTK_VALUE_FLOAT (args[2]), GTK_VALUE_FLOAT (args[3]));
}
+typedef GtkObject * (*__OBJECT__INT_ARRAY_fn)(gint, void *);
static void
emacs_gtk_marshal_OBJECT__INT_ARRAY (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_ARRAY_fn rfunc = (__OBJECT__INT_ARRAY_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_ARRAY (args[1]));
}
+typedef GtkObject * (*__OBJECT__INT_BOOL_BOOL_fn)(gint, gboolean, gboolean);
static void
emacs_gtk_marshal_OBJECT__INT_BOOL_BOOL (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_BOOL_BOOL_fn rfunc = (__OBJECT__INT_BOOL_BOOL_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_BOOL (args[1]),
GTK_VALUE_BOOL (args[2]));
}
+typedef GtkObject * (*__OBJECT__INT_INT_ARRAY_fn)(gint, gint, void *);
static void
emacs_gtk_marshal_OBJECT__INT_INT_ARRAY (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_INT_ARRAY_fn rfunc = (__OBJECT__INT_INT_ARRAY_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_ARRAY (args[2]));
}
+typedef GtkObject * (*__OBJECT__INT_INT_BOOL_fn)(gint, gint, gboolean);
static void
emacs_gtk_marshal_OBJECT__INT_INT_BOOL (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_INT_BOOL_fn rfunc = (__OBJECT__INT_INT_BOOL_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_BOOL (args[2]));
}
+typedef GtkObject * (*__OBJECT__INT_INT_STRING_fn)(gint, gint, gchar *);
static void
emacs_gtk_marshal_OBJECT__INT_INT_STRING (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_INT_STRING_fn rfunc = (__OBJECT__INT_INT_STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_STRING (args[2]));
}
+typedef GtkObject * (*__OBJECT__INT_INT_fn)(gint, gint);
static void
emacs_gtk_marshal_OBJECT__INT_INT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_INT_fn rfunc = (__OBJECT__INT_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef GtkObject * (*__OBJECT__INT_fn)(gint);
static void
emacs_gtk_marshal_OBJECT__INT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__INT_fn rfunc = (__OBJECT__INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[1]);
@@ -1081,101 +1198,111 @@
return_val = GTK_RETLOC_OBJECT (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_FLOAT (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_OBJECT__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_INT_fn rfunc = (__OBJECT__OBJECT_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_OBJECT_fn)(GtkObject *, GtkObject *);
static void
emacs_gtk_marshal_OBJECT__OBJECT_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_OBJECT_fn rfunc = (__OBJECT__OBJECT_OBJECT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_OBJECT (args[1]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT_fn)(GtkObject *,
gchar *, gint, gint, gint, gint, gint);
static void
emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT_fn rfunc =
(__OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[7]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT
(args[5]), GTK_VALUE_INT (args[6]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_STRING_INT_INT_INT_INT_fn)(GtkObject *, gchar *,
gint, gint, gint, gint);
static void
emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT (ffi_actual_function func,
GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_STRING_INT_INT_INT_INT_fn rfunc =
(__OBJECT__OBJECT_STRING_INT_INT_INT_INT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[6]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3]), GTK_VALUE_INT (args[4]), GTK_VALUE_INT
(args[5]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_STRING_INT_INT_fn)(GtkObject *, gchar *, gint,
gint);
static void
emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT (ffi_actual_function func, GtkArg
*args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_STRING_INT_INT_fn rfunc = (__OBJECT__OBJECT_STRING_INT_INT_fn)
func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[4]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_INT (args[2]), GTK_VALUE_INT (args[3]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_STRING_fn)(GtkObject *, gchar *);
static void
emacs_gtk_marshal_OBJECT__OBJECT_STRING (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_STRING_fn rfunc = (__OBJECT__OBJECT_STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef GtkObject * (*__OBJECT__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_OBJECT__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__OBJECT_fn rfunc = (__OBJECT__OBJECT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef GtkObject * (*__OBJECT__POINTER_POINTER_fn)(void *, void *);
static void
emacs_gtk_marshal_OBJECT__POINTER_POINTER (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__POINTER_POINTER_fn rfunc = (__OBJECT__POINTER_POINTER_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef GtkObject * (*__OBJECT__POINTER_STRING_fn)(void *, gchar *);
static void
emacs_gtk_marshal_OBJECT__POINTER_STRING (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__POINTER_STRING_fn rfunc = (__OBJECT__POINTER_STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef GtkObject * (*__OBJECT__POINTER_fn)(void *);
static void
emacs_gtk_marshal_OBJECT__POINTER (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__POINTER_fn rfunc = (__OBJECT__POINTER_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[1]);
@@ -1192,201 +1319,221 @@
return_val = GTK_RETLOC_OBJECT (args[5]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_FLOAT (args[1]),
GTK_VALUE_FLOAT (args[2]), GTK_VALUE_FLOAT (args[3]), GTK_VALUE_BOOL (args[4]));
}
+typedef GtkObject * (*__OBJECT__STRING_INT_STRING_STRING_fn)(gchar *, gint, gchar *,
gchar *);
static void
emacs_gtk_marshal_OBJECT__STRING_INT_STRING_STRING (ffi_actual_function func, GtkArg
*args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__STRING_INT_STRING_STRING_fn rfunc = (__OBJECT__STRING_INT_STRING_STRING_fn)
func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[4]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_STRING (args[2]), GTK_VALUE_STRING (args[3]));
}
+typedef GtkObject * (*__OBJECT__STRING_OBJECT_fn)(gchar *, GtkObject *);
static void
emacs_gtk_marshal_OBJECT__STRING_OBJECT (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__STRING_OBJECT_fn rfunc = (__OBJECT__STRING_OBJECT_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_OBJECT (args[1]));
}
+typedef GtkObject * (*__OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING_fn)(gchar *,
gchar *, gchar *, void *, gchar *, gchar *);
static void
emacs_gtk_marshal_OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING (ffi_actual_function
func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING_fn rfunc =
(__OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[6]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_STRING (args[1]),
GTK_VALUE_STRING (args[2]), GTK_VALUE_ARRAY (args[3]), GTK_VALUE_STRING (args[4]),
GTK_VALUE_STRING (args[5]));
}
+typedef GtkObject * (*__OBJECT__STRING_STRING_fn)(gchar *, gchar *);
static void
emacs_gtk_marshal_OBJECT__STRING_STRING (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__STRING_STRING_fn rfunc = (__OBJECT__STRING_STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[2]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef GtkObject * (*__OBJECT__STRING_fn)(gchar *);
static void
emacs_gtk_marshal_OBJECT__STRING (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT__STRING_fn rfunc = (__OBJECT__STRING_fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[1]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]));
}
+typedef GtkObject * (*__OBJECT___fn)();
static void
emacs_gtk_marshal_OBJECT__NONE (ffi_actual_function func, GtkArg *args)
{
- __OBJECT_fn rfunc = (__OBJECT_fn) func;
+ __OBJECT___fn rfunc = (__OBJECT___fn) func;
GtkObject * *return_val;
return_val = GTK_RETLOC_OBJECT (args[0]);
*return_val = (*rfunc) ();
}
+typedef void * (*__POINTER__INT_INT_fn)(gint, gint);
static void
emacs_gtk_marshal_POINTER__INT_INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__INT_INT_fn rfunc = (__POINTER__INT_INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[2]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void * (*__POINTER__INT_fn)(gint);
static void
emacs_gtk_marshal_POINTER__INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__INT_fn rfunc = (__POINTER__INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[1]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]));
}
+typedef void * (*__POINTER__OBJECT_INT_INT_fn)(GtkObject *, gint, gint);
static void
emacs_gtk_marshal_POINTER__OBJECT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__OBJECT_INT_INT_fn rfunc = (__POINTER__OBJECT_INT_INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef void * (*__POINTER__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_POINTER__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__OBJECT_INT_fn rfunc = (__POINTER__OBJECT_INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void * (*__POINTER__OBJECT_POINTER_INT_fn)(GtkObject *, void *, gint);
static void
emacs_gtk_marshal_POINTER__OBJECT_POINTER_INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__OBJECT_POINTER_INT_fn rfunc = (__POINTER__OBJECT_POINTER_INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef void *
(*__POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn)(GtkObject
*, void *, void *, void *, gint, void *, void *, void *, void *, gboolean, gboolean);
static void
emacs_gtk_marshal_POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL
(ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+
__POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn
rfunc =
(__POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL_fn)
func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[11]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]),
GTK_VALUE_POINTER (args[2]), GTK_VALUE_ARRAY (args[3]), GTK_VALUE_INT (args[4]),
GTK_VALUE_POINTER (args[5]), GTK_VALUE_POINTER (args[6]), GTK_VALUE_POINTER (args[7]),
GTK_VALUE_POINTER (args[8]), GTK_VALUE_BOOL (args[9]), GTK_VALUE_BOOL (args[10]));
}
+typedef void * (*__POINTER__OBJECT_POINTER_fn)(GtkObject *, void *);
static void
emacs_gtk_marshal_POINTER__OBJECT_POINTER (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__OBJECT_POINTER_fn rfunc = (__POINTER__OBJECT_POINTER_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_POINTER (args[1]));
}
+typedef void * (*__POINTER__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_POINTER__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__OBJECT_fn rfunc = (__POINTER__OBJECT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef void * (*__POINTER__POINTER_fn)(void *);
static void
emacs_gtk_marshal_POINTER__POINTER (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__POINTER_fn rfunc = (__POINTER__POINTER_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[1]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]));
}
+typedef void * (*__POINTER__STRING_INT_fn)(gchar *, gint);
static void
emacs_gtk_marshal_POINTER__STRING_INT (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER__STRING_INT_fn rfunc = (__POINTER__STRING_INT_fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[2]);
*return_val = (*rfunc) (GTK_VALUE_STRING (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef void * (*__POINTER___fn)();
static void
emacs_gtk_marshal_POINTER__NONE (ffi_actual_function func, GtkArg *args)
{
- __POINTER_fn rfunc = (__POINTER_fn) func;
+ __POINTER___fn rfunc = (__POINTER___fn) func;
void * *return_val;
return_val = GTK_RETLOC_POINTER (args[0]);
*return_val = (*rfunc) ();
}
+typedef gchar * (*__STRING__INT_INT_INT_fn)(gint, gint, gint);
static void
emacs_gtk_marshal_STRING__INT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__INT_INT_INT_fn rfunc = (__STRING__INT_INT_INT_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[3]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef gchar * (*__STRING__INT_fn)(gint);
static void
emacs_gtk_marshal_STRING__INT (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__INT_fn rfunc = (__STRING__INT_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[1]);
*return_val = (*rfunc) (GTK_VALUE_INT (args[0]));
}
+typedef gchar * (*__STRING__OBJECT_BOOL_fn)(GtkObject *, gboolean);
static void
emacs_gtk_marshal_STRING__OBJECT_BOOL (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__OBJECT_BOOL_fn rfunc = (__STRING__OBJECT_BOOL_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[2]);
@@ -1403,61 +1550,67 @@
return_val = GTK_RETLOC_STRING (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_FLOAT (args[1]));
}
+typedef gchar * (*__STRING__OBJECT_INT_INT_fn)(GtkObject *, gint, gint);
static void
emacs_gtk_marshal_STRING__OBJECT_INT_INT (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__OBJECT_INT_INT_fn rfunc = (__STRING__OBJECT_INT_INT_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[3]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]),
GTK_VALUE_INT (args[2]));
}
+typedef gchar * (*__STRING__OBJECT_INT_fn)(GtkObject *, gint);
static void
emacs_gtk_marshal_STRING__OBJECT_INT (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__OBJECT_INT_fn rfunc = (__STRING__OBJECT_INT_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[2]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]), GTK_VALUE_INT (args[1]));
}
+typedef gchar * (*__STRING__OBJECT_fn)(GtkObject *);
static void
emacs_gtk_marshal_STRING__OBJECT (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__OBJECT_fn rfunc = (__STRING__OBJECT_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[1]);
*return_val = (*rfunc) (GTK_VALUE_OBJECT (args[0]));
}
+typedef gchar * (*__STRING__POINTER_STRING_fn)(void *, gchar *);
static void
emacs_gtk_marshal_STRING__POINTER_STRING (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__POINTER_STRING_fn rfunc = (__STRING__POINTER_STRING_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[2]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]), GTK_VALUE_STRING (args[1]));
}
+typedef gchar * (*__STRING__POINTER_fn)(void *);
static void
emacs_gtk_marshal_STRING__POINTER (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING__POINTER_fn rfunc = (__STRING__POINTER_fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[1]);
*return_val = (*rfunc) (GTK_VALUE_POINTER (args[0]));
}
+typedef gchar * (*__STRING___fn)();
static void
emacs_gtk_marshal_STRING__NONE (ffi_actual_function func, GtkArg *args)
{
- __STRING_fn rfunc = (__STRING_fn) func;
+ __STRING___fn rfunc = (__STRING___fn) func;
gchar * *return_val;
return_val = GTK_RETLOC_STRING (args[0]);
@@ -1469,193 +1622,192 @@
static struct hash_table *marshaller_hashtable;
-static void initialize_marshaller_storage (void)
+static void
+initialize_marshaller_storage (void)
{
- if (!marshaller_hashtable)
- {
- marshaller_hashtable = make_string_hash_table (100);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT_INT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT_POINTER", (void *)
emacs_gtk_marshal_BOOL__OBJECT_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT_STRING", (void *)
emacs_gtk_marshal_BOOL__OBJECT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__POINTER_BOOL", (void *)
emacs_gtk_marshal_BOOL__POINTER_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__POINTER", (void *)
emacs_gtk_marshal_BOOL__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_BOOL__NONE", (void *)
emacs_gtk_marshal_BOOL__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_FLOAT__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_FLOAT__OBJECT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_FLOAT__OBJECT", (void *)
emacs_gtk_marshal_FLOAT__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__BOOL", (void *)
emacs_gtk_marshal_INT__BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_ARRAY", (void *)
emacs_gtk_marshal_INT__OBJECT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_INT_ARRAY", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_INT_STRING", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_INT__OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT_STRING", (void *)
emacs_gtk_marshal_INT__OBJECT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__OBJECT", (void *)
emacs_gtk_marshal_INT__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__POINTER_INT", (void *)
emacs_gtk_marshal_INT__POINTER_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__POINTER_STRING_INT", (void *)
emacs_gtk_marshal_INT__POINTER_STRING_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__POINTER_STRING_STRING", (void *)
emacs_gtk_marshal_INT__POINTER_STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__POINTER_STRING", (void *)
emacs_gtk_marshal_INT__POINTER_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__POINTER", (void *)
emacs_gtk_marshal_INT__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY", (void *)
emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__STRING", (void *)
emacs_gtk_marshal_INT__STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_INT__NONE", (void *)
emacs_gtk_marshal_INT__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_LIST__OBJECT", (void *)
emacs_gtk_marshal_LIST__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_LIST__NONE", (void *)
emacs_gtk_marshal_LIST__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__BOOL", (void *)
emacs_gtk_marshal_NONE__BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__INT_INT", (void *)
emacs_gtk_marshal_NONE__INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__INT", (void *)
emacs_gtk_marshal_NONE__INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_BOOL_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_BOOL_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY",
(void *) emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_LIST_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_LIST_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_LIST", (void *)
emacs_gtk_marshal_NONE__OBJECT_LIST, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_FLOAT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_FLOAT_INT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_POINTER, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER_POINTER",
(void *) emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER_POINTER,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER", (void
*) emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL",
(void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_INT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT",
(void *) emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING",
(void *) emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER", (void
*) emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_STRING_STRING", (void *)
emacs_gtk_marshal_NONE__POINTER_STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER_STRING", (void *)
emacs_gtk_marshal_NONE__POINTER_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__POINTER", (void *)
emacs_gtk_marshal_NONE__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_NONE__NONE", (void *)
emacs_gtk_marshal_NONE__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__BOOL_BOOL_INT", (void *)
emacs_gtk_marshal_OBJECT__BOOL_BOOL_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__BOOL_INT", (void *)
emacs_gtk_marshal_OBJECT__BOOL_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT_FLOAT",
(void *) emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT_FLOAT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT", (void
*) emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_ARRAY", (void *)
emacs_gtk_marshal_OBJECT__INT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_BOOL_BOOL", (void *)
emacs_gtk_marshal_OBJECT__INT_BOOL_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_INT_ARRAY", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_ARRAY, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_INT_BOOL", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_INT_STRING", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT_INT", (void *)
emacs_gtk_marshal_OBJECT__INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__INT", (void *)
emacs_gtk_marshal_OBJECT__INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_FLOAT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_FLOAT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT",
(void *) emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__OBJECT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__POINTER_POINTER", (void *)
emacs_gtk_marshal_OBJECT__POINTER_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__POINTER_STRING", (void *)
emacs_gtk_marshal_OBJECT__POINTER_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__POINTER", (void *)
emacs_gtk_marshal_OBJECT__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__STRING_FLOAT_FLOAT_FLOAT_BOOL", (void
*) emacs_gtk_marshal_OBJECT__STRING_FLOAT_FLOAT_FLOAT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__STRING_INT_STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_INT_STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__STRING_OBJECT", (void *)
emacs_gtk_marshal_OBJECT__STRING_OBJECT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_OBJECT__NONE", (void *)
emacs_gtk_marshal_OBJECT__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__INT_INT", (void *)
emacs_gtk_marshal_POINTER__INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__INT", (void *)
emacs_gtk_marshal_POINTER__INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__OBJECT_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER_INT, marshaller_hashtable);
- puthash
("emacs_gtk_marshal_POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL",
(void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL,
marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__OBJECT_POINTER", (void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__OBJECT", (void *)
emacs_gtk_marshal_POINTER__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__POINTER", (void *)
emacs_gtk_marshal_POINTER__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__STRING_INT", (void *)
emacs_gtk_marshal_POINTER__STRING_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_POINTER__NONE", (void *)
emacs_gtk_marshal_POINTER__NONE, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__INT_INT_INT", (void *)
emacs_gtk_marshal_STRING__INT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__INT", (void *)
emacs_gtk_marshal_STRING__INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__OBJECT_BOOL", (void *)
emacs_gtk_marshal_STRING__OBJECT_BOOL, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_STRING__OBJECT_FLOAT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_STRING__OBJECT_INT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__OBJECT_INT", (void *)
emacs_gtk_marshal_STRING__OBJECT_INT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__OBJECT", (void *)
emacs_gtk_marshal_STRING__OBJECT, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__POINTER_STRING", (void *)
emacs_gtk_marshal_STRING__POINTER_STRING, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__POINTER", (void *)
emacs_gtk_marshal_STRING__POINTER, marshaller_hashtable);
- puthash ("emacs_gtk_marshal_STRING__NONE", (void *)
emacs_gtk_marshal_STRING__NONE, marshaller_hashtable);
- };
-}
-
-static void *find_marshaller (const char *func_name)
-{
- void *fn = NULL;
- initialize_marshaller_storage ();
-
- if (gethash (func_name, marshaller_hashtable, (const void **)&fn))
- {
- return (fn);
- }
-
- return (NULL);
+ if (!marshaller_hashtable)
+ {
+ marshaller_hashtable = make_string_hash_table (100);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT_INT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT_POINTER", (void *)
emacs_gtk_marshal_BOOL__OBJECT_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT_STRING", (void *)
emacs_gtk_marshal_BOOL__OBJECT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__OBJECT", (void *)
emacs_gtk_marshal_BOOL__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__POINTER_BOOL", (void *)
emacs_gtk_marshal_BOOL__POINTER_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__POINTER", (void *)
emacs_gtk_marshal_BOOL__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_BOOL__NONE", (void *)
emacs_gtk_marshal_BOOL__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_FLOAT__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_FLOAT__OBJECT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_FLOAT__OBJECT", (void *)
emacs_gtk_marshal_FLOAT__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__BOOL", (void *)
emacs_gtk_marshal_INT__BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_ARRAY", (void *)
emacs_gtk_marshal_INT__OBJECT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_INT_ARRAY", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_INT_STRING", (void *)
emacs_gtk_marshal_INT__OBJECT_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_INT__OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_POINTER", (void *)
emacs_gtk_marshal_INT__OBJECT_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT_STRING", (void *)
emacs_gtk_marshal_INT__OBJECT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__OBJECT", (void *)
emacs_gtk_marshal_INT__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__POINTER_INT", (void *)
emacs_gtk_marshal_INT__POINTER_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__POINTER_STRING_INT", (void *)
emacs_gtk_marshal_INT__POINTER_STRING_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__POINTER_STRING_STRING", (void *)
emacs_gtk_marshal_INT__POINTER_STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__POINTER_STRING", (void *)
emacs_gtk_marshal_INT__POINTER_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__POINTER", (void *)
emacs_gtk_marshal_INT__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY", (void *)
emacs_gtk_marshal_INT__STRING_STRING_INT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__STRING", (void *)
emacs_gtk_marshal_INT__STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_INT__NONE", (void *)
emacs_gtk_marshal_INT__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_LIST__OBJECT", (void *)
emacs_gtk_marshal_LIST__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_LIST__NONE", (void *)
emacs_gtk_marshal_LIST__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__BOOL", (void *)
emacs_gtk_marshal_NONE__BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__INT_INT", (void *)
emacs_gtk_marshal_NONE__INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__INT", (void *)
emacs_gtk_marshal_NONE__INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_BOOL_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_BOOL_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_BOOL", (void
*) emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_FLOAT",
(void *) emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_FLOAT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY",
(void *) emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY_ARRAY,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER_POINTER",
(void *) emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_POINTER, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING_INT_POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_LIST_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_LIST_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_LIST", (void *)
emacs_gtk_marshal_NONE__OBJECT_LIST, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT",
(void *) emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_BOOL_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_FLOAT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_FLOAT_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT",
(void *) emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_OBJECT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT_POINTER_POINTER_INT_INT,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_POINTER, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_INT_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING_INT",
(void *) emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING", (void
*) emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_FLOAT_FLOAT",
(void *) emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER_POINTER",
(void *) emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER_POINTER,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_POINTER, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER", (void
*) emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING_INT_POINTER_POINTER,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER_STRING_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER",
(void *) emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_POINTER, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL",
(void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER_STRING_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_POINTER", (void *)
emacs_gtk_marshal_NONE__OBJECT_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_BOOL", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT_INT",
(void *) emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT_INT,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT", (void
*) emacs_gtk_marshal_NONE__OBJECT_STRING_POINTER_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT_STRING", (void *)
emacs_gtk_marshal_NONE__OBJECT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__OBJECT", (void *)
emacs_gtk_marshal_NONE__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT", (void
*) emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT_INT_INT,
marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_BOOL_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT",
(void *) emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_INT_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING_INT,
marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_INT_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER",
(void *) emacs_gtk_marshal_NONE__POINTER_POINTER_POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_POINTER", (void *)
emacs_gtk_marshal_NONE__POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_STRING_STRING", (void *)
emacs_gtk_marshal_NONE__POINTER_STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER_STRING", (void *)
emacs_gtk_marshal_NONE__POINTER_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__POINTER", (void *)
emacs_gtk_marshal_NONE__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_NONE__NONE", (void *)
emacs_gtk_marshal_NONE__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__BOOL_BOOL_INT", (void *)
emacs_gtk_marshal_OBJECT__BOOL_BOOL_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__BOOL_INT", (void *)
emacs_gtk_marshal_OBJECT__BOOL_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT",
(void *) emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT", (void *)
emacs_gtk_marshal_OBJECT__FLOAT_FLOAT_FLOAT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_ARRAY", (void *)
emacs_gtk_marshal_OBJECT__INT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_BOOL_BOOL", (void *)
emacs_gtk_marshal_OBJECT__INT_BOOL_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_INT_ARRAY", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_ARRAY, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_INT_BOOL", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_INT_STRING", (void *)
emacs_gtk_marshal_OBJECT__INT_INT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT_INT", (void *)
emacs_gtk_marshal_OBJECT__INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__INT", (void *)
emacs_gtk_marshal_OBJECT__INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_FLOAT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_FLOAT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_OBJECT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT",
(void *) emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT_INT,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT",
(void *) emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_STRING_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT_STRING", (void *)
emacs_gtk_marshal_OBJECT__OBJECT_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__OBJECT", (void *)
emacs_gtk_marshal_OBJECT__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__POINTER_POINTER", (void *)
emacs_gtk_marshal_OBJECT__POINTER_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__POINTER_STRING", (void *)
emacs_gtk_marshal_OBJECT__POINTER_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__POINTER", (void *)
emacs_gtk_marshal_OBJECT__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__STRING_FLOAT_FLOAT_FLOAT_BOOL",
(void *) emacs_gtk_marshal_OBJECT__STRING_FLOAT_FLOAT_FLOAT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__STRING_INT_STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_INT_STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__STRING_OBJECT", (void *)
emacs_gtk_marshal_OBJECT__STRING_OBJECT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_STRING_STRING_ARRAY_STRING_STRING,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__STRING_STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__STRING", (void *)
emacs_gtk_marshal_OBJECT__STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_OBJECT__NONE", (void *)
emacs_gtk_marshal_OBJECT__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__INT_INT", (void *)
emacs_gtk_marshal_POINTER__INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__INT", (void *)
emacs_gtk_marshal_POINTER__INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__OBJECT_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__OBJECT_POINTER_INT", (void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER_INT, marshaller_hashtable);
+ puthash
("emacs_gtk_marshal_POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL",
(void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER_POINTER_ARRAY_INT_POINTER_POINTER_POINTER_POINTER_BOOL_BOOL,
marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__OBJECT_POINTER", (void *)
emacs_gtk_marshal_POINTER__OBJECT_POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__OBJECT", (void *)
emacs_gtk_marshal_POINTER__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__POINTER", (void *)
emacs_gtk_marshal_POINTER__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__STRING_INT", (void *)
emacs_gtk_marshal_POINTER__STRING_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_POINTER__NONE", (void *)
emacs_gtk_marshal_POINTER__NONE, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__INT_INT_INT", (void *)
emacs_gtk_marshal_STRING__INT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__INT", (void *)
emacs_gtk_marshal_STRING__INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__OBJECT_BOOL", (void *)
emacs_gtk_marshal_STRING__OBJECT_BOOL, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__OBJECT_FLOAT", (void *)
emacs_gtk_marshal_STRING__OBJECT_FLOAT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__OBJECT_INT_INT", (void *)
emacs_gtk_marshal_STRING__OBJECT_INT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__OBJECT_INT", (void *)
emacs_gtk_marshal_STRING__OBJECT_INT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__OBJECT", (void *)
emacs_gtk_marshal_STRING__OBJECT, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__POINTER_STRING", (void *)
emacs_gtk_marshal_STRING__POINTER_STRING, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__POINTER", (void *)
emacs_gtk_marshal_STRING__POINTER, marshaller_hashtable);
+ puthash ("emacs_gtk_marshal_STRING__NONE", (void *)
emacs_gtk_marshal_STRING__NONE, marshaller_hashtable);
+ };
+}
+
+static void *
+find_marshaller (const Ibyte *func_name)
+{
+ void *fn = NULL;
+ initialize_marshaller_storage ();
+
+ if (gethash (func_name, marshaller_hashtable, (const void **) &fn))
+ return (fn);
+ return (NULL);
}
1.154.2.1 +15 -30 XEmacs/xemacs/src/emacs.c
Index: emacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emacs.c,v
retrieving revision 1.154
retrieving revision 1.154.2.1
diff -u -r1.154 -r1.154.2.1
--- emacs.c 2005/01/31 19:29:48 1.154
+++ emacs.c 2005/02/15 01:19:58 1.154.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1985, 1986, 1987, 1992, 1993, 1994
Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2000, 2001, 2002, 2003, 2004 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing.
This file is part of XEmacs.
@@ -665,7 +665,7 @@
/* Nonzero means we're in an unstable situation and need to skip
i18n conversions and such. During printing we check for this,
- and during conversion we abort if we see this. */
+ and during conversion we ABORT if we see this. */
int inhibit_non_essential_conversion_operations;
static JMP_BUF run_temacs_catch;
@@ -1077,7 +1077,7 @@
0, NULL, &skip_args))
inhibit_early_packages = 1;
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
if (argmatch (argv, argc, "-no-site-modules",
"--no-site-modules",
0, NULL, &skip_args))
#endif
@@ -1453,6 +1453,9 @@
#ifdef HAVE_GTK
syms_of_event_gtk ();
#endif
+#ifdef HAVE_XLIKE
+ syms_of_event_xlike ();
+#endif
#ifdef HAVE_DRAGNDROP
syms_of_dragdrop ();
#endif
@@ -1491,7 +1494,7 @@
syms_of_menubar ();
#endif
syms_of_minibuf ();
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
syms_of_module ();
#endif
#ifdef WITH_NUMBER_TYPES
@@ -1551,9 +1554,7 @@
#endif
syms_of_select_gtk ();
-#ifdef HAVE_GUI_OBJECTS
syms_of_gui_gtk ();
-#endif
#endif /* HAVE_GTK */
#ifdef HAVE_X_WINDOWS
@@ -1571,9 +1572,7 @@
syms_of_menubar_x ();
#endif
syms_of_select_x ();
-#ifdef HAVE_GUI_OBJECTS
syms_of_gui_x ();
-#endif
syms_of_intl_x ();
#ifdef HAVE_XIM
#ifdef XIM_XLIB
@@ -1593,9 +1592,7 @@
syms_of_objects_mswindows ();
syms_of_select_mswindows ();
syms_of_glyphs_mswindows ();
-#ifdef HAVE_GUI_OBJECTS
syms_of_gui_mswindows ();
-#endif
#ifdef HAVE_MENUBARS
syms_of_menubar_mswindows ();
#endif
@@ -1655,7 +1652,7 @@
syms_of_sunpro ();
#endif
-#if defined (HAVE_LDAP) && !defined (HAVE_SHLIB)
+#if defined (HAVE_LDAP) && !defined (HAVE_MODULES)
syms_of_eldap ();
#endif
@@ -1663,7 +1660,7 @@
syms_of_gpmevent ();
#endif
-#if defined (HAVE_POSTGRESQL) && !defined (HAVE_SHLIB)
+#if defined (HAVE_POSTGRESQL) && !defined (HAVE_MODULES)
syms_of_postgresql ();
#endif
@@ -2129,9 +2126,7 @@
#ifdef HAVE_SCROLLBARS
vars_of_scrollbar_gtk ();
#endif
-#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_DIALOGS) ||
defined (HAVE_TOOLBARS)
vars_of_gui_gtk ();
-#endif
#endif /* HAVE_GTK */
#ifdef HAVE_X_WINDOWS
@@ -2152,9 +2147,7 @@
#ifdef HAVE_SCROLLBARS
vars_of_scrollbar_x ();
#endif
-#if defined (HAVE_MENUBARS) || defined (HAVE_SCROLLBARS) || defined (HAVE_X_DIALOGS) ||
defined (HAVE_TOOLBARS)
vars_of_gui_x ();
-#endif
#endif /* HAVE_X_WINDOWS */
@@ -2200,11 +2193,11 @@
vars_of_sunpro ();
#endif
-#if defined (HAVE_LDAP) && !defined (HAVE_SHLIB)
+#if defined (HAVE_LDAP) && !defined (HAVE_MODULES)
vars_of_eldap ();
#endif
-#if defined (HAVE_POSTGRESQL) && !defined (HAVE_SHLIB)
+#if defined (HAVE_POSTGRESQL) && !defined (HAVE_MODULES)
vars_of_postgresql ();
#endif
@@ -2245,7 +2238,7 @@
reinit_vars_of_lread ();
reinit_vars_of_lstream ();
reinit_vars_of_minibuf ();
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
reinit_vars_of_module ();
#endif
reinit_vars_of_objects ();
@@ -2354,18 +2347,10 @@
above. */
complex_vars_of_glyphs ();
- /* These rely on the glyphs just created in the previous function,
+ /* This relies on the glyphs just created in the previous function,
and call Fadd_spec_to_specifier(), which relies on various
variables initialized above. */
-#ifdef HAVE_GTK
- complex_vars_of_glyphs_gtk ();
-#endif
-#ifdef HAVE_X_WINDOWS
- complex_vars_of_glyphs_x ();
-#endif
-#ifdef HAVE_MS_WINDOWS
- complex_vars_of_glyphs_mswindows ();
-#endif
+ complex_vars_of_glyphs_shared ();
/* This calls Fmake_glyph_internal(). */
complex_vars_of_alloc ();
@@ -2526,7 +2511,7 @@
#if defined (HAVE_NATIVE_SOUND) && defined (hp9000s800)
init_hpplay ();
#endif
-#if defined (HAVE_POSTGRESQL) && !defined (HAVE_SHLIB)
+#if defined (HAVE_POSTGRESQL) && !defined (HAVE_MODULES)
/* Set some values taken from environment variables */
init_postgresql_from_environment ();
#endif
1.23.4.1 +4 -4 XEmacs/xemacs/src/emodules.c
Index: emodules.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/emodules.c,v
retrieving revision 1.23
retrieving revision 1.23.4.1
diff -u -r1.23 -r1.23.4.1
--- emodules.c 2004/11/04 23:06:24 1.23
+++ emodules.c 2005/02/15 01:20:00 1.23.4.1
@@ -30,7 +30,7 @@
/* Module lFile extensions */
static Lisp_Object Vmodule_extensions;
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* CE-Emacs version number */
Lisp_Object Vmodule_version;
@@ -581,12 +581,12 @@
modnum = 0;
}
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
void
vars_of_module (void)
{
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
Fprovide (intern ("modules"));
#ifdef HAVE_LTDL
@@ -624,7 +624,7 @@
*/);
unloading_module = 0;
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
DEFVAR_LISP ("module-load-path", &Vmodule_load_path /*
*List of directories to search for dynamic modules to load.
1.88.2.1 +1 -1 XEmacs/xemacs/src/eval.c
Index: eval.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/eval.c,v
retrieving revision 1.88
retrieving revision 1.88.2.1
diff -u -r1.88 -r1.88.2.1
--- eval.c 2005/02/03 16:30:36 1.88
+++ eval.c 2005/02/15 01:20:00 1.88.2.1
@@ -2240,7 +2240,7 @@
assert (!gc_in_progress);
- /* We abort if in_display and we are not protected, as garbage
+ /* We ABORT if in_display and we are not protected, as garbage
collections and non-local exits will invariably be fatal, but in
messy, difficult-to-debug ways. See enter_redisplay_critical_section().
*/
1.82.2.1 +50 -789 XEmacs/xemacs/src/event-Xt.c
Index: event-Xt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-Xt.c,v
retrieving revision 1.82
retrieving revision 1.82.2.1
diff -u -r1.82 -r1.82.2.1
--- event-Xt.c 2005/01/24 23:33:52 1.82
+++ event-Xt.c 2005/02/15 01:20:02 1.82.2.1
@@ -1,7 +1,7 @@
/* The event_stream interface for X11 with Xt, and/or tty frames.
Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -26,7 +26,6 @@
#include "lisp.h"
#include "blocktype.h"
-#include "charset.h"
#include "console.h"
#include "device-impl.h"
#include "elhash.h"
@@ -115,17 +114,14 @@
0
};
-static Lisp_Object x_keysym_to_emacs_keysym (KeySym keysym, int simple_p);
void emacs_Xt_mapping_action (Widget w, XEvent *event);
-void debug_process_finalization (Lisp_Process *p);
void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event,
Boolean *continue_to_dispatch);
+static Lisp_Object x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p);
+static void x_handle_sticky_modifiers (XEvent *ev, struct device *d);
static int last_quit_check_signal_tick_count;
-Lisp_Object Qkey_mapping;
-Lisp_Object Qsans_modifiers;
-
#define THIS_IS_X
#include "event-xlike-inc.c"
@@ -134,508 +130,10 @@
/* keymap handling */
/************************************************************************/
-/* X bogusly doesn't define the interpretations of any bits besides
- ModControl, ModShift, and ModLock; so the Interclient Communication
- Conventions Manual says that we have to bend over backwards to figure
- out what the other modifier bits mean. According to ICCCM:
-
- - Any keycode which is assigned ModControl is a "control" key.
-
- - Any modifier bit which is assigned to a keycode which generates Meta_L
- or Meta_R is the modifier bit meaning "meta". Likewise for Super,
Hyper,
- etc.
-
- - Any keypress event which contains ModControl in its state should be
- interpreted as a "control" character.
-
- - Any keypress event which contains a modifier bit in its state which is
- generated by a keycode whose corresponding keysym is Meta_L or Meta_R
- should be interpreted as a "meta" character. Likewise for Super,
Hyper,
- etc.
-
- - It is illegal for a keysym to be associated with more than one modifier
- bit.
-
- This means that the only thing that emacs can reasonably interpret as a
- "meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
- one of the modifier bits Mod1-Mod5.
-
- Unfortunately, many keyboards don't have Meta keys in their default
- configuration. So, if there are no Meta keys, but there are "Alt" keys,
- emacs will interpret Alt as Meta. If there are both Meta and Alt keys,
- then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it
used to
- mean "Symbol," but that just confused the hell out of way too many
people).
-
- This works with the default configurations of the 19 keyboard-types I've
- checked.
-
- Emacs detects keyboard configurations which violate the above rules, and
- prints an error message on the standard-error-output. (Perhaps it should
- use a pop-up-window instead.)
- */
-
-/* For every key on the keyboard that has a known character correspondence,
- we define the ascii-character property of the keysym, and make the
- default binding for the key be self-insert-command.
-
- The following magic is basically intimate knowledge of X11/keysymdef.h.
- The keysym mappings defined by X11 are based on the iso8859 standards,
- except for Cyrillic and Greek.
-
- In a non-Mule world, a user can still have a multi-lingual editor, by doing
- (set-face-font "...-iso8859-2" (current-buffer))
- for all their Latin-2 buffers, etc. */
-
-static Lisp_Object
-x_keysym_to_character (KeySym keysym)
-{
-#ifdef MULE
- Lisp_Object charset = Qzero;
-#define USE_CHARSET(var,cs) \
- ((var) = charset_by_leading_byte (LEADING_BYTE_##cs))
-#else
-#define USE_CHARSET(var,lb)
-#endif /* MULE */
- int code = 0;
-
- if ((keysym & 0xff) < 0xa0)
- return Qnil;
-
- switch (keysym >> 8)
- {
- case 0: /* ASCII + Latin1 */
- USE_CHARSET (charset, LATIN_ISO8859_1);
- code = keysym & 0x7f;
- break;
- case 1: /* Latin2 */
- USE_CHARSET (charset, LATIN_ISO8859_2);
- code = keysym & 0x7f;
- break;
- case 2: /* Latin3 */
- USE_CHARSET (charset, LATIN_ISO8859_3);
- code = keysym & 0x7f;
- break;
- case 3: /* Latin4 */
- USE_CHARSET (charset, LATIN_ISO8859_4);
- code = keysym & 0x7f;
- break;
- case 4: /* Katakana */
- USE_CHARSET (charset, KATAKANA_JISX0201);
- if ((keysym & 0xff) > 0xa0)
- code = keysym & 0x7f;
- break;
- case 5: /* Arabic */
- USE_CHARSET (charset, ARABIC_ISO8859_6);
- code = keysym & 0x7f;
- break;
- case 6: /* Cyrillic */
- {
- static unsigned char const cyrillic[] = /* 0x20 - 0x7f */
- {0x00, 0x72, 0x73, 0x71, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x00, 0x7e, 0x7f,
- 0x70, 0x22, 0x23, 0x21, 0x24, 0x25, 0x26, 0x27,
- 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x00, 0x2e, 0x2f,
- 0x6e, 0x50, 0x51, 0x66, 0x54, 0x55, 0x64, 0x53,
- 0x65, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
- 0x5f, 0x6f, 0x60, 0x61, 0x62, 0x63, 0x56, 0x52,
- 0x6c, 0x6b, 0x57, 0x68, 0x6d, 0x69, 0x67, 0x6a,
- 0x4e, 0x30, 0x31, 0x46, 0x34, 0x35, 0x44, 0x33,
- 0x45, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
- 0x3f, 0x4f, 0x40, 0x41, 0x42, 0x43, 0x36, 0x32,
- 0x4c, 0x4b, 0x37, 0x48, 0x4d, 0x49, 0x47, 0x4a};
- USE_CHARSET (charset, CYRILLIC_ISO8859_5);
- code = cyrillic[(keysym & 0x7f) - 0x20];
- break;
- }
- case 7: /* Greek */
- {
- static unsigned char const greek[] = /* 0x20 - 0x7f */
- {0x00, 0x36, 0x38, 0x39, 0x3a, 0x5a, 0x00, 0x3c,
- 0x3e, 0x5b, 0x00, 0x3f, 0x00, 0x00, 0x35, 0x2f,
- 0x00, 0x5c, 0x5d, 0x5e, 0x5f, 0x7a, 0x40, 0x7c,
- 0x7d, 0x7b, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
- 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
- 0x50, 0x51, 0x53, 0x00, 0x54, 0x55, 0x56, 0x57,
- 0x58, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
- 0x70, 0x71, 0x73, 0x72, 0x74, 0x75, 0x76, 0x77,
- 0x78, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- USE_CHARSET (charset, GREEK_ISO8859_7);
- code = greek[(keysym & 0x7f) - 0x20];
- break;
- }
- case 8: /* Technical */
- break;
- case 9: /* Special */
- break;
- case 10: /* Publishing */
- break;
- case 11: /* APL */
- break;
- case 12: /* Hebrew */
- USE_CHARSET (charset, HEBREW_ISO8859_8);
- code = keysym & 0x7f;
- break;
- case 13: /* Thai */
- /* #### This needs to deal with character composition. */
- USE_CHARSET (charset, THAI_TIS620);
- code = keysym & 0x7f;
- break;
- case 14: /* Korean Hangul */
- break;
- case 19: /* Latin 9 - ISO8859-15 - unsupported charset. */
- break;
- case 32: /* Currency */
- break;
- default:
- break;
- }
-
- if (code == 0)
- return Qnil;
-
-#ifdef MULE
- return make_char (make_ichar (charset, code, 0));
-#else
- return make_char (code + 0x80);
-#endif
-}
-
-/* See comment near character_to_event().
-*/
-static void
-maybe_define_x_key_as_self_inserting_character (KeySym keysym, Lisp_Object symbol)
-{
- Lisp_Object character = x_keysym_to_character (keysym);
-
- if (CHARP (character))
- {
- extern Lisp_Object Vcurrent_global_map;
- extern Lisp_Object Qascii_character;
- if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil)))
- {
- Fput (symbol, Qascii_character, character);
- Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command);
- }
- }
-}
-
-static void
-x_has_keysym (KeySym keysym, Lisp_Object hash_table, int with_modifiers)
-{
- KeySym upper_lower[2];
- int j;
-
- if (keysym < 0x80) /* Optimize for ASCII keysyms */
- return;
-
- /* If you execute:
- xmodmap -e 'keysym NN = scaron'
- and then press (Shift scaron), X11 will return the different
- keysym `Scaron', but `xmodmap -pke' might not even mention
`Scaron'.
- So we "register" both `scaron' and `Scaron'. */
-#ifdef HAVE_XCONVERTCASE
- XConvertCase (keysym, &upper_lower[0], &upper_lower[1]);
-#else
- upper_lower[0] = upper_lower[1] = keysym;
-#endif
-
- for (j = 0; j < (upper_lower[0] == upper_lower[1] ? 1 : 2); j++)
- {
- char *name;
- keysym = upper_lower[j];
-
- name = XKeysymToString (keysym);
- if (name)
- {
- /* X guarantees NAME to be in the Host Portable Character Encoding */
- Lisp_Object sym = x_keysym_to_emacs_keysym (keysym, 0);
- Lisp_Object new_value = with_modifiers ? Qt : Qsans_modifiers;
- Lisp_Object old_value = Fgethash (sym, hash_table, Qnil);
-
- if (! EQ (old_value, new_value)
- && ! (EQ (old_value, Qsans_modifiers) &&
- EQ (new_value, Qt)))
- {
- maybe_define_x_key_as_self_inserting_character (keysym, sym);
- Fputhash (build_ext_string (name, Qbinary), new_value, hash_table);
- Fputhash (sym, new_value, hash_table);
- }
- }
- }
-}
-
-static void
-x_reset_key_mapping (struct device *d)
-{
- Display *display = DEVICE_X_DISPLAY (d);
- struct x_device *xd = DEVICE_X_DATA (d);
- KeySym *keysym, *keysym_end;
- Lisp_Object hash_table;
- int key_code_count, keysyms_per_code;
-
- if (xd->x_keysym_map)
- XFree ((char *) xd->x_keysym_map);
- XDisplayKeycodes (display,
- &xd->x_keysym_map_min_code,
- &xd->x_keysym_map_max_code);
- key_code_count = xd->x_keysym_map_max_code - xd->x_keysym_map_min_code + 1;
- xd->x_keysym_map =
- XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count,
- &xd->x_keysym_map_keysyms_per_code);
-
- hash_table = xd->x_keysym_map_hash_table;
- if (HASH_TABLEP (hash_table))
- Fclrhash (hash_table);
- else
- xd->x_keysym_map_hash_table = hash_table =
- make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
-
- for (keysym = xd->x_keysym_map,
- keysyms_per_code = xd->x_keysym_map_keysyms_per_code,
- keysym_end = keysym + (key_code_count * keysyms_per_code);
- keysym < keysym_end;
- keysym += keysyms_per_code)
- {
- int j;
-
- if (keysym[0] == NoSymbol)
- continue;
-
- x_has_keysym (keysym[0], hash_table, 0);
-
- for (j = 1; j < keysyms_per_code; j++)
- {
- if (keysym[j] != keysym[0] &&
- keysym[j] != NoSymbol)
- x_has_keysym (keysym[j], hash_table, 1);
- }
- }
-}
-
-static const char *
-index_to_name (int indice)
-{
- switch (indice)
- {
- case ShiftMapIndex: return "ModShift";
- case LockMapIndex: return "ModLock";
- case ControlMapIndex: return "ModControl";
- case Mod1MapIndex: return "Mod1";
- case Mod2MapIndex: return "Mod2";
- case Mod3MapIndex: return "Mod3";
- case Mod4MapIndex: return "Mod4";
- case Mod5MapIndex: return "Mod5";
- default: return "???";
- }
-}
-
-/* Boy, I really wish C had local functions... */
-struct c_doesnt_have_closures /* #### not yet used */
-{
- int warned_about_overlapping_modifiers;
- int warned_about_predefined_modifiers;
- int warned_about_duplicate_modifiers;
- int meta_bit;
- int hyper_bit;
- int super_bit;
- int alt_bit;
- int mode_bit;
-};
-
-static void
-x_reset_modifier_mapping (struct device *d)
-{
- Display *display = DEVICE_X_DISPLAY (d);
- struct x_device *xd = DEVICE_X_DATA (d);
- int modifier_index, modifier_key, column, mkpm;
- int warned_about_overlapping_modifiers = 0;
- int warned_about_predefined_modifiers = 0;
- int warned_about_duplicate_modifiers = 0;
- int meta_bit = 0;
- int hyper_bit = 0;
- int super_bit = 0;
- int alt_bit = 0;
- int mode_bit = 0;
-
- xd->lock_interpretation = 0;
-
- if (xd->x_modifier_keymap)
- XFreeModifiermap (xd->x_modifier_keymap);
-
- x_reset_key_mapping (d);
-
- xd->x_modifier_keymap = XGetModifierMapping (display);
-
- /* Boy, I really wish C had local functions...
- */
-
- /* The call to warn_when_safe must be on the same line as the string or
- make-msgfile won't pick it up properly (the newline doesn't confuse
- it, but the backslash does). */
-
-#define modwarn(name,old,other) \
- warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s, which
is generated by %s.", \
- name, code, index_to_name (old), other), \
- warned_about_overlapping_modifiers = 1
-
-#define modbarf(name,other) \
- warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s, which
is nonsensical.", \
- name, code, other), \
- warned_about_predefined_modifiers = 1
-
-#define check_modifier(name,mask) \
- if ((1<<modifier_index) != mask) \
- warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s,
which is nonsensical.", \
- name, code, index_to_name (modifier_index)), \
- warned_about_predefined_modifiers = 1
-
-#define store_modifier(name,old) \
- if (old && old != modifier_index) \
- warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates both %s
and %s, which is nonsensical.",\
- name, code, index_to_name (old), \
- index_to_name (modifier_index)), \
- warned_about_duplicate_modifiers = 1; \
- if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
- else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
- else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
- else if (sym == XK_Mode_switch) \
- mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
- else if (modifier_index == meta_bit && old != meta_bit) \
- modwarn (name, meta_bit, "Meta"); \
- else if (modifier_index == super_bit && old != super_bit) \
- modwarn (name, super_bit, "Super"); \
- else if (modifier_index == hyper_bit && old != hyper_bit) \
- modwarn (name, hyper_bit, "Hyper"); \
- else if (modifier_index == alt_bit && old != alt_bit) \
- modwarn (name, alt_bit, "Alt"); \
- else \
- old = modifier_index;
-
- mkpm = xd->x_modifier_keymap->max_keypermod;
- for (modifier_index = 0; modifier_index < 8; modifier_index++)
- for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
- KeySym last_sym = 0;
- for (column = 0; column < 4; column += 2) {
- KeyCode code = xd->x_modifier_keymap->modifiermap[modifier_index * mkpm
- + modifier_key];
- KeySym sym = (code ? XKeycodeToKeysym (display, code, column) : 0);
- if (sym == last_sym) continue;
- last_sym = sym;
- switch (sym) {
- case XK_Mode_switch:store_modifier ("Mode_switch", mode_bit); break;
- case XK_Meta_L: store_modifier ("Meta_L", meta_bit); break;
- case XK_Meta_R: store_modifier ("Meta_R", meta_bit); break;
- case XK_Super_L: store_modifier ("Super_L", super_bit); break;
- case XK_Super_R: store_modifier ("Super_R", super_bit); break;
- case XK_Hyper_L: store_modifier ("Hyper_L", hyper_bit); break;
- case XK_Hyper_R: store_modifier ("Hyper_R", hyper_bit); break;
- case XK_Alt_L: store_modifier ("Alt_L", alt_bit); break;
- case XK_Alt_R: store_modifier ("Alt_R", alt_bit); break;
- case XK_Control_L: check_modifier ("Control_L", ControlMask); break;
- case XK_Control_R: check_modifier ("Control_R", ControlMask); break;
- case XK_Shift_L: check_modifier ("Shift_L", ShiftMask); break;
- case XK_Shift_R: check_modifier ("Shift_R", ShiftMask); break;
- case XK_Shift_Lock: check_modifier ("Shift_Lock", LockMask);
- xd->lock_interpretation = XK_Shift_Lock; break;
- case XK_Caps_Lock: check_modifier ("Caps_Lock", LockMask);
- xd->lock_interpretation = XK_Caps_Lock; break;
-
- /* It probably doesn't make any sense for a modifier bit to be
- assigned to a key that is not one of the above, but OpenWindows
- assigns modifier bits to a couple of random function keys for
- no reason that I can discern, so printing a warning here would
- be annoying. */
- }
- }
- }
-#undef store_modifier
-#undef check_modifier
-#undef modwarn
-#undef modbarf
-
- /* If there was no Meta key, then try using the Alt key instead.
- If there is both a Meta key and an Alt key, then the Alt key
- is not disturbed and remains an Alt key. */
- if (! meta_bit && alt_bit)
- meta_bit = alt_bit, alt_bit = 0;
-
- /* mode_bit overrides everything, since it's processed down inside of
- XLookupString() instead of by us. If Meta and Mode_switch both
- generate the same modifier bit (which is an error), then we don't
- interpret that bit as Meta, because we can't make XLookupString()
- not interpret it as Mode_switch; and interpreting it as both would
- be totally wrong. */
- if (mode_bit)
- {
- const char *warn = 0;
- if (mode_bit == meta_bit) warn = "Meta", meta_bit = 0;
- else if (mode_bit == hyper_bit) warn = "Hyper", hyper_bit = 0;
- else if (mode_bit == super_bit) warn = "Super", super_bit = 0;
- else if (mode_bit == alt_bit) warn = "Alt", alt_bit = 0;
- if (warn)
- {
- warn_when_safe
- (Qkey_mapping, Qwarning,
- "XEmacs: %s is being used for both Mode_switch and %s.",
- index_to_name (mode_bit), warn),
- warned_about_overlapping_modifiers = 1;
- }
- }
-#undef index_to_name
-
- xd->MetaMask = (meta_bit ? (1 << meta_bit) : 0);
- xd->HyperMask = (hyper_bit ? (1 << hyper_bit) : 0);
- xd->SuperMask = (super_bit ? (1 << super_bit) : 0);
- xd->AltMask = (alt_bit ? (1 << alt_bit) : 0);
- xd->ModeMask = (mode_bit ? (1 << mode_bit) : 0); /* unused */
-
-
- if (warned_about_overlapping_modifiers)
- warn_when_safe (Qkey_mapping, Qwarning, "\n"
-" Two distinct modifier keys (such as Meta and Hyper) cannot generate\n"
-" the same modifier bit, because Emacs won't be able to tell which\n"
-" modifier was actually held down when some other key is pressed. It\n"
-" won't be able to tell Meta-x and Hyper-x apart, for example.
Change\n"
-" one of these keys to use some other modifier bit. If you intend for\n"
-" these keys to have the same behavior, then change them to have the\n"
-" same keysym as well as the same modifier bit.");
-
- if (warned_about_predefined_modifiers)
- warn_when_safe (Qkey_mapping, Qwarning, "\n"
-" The semantics of the modifier bits ModShift, ModLock, and ModControl\n"
-" are predefined. It does not make sense to assign ModControl to any\n"
-" keysym other than Control_L or Control_R, or to assign any modifier\n"
-" bits to the \"control\" keysyms other than ModControl. You
can't\n"
-" turn a \"control\" key into a \"meta\" key (or vice versa)
by simply\n"
-" assigning the key a different modifier bit. You must also make that\n"
-" key generate an appropriate keysym (Control_L, Meta_L, etc).");
-
- /* No need to say anything more for warned_about_duplicate_modifiers. */
-
- if (warned_about_overlapping_modifiers || warned_about_predefined_modifiers)
- warn_when_safe (Qkey_mapping, Qwarning, "\n"
-" The meanings of the modifier bits Mod1 through Mod5 are determined\n"
-" by the keysyms used to control those bits. Mod1 does NOT always\n"
-" mean Meta, although some non-ICCCM-compliant programs assume that.");
-}
-
-void
-x_init_modifier_mapping (struct device *d)
-{
- struct x_device *xd = DEVICE_X_DATA (d);
- xd->x_keysym_map_hash_table = Qnil;
- xd->x_keysym_map = NULL;
- xd->x_modifier_keymap = NULL;
- x_reset_modifier_mapping (d);
-}
-
static int
x_key_is_modifier_p (KeyCode keycode, struct device *d)
{
- struct x_device *xd = DEVICE_X_DATA (d);
+ struct xlike_event_key_data *xd = &(DEVICE_X_DATA (d)->key);
KeySym *syms;
int i;
@@ -643,8 +141,10 @@
keycode > xd->x_keysym_map_max_code)
return 0;
- syms = &xd->x_keysym_map [(keycode - xd->x_keysym_map_min_code) *
- xd->x_keysym_map_keysyms_per_code];
+ syms =
+ &((KeySym *) xd->x_keysym_map)
+ [(keycode - xd->x_keysym_map_min_code) *
+ xd->x_keysym_map_keysyms_per_code];
for (i = 0; i < xd->x_keysym_map_keysyms_per_code; i++)
if (IsModifierKey (syms [i]) ||
syms [i] == XK_Mode_switch) /* why doesn't IsModifierKey count this? */
@@ -674,19 +174,19 @@
static void
x_handle_sticky_modifiers (XEvent *ev, struct device *d)
{
- struct x_device *xd;
+ struct x_device *xd = DEVICE_X_DATA (d);
+ struct xlike_event_key_data *xk = &(DEVICE_X_DATA (d)->key);
KeyCode keycode;
int type;
if (!modifier_keys_are_sticky) /* Optimize for non-sticky modifiers */
return;
- xd = DEVICE_X_DATA (d);
keycode = ev->xkey.keycode;
type = ev->type;
- if (keycode < xd->x_keysym_map_min_code ||
- keycode > xd->x_keysym_map_max_code)
+ if (keycode < xk->x_keysym_map_min_code ||
+ keycode > xk->x_keysym_map_max_code)
return;
if (! ((type == KeyPress || type == KeyRelease) &&
@@ -744,8 +244,9 @@
else /* Modifier key pressed */
{
int i;
- KeySym *syms = &xd->x_keysym_map [(keycode - xd->x_keysym_map_min_code)
*
- xd->x_keysym_map_keysyms_per_code];
+ KeySym *syms =
+ &((KeySym *) xk->x_keysym_map) [(keycode - xk->x_keysym_map_min_code) *
+ xk->x_keysym_map_keysyms_per_code];
/* If a non-modifier key was pressed in the middle of a bunch
of modifiers, then it unsticks all the modifiers that were
@@ -796,15 +297,15 @@
xd->modifier_release_time = ev->xkey.time; \
} while (0)
- for (i = 0; i < xd->x_keysym_map_keysyms_per_code; i++)
+ for (i = 0; i < xk->x_keysym_map_keysyms_per_code; i++)
switch (syms[i])
{
case XK_Control_L: case XK_Control_R: FROB (ControlMask); break;
case XK_Shift_L: case XK_Shift_R: FROB (ShiftMask); break;
- case XK_Meta_L: case XK_Meta_R: FROB (xd->MetaMask); break;
- case XK_Super_L: case XK_Super_R: FROB (xd->SuperMask); break;
- case XK_Hyper_L: case XK_Hyper_R: FROB (xd->HyperMask); break;
- case XK_Alt_L: case XK_Alt_R: FROB (xd->AltMask); break;
+ case XK_Meta_L: case XK_Meta_R: FROB (xk->MetaMask); break;
+ case XK_Super_L: case XK_Super_R: FROB (xk->SuperMask); break;
+ case XK_Hyper_L: case XK_Hyper_R: FROB (xk->HyperMask); break;
+ case XK_Alt_L: case XK_Alt_R: FROB (xk->AltMask); break;
}
}
#undef FROB
@@ -821,26 +322,6 @@
xd->down_mask = 0;
}
-static int
-keysym_obeys_caps_lock_p (KeySym sym, struct device *d)
-{
- struct x_device *xd = DEVICE_X_DATA (d);
- /* Eeeeevil hack. Don't apply Caps_Lock to things that aren't alphabetic
- characters, where "alphabetic" means something more than simply A-Z.
- That is, if Caps_Lock is down, typing ESC doesn't produce Shift-ESC.
- But if shift-lock is down, then it does. */
- if (xd->lock_interpretation == XK_Shift_Lock)
- return 1;
-
- return
- ((sym >= XK_A) && (sym <= XK_Z)) ||
- ((sym >= XK_a) && (sym <= XK_z)) ||
- ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) ||
- ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) ||
- ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) ||
- ((sym >= XK_oslash) && (sym <= XK_thorn));
-}
-
/* called from EmacsFrame.c (actually from Xt itself) when a
MappingNotify event is received. In its infinite wisdom, Xt
decided that Xt event handlers never get MappingNotify events.
@@ -867,9 +348,12 @@
the current keymap from the server. */
switch (event->xmapping.request)
{
- case MappingKeyboard: x_reset_key_mapping (d); break;
- case MappingModifier: x_reset_modifier_mapping (d); break;
- case MappingPointer: /* Do something here? */ break;
+ case MappingKeyboard:
+ xlike_reset_key_mapping (d, &DEVICE_X_DATA (d)->key); break;
+ case MappingModifier:
+ xlike_reset_modifier_mapping (d, &DEVICE_X_DATA (d)->key); break;
+ case MappingPointer:
+ /* Do something here? */ break;
default: ABORT();
}
}
@@ -880,93 +364,10 @@
/************************************************************************/
static Lisp_Object
-x_keysym_to_emacs_keysym (KeySym keysym, int simple_p)
-{
- char *name;
- if (keysym >= XK_exclam && keysym <= XK_asciitilde)
- /* We must assume that the X keysym numbers for the ASCII graphic
- characters are the same as their ASCII codes. */
- return make_char (keysym);
-
- switch (keysym)
- {
- /* These would be handled correctly by the default case, but by
- special-casing them here we don't garbage a string or call
- intern(). */
- case XK_BackSpace: return QKbackspace;
- case XK_Tab: return QKtab;
- case XK_Linefeed: return QKlinefeed;
- case XK_Return: return QKreturn;
- case XK_Escape: return QKescape;
- case XK_space: return QKspace;
- case XK_Delete: return QKdelete;
- case 0: return Qnil;
- default:
- if (simple_p) return Qnil;
- /* !!#### not Mule-ized */
- name = XKeysymToString (keysym);
- if (!name || !name[0])
- /* This happens if there is a mismatch between the Xlib of
- XEmacs and the Xlib of the X server...
-
- Let's hard-code in some knowledge of common keysyms introduced
- in recent X11 releases. Snarfed from X11/keysymdef.h
-
- Probably we should add some stuff here for X11R6. */
- switch (keysym)
- {
- case 0xFF95: return KEYSYM ("kp-home");
- case 0xFF96: return KEYSYM ("kp-left");
- case 0xFF97: return KEYSYM ("kp-up");
- case 0xFF98: return KEYSYM ("kp-right");
- case 0xFF99: return KEYSYM ("kp-down");
- case 0xFF9A: return KEYSYM ("kp-prior");
- case 0xFF9B: return KEYSYM ("kp-next");
- case 0xFF9C: return KEYSYM ("kp-end");
- case 0xFF9D: return KEYSYM ("kp-begin");
- case 0xFF9E: return KEYSYM ("kp-insert");
- case 0xFF9F: return KEYSYM ("kp-delete");
-
- case 0x1005FF10: return KEYSYM ("SunF36"); /* labeled F11 */
- case 0x1005FF11: return KEYSYM ("SunF37"); /* labeled F12 */
- default:
- {
- char buf [64];
- sprintf (buf, "unknown-keysym-0x%X", (int) keysym);
- return KEYSYM (buf);
- }
- }
- /* If it's got a one-character name, that's good enough. */
- if (!name[1])
- return make_char (name[0]);
-
- /* If it's in the "Keyboard" character set, downcase it.
- The case of those keysyms is too totally random for us to
- force anyone to remember them.
- The case of the other character sets is significant, however.
- */
- if ((((unsigned int) keysym) & (~0x1FF)) == ((unsigned int) 0xFE00))
- {
- char buf [255];
- char *s1, *s2;
- for (s1 = name, s2 = buf; *s1; s1++, s2++) {
- if (*s1 == '_') {
- *s2 = '-';
- } else {
- *s2 = tolower (* (unsigned char *) s1);
- }
- }
- *s2 = 0;
- return KEYSYM (buf);
- }
- return KEYSYM (name);
- }
-}
-
-static Lisp_Object
x_to_emacs_keysym (XKeyPressedEvent *event, int simple_p)
/* simple_p means don't try too hard (ASCII only) */
{
+ /* !!#### */
KeySym keysym = 0;
#ifdef HAVE_XIM
@@ -998,7 +399,7 @@
char dummy[256];
XLookupString (event, dummy, 200, &keysym, 0);
return (IsModifierKey (keysym) || keysym == XK_Mode_switch )
- ? Qnil : x_keysym_to_emacs_keysym (keysym, simple_p);
+ ? Qnil : xlike_keysym_to_emacs_keysym (keysym, simple_p);
}
#endif /* ! XIM_MOTIF */
@@ -1049,7 +450,7 @@
case XLookupKeySym:
case XLookupBoth:
return (IsModifierKey (keysym) || keysym == XK_Mode_switch )
- ? Qnil : x_keysym_to_emacs_keysym (keysym, simple_p);
+ ? Qnil : xlike_keysym_to_emacs_keysym (keysym, simple_p);
case XLookupChars:
{
@@ -1125,7 +526,6 @@
{
Display *display = x_event->xany.display;
struct device *d = get_device_from_display (display);
- struct x_device *xd = DEVICE_X_DATA (d);
if (DEVICE_X_BEING_DELETED (d))
/* #### Uh, is this 0 correct? */
@@ -1143,158 +543,17 @@
case KeyPress:
case ButtonPress:
case ButtonRelease:
- {
- int modifiers = 0;
- int shift_p, lock_p;
- Bool key_event_p = (x_event->type == KeyPress);
- unsigned int *state =
- key_event_p ? &x_event->xkey.state : &x_event->xbutton.state;
-
- /* If this is a synthetic KeyPress or Button event, and the user
- has expressed a disinterest in this security hole, then drop
- it on the floor. */
- if ((key_event_p
- ? x_event->xkey.send_event
- : x_event->xbutton.send_event)
-#ifdef EXTERNAL_WIDGET
- /* ben: events get sent to an ExternalShell using XSendEvent.
- This is not a perfect solution. */
- && !FRAME_X_EXTERNAL_WINDOW_P
- (x_any_window_to_frame (d, x_event->xany.window))
-#endif
- && !x_allow_sendevents)
- return 0;
-
- DEVICE_X_MOUSE_TIMESTAMP (d) =
- DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d) =
- key_event_p ? x_event->xkey.time : x_event->xbutton.time;
-
- x_handle_sticky_modifiers (x_event, d);
+ return xlike_key_event_to_emacs_event
+ (x_window_to_frame (d, x_event->xany.window),
+ d, x_event, emacs_event);
- if (*state & ControlMask) modifiers |= XEMACS_MOD_CONTROL;
- if (*state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
- if (*state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
- if (*state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
- if (*state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
- {
- int numero_de_botao = -1;
-
- if (!key_event_p)
- numero_de_botao = x_event->xbutton.button;
-
- /* the button gets noted either in the button or the modifiers
- field, but not both. */
- if (numero_de_botao != 1 && (*state & Button1Mask))
- modifiers |= XEMACS_MOD_BUTTON1;
- if (numero_de_botao != 2 && (*state & Button2Mask))
- modifiers |= XEMACS_MOD_BUTTON2;
- if (numero_de_botao != 3 && (*state & Button3Mask))
- modifiers |= XEMACS_MOD_BUTTON3;
- if (numero_de_botao != 4 && (*state & Button4Mask))
- modifiers |= XEMACS_MOD_BUTTON4;
- if (numero_de_botao != 5 && (*state & Button5Mask))
- modifiers |= XEMACS_MOD_BUTTON5;
- }
-
- /* Ignore the Caps_Lock key if:
- - any other modifiers are down, so that Caps_Lock doesn't
- turn C-x into C-X, which would suck.
- - the event was a mouse event. */
- if (modifiers || ! key_event_p)
- *state &= (~LockMask);
-
- shift_p = *state & ShiftMask;
- lock_p = *state & LockMask;
-
- if (shift_p || lock_p)
- modifiers |= XEMACS_MOD_SHIFT;
-
- if (key_event_p)
- {
- Lisp_Object keysym;
- XKeyEvent *ev = &x_event->xkey;
- /* This used to compute the frame from the given X window and
- store it here, but we really don't care about the frame. */
- SET_EVENT_CHANNEL (emacs_event, DEVICE_CONSOLE (d));
- keysym = x_to_emacs_keysym (&x_event->xkey, 0);
-
- /* If the emacs keysym is nil, then that means that the X
- keysym was either a Modifier or NoSymbol, which
- probably means that we're in the midst of reading a
- Multi_key sequence, or a "dead" key prefix, or XIM
- input. Ignore it. */
- if (NILP (keysym))
- return 0;
-
- /* More Caps_Lock garbage: Caps_Lock should *only* add the
- shift modifier to two-case keys (that is, A-Z and
- related characters). So at this point (after looking up
- the keysym) if the keysym isn't a dual-case alphabetic,
- and if the caps lock key was down but the shift key
- wasn't, then turn off the shift modifier. Gag barf */
- /* #### type lossage: assuming equivalence of emacs and
- X keysyms */
- /* !!#### maybe fix for Mule */
- if (lock_p && !shift_p &&
- ! (CHAR_OR_CHAR_INTP (keysym)
- && keysym_obeys_caps_lock_p
- ((KeySym) XCHAR_OR_CHAR_INT (keysym), d)))
- modifiers &= (~XEMACS_MOD_SHIFT);
-
- /* If this key contains two distinct keysyms, that is,
- "shift" generates a different keysym than the
- non-shifted key, then don't apply the shift modifier
- bit: it's implicit. Otherwise, if there would be no
- other way to tell the difference between the shifted
- and unshifted version of this key, apply the shift bit.
- Non-graphics, like Backspace and F1 get the shift bit
- in the modifiers slot. Neither the characters "a",
- "A", "2", nor "@" normally have the shift bit
set.
- However, "F1" normally does. */
- if (modifiers & XEMACS_MOD_SHIFT)
- {
- int Mode_switch_p = *state & xd->ModeMask;
- KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0);
- KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1);
- if (top && bot && top != bot)
- modifiers &= ~XEMACS_MOD_SHIFT;
- }
- set_event_type (emacs_event, key_press_event);
- SET_EVENT_TIMESTAMP (emacs_event, ev->time);
- SET_EVENT_KEY_MODIFIERS (emacs_event, modifiers);
- SET_EVENT_KEY_KEYSYM (emacs_event, keysym);
- }
- else /* Mouse press/release event */
- {
- XButtonEvent *ev = &x_event->xbutton;
- struct frame *frame = x_window_to_frame (d, ev->window);
-
- if (! frame)
- return 0; /* not for us */
- set_event_type (emacs_event, (x_event->type == ButtonPress) ?
- button_press_event : button_release_event);
- SET_EVENT_CHANNEL (emacs_event, wrap_frame (frame));
-
- SET_EVENT_BUTTON_MODIFIERS (emacs_event, modifiers);
- SET_EVENT_TIMESTAMP (emacs_event, ev->time);
- SET_EVENT_BUTTON_BUTTON (emacs_event, ev->button);
- SET_EVENT_BUTTON_X (emacs_event, ev->x);
- SET_EVENT_BUTTON_Y (emacs_event, ev->y);
- /* because we don't seem to get a FocusIn event for button clicks
- when a widget-glyph is selected we will assume that we want the
- focus if a button gets pressed. */
- if (x_event->type == ButtonPress)
- handle_focus_event_1 (frame, 1);
- }
- }
- break;
-
case MotionNotify:
{
XMotionEvent *ev = &x_event->xmotion;
struct frame *frame = x_window_to_frame (d, ev->window);
int modifiers = 0;
XMotionEvent event2;
+ struct xlike_event_key_data *xk = &(DEVICE_X_DATA (d)->key);
if (! frame)
return 0; /* not for us */
@@ -1323,10 +582,10 @@
SET_EVENT_MOTION_Y (emacs_event, ev->y);
if (ev->state & ShiftMask) modifiers |= XEMACS_MOD_SHIFT;
if (ev->state & ControlMask) modifiers |= XEMACS_MOD_CONTROL;
- if (ev->state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
- if (ev->state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
- if (ev->state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
- if (ev->state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
+ if (ev->state & xk->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (ev->state & xk->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (ev->state & xk->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (ev->state & xk->AltMask) modifiers |= XEMACS_MOD_ALT;
if (ev->state & Button1Mask) modifiers |= XEMACS_MOD_BUTTON1;
if (ev->state & Button2Mask) modifiers |= XEMACS_MOD_BUTTON2;
if (ev->state & Button3Mask) modifiers |= XEMACS_MOD_BUTTON3;
@@ -1431,6 +690,7 @@
to tm...
*/
l_type = Qdragdrop_MIME;
+ /* !!#### Qbinary is unlikely to be correct */
l_dndlist = list1 (build_ext_string (data, Qbinary));
break;
case DndFile:
@@ -1448,8 +708,8 @@
case DndURL:
/* as it is a real URL it should already be escaped
and escaping again will break them (cause % is unsave) */
- l_dndlist = list1 (build_ext_string (data,
- Qfile_name));
+ l_dndlist =
+ list1 (build_ext_string (data, Qoffix_dnd_encoding));
l_type = Qdragdrop_URL;
break;
default: /* Unknown, RawData and any other type */
@@ -2411,30 +1671,32 @@
*err_usid = USID_DONTHASH;
}
+#if 0 /* #### */
+
/* This is called from GC when a process object is about to be freed.
If we've still got pointers to it in this file, we're gonna lose hard.
*/
void
debug_process_finalization (Lisp_Process *UNUSED (p))
{
-#if 0 /* #### */
int i;
Lisp_Object instr, outstr, errstr;
get_process_streams (p, &instr, &outstr, &errstr);
/* if it still has fds, then it hasn't been killed yet. */
- assert (NILP(instr));
- assert (NILP(outstr));
- assert (NILP(errstr));
+ assert (NILP (instr));
+ assert (NILP (outstr));
+ assert (NILP (errstr));
/* Better not still be in the "with input" table; we know it's got no
fds. */
for (i = 0; i < MAXDESC; i++)
{
Lisp_Object process = filedesc_fds_with_input [i];
assert (!PROCESSP (process) || XPROCESS (process) != p);
}
-#endif
}
+#endif
+
static void
Xt_process_to_emacs_event (Lisp_Event *emacs_event)
{
@@ -3013,7 +2275,7 @@
/* JH: We use this because I think there's a possibility this
is called before the device is properly set up, in which case
- I don't want to abort. */
+ I don't want to ABORT. */
extern struct device *get_device_from_display_1 (Display *dpy);
static
@@ -3077,7 +2339,8 @@
} else {
status = XParseColor (dpy, colormap, (char*)str, &screenColor);
if (status) {
- status = allocate_nearest_color (dpy, colormap, visual, &screenColor);
+ status = x_allocate_nearest_color (dpy, colormap, visual,
+ &screenColor);
}
}
} else {
@@ -3175,8 +2438,6 @@
void
syms_of_event_Xt (void)
{
- DEFSYMBOL (Qkey_mapping);
- DEFSYMBOL (Qsans_modifiers);
DEFSYMBOL (Qself_insert_command);
}
1.30.2.1 +41 -614 XEmacs/xemacs/src/event-gtk.c
Index: event-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-gtk.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- event-gtk.c 2005/01/24 23:33:52 1.30
+++ event-gtk.c 2005/02/15 01:20:03 1.30.2.1
@@ -1,7 +1,7 @@
/* The event_stream interface for X11 with gtk, and/or tty frames.
Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2005 Ben Wing.
Copyright (C) 2000 William Perry.
This file is part of XEmacs.
@@ -86,17 +86,14 @@
extern SELECT_TYPE input_wait_mask, non_fake_input_wait_mask;
extern SELECT_TYPE process_only_mask, tty_only_mask;
-static Lisp_Object gtk_keysym_to_emacs_keysym (guint keysym, int simple_p);
-void debug_process_finalization (struct Lisp_Process *p);
gboolean emacs_gtk_event_handler (GtkWidget *wid /* unused */,
GdkEvent *event,
gpointer closure /* unused */);
+static Lisp_Object gtk_to_emacs_keysym (struct device *d, GdkEventKey *event,
+ int simple_p);
static int last_quit_check_signal_tick_count;
-Lisp_Object Qkey_mapping;
-Lisp_Object Qsans_modifiers;
-
/*
* Identify if the keysym is a modifier. This implementation mirrors x.org's
* IsModifierKey(), but for GDK keysyms.
@@ -135,13 +132,13 @@
*/
if (in_p)
- {
+ {
GTK_WIDGET_SET_FLAGS (FRAME_GTK_TEXT_WIDGET (f), GTK_HAS_FOCUS);
- }
+ }
else
- {
+ {
GTK_WIDGET_UNSET_FLAGS (FRAME_GTK_TEXT_WIDGET (f), GTK_HAS_FOCUS);
- }
+ }
gtk_widget_grab_focus (FRAME_GTK_TEXT_WIDGET (f));
gtk_widget_draw_focus (FRAME_GTK_TEXT_WIDGET (f));
@@ -233,9 +230,10 @@
{
Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (emacs_event));
if (CONSOLE_GTK_P (XCONSOLE (console)))
- write_c_string
+ write_string
(pstream,
- gtk_event_name (EVENT_MAGIC_GDK_EVENT (emacs_event).type));
+ GTK_TEXT_TO_C_STRING
+ (gtk_event_name (EVENT_MAGIC_GDK_EVENT (emacs_event).type)));
}
static int
@@ -334,26 +332,6 @@
/* Gtk to Emacs event conversion */
/************************************************************************/
-static int
-keysym_obeys_caps_lock_p (guint sym, struct device *d)
-{
- struct gtk_device *gd = DEVICE_GTK_DATA (d);
- /* Eeeeevil hack. Don't apply Caps_Lock to things that aren't alphabetic
- characters, where "alphabetic" means something more than simply A-Z.
- That is, if Caps_Lock is down, typing ESC doesn't produce Shift-ESC.
- But if shift-lock is down, then it does. */
- if (gd->lock_interpretation == GDK_Shift_Lock)
- return 1;
-
- return
- ((sym >= GDK_A) && (sym <= GDK_Z)) ||
- ((sym >= GDK_a) && (sym <= GDK_z)) ||
- ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis)) ||
- ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis)) ||
- ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn)) ||
- ((sym >= GDK_oslash) && (sym <= GDK_thorn));
-}
-
static void
set_last_server_timestamp (struct device *d, GdkEvent *gdk_event)
{
@@ -379,90 +357,6 @@
}
static Lisp_Object
-gtk_keysym_to_emacs_keysym (guint keysym, int simple_p)
-{
- char *name;
- if (keysym >= GDK_exclam && keysym <= GDK_asciitilde)
- /* We must assume that the X keysym numbers for the ASCII graphic
- characters are the same as their ASCII codes. */
- return make_char (keysym);
-
- switch (keysym)
- {
- /* These would be handled correctly by the default case, but by
- special-casing them here we don't garbage a string or call
- intern(). */
- case GDK_BackSpace: return QKbackspace;
- case GDK_Tab: return QKtab;
- case GDK_Linefeed: return QKlinefeed;
- case GDK_Return: return QKreturn;
- case GDK_Escape: return QKescape;
- case GDK_space: return QKspace;
- case GDK_Delete: return QKdelete;
- case 0: return Qnil;
- default:
- if (simple_p) return Qnil;
- /* !!#### not Mule-ized */
- name = gdk_keyval_name (keysym);
- if (!name || !name[0])
- /* This happens if there is a mismatch between the Xlib of
- XEmacs and the Xlib of the X server...
-
- Let's hard-code in some knowledge of common keysyms introduced
- in recent X11 releases. Snarfed from X11/keysymdef.h
-
- Probably we should add some stuff here for X11R6. */
- switch (keysym)
- {
- case 0xFF95: return KEYSYM ("kp-home");
- case 0xFF96: return KEYSYM ("kp-left");
- case 0xFF97: return KEYSYM ("kp-up");
- case 0xFF98: return KEYSYM ("kp-right");
- case 0xFF99: return KEYSYM ("kp-down");
- case 0xFF9A: return KEYSYM ("kp-prior");
- case 0xFF9B: return KEYSYM ("kp-next");
- case 0xFF9C: return KEYSYM ("kp-end");
- case 0xFF9D: return KEYSYM ("kp-begin");
- case 0xFF9E: return KEYSYM ("kp-insert");
- case 0xFF9F: return KEYSYM ("kp-delete");
-
- case 0x1005FF10: return KEYSYM ("SunF36"); /* labeled F11 */
- case 0x1005FF11: return KEYSYM ("SunF37"); /* labeled F12 */
- default:
- {
- char buf [64];
- sprintf (buf, "unknown-keysym-0x%X", (int) keysym);
- return KEYSYM (buf);
- }
- }
- /* If it's got a one-character name, that's good enough. */
- if (!name[1])
- return make_char (name[0]);
-
- /* If it's in the "Keyboard" character set, downcase it.
- The case of those keysyms is too totally random for us to
- force anyone to remember them.
- The case of the other character sets is significant, however.
- */
- if ((((unsigned int) keysym) & (~0x1FF)) == ((unsigned int) 0xFE00))
- {
- char buf [255];
- char *s1, *s2;
- for (s1 = name, s2 = buf; *s1; s1++, s2++) {
- if (*s1 == '_') {
- *s2 = '-';
- } else {
- *s2 = tolower (* (unsigned char *) s1);
- }
- }
- *s2 = 0;
- return KEYSYM (buf);
- }
- return KEYSYM (name);
- }
-}
-
-static Lisp_Object
gtk_to_emacs_keysym (struct device *d, GdkEventKey *event, int simple_p)
/* simple_p means don't try too hard (ASCII only) */
{
@@ -503,13 +397,13 @@
Lstream_delete (XLSTREAM (fb_instream));
if (IS_MODIFIER_KEY (event->keyval) || (event->keyval == GDK_Mode_switch))
return (Qnil);
- return (gtk_keysym_to_emacs_keysym (event->keyval, simple_p));
+ return (xlike_keysym_to_emacs_keysym (event->keyval, simple_p));
}
else
{
if (IS_MODIFIER_KEY (event->keyval) || (event->keyval == GDK_Mode_switch))
return (Qnil);
- return (gtk_keysym_to_emacs_keysym (event->keyval, simple_p));
+ return (xlike_keysym_to_emacs_keysym (event->keyval, simple_p));
}
}
@@ -860,29 +754,6 @@
*err_usid = USID_DONTHASH;
}
-/* This is called from GC when a process object is about to be freed.
- If we've still got pointers to it in this file, we're gonna lose hard.
- */
-void
-debug_process_finalization (struct Lisp_Process *UNUSED (p))
-{
-#if 0 /* #### */
- int i;
- Lisp_Object instr, outstr;
-
- get_process_streams (p, &instr, &outstr);
- /* if it still has fds, then it hasn't been killed yet. */
- assert (NILP(instr));
- assert (NILP(outstr));
- /* Better not still be in the "with input" table; we know it's got no
fds. */
- for (i = 0; i < MAXDESC; i++)
- {
- Lisp_Object process = filedesc_fds_with_input [i];
- assert (!PROCESSP (process) || XPROCESS (process) != p);
- }
-#endif
-}
-
static void
gtk_process_to_emacs_event (struct Lisp_Event *emacs_event)
{
@@ -992,6 +863,7 @@
Lisp_Object l_type = Qnil, l_data = Qnil;
Lisp_Object l_dndlist = Qnil, l_item = Qnil;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
+ const Extbyte *string_data = (Extbyte *) data->data;
GCPRO4 (l_type, l_data, l_dndlist, l_item);
@@ -1005,7 +877,6 @@
{
/* newline-separated list of URLs */
int start, end;
- const char *string_data = (char *) data->data;
l_type = Qdragdrop_URL;
@@ -1013,7 +884,8 @@
{
if ((string_data[end] == '\r') && (string_data[end+1] ==
'\n'))
{
- l_item = make_string (&string_data[start], end - start);
+ l_item = make_ext_string (&string_data[start], end - start,
+ Vgtk_text_encoding);
l_dndlist = Fcons (l_item, l_dndlist);
++end;
start = ++end;
@@ -1026,25 +898,27 @@
l_type = Qdragdrop_MIME;
l_dndlist = list1 (list3 (list1 (build_string ("text/plain")),
build_string ("8_bit"),
- make_ext_string (data->data,
- strlen ((char *)data->data),
- Qctext)));
+ build_ext_string (string_data,
+ Vgtk_text_encoding)));
}
else if (data->type == preferred_targets[TARGET_FILE_NAME])
{
/* Random filename */
- char *hurl = dnd_url_hexify_string (data->data, "file:");
+ Ibyte *hurl =
+ dnd_url_hexify_string
+ /* !!#### Qfile_name might be better? */
+ (NEW_EXTERNAL_TO_C_STRING (string_data, Vgtk_text_encoding),
+ (const Ibyte *) "file:");
- l_dndlist = list1 (make_string ((Ibyte *)hurl, strlen (hurl)));
+ l_dndlist = list1 (build_intstring (hurl));
l_type = Qdragdrop_URL;
- xfree (hurl, char *);
+ xfree (hurl, Ibyte *);
}
else if (data->type == preferred_targets[TARGET_NETSCAPE])
{
/* Single URL */
- l_dndlist = list1 (make_string ((Extbyte *)data->data,
- strlen ((char *)data->data)));
+ l_dndlist = list1 (build_ext_string (string_data, Vgtk_text_encoding));
l_type = Qdragdrop_URL;
}
else
@@ -1053,9 +927,12 @@
We just pass it up to lisp - we already have a mime type.
*/
l_type = Qdragdrop_MIME;
- l_dndlist = list1 (list3 (list1 (build_string (gdk_atom_name (data->type))),
+ l_dndlist = list1 (list3 (list1
+ (build_ext_string
+ (gdk_atom_name (data->type),
+ Vgtk_text_encoding)),
build_string ("8bit"),
- make_ext_string ((Extbyte *) data->data,
+ make_ext_string (string_data,
data->length, Qbinary)));
}
@@ -1219,7 +1096,8 @@
}
int
-gtk_event_to_emacs_event (struct frame *frame, GdkEvent *gdk_event, struct Lisp_Event
*emacs_event)
+gtk_event_to_emacs_event (struct frame *frame, GdkEvent *gdk_event,
+ Lisp_Event *emacs_event)
{
struct device *d = NULL;
struct gtk_device *gd = NULL;
@@ -1281,165 +1159,17 @@
}
/* Fall through */
case GDK_KEY_PRESS:
- {
- unsigned int modifiers = 0;
- int shift_p, lock_p;
- gboolean key_event_p = (gdk_event->type == GDK_KEY_PRESS);
- unsigned int *state =
- key_event_p ? &gdk_event->key.state : &gdk_event->button.state;
-
- /* If this is a synthetic KeyPress or Button event, and the user
- has expressed a disinterest in this security hole, then drop
- it on the floor. */
- /* #### BILL!!! Should this be a generic check for ANY synthetic
- event? */
- if ((gdk_event->any.send_event) && !gtk_allow_sendevents)
- return 0;
-
- DEVICE_GTK_MOUSE_TIMESTAMP (d) =
- DEVICE_GTK_GLOBAL_MOUSE_TIMESTAMP (d) =
- key_event_p ? gdk_event->key.time : gdk_event->button.time;
-
- if (*state & GDK_CONTROL_MASK) modifiers |= XEMACS_MOD_CONTROL;
- if (*state & gd->MetaMask) modifiers |= XEMACS_MOD_META;
- if (*state & gd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
- if (*state & gd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
- if (*state & gd->AltMask) modifiers |= XEMACS_MOD_ALT;
-
- {
- int numero_de_botao = -1;
-
- if (!key_event_p)
- numero_de_botao = gdk_event->button.button;
-
- /* the button gets noted either in the button or the modifiers
- field, but not both. */
- if (numero_de_botao != 1 && (*state & GDK_BUTTON1_MASK))
- modifiers |= XEMACS_MOD_BUTTON1;
- if (numero_de_botao != 2 && (*state & GDK_BUTTON2_MASK))
- modifiers |= XEMACS_MOD_BUTTON2;
- if (numero_de_botao != 3 && (*state & GDK_BUTTON3_MASK))
- modifiers |= XEMACS_MOD_BUTTON3;
- if (numero_de_botao != 4 && (*state & GDK_BUTTON4_MASK))
- modifiers |= XEMACS_MOD_BUTTON4;
- if (numero_de_botao != 5 && (*state & GDK_BUTTON5_MASK))
- modifiers |= XEMACS_MOD_BUTTON5;
- }
-
- /* Ignore the Caps_Lock key if:
- - any other modifiers are down, so that Caps_Lock doesn't
- turn C-x into C-X, which would suck.
- - the event was a mouse event. */
- if (modifiers || ! key_event_p)
- *state &= (~GDK_LOCK_MASK);
-
- shift_p = *state & GDK_SHIFT_MASK;
- lock_p = *state & GDK_LOCK_MASK;
-
- if (shift_p || lock_p)
- modifiers |= XEMACS_MOD_SHIFT;
-
- if (key_event_p)
- {
- GdkEventKey *key_event = &gdk_event->key;
- Lisp_Object keysym;
-
-#ifdef HAVE_MENUBARS
- /* If the user wants see if the event is a menu bar accelerator.
- The process of checking absorbs the event and starts menu
- processing so send a null event into XEmacs to make sure it
- does nothing.
- */
- if (!NILP (Vmenu_accelerator_enabled)
- && gtk_accel_groups_activate(GTK_OBJECT (FRAME_GTK_SHELL_WIDGET(frame)),
- key_event->keyval,
- (GdkModifierType) *state))
- {
- zero_event(emacs_event);
- return 1;
- }
-#endif
-
- /* This used to compute the frame from the given X window and
- store it here, but we really don't care about the frame. */
- emacs_event->channel = DEVICE_CONSOLE (d);
-
- /* Keysym mucking has already been done inside the
- GdkEventKey parsing */
- keysym = gtk_to_emacs_keysym (d, key_event, 0);
-
- /* If the emacs keysym is nil, then that means that the X
- keysym was either a Modifier or NoSymbol, which
- probably means that we're in the midst of reading a
- Multi_key sequence, or a "dead" key prefix, or XIM
- input. Ignore it. */
- if (NILP (keysym))
- return 0;
-
- /* More Caps_Lock garbage: Caps_Lock should *only* add the
- shift modifier to two-case keys (that is, A-Z and
- related characters). So at this point (after looking up
- the keysym) if the keysym isn't a dual-case alphabetic,
- and if the caps lock key was down but the shift key
- wasn't, then turn off the shift modifier. Gag barf */
- /* #### type lossage: assuming equivalence of emacs and
- X keysyms */
- /* !!#### maybe fix for Mule */
- if (lock_p && !shift_p &&
- ! (CHAR_OR_CHAR_INTP (keysym)
- && keysym_obeys_caps_lock_p
- ((guint) XCHAR_OR_CHAR_INT (keysym), d)))
- modifiers &= (~XEMACS_MOD_SHIFT);
-
- /* If this key contains two distinct keysyms, that is,
- "shift" generates a different keysym than the
- non-shifted key, then don't apply the shift modifier
- bit: it's implicit. Otherwise, if there would be no
- other way to tell the difference between the shifted
- and unshifted version of this key, apply the shift bit.
- Non-graphics, like Backspace and F1 get the shift bit
- in the modifiers slot. Neither the characters "a",
- "A", "2", nor "@" normally have the shift bit
set.
- However, "F1" normally does. */
- if (modifiers & XEMACS_MOD_SHIFT)
- {
- if (CHAR_OR_CHAR_INTP (keysym))
- {
- modifiers &= ~XEMACS_MOD_SHIFT;
- }
- }
-
- set_event_type (emacs_event, key_press_event);
- SET_EVENT_TIMESTAMP (emacs_event, key_event->time);
- SET_EVENT_KEY_MODIFIERS (emacs_event, modifiers);
- SET_EVENT_KEY_KEYSYM (emacs_event, keysym);
- }
- else /* Mouse press/release event */
- {
- GdkEventButton *button_event = &gdk_event->button;
-
- set_event_type (emacs_event,
- button_event->type == GDK_BUTTON_RELEASE ?
- button_release_event : button_press_event);
- SET_EVENT_CHANNEL (emacs_event, wrap_frame (frame));
-
- SET_EVENT_BUTTON_MODIFIERS (emacs_event, modifiers);
- SET_EVENT_TIMESTAMP (emacs_event, button_event->time);
- SET_EVENT_BUTTON_BUTTON (emacs_event, button_event->button);
- SET_EVENT_BUTTON_X (emacs_event, (int) button_event->x);
- SET_EVENT_BUTTON_Y (emacs_event, (int) button_event->y);
- }
- }
- break;
+ return xlike_key_event_to_emacs_event (frame, d, gdk_event, emacs_event);
case GDK_KEY_RELEASE:
- return 0;
- break;
+ return 0;
+ break;
case GDK_MOTION_NOTIFY:
{
GdkEventMotion *ev = &gdk_event->motion;
unsigned int modifiers = 0;
gint x,y;
GdkModifierType mask;
+ struct xlike_event_key_data *xk = &(DEVICE_GTK_DATA (d)->key);
/* We use MOTION_HINT_MASK, so we will get only one motion
event until the next time we call gdk_window_get_pointer or
@@ -1461,10 +1191,10 @@
if (mask & GDK_SHIFT_MASK) modifiers |= XEMACS_MOD_SHIFT;
if (mask & GDK_CONTROL_MASK) modifiers |= XEMACS_MOD_CONTROL;
- if (mask & gd->MetaMask) modifiers |= XEMACS_MOD_META;
- if (mask & gd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
- if (mask & gd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
- if (mask & gd->AltMask) modifiers |= XEMACS_MOD_ALT;
+ if (mask & xk->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (mask & xk->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (mask & xk->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (mask & xk->AltMask) modifiers |= XEMACS_MOD_ALT;
if (mask & GDK_BUTTON1_MASK) modifiers |= XEMACS_MOD_BUTTON1;
if (mask & GDK_BUTTON2_MASK) modifiers |= XEMACS_MOD_BUTTON2;
if (mask & GDK_BUTTON3_MASK) modifiers |= XEMACS_MOD_BUTTON3;
@@ -1627,8 +1357,6 @@
void
syms_of_event_gtk (void)
{
- DEFSYMBOL (Qkey_mapping);
- DEFSYMBOL (Qsans_modifiers);
}
void
@@ -1689,309 +1417,8 @@
}
/* Bogus utility routines */
-static const char *
+static const gchar *
event_name (GdkEvent *ev)
{
return (gtk_event_name (ev->any.type));
}
-
-/* This is down at the bottom of the file so I can avoid polluting the
- generic code with this X specific CRAP! */
-
-#include <gdk/gdkx.h>
-#include <X11/keysym.h>
-/* #### BILL!!! Fix this please! */
-
-
-/************************************************************************/
-/* keymap handling */
-/************************************************************************/
-
-/* X bogusly doesn't define the interpretations of any bits besides
- ModControl, ModShift, and ModLock; so the Interclient Communication
- Conventions Manual says that we have to bend over backwards to figure
- out what the other modifier bits mean. According to ICCCM:
-
- - Any keycode which is assigned ModControl is a "control" key.
-
- - Any modifier bit which is assigned to a keycode which generates Meta_L
- or Meta_R is the modifier bit meaning "meta". Likewise for Super,
Hyper,
- etc.
-
- - Any keypress event which contains ModControl in its state should be
- interpreted as a "control" character.
-
- - Any keypress event which contains a modifier bit in its state which is
- generated by a keycode whose corresponding keysym is Meta_L or Meta_R
- should be interpreted as a "meta" character. Likewise for Super,
Hyper,
- etc.
-
- - It is illegal for a keysym to be associated with more than one modifier
- bit.
-
- This means that the only thing that emacs can reasonably interpret as a
- "meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
- one of the modifier bits Mod1-Mod5.
-
- Unfortunately, many keyboards don't have Meta keys in their default
- configuration. So, if there are no Meta keys, but there are "Alt" keys,
- emacs will interpret Alt as Meta. If there are both Meta and Alt keys,
- then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it
used to
- mean "Symbol," but that just confused the hell out of way too many
people).
-
- This works with the default configurations of the 19 keyboard-types I've
- checked.
-
- Emacs detects keyboard configurations which violate the above rules, and
- prints an error message on the standard-error-output. (Perhaps it should
- use a pop-up-window instead.)
- */
-
-static void
-gtk_reset_key_mapping (struct device *d)
-{
- Display *display = GDK_DISPLAY ();
- struct gtk_device *xd = DEVICE_GTK_DATA (d);
- KeySym *keysym, *keysym_end;
- Lisp_Object hashtable;
- int key_code_count, keysyms_per_code;
-
- if (xd->x_keysym_map)
- XFree ((char *) xd->x_keysym_map);
- XDisplayKeycodes (display,
- &xd->x_keysym_map_min_code,
- &xd->x_keysym_map_max_code);
- key_code_count = xd->x_keysym_map_max_code - xd->x_keysym_map_min_code + 1;
- xd->x_keysym_map =
- XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count,
- &xd->x_keysym_map_keysyms_per_code);
-
- hashtable = xd->x_keysym_map_hashtable;
- if (HASH_TABLEP (hashtable))
- {
- Fclrhash (hashtable);
- }
- else
- {
- xd->x_keysym_map_hashtable = hashtable =
- make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
- }
-
- for (keysym = xd->x_keysym_map,
- keysyms_per_code = xd->x_keysym_map_keysyms_per_code,
- keysym_end = keysym + (key_code_count * keysyms_per_code);
- keysym < keysym_end;
- keysym += keysyms_per_code)
- {
- int j;
-
- if (keysym[0] == NoSymbol)
- continue;
-
- {
- Extbyte *name = XKeysymToString (keysym[0]);
- Lisp_Object sym = gtk_keysym_to_emacs_keysym (keysym[0], 0);
- if (name)
- {
- Fputhash (build_ext_string (name, Qnative), Qsans_modifiers,
- hashtable);
- Fputhash (sym, Qsans_modifiers, hashtable);
- }
- }
-
- for (j = 1; j < keysyms_per_code; j++)
- {
- if (keysym[j] != keysym[0] &&
- keysym[j] != NoSymbol)
- {
- Extbyte *name = XKeysymToString (keysym[j]);
- Lisp_Object sym = gtk_keysym_to_emacs_keysym (keysym[j], 0);
- if (name && NILP (Fgethash (sym, hashtable, Qnil)))
- {
- Fputhash (build_ext_string (name, Qnative), Qt, hashtable);
- Fputhash (sym, Qt, hashtable);
- }
- }
- }
- }
-}
-
-static const char *
-index_to_name (int indice)
-{
- switch (indice)
- {
- case ShiftMapIndex: return "ModShift";
- case LockMapIndex: return "ModLock";
- case ControlMapIndex: return "ModControl";
- case Mod1MapIndex: return "Mod1";
- case Mod2MapIndex: return "Mod2";
- case Mod3MapIndex: return "Mod3";
- case Mod4MapIndex: return "Mod4";
- case Mod5MapIndex: return "Mod5";
- default: return "???";
- }
-}
-
-/* Boy, I really wish C had local functions... */
-struct c_doesnt_have_closures /* #### not yet used */
-{
- int warned_about_overlapping_modifiers;
- int warned_about_predefined_modifiers;
- int warned_about_duplicate_modifiers;
- int meta_bit;
- int hyper_bit;
- int super_bit;
- int alt_bit;
- int mode_bit;
-};
-
-static void
-gtk_reset_modifier_mapping (struct device *d)
-{
- Display *display = GDK_DISPLAY ();
- struct gtk_device *xd = DEVICE_GTK_DATA (d);
- int modifier_index, modifier_key, column, mkpm;
- int warned_about_overlapping_modifiers = 0;
- /* int warned_about_predefined_modifiers = 0; */
- /* int warned_about_duplicate_modifiers = 0; */
- int meta_bit = 0;
- int hyper_bit = 0;
- int super_bit = 0;
- int alt_bit = 0;
- int mode_bit = 0;
- XModifierKeymap *map = (XModifierKeymap *) xd->x_modifier_keymap;
-
- xd->lock_interpretation = 0;
-
- if (map)
- XFreeModifiermap (map);
-
- gtk_reset_key_mapping (d);
-
- xd->x_modifier_keymap = map = XGetModifierMapping (display);
-
- /* Boy, I really wish C had local functions...
- */
-
- /* The call to warn_when_safe must be on the same line as the string or
- make-msgfile won't pick it up properly (the newline doesn't confuse
- it, but the backslash does). */
-
-#define store_modifier(name,old) \
- old = modifier_index;
-
- mkpm = map->max_keypermod;
- for (modifier_index = 0; modifier_index < 8; modifier_index++)
- for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
- KeySym last_sym = 0;
- for (column = 0; column < 4; column += 2) {
- KeyCode code = map->modifiermap[modifier_index * mkpm
- + modifier_key];
- KeySym sym = (code ? XKeycodeToKeysym (display, code, column) : 0);
- if (sym == last_sym) continue;
- last_sym = sym;
- switch (sym) {
- case XK_Mode_switch:store_modifier ("Mode_switch", mode_bit); break;
- case XK_Meta_L: store_modifier ("Meta_L", meta_bit); break;
- case XK_Meta_R: store_modifier ("Meta_R", meta_bit); break;
- case XK_Super_L: store_modifier ("Super_L", super_bit); break;
- case XK_Super_R: store_modifier ("Super_R", super_bit); break;
- case XK_Hyper_L: store_modifier ("Hyper_L", hyper_bit); break;
- case XK_Hyper_R: store_modifier ("Hyper_R", hyper_bit); break;
- case XK_Alt_L: store_modifier ("Alt_L", alt_bit); break;
- case XK_Alt_R: store_modifier ("Alt_R", alt_bit); break;
-#if 0
- case XK_Control_L: check_modifier ("Control_L", ControlMask); break;
- case XK_Control_R: check_modifier ("Control_R", ControlMask); break;
- case XK_Shift_L: check_modifier ("Shift_L", ShiftMask); break;
- case XK_Shift_R: check_modifier ("Shift_R", ShiftMask); break;
-#endif
- case XK_Shift_Lock: /* check_modifier ("Shift_Lock", LockMask); */
- xd->lock_interpretation = XK_Shift_Lock; break;
- case XK_Caps_Lock: /* check_modifier ("Caps_Lock", LockMask); */
- xd->lock_interpretation = XK_Caps_Lock; break;
-
- /* It probably doesn't make any sense for a modifier bit to be
- assigned to a key that is not one of the above, but OpenWindows
- assigns modifier bits to a couple of random function keys for
- no reason that I can discern, so printing a warning here would
- be annoying. */
- }
- }
- }
-#undef store_modifier
-#undef check_modifier
-#undef modwarn
-#undef modbarf
-
- /* If there was no Meta key, then try using the Alt key instead.
- If there is both a Meta key and an Alt key, then the Alt key
- is not disturbed and remains an Alt key. */
- if (! meta_bit && alt_bit)
- meta_bit = alt_bit, alt_bit = 0;
-
- /* mode_bit overrides everything, since it's processed down inside of
- XLookupString() instead of by us. If Meta and Mode_switch both
- generate the same modifier bit (which is an error), then we don't
- interpret that bit as Meta, because we can't make XLookupString()
- not interpret it as Mode_switch; and interpreting it as both would
- be totally wrong. */
- if (mode_bit)
- {
- const char *warn = 0;
- if (mode_bit == meta_bit) warn = "Meta", meta_bit = 0;
- else if (mode_bit == hyper_bit) warn = "Hyper", hyper_bit = 0;
- else if (mode_bit == super_bit) warn = "Super", super_bit = 0;
- else if (mode_bit == alt_bit) warn = "Alt", alt_bit = 0;
- if (warn)
- {
- warn_when_safe
- (Qkey_mapping, Qwarning,
- "XEmacs: %s is being used for both Mode_switch and %s.",
- index_to_name (mode_bit), warn),
- warned_about_overlapping_modifiers = 1;
- }
- }
-#undef index_to_name
-
- xd->MetaMask = (meta_bit ? (1 << meta_bit) : 0);
- xd->HyperMask = (hyper_bit ? (1 << hyper_bit) : 0);
- xd->SuperMask = (super_bit ? (1 << super_bit) : 0);
- xd->AltMask = (alt_bit ? (1 << alt_bit) : 0);
- xd->ModeMask = (mode_bit ? (1 << mode_bit) : 0); /* unused */
-
-}
-
-void
-gtk_init_modifier_mapping (struct device *d)
-{
- struct gtk_device *gd = DEVICE_GTK_DATA (d);
- gd->x_keysym_map_hashtable = Qnil;
- gd->x_keysym_map = NULL;
- gd->x_modifier_keymap = NULL;
- gtk_reset_modifier_mapping (d);
-}
-
-#if 0
-static int
-gtk_key_is_modifier_p (KeyCode keycode, struct device *d)
-{
- struct gtk_device *xd = DEVICE_GTK_DATA (d);
- KeySym *syms;
- KeySym *map = (KeySym *) xd->x_keysym_map;
- int i;
-
- if (keycode < xd->x_keysym_map_min_code ||
- keycode > xd->x_keysym_map_max_code)
- return 0;
-
- syms = &map [(keycode - xd->x_keysym_map_min_code) *
- xd->x_keysym_map_keysyms_per_code];
- for (i = 0; i < xd->x_keysym_map_keysyms_per_code; i++)
- if (IsModifierKey (syms [i]) ||
- syms [i] == XK_Mode_switch) /* why doesn't IsModifierKey count this? */
- return 1;
- return 0;
-}
-#endif
1.103.2.1 +16 -48 XEmacs/xemacs/src/event-msw.c
Index: event-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-msw.c,v
retrieving revision 1.103
retrieving revision 1.103.2.1
diff -u -r1.103 -r1.103.2.1
--- event-msw.c 2005/01/28 02:36:24 1.103
+++ event-msw.c 2005/02/15 01:20:04 1.103.2.1
@@ -1828,8 +1828,7 @@
token = Qnil;
GCPRO2 (name, token);
token = Fmake_symbol (name);
- TO_EXTERNAL_FORMAT (LISP_STRING, name, C_STRING_ALLOCA, str,
- Qmswindows_tstr);
+ LISP_STRING_TO_TSTR (name, str);
hsz = qxeDdeCreateStringHandle (mswindows_dde_mlid, str,
XEUNICODE_P ? CP_WINUNICODE : CP_WINANSI);
@@ -2019,10 +2018,9 @@
UNGCPRO;
bytes = (uFmt == CF_TEXT ? 1 : 2) * (XSTRING_LENGTH (res) + 1);
- TO_EXTERNAL_FORMAT (LISP_STRING, res,
- C_STRING_ALLOCA, result,
- uFmt == CF_TEXT ? Qmswindows_multibyte
- : Qmswindows_unicode);
+ LISP_STRING_TO_EXTERNAL (res, result,
+ uFmt == CF_TEXT ? Qmswindows_multibyte
+ : Qmswindows_unicode);
/* If we cannot create the data handle, this passes the null
* return back to the client, which signals an error as we wish.
@@ -2044,9 +2042,7 @@
/* Grab a pointer to the raw data supplied */
extcmd = DdeAccessData (hdata, &len);
- TO_INTERNAL_FORMAT (DATA, (extcmd, len),
- LISP_STRING, tmp,
- Qmswindows_tstr);
+ tmp = make_ext_string ((Extbyte *) extcmd, len, Qmswindows_tstr);
/* Release and free the data handle */
DdeUnaccessData (hdata);
@@ -2077,9 +2073,7 @@
DdeGetData (hdata, (LPBYTE) extcmd, len, 0);
DdeFreeDataHandle (hdata);
- TO_INTERNAL_FORMAT (DATA, (extcmd, len),
- C_STRING_ALLOCA, cmd,
- Qmswindows_tstr);
+ SIZED_EXTERNAL_TO_C_STRING (extcmd, len, cmd, Qmswindows_tstr);
/* Check syntax & that it's an [Open("foo")] command, which we
* treat like a file drop */
@@ -2731,9 +2725,8 @@
if (XEUNICODE_P)
{
length = unicode_char_to_text (tranmsg.wParam, extchar);
- TO_INTERNAL_FORMAT (DATA, (extchar, length),
- C_STRING_ALLOCA, (intchar),
- Qmswindows_unicode);
+ SIZED_EXTERNAL_TO_C_STRING (extchar, length,
+ intchar, Qmswindows_unicode);
ch = itext_ichar (intchar);
}
else
@@ -2848,11 +2841,9 @@
{
Ibyte *intchar;
- TO_INTERNAL_FORMAT
- (DATA,
- (received_keys + (tounret - 1) * 2, 2),
- C_STRING_ALLOCA, intchar,
- Qmswindows_unicode);
+ SIZED_EXTERNAL_TO_C_STRING
+ (received_keys + (tounret - 1) * 2, 2,
+ intchar, Qmswindows_unicode);
XSET_EVENT_KEY_ALT_KEYCHARS
(lastev, i, itext_ichar (intchar));
}
@@ -3720,9 +3711,9 @@
fname_ext = alloca_extbytes ((len + 1) * XETCHAR_SIZE);
qxeDragQueryFile ((HDROP) wParam, i, fname_ext, len + 1);
- TO_INTERNAL_FORMAT (DATA, (fname_ext, len * XETCHAR_SIZE),
- ALLOCA, (fname, fnamelen),
- Qmswindows_tstr);
+ SIZED_EXTERNAL_TO_SIZED_C_STRING (fname_ext, len * XETCHAR_SIZE,
+ fname, fnamelen,
+ Qmswindows_tstr);
/* May be a shell link aka "shortcut" - replace fname if so */
@@ -3783,9 +3774,8 @@
ImmGetCompositionStringW (imc, GCS_RESULTSTR, (WCHAR *) result, len);
ImmReleaseContext (hwnd, imc);
- TO_INTERNAL_FORMAT (DATA, (result, len),
- ALLOCA, (resultint, lenint),
- Qmswindows_tstr);
+ SIZED_EXTERNAL_TO_SIZED_C_STRING (result, len, resultint, lenint,
+ Qmswindows_tstr);
endptr = resultint + lenint;
@@ -4641,28 +4631,6 @@
{
return GetTickCount ();
}
-
-#ifndef HAVE_X_WINDOWS
-/* This is called from GC when a process object is about to be freed.
- If we've still got pointers to it in this file, we're gonna lose hard.
-*/
-void debug_process_finalization (Lisp_Process *p);
-void
-debug_process_finalization (Lisp_Process *UNUSED (p))
-{
-#if 0 /* #### */
- Lisp_Object instr, outstr, errstr;
-
- get_process_streams (p, &instr, &outstr, &errstr);
- /* if it still has fds, then it hasn't been killed yet. */
- assert (NILP (instr));
- assert (NILP (outstr));
- assert (NILP (errstr));
-
- /* #### More checks here */
-#endif
-}
-#endif
#ifdef DEBUG_XEMACS
1.87.2.1 +25 -9 XEmacs/xemacs/src/event-stream.c
Index: event-stream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-stream.c,v
retrieving revision 1.87
retrieving revision 1.87.2.1
diff -u -r1.87 -r1.87.2.1
--- event-stream.c 2005/01/24 23:33:53 1.87
+++ event-stream.c 2005/02/15 01:20:06 1.87.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1995, 1996, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -141,6 +141,8 @@
do not execute it; call disabled-command-hook's value instead. */
Lisp_Object Qdisabled;
+Lisp_Object QSin_event_pending_p;
+
/* Last keyboard or mouse input event read as a command. */
Lisp_Object Vlast_command_event;
@@ -257,7 +259,8 @@
Fixnum debug_emacs_events;
static void
-external_debugging_print_event (char *event_description, Lisp_Object event)
+external_debugging_print_event (Ascbyte *event_description,
+ Lisp_Object event)
{
write_c_string (Qexternal_debugging_output, "(");
write_c_string (Qexternal_debugging_output, event_description);
@@ -1116,7 +1119,7 @@
timeout_list = async_p ? &pending_async_timeout_list :
&pending_timeout_list;
/* Find the timeout on the list of pending ones. */
- LIST_LOOP (rest, *timeout_list)
+ OLD_LIST_LOOP (rest, *timeout_list)
{
timeout = XTIMEOUT (XCAR (rest));
if (timeout->interval_id == interval_id)
@@ -1188,7 +1191,7 @@
timeout_list = &pending_timeout_list;
/* Find the timeout on the list of pending ones, if it's still there. */
- LIST_LOOP (rest, *timeout_list)
+ OLD_LIST_LOOP (rest, *timeout_list)
{
timeout = XTIMEOUT (XCAR (rest));
if (timeout->id == id)
@@ -1225,7 +1228,7 @@
timeout_list = pending_timeout_list;
/* Find the element on the list of pending ones, if it's still there. */
- LIST_LOOP (rest, timeout_list)
+ OLD_LIST_LOOP (rest, timeout_list)
{
timeout = XTIMEOUT (XCAR (rest));
if (timeout->id == id)
@@ -1515,6 +1518,8 @@
/*
+Ben's capsule lecture on focus:
+
See also
(Info-goto-node "(internals)Focus Handling")
@@ -1762,11 +1767,20 @@
static int
event_stream_event_pending_p (int how_many)
{
+ int retval;
+ PROFILE_DECLARE ();
+
+ PROFILE_RECORD_ENTERING_SECTION (QSin_event_pending_p);
+
/* #### Hmmm ... There may be some duplication in "drain queue" and
"event pending". Couldn't we just drain the queue and see
what's in
it, and not maybe need a separate event method for this? Would this
- work when HOW_MANY is 0? Maybe this would be slow? */
- return event_stream && event_stream->event_pending_p (how_many);
+ work when USER is 0? Maybe this would be slow? */
+ retval = event_stream && event_stream->event_pending_p (how_many);
+
+ PROFILE_RECORD_EXITING_SECTION (QSin_event_pending_p);
+
+ return retval;
}
static void
@@ -4790,10 +4804,12 @@
last_point_position_buffer = Qnil;
staticpro (&last_point_position_buffer);
- QSnext_event_internal = build_string ("next_event_internal()");
+ QSnext_event_internal = build_msg_string ("next_event_internal()");
staticpro (&QSnext_event_internal);
- QSexecute_internal_event = build_string ("execute_internal_event()");
+ QSexecute_internal_event = build_msg_string ("execute_internal_event()");
staticpro (&QSexecute_internal_event);
+ QSin_event_pending_p = build_msg_string ("(in event-pending-p)");
+ staticpro (&QSin_event_pending_p);
DEFVAR_LISP ("echo-keystrokes", &Vecho_keystrokes /*
*Nonzero means echo unfinished commands after this many seconds of pause.
1.21.4.1 +1 -1 XEmacs/xemacs/src/event-unixoid.c
Index: event-unixoid.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-unixoid.c,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -u -r1.21 -r1.21.4.1
--- event-unixoid.c 2003/02/07 11:50:53 1.21
+++ event-unixoid.c 2005/02/15 01:20:08 1.21.4.1
@@ -333,7 +333,7 @@
return retval;
if (errno != EINTR)
{
- /* Something went seriously wrong; don't abort since maybe
+ /* Something went seriously wrong; don't ABORT since maybe
the TTY just died at the wrong time. */
stderr_out ("xemacs: select failed: errno = %d\n", errno);
return 0;
1.1.6.1 +275 -1 XEmacs/xemacs/src/event-xlike-inc.c
Index: event-xlike-inc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-xlike-inc.c,v
retrieving revision 1.1
retrieving revision 1.1.6.1
diff -u -r1.1 -r1.1.6.1
--- event-xlike-inc.c 2003/02/07 11:50:53 1.1
+++ event-xlike-inc.c 2005/02/15 01:20:09 1.1.6.1
@@ -1,7 +1,7 @@
/* Shared event code between X and GTK -- include file.
Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -26,6 +26,280 @@
at run-time. For other code it isn't. #### Perhaps all code should be
included here, not in event-xlike.c. However, event-xlike.c is always
X-specific, whereas the following code isn't, in the GTK case. */
+
+#ifdef THIS_IS_GTK
+#define WS_EVENT_TYPE GdkEvent
+#define WS_KEY_PRESS GDK_KEY_PRESS
+#define WS_BUTTON_PRESS GDK_BUTTON_PRESS
+#define WS_BUTTON_RELEASE GDK_BUTTON_RELEASE
+#define WS_CONTROL_MASK GDK_CONTROL_MASK
+#define WS_SHIFT_MASK GDK_SHIFT_MASK
+#define WS_LOCK_MASK GDK_LOCK_MASK
+#define WS_BUTTON1_MASK GDK_BUTTON1_MASK
+#define WS_BUTTON2_MASK GDK_BUTTON2_MASK
+#define WS_BUTTON3_MASK GDK_BUTTON3_MASK
+#define WS_BUTTON4_MASK GDK_BUTTON4_MASK
+#define WS_BUTTON5_MASK GDK_BUTTON5_MASK
+#define WSFIELD(z) z
+#define WS_EVENT_KEY_DATA(d) (&(DEVICE_GTK_DATA (d)->key))
+#else
+#define WS_EVENT_TYPE XEvent
+#define WS_KEY_PRESS KeyPress
+#define WS_BUTTON_PRESS ButtonPress
+#define WS_BUTTON_RELEASE ButtonRelease
+#define WS_CONTROL_MASK ControlMask
+#define WS_SHIFT_MASK ShiftMask
+#define WS_LOCK_MASK LockMask
+#define WS_BUTTON1_MASK Button1Mask
+#define WS_BUTTON2_MASK Button2Mask
+#define WS_BUTTON3_MASK Button3Mask
+#define WS_BUTTON4_MASK Button4Mask
+#define WS_BUTTON5_MASK Button5Mask
+#define WSFIELD(z) x##z
+#define WS_EVENT_KEY_DATA(d) (&(DEVICE_X_DATA (d)->key))
+#endif
+
+static int
+keysym_obeys_caps_lock_p (Ichar ch, struct device *d)
+{
+ struct xlike_event_key_data *xd = WS_EVENT_KEY_DATA (d);
+ /* Eeeeevil hack. Don't apply Caps_Lock to things that aren't alphabetic
+ characters, where "alphabetic" means something more than simply A-Z.
+ That is, if Caps_Lock is down, typing ESC doesn't produce Shift-ESC.
+ But if shift-lock is down, then it does. */
+ /* !!#### It is highly likely this needs to be rewritten for Mule.
+ This assumes equivalence of Ichar and keysym, which is totally wrong
+ outside of the Latin-1 range. */
+#ifdef THIS_IS_GTK
+ guint sym = (guint) ch;
+ if (xd->lock_interpretation == GDK_Shift_Lock)
+ return 1;
+
+ return
+ ((sym >= GDK_A) && (sym <= GDK_Z)) ||
+ ((sym >= GDK_a) && (sym <= GDK_z)) ||
+ ((sym >= GDK_Agrave) && (sym <= GDK_Odiaeresis)) ||
+ ((sym >= GDK_agrave) && (sym <= GDK_odiaeresis)) ||
+ ((sym >= GDK_Ooblique) && (sym <= GDK_Thorn)) ||
+ ((sym >= GDK_oslash) && (sym <= GDK_thorn));
+#else
+ KeySym sym = (KeySym) ch;
+ if (xd->lock_interpretation == XK_Shift_Lock)
+ return 1;
+
+ return
+ ((sym >= XK_A) && (sym <= XK_Z)) ||
+ ((sym >= XK_a) && (sym <= XK_z)) ||
+ ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) ||
+ ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) ||
+ ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) ||
+ ((sym >= XK_oslash) && (sym <= XK_thorn));
+#endif
+}
+
+#endif /* THIS_IS_GTK */
+
+static int
+xlike_key_event_to_emacs_event (struct frame *f, struct device *d,
+ WS_EVENT_TYPE *wse, Lisp_Event *emacs_event)
+{
+ int modifiers = 0;
+ int shift_p, lock_p;
+ int key_event_p = (wse->type == WS_KEY_PRESS);
+ unsigned int *state =
+ key_event_p ? &wse->WSFIELD (key).state : &wse->WSFIELD
(button).state;
+ struct xlike_event_key_data *xd = WS_EVENT_KEY_DATA (d);
+
+ /* If this is a synthetic KeyPress or Button event, and the user
+ has expressed a disinterest in this security hole, then drop
+ it on the floor. */
+#ifndef THIS_IS_GTK
+ if ((key_event_p
+ ? wse->xkey.send_event
+ : wse->xbutton.send_event)
+#ifdef EXTERNAL_WIDGET
+ /* ben: events get sent to an ExternalShell using XSendEvent.
+ This is not a perfect solution. */
+ && !FRAME_X_EXTERNAL_WINDOW_P
+ (x_any_window_to_frame (d, wse->xany.window))
+#endif
+ && !x_allow_sendevents)
+#else /* THIS_IS_GTK */
+ /* #### BILL!!! Should this be a generic check for ANY synthetic
+ event? */
+ if ((wse->any.send_event) && !gtk_allow_sendevents)
+#endif /* THIS_IS_GTK */
+ return 0;
+
+#ifdef THIS_IS_GTK
+ DEVICE_GTK_MOUSE_TIMESTAMP (d) =
+ DEVICE_GTK_GLOBAL_MOUSE_TIMESTAMP (d) =
+#else
+ DEVICE_X_MOUSE_TIMESTAMP (d) =
+ DEVICE_X_GLOBAL_MOUSE_TIMESTAMP (d) =
+#endif /* THIS_IS_GTK */
+ key_event_p ? wse->WSFIELD (key).time : wse->WSFIELD (button).time;
+
+#ifndef THIS_IS_GTK
+ x_handle_sticky_modifiers (wse, d);
+#endif /* not THIS_IS_GTK */
+
+ if (*state & WS_CONTROL_MASK) modifiers |= XEMACS_MOD_CONTROL;
+ if (*state & xd->MetaMask) modifiers |= XEMACS_MOD_META;
+ if (*state & xd->SuperMask) modifiers |= XEMACS_MOD_SUPER;
+ if (*state & xd->HyperMask) modifiers |= XEMACS_MOD_HYPER;
+ if (*state & xd->AltMask) modifiers |= XEMACS_MOD_ALT;
+
+ {
+ int numero_de_botao = -1; /* botao = button in Ptg. */
+
+ if (!key_event_p)
+ numero_de_botao = wse->WSFIELD (button).button;
+
+ /* the button gets noted either in the button or the modifiers
+ field, but not both. */
+ if (numero_de_botao != 1 && (*state & WS_BUTTON1_MASK))
+ modifiers |= XEMACS_MOD_BUTTON1;
+ if (numero_de_botao != 2 && (*state & WS_BUTTON2_MASK))
+ modifiers |= XEMACS_MOD_BUTTON2;
+ if (numero_de_botao != 3 && (*state & WS_BUTTON3_MASK))
+ modifiers |= XEMACS_MOD_BUTTON3;
+ if (numero_de_botao != 4 && (*state & WS_BUTTON4_MASK))
+ modifiers |= XEMACS_MOD_BUTTON4;
+ if (numero_de_botao != 5 && (*state & WS_BUTTON5_MASK))
+ modifiers |= XEMACS_MOD_BUTTON5;
+ }
+
+ /* Ignore the Caps_Lock key if:
+ - any other modifiers are down, so that Caps_Lock doesn't
+ turn C-x into C-X, which would suck.
+ - the event was a mouse event. */
+ if (modifiers || ! key_event_p)
+ *state &= (~WS_LOCK_MASK);
+
+ shift_p = *state & WS_SHIFT_MASK;
+ lock_p = *state & WS_LOCK_MASK;
+
+ if (shift_p || lock_p)
+ modifiers |= XEMACS_MOD_SHIFT;
+
+ if (key_event_p)
+ {
+#ifndef THIS_IS_GTK
+ XKeyEvent *ev = &wse->xkey;
+#else /* THIS_IS_GTK */
+ GdkEventKey *ev = &wse->key;
+#endif /* THIS_IS_GTK */
+ Lisp_Object keysym;
+
+#if defined (THIS_IS_GTK) && defined (HAVE_MENUBARS)
+ /* If the user wants see if the event is a menu bar accelerator.
+ The process of checking absorbs the event and starts menu
+ processing so send a null event into XEmacs to make sure it
+ does nothing.
+ */
+ if (!NILP (Vmenu_accelerator_enabled)
+ && gtk_accel_groups_activate
+ (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)),
+ ev->keyval, (GdkModifierType) *state))
+ {
+ zero_event (emacs_event);
+ return 1;
+ }
+#endif
+
+ /* This used to compute the frame from the given X window and
+ store it here, but we really don't care about the frame. */
+ SET_EVENT_CHANNEL (emacs_event, DEVICE_CONSOLE (d));
+ /* Keysym mucking has already been done inside the
+ GdkEventKey parsing */
+#ifndef THIS_IS_GTK
+ keysym = x_to_emacs_keysym (&wse->xkey, 0);
+#else /* THIS_IS_GTK */
+ keysym = gtk_to_emacs_keysym (d, ev, 0);
+#endif /* THIS_IS_GTK */
+
+ /* If the emacs keysym is nil, then that means that the X
+ keysym was either a Modifier or NoSymbol, which
+ probably means that we're in the midst of reading a
+ Multi_key sequence, or a "dead" key prefix, or XIM
+ input. Ignore it. */
+ if (NILP (keysym))
+ return 0;
+
+ /* More Caps_Lock garbage: Caps_Lock should *only* add the
+ shift modifier to two-case keys (that is, A-Z and
+ related characters). So at this point (after looking up
+ the keysym) if the keysym isn't a dual-case alphabetic,
+ and if the caps lock key was down but the shift key
+ wasn't, then turn off the shift modifier. Gag barf */
+ /* #### type lossage: assuming equivalence of emacs and
+ X keysyms */
+ /* !!#### maybe fix for Mule */
+ if (lock_p && !shift_p &&
+ ! (CHAR_OR_CHAR_INTP (keysym)
+ && keysym_obeys_caps_lock_p (XCHAR_OR_CHAR_INT (keysym), d)))
+ modifiers &= (~XEMACS_MOD_SHIFT);
+
+ /* If this key contains two distinct keysyms, that is,
+ "shift" generates a different keysym than the
+ non-shifted key, then don't apply the shift modifier
+ bit: it's implicit. Otherwise, if there would be no
+ other way to tell the difference between the shifted
+ and unshifted version of this key, apply the shift bit.
+ Non-graphics, like Backspace and F1 get the shift bit
+ in the modifiers slot. Neither the characters "a",
+ "A", "2", nor "@" normally have the shift bit set.
+ However, "F1" normally does. */
+ if (modifiers & XEMACS_MOD_SHIFT)
+ {
+#ifndef THIS_IS_GTK
+ int Mode_switch_p = *state & xd->ModeMask;
+ KeySym bot = XLookupKeysym (ev, Mode_switch_p ? 2 : 0);
+ KeySym top = XLookupKeysym (ev, Mode_switch_p ? 3 : 1);
+ if (top && bot && top != bot)
+ modifiers &= ~XEMACS_MOD_SHIFT;
+#else /* THIS_IS_GTK */
+ if (CHAR_OR_CHAR_INTP (keysym))
+ modifiers &= ~XEMACS_MOD_SHIFT;
+#endif /* THIS_IS_GTK */
+ }
+
+ set_event_type (emacs_event, key_press_event);
+ SET_EVENT_TIMESTAMP (emacs_event, ev->time);
+ SET_EVENT_KEY_MODIFIERS (emacs_event, modifiers);
+ SET_EVENT_KEY_KEYSYM (emacs_event, keysym);
+ }
+ else /* Mouse press/release event */
+ {
+#ifndef THIS_IS_GTK
+ XButtonEvent *ev = &wse->xbutton;
+#else /* THIS_IS_GTK */
+ GdkEventButton *ev = &wse->button;
+#endif /* THIS_IS_GTK */
+
+ if (!f)
+ return 0; /* not for us */
+ set_event_type (emacs_event, (wse->type == WS_BUTTON_PRESS) ?
+ button_press_event : button_release_event);
+ SET_EVENT_CHANNEL (emacs_event, wrap_frame (f));
+
+ SET_EVENT_BUTTON_MODIFIERS (emacs_event, modifiers);
+ SET_EVENT_TIMESTAMP (emacs_event, ev->time);
+ SET_EVENT_BUTTON_BUTTON (emacs_event, ev->button);
+ SET_EVENT_BUTTON_X (emacs_event, (int) ev->x);
+ SET_EVENT_BUTTON_Y (emacs_event, (int) ev->y);
+#ifndef THIS_IS_GTK
+ /* because we don't seem to get a FocusIn event for button clicks
+ when a widget-glyph is selected we will assume that we want the
+ focus if a button gets pressed. */
+ if (wse->type == ButtonPress)
+ handle_focus_event_1 (f, 1);
+#endif /* THIS_IS_GTK */
+ }
+
+ return 1;
+}
static int
#ifdef THIS_IS_GTK
1.65.2.1 +5 -4 XEmacs/xemacs/src/events.c
Index: events.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/events.c,v
retrieving revision 1.65
retrieving revision 1.65.2.1
diff -u -r1.65 -r1.65.2.1
--- events.c 2005/02/03 16:14:05 1.65
+++ events.c 2005/02/15 01:20:09 1.65.2.1
@@ -1,7 +1,7 @@
/* Events: printing them, converting them to and from characters.
Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -313,7 +313,8 @@
}
static void
-print_event_1 (const char *str, Lisp_Object obj, Lisp_Object printcharfun)
+print_event_1 (const Ascbyte *str, Lisp_Object obj,
+ Lisp_Object printcharfun)
{
DECLARE_EISTRING_MALLOC (ei);
write_c_string (printcharfun, str);
@@ -965,7 +966,7 @@
/* Return the last event in a chain.
NOTE: You cannot pass nil as a value here! The routine will
- abort if you do. */
+ ABORT if you do. */
Lisp_Object
event_chain_tail (Lisp_Object event_chain)
@@ -1094,7 +1095,7 @@
return n;
}
-/* Find the event before EVENT in an event chain. This aborts
+/* Find the event before EVENT in an event chain. This ABORTs
if the event is not in the chain. */
Lisp_Object
1.39.4.1 +3 -1 XEmacs/xemacs/src/events.h
Index: events.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/events.h,v
retrieving revision 1.39
retrieving revision 1.39.4.1
diff -u -r1.39 -r1.39.4.1
--- events.h 2004/11/04 23:06:27 1.39
+++ events.h 2005/02/15 01:20:10 1.39.4.1
@@ -1,7 +1,7 @@
/* Definitions for the new event model;
created 16-jul-91 by Jamie Zawinski
Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -908,6 +908,7 @@
/* Maybe this should be trickier */
#define KEYSYM(x) (intern (x))
+#define LISP_STRING_TO_KEYSYM(x) Fintern (x, Qnil)
/* from events.c */
void format_event_object (Eistring *buf, Lisp_Object event, int brief);
@@ -1064,6 +1065,7 @@
Lisp_Object errstream,
USID* in_usid,
USID* err_usid);
+void event_stream_drain_queue (void);
#endif /* HAVE_UNIXOID_EVENT_LOOP */
1.1.8.1 +96 -67 XEmacs/xemacs/src/extents-impl.h
Index: extents-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents-impl.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -r1.1 -r1.1.8.1
--- extents-impl.h 2002/06/20 21:18:30 1.1
+++ extents-impl.h 2005/02/15 01:20:11 1.1.8.1
@@ -1,5 +1,5 @@
/* Copyright (c) 1994, 1995 Free Software Foundation.
- Copyright (c) 1995, 1996, 2002 Ben Wing.
+ Copyright (c) 1995, 1996, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -34,12 +34,24 @@
Lisp_Object object; /* A buffer, string, Qnil (extent detached from no
buffer), Qt (destroyed extent) */
- /* Extent properties are conceptually a plist, but the most common
- props are implemented as bits instead of conses. */
+ /* Text properties governed by this extent, if any. Since most extents
+ will be for text properties, it makes sense to make this a built-in
+ field. Furthermore, when copying an extent, we need (as a special
+ case) to copy the list stored here.*/
+ Lisp_Object text_prop;
+ /* Face of this extent. */
+ Lisp_Object face;
+ /* Extent properties are conceptually a plist, but the most common props
+ are implemented as directly-accessible fields. We have three kinds of
+ built-in properties: (a) Those listed directly in `struct extent'
+ (text_prop, face); (b) Bit-field flags in `flags'; (c) Less common
+ properties, stored in an auxiliary structure that (if it exists) will
+ be the first element of `plist'. */
+ Lisp_Object plist;
+
+ /* Bit-field flags */
struct
{
- Lisp_Object face;
-
/* These flags are simply an optimization for common boolean properties
which go onto the extent's property list. Any of them would work if
done in the normal way, but the space savings of doing these in this
@@ -67,43 +79,39 @@
unsigned int has_aux :1; /* 6 extent has an aux. structure */
unsigned int start_open :1; /* 7 insertion behavior at start */
unsigned int end_open :1; /* 8 insertion behavior at end */
- unsigned int unique :1; /* 9 there may be only one attached */
- unsigned int duplicable :1; /* 10 copied to strings by kill/undo */
- unsigned int detachable :1; /* 11 extent detaches if text deleted */
- unsigned int internal :1; /* 12 used by map-extents etc. */
- unsigned int in_red_event :1; /* 13 An event has been spawned for
+ unsigned int unique :1; /* 9 there may be only one attached */
+ unsigned int detachable :1; /* 10 extent detaches if text deleted*/
+ unsigned int internal :1; /* 11 used by map-extents etc. */
+ unsigned int in_red_event :1; /* 12 An event has been spawned for
initial redisplay.
(not exported to lisp) */
+ unsigned int unused13 :1; /* 13 unused bits */
+ unsigned int unused14 :1; /* 14 unused bits */
+ unsigned int unused15 :1; /* 15 unused bits */
unsigned int unused16 :1; /* 16 unused bits */
/* --- Adding more flags will cause the extent struct to grow by another
word. It's not clear that this would make a difference, however,
because on 32-bit machines things tend to get allocated in chunks
of 4 bytes. */
} flags;
- /* The plist may have an auxiliary structure as its first element */
- Lisp_Object plist;
};
/* Basic properties of an extent (not affected by the extent's parent) */
#define extent_object(e) ((e)->object)
-#define extent_start(e) ((e)->start + 0)
-#define extent_end(e) ((e)->end + 0)
-#define set_extent_start(e, val) ((void) ((e)->start = (val)))
-#define set_extent_end(e, val) ((void) ((e)->end = (val)))
-#define extent_endpoint(e, endp) ((endp) ? extent_end (e) : extent_start (e))
-#define set_extent_endpoint(e, val, endp) \
- ((endp) ? set_extent_end (e, val) : set_extent_start (e, val))
-#define extent_detached_p(e) (extent_start (e) < 0)
+#define extent_start_mem(e) ((e)->start)
+#define extent_end_mem(e) ((e)->end)
+#define extent_endpoint_mem(e, endp) \
+ ((endp) ? extent_end_mem (e) : extent_start_mem (e))
+#define extent_detached_p(e) (extent_start_mem (e) < 0)
/* Additional information that may be present in an extent. The idea is
that fast access is provided to this information, but since (hopefully)
most extents won't have this set on them, we usually don't need to
have this structure around and thus the size of an extent is smaller. */
-typedef struct extent_auxiliary extent_auxiliary;
-struct extent_auxiliary
+typedef struct extent_auxiliary
{
- struct lcrecord_header header;
+ struct lrecord_header lheader;
Lisp_Object begin_glyph;
Lisp_Object end_glyph;
@@ -117,22 +125,47 @@
ADDITIONAL_FREE_extent()) and it's extremely difficult to
avoid getting hosed by just-freed objects. */
Lisp_Object children;
+ Lisp_Object duplicable;
Lisp_Object invisible;
Lisp_Object read_only;
Lisp_Object mouse_face;
Lisp_Object initial_redisplay_function;
Lisp_Object before_change_functions, after_change_functions;
int priority;
-};
+} extent_auxiliary;
extern struct extent_auxiliary extent_auxiliary_defaults;
+void allocate_extent_auxiliary (EXTENT ext);
+/* Structure used to track the extents in a buffer or string. */
struct extent_info
{
struct lcrecord_header header;
+ /* List of extents (actually two gap arrays, ordered by start and end
+ positions, respectively) */
struct extent_list *extents;
+ /* List of all extents over a particular position -- a cache, used for
+ optimizing map_extents() (which is at the heart of most extent
+ operations) and extent_find_{beginning,end}_of_run() (used for
+ `next-single-property-change' and other functions) */
struct stack_of_extents *soe;
+ /* Number of non-text-property extents recorded here. Text property
+ extents are always overlapping, so if there are only those kinds of
+ extents, then we can greatly short-circuit extent-searching
+ operations. #### In reality, we would like a smarter way of
+ determining whether there are any overlapping extents in the
+ buffer/string or even in a particular region. However, I (ben) spent
+ quite awhile thinking about this and couldn't come up with any easy
+ way to determine this. All the solutions seemed to involve an
+ excessive amount of time (O(N)) when adding or removing extents, or a
+ lot of coding effort as well as some complicated ancillary structures.
+ Since (a) most buffers will contain only text-property extents (added
+ through font-lock) and (b) even for non-text-property extents, we are
+ pretty efficient when doing localized operations as a result of the
+ stack of extents, it didn't seem worth it to put more effort into
+ this. --ben */
+ int num_non_textprop_extents;
};
/* A "normal" field is one that is stored in the `struct flags'
structure
@@ -161,8 +194,10 @@
#define extent_normal_field(e, field) \
extent_no_chase_normal_field (extent_ancestor (e), field)
-#define extent_aux_field(e, field) \
- extent_no_chase_aux_field (extent_ancestor (e), field)
+#define extent_aux_lisp_field(e, field) \
+ NON_LVALUE (extent_no_chase_aux_field (extent_ancestor (e), field))
+#define extent_aux_int_field(e, field) \
+ (extent_no_chase_aux_field (extent_ancestor (e), field) + 0)
#define set_extent_no_chase_aux_field(e, field, value) do { \
EXTENT sencaf_e = (e); \
@@ -172,7 +207,7 @@
} while (0)
#define set_extent_no_chase_normal_field(e, field, value) \
- extent_no_chase_normal_field (e, field) = (value)
+ do { extent_no_chase_normal_field (e, field) = (value); } while (0)
#define set_extent_aux_field(e, field, value) \
set_extent_no_chase_aux_field (extent_ancestor (e), field, value)
@@ -200,68 +235,62 @@
{
return e->flags.has_parent ? extent_ancestor_1 (e) : e;
}
-
-#define extent_begin_glyph(e) extent_aux_field (e, begin_glyph)
-#define extent_end_glyph(e) extent_aux_field (e, end_glyph)
-#define extent_priority(e) extent_aux_field (e, priority)
-#define extent_invisible(e) extent_aux_field (e, invisible)
-#define extent_read_only(e) extent_aux_field (e, read_only)
-#define extent_mouse_face(e) extent_aux_field (e, mouse_face)
-#define extent_initial_redisplay_function(e) extent_aux_field (e,
initial_redisplay_function)
-#define extent_before_change_functions(e) extent_aux_field (e,
before_change_functions)
-#define extent_after_change_functions(e) extent_aux_field (e, after_change_functions)
-#define set_extent_begin_glyph(e, value) \
+#define extent_begin_glyph(e) extent_aux_lisp_field (e, begin_glyph)
+#define extent_end_glyph(e) extent_aux_lisp_field (e, end_glyph)
+#define extent_priority(e) extent_aux_int_field (e, priority)
+#define extent_duplicable(e) extent_aux_lisp_field (e, duplicable)
+#define extent_invisible(e) extent_aux_lisp_field (e, invisible)
+#define extent_read_only(e) extent_aux_lisp_field (e, read_only)
+#define extent_mouse_face(e) extent_aux_lisp_field (e, mouse_face)
+#define extent_initial_redisplay_function(e) \
+ extent_aux_lisp_field (e, initial_redisplay_function)
+#define extent_before_change_functions(e) \
+ extent_aux_lisp_field (e, before_change_functions)
+#define extent_after_change_functions(e) \
+ extent_aux_lisp_field (e, after_change_functions)
+
+/* _0 is used to indicate that fields are being set directly, and other
+ important things (checking for modifiability, handling extent-changed
+ notification, etc.) are not done. */
+#define set_extent_begin_glyph_0(e, value) \
set_extent_aux_field (e, begin_glyph, value)
-#define set_extent_end_glyph(e, value) \
+#define set_extent_end_glyph_0(e, value) \
set_extent_aux_field (e, end_glyph, value)
-#define set_extent_priority(e, value) \
+#define set_extent_priority_0(e, value) \
set_extent_aux_field (e, priority, value)
-#define set_extent_invisible_1(e, value) \
+#define set_extent_duplicable_0(e, value) \
+ set_extent_aux_field (e, duplicable, value)
+#define set_extent_invisible_0(e, value) \
set_extent_aux_field (e, invisible, value)
-#define set_extent_read_only(e, value) \
+#define set_extent_read_only_0(e, value) \
set_extent_aux_field (e, read_only, value)
-#define set_extent_mouse_face(e, value) \
+#define set_extent_mouse_face_0(e, value) \
set_extent_aux_field (e, mouse_face, value)
-/* Use Fset_extent_initial_redisplay_function unless you know what you're doing */
-#define set_extent_initial_redisplay_function(e, value) \
+#define set_extent_initial_redisplay_function_0(e, value) \
set_extent_aux_field (e, initial_redisplay_function, value)
-#define set_extent_before_change_functions(e, value) \
+#define set_extent_before_change_functions_0(e, value) \
set_extent_aux_field (e, before_change_functions, value)
-#define set_extent_after_change_functions(e, value) \
+#define set_extent_after_change_functions_0(e, value) \
set_extent_aux_field (e, after_change_functions, value)
-#define extent_face(e) extent_normal_field (e, face)
+#define extent_face(e) (extent_ancestor (e)->face)
+/* extent_text_prop() should not be inherited. If the user messes around
+ with parents we don't want to get confused. */
+#define extent_text_prop(e) ((e)->text_prop)
#define extent_begin_glyph_layout(e) ((enum glyph_layout) extent_normal_field (e,
begin_glyph_layout))
#define extent_end_glyph_layout(e) ((enum glyph_layout) extent_normal_field (e,
end_glyph_layout))
#define extent_start_open_p(e) extent_normal_field (e, start_open)
#define extent_end_open_p(e) extent_normal_field (e, end_open)
#define extent_unique_p(e) extent_normal_field (e, unique)
-#define extent_duplicable_p(e) extent_normal_field (e, duplicable)
#define extent_detachable_p(e) extent_normal_field (e, detachable)
#define extent_internal_p(e) extent_normal_field (e, internal)
#define extent_in_red_event_p(e) extent_normal_field (e, in_red_event)
-#define set_extent_face(e, val) \
- set_extent_normal_field (e, face, val)
-#define set_extent_begin_glyph_layout(e, val) \
+#define set_extent_begin_glyph_layout_0(e, val) \
set_extent_normal_field (e, begin_glyph_layout, val)
-#define set_extent_end_glyph_layout(e, val) \
+#define set_extent_end_glyph_layout_0(e, val) \
set_extent_normal_field (e, end_glyph_layout, val)
-#define set_extent_start_open_p(e, val) \
- set_extent_normal_field (e, start_open, val)
-#define set_extent_end_open_p(e, val) \
- set_extent_normal_field (e, end_open, val)
-#define set_extent_unique_p(e, val) \
- set_extent_normal_field (e, unique, val)
-#define set_extent_duplicable_p(e, val) \
- set_extent_normal_field (e, duplicable, val)
-#define set_extent_detachable_p(e, val) \
- set_extent_normal_field (e, detachable, val)
-#define set_extent_internal_p(e, val) \
- set_extent_normal_field (e, internal, val)
-#define set_extent_in_red_event_p(e, val) \
- set_extent_normal_field (e, in_red_event, val)
DECLARE_INLINE_HEADER (
Lisp_Object *
1.56.2.1 +2270 -1809XEmacs/xemacs/src/extents.c
Index: extents.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.c,v
retrieving revision 1.56
retrieving revision 1.56.2.1
diff -u -r1.56 -r1.56.2.1
--- extents.c 2005/02/03 16:14:06 1.56
+++ extents.c 2005/02/15 01:20:12 1.56.2.1
@@ -28,8 +28,15 @@
[Originally written by some people at Lucid.
Hacked on by jwz.
Start/end-open stuff added by John Rose (john.rose(a)eng.sun.com).
- Rewritten from scratch by Ben Wing, December 1994.] */
+ Rewritten from scratch by Ben Wing, December 1994.
+ Since then, much work by Ben Wing -- added true support for string
+ extents circa 1996? (formerly, there was a weird concept of "extent
+ replicas", which were pointers to extents that had been detached from
+ the buffer -- `insert-extent' is a holdover from this), lots of text
+ property changes, introduced the generalized Bytexpos, Charxpos (2002),
+ much rewriting for speed (January 2003). ] */
+
/* Commentary:
Extents are regions over a buffer, with a start and an end position
@@ -43,17 +50,9 @@
to minimize the amount of adjusting that needs to be done when
characters are inserted or deleted.
- (Formerly, extent endpoints at the gap could be either before or
- after the gap, depending on the open/closedness of the endpoint.
- The intent of this was to make it so that insertions would
- automatically go inside or out of extents as necessary with no
- further work needing to be done. It didn't work out that way,
- however, and just ended up complexifying and buggifying all the
- rest of the code.)
-
- Extents are compared using memory indices. There are two orderings
- for extents and both orders are kept current at all times. The normal
- or "display" order is as follows:
+ Extents are stored using two gap arrays, in two orderings, and both
+ orders are kept current at all times. The normal or "display" order is
+ as follows:
Extent A is "less than" extent B, that is, earlier in the display order,
if: A-start < B-start,
@@ -75,6 +74,9 @@
swap all occurrences of "display order" and "e-order",
"less than"
and "greater than", and "extent start" and "extent
end".
+ The extents in a buffer are ordered by "display order" because that
+ is that order that the redisplay mechanism needs to process them in.
+
Extents can be zero-length, and will end up that way if their endpoints
are explicitly set that way or if their detachable property is nil
and all the text in the extent is deleted. (The exception is open-open
@@ -96,121 +98,15 @@
Note that closed-open, non-detachable zero-length extents behave exactly
like markers and that open-closed, non-detachable zero-length extents
behave like the "point-type" marker in Mule.
-
-
- #### The following information is wrong in places.
-
- More about the different orders:
- --------------------------------
-
- The extents in a buffer are ordered by "display order" because that
- is that order that the redisplay mechanism needs to process them in.
- The e-order is an auxiliary ordering used to facilitate operations
- over extents. The operations that can be performed on the ordered
- list of extents in a buffer are
-
- 1) Locate where an extent would go if inserted into the list.
- 2) Insert an extent into the list.
- 3) Remove an extent from the list.
- 4) Map over all the extents that overlap a range.
-
- (4) requires being able to determine the first and last extents
- that overlap a range.
-
- NOTE: "overlap" is used as follows:
-
- -- two ranges overlap if they have at least one point in common.
- Whether the endpoints are open or closed makes a difference here.
- -- a point overlaps a range if the point is contained within the
- range; this is equivalent to treating a point P as the range
- [P, P].
- -- In the case of an *extent* overlapping a point or range, the
- extent is normally treated as having closed endpoints. This
- applies consistently in the discussion of stacks of extents
- and such below. Note that this definition of overlap is not
- necessarily consistent with the extents that `map-extents'
- maps over, since `map-extents' sometimes pays attention to
- whether the endpoints of an extents are open or closed.
- But for our purposes, it greatly simplifies things to treat
- all extents as having closed endpoints.
-
- First, define >, <, <=, etc. as applied to extents to mean
- comparison according to the display order. Comparison between an
- extent E and an index I means comparison between E and the range
- [I, I].
- Also define e>, e<, e<=, etc. to mean comparison according to the
- e-order.
- For any range R, define R(0) to be the starting index of the range
- and R(1) to be the ending index of the range.
- For any extent E, define E(next) to be the extent directly following
- E, and E(prev) to be the extent directly preceding E. Assume
- E(next) and E(prev) can be determined from E in constant time.
- (This is because we store the extent list as a doubly linked
- list.)
- Similarly, define E(e-next) and E(e-prev) to be the extents
- directly following and preceding E in the e-order.
-
- Now:
-
- Let R be a range.
- Let F be the first extent overlapping R.
- Let L be the last extent overlapping R.
-
- Theorem 1: R(1) lies between L and L(next), i.e. L <= R(1) < L(next).
-
- This follows easily from the definition of display order. The
- basic reason that this theorem applies is that the display order
- sorts by increasing starting index.
-
- Therefore, we can determine L just by looking at where we would
- insert R(1) into the list, and if we know F and are moving forward
- over extents, we can easily determine when we've hit L by comparing
- the extent we're at to R(1).
-
- Theorem 2: F(e-prev) e< [1, R(0)] e<= F.
-
- This is the analog of Theorem 1, and applies because the e-order
- sorts by increasing ending index.
-
- Therefore, F can be found in the same amount of time as operation (1),
- i.e. the time that it takes to locate where an extent would go if
- inserted into the e-order list.
-
- If the lists were stored as balanced binary trees, then operation (1)
- would take logarithmic time, which is usually quite fast. However,
- currently they're stored as simple doubly-linked lists, and instead
- we do some caching to try to speed things up.
-
- Define a "stack of extents" (or "SOE") as the set of extents
- (ordered in the display order) that overlap an index I, together with
- the SOE's "previous" extent, which is an extent that precedes I in
- the e-order. (Hopefully there will not be very many extents between
- I and the previous extent.)
-
- Now:
-
- Let I be an index, let S be the stack of extents on I, let F be
- the first extent in S, and let P be S's previous extent.
-
- Theorem 3: The first extent in S is the first extent that overlaps
- any range [I, J].
-
- Proof: Any extent that overlaps [I, J] but does not include I must
- have a start index > I, and thus be greater than any extent in S.
-
- Therefore, finding the first extent that overlaps a range R is the
- same as finding the first extent that overlaps R(0).
-
- Theorem 4: Let I2 be an index such that I2 > I, and let F2 be the
- first extent that overlaps I2. Then, either F2 is in S or F2 is
- greater than any extent in S.
-
- Proof: If F2 does not include I then its start index is greater
- than I and thus it is greater than any extent in S, including F.
- Otherwise, F2 includes I and thus is in S, and thus F2 >= F.
+ For more information on extents, and in particular a rigorous
+ description of extent operations, see the Internals Manual
+ (man/internals/internals.texi).
*/
+/* #### not yet, test the copied_soe stuff first */
+/* #define OPTIMIZE_FOR_TEXT_PROPS_NOT_YET */
+
#include <config.h>
#include "lisp.h"
@@ -308,6 +204,17 @@
/* extent list */
/* ------------------------------- */
+/* An extent-list marker is a marker into either the start or end orders in
+ the extent list. It essentially encapsulates a gap-array marker. The
+ extent-list marker contains a pointer to a gap-array marker, and the
+ extent-list markers are chained through the NEXT field. Note that the
+ gap-array markers are also chained through their own NEXT field; this
+ keeps track of all the gap-array markers for a particular gap array. When
+ computing extent-list marker usage, do NOT compute the usage for the the
+ pointed-to gap-array marker by traversing the next fields, or you will get
+ a value too big, as you will traverse the same gap-array markers multiple
+ times. */
+
typedef struct extent_list_marker
{
Gap_Array_Marker *m;
@@ -324,44 +231,44 @@
static Extent_List_Marker *extent_list_marker_freelist;
-#define EXTENT_LESS_VALS(e,st,nd) ((extent_start (e) < (st)) || \
- ((extent_start (e) == (st)) && \
- (extent_end (e) > (nd))))
-
-#define EXTENT_EQUAL_VALS(e,st,nd) ((extent_start (e) == (st)) && \
- (extent_end (e) == (nd)))
-
-#define EXTENT_LESS_EQUAL_VALS(e,st,nd) ((extent_start (e) < (st)) || \
- ((extent_start (e) == (st)) && \
- (extent_end (e) >= (nd))))
+#define EXTENT_LESS_VALS(e,st,nd) ((extent_start_mem (e) < (st)) || \
+ ((extent_start_mem (e) == (st)) && \
+ (extent_end_mem (e) > (nd))))
+
+#define EXTENT_EQUAL_VALS(e,st,nd) ((extent_start_mem (e) == (st)) && \
+ (extent_end_mem (e) == (nd)))
+
+#define EXTENT_LESS_EQUAL_VALS(e,st,nd) ((extent_start_mem (e) < (st)) || \
+ ((extent_start_mem (e) == (st)) && \
+ (extent_end_mem (e) >= (nd))))
/* Is extent E1 less than extent E2 in the display order? */
#define EXTENT_LESS(e1,e2) \
- EXTENT_LESS_VALS (e1, extent_start (e2), extent_end (e2))
+ EXTENT_LESS_VALS (e1, extent_start_mem (e2), extent_end_mem (e2))
/* Is extent E1 equal to extent E2? */
#define EXTENT_EQUAL(e1,e2) \
- EXTENT_EQUAL_VALS (e1, extent_start (e2), extent_end (e2))
+ EXTENT_EQUAL_VALS (e1, extent_start_mem (e2), extent_end_mem (e2))
/* Is extent E1 less than or equal to extent E2 in the display order? */
#define EXTENT_LESS_EQUAL(e1,e2) \
- EXTENT_LESS_EQUAL_VALS (e1, extent_start (e2), extent_end (e2))
+ EXTENT_LESS_EQUAL_VALS (e1, extent_start_mem (e2), extent_end_mem (e2))
-#define EXTENT_E_LESS_VALS(e,st,nd) ((extent_end (e) < (nd)) || \
- ((extent_end (e) == (nd)) && \
- (extent_start (e) > (st))))
-
-#define EXTENT_E_LESS_EQUAL_VALS(e,st,nd) ((extent_end (e) < (nd)) || \
- ((extent_end (e) == (nd)) && \
- (extent_start (e) >= (st))))
+#define EXTENT_E_LESS_VALS(e,st,nd) ((extent_end_mem (e) < (nd)) || \
+ ((extent_end_mem (e) == (nd)) && \
+ (extent_start_mem (e) > (st))))
+
+#define EXTENT_E_LESS_EQUAL_VALS(e,st,nd) ((extent_end_mem (e) < (nd)) || \
+ ((extent_end_mem (e) == (nd)) && \
+ (extent_start_mem (e) >= (st))))
/* Is extent E1 less than extent E2 in the e-order? */
#define EXTENT_E_LESS(e1,e2) \
- EXTENT_E_LESS_VALS(e1, extent_start (e2), extent_end (e2))
+ EXTENT_E_LESS_VALS(e1, extent_start_mem (e2), extent_end_mem (e2))
/* Is extent E1 less than or equal to extent E2 in the e-order? */
#define EXTENT_E_LESS_EQUAL(e1,e2) \
- EXTENT_E_LESS_EQUAL_VALS (e1, extent_start (e2), extent_end (e2))
+ EXTENT_E_LESS_EQUAL_VALS (e1, extent_start_mem (e2), extent_end_mem (e2))
#define EXTENT_GAP_ARRAY_AT(ga, pos) (* (EXTENT *) GAP_ARRAY_EL_ADDR(ga, pos))
@@ -379,11 +286,11 @@
{
Extent_List *extents;
Memxpos pos; /* Position of stack of extents. EXTENTS is the list of
- all extents that overlap this position. This position
- can be -1 if the stack of extents is invalid (this
- happens when a buffer is first created or a string's
- stack of extents is created [a string's stack of extents
- is nuked when a GC occurs, to conserve memory]). */
+ all extents that overlap this position. This position
+ can be -1 if the stack of extents is invalid (this
+ happens when a buffer is first created or a string's
+ stack of extents is created [a string's stack of extents
+ is nuked when a GC occurs, to conserve memory]). */
} Stack_Of_Extents;
/* ------------------------------- */
@@ -407,26 +314,22 @@
#define buffer_or_string_bytexpos_to_startind(obj, ind, start_open) \
memxpos_to_startind (buffer_or_string_bytexpos_to_memxpos (obj, ind), \
- start_open)
+ start_open)
#define buffer_or_string_bytexpos_to_endind(obj, ind, end_open) \
memxpos_to_endind (buffer_or_string_bytexpos_to_memxpos (obj, ind), \
- end_open)
+ end_open)
/* ------------------------------- */
-/* Lisp-level functions */
+/* Misc */
/* ------------------------------- */
+/* (formerly called "Lisp-level functions") */
+
/* flags for decode_extent() */
#define DE_MUST_HAVE_BUFFER 1
#define DE_MUST_BE_ATTACHED 2
-Lisp_Object Vlast_highlighted_extent;
-
-Lisp_Object QSin_map_extents_internal;
-
-Fixnum mouse_highlight_priority;
-
Lisp_Object Qextentp;
Lisp_Object Qextent_live_p;
@@ -439,6 +342,7 @@
Lisp_Object Qstart_and_end_in_region;
Lisp_Object Qstart_or_end_in_region;
Lisp_Object Qnegate_in_region;
+Lisp_Object Qdisjoint;
Lisp_Object Qdetached;
Lisp_Object Qdestroyed;
@@ -462,35 +366,39 @@
Lisp_Object Qoutside_margin;
Lisp_Object Qinside_margin;
Lisp_Object Qwhitespace;
+Lisp_Object Qtext_prop;
/* Qtext defined in general.c */
+Lisp_Object Qfront_sticky, Qrear_nonsticky;
Lisp_Object Qcopy_function;
Lisp_Object Qpaste_function;
-static Lisp_Object canonicalize_extent_property (Lisp_Object prop,
- Lisp_Object value);
-
-typedef struct
-{
- Lisp_Object key, value;
-} Lisp_Object_pair;
-typedef struct
-{
- Dynarr_declare (Lisp_Object_pair);
-} Lisp_Object_pair_dynarr;
-
-static void extent_properties (EXTENT e, Lisp_Object_pair_dynarr *props);
-
Lisp_Object Vextent_face_memoize_hash_table;
Lisp_Object Vextent_face_reverse_memoize_hash_table;
Lisp_Object Vextent_face_reusable_list;
+Lisp_Object Vtext_property_default_nonsticky;
/* FSFmacs bogosity */
Lisp_Object Vdefault_text_properties;
+Lisp_Object Vlast_highlighted_extent;
+
+Lisp_Object QSin_map_extents_internal;
+
+Fixnum mouse_highlight_priority;
+
/* if true, we don't want to set any redisplay flags on modeline extent
changes */
int in_modeline_generation;
+static Lisp_Object canonicalize_extent_property (Lisp_Object prop,
+ Lisp_Object value);
+static void extent_properties (EXTENT e, Lisp_Object_pair_dynarr *props,
+ int external);
+static int property_in_text_props (Lisp_Object text_props, Lisp_Object prop);
+static int put_text_prop (Bytexpos start, Bytexpos end, Lisp_Object object,
+ Lisp_Object prop, Lisp_Object value,
+ int duplicable);
+static int text_property_extents_identical (EXTENT e, EXTENT f);
/************************************************************************/
/* Generalized gap array */
@@ -807,7 +715,7 @@
}
/* Return the position of the first extent that begins at or after POS
- (or ends at or after POS, if ENDP is not 0).
+ (or ends at or after POS, if ENDP is non-zero).
An out-of-range value for POS is allowed, and guarantees that the
position at the beginning or end of the extent list is returned. */
@@ -829,8 +737,8 @@
position is >= POS lie at or after the returned position.
*/
- set_extent_start (&fake_extent, endp ? pos : pos-1);
- set_extent_end (&fake_extent, endp ? pos : pos-1);
+ extent_start_mem (&fake_extent) = endp ? pos : pos-1;
+ extent_end_mem (&fake_extent) = endp ? pos : pos-1;
return extent_list_locate (el, &fake_extent, endp, 0);
}
@@ -953,12 +861,16 @@
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, end_glyph) },
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, parent) },
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, children) },
+ { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, duplicable) },
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, invisible) },
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, read_only) },
{ XD_LISP_OBJECT, offsetof (struct extent_auxiliary, mouse_face) },
- { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, initial_redisplay_function) },
- { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, before_change_functions) },
- { XD_LISP_OBJECT, offsetof (struct extent_auxiliary, after_change_functions) },
+ { XD_LISP_OBJECT, offsetof (struct extent_auxiliary,
+ initial_redisplay_function) },
+ { XD_LISP_OBJECT, offsetof (struct extent_auxiliary,
+ before_change_functions) },
+ { XD_LISP_OBJECT, offsetof (struct extent_auxiliary,
+ after_change_functions) },
{ XD_END }
};
static Lisp_Object
@@ -967,6 +879,7 @@
struct extent_auxiliary *data = XEXTENT_AUXILIARY (obj);
mark_object (data->begin_glyph);
mark_object (data->end_glyph);
+ mark_object (data->duplicable);
mark_object (data->invisible);
mark_object (data->children);
mark_object (data->read_only);
@@ -977,23 +890,12 @@
return data->parent;
}
-DEFINE_LRECORD_IMPLEMENTATION ("extent-auxiliary", extent_auxiliary,
- 0, /*dumpable-flag*/
- mark_extent_auxiliary, internal_object_printer,
- 0, 0, 0, extent_auxiliary_description,
- struct extent_auxiliary);
-void
-allocate_extent_auxiliary (EXTENT ext)
-{
- Lisp_Object extent_aux;
- struct extent_auxiliary *data =
- alloc_lcrecord_type (struct extent_auxiliary, &lrecord_extent_auxiliary);
-
- copy_lcrecord (data, &extent_auxiliary_defaults);
- extent_aux = wrap_extent_auxiliary (data);
- ext->plist = Fcons (extent_aux, ext->plist);
- ext->flags.has_aux = 1;
-}
+DEFINE_BASIC_LRECORD_IMPLEMENTATION ("extent-auxiliary", extent_auxiliary,
+ 0, /*dumpable-flag*/
+ mark_extent_auxiliary,
+ internal_object_printer,
+ 0, 0, 0, extent_auxiliary_description,
+ struct extent_auxiliary);
/************************************************************************/
@@ -1025,6 +927,7 @@
static void free_soe (struct stack_of_extents *soe);
static void soe_invalidate (Lisp_Object obj);
+/* Extern required because of the recursive pointers below */
extern const struct sized_memory_description gap_array_marker_description;
static const struct memory_description gap_array_marker_description_1[] = {
@@ -1052,10 +955,11 @@
};
static const struct sized_memory_description lispobj_gap_array_description = {
- sizeof (Gap_Array),
+ 0, /* gap array is stretchy */
lispobj_gap_array_description_1
};
+/* Extern required because of the recursive pointers below */
extern const struct sized_memory_description extent_list_marker_description;
static const struct memory_description extent_list_marker_description_1[] = {
@@ -1287,6 +1191,26 @@
return info;
}
+static int
+buffer_or_string_num_non_textprop_extents (Lisp_Object object)
+{
+ struct extent_info *info = buffer_or_string_extent_info (object);
+
+ if (!info)
+ return 0;
+
+ return info->num_non_textprop_extents;
+}
+
+
+static void
+buffer_or_string_set_num_non_textprop_extents (Lisp_Object object, int val)
+{
+ struct extent_info *info = buffer_or_string_extent_info_force (object);
+
+ info->num_non_textprop_extents = val;
+}
+
/* Detach all the extents in OBJECT. Called from redisplay. */
void
@@ -1305,8 +1229,8 @@
EXTENT e = extent_list_at (data->extents, i, 0);
/* No need to do detach_extent(). Just nuke the damn things,
which results in the equivalent but faster. */
- set_extent_start (e, -1);
- set_extent_end (e, -1);
+ extent_start_mem (e) = -1;
+ extent_end_mem (e) = -1;
}
}
@@ -1350,9 +1274,84 @@
/* See unicode.c for more about sledgehammer checks */
+#ifdef NEW_TEXT_PROPERTY_MODEL
+
+static void
+sledgehammer_text_property_check (Lisp_Object object)
+{
+ /* Check that the text-property extents are correct:
+
+ (1) They must be non-overlapping (each one must start at or past where
+ the previous one ends)
+ (1) Successive extents must not be identical (i.e. make sure the anti-
+ fragmentation code is working)
+ (3) Properties mentioned in the duplicable list must be in the
+ text-prop list
+ (4) Properties in the text-prop list must have a non-nil value
+ (nil means the property is not present)
+ (5) Check that the count of non-text-prop extents is correct
+ */
+
+ int i;
+ int endp;
+ Extent_List *el = buffer_or_string_extent_list (object);
+
+ if (!el)
+ return;
+
+ for (endp = 0; endp < 2; endp++)
+ {
+ EXTENT prev = 0;
+ int non_text_prop = 0;
+
+ for (i = 0; i < extent_list_num_els (el); i++)
+ {
+ EXTENT e1 = extent_list_at (el, i, endp);
+ Lisp_Object dup, props;
+
+ if (NILP (extent_text_prop (e1)))
+ {
+ non_text_prop++;
+ continue;
+ }
+
+ if (prev)
+ {
+ assert (extent_start_mem (e1) >= extent_end_mem (prev));
+ assert (!text_property_extents_identical (prev, e1));
+ }
+ dup = extent_duplicable (e1);
+ props = extent_text_prop (e1);
+ if (!EQ (dup, Qt))
+ {
+ LIST_LOOP_2 (dup1, dup)
+ assert (!NILP (memq_no_quit (dup1, props)));
+ }
+ {
+ LIST_LOOP_2 (prop, props)
+ assert (!NILP (Fextent_property (wrap_extent (e1), prop, Qnil)));
+ }
+ prev = e1;
+ }
+
+ assert (non_text_prop ==
+ buffer_or_string_num_non_textprop_extents (object));
+ }
+}
+
+#endif /* NEW_TEXT_PROPERTY_MODEL */
+
void
sledgehammer_extent_check (Lisp_Object object)
{
+ /* Check that the extents are correct:
+
+ (1) Check the text-property extents.
+ (2) Start and end lists must be the same size.
+ (3) Start and end lists must be ordered correctly.
+ (4) No start or end points within the gap of a buffer.
+ */
+
int i;
int endp;
Extent_List *el = buffer_or_string_extent_list (object);
@@ -1361,6 +1360,12 @@
if (!el)
return;
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ sledgehammer_text_property_check (object);
+#endif
+
+ assert (GAP_ARRAY_NUM_ELS (el->start) == GAP_ARRAY_NUM_ELS (el->end));
+
if (BUFFERP (object))
buf = XBUFFER (object);
@@ -1371,18 +1376,20 @@
EXTENT e2 = extent_list_at (el, i, endp);
if (buf)
{
- assert (extent_start (e1) <= buf->text->gpt ||
- extent_start (e1) > buf->text->gpt + buf->text->gap_size);
- assert (extent_end (e1) <= buf->text->gpt ||
- extent_end (e1) > buf->text->gpt + buf->text->gap_size);
+ assert (extent_start_mem (e1) <= buf->text->gpt ||
+ extent_start_mem (e1) > buf->text->gpt +
+ buf->text->gap_size);
+ assert (extent_end_mem (e1) <= buf->text->gpt ||
+ extent_end_mem (e1) > buf->text->gpt +
+ buf->text->gap_size);
}
- assert (extent_start (e1) <= extent_end (e1));
+ assert (extent_start_mem (e1) <= extent_end_mem (e1));
assert (endp ? (EXTENT_E_LESS_EQUAL (e1, e2)) :
(EXTENT_LESS_EQUAL (e1, e2)));
}
}
-#endif
+#endif /* ERROR_CHECK_EXTENTS */
static Stack_Of_Extents *
buffer_or_string_stack_of_extents (Lisp_Object object)
@@ -1402,23 +1409,14 @@
return info->soe;
}
-/* #### don't even think of #define'ing this, the prototype of
- print_extent_1 has changed! */
/* #define SOE_DEBUG */
#ifdef SOE_DEBUG
-static void print_extent_1 (char *buf, Lisp_Object extent);
-
static void
print_extent_2 (EXTENT e)
{
- Lisp_Object extent;
- char buf[200];
-
- extent = wrap_extent (e);
- print_extent_1 (buf, extent);
- fputs (buf, stdout);
+ debug_print (wrap_extent (e));
}
static void
@@ -1431,26 +1429,26 @@
if (!soe)
{
- printf ("No SOE");
+ stderr_out ("No SOE");
return;
}
sel = soe->extents;
- printf ("SOE pos is %d (memxpos %d)\n",
+ stderr_out ("SOE pos is %d (memxpos %d)\n",
soe->pos < 0 ? soe->pos :
buffer_or_string_memxpos_to_bytexpos (obj, soe->pos),
soe->pos);
for (endp = 0; endp < 2; endp++)
{
- printf (endp ? "SOE end:" : "SOE start:");
+ stderr_out (endp ? "SOE end:" : "SOE start:");
for (i = 0; i < extent_list_num_els (sel); i++)
{
EXTENT e = extent_list_at (sel, i, endp);
- putchar ('\t');
+ stderr_out ("\t");
print_extent_2 (e);
}
- putchar ('\n');
+ stderr_out ("\n");
}
- putchar ('\n');
+ stderr_out ("\n");
}
#endif
@@ -1463,21 +1461,21 @@
Stack_Of_Extents *soe = buffer_or_string_stack_of_extents (obj);
#ifdef SOE_DEBUG
- printf ("Inserting into SOE: ");
+ stderr_out ("Inserting into SOE: ");
print_extent_2 (extent);
- putchar ('\n');
+ stderr_out ("\n");
#endif
- if (!soe || soe->pos < extent_start (extent) ||
- soe->pos > extent_end (extent))
+ if (!soe || soe->pos < extent_start_mem (extent) ||
+ soe->pos > extent_end_mem (extent))
{
#ifdef SOE_DEBUG
- printf ("(not needed)\n\n");
+ stderr_out ("(not needed)\n\n");
#endif
return;
}
extent_list_insert (soe->extents, extent);
#ifdef SOE_DEBUG
- puts ("SOE afterwards is:");
+ stderr_out ("SOE afterwards is:");
soe_dump (obj);
#endif
}
@@ -1490,21 +1488,21 @@
Stack_Of_Extents *soe = buffer_or_string_stack_of_extents (obj);
#ifdef SOE_DEBUG
- printf ("Deleting from SOE: ");
+ stderr_out ("Deleting from SOE: ");
print_extent_2 (extent);
- putchar ('\n');
+ stderr_out ("\n");
#endif
- if (!soe || soe->pos < extent_start (extent) ||
- soe->pos > extent_end (extent))
+ if (!soe || soe->pos < extent_start_mem (extent) ||
+ soe->pos > extent_end_mem (extent))
{
#ifdef SOE_DEBUG
- puts ("(not needed)\n");
+ stderr_out ("(not needed)\n");
#endif
return;
}
extent_list_delete (soe->extents, extent);
#ifdef SOE_DEBUG
- puts ("SOE afterwards is:");
+ stderr_out ("SOE afterwards is:");
soe_dump (obj);
#endif
}
@@ -1526,7 +1524,7 @@
#endif
#ifdef SOE_DEBUG
- printf ("Moving SOE from %d (memxpos %d) to %d (memxpos %d)\n",
+ stderr_out ("Moving SOE from %d (memxpos %d) to %d (memxpos %d)\n",
soe->pos < 0 ? soe->pos :
buffer_or_string_memxpos_to_bytexpos (obj, soe->pos), soe->pos,
buffer_or_string_memxpos_to_bytexpos (obj, pos), pos);
@@ -1544,7 +1542,7 @@
else
{
#ifdef SOE_DEBUG
- puts ("(not needed)\n");
+ stderr_out ("(not needed)\n");
#endif
return;
}
@@ -1617,20 +1615,20 @@
{
EXTENT e = extent_list_at (bel, start_pos, endp);
if ((direction > 0) ?
- (extent_start (e) > pos) :
- (extent_end (e) < pos))
+ (extent_start_mem (e) > pos) :
+ (extent_end_mem (e) < pos))
break; /* All further extents lie on the far side of POS
and thus can't overlap. */
if ((direction > 0) ?
- (extent_end (e) >= pos) :
- (extent_start (e) <= pos))
+ (extent_end_mem (e) >= pos) :
+ (extent_start_mem (e) <= pos))
extent_list_insert (sel, e);
}
}
soe->pos = pos;
#ifdef SOE_DEBUG
- puts ("SOE afterwards is:");
+ stderr_out ("SOE afterwards is:");
soe_dump (obj);
#endif
}
@@ -1678,7 +1676,7 @@
assert (EXTENT_LIVE_P (extent));
assert (!extent_detached_p (extent));
{
- Memxpos i = endp ? extent_end (extent) : extent_start (extent);
+ Memxpos i = endp ? extent_end_mem (extent) : extent_start_mem (extent);
Lisp_Object obj = extent_object (extent);
return buffer_or_string_memxpos_to_bytexpos (obj, i);
}
@@ -1690,7 +1688,7 @@
assert (EXTENT_LIVE_P (extent));
assert (!extent_detached_p (extent));
{
- Memxpos i = endp ? extent_end (extent) : extent_start (extent);
+ Memxpos i = endp ? extent_end_mem (extent) : extent_start_mem (extent);
Lisp_Object obj = extent_object (extent);
return buffer_or_string_memxpos_to_charxpos (obj, i);
}
@@ -1748,8 +1746,8 @@
if (!in_modeline_generation)
MARK_EXTENTS_CHANGED;
gutter_extent_signal_changed_region_maybe
- (object, extent_endpoint_char (extent, 0),
- extent_endpoint_char (extent, 1));
+ (object, extent_start_char (extent),
+ extent_end_char (extent));
}
else if (BUFFERP (object))
{
@@ -1761,8 +1759,8 @@
EQ (property, Qinvisible))
MARK_CLIP_CHANGED;
buffer_extent_signal_changed_region
- (b, extent_endpoint_char (extent, 0),
- extent_endpoint_char (extent, 1));
+ (b, extent_start_char (extent),
+ extent_end_char (extent));
}
}
@@ -1782,9 +1780,7 @@
detached. (You can distinguish a detach from an attach because the
latter has old_start == -1 and old_end == -1.) (#### We don't currently
give the old property. If someone needs that, this will have to
- change.) KLUDGE: If PROPERTY is Qt, all properties may have changed
- because the parent was changed. #### We need to handle this properly, by
- mapping over properties. */
+ change.) */
static void
signal_extent_changed (EXTENT extent, Lisp_Object property,
@@ -1829,7 +1825,6 @@
assert (NILP (object) || STRINGP (object) ||
(BUFFERP (object) && BUFFER_LIVE_P (XBUFFER (object))));
extent_object (extent) = object;
- /* Now make sure the extent info exists. */
if (!NILP (object))
buffer_or_string_extent_info_force (object);
return extent;
@@ -1953,9 +1948,13 @@
static void
extent_attach (EXTENT extent)
{
- Extent_List *el = extent_extent_list (extent);
+ struct extent_info *ei =
+ buffer_or_string_extent_info (extent_object (extent));
+ Extent_List *el = ei->extents;
extent_list_insert (el, extent);
+ if (NILP (extent_text_prop (extent)))
+ ei->num_non_textprop_extents++;
soe_insert (extent_object (extent), extent);
/* only this extent changed */
signal_extent_changed (extent, Qnil, -1, -1, 0);
@@ -1964,21 +1963,25 @@
static void
extent_detach (EXTENT extent)
{
+ struct extent_info *ei;
Extent_List *el;
if (extent_detached_p (extent))
return;
- el = extent_extent_list (extent);
+ ei = buffer_or_string_extent_info (extent_object (extent));
+ el = ei->extents;
/* call this before messing with the extent. */
signal_extent_changed (extent, Qnil,
- extent_endpoint_byte (extent, 0),
- extent_endpoint_char (extent, 0),
+ extent_start_byte (extent),
+ extent_start_char (extent),
0);
extent_list_delete (el, extent);
soe_delete (extent_object (extent), extent);
- set_extent_start (extent, -1);
- set_extent_end (extent, -1);
+ if (NILP (extent_text_prop (extent)))
+ ei->num_non_textprop_extents++;
+ extent_start_mem (extent) = -1;
+ extent_end_mem (extent) = -1;
}
/* ------------------------------- */
@@ -2009,7 +2012,7 @@
}
/* So is a zero-length extent. */
- if (extent_start (extent) == extent_end (extent))
+ if (extent_start_mem (extent) == extent_end_mem (extent))
start_open = 0, end_open = 0;
/* `all_extents_flags' will almost always be zero. */
else if (all_extents_flags == 0)
@@ -2031,8 +2034,8 @@
flags & ME_START_OPEN);
end = buffer_or_string_bytexpos_to_endind (obj, to,
! (flags & ME_END_CLOSED));
- exs = memxpos_to_startind (extent_start (extent), start_open);
- exe = memxpos_to_endind (extent_end (extent), end_open);
+ exs = memxpos_to_startind (extent_start_mem (extent), start_open);
+ exe = memxpos_to_endind (extent_end_mem (extent), end_open);
/* It's easy to determine whether an extent lies *outside* the
region -- just determine whether it's completely before
@@ -2067,63 +2070,106 @@
struct map_extents_struct
{
+ Lisp_Object stmark, enmark;
Extent_List *el;
Extent_List_Marker *mkr;
- EXTENT range;
};
static Lisp_Object
map_extents_unwind (Lisp_Object obj)
{
- struct map_extents_struct *closure =
+ struct map_extents_struct *z =
(struct map_extents_struct *) get_opaque_ptr (obj);
free_opaque_ptr (obj);
- if (closure->range)
- extent_detach (closure->range);
- if (closure->mkr)
- extent_list_delete_marker (closure->el, closure->mkr);
+
+ if (!NILP (z->stmark))
+ Fset_marker (z->stmark, Qnil, Qnil);
+ if (!NILP (z->enmark))
+ Fset_marker (z->enmark, Qnil, Qnil);
+ if (z->mkr)
+ extent_list_delete_marker (z->el, z->mkr);
return Qnil;
}
-/* This is the guts of `map-extents' and the other functions that
- map over extents. In theory the operation of this function is
- simple: just figure out what extents we're mapping over, and
- call the function on each one of them in the range. Unfortunately
- there are a wide variety of things that the mapping function
- might do, and we have to be very tricky to avoid getting messed
- up. Furthermore, this function needs to be very fast (it is
- called multiple times every time text is inserted or deleted
- from a buffer), and so we can't always afford the overhead of
- dealing with all the possible things that the mapping function
- might do; thus, there are many flags that can be specified
- indicating what the mapping function might or might not do.
-
- The result of all this is that this is the most complicated
- function in this file. Change it at your own risk!
-
- A potential simplification to the logic below is to determine
- all the extents that the mapping function should be called on
- before any calls are actually made and save them in an array.
- That introduces its own complications, however (the array
- needs to be marked for garbage-collection, and a static array
- cannot be used because map_extents() needs to be reentrant).
- Furthermore, the results might be a little less sensible than
- the logic below. */
+/* This is the guts of `map-extents' and the other functions that map over
+ extents. In theory the operation of this function is simple: just
+ figure out what extents we're mapping over, and call the function on
+ each one of them in the range. Unfortunately there are a wide variety
+ of things that the mapping function might do, and we have to be very
+ tricky to avoid getting messed up. Furthermore, this function needs to
+ be very fast (it is called multiple times every time text is inserted or
+ deleted from a buffer), and so we can't always afford the overhead of
+ dealing with all the possible things that the mapping function might do;
+ thus, there are many flags that can be specified indicating what the
+ mapping function might or might not do.
+
+ The result of all this is that this is the most complicated function in
+ this file. Change it at your own risk!
+
+ A potential simplification to the logic below is to determine all the
+ extents that the mapping function should be called on before any calls
+ are actually made and save them in an array. That introduces its own
+ complications, however (the array needs to be marked for
+ garbage-collection, and a static array cannot be used because
+ map_extents() needs to be reentrant; also, restarting a map_extents()
+ call would be extremely difficult). Furthermore, the results might be a
+ little less sensible than the logic below. (#### I think they would be
+ MORE sensible. See comment below about insertions and deletions of
+ extents. --ben)
+
+ NOTE: What order does map_extents map in, and what happens if you
+ insert or delete extents while mapping?
+
+ (1) map_extents normally maps in the "display order" -- ordered
+ sequentially by start point, and then within a particular start
+ point, ordered *reverse* sequentially by end point. However,
+ if ME_END_IN_REGION && !ME_NEGATE_IN_REGION, mapping is by
+ the "e order", which is the exact inverse of the display order.
+ (#### Perhaps mapping should always be in display order. This
+ would complicate the latter case, though.)
+
+ (2) map_extents() will handle insertion and deletion in a sane fashion
+ if you give the flag ME_MIGHT_MODIFY_EXTENTS. An extent inserted
+ before the extent being processed will be ignored, but an extent
+ inserted afterwards might be processed. (More specifically, while an
+ extent is being processed, a "next" pointer is maintained to the
+ following extent. Insertions after that extent will be processed if
+ within range. Deletions work logically. Note that changing an
+ extent's endpoints is equivalent to deleting it, then reinserting
+ it. It will be processed again if it moves past the following
+ extent. Unfortunately, this means that it's difficult to predict if
+ an extent will be reprocessed when changing its endpoints, because
+ that depends on the existence or lack thereof of nearby extents.
+ One way around this would be for map_extents() to keep a list of all
+ extents to be processed, so that insertions never get reprocessed,
+ which is usually what is desired. Another possibility is a "modiff"
+ flag? Since extents are never "moved", but just deleted and
+ inserted, the equivalent of "modiff" would indicate when an extent
+ was inserted. By remembering the value of "modiff" when
+ map_extents() starts, we could easily ignore insertions. However,
+ this increases the size of the extent object.)
+*/
static void
map_extents (Bytexpos from, Bytexpos to, map_extents_fun fn,
void *arg, Lisp_Object obj, EXTENT after,
unsigned int flags)
{
+ /* This function can GC iff FN can GC */
Memxpos st, en; /* range we're mapping over */
- EXTENT range = 0; /* extent for this, if ME_MIGHT_MODIFY_TEXT */
+ Lisp_Object stmark = Qnil, enmark = Qnil; /* markers for this, if
+ ME_MIGHT_MODIFY_TEXT */
+ Charxpos fromc = 0, toc = 0;
+ EMACS_INT string_tick = 0;
Extent_List *el = 0; /* extent list we're iterating over */
Extent_List_Marker *posm = 0; /* marker for extent list,
if ME_MIGHT_MODIFY_EXTENTS */
/* count and struct for unwind-protect, if ME_MIGHT_THROW */
int count = specpdl_depth ();
- struct map_extents_struct closure;
+ struct map_extents_struct z;
+ Lisp_Object preve = Qnil; /* previous extent, used for ME_DISJOINT */
+ struct gcpro gcpro1, gcpro2, gcpro3;
PROFILE_DECLARE ();
#ifdef ERROR_CHECK_EXTENTS
@@ -2147,33 +2193,48 @@
PROFILE_RECORD_ENTERING_SECTION (QSin_map_extents_internal);
+ GCPRO3 (preve, stmark, enmark);
+
st = buffer_or_string_bytexpos_to_memxpos (obj, from);
en = buffer_or_string_bytexpos_to_memxpos (obj, to);
if (flags & ME_MIGHT_MODIFY_TEXT)
{
- /* The mapping function might change the text in the buffer,
- so make an internal extent to hold the range we're mapping
- over. */
- range = make_extent_detached (obj);
- set_extent_start (range, st);
- set_extent_end (range, en);
- range->flags.start_open = flags & ME_START_OPEN;
- range->flags.end_open = !(flags & ME_END_CLOSED);
- range->flags.internal = 1;
- range->flags.detachable = 0;
- extent_attach (range);
+ /* The mapping function might change the text in the buffer (or
+ string). If a buffer, make markers to hold the range we're
+ mapping over; else, maintain positions in characters (since
+ strings can't -- currently! -- be resized) and note the
+ string-modified-tick to optimize whether we need to refetch the
+ positions in bytes. We used to use an internal extent, but that
+ can interfere with the mapping operations (e.g. by introducing
+ overlapping when there was none before). */
+ if (BUFFERP (obj))
+ {
+ stmark = Fmake_marker ();
+ byte_set_marker_internal (stmark, from, XBUFFER (obj));
+ Fset_marker_insertion_type (stmark,
+ flags & ME_START_OPEN ? Qt : Qnil);
+ enmark = Fmake_marker ();
+ byte_set_marker_internal (enmark, to, XBUFFER (obj));
+ Fset_marker_insertion_type (enmark,
+ !(flags & ME_END_CLOSED) ? Qt : Qnil);
+ }
+ else
+ {
+ fromc = buffer_or_string_bytexpos_to_charxpos (obj, from);
+ toc = buffer_or_string_bytexpos_to_charxpos (obj, to);
+ string_tick = XINT (Fstring_modified_tick (obj));
+ }
}
if (flags & ME_MIGHT_THROW)
{
/* The mapping function might throw past us so we need to use an
- unwind_protect() to eliminate the internal extent and range
- that we use. */
- closure.range = range;
- closure.mkr = 0;
- record_unwind_protect (map_extents_unwind,
- make_opaque_ptr (&closure));
+ unwind_protect() to eliminate the internal markers that we use. */
+ z.stmark = stmark;
+ z.enmark = enmark;
+ z.mkr = 0;
+ record_unwind_protect (map_extents_unwind, make_opaque_ptr (&z));
}
/* ---------- Figure out where we start and what direction
@@ -2204,17 +2265,18 @@
have to always go in the same direction; so we choose to always
move the SOE to the start position.
- When it comes time to do the SOE stage, we first call soe_move()
- so that the SOE gets set up. Note that the SOE might get
- changed while we are mapping over its contents. If we can
- guarantee that the SOE won't get moved to a new position, we
- simply need to put a marker in the SOE and we will track deletions
- and insertions of extents in the SOE. If the SOE might get moved,
- however (this would happen as a result of a recursive invocation
- of map-extents or a call to a redisplay-type function), then
- trying to track its changes is hopeless, so we just keep a
- marker to the first (or last) extent in the SOE and use that as
- our bound.
+ When it comes time to do the SOE stage, we first call soe_move() so
+ that the SOE gets set up. Note that the SOE might get changed while
+ we are mapping over its contents. If we can guarantee that the SOE
+ won't get moved to a new position, we simply need to put a marker in
+ the SOE and we will track deletions and insertions of extents in the
+ SOE. If the SOE might get moved, however (this would happen as a
+ result of a recursive invocation of map-extents or a call to a
+ redisplay-type function), then we need to make a copy of it for our
+ own use (the alternative, which we used to do, is retrieve the first
+ (or last) extent in the SOE and use that as our bound, which would
+ give pathological behavior if there was a single extent overlapping
+ the entire buffer.
Finally, if DONT_USE_SOE is defined, we don't use the SOE at all
and instead just map from the beginning of the buffer. This is
@@ -2233,6 +2295,10 @@
int range_start_type = 0;
int range_start_pos = 0;
int stage;
+ struct gcpro ngcpro1;
+ /* Copy of the SOE if ME_MIGHT_MOVE_SOE */
+ int numsoe = 0;
+ EXTENT *copied_soe = 0;
range_flag = flags & ME_IN_REGION_MASK;
if ((range_flag == ME_START_IN_REGION ||
@@ -2249,6 +2315,13 @@
stage. */
range_endp = 1;
}
+#ifdef OPTIMIZE_FOR_TEXT_PROPS_NOT_YET
+ else if (buffer_or_string_num_non_textprop_extents (obj) == 0)
+ {
+ /* No need to use the SOE, as there are no overlapping extents. */
+ range_endp = 0;
+ }
+#endif /* 0 */
else
{
/* Need to include the SOE extents. */
@@ -2259,10 +2332,11 @@
range_start_pos = 0;
#else
Stack_Of_Extents *soe = buffer_or_string_stack_of_extents_force (obj);
- int numsoe;
- /* Move the SOE to the closer end of the range. This dictates
- whether we map over start positions or end positions. */
+ /* [[ Move the SOE to the closer end of the range. This dictates
+ whether we map over start positions or end positions. ]]
+ In fact we always move the SOE to the start and map over start
+ positions. */
range_endp = 0;
soe_move (obj, st);
numsoe = extent_list_num_els (soe->extents);
@@ -2270,22 +2344,20 @@
{
if (flags & ME_MIGHT_MOVE_SOE)
{
- int foundp;
- /* Can't map over SOE, so just extend range to cover the
- SOE. */
- EXTENT e = extent_list_at (soe->extents, 0, 0);
- range_start_pos =
- extent_list_locate (buffer_or_string_extent_list (obj), e, 0,
- &foundp);
- assert (foundp);
- range_start_type = 2;
- }
- else
- {
- /* We can map over the SOE. */
- do_soe_stage = 1;
- range_start_type = 1;
+ int i;
+
+ copied_soe = alloca_array (EXTENT, numsoe);
+
+ for (i = 0; i < numsoe; i++)
+ copied_soe[i] = extent_list_at (soe->extents, i, 0);
+
+ /* Depends on pointer-Lisp_Object equivalence! */
+ NGCPRO1_ARRAY ((Lisp_Object *) copied_soe, numsoe);
}
+
+ /* We can map over the SOE. */
+ do_soe_stage = 1;
+ range_start_type = 1;
}
else
{
@@ -2294,7 +2366,7 @@
RANGE_ENDP already specified so no need to do anything else. */
}
}
-#endif
+#endif /* DONT_USE_SOE */
/* ---------- Now loop over the extents. ---------- */
@@ -2303,13 +2375,15 @@
for (stage = 0; stage < 2; stage++)
{
int pos = 0; /* Position in extent list */
+ int copied_soe_stage = stage == 0 && copied_soe;
/* First set up start conditions */
if (stage == 0)
{ /* The SOE stage */
if (!do_soe_stage)
continue;
- el = buffer_or_string_stack_of_extents_force (obj)->extents;
+ else if (!copied_soe)
+ el = buffer_or_string_stack_of_extents_force (obj)->extents;
/* We will always be looping over start extents here. */
assert (!range_endp);
pos = 0;
@@ -2331,7 +2405,7 @@
}
}
- if (flags & ME_MIGHT_MODIFY_EXTENTS)
+ if ((flags & ME_MIGHT_MODIFY_EXTENTS) && !copied_soe_stage)
{
/* Create a marker to track changes to the extent list */
if (posm)
@@ -2340,30 +2414,44 @@
(buffer_or_string_stack_of_extents_force (obj)->extents, posm);
posm = extent_list_make_marker (el, pos, range_endp);
/* tell the unwind function about the marker. */
- closure.el = el;
- closure.mkr = posm;
+ z.el = el;
+ z.mkr = posm;
}
/* Now loop! */
for (;;)
{
EXTENT e;
- Lisp_Object obj2;
/* ----- update position in extent list
and fetch next extent ----- */
- if (posm)
- /* fetch POS again to track extent insertions or deletions */
- pos = extent_list_marker_pos (el, posm);
- if (pos >= extent_list_num_els (el))
- break;
- e = extent_list_at (el, pos, range_endp);
- pos++;
- if (posm)
- /* now point the marker to the next one we're going to process.
- This ensures graceful behavior if this extent is deleted. */
- extent_list_move_marker (el, posm, pos);
+ if (copied_soe_stage)
+ {
+ if (pos >= numsoe)
+ break;
+ e = copied_soe[pos];
+ pos++;
+ /* Anything could have happened to these extents */
+ if (!EXTENT_LIVE_P (e) || extent_detached_p (e) ||
+ !EQ (extent_object (e), obj))
+ continue;
+ }
+ else
+ {
+ if (posm)
+ /* fetch POS again to track extent insertions or deletions */
+ pos = extent_list_marker_pos (el, posm);
+ if (pos >= extent_list_num_els (el))
+ break;
+ e = extent_list_at (el, pos, range_endp);
+ pos++;
+ if (posm)
+ /* now point the marker to the next one we're going to
+ process. This ensures graceful behavior if this
+ extent is deleted. */
+ extent_list_move_marker (el, posm, pos);
+ }
/* ----- deal with internal extents ----- */
@@ -2371,18 +2459,6 @@
{
if (!(flags & ME_INCLUDE_INTERNAL))
continue;
- else if (e == range)
- {
- /* We're processing internal extents and we've
- come across our own special range extent.
- (This happens only in adjust_extents*() and
- process_extents*(), which handle text
- insertion and deletion.) We need to omit
- processing of this extent; otherwise
- we will probably end up prematurely
- terminating this loop. */
- continue;
- }
}
/* ----- deal with AFTER condition ----- */
@@ -2399,12 +2475,22 @@
/* ----- stop if we're completely outside the range ----- */
/* fetch ST and EN again to track text insertions or deletions */
- if (range)
+ if (!NILP (stmark))
+ {
+ st = XMARKER (stmark)->membpos;
+ en = XMARKER (enmark)->membpos;
+ }
+ else if (flags & ME_MIGHT_MODIFY_TEXT)
{
- st = extent_start (range);
- en = extent_end (range);
+ /* markers are nil so we must be dealing with a string */
+ if (string_tick != XINT (Fstring_modified_tick (obj)))
+ {
+ st = buffer_or_string_charxpos_to_memxpos (obj, fromc);
+ en = buffer_or_string_charxpos_to_memxpos (obj, toc);
+ }
+
}
- if (extent_endpoint (e, range_endp) > en)
+ if (!copied_soe_stage && extent_endpoint_mem (e, range_endp) > en)
{
/* Can't be mapping over SOE because all extents in
there should overlap ST */
@@ -2414,14 +2500,23 @@
/* ----- Now actually call the function ----- */
- obj2 = extent_object (e);
- if (extent_in_region_p (e,
- buffer_or_string_memxpos_to_bytexpos (obj2,
- st),
- buffer_or_string_memxpos_to_bytexpos (obj2,
- en),
- flags))
+ assert (EQ (extent_object (e), obj));
+ if (extent_in_region_p
+ (e, buffer_or_string_memxpos_to_bytexpos (obj, st),
+ buffer_or_string_memxpos_to_bytexpos (obj, en),
+ flags))
{
+ if (flags & ME_DISJOINT)
+ {
+ if (!NILP (preve) &&
+ !extent_detached_p (XEXTENT (preve)) &&
+ extent_in_region_p
+ (e, extent_start_byte (XEXTENT (preve)),
+ extent_end_byte (XEXTENT (preve)), flags))
+ continue;
+ else
+ preve = wrap_extent (e);
+ }
if ((*fn)(e, arg))
{
/* Function wants us to stop mapping. */
@@ -2432,20 +2527,26 @@
}
}
/* ---------- Finished looping. ---------- */
+ if (copied_soe)
+ NUNGCPRO;
}
if (!(flags & ME_MIGHT_THROW))
{
/* Delete them ourselves */
- if (range)
- extent_detach (range);
- if (posm)
- extent_list_delete_marker (el, posm);
+ if (!NILP (stmark))
+ {
+ Fset_marker (stmark, Qnil, Qnil);
+ Fset_marker (enmark, Qnil, Qnil);
+ if (posm)
+ extent_list_delete_marker (el, posm);
+ }
}
/* This deletes the range extent and frees the marker, if ME_MIGHT_THROW. */
unbind_to (count);
+ UNGCPRO;
PROFILE_RECORD_EXITING_SECTION (QSin_map_extents_internal);
}
@@ -2483,7 +2584,7 @@
#endif
el = buffer_or_string_extent_list (obj);
- if (!el || !extent_list_num_els(el))
+ if (!el || !extent_list_num_els (el))
return;
/* IMPORTANT! Compute the starting positions of the extents to
@@ -2498,12 +2599,11 @@
pos++)
{
EXTENT e = extent_list_at (el, pos, endp);
- if (extent_endpoint (e, endp) > to)
+ if (extent_endpoint_mem (e, endp) > to)
break;
- set_extent_endpoint (e,
- do_marker_adjustment (extent_endpoint (e, endp),
- from, to, amount),
- endp);
+ extent_endpoint_mem (e, endp) =
+ do_marker_adjustment (extent_endpoint_mem (e, endp),
+ from, to, amount);
}
}
@@ -2526,10 +2626,10 @@
static int
adjust_extents_for_deletion_mapper (EXTENT extent, void *arg)
{
- struct adjust_extents_for_deletion_arg *closure =
+ struct adjust_extents_for_deletion_arg *z =
(struct adjust_extents_for_deletion_arg *) arg;
- Dynarr_add (closure->list, extent);
+ Dynarr_add (z->list, extent);
return 0; /* continue mapping */
}
@@ -2550,7 +2650,7 @@
Bytexpos to, int gapsize, int numdel,
int movegapsize)
{
- struct adjust_extents_for_deletion_arg closure;
+ struct adjust_extents_for_deletion_arg z;
int i;
Memxpos adjust_to = (Memxpos) (to + gapsize);
Bytecount amount = - numdel - movegapsize;
@@ -2560,7 +2660,7 @@
#ifdef ERROR_CHECK_EXTENTS
sledgehammer_extent_check (object);
#endif
- closure.list = Dynarr_new (EXTENT);
+ z.list = Dynarr_new (EXTENT);
/* We're going to be playing weird games below with extents and the SOE
and such, so compute the list now of all the extents that we're going
@@ -2568,7 +2668,7 @@
get all screwed up. */
map_extents (from, to, adjust_extents_for_deletion_mapper,
- (void *) &closure, object, 0,
+ (void *) &z, object, 0,
/* extent endpoints move like markers regardless
of their open/closeness. */
ME_ALL_EXTENTS_CLOSED | ME_END_CLOSED |
@@ -2584,29 +2684,29 @@
oldsoe = soe->pos;
if (soe->pos >= 0)
newsoe = do_marker_adjustment (soe->pos,
- adjust_to, adjust_to,
- amount);
+ adjust_to, adjust_to,
+ amount);
else
newsoe = soe->pos;
}
- for (i = 0; i < Dynarr_length (closure.list); i++)
+ for (i = 0; i < Dynarr_length (z.list); i++)
{
- EXTENT extent = Dynarr_at (closure.list, i);
- Memxpos new_start = extent_start (extent);
- Memxpos new_end = extent_end (extent);
+ EXTENT extent = Dynarr_at (z.list, i);
+ Memxpos new_start = extent_start_mem (extent);
+ Memxpos new_end = extent_end_mem (extent);
/* do_marker_adjustment() will not adjust values that should not be
adjusted. We're passing the same funky arguments to
do_marker_adjustment() as buffer_delete_range() does. */
new_start =
do_marker_adjustment (new_start,
- adjust_to, adjust_to,
- amount);
+ adjust_to, adjust_to,
+ amount);
new_end =
do_marker_adjustment (new_end,
- adjust_to, adjust_to,
- amount);
+ adjust_to, adjust_to,
+ amount);
/* We need to be very careful here so that the SOE doesn't get
corrupted. We are shrinking extents out of the deleted region
@@ -2621,12 +2721,12 @@
new location whenever we put the extent back in.
*/
- if (new_start != extent_start (extent) ||
- new_end != extent_end (extent))
+ if (new_start != extent_start_mem (extent) ||
+ new_end != extent_end_mem (extent))
{
extent_detach (extent);
- set_extent_start (extent, new_start);
- set_extent_end (extent, new_end);
+ extent_start_mem (extent) = new_start;
+ extent_end_mem (extent) = new_end;
if (soe)
soe->pos = newsoe;
extent_attach (extent);
@@ -2641,43 +2741,41 @@
#ifdef ERROR_CHECK_EXTENTS
sledgehammer_extent_check (object);
#endif
- Dynarr_free (closure.list);
+ Dynarr_free (z.list);
}
/* ------------------------------- */
/* extent fragments */
/* ------------------------------- */
-/* Imagine that the buffer is divided up into contiguous,
- nonoverlapping "runs" of text such that no extent
- starts or ends within a run (extents that abut the
- run don't count).
-
- An extent fragment is a structure that holds data about
- the run that contains a particular buffer position (if
- the buffer position is at the junction of two runs, the
- run after the position is used) -- the beginning and
- end of the run, a list of all of the extents in that
- run, the "merged face" that results from merging all of
- the faces corresponding to those extents, the begin and
- end glyphs at the beginning of the run, etc. This is
- the information that redisplay needs in order to
- display this run.
-
- Extent fragments have to be very quick to update to
- a new buffer position when moving linearly through
- the buffer. They rely on the stack-of-extents code,
- which does the heavy-duty algorithmic work of determining
- which extents overly a particular position. */
-
-/* This function returns the position of the beginning of
- the first run that begins after POS, or returns POS if
- there are no such runs. */
+/* Imagine that the buffer is divided up into contiguous, nonoverlapping
+ "runs" (or intervals) of text such that no extent starts or ends within
+ a run (extents that abut the run don't count).
+
+ An extent fragment is a structure that holds data about the run that
+ contains a particular buffer position (if the buffer position is at the
+ junction of two runs, the run after the position is used) -- the
+ beginning and end of the run, a list of all of the extents in that run,
+ the "merged face" that results from merging all of the faces
+ corresponding to those extents, the begin and end glyphs at the
+ beginning of the run, etc. This is the information that redisplay needs
+ in order to display this run.
+
+ Extent fragments have to be very quick to update to a new buffer
+ position when moving linearly through the buffer. They rely on the
+ stack-of-extents code, which does the heavy-duty algorithmic work of
+ determining which extents overlay a particular position. */
+
+/* This function returns the first position after POS where an extent
+ begins or ends, or returns the end (of the buffer if OUTSIDE_ACCESSIBLE
+ is 1, else of the accessible region of the buffer) if there is no such
+ position. Essentially, this returns the end of the run containing POS,
+ choosing the run to the right of POS is POS is at the border of two
+ runs. */
static Bytexpos
extent_find_end_of_run (Lisp_Object obj, Bytexpos pos, int outside_accessible)
{
- Extent_List *sel;
Extent_List *bel = buffer_or_string_extent_list (obj);
Bytexpos pos1, pos2;
int elind1, elind2;
@@ -2686,6 +2784,29 @@
buffer_or_string_absolute_end_byte (obj) :
buffer_or_string_accessible_end_byte (obj);
+#if 1
+ if (!bel || !extent_list_num_els (bel))
+ return limit;
+
+ /* Find the first start position after POS. */
+ elind1 = extent_list_locate_from_pos (bel, mempos + 1, 0);
+ if (elind1 < extent_list_num_els (bel))
+ pos1 = buffer_or_string_memxpos_to_bytexpos
+ (obj, extent_start_mem (extent_list_at (bel, elind1, 0)));
+ else
+ pos1 = limit;
+
+ /* Find the first end position after POS. */
+ elind2 = extent_list_locate_from_pos (bel, mempos + 1, 1);
+ if (elind2 < extent_list_num_els (bel))
+ pos2 = buffer_or_string_memxpos_to_bytexpos
+ (obj, extent_end_mem (extent_list_at (bel, elind2, 1)));
+ else
+ pos2 = limit;
+
+#else
+ /* #### Why do we need to use the SOE at all for this computation? */
+ Extent_List *sel;
if (!bel || !extent_list_num_els (bel))
return limit;
@@ -2696,7 +2817,7 @@
elind1 = extent_list_locate_from_pos (bel, mempos+1, 0);
if (elind1 < extent_list_num_els (bel))
pos1 = buffer_or_string_memxpos_to_bytexpos
- (obj, extent_start (extent_list_at (bel, elind1, 0)));
+ (obj, extent_start_mem (extent_list_at (bel, elind1, 0)));
else
pos1 = limit;
@@ -2706,18 +2827,25 @@
elind2 = extent_list_locate_from_pos (sel, mempos+1, 1);
if (elind2 < extent_list_num_els (sel))
pos2 = buffer_or_string_memxpos_to_bytexpos
- (obj, extent_end (extent_list_at (sel, elind2, 1)));
+ (obj, extent_end_mem (extent_list_at (sel, elind2, 1)));
else
pos2 = limit;
+#endif /* 1 */
return min (min (pos1, pos2), limit);
}
+/* This function returns the first position before POS where an extent
+ begins or ends, or returns the beginning (of the buffer if
+ OUTSIDE_ACCESSIBLE is 1, else of the accessible region of the buffer) if
+ there is no such position. Essentially, this returns the beginning of
+ the run containing POS, choosing the run to the left of POS is POS is at
+ the border of two runs. */
+
static Bytexpos
extent_find_beginning_of_run (Lisp_Object obj, Bytexpos pos,
int outside_accessible)
{
- Extent_List *sel;
Extent_List *bel = buffer_or_string_extent_list (obj);
Bytexpos pos1, pos2;
int elind1, elind2;
@@ -2725,8 +2853,31 @@
Bytexpos limit = outside_accessible ?
buffer_or_string_absolute_begin_byte (obj) :
buffer_or_string_accessible_begin_byte (obj);
+
+#if 1
+ if (!bel || !extent_list_num_els (bel))
+ return limit;
+
+ /* Find the first start position before POS. */
+ elind1 = extent_list_locate_from_pos (bel, mempos, 0);
+ if (elind1 > 0)
+ pos1 = buffer_or_string_memxpos_to_bytexpos
+ (obj, extent_start_mem (extent_list_at (bel, elind1 - 1, 0)));
+ else
+ pos1 = limit;
+
+ /* Find the first end position before POS. */
+ elind2 = extent_list_locate_from_pos (bel, mempos, 1);
+ if (elind2 > 0)
+ pos2 = buffer_or_string_memxpos_to_bytexpos
+ (obj, extent_end_mem (extent_list_at (bel, elind2 - 1, 1)));
+ else
+ pos2 = limit;
+#else /* not 1 */
+ /* #### Why do we need to use the SOE at all for this computation? */
+ Extent_List *sel;
- if (!bel || !extent_list_num_els(bel))
+ if (!bel || !extent_list_num_els (bel))
return limit;
sel = buffer_or_string_stack_of_extents_force (obj)->extents;
@@ -2736,7 +2887,7 @@
elind1 = extent_list_locate_from_pos (bel, mempos, 1);
if (elind1 > 0)
pos1 = buffer_or_string_memxpos_to_bytexpos
- (obj, extent_end (extent_list_at (bel, elind1 - 1, 1)));
+ (obj, extent_end_mem (extent_list_at (bel, elind1 - 1, 1)));
else
pos1 = limit;
@@ -2746,9 +2897,10 @@
elind2 = extent_list_locate_from_pos (sel, mempos, 0);
if (elind2 > 0)
pos2 = buffer_or_string_memxpos_to_bytexpos
- (obj, extent_start (extent_list_at (sel, elind2 - 1, 0)));
+ (obj, extent_start_mem (extent_list_at (sel, elind2 - 1, 0)));
else
pos2 = limit;
+#endif /* 1 */
return max (max (pos1, pos2), limit);
}
@@ -2948,23 +3100,27 @@
ef->pos = pos;
ef->end = extent_find_end_of_run (ef->object, pos, 0);
- /* Note that extent_find_end_of_run() already moved the SOE for us. */
- /* soe_move (ef->object, mempos); */
+#if 0
+ /* [[ Note that extent_find_end_of_run() already moved the SOE for us. ]]
+ Not any more. */
+#endif
+ soe_move (ef->object, mempos);
/* Determine the begin glyphs at POS. */
for (i = 0; i < extent_list_num_els (sel); i++)
{
EXTENT e = extent_list_at (sel, i, 0);
- if (extent_start (e) == mempos && !NILP (extent_begin_glyph (e)))
+ if (extent_start_mem (e) == mempos && !NILP (extent_begin_glyph (e)))
{
Lisp_Object glyph = extent_begin_glyph (e);
- if (seen_glyph) {
- struct glyph_block gb;
-
- gb.glyph = glyph;
- gb.extent = wrap_extent (e);
- Dynarr_add (ef->begin_glyphs, gb);
- }
+ if (seen_glyph)
+ {
+ struct glyph_block gb;
+
+ gb.glyph = glyph;
+ gb.extent = wrap_extent (e);
+ Dynarr_add (ef->begin_glyphs, gb);
+ }
else if (EQ (glyph, last_glyph))
seen_glyph = 1;
}
@@ -2974,7 +3130,7 @@
for (i = 0; i < extent_list_num_els (sel); i++)
{
EXTENT e = extent_list_at (sel, i, 1);
- if (extent_end (e) == mempos && !NILP (extent_end_glyph (e)))
+ if (extent_end_mem (e) == mempos && !NILP (extent_end_glyph (e)))
{
Lisp_Object glyph = extent_end_glyph (e);
if (seen_glyph) {
@@ -3003,7 +3159,7 @@
for (i = 0; i < extent_list_num_els (sel); i++)
{
EXTENT e = extent_list_at (sel, i, 0);
- if (extent_end (e) > mempos)
+ if (extent_end_mem (e) > mempos)
{
Lisp_Object invis_prop = extent_invisible (e);
@@ -3046,8 +3202,8 @@
/* zeroing isn't really necessary; we only deref `priority'
and `face' */
xzero (dummy_lhe_extent);
- set_extent_priority (&dummy_lhe_extent,
- mouse_highlight_priority);
+ set_extent_priority_0 (&dummy_lhe_extent,
+ mouse_highlight_priority);
/* Need to break up the following expression, due to an */
/* error in the Digital UNIX 3.2g C compiler (Digital */
/* UNIX Compiler Driver 3.11). */
@@ -3056,16 +3212,16 @@
Dynarr_add (ef->extents, &dummy_lhe_extent);
}
/* since we are looping anyway, we might as well do this here */
- if ((!NILP(extent_initial_redisplay_function (e))) &&
- !extent_in_red_event_p(e))
+ if ((!NILP (extent_initial_redisplay_function (e))) &&
+ !extent_in_red_event_p (e))
{
Lisp_Object function = extent_initial_redisplay_function (e);
Lisp_Object obj;
- /* printf ("initial redisplay function called!\n "); */
+ /* stderr_out ("initial redisplay function called!\n "); */
/* print_extent_2 (e);
- printf ("\n"); */
+ stderr_out ("\n"); */
/* FIXME: One should probably inhibit the displaying of
this extent to reduce flicker */
@@ -3101,67 +3257,20 @@
struct extent *extent = XEXTENT (obj);
mark_object (extent_object (extent));
- mark_object (extent_no_chase_normal_field (extent, face));
+ /* Not extent_face() etc. since those chase down the ancestor. */
+ mark_object (extent->face);
+ mark_object (extent->text_prop);
return extent->plist;
}
static void
-print_extent_1 (Lisp_Object obj, Lisp_Object printcharfun,
- int UNUSED (escapeflag))
-{
- EXTENT ext = XEXTENT (obj);
- EXTENT anc = extent_ancestor (ext);
- Lisp_Object tail;
- char buf[64], *bp = buf;
-
- /* Retrieve the ancestor and use it, for faster retrieval of properties */
-
- if (!NILP (extent_begin_glyph (anc))) *bp++ = '*';
- *bp++ = (extent_start_open_p (anc) ? '(': '[');
- if (extent_detached_p (ext))
- strcpy (bp, "detached");
- else
- sprintf (bp, "%ld, %ld",
- XINT (Fextent_start_position (obj)),
- XINT (Fextent_end_position (obj)));
- bp += strlen (bp);
- *bp++ = (extent_end_open_p (anc) ? ')': ']');
- if (!NILP (extent_end_glyph (anc))) *bp++ = '*';
- *bp++ = ' ';
-
- if (!NILP (extent_read_only (anc))) *bp++ = '%';
- if (!NILP (extent_mouse_face (anc))) *bp++ = 'H';
- if (extent_unique_p (anc)) *bp++ = 'U';
- else if (extent_duplicable_p (anc)) *bp++ = 'D';
- if (!NILP (extent_invisible (anc))) *bp++ = 'I';
-
- if (!NILP (extent_read_only (anc)) || !NILP (extent_mouse_face (anc)) ||
- extent_unique_p (anc) ||
- extent_duplicable_p (anc) || !NILP (extent_invisible (anc)))
- *bp++ = ' ';
- *bp = '\0';
- write_c_string (printcharfun, buf);
-
- tail = extent_plist_slot (anc);
-
- for (; !NILP (tail); tail = Fcdr (Fcdr (tail)))
- {
- Lisp_Object v = XCAR (XCDR (tail));
- if (NILP (v)) continue;
- write_fmt_string_lisp (printcharfun, "%S ", 1, XCAR (tail));
- }
-
- write_fmt_string (printcharfun, "0x%lx", (long) ext);
-}
-
-static void
print_extent (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
{
if (escapeflag)
{
- const char *title = "";
- const char *name = "";
- const char *posttitle = "";
+ const Ascbyte *title = "";
+ const CIbyte *name = "";
+ const Ascbyte *posttitle = "";
Lisp_Object obj2 = Qnil;
/* Destroyed extents have 't' in the object field, causing
@@ -3176,7 +3285,7 @@
if (BUFFER_LIVE_P (XBUFFER (obj2)))
{
title = "buffer ";
- name = (char *) XSTRING_DATA (XBUFFER (obj2)->name);
+ name = (CIbyte *) XSTRING_DATA (XBUFFER (obj2)->name);
}
else
{
@@ -3189,7 +3298,7 @@
assert (STRINGP (obj2));
title = "string \"";
posttitle = "\"";
- name = (char *) XSTRING_DATA (obj2);
+ name = (CIbyte *) XSTRING_DATA (obj2);
}
if (print_readably)
@@ -3205,8 +3314,82 @@
write_c_string (printcharfun, "#<destroyed extent");
else
{
+ EXTENT ext = XEXTENT (obj);
+ EXTENT anc = extent_ancestor (ext);
+ Lisp_Object tail, val;
+ Ascbyte buf[64], *bp = buf;
+
write_c_string (printcharfun, "#<extent ");
- print_extent_1 (obj, printcharfun, escapeflag);
+
+ /* Retrieve the ancestor and use it, for faster retrieval of
+ properties */
+
+ *bp++ = (extent_start_open_p (anc) ? '(': '[');
+ if (extent_detached_p (ext))
+ strcpy (bp, "detached");
+ else
+ sprintf (bp, "%ld, %ld",
+ XINT (Fextent_start_position (obj)),
+ XINT (Fextent_end_position (obj)));
+ bp += strlen (bp);
+ *bp++ = (extent_end_open_p (anc) ? ')': ']');
+ *bp++ = ' ';
+
+ *bp = '\0';
+ write_c_string (printcharfun, buf);
+
+ if (!NILP (val = extent_parent (ext)))
+ write_fmt_string_lisp (printcharfun, "parent=%S ", 1, val);
+
+ if (!NILP (val = extent_children (ext)) &&
+ !NILP (val = XWEAK_LIST_LIST (val)))
+ write_fmt_string_lisp (printcharfun, "children=%S ", 1, val);
+
+ if (!NILP (val = extent_text_prop (ext)))
+ write_fmt_string_lisp (printcharfun, "text-prop=%S ", 1, val);
+
+ if (!NILP (val = extent_begin_glyph (anc)))
+ write_fmt_string_lisp (printcharfun, "begin-glyph=(%S, %S) ", 2,
+ Fextent_property (obj, Qbegin_glyph_layout,
+ Qnil),
+ val);
+
+ if (!NILP (val = extent_end_glyph (anc)))
+ write_fmt_string_lisp (printcharfun, "end-glyph=(%S, %S) ", 2,
+ Fextent_property (obj, Qend_glyph_layout,
+ Qnil),
+ val);
+
+#define FROB(cprop, lprop) \
+ if (!NILP (val = Fextent_property (obj, Q##cprop, Qnil))) \
+ write_fmt_string_lisp (printcharfun, #lprop "=%S ", 1, val)
+
+ FROB (face, face);
+ FROB (mouse_face, mouse-face);
+ FROB (read_only, read-only);
+ FROB (initial_redisplay_function, initial-redisplay-function);
+ FROB (before_change_functions, before-change-functions);
+ FROB (after_change_functions, after-change-functions);
+ FROB (duplicable, duplicable);
+ FROB (invisible, invisible);
+#undef FROB
+
+ if (extent_priority (anc))
+ write_fmt_string (printcharfun, "priority=%d ",
+ extent_priority (anc));
+
+ tail = extent_plist_slot (anc);
+
+ for (; !NILP (tail); tail = Fcdr (Fcdr (tail)))
+ write_fmt_string_lisp (printcharfun, "%S=%S ", 2, XCAR (tail),
+ XCAR (XCDR (tail)));
+
+ if (!extent_detachable_p (anc))
+ write_c_string (printcharfun, "non-detachable ");
+ if (extent_unique_p (anc))
+ write_c_string (printcharfun, "unique ");
+
+ write_fmt_string (printcharfun, "0x%lx", (long) ext);
write_c_string (printcharfun, extent_detached_p (XEXTENT (obj))
? " from " : " in ");
write_fmt_string (printcharfun, "%s%s%s", title, name, posttitle);
@@ -3229,6 +3412,8 @@
amount to anything, and could be removed. However, the time
savings would probably not be significant. */
if (!(EQ (extent_face (e1), extent_face (e2)) &&
+ internal_equal (extent_text_prop (e1), extent_text_prop (e2),
+ depth + 1) &&
extent_priority (e1) == extent_priority (e2) &&
internal_equal (extent_begin_glyph (e1), extent_begin_glyph (e2),
depth + 1) &&
@@ -3263,8 +3448,8 @@
struct extent *e1 = XEXTENT (obj1);
struct extent *e2 = XEXTENT (obj2);
return
- (extent_start (e1) == extent_start (e2) &&
- extent_end (e1) == extent_end (e2) &&
+ (extent_start_mem (e1) == extent_start_mem (e2) &&
+ extent_end_mem (e1) == extent_end_mem (e2) &&
internal_equal (extent_object (e1), extent_object (e2), depth + 1) &&
properties_equal (extent_ancestor (e1), extent_ancestor (e2),
depth));
@@ -3276,13 +3461,14 @@
struct extent *e = XEXTENT (obj);
/* No need to hash all of the elements; that would take too long.
Just hash the most common ones. */
- return HASH3 (extent_start (e), extent_end (e),
+ return HASH3 (extent_start_mem (e), extent_end_mem (e),
internal_hash (extent_object (e), depth + 1));
}
static const struct memory_description extent_description[] = {
{ XD_LISP_OBJECT, offsetof (struct extent, object) },
- { XD_LISP_OBJECT, offsetof (struct extent, flags.face) },
+ { XD_LISP_OBJECT, offsetof (struct extent, face) },
+ { XD_LISP_OBJECT, offsetof (struct extent, text_prop) },
{ XD_LISP_OBJECT, offsetof (struct extent, plist) },
{ XD_END }
};
@@ -3391,6 +3577,13 @@
return extent;
}
+static void
+check_modifiable_extent (EXTENT e)
+{
+ if (!NILP (extent_text_prop (e)))
+ invalid_change ("Can't modify text-property extents", wrap_extent
(e));
+}
+
/* Note that the returned value is a char position, not a byte position. */
static Lisp_Object
@@ -3458,8 +3651,8 @@
(extent))
{
EXTENT e = decode_extent (extent, DE_MUST_BE_ATTACHED);
- return make_int (extent_endpoint_char (e, 1)
- - extent_endpoint_char (e, 0));
+ return make_int (extent_end_char (e)
+ - extent_start_char (e));
}
DEFUN ("next-extent", Fnext_extent, 1, 1, 0, /*
@@ -3671,6 +3864,7 @@
Lisp_Object cur_parent = extent_parent (e);
Lisp_Object rest;
+ check_modifiable_extent (e);
extent = wrap_extent (e);
if (!NILP (parent))
CHECK_LIVE_EXTENT (parent);
@@ -3719,9 +3913,9 @@
oldprops = Dynarr_new (Lisp_Object_pair);
newprops = Dynarr_new (Lisp_Object_pair);
if (!NILP (cur_parent))
- extent_properties (XEXTENT (cur_parent), oldprops);
+ extent_properties (XEXTENT (cur_parent), oldprops, 0);
if (!NILP (parent))
- extent_properties (XEXTENT (parent), newprops);
+ extent_properties (XEXTENT (parent), newprops, 0);
qsort (Dynarr_atp (oldprops, 0), Dynarr_length (oldprops),
sizeof (Lisp_Object_pair), compare_key_value_pairs);
@@ -3792,7 +3986,7 @@
*/
static void
-set_extent_endpoints_1 (EXTENT extent, Memxpos start, Memxpos end)
+set_extent_endpoints_mem (EXTENT extent, Memxpos start, Memxpos end)
{
#ifdef ERROR_CHECK_EXTENTS
Lisp_Object obj = extent_object (extent);
@@ -3807,13 +4001,13 @@
/* Optimization: if the extent is already where we want it to be,
do nothing. */
- if (!extent_detached_p (extent) && extent_start (extent) == start &&
- extent_end (extent) == end)
+ if (!extent_detached_p (extent) && extent_start_mem (extent) == start
&&
+ extent_end_mem (extent) == end)
return;
if (extent_detached_p (extent))
{
- if (extent_duplicable_p (extent))
+ if (!NILP (extent_duplicable (extent)))
{
Lisp_Object extent_obj = wrap_extent (extent);
@@ -3823,8 +4017,8 @@
else
extent_detach (extent);
- set_extent_start (extent, start);
- set_extent_end (extent, end);
+ extent_start_mem (extent) = start;
+ extent_end_mem (extent) = end;
extent_attach (extent);
}
@@ -3832,8 +4026,8 @@
OBJECT. (If OBJECT is nil, do not change the extent's object.) */
void
-set_extent_endpoints (EXTENT extent, Bytexpos s, Bytexpos e,
- Lisp_Object object)
+set_extent_endpoints_byte (EXTENT extent, Bytexpos s, Bytexpos e,
+ Lisp_Object object)
{
Memxpos start, end;
@@ -3846,13 +4040,14 @@
{
extent_detach (extent);
extent_object (extent) = object;
+ buffer_or_string_extent_info_force (object);
}
- start = s < 0 ? extent_start (extent) :
+ start = s < 0 ? extent_start_mem (extent) :
buffer_or_string_bytexpos_to_memxpos (object, s);
- end = e < 0 ? extent_end (extent) :
+ end = e < 0 ? extent_end_mem (extent) :
buffer_or_string_bytexpos_to_memxpos (object, e);
- set_extent_endpoints_1 (extent, start, end);
+ set_extent_endpoints_mem (extent, start, end);
}
static void
@@ -3876,7 +4071,7 @@
EXTENT extent;
extent = make_extent_detached (object);
- set_extent_endpoints (extent, from, to, Qnil);
+ set_extent_endpoints_byte (extent, from, to, Qnil);
return extent;
}
@@ -3888,24 +4083,25 @@
EXTENT e;
e = make_extent_detached (object);
- if (from >= 0)
- set_extent_endpoints (e, from, to, Qnil);
-
- e->plist = Fcopy_sequence (original->plist);
+ /* Mess with text_prop before inserting the extent so our non-text-prop
+ count stays accurate. */
+ e->plist = Fcopy_sequence (extent_no_chase_plist (original));
memcpy (&e->flags, &original->flags, sizeof (e->flags));
+ e->face = original->face;
+ e->text_prop = Fcopy_tree (original->text_prop, Qnil);
if (e->flags.has_aux)
{
/* also need to copy the aux struct. It won't work for
this extent to share the same aux struct as the original
one. */
- struct extent_auxiliary *data =
- alloc_lcrecord_type (struct extent_auxiliary,
- &lrecord_extent_auxiliary);
-
- copy_lcrecord (data, XEXTENT_AUXILIARY (XCAR (original->plist)));
- XCAR (e->plist) = wrap_extent_auxiliary (data);
+ allocate_extent_auxiliary (e);
+ copy_lrecord (extent_aux_or_default (e),
+ XEXTENT_AUXILIARY (XCAR (original->plist)));
}
+ if (from >= 0)
+ set_extent_endpoints_byte (e, from, to, Qnil);
+
{
/* we may have just added another child to the parent extent. */
Lisp_Object parent = extent_parent (e);
@@ -4004,6 +4200,8 @@
CHECK_EXTENT (extent);
ext = XEXTENT (extent);
+ check_modifiable_extent (ext);
+
if (!EXTENT_LIVE_P (ext))
return Qnil;
destroy_extent (ext);
@@ -4027,9 +4225,10 @@
{
EXTENT ext = decode_extent (extent, 0);
+ check_modifiable_extent (ext);
if (extent_detached_p (ext))
return extent;
- if (extent_duplicable_p (ext))
+ if (!NILP (extent_duplicable (ext)))
record_extent (extent, 0);
extent_detach (ext);
@@ -4051,6 +4250,8 @@
ext = decode_extent (extent, 0);
+ check_modifiable_extent (ext);
+
if (NILP (buffer_or_string))
{
buffer_or_string = extent_object (ext);
@@ -4066,8 +4267,7 @@
get_buffer_or_string_range_byte (buffer_or_string, start, end, &s, &e,
GB_ALLOW_PAST_ACCESSIBLE);
- buffer_or_string_extent_info_force (buffer_or_string);
- set_extent_endpoints (ext, s, e, buffer_or_string);
+ set_extent_endpoints_byte (ext, s, e, buffer_or_string);
return extent;
}
@@ -4125,6 +4325,7 @@
EQ (sym, Qstart_and_end_in_region) ? ME_START_AND_END_IN_REGION :
EQ (sym, Qstart_or_end_in_region) ? ME_START_OR_END_IN_REGION :
EQ (sym, Qnegate_in_region) ? ME_NEGATE_IN_REGION :
+ EQ (sym, Qdisjoint) ? ME_DISJOINT :
(invalid_constant ("Invalid `map-extents' flag", sym), 0);
flags = XCDR (flags);
@@ -4163,25 +4364,24 @@
slow_map_extents_function (EXTENT extent, void *arg)
{
/* This function can GC */
- struct slow_map_extents_arg *closure = (struct slow_map_extents_arg *) arg;
+ struct slow_map_extents_arg *z = (struct slow_map_extents_arg *) arg;
Lisp_Object extent_obj = wrap_extent (extent);
/* make sure this extent qualifies according to the PROPERTY
and VALUE args */
- if (!NILP (closure->property))
+ if (!NILP (z->property))
{
- Lisp_Object value = Fextent_property (extent_obj, closure->property,
+ Lisp_Object value = Fextent_property (extent_obj, z->property,
Qnil);
- if ((NILP (closure->value) && NILP (value)) ||
- (!NILP (closure->value) && !EQ (value, closure->value)))
+ if ((NILP (z->value) && NILP (value)) ||
+ (!NILP (z->value) && !EQ (value, z->value)))
return 0;
}
- closure->result = call2 (closure->map_routine, extent_obj,
- closure->map_arg);
- return !NILP (closure->result);
+ z->result = call2 (z->map_routine, extent_obj, z->map_arg);
+ return !NILP (z->result);
}
DEFUN ("map-extents", Fmap_extents, 1, 8, 0, /*
@@ -4246,7 +4446,27 @@
negate-in-region The condition specified by a `*-in-region' flag
must NOT hold for the extent to be considered.
+disjoint After mapping over an extent, `map-extents' skips
+ all following extents that overlap the extent (where
+ overlapping is defined using `extent-in-region-p'
+ with a region defined by the previous extent's
+ endpoints). The effect is that all extents mapped
+ over will be disjoint from all others. This is
+ particularly useful in combination with
+ `start-in-region' to walk a tree of extents, like
+ this:
+
+ (defun walk-extent-tree (buffer &optional ignore)
+ (when (extentp buffer)
+ ... process the extent ...)
+ (map-extents 'walk-extent-tree buffer nil nil nil
+ '(disjoint start-in-region)))
+
+ This does a depth-first traversal of the extents in
+ the buffer, according to a tree where A is a child of
+ B if A's start position is inside of B.
+
At most one of `all-extents-closed', `all-extents-open',
`all-extents-closed-open', and `all-extents-open-closed' may be specified.
@@ -4260,7 +4480,7 @@
(function, object, from, to, maparg, flags, property, value))
{
/* This function can GC */
- struct slow_map_extents_arg closure;
+ struct slow_map_extents_arg z;
unsigned int me_flags;
Bytexpos start, end;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
@@ -4291,19 +4511,19 @@
GCPRO5 (function, maparg, object, property, value);
- closure.map_arg = maparg;
- closure.map_routine = function;
- closure.result = Qnil;
- closure.property = property;
- closure.value = value;
+ z.map_arg = maparg;
+ z.map_routine = function;
+ z.result = Qnil;
+ z.property = property;
+ z.value = value;
map_extents (start, end, slow_map_extents_function,
- (void *) &closure, object, after,
+ (void *) &z, object, after,
/* You never know what the user might do ... */
me_flags | ME_MIGHT_CALL_ELISP);
UNGCPRO;
- return closure.result;
+ return z.result;
}
@@ -4312,175 +4532,30 @@
/************************************************************************/
/* ------------------------------- */
-/* map-extent-children */
+/* extent-at */
/* ------------------------------- */
-struct slow_map_extent_children_arg
+struct extent_at_arg
{
- Lisp_Object map_arg;
- Lisp_Object map_routine;
- Lisp_Object result;
- Lisp_Object property;
- Lisp_Object value;
- Bytexpos start_min;
- Bytexpos prev_start;
- Bytexpos prev_end;
+ Lisp_Object best_match; /* or list of extents */
+ Memxpos best_start;
+ Memxpos best_end;
+ Lisp_Object prop;
+ EXTENT before;
+ int all_extents;
};
-static int
-slow_map_extent_children_function (EXTENT extent, void *arg)
+static enum extent_at_flag
+decode_extent_at_flag (Lisp_Object at_flag)
{
- /* This function can GC */
- struct slow_map_extent_children_arg *closure =
- (struct slow_map_extent_children_arg *) arg;
- Lisp_Object extent_obj;
- Bytexpos start = extent_endpoint_byte (extent, 0);
- Bytexpos end = extent_endpoint_byte (extent, 1);
- /* Make sure the extent starts inside the region of interest,
- rather than just overlaps it.
- */
- if (start < closure->start_min)
- return 0;
- /* Make sure the extent is not a child of a previous visited one.
- We know already, because of extent ordering,
- that start >= prev_start, and that if
- start == prev_start, then end <= prev_end.
- */
- if (start == closure->prev_start)
- {
- if (end < closure->prev_end)
- return 0;
- }
- else /* start > prev_start */
- {
- if (start < closure->prev_end)
- return 0;
- /* corner case: prev_end can be -1 if there is no prev */
- }
- extent_obj = wrap_extent (extent);
+ if (NILP (at_flag))
+ return EXTENT_AT_AFTER;
- /* make sure this extent qualifies according to the PROPERTY
- and VALUE args */
+ CHECK_SYMBOL (at_flag);
+ if (EQ (at_flag, Qafter)) return EXTENT_AT_AFTER;
+ if (EQ (at_flag, Qbefore)) return EXTENT_AT_BEFORE;
+ if (EQ (at_flag, Qat)) return EXTENT_AT_AT;
- if (!NILP (closure->property))
- {
- Lisp_Object value = Fextent_property (extent_obj, closure->property,
- Qnil);
- if ((NILP (closure->value) && NILP (value)) ||
- (!NILP (closure->value) && !EQ (value, closure->value)))
- return 0;
- }
-
- closure->result = call2 (closure->map_routine, extent_obj,
- closure->map_arg);
-
- /* Since the callback may change the buffer, compute all stored
- buffer positions here.
- */
- closure->start_min = -1; /* no need for this any more */
- closure->prev_start = extent_endpoint_byte (extent, 0);
- closure->prev_end = extent_endpoint_byte (extent, 1);
-
- return !NILP (closure->result);
-}
-
-DEFUN ("map-extent-children", Fmap_extent_children, 1, 8, 0, /*
-Map FUNCTION over the extents in the region from FROM to TO.
-FUNCTION is called with arguments (extent, MAPARG). See `map-extents'
-for a full discussion of the arguments FROM, TO, and FLAGS.
-
-The arguments are the same as for `map-extents', but this function differs
-in that it only visits extents which start in the given region, and also
-in that, after visiting an extent E, it skips all other extents which start
-inside E but end before E's end.
-
-Thus, this function may be used to walk a tree of extents in a buffer:
- (defun walk-extents (buffer &optional ignore)
- (map-extent-children 'walk-extents buffer))
-*/
- (function, object, from, to, maparg, flags, property, value))
-{
- /* This function can GC */
- struct slow_map_extent_children_arg closure;
- unsigned int me_flags;
- Bytexpos start, end;
- struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
- EXTENT after = 0;
-
- if (EXTENTP (object))
- {
- after = decode_extent (object, DE_MUST_BE_ATTACHED);
- if (NILP (from))
- from = Fextent_start_position (object);
- if (NILP (to))
- to = Fextent_end_position (object);
- object = extent_object (after);
- }
- else
- object = decode_buffer_or_string (object);
-
- get_buffer_or_string_range_byte (object, from, to, &start, &end,
- GB_ALLOW_NIL | GB_ALLOW_PAST_ACCESSIBLE);
-
- me_flags = decode_map_extents_flags (flags);
-
- if (!NILP (property))
- {
- if (!NILP (value))
- value = canonicalize_extent_property (property, value);
- }
-
- GCPRO5 (function, maparg, object, property, value);
-
- closure.map_arg = maparg;
- closure.map_routine = function;
- closure.result = Qnil;
- closure.property = property;
- closure.value = value;
- closure.start_min = start;
- closure.prev_start = -1;
- closure.prev_end = -1;
- map_extents (start, end, slow_map_extent_children_function,
- (void *) &closure, object, after,
- /* You never know what the user might do ... */
- me_flags | ME_MIGHT_CALL_ELISP);
-
- UNGCPRO;
- return closure.result;
-}
-
-/* ------------------------------- */
-/* extent-at */
-/* ------------------------------- */
-
-/* find "smallest" matching extent containing pos -- (flag == 0) means
- all extents match, else (EXTENT_FLAGS (extent) & flag) must be true;
- for more than one matching extent with precisely the same endpoints,
- we choose the last extent in the extents_list.
- The search stops just before "before", if that is non-null.
- */
-
-struct extent_at_arg
-{
- Lisp_Object best_match; /* or list of extents */
- Memxpos best_start;
- Memxpos best_end;
- Lisp_Object prop;
- EXTENT before;
- int all_extents;
-};
-
-static enum extent_at_flag
-decode_extent_at_flag (Lisp_Object at_flag)
-{
- if (NILP (at_flag))
- return EXTENT_AT_AFTER;
-
- CHECK_SYMBOL (at_flag);
- if (EQ (at_flag, Qafter)) return EXTENT_AT_AFTER;
- if (EQ (at_flag, Qbefore)) return EXTENT_AT_BEFORE;
- if (EQ (at_flag, Qat)) return EXTENT_AT_AT;
-
invalid_constant ("Invalid AT-FLAG in `extent-at'", at_flag);
RETURN_NOT_REACHED (EXTENT_AT_AFTER);
}
@@ -4488,62 +4563,67 @@
static int
extent_at_mapper (EXTENT e, void *arg)
{
- struct extent_at_arg *closure = (struct extent_at_arg *) arg;
+ struct extent_at_arg *z = (struct extent_at_arg *) arg;
- if (e == closure->before)
+ if (e == z->before)
return 1;
- /* If closure->prop is non-nil, then the extent is only acceptable
+ /* If z->prop is non-nil, then the extent is only acceptable
if it has a non-nil value for that property. */
- if (!NILP (closure->prop))
+ if (!NILP (z->prop))
{
Lisp_Object extent = wrap_extent (e);
- if (NILP (Fextent_property (extent, closure->prop, Qnil)))
+ if (NILP (Fextent_property (extent, z->prop, Qnil)))
return 0;
}
- if (!closure->all_extents)
+ if (!z->all_extents)
{
EXTENT current;
- if (NILP (closure->best_match))
+ if (NILP (z->best_match))
goto accept;
- current = XEXTENT (closure->best_match);
+ current = XEXTENT (z->best_match);
/* redundant but quick test */
- if (extent_start (current) > extent_start (e))
+ if (extent_start_mem (current) > extent_start_mem (e))
return 0;
/* we return the "last" best fit, instead of the first --
this is because then the glyph closest to two equivalent
extents corresponds to the "extent-at" the text just past
that same glyph */
- else if (!EXTENT_LESS_VALS (e, closure->best_start,
- closure->best_end))
+ else if (!EXTENT_LESS_VALS (e, z->best_start,
+ z->best_end))
goto accept;
else
return 0;
accept:
- closure->best_match = wrap_extent (e);
- closure->best_start = extent_start (e);
- closure->best_end = extent_end (e);
+ z->best_match = wrap_extent (e);
+ z->best_start = extent_start_mem (e);
+ z->best_end = extent_end_mem (e);
}
else
{
Lisp_Object extent = wrap_extent (e);
- closure->best_match = Fcons (extent, closure->best_match);
+ z->best_match = Fcons (extent, z->best_match);
}
return 0;
}
+/* Find "smallest" matching extent (last in the display order) in OBJECT
+ containing POSITION. If PROPERTY is non-nil, the extent must have a
+ non-nil value for PROPERTY. AT_FLAG (EXTENT_AT_BEFORE, EXTENT_AT_AFTER
+ or EXTENT_AT_AT) and BEFORE are as in the Lisp function `extent-at'.
+*/
+
Lisp_Object
-extent_at (Bytexpos position, Lisp_Object object,
- Lisp_Object property, EXTENT before,
- enum extent_at_flag at_flag, int all_extents)
+extent_at (Bytexpos position, Lisp_Object object, Lisp_Object property,
+ EXTENT before, enum extent_at_flag at_flag, int all_extents)
{
- struct extent_at_arg closure;
+ struct extent_at_arg z;
struct gcpro gcpro1;
/* it might be argued that invalid positions should cause
@@ -4551,9 +4631,7 @@
nil should be returned (extent-at is often used in
response to a mouse event, and in many cases previous events
have changed the buffer contents).
-
- Also, the openness stuff in the text-property code currently
- does not check its limits and might go off the end. */
+ */
if ((at_flag == EXTENT_AT_BEFORE
? position <= buffer_or_string_absolute_begin_byte (object)
: position < buffer_or_string_absolute_begin_byte (object))
@@ -4562,39 +4640,47 @@
: position > buffer_or_string_absolute_end_byte (object)))
return Qnil;
- closure.best_match = Qnil;
- closure.prop = property;
- closure.before = before;
- closure.all_extents = all_extents;
+ /* NOTE: I considered putting in a special case here for num
+ non-text-prop extents == 0, but I don't think it's necessary.
+ map_extents() already has a special case for it, and so will find the
+ correct extent right away and only loop once before exiting. If the
+ (rather small) extra overhead of map_extents() becomes an issue, we
+ can go ahead and write the special case, but I doubt this will be the
+ case. */
+
+ z.best_match = Qnil;
+ z.prop = property;
+ z.before = before;
+ z.all_extents = all_extents;
- GCPRO1 (closure.best_match);
+ GCPRO1 (z.best_match);
map_extents (at_flag == EXTENT_AT_BEFORE ? prev_bytexpos (object, position) :
position,
at_flag == EXTENT_AT_AFTER ? next_bytexpos (object, position) :
position,
- extent_at_mapper, (void *) &closure, object, 0,
+ extent_at_mapper, (void *) &z, object, 0,
ME_START_OPEN | ME_ALL_EXTENTS_CLOSED);
if (all_extents)
- closure.best_match = Fnreverse (closure.best_match);
+ z.best_match = Fnreverse (z.best_match);
UNGCPRO;
- return closure.best_match;
+ return z.best_match;
}
DEFUN ("extent-at", Fextent_at, 1, 5, 0, /*
-Find "smallest" extent at POS in OBJECT having PROPERTY set.
+Find "smallest" extent at POS in OBJECT having a non-nil value for PROPERTY.
Normally, an extent is "at" POS if it overlaps the region (POS, POS+1);
i.e. if it covers the character after POS. (However, see the definition
of AT-FLAG.) "Smallest" means the extent that comes last in the display
order; this normally means the extent whose start position is closest to
POS. See `next-extent' for more information.
OBJECT specifies a buffer or string and defaults to the current buffer.
-PROPERTY defaults to nil, meaning that any extent will do.
-Properties are attached to extents with `set-extent-property', which see.
+If PROPERTY is nil (the default), no checking is done for any properties on
+ the extent.
Returns nil if POS is invalid or there is no matching extent at POS.
If the fourth argument BEFORE is not nil, it must be an extent; any returned
extent will precede that extent. This feature allows `extent-at' to be
- used by a loop over extents.
+ used in a loop over extents.
AT-FLAG controls how end cases are handled, and should be one of:
nil or `after' An extent is at POS if it covers the character
@@ -4698,13 +4784,13 @@
static int
verify_extent_mapper (EXTENT extent, void *arg)
{
- struct verify_extents_arg *closure = (struct verify_extents_arg *) arg;
+ struct verify_extents_arg *z = (struct verify_extents_arg *) arg;
Lisp_Object prop = extent_read_only (extent);
if (NILP (prop))
return 0;
- if (CONSP (closure->iro) && !NILP (Fmemq (prop, closure->iro)))
+ if (CONSP (z->iro) && !NILP (Fmemq (prop, z->iro)))
return 0;
#if 0 /* Nobody seems to care for this any more -sb */
@@ -4715,14 +4801,14 @@
Ignore open/closed distinctions at this point.
-- Rose
*/
- if (closure->start != closure->end &&
- extent_start (extent) >= closure->start &&
- extent_end (extent) <= closure->end)
+ if (z->start != z->end &&
+ extent_start_mem (extent) >= z->start &&
+ extent_end_mem (extent) <= z->end)
return 0;
#endif
while (1)
- Fsignal (Qbuffer_read_only, (list1 (closure->object)));
+ Fsignal (Qbuffer_read_only, (list1 (z->object)));
RETURN_NOT_REACHED(0);
}
@@ -4735,7 +4821,7 @@
Lisp_Object inhibit_read_only_value)
{
int closed;
- struct verify_extents_arg closure;
+ struct verify_extents_arg z;
/* If insertion, visit closed-endpoint extents touching the insertion
point because the text would go inside those extents. If deletion,
@@ -4745,12 +4831,12 @@
fails if a change (i.e. non-insertion, non-deletion) is happening.
As far as I know, this doesn't currently occur in XEmacs. --ben */
closed = (from==to);
- closure.object = object;
- closure.start = buffer_or_string_bytexpos_to_memxpos (object, from);
- closure.end = buffer_or_string_bytexpos_to_memxpos (object, to);
- closure.iro = inhibit_read_only_value;
+ z.object = object;
+ z.start = buffer_or_string_bytexpos_to_memxpos (object, from);
+ z.end = buffer_or_string_bytexpos_to_memxpos (object, to);
+ z.iro = inhibit_read_only_value;
- map_extents (from, to, verify_extent_mapper, (void *) &closure,
+ map_extents (from, to, verify_extent_mapper, (void *) &z,
object, 0, closed ? ME_END_CLOSED : ME_START_OPEN);
}
@@ -4773,21 +4859,21 @@
static int
process_extents_for_insertion_mapper (EXTENT extent, void *arg)
{
- struct process_extents_for_insertion_arg *closure =
+ struct process_extents_for_insertion_arg *z =
(struct process_extents_for_insertion_arg *) arg;
- Memxpos indice = buffer_or_string_bytexpos_to_memxpos (closure->object,
- closure->opoint);
+ Memxpos indice = buffer_or_string_bytexpos_to_memxpos (z->object,
+ z->opoint);
/* When this function is called, one end of the newly-inserted text should
be adjacent to some endpoint of the extent, or disjoint from it. If
the insertion overlaps any existing extent, something is wrong.
*/
#ifdef ERROR_CHECK_EXTENTS
- if (extent_start (extent) > indice &&
- extent_start (extent) < indice + closure->length)
+ if (extent_start_mem (extent) > indice &&
+ extent_start_mem (extent) < indice + z->length)
ABORT ();
- if (extent_end (extent) > indice &&
- extent_end (extent) < indice + closure->length)
+ if (extent_end_mem (extent) > indice &&
+ extent_end_mem (extent) < indice + z->length)
ABORT ();
#endif
@@ -4811,18 +4897,18 @@
it. */
{
- Memxpos new_start = extent_start (extent);
- Memxpos new_end = extent_end (extent);
+ Memxpos new_start = extent_start_mem (extent);
+ Memxpos new_end = extent_end_mem (extent);
- if (indice == extent_start (extent) && extent_start_open_p (extent)
+ if (indice == extent_start_mem (extent) && extent_start_open_p (extent)
/* zero-length () extents are exempt; see comment above. */
&& !(new_start == new_end && extent_end_open_p (extent))
)
- new_start += closure->length;
- if (indice == extent_end (extent) && !extent_end_open_p (extent))
- new_end += closure->length;
+ new_start += z->length;
+ if (indice == extent_end_mem (extent) && !extent_end_open_p (extent))
+ new_end += z->length;
- set_extent_endpoints_1 (extent, new_start, new_end);
+ set_extent_endpoints_mem (extent, new_start, new_end);
}
return 0;
@@ -4832,15 +4918,15 @@
process_extents_for_insertion (Lisp_Object object, Bytexpos opoint,
Bytecount length)
{
- struct process_extents_for_insertion_arg closure;
+ struct process_extents_for_insertion_arg z;
- closure.opoint = opoint;
- closure.length = length;
- closure.object = object;
+ z.opoint = opoint;
+ z.length = length;
+ z.object = object;
map_extents (opoint, opoint + length,
process_extents_for_insertion_mapper,
- (void *) &closure, object, 0,
+ (void *) &z, object, 0,
ME_END_CLOSED | ME_MIGHT_MODIFY_EXTENTS |
ME_INCLUDE_INTERNAL);
}
@@ -4862,19 +4948,19 @@
static int
process_extents_for_deletion_mapper (EXTENT extent, void *arg)
{
- struct process_extents_for_deletion_arg *closure =
+ struct process_extents_for_deletion_arg *z =
(struct process_extents_for_deletion_arg *) arg;
/* If the extent lies completely within the range that
is being deleted, then nuke the extent if it's detachable
(otherwise, it will become a zero-length extent). */
- if (closure->start <= extent_start (extent) &&
- extent_end (extent) <= closure->end)
+ if (z->start <= extent_start_mem (extent) &&
+ extent_end_mem (extent) <= z->end)
{
if (extent_detachable_p (extent))
{
- if (closure->destroy_included_extents)
+ if (z->destroy_included_extents)
destroy_extent (extent);
else
extent_detach (extent);
@@ -4892,14 +4978,14 @@
process_extents_for_deletion (Lisp_Object object, Bytexpos from,
Bytexpos to, int destroy_them)
{
- struct process_extents_for_deletion_arg closure;
+ struct process_extents_for_deletion_arg z;
- closure.start = buffer_or_string_bytexpos_to_memxpos (object, from);
- closure.end = buffer_or_string_bytexpos_to_memxpos (object, to);
- closure.destroy_included_extents = destroy_them;
+ z.start = buffer_or_string_bytexpos_to_memxpos (object, from);
+ z.end = buffer_or_string_bytexpos_to_memxpos (object, to);
+ z.destroy_included_extents = destroy_them;
map_extents (from, to, process_extents_for_deletion_mapper,
- (void *) &closure, object, 0,
+ (void *) &z, object, 0,
ME_END_CLOSED | ME_MIGHT_MODIFY_EXTENTS);
}
@@ -4907,7 +4993,7 @@
/* report_extent_modification() */
/* ------------------------------- */
-struct report_extent_modification_closure
+struct report_extent_modification_arg
{
Lisp_Object buffer;
Charxpos start, end;
@@ -4926,18 +5012,18 @@
static int
report_extent_modification_mapper (EXTENT extent, void *arg)
{
- struct report_extent_modification_closure *closure =
- (struct report_extent_modification_closure *)arg;
+ struct report_extent_modification_arg *z =
+ (struct report_extent_modification_arg *) arg;
Lisp_Object exobj, startobj, endobj;
- Lisp_Object hook = (closure->afterp
+ Lisp_Object hook = (z->afterp
? extent_after_change_functions (extent)
: extent_before_change_functions (extent));
if (NILP (hook))
return 0;
exobj = wrap_extent (extent);
- startobj = make_int (closure->start);
- endobj = make_int (closure->end);
+ startobj = make_int (z->start);
+ endobj = make_int (z->end);
/* Now that we are sure to call elisp, set up an unwind-protect so
inside_change_hook gets restored in case we throw. Also record
@@ -4945,21 +5031,21 @@
once.
One confusing thing here is that our caller never actually calls
- unbind_to (closure.speccount). This is because
- map_extents() unbinds before, and with a smaller
- speccount. The additional unbind_to_1() in
- report_extent_modification() would cause XEmacs to abort. */
- if (closure->speccount == -1)
+ unbind_to (z.speccount). This is because map_extents() unbinds
+ before, and with a smaller speccount. The additional unbind_to_1() in
+ report_extent_modification() would cause XEmacs to ABORT (####
+ really?). */
+ if (z->speccount == -1)
{
- closure->speccount = specpdl_depth ();
+ z->speccount = specpdl_depth ();
record_unwind_protect (report_extent_modification_restore,
Fcurrent_buffer ());
}
- /* The functions will expect closure->buffer to be the current
+ /* The functions will expect z->buffer to be the current
buffer, so change it if it isn't. */
- if (current_buffer != XBUFFER (closure->buffer))
- Fset_buffer (closure->buffer);
+ if (current_buffer != XBUFFER (z->buffer))
+ Fset_buffer (z->buffer);
/* #### It's a shame that we can't use any of the existing run_hook*
functions here. This is so because all of them work with
@@ -4985,17 +5071,17 @@
report_extent_modification (Lisp_Object buffer, Charbpos start, Charbpos end,
int afterp)
{
- struct report_extent_modification_closure closure;
+ struct report_extent_modification_arg z;
- closure.buffer = buffer;
- closure.start = start;
- closure.end = end;
- closure.afterp = afterp;
- closure.speccount = -1;
+ z.buffer = buffer;
+ z.start = start;
+ z.end = end;
+ z.afterp = afterp;
+ z.speccount = -1;
map_extents (charbpos_to_bytebpos (XBUFFER (buffer), start),
charbpos_to_bytebpos (XBUFFER (buffer), end),
- report_extent_modification_mapper, (void *)&closure,
+ report_extent_modification_mapper, (void *) &z,
buffer, NULL, ME_MIGHT_CALL_ELISP);
}
@@ -5004,16 +5090,6 @@
/* extent properties */
/************************************************************************/
-static void
-set_extent_invisible (EXTENT extent, Lisp_Object value)
-{
- if (!EQ (extent_invisible (extent), value))
- {
- set_extent_invisible_1 (extent, value);
- signal_extent_property_changed (extent, Qinvisible, 1);
- }
-}
-
/* This function does "memoization" -- similar to the interning
that happens with symbols. Given a list of faces, an equivalent
list is returned such that if this function is called twice with
@@ -5104,7 +5180,7 @@
Lisp_Object symlist = Fcopy_sequence (Vextent_face_reusable_list);
Lisp_Object facelist = Fcopy_sequence (Vextent_face_reusable_list);
- LIST_LOOP (cons, facelist)
+ OLD_LIST_LOOP (cons, facelist)
{
XCAR (cons) = Fget_face (XCAR (cons));
}
@@ -5152,31 +5228,6 @@
return value;
}
-/* Do we need a lisp-level function ? */
-DEFUN ("set-extent-initial-redisplay-function",
- Fset_extent_initial_redisplay_function,
- 2,2,0, /*
-Note: This feature is experimental!
-
-Set initial-redisplay-function of EXTENT to the function
-FUNCTION.
-
-The first time the EXTENT is (re)displayed, an eval event will be
-dispatched calling FUNCTION with EXTENT as its only argument.
-*/
- (extent, function))
-{
- /* #### This is totally broken. */
- EXTENT e = decode_extent (extent, DE_MUST_BE_ATTACHED);
-
- e = extent_ancestor (e); /* Is this needed? Macro also does chasing!*/
- set_extent_initial_redisplay_function (e, function);
- extent_in_red_event_p (e) = 0; /* If the function changed we can spawn
- new events */
- signal_extent_property_changed (e, Qinitial_redisplay_function, 1);
- return function;
-}
-
DEFUN ("extent-face", Fextent_face, 1, 1, 0, /*
Return the name of the face in which EXTENT is displayed, or nil
if the extent's face is unspecified. This might also return a list
@@ -5192,29 +5243,6 @@
return external_of_internal_memoized_face (face);
}
-DEFUN ("set-extent-face", Fset_extent_face, 2, 2, 0, /*
-Make the given EXTENT have the graphic attributes specified by FACE.
-FACE can also be a list of faces, and all faces listed will apply,
-with faces earlier in the list taking priority over those later in the
-list.
-*/
- (extent, face))
-{
- EXTENT e = decode_extent(extent, 0);
- Lisp_Object orig_face = face;
-
- /* retrieve the ancestor for efficiency and proper redisplay noting. */
- e = extent_ancestor (e);
-
- face = memoize_extent_face_internal (face);
-
- extent_face (e) = face;
- signal_extent_property_changed (e, Qface, 1);
-
- return orig_face;
-}
-
-
DEFUN ("extent-mouse-face", Fextent_mouse_face, 1, 1, 0, /*
Return the face used to highlight EXTENT when the mouse passes over it.
The return value will be a face name, a list of face names, or nil
@@ -5230,52 +5258,6 @@
return external_of_internal_memoized_face (face);
}
-DEFUN ("set-extent-mouse-face", Fset_extent_mouse_face, 2, 2, 0, /*
-Set the face used to highlight EXTENT when the mouse passes over it.
-FACE can also be a list of faces, and all faces listed will apply,
-with faces earlier in the list taking priority over those later in the
-list.
-*/
- (extent, face))
-{
- EXTENT e;
- Lisp_Object orig_face = face;
-
- CHECK_EXTENT (extent);
- e = XEXTENT (extent);
- /* retrieve the ancestor for efficiency and proper redisplay noting. */
- e = extent_ancestor (e);
-
- face = memoize_extent_face_internal (face);
-
- set_extent_mouse_face (e, face);
- signal_extent_property_changed (e, Qmouse_face, 1);
-
- return orig_face;
-}
-
-void
-set_extent_glyph (EXTENT extent, Lisp_Object glyph, int endp,
- glyph_layout layout)
-{
- extent = extent_ancestor (extent);
-
- if (!endp)
- {
- set_extent_begin_glyph (extent, glyph);
- set_extent_begin_glyph_layout (extent, layout);
- signal_extent_property_changed (extent, Qbegin_glyph, 1);
- signal_extent_property_changed (extent, Qbegin_glyph_layout, 1);
- }
- else
- {
- set_extent_end_glyph (extent, glyph);
- set_extent_end_glyph_layout (extent, layout);
- signal_extent_property_changed (extent, Qend_glyph, 1);
- signal_extent_property_changed (extent, Qend_glyph_layout, 1);
- }
-}
-
static Lisp_Object
glyph_layout_to_symbol (glyph_layout layout)
{
@@ -5307,40 +5289,6 @@
RETURN_NOT_REACHED (GL_TEXT);
}
-static Lisp_Object
-set_extent_glyph_1 (Lisp_Object extent_obj, Lisp_Object glyph, int endp,
- Lisp_Object layout_obj)
-{
- EXTENT extent = decode_extent (extent_obj, 0);
- glyph_layout layout = symbol_to_glyph_layout (layout_obj);
-
- /* Make sure we've actually been given a valid glyph or it's nil
- (meaning we're deleting a glyph from an extent). */
- if (!NILP (glyph))
- CHECK_BUFFER_GLYPH (glyph);
-
- set_extent_glyph (extent, glyph, endp, layout);
- return glyph;
-}
-
-DEFUN ("set-extent-begin-glyph", Fset_extent_begin_glyph, 2, 3, 0, /*
-Display a bitmap, subwindow or string at the beginning of EXTENT.
-BEGIN-GLYPH must be a glyph object. The layout policy defaults to `text'.
-*/
- (extent, begin_glyph, layout))
-{
- return set_extent_glyph_1 (extent, begin_glyph, 0, layout);
-}
-
-DEFUN ("set-extent-end-glyph", Fset_extent_end_glyph, 2, 3, 0, /*
-Display a bitmap, subwindow or string at the end of EXTENT.
-END-GLYPH must be a glyph object. The layout policy defaults to `text'.
-*/
- (extent, end_glyph, layout))
-{
- return set_extent_glyph_1 (extent, end_glyph, 1, layout);
-}
-
DEFUN ("extent-begin-glyph", Fextent_begin_glyph, 1, 1, 0, /*
Return the glyph object displayed at the beginning of EXTENT.
If there is none, nil is returned.
@@ -5359,35 +5307,9 @@
return extent_end_glyph (decode_extent (extent, 0));
}
-DEFUN ("set-extent-begin-glyph-layout", Fset_extent_begin_glyph_layout, 2, 2,
0, /*
-Set the layout policy of EXTENT's begin glyph.
-Access this using the `extent-begin-glyph-layout' function.
-*/
- (extent, layout))
-{
- EXTENT e = decode_extent (extent, 0);
- e = extent_ancestor (e);
- set_extent_begin_glyph_layout (e, symbol_to_glyph_layout (layout));
- signal_extent_property_changed (e, Qbegin_glyph_layout, 1);
- return layout;
-}
-
-DEFUN ("set-extent-end-glyph-layout", Fset_extent_end_glyph_layout, 2, 2, 0,
/*
-Set the layout policy of EXTENT's end glyph.
-Access this using the `extent-end-glyph-layout' function.
-*/
- (extent, layout))
-{
- EXTENT e = decode_extent (extent, 0);
- e = extent_ancestor (e);
- set_extent_end_glyph_layout (e, symbol_to_glyph_layout (layout));
- signal_extent_property_changed (e, Qend_glyph_layout, 1);
- return layout;
-}
-
DEFUN ("extent-begin-glyph-layout", Fextent_begin_glyph_layout, 1, 1, 0, /*
Return the layout policy associated with EXTENT's begin glyph.
-Set this using the `set-extent-begin-glyph-layout' function.
+Set `set-extent-property' for more information.
*/
(extent))
{
@@ -5397,7 +5319,7 @@
DEFUN ("extent-end-glyph-layout", Fextent_end_glyph_layout, 1, 1, 0, /*
Return the layout policy associated with EXTENT's end glyph.
-Set this using the `set-extent-end-glyph-layout' function.
+Set `set-extent-property' for more information.
*/
(extent))
{
@@ -5405,27 +5327,8 @@
return glyph_layout_to_symbol ((glyph_layout) extent_end_glyph_layout (e));
}
-DEFUN ("set-extent-priority", Fset_extent_priority, 2, 2, 0, /*
-Set the display priority of EXTENT to PRIORITY (an integer).
-When the extent attributes are being merged for display, the priority
-is used to determine which extent takes precedence in the event of a
-conflict (two extents whose faces both specify font, for example: the
-font of the extent with the higher priority will be used).
-Extents are created with priority 0; priorities may be negative.
-*/
- (extent, priority))
-{
- EXTENT e = decode_extent (extent, 0);
-
- CHECK_INT (priority);
- e = extent_ancestor (e);
- set_extent_priority (e, XINT (priority));
- signal_extent_property_changed (e, Qpriority, 1);
- return priority;
-}
-
DEFUN ("extent-priority", Fextent_priority, 1, 1, 0, /*
-Return the display priority of EXTENT; see `set-extent-priority'.
+Return the display priority of EXTENT; see `set-extent-property'.
*/
(extent))
{
@@ -5437,157 +5340,282 @@
Change a property of an extent.
PROPERTY may be any symbol; the value stored may be accessed with
the `extent-property' function.
-The following symbols have predefined meanings:
+The following symbols have predefined meanings (boolean properties are
+marked with a (*)):
+
+ priority
- detached Removes the extent from its buffer; setting this is
- the same as calling `detach-extent'.
+ Redisplay priority of this extent (an integer). When the extent
+ attributes are being merged for display, the priority is used to
+ determine which extent takes precedence in the event of a conflict (two
+ extents whose faces both specify font, for example: the font of the
+ extent with the higher priority will be used). Extents are created with
+ priority 0; priorities may be negative.
+
+ start-open (*)
+
+ Whether the set of characters within the extent is treated being open on
+ the left, that is, whether the start position is an exclusive, rather
+ than inclusive, boundary. If true, then characters inserted exactly at
+ the beginning of the extent will remain outside of the extent; otherwise
+ they will go into the extent, extending it.
+
+ end-open (*)
+
+ Whether the set of characters within the extent is treated being open on
+ the right, that is, whether the end position is an exclusive, rather
+ than inclusive, boundary. If true, then characters inserted exactly at
+ the end of the extent will remain outside of the extent; otherwise they
+ will go into the extent, extending it.
+
+ By default, extents have the `end-open' but not the `start-open'
+ property set.
+
+ read-only
+
+ If non-nil, text within this extent will (normally) be unmodifiable.
+ The particular value of this property is matched against the value of
+ `inhibit-read-only' (q.v.).
- destroyed Removes the extent from its buffer, and makes it
- unusable in the future; this is the same calling
- `delete-extent'.
-
- priority Change redisplay priority; same as `set-extent-priority'.
-
- start-open Whether the set of characters within the extent is
- treated being open on the left, that is, whether
- the start position is an exclusive, rather than
- inclusive, boundary. If true, then characters
- inserted exactly at the beginning of the extent
- will remain outside of the extent; otherwise they
- will go into the extent, extending it.
-
- end-open Whether the set of characters within the extent is
- treated being open on the right, that is, whether
- the end position is an exclusive, rather than
- inclusive, boundary. If true, then characters
- inserted exactly at the end of the extent will
- remain outside of the extent; otherwise they will
- go into the extent, extending it.
+ initial-redisplay-function (EXPERIMENTAL)
- By default, extents have the `end-open' but not the
- `start-open' property set.
+ Function to be called the first time (part of) the extent is
+ redisplayed. It will be called with the extent as its first argument.
+ NOTE: The function will not be called immediately during redisplay;
+ instead, an eval event will be dispatched to call the function later.
+ This is a fundamentally broken design, and for this reason this
+ interface should be considered experimental and may change or disappear
+ in the future.
+
+ detachable (*)
+
+ Whether the extent gets detached (as with `detach-extent') when all the
+ text within the extent is deleted. This is true by default. If this
+ property is not set, the extent becomes a zero-length extent when its
+ text is deleted. (In such a case, the `start-open' property is
+ automatically removed if both the `start-open' and `end-open' properties
+ are set, since zero-length extents open on both ends are not allowed.)
+
+ face
+
+ The face in which to display the text. FACE can also be a list of
+ faces, and the properties of all faces listed will apply, with faces
+ earlier in the list taking priority over those later in the list when
+ conflicting property values are specified.
+
+ mouse-face
+
+ If non-nil, the extent will be highlighted in this face when the mouse
+ moves over it. FACE can also be a list of faces, and the properties of
+ all faces listed will apply, with faces earlier in the list taking
+ priority over those later in the list when conflicting property values
+ are specified.
+
+ pointer
+
+ If non-nil, and a valid pointer glyph, this specifies the shape of the
+ mouse pointer while over the extent.
+
+ help-echo
+
+ If non-nil, string to be displayed in the echo area when the mouse
+ pointer is over the extent.
+
+ duplicable (*)
+
+ Whether this extent should be copied into strings, so that kill, yank,
+ and undo commands will restore or copy it. `duplicable' extents are
+ copied from an extent into a string when `buffer-substring' or a similar
+ function creates a string. The extents in a string are copied into
+ other strings created from the string using `concat' or `substring'.
+ When `insert' or a similar function inserts the string into a buffer,
+ the extents are copied back into the buffer.
+
+ unique (*)
+
+ Meaningful only in conjunction with `duplicable'. When this is set,
+ there may be only one instance of this extent attached at a time: if it
+ is copied to the kill ring and then yanked, the extent is not copied.
+ If, however, it is killed (removed from the buffer) and then yanked, it
+ will be re-attached at the new position.
+
+ invisible
+
+ If the value is non-nil, text under this extent may be treated as not
+ present for the purpose of redisplay, or may be displayed using an
+ ellipsis or other marker. The particular value of this property is
+ matched against `buffer-invisibility-spec' (q.v.) to determine whether
+ the text is visible, invisible or displayed with an ellipsis, and the
+ nature of the ellipsis is controlled by `invisible-text-glyph'. In all
+ cases, however, the text is still visible to functions that examine a
+ buffer's text.
+
+ keymap
+
+ This keymap is consulted for mouse clicks on this extent, or keypresses
+ made while point is within the extent.
+
+ copy-function
+
+ Function that is run when a duplicable extent is about to be copied from
+ a buffer to a string (or the kill ring). It is called with three
+ arguments, the extent, and the positions within it which are being
+ copied. If this function returns nil, then the extent will not be
+ copied; otherwise it will.
+
+ paste-function
+
+ Function that is run when a duplicable extent is about to be copied from
+ a string (or the kill ring) into a buffer. It is called with three
+ arguments, the original extent, and the positions which the copied
+ extent will occupy. (This hook is run after the corresponding text has
+ already been inserted into the buffer.) Note that the extent argument
+ may be detached when this function is run. If this function returns
+ nil, no extent will be inserted. Otherwise, there will be an extent
+ covering the range in question.
+
+ If the original extent is not attached to a buffer, then it will be
+ re-attached at this range. Otherwise, a copy will be made, and that
+ copy attached here.
+
+ The copy-function and paste-function are meaningful only for extents
+ with the `duplicable' flag set, and if they are not specified, behave as
+ if `t' was the returned value. When these hooks are invoked, the
+ current buffer is the buffer which the extent is being copied from/to,
+ respectively.
+
+ begin-glyph
+
+ A glyph to be displayed at the beginning of the extent, or nil.
+
+ end-glyph
+
+ A glyph to be displayed at the end of the extent, or nil.
+
+ begin-glyph-layout
+
+ The layout policy (one of `text', `whitespace', `inside-margin', or
+ `outside-margin') of the extent's begin glyph. `text' means that the
+ glyph is displayed directly before or after the text of the extent,
+ intermixed with the buffer's text. `outside-margin' means that the glyph
+ is displayed in the outside margin (space on the left or right side of
+ the frame which normal text cannot be displayed in -- created by setting
+ a non-zero value for the specifiers `left-margin-width' and
+ `right-margin-width'). For the remaining two policies, the glyph is
+ displayed in the inside margin (the space between the leftmost or
+ rightmost point at which text can be displayed and where the first or
+ last character actually is). Policy `inside-margin' means display the
+ glyph at the outer edge of the inside margin, and policy `whitespace'
+ means display at the inner edge. If the outside margin is not wide
+ enough for a glyph to fit, it is not displayed. If the inside margin is
+ not wide enough for the glyph to fit, it will be displayed using any
+ available outside margin space if and only if the specifier
+ `use-left-overflow' or `use-right-overflow' (depending on which side the
+ glyph appears in) is non-nil.
+
+ end-glyph-layout
+
+ The layout policy of the extent's end glyph, just like for begin glyphs.
+
+ syntax-table
+
+ A cons or a syntax table object. If a cons, the car must be an integer
+ (interpreted as a syntax code, applicable to all characters in the
+ extent) and the cdr is a matching character. If nil, syntax of
+ characters in the extent is looked up in the syntax table. You should
+ use the text property API to manipulate this property. (This may be
+ required in the future.)
+
+ before-change-functions
+
+ List of functions called when text that overlaps this extent is about to
+ be changed. Called with three arguments, the extent and the positions
+ of the text being changed, as in the variable `before-change-functions'.
+ The buffer containing the text is current when the functions are called.
+
+ after-change-functions
+
+ List of functions called when text that overlaps this extent has just
+ been changed. Called with three arguments, the extent and the positions
+ of the text that was changed, as in the variable
+ `after-change-functions'. The buffer containing the text is current
+ when the functions are called.
+
+ front-sticky, rear-nonsticky
+
+ These apply to text properties set using `put-text-property' or similar
+ functions. When text is inserted using `insert', it does not inherit
+ any text properties. Normally, when text is inserted using
+ `insert-and-inherit' (or `self-insert-command', which calls this), text
+ properties are inherited from the preceding character but not the
+ following character; in FSF terminology, the properties are
+ "rear-sticky" but not "front-sticky". You can change the
stickiness,
+ however, using the properties `front-sticky' and `rear-nonsticky'. Text
+ properties are inherited from the following character if the value of
+ the `front-sticky' property on the character is `t' or is a list
+ containing the property in question (or if the property is listed in the
+ variable `text-property-default-nonsticky' with a value of nil).
+ Similarly, text properties will be inherited from the previous character
+ *UNLESS* the value of the `rear-nonsticky' property on the character is
+ `t' or is a list containing the property in question (or if the property
+ is listed in the variable `text-property-default-nonsticky' with a
+ non-nil value). If a text property is to be inherited from both front
+ and rear, and both characters have a non-nil value for the property, the
+ rear value takes precedence. (Remember that a text property with a nil
+ value is equivalent to no text property at all.)
+
+ NOTE: This entire discussion applies only to properties set using the
+ text property interface. For extents created using `make-extent', text
+ inserted in the middle of such an extent will of course take on the
+ properties of the extent, and text inserted at the edge of an extent
+ will be included in the extent (and hence take its properties) depending
+ on the values of the `start-open' or `end-open' properties of the
+ extent. The use of `insert' vs. `insert-and-inherit', and the presence
+ or absence of the `front-sticky' and `rear-nonsticky' properties, makes
+ no difference here.
+
+ Behavior is undefined if the two interfaces are mixed -- i.e. if the
+ `start-open' or `end-open' properties are set using the text property
+ interface, if the `front-sticky' or `rear-nonsticky' properties are set
+ using the extent interface, or if properties on text-property extents
+ (these are marked by the presence of the `text-prop' property) are set
+ using `set-extent-property'.
+
+ text-prop
+
+ Used internally to implement text properties. You may not modify this.
+
+
+Obsolete properties:
+--------------------
+
+ highlight (*)
+
+ Setting this property is equivalent to setting a `mouse-face' property
+ of `highlight'. Reading this property returns non-nil if the extent has
+ a non-nil `mouse-face' property.
+
+ detached (*)
- read-only Text within this extent will be unmodifiable.
+ Removes the extent from its buffer; setting this is the same as calling
+ `detach-extent'.
- initial-redisplay-function (EXPERIMENTAL)
- function to be called the first time (part of) the extent
- is redisplayed. It will be called with the extent as its
- first argument.
- Note: The function will not be called immediately
- during redisplay, an eval event will be dispatched.
-
- detachable Whether the extent gets detached (as with
- `detach-extent') when all the text within the
- extent is deleted. This is true by default. If
- this property is not set, the extent becomes a
- zero-length extent when its text is deleted. (In
- such a case, the `start-open' property is
- automatically removed if both the `start-open' and
- `end-open' properties are set, since zero-length
- extents open on both ends are not allowed.)
-
- face The face in which to display the text. Setting
- this is the same as calling `set-extent-face'.
-
- mouse-face If non-nil, the extent will be highlighted in this
- face when the mouse moves over it.
-
- pointer If non-nil, and a valid pointer glyph, this specifies
- the shape of the mouse pointer while over the extent.
-
- highlight Obsolete: Setting this property is equivalent to
- setting a `mouse-face' property of `highlight'.
- Reading this property returns non-nil if
- the extent has a non-nil `mouse-face' property.
-
- duplicable Whether this extent should be copied into strings,
- so that kill, yank, and undo commands will restore
- or copy it. `duplicable' extents are copied from
- an extent into a string when `buffer-substring' or
- a similar function creates a string. The extents
- in a string are copied into other strings created
- from the string using `concat' or `substring'.
- When `insert' or a similar function inserts the
- string into a buffer, the extents are copied back
- into the buffer.
-
- unique Meaningful only in conjunction with `duplicable'.
- When this is set, there may be only one instance
- of this extent attached at a time: if it is copied
- to the kill ring and then yanked, the extent is
- not copied. If, however, it is killed (removed
- from the buffer) and then yanked, it will be
- re-attached at the new position.
-
- invisible If the value is non-nil, text under this extent
- may be treated as not present for the purpose of
- redisplay, or may be displayed using an ellipsis
- or other marker; see `buffer-invisibility-spec'
- and `invisible-text-glyph'. In all cases,
- however, the text is still visible to other
- functions that examine a buffer's text.
-
- keymap This keymap is consulted for mouse clicks on this
- extent, or keypresses made while point is within the
- extent.
-
- copy-function This is a hook that is run when a duplicable extent
- is about to be copied from a buffer to a string (or
- the kill ring). It is called with three arguments,
- the extent, and the buffer-positions within it
- which are being copied. If this function returns
- nil, then the extent will not be copied; otherwise
- it will.
-
- paste-function This is a hook that is run when a duplicable extent is
- about to be copied from a string (or the kill ring)
- into a buffer. It is called with three arguments,
- the original extent, and the buffer positions which
- the copied extent will occupy. (This hook is run
- after the corresponding text has already been
- inserted into the buffer.) Note that the extent
- argument may be detached when this function is run.
- If this function returns nil, no extent will be
- inserted. Otherwise, there will be an extent
- covering the range in question.
-
- If the original extent is not attached to a buffer,
- then it will be re-attached at this range.
- Otherwise, a copy will be made, and that copy
- attached here.
-
- The copy-function and paste-function are meaningful
- only for extents with the `duplicable' flag set,
- and if they are not specified, behave as if `t' was
- the returned value. When these hooks are invoked,
- the current buffer is the buffer which the extent
- is being copied from/to, respectively.
-
- begin-glyph A glyph to be displayed at the beginning of the extent,
- or nil.
-
- end-glyph A glyph to be displayed at the end of the extent,
- or nil.
-
- begin-glyph-layout The layout policy (one of `text', `whitespace',
- `inside-margin', or `outside-margin') of the extent's
- begin glyph.
-
- end-glyph-layout The layout policy of the extent's end glyph.
-
- syntax-table A cons or a syntax table object. If a cons, the car must
- be an integer (interpreted as a syntax code, applicable to
- all characters in the extent). Otherwise, syntax of
- characters in the extent is looked up in the syntax table.
- You should use the text property API to manipulate this
- property. (This may be required in the future.)
+ destroyed (*)
+
+ Removes the extent from its buffer, and makes it unusable in the future;
+ this is the same calling `delete-extent'.
*/
(extent, property, value))
{
- /* This function can GC if property is `keymap' */
EXTENT e = decode_extent (extent, 0);
- int signal_change = 0;
+ int signal_change = 1;
+
+ if (!NILP (extent_parent (e)))
+ invalid_change ("Can't modify properties of an extent with a
parent",
+ wrap_extent (e));
+ check_modifiable_extent (e);
+
/* If VALUE is unbound, the property is being removed through `remprop'.
Return Qunbound if removal disallowed, Qt if anything removed,
Qnil otherwise. */
@@ -5606,6 +5634,7 @@
|| EQ (property, Qdestroyed)
|| EQ (property, Qpriority)
|| EQ (property, Qface)
+ || EQ (property, Qtext_prop)
|| EQ (property, Qinitial_redisplay_function)
|| EQ (property, Qafter_change_functions)
|| EQ (property, Qbefore_change_functions)
@@ -5631,87 +5660,100 @@
}
if (EQ (property, Qread_only))
- {
- set_extent_read_only (e, value);
- signal_change = 1;
- }
+ set_extent_read_only_0 (e, value);
else if (EQ (property, Qunique))
- {
- extent_unique_p (e) = !NILP (value);
- signal_change = 1;
- }
+ extent_unique_p (e) = !NILP (value);
else if (EQ (property, Qduplicable))
- {
- extent_duplicable_p (e) = !NILP (value);
- signal_change = 1;
- }
+ set_extent_duplicable_0 (e, value);
else if (EQ (property, Qinvisible))
- set_extent_invisible (e, value);
+ set_extent_invisible_0 (e, value);
else if (EQ (property, Qdetachable))
- {
- extent_detachable_p (e) = !NILP (value);
- signal_change = 1;
- }
- else if (EQ (property, Qdetached))
- {
- if (NILP (value))
- invalid_operation ("can only set `detached' to t", Qunbound);
- Fdetach_extent (extent);
- }
- else if (EQ (property, Qdestroyed))
+ extent_detachable_p (e) = !NILP (value);
+ else if (EQ (property, Qpriority))
{
- if (NILP (value))
- invalid_operation ("can only set `destroyed' to t", Qunbound);
- Fdelete_extent (extent);
+ CHECK_INT (value);
+ set_extent_priority_0 (e, XINT (value));
}
- else if (EQ (property, Qpriority))
- Fset_extent_priority (extent, value);
else if (EQ (property, Qface))
- Fset_extent_face (extent, value);
+ extent_face (e) = memoize_extent_face_internal (value);
+ else if (EQ (property, Qmouse_face))
+ set_extent_mouse_face_0 (e, memoize_extent_face_internal (value));
else if (EQ (property, Qinitial_redisplay_function))
- Fset_extent_initial_redisplay_function (extent, value);
- else if (EQ (property, Qbefore_change_functions))
{
- set_extent_before_change_functions (e, value);
- signal_change = 1;
+ set_extent_initial_redisplay_function_0 (e, value);
+ extent_in_red_event_p (e) = 0; /* If the function changed we can spawn
+ new events */
}
+ else if (EQ (property, Qbefore_change_functions))
+ set_extent_before_change_functions_0 (e, value);
else if (EQ (property, Qafter_change_functions))
- {
- set_extent_after_change_functions (e, value);
- signal_change = 1;
- }
- else if (EQ (property, Qmouse_face))
- Fset_extent_mouse_face (extent, value);
- /* Obsolete: */
- else if (EQ (property, Qhighlight))
- Fset_extent_mouse_face (extent, Qhighlight);
- else if (EQ (property, Qbegin_glyph_layout))
- Fset_extent_begin_glyph_layout (extent, value);
+ set_extent_after_change_functions_0 (e, value);
+ else if (EQ (property, Qbegin_glyph_layout)
+ /* For backwards compatibility. We use begin glyph because it
+ is by far the more used of the two. */
+ || EQ (property, Qglyph_layout))
+ set_extent_begin_glyph_layout_0 (e, symbol_to_glyph_layout (value));
else if (EQ (property, Qend_glyph_layout))
- Fset_extent_end_glyph_layout (extent, value);
- /* For backwards compatibility. We use begin glyph because it is by
- far the more used of the two. */
- else if (EQ (property, Qglyph_layout))
- Fset_extent_begin_glyph_layout (extent, value);
+ set_extent_end_glyph_layout_0 (e, symbol_to_glyph_layout (value));
else if (EQ (property, Qbegin_glyph))
- Fset_extent_begin_glyph (extent, value, Qnil);
+ {
+ /* Make sure we've actually been given a valid glyph or it's nil
+ (meaning we're deleting a glyph from an extent). */
+ if (!NILP (value))
+ CHECK_BUFFER_GLYPH (value);
+ set_extent_begin_glyph_0 (e, value);
+ }
else if (EQ (property, Qend_glyph))
- Fset_extent_end_glyph (extent, value, Qnil);
+ {
+ /* Make sure we've actually been given a valid glyph or it's nil
+ (meaning we're deleting a glyph from an extent). */
+ if (!NILP (value))
+ CHECK_BUFFER_GLYPH (value);
+ set_extent_end_glyph_0 (e, value);
+ }
else if (EQ (property, Qstart_open))
- set_extent_openness (e, !NILP (value), -1);
+ {
+ set_extent_openness (e, !NILP (value), -1);
+ signal_change = 0;
+ }
else if (EQ (property, Qend_open))
- set_extent_openness (e, -1, !NILP (value));
+ {
+ set_extent_openness (e, -1, !NILP (value));
+ signal_change = 0;
+ }
/* Support (but don't document...) the obvious *_closed antonyms. */
else if (EQ (property, Qstart_closed))
- set_extent_openness (e, NILP (value), -1);
+ {
+ set_extent_openness (e, NILP (value), -1);
+ signal_change = 0;
+ }
else if (EQ (property, Qend_closed))
- set_extent_openness (e, -1, NILP (value));
+ {
+ set_extent_openness (e, -1, NILP (value));
+ signal_change = 0;
+ }
+ /*********** Obsolete properties ***********/
+ else if (EQ (property, Qhighlight))
+ set_extent_mouse_face_0 (e, memoize_extent_face_internal
+ (!NILP (value) ? Qhighlight : Qnil));
+ else if (EQ (property, Qdetached))
+ {
+ if (NILP (value))
+ invalid_operation ("Can only set `detached' to t", Qunbound);
+ Fdetach_extent (extent);
+ signal_change = 0;
+ }
+ else if (EQ (property, Qdestroyed))
+ {
+ if (NILP (value))
+ invalid_operation ("Can only set `destroyed' to t", Qunbound);
+ Fdelete_extent (extent);
+ signal_change = 0;
+ }
+ else if (EQ (property, Qtext_prop))
+ invalid_operation ("Can't modify the `text-prop' property",
Qunbound);
else
{
- if (EQ (property, Qkeymap))
- while (!NILP (value) && NILP (Fkeymapp (value)))
- value = wrong_type_argument (Qkeymapp, value);
-
external_plist_put (extent_plist_addr (e), property, value, 0, ERROR_ME);
signal_change = 1;
}
@@ -5728,7 +5770,6 @@
*/
(extent, plist))
{
- /* This function can GC, if one of the properties is `keymap' */
Lisp_Object property, value;
struct gcpro gcpro1;
GCPRO1 (plist);
@@ -5765,8 +5806,6 @@
return extent_normal_field (e, end_open) ? Qt : Qnil;
else if (EQ (property, Qunique))
return extent_normal_field (e, unique) ? Qt : Qnil;
- else if (EQ (property, Qduplicable))
- return extent_normal_field (e, duplicable) ? Qt : Qnil;
else if (EQ (property, Qdetachable))
return extent_normal_field (e, detachable) ? Qt : Qnil;
/* Support (but don't document...) the obvious *_closed antonyms. */
@@ -5778,10 +5817,14 @@
return make_int (extent_priority (e));
else if (EQ (property, Qread_only))
return extent_read_only (e);
+ else if (EQ (property, Qduplicable))
+ return extent_duplicable (e);
else if (EQ (property, Qinvisible))
return extent_invisible (e);
else if (EQ (property, Qface))
return Fextent_face (extent);
+ else if (EQ (property, Qtext_prop))
+ return Fcopy_tree (extent_text_prop (e), Qnil);
else if (EQ (property, Qinitial_redisplay_function))
return extent_initial_redisplay_function (e);
else if (EQ (property, Qbefore_change_functions))
@@ -5814,9 +5857,9 @@
}
static void
-extent_properties (EXTENT e, Lisp_Object_pair_dynarr *props)
+extent_properties (EXTENT e, Lisp_Object_pair_dynarr *props, int external)
{
- Lisp_Object face, anc_obj;
+ Lisp_Object value, anc_obj;
glyph_layout layout;
EXTENT anc;
@@ -5842,12 +5885,15 @@
EXTERNAL_PROPERTY_LIST_LOOP_3 (key, value, extent_plist_slot (anc))
ADD_PROP (key, value);
}
+
+ if (!NILP (value = Fextent_face (anc_obj)))
+ ADD_PROP (Qface, value);
- if (!NILP (face = Fextent_face (anc_obj)))
- ADD_PROP (Qface, face);
+ if (!NILP (value = Fextent_mouse_face (anc_obj)))
+ ADD_PROP (Qmouse_face, value);
- if (!NILP (face = Fextent_mouse_face (anc_obj)))
- ADD_PROP (Qmouse_face, face);
+ if (!NILP (value = extent_text_prop (anc)))
+ ADD_PROP (Qtext_prop, external ? Fcopy_tree (value, Qnil) : value);
if ((layout = (glyph_layout) extent_begin_glyph_layout (anc)) != GL_TEXT)
{
@@ -5878,6 +5924,9 @@
if (!NILP (extent_after_change_functions (anc)))
ADD_PROP (Qafter_change_functions, extent_after_change_functions (anc));
+ if (!NILP (value = extent_duplicable (anc)))
+ ADD_PROP (Qduplicable, external ? Fcopy_tree (value, Qnil) : value);
+
if (!NILP (extent_invisible (anc)))
ADD_PROP (Qinvisible, extent_invisible (anc));
@@ -5893,9 +5942,6 @@
if (extent_normal_field (anc, detachable))
ADD_PROP (Qdetachable, Qt);
- if (extent_normal_field (anc, duplicable))
- ADD_PROP (Qduplicable, Qt);
-
if (extent_normal_field (anc, unique))
ADD_PROP (Qunique, Qt);
@@ -5920,7 +5966,7 @@
CHECK_EXTENT (extent);
e = XEXTENT (extent);
props = Dynarr_new (Lisp_Object_pair);
- extent_properties (e, props);
+ extent_properties (e, props, 1);
for (i = 0; i < Dynarr_length (props); i++)
result = cons3 (Dynarr_at (props, i).key, Dynarr_at (props, i).value,
@@ -5999,19 +6045,59 @@
/************************************************************************/
/* strings and extents */
/************************************************************************/
+
+static void
+transfer_duplicable_text_properties (EXTENT e, Bytexpos from, Bytexpos to,
+ Lisp_Object object)
+{
+ /* Whenever a text-prop extent is pasted into a buffer (via `yank' or
+ `insert' or whatever) we attach the properties to the buffer by
+ calling `put-text-property' instead of by simply allowing the
+ extent to be copied or re-attached. Then we return nil, telling
+ the extents code not to attach it again. By handing the insertion
+ hackery in this way, we make kill/yank behave consistently with
+ put-text-property and not fragment the extents (since text-prop
+ extents must partition, not overlap).
+ */
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ Lisp_Object props = extent_duplicable (e);
+
+ if (EQ (props, Qt))
+ props = extent_text_prop (e);
+
+ {
+ LIST_LOOP_2 (prop, props)
+ {
+ put_text_prop (from, to, prop,
+ Fextent_property (wrap_extent (e), prop, Qnil),
+ object, 1);
+ }
+ }
+#else /* not NEW_TEXT_PROPERTY_MODEL */
+ Lisp_Object prop, val;
-/* copy/paste hooks */
+ prop = extent_text_prop (e);
+ val = Fextent_property (wrap_extent (e), prop, Qnil);
+#if 0
+ /* removed by bill perry, 2/9/97
+ ** This little bit of code would not allow you to have a text property
+ ** with a value of Qnil. This is bad bad bad.
+ */
+ if (NILP (val))
+ signal_error_2 (Qinternal_error, "Internal error: no text-prop",
+ wrap_extent (e), prop);
+#endif
+ put_text_prop (from, to, prop, val, object, 1);
+#endif /* NEW_TEXT_PROPERTY_MODEL */
+}
static int
run_extent_copy_paste_internal (EXTENT e, Charxpos from, Charxpos to,
- Lisp_Object object,
- Lisp_Object prop)
+ Lisp_Object object, Lisp_Object prop)
{
/* This function can GC */
- Lisp_Object extent;
- Lisp_Object copy_fn;
- extent = wrap_extent (e);
- copy_fn = Fextent_property (extent, prop, Qnil);
+ Lisp_Object extent = wrap_extent (e);
+ Lisp_Object copy_fn = Fextent_property (extent, prop, Qnil);
if (!NILP (copy_fn))
{
Lisp_Object flag;
@@ -6032,8 +6118,8 @@
static int
run_extent_copy_function (EXTENT e, Bytexpos from, Bytexpos to)
{
- Lisp_Object object = extent_object (e);
/* This function can GC */
+ Lisp_Object object = extent_object (e);
return run_extent_copy_paste_internal
(e, buffer_or_string_bytexpos_to_charxpos (object, from),
buffer_or_string_bytexpos_to_charxpos (object, to), object,
@@ -6041,6 +6127,14 @@
}
static int
+run_extent_copy_function_char (EXTENT e, Charxpos from, Charxpos to)
+{
+ /* This function can GC */
+ Lisp_Object object = extent_object (e);
+ return run_extent_copy_paste_internal (e, from, to, object, Qcopy_function);
+}
+
+static int
run_extent_paste_function (EXTENT e, Bytexpos from, Bytexpos to,
Lisp_Object object)
{
@@ -6074,12 +6168,12 @@
/* The paste-function said don't re-attach this extent here. */
return Qnil;
else
- set_extent_endpoints (extent, new_start, new_end, Qnil);
+ set_extent_endpoints_byte (extent, new_start, new_end, Qnil);
}
else
{
- Bytexpos exstart = extent_endpoint_byte (extent, 0);
- Bytexpos exend = extent_endpoint_byte (extent, 1);
+ Bytexpos exstart = extent_start_byte (extent);
+ Bytexpos exend = extent_end_byte (extent);
if (exend < new_start || exstart > new_end)
goto copy_it;
@@ -6088,7 +6182,7 @@
new_start = min (exstart, new_start);
new_end = max (exend, new_end);
if (exstart != new_start || exend != new_end)
- set_extent_endpoints (extent, new_start, new_end, Qnil);
+ set_extent_endpoints_byte (extent, new_start, new_end, Qnil);
}
}
@@ -6127,6 +6221,9 @@
Lisp_Object copy;
Bytexpos s, e;
+ if (!NILP (extent_text_prop (ext)))
+ invalid_change ("Can't insert text-property extents", wrap_extent
(ext));
+
buffer_or_string = decode_buffer_or_string (buffer_or_string);
get_buffer_or_string_range_byte (buffer_or_string, start, end, &s, &e,
GB_ALLOW_PAST_ACCESSIBLE);
@@ -6134,352 +6231,158 @@
copy = insert_extent (ext, s, e, buffer_or_string, NILP (no_hooks));
if (EXTENTP (copy))
{
- if (extent_duplicable_p (XEXTENT (copy)))
+ if (!NILP (extent_duplicable (XEXTENT (copy))))
record_extent (copy, 1);
}
return copy;
}
-/* adding buffer extents to a string */
-
-struct add_string_extents_arg
-{
- Bytexpos from;
- Bytecount length;
- Lisp_Object string;
-};
-
-static int
-add_string_extents_mapper (EXTENT extent, void *arg)
-{
- /* This function can GC */
- struct add_string_extents_arg *closure =
- (struct add_string_extents_arg *) arg;
- Bytecount start = extent_endpoint_byte (extent, 0) - closure->from;
- Bytecount end = extent_endpoint_byte (extent, 1) - closure->from;
-
- if (extent_duplicable_p (extent))
- {
- start = max (start, 0);
- end = min (end, closure->length);
-
- /* Run the copy-function to give an extent the option of
- not being copied into the string (or kill ring).
- */
- if (extent_duplicable_p (extent) &&
- !run_extent_copy_function (extent, start + closure->from,
- end + closure->from))
- return 0;
- copy_extent (extent, start, end, closure->string);
- }
- return 0;
-}
-
-struct add_string_extents_the_hard_way_arg
+struct copy_extents_between_objects_arg
{
- Charxpos from;
- Charcount length;
- Lisp_Object string;
+ /* Values may be in byte or char format */
+ EMACS_INT new_pos;
+ EMACS_INT old_pos;
+ EMACS_INT length;
+ Lisp_Object new_object;
+ int run_function;
+ /* If non-zero, values are in char format */
+ int char_values_p;
};
static int
-add_string_extents_the_hard_way_mapper (EXTENT extent, void *arg)
-{
- /* This function can GC */
- struct add_string_extents_arg *closure =
- (struct add_string_extents_arg *) arg;
- Charcount start = extent_endpoint_char (extent, 0) - closure->from;
- Charcount end = extent_endpoint_char (extent, 1) - closure->from;
-
- if (extent_duplicable_p (extent))
- {
- start = max (start, 0);
- end = min (end, closure->length);
-
- /* Run the copy-function to give an extent the option of
- not being copied into the string (or kill ring).
- */
- if (extent_duplicable_p (extent) &&
- !run_extent_copy_function (extent, start + closure->from,
- end + closure->from))
- return 0;
- copy_extent (extent,
- string_index_char_to_byte (closure->string, start),
- string_index_char_to_byte (closure->string, end),
- closure->string);
- }
-
- return 0;
-}
-
-/* Add the extents in buffer BUF from OPOINT to OPOINT+LENGTH to
- the string STRING. */
-void
-add_string_extents (Lisp_Object string, struct buffer *buf, Bytexpos opoint,
- Bytecount length)
+copy_extents_between_objects_mapper (EXTENT extent, void *arg)
{
- /* This function can GC */
- struct gcpro gcpro1, gcpro2;
- Lisp_Object buffer;
-
- buffer = wrap_buffer (buf);
- GCPRO2 (buffer, string);
+ /* This function can GC if z->run_function is not RUN_NO_FUNCTION */
+ struct copy_extents_between_objects_arg *z =
+ (struct copy_extents_between_objects_arg *) arg;
+ EMACS_INT old_start, old_end, new_start, new_end;
+ Bytecount new_start_byte, new_end_byte;
- if (XSTRING_FORMAT (string) == BUF_FORMAT (buf))
+ if (z->char_values_p)
{
- struct add_string_extents_arg closure;
- closure.from = opoint;
- closure.length = length;
- closure.string = string;
- map_extents (opoint, opoint + length, add_string_extents_mapper,
- (void *) &closure, buffer, 0,
- /* ignore extents that just abut the region */
- ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
- /* we are calling E-Lisp (the extent's copy function)
- so anything might happen */
- ME_MIGHT_CALL_ELISP);
+ old_start = extent_start_char (extent);
+ old_end = extent_end_char (extent);
}
else
{
- struct add_string_extents_the_hard_way_arg closure;
- closure.from = bytebpos_to_charbpos (buf, opoint);
- closure.length = (bytebpos_to_charbpos (buf, opoint + length) -
- closure.from);
- closure.string = string;
-
- /* If the string and buffer are in different formats, things get
- tricky; the only reasonable way to do the operation is entirely in
- char offsets, which are invariant to format changes. In practice,
- this won't be time-consuming because the byte/char conversions are
- mostly in the buffer, which will be in a fixed-width format. */
- map_extents (opoint, opoint + length,
- add_string_extents_the_hard_way_mapper,
- (void *) &closure, buffer, 0,
- /* ignore extents that just abut the region */
- ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
- /* we are calling E-Lisp (the extent's copy function)
- so anything might happen */
- ME_MIGHT_CALL_ELISP);
-
+ old_start = extent_start_byte (extent);
+ old_end = extent_end_byte (extent);
}
-
- UNGCPRO;
-}
-
-struct splice_in_string_extents_arg
-{
- Bytecount pos;
- Bytecount length;
- Bytexpos opoint;
- Lisp_Object buffer;
-};
-
-static int
-splice_in_string_extents_mapper (EXTENT extent, void *arg)
-{
- /* This function can GC */
- struct splice_in_string_extents_arg *closure =
- (struct splice_in_string_extents_arg *) arg;
- /* BASE_START and BASE_END are the limits in the buffer of the string
- that was just inserted.
-
- NEW_START and NEW_END are the prospective buffer positions of the
- extent that is going into the buffer. */
- Bytexpos base_start = closure->opoint;
- Bytexpos base_end = base_start + closure->length;
- Bytexpos new_start = (base_start + extent_endpoint_byte (extent, 0) -
- closure->pos);
- Bytexpos new_end = (base_start + extent_endpoint_byte (extent, 1) -
- closure->pos);
-
- if (new_start < base_start)
- new_start = base_start;
- if (new_end > base_end)
- new_end = base_end;
- if (new_end <= new_start)
- return 0;
-
- if (!extent_duplicable_p (extent))
- return 0;
-
- if (!inside_undo &&
- !run_extent_paste_function (extent, new_start, new_end,
- closure->buffer))
- return 0;
- copy_extent (extent, new_start, new_end, closure->buffer);
-
- return 0;
-}
-struct splice_in_string_extents_the_hard_way_arg
-{
- Charcount pos;
- Charcount length;
- Charxpos opoint;
- Lisp_Object buffer;
-};
+ old_start = max (z->old_pos, old_start);
+ old_end = min (z->old_pos + z->length, old_end);
-static int
-splice_in_string_extents_the_hard_way_mapper (EXTENT extent, void *arg)
-{
- /* This function can GC */
- struct splice_in_string_extents_arg *closure =
- (struct splice_in_string_extents_arg *) arg;
- /* BASE_START and BASE_END are the limits in the buffer of the string
- that was just inserted.
-
- NEW_START and NEW_END are the prospective buffer positions of the
- extent that is going into the buffer. */
- Charxpos base_start = closure->opoint;
- Charxpos base_end = base_start + closure->length;
- Charxpos new_start = (base_start + extent_endpoint_char (extent, 0) -
- closure->pos);
- Charxpos new_end = (base_start + extent_endpoint_char (extent, 1) -
- closure->pos);
-
- if (new_start < base_start)
- new_start = base_start;
- if (new_end > base_end)
- new_end = base_end;
- if (new_end <= new_start)
+ if (old_start >= old_end)
return 0;
- if (!extent_duplicable_p (extent))
- return 0;
+ new_start = old_start + z->new_pos - z->old_pos;
+ new_end = old_end + z->new_pos - z->old_pos;
- if (!inside_undo &&
- !run_extent_paste_function_char (extent, new_start, new_end,
- closure->buffer))
+ if (NILP (extent_duplicable (extent)))
return 0;
- copy_extent (extent,
- charbpos_to_bytebpos (XBUFFER (closure->buffer), new_start),
- charbpos_to_bytebpos (XBUFFER (closure->buffer), new_end),
- closure->buffer);
-
- return 0;
-}
-
-/* We have just inserted a section of STRING (starting at POS, of
- length LENGTH) into buffer BUF at OPOINT. Do whatever is necessary
- to get the string's extents into the buffer. */
-
-void
-splice_in_string_extents (Lisp_Object string, struct buffer *buf,
- Bytexpos opoint, Bytecount length, Bytecount pos)
-{
- struct gcpro gcpro1, gcpro2;
- Lisp_Object buffer = wrap_buffer (buf);
- GCPRO2 (buffer, string);
- if (XSTRING_FORMAT (string) == BUF_FORMAT (buf))
+ if (z->char_values_p)
{
- struct splice_in_string_extents_arg closure;
- closure.opoint = opoint;
- closure.pos = pos;
- closure.length = length;
- closure.buffer = buffer;
- map_extents (pos, pos + length,
- splice_in_string_extents_mapper,
- (void *) &closure, string, 0,
- /* ignore extents that just abut the region */
- ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
- /* we are calling E-Lisp (the extent's copy function)
- so anything might happen */
- ME_MIGHT_CALL_ELISP);
+ new_start_byte = buffer_or_string_charxpos_to_bytexpos (z->new_object,
+ new_start);
+ new_end_byte = buffer_or_string_charxpos_to_bytexpos (z->new_object,
+ new_end);
}
else
{
- struct splice_in_string_extents_the_hard_way_arg closure;
- closure.opoint = bytebpos_to_charbpos (buf, opoint);
- closure.pos = string_index_byte_to_char (string, pos);
- closure.length = string_offset_byte_to_char_len (string, pos, length);
- closure.buffer = buffer;
-
- /* If the string and buffer are in different formats, things get
- tricky; the only reasonable way to do the operation is entirely in
- char offsets, which are invariant to format changes. In practice,
- this won't be time-consuming because the byte/char conversions are
- mostly in the buffer, which will be in a fixed-width format. */
- map_extents (pos, pos + length,
- splice_in_string_extents_the_hard_way_mapper,
- (void *) &closure, string, 0,
- /* ignore extents that just abut the region */
- ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
- /* we are calling E-Lisp (the extent's copy function)
- so anything might happen */
- ME_MIGHT_CALL_ELISP);
-
+ new_start_byte = new_start;
+ new_end_byte = new_end;
}
- UNGCPRO;
-}
-
-struct copy_string_extents_arg
-{
- Bytecount new_pos;
- Bytecount old_pos;
- Bytecount length;
- Lisp_Object new_string;
-};
-
-struct copy_string_extents_1_arg
-{
- Lisp_Object parent_in_question;
- EXTENT found_extent;
-};
-static int
-copy_string_extents_mapper (EXTENT extent, void *arg)
-{
- struct copy_string_extents_arg *closure =
- (struct copy_string_extents_arg *) arg;
- Bytecount old_start, old_end, new_start, new_end;
-
- old_start = extent_endpoint_byte (extent, 0);
- old_end = extent_endpoint_byte (extent, 1);
+ if (!NILP (extent_text_prop (extent)))
+ transfer_duplicable_text_properties (extent, new_start_byte, new_end_byte,
+ z->new_object);
+ else
+ {
+ switch (z->run_function)
+ {
+ case RUN_NO_FUNCTION:
+ break;
- old_start = max (closure->old_pos, old_start);
- old_end = min (closure->old_pos + closure->length, old_end);
+ case RUN_COPY_HOOK:
+ if (!(z->char_values_p ?
+ run_extent_copy_function_char (extent, old_start, old_end) :
+ run_extent_copy_function (extent, old_start, old_end)))
+ return 0;
+
+ case RUN_PASTE_HOOK:
+ if (!inside_undo &&
+ !(z->char_values_p ?
+ run_extent_paste_function_char (extent, new_start, new_end,
+ z->new_object) :
+ run_extent_paste_function (extent, new_start, new_end,
+ z->new_object)))
+ return 0;
- if (old_start >= old_end)
- return 0;
+ default:
+ ABORT ();
+ }
- new_start = old_start + closure->new_pos - closure->old_pos;
- new_end = old_end + closure->new_pos - closure->old_pos;
+ copy_extent (extent, new_start_byte, new_end_byte, z->new_object);
+ }
- copy_extent (extent, new_start, new_end, closure->new_string);
return 0;
}
-/* The string NEW_STRING was partially constructed from OLD_STRING.
- In particular, the section of length LEN starting at NEW_POS in
- NEW_STRING came from the section of the same length starting at
- OLD_POS in OLD_STRING. Copy the extents as appropriate. */
+/* General function for copying extents between objects. Used in numerous
+ circumstances: Inserting a string into a buffer, making a string out of
+ buffer contents, making a duplicate of a string or part of a string,
+ concatenating different strings together, etc. Copy the extents (or
+ parts of them) in the range (POS, POS + LEN) in object OBJECT to object
+ NEWOBJ, starting at NEWPOS. For extents that overlap the range in
+ OBJECT, a smaller extent will be placed in NEWOBJ by intersecting the
+ extent in OBJECT with the range. */
void
-copy_string_extents (Lisp_Object new_string, Lisp_Object old_string,
- Bytecount new_pos, Bytecount old_pos,
- Bytecount length)
+copy_extents_between_objects (Lisp_Object object, Bytexpos pos, Bytecount len,
+ Lisp_Object newobj, Bytexpos newpos,
+ int run_function)
{
- struct copy_string_extents_arg closure;
+ /* This function can GC if run_function is not RUN_NO_FUNCTION */
+ struct copy_extents_between_objects_arg z;
struct gcpro gcpro1, gcpro2;
- closure.new_pos = new_pos;
- closure.old_pos = old_pos;
- closure.new_string = new_string;
- closure.length = length;
- GCPRO2 (new_string, old_string);
- map_extents (old_pos, old_pos + length,
- copy_string_extents_mapper,
- (void *) &closure, old_string, 0,
+ if (buffer_or_other_internal_format (object) ==
+ buffer_or_other_internal_format (newobj))
+ {
+ z.new_pos = newpos;
+ z.old_pos = pos;
+ z.length = len;
+ }
+ else
+ {
+ /* If the two objects are in different formats, things get tricky;
+ the only reasonable way to do the operation is entirely in char
+ offsets, which are invariant to format changes. In practice, this
+ won't be time-consuming because the byte/char conversions are
+ mostly either in a string (hopefully small) or in a fixed-width
+ buffer. */
+ z.new_pos = buffer_or_string_bytexpos_to_charxpos (newobj, newpos);
+ z.old_pos = buffer_or_string_bytexpos_to_charxpos (object, pos);
+ z.length = buffer_or_string_bytexpos_to_charxpos (object, pos + len) -
+ z.old_pos;
+ }
+
+ z.new_object = newobj;
+ z.run_function = run_function;
+ GCPRO2 (object, newobj);
+ map_extents (pos, pos + len, copy_extents_between_objects_mapper,
+ (void *) &z, object, 0,
/* ignore extents that just abut the region */
ME_END_CLOSED | ME_ALL_EXTENTS_OPEN |
- /* we are calling E-Lisp (the extent's copy function)
- so anything might happen */
- ME_MIGHT_CALL_ELISP);
+ /* we might be calling E-Lisp if we're running copy or
+ paste hooks */
+ (run_function != RUN_NO_FUNCTION ? ME_MIGHT_CALL_ELISP : 0));
UNGCPRO;
}
+
/* Checklist for sanity checking:
- {kill, yank, copy} at {open, closed} {start, end} of {writable, read-only} extent
@@ -6491,13 +6394,9 @@
/* text properties */
/************************************************************************/
-/* Text properties
- Originally this stuff was implemented in lisp (all of the functionality
+/* Originally this stuff was implemented in lisp (all of the functionality
exists to make that possible) but speed was a problem.
- */
-
-Lisp_Object Qtext_prop;
-Lisp_Object Qtext_prop_extent_paste_function;
+*/
/* Retrieve the value of the property PROP of the text at position POSITION
in OBJECT. TEXT-PROPS-ONLY means only look at extents with the
@@ -6524,8 +6423,14 @@
extent = extent_at (position, object, Qtext_prop, prior, fl, 0);
if (NILP (extent))
return Qnil;
- if (EQ (prop, Fextent_property (extent, Qtext_prop, Qnil)))
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ if (property_in_text_props (extent_text_prop (XEXTENT (extent)),
+ prop))
break;
+#else
+ if (EQ (prop, extent_text_prop (XEXTENT (extent))))
+ break;
+#endif
prior = XEXTENT (extent);
}
}
@@ -6602,71 +6507,445 @@
return get_char_property_char (pos, prop, object, at_flag, 0);
}
-/* About start/end-open/closed:
+struct clear_text_properties_arg
+{
+ Bytexpos start, end;
+};
- These properties have to be handled specially because of their
- strange behavior. If I put the "start-open" property on a region,
- then *all* text-property extents in the region have to have their
- start be open. This is unlike all other properties, which don't
- affect the extents of text properties other than their own.
-
- So:
-
- 1) We have to map start-closed to (not start-open) and end-open
- to (not end-closed) -- i.e. adding the default is really the
- same as remove the non-default property. It won't work, for
- example, to have both "start-open" and "start-closed" on
- the same region.
- 2) Whenever we add one of these properties, we go through all
- text-property extents in the region and set the appropriate
- open/closedness on them.
- 3) Whenever we change a text-property extent for a property,
- we have to make sure we set the open/closedness properly.
-
- (2) and (3) together rely on, and maintain, the invariant
- that the open/closedness of text-property extents is correct
- at the beginning and end of each operation.
- */
+static int
+clear_text_properties_mapper (EXTENT e, void *arg)
+{
+ Bytexpos e_start, e_end;
+ struct clear_text_properties_arg *z =
+ (struct clear_text_properties_arg *) arg;
+ Bytexpos start = z->start, end = z->end;
+
+ /* Ignore non-text-property extents. */
+ if (NILP (extent_text_prop (e)))
+ return 0;
+
+ e_start = extent_start_byte (e);
+ e_end = extent_end_byte (e);
+ if (e_end <= start || e_start >= end)
+ /* Extent only abuts the region. Should never happen. */
+ ABORT ();
+ else if (e_start >= start && e_end <= end)
+ {
+ /* Extent entirely in region. Get rid of it. */
+ extent_detach (e);
+ }
+ else if (e_end <= end)
+ {
+ /* Extent overlaps our start position. Shrink it back. */
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ }
+ else if (e_start >= start)
+ {
+ /* Extent overlaps our end position. Shrink it forward. */
+ set_extent_endpoints_byte (e, e_start, end, Qnil);
+ }
+ else
+ {
+ /* Extent surrounds our region. Split it. */
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ copy_extent (e, end, e_end, extent_object (e));
+ }
+
+ return 0;
+}
+
+static void
+clear_text_properties (Lisp_Object object, Bytebpos start, Bytebpos end)
+{
+ struct clear_text_properties_arg z;
+
+ z.start = start;
+ z.end = end;
+
+ map_extents (start, end, clear_text_properties_mapper, &z, object, NULL,
+ /* no extents that abut the region, please */
+ ME_ALL_EXTENTS_OPEN | ME_START_OPEN |
+ ME_MIGHT_MODIFY_EXTENTS);
+}
+
+/* Formerly we had special code to handle start-open and end-closed, etc.
+ By setting this property over a region, *all* text-property extents in
+ the region keep that property. But this ultimately is really bogus
+ because it introduces behavior that's dependent on implementation
+ details. The original idea was to provide something that (sort of)
+ emulated the front-sticky and rear-nonsticky properties in FSF. So now
+ I've gone ahead and implemented those exactly as in FSF, and removed all
+ the bogus start-open/end-closed handling. start-open/end-closed are for
+ extents, not text properties, and should stay there.
+*/
+
struct put_text_prop_arg
{
Lisp_Object prop, value; /* The property and value we are storing */
- Bytexpos start, end; /* The region into which we are storing it */
- Lisp_Object object;
+ Bytexpos start, end; /* The region into which we are storing it */
+ Lisp_Object object; /* The object containing the region */
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ Lisp_Object prev_extent; /* Last extent we saw. If this does not abut
+ the current extent, we need to insert
+ another extent. */
+ int duplicable; /* Whether the property in the region should
+ be duplicable. */
+#else
Lisp_Object the_extent; /* Our chosen extent; this is used for
communication between subsequent passes. */
+#endif /* not NEW_TEXT_PROPERTY_MODEL */
int changed_p; /* Output: whether we have modified anything */
};
+#ifdef NEW_TEXT_PROPERTY_MODEL
+
+static Lisp_Object
+insert_symbol_into_sorted_list (Lisp_Object list, Lisp_Object sym)
+{
+ Lisp_Object prev = Qnil;
+ Lisp_Object orig = list;
+
+ for (; !NILP (list); prev = list, list = XCDR (list))
+ {
+ if (EQ (sym, XCAR (list)))
+ return orig;
+ if (!NILP (Fstring_lessp (sym, XCAR (list))))
+ {
+ done:
+ if (NILP (prev))
+ return Fcons (sym, orig);
+ else
+ {
+ XCDR (prev) = Fcons (sym, list);
+ return orig;
+ }
+ }
+ }
+
+ goto done;
+}
+
+static Lisp_Object
+insert_property_into_text_props (Lisp_Object text_props, Lisp_Object prop)
+{
+ return insert_symbol_into_sorted_list (text_props, prop);
+}
+
+static Lisp_Object
+remove_property_from_text_props (Lisp_Object text_props, Lisp_Object prop)
+{
+ text_props = delq_no_quit (prop, text_props);
+ return text_props;
+}
+
static int
+property_in_text_props (Lisp_Object text_props, Lisp_Object prop)
+{
+ return !NILP (memq_no_quit (prop, text_props));
+}
+
+static int
+text_props_is_exactly_property (Lisp_Object text_props, Lisp_Object prop)
+{
+ return !NILP (text_props) && EQ (XCAR (text_props), prop) &&
+ NILP (XCDR (text_props));
+}
+
+static int
+extent_duplicable_for_prop (EXTENT e, Lisp_Object prop)
+{
+ Lisp_Object dup = extent_duplicable (e);
+ if (EQ (dup, Qt))
+ return 1;
+ return !NILP (memq_no_quit (prop, dup));
+}
+
+/* Return non-zero if the two extents govern the same properties with the
+ same values for each of these properties, and the same duplicable status. */
+
+static int
+text_property_extents_identical (EXTENT e, EXTENT f)
+{
+ Lisp_Object props = extent_text_prop (e);
+ if (!internal_equal (props, extent_text_prop (f), 0))
+ return 0;
+ {
+ Lisp_Object dupe = extent_duplicable (e), dupf = extent_duplicable (f);
+ if (EQ (dupe, Qt))
+ dupe = extent_text_prop (e);
+ if (EQ (dupf, Qt))
+ dupf = extent_text_prop (e);
+
+ if (!internal_equal (dupe, dupf, 0))
+ return 0;
+ }
+
+ LIST_LOOP_2 (prop, props)
+ {
+ if (!EQ (Fextent_property (wrap_extent (e), prop, Qnil),
+ Fextent_property (wrap_extent (f), prop, Qnil)))
+ return 0;
+ }
+
+ return 1;
+}
+
+static void
+set_text_property_on_extent (EXTENT e, Lisp_Object prop, Lisp_Object value,
+ int duplicable)
+{
+ if (NILP (value))
+ {
+ extent_text_prop (e) =
+ remove_property_from_text_props (extent_text_prop (e), prop);
+ if (NILP (e->text_prop))
+ extent_detach (e);
+ else
+ {
+ Fset_extent_property (wrap_extent (e), prop, value);
+ goto remove_dup;
+ }
+ }
+ else
+ {
+ e->text_prop = insert_property_into_text_props (extent_text_prop (e),
+ prop);
+ Fset_extent_property (wrap_extent (e), prop, value);
+ if (duplicable)
+ {
+ Lisp_Object dup = extent_duplicable (e);
+ if (EQ (dup, Qt))
+ ; /* all were duplicable, they still are */
+ else if (text_props_is_exactly_property (extent_text_prop (e), prop))
+ /* governs only this property, so use `t' */
+ set_extent_duplicable_0 (e, Qt);
+ else
+ set_extent_duplicable_0
+ (e, insert_symbol_into_sorted_list (dup, prop));
+ }
+ else
+ {
+ remove_dup:
+ Lisp_Object dup = extent_duplicable (e);
+ if (EQ (dup, Qt)) /* Some will be removed so `t' will no longer
+ work */
+ dup = extent_text_prop (e);
+ set_extent_duplicable_0 (e, delq_no_quit (prop, dup));
+ }
+ }
+}
+
+static EXTENT
+make_new_text_property_extent (Lisp_Object object, Bytexpos start,
+ Bytexpos end, Lisp_Object prop,
+ Lisp_Object value, int duplicable)
+{
+ EXTENT e = make_extent (object, start, end);
+ set_text_property_on_extent (e, prop, value, duplicable);
+ set_extent_openness (e, 1, 1);
+ return e;
+}
+
+#endif /* NEW_TEXT_PROPERTY_MODEL */
+
+/* This function maintains the invariants on the text-property extents.
+ Formerly, we used separate extents to keep track of separate text
+ properties. The `text-prop' property indicated which property this
+ extent tracks. The invariant was that there should not be two
+ overlapping extents with the same value for `text-prop', and two
+ adjacent extents with the same value of `text-prop' and the same value
+ for property indicated by `text-prop' should be coalesced.
+
+ However, if there were two different text properties on a region, there
+ would be two extents overlapping that region. The problem is that the
+ extent code gets much slower in this case, especially when you have one
+ extent that straddles the entire buffer -- and this is exactly what
+ happens with lazy-lock, which sets `lazy-lock-fontified' to t on all
+ regions that are up-to-date.
+
+ Therefore, we now use just one extent to track all text properties in a
+ region, and have *NO* overlapping text-property extents. The value of
+ `text-prop' is a list indicating all properties being governed. The
+ invariants are, then that no extents with the `text-prop' property can
+ overlap, and that adjacent extents with the same value for `text-prop'
+ and the same value for all specified properties need to be coalesced.
+
+ To do this:
+
+ -- When adding a text property to a region, we map over the `text-prop'
+ extents in the region -- with the endpoints closed so we get all extents
+ that only abut the region, for coalescing purposes. Extents entirely
+ within the region get the relevant property added to `text-prop' if not
+ already there, and the property set. We also compare each extent with
+ the previous one, to see if the same text properties are governed (to
+ simplify this comparison we maintain the list in `text-prop' in sorted
+ order) and with the same values, and if so we coalesce this extent with
+ the previous one (i.e. delete it and extend the previous extent's
+ range). For extents that straddle the region, if the extent already
+ governs the same property with the same value, we do nothing; else, we
+ split the extent into two. Finally, we also compare each extent with
+ the previous one to see if there is a region with no `text-prop' extent
+ on it; if so, we need to add one. (We also need a check after mapping,
+ to make sure the remainder of the region has a `text-prop' extent on
+ it.)
+
+ -- In the new order, handling duplicable and non-duplicable is a bit
+ trickier. In the old order, with one text property per extent, you
+ could simply set the duplicable flag. In our new order, we have
+ multiple properties per extent, so the duplicable property needs to be
+ extended to a list of properties (or Qt, for all). Transfering
+ duplicable properties in text-property extents is handled specially
+ in transfer_duplicable_text_properties().
+*/
+
+static int
put_text_prop_mapper (EXTENT e, void *arg)
{
- struct put_text_prop_arg *closure = (struct put_text_prop_arg *) arg;
+ struct put_text_prop_arg *z = (struct put_text_prop_arg *) arg;
- Lisp_Object object = closure->object;
- Lisp_Object value = closure->value;
+ Lisp_Object object = z->object;
+ Lisp_Object prop = z->prop;
+ Lisp_Object value = z->value;
+ Bytexpos start = z->start;
+ Bytexpos end = z->end;
Bytexpos e_start, e_end;
- Bytexpos start = closure->start;
- Bytexpos end = closure->end;
- Lisp_Object extent, e_val;
- int is_eq;
+ Lisp_Object extent = wrap_extent (e);
+ EXTENT last_extent = 0;
- extent = wrap_extent (e);
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ if (NILP (extent_text_prop (e)))
+ /* It's not a text-property extent; do nothing. */
+ return 0;
+#else
+ int is_eq;
- /* Note: in some cases when the property itself is 'start-open
- or 'end-closed, the checks to set the openness may do a bit
- of extra work; but it won't hurt because we then fix up the
- openness later on in put_text_prop_openness_mapper(). */
- if (!EQ (Fextent_property (extent, Qtext_prop, Qnil), closure->prop))
+ if (!EQ (extent_text_prop (e), prop))
/* It's not for this property; do nothing. */
return 0;
+ is_eq = EQ (value, Fextent_property (extent, prop, Qnil));
+#endif /* NEW_TEXT_PROPERTY_MODEL */
- e_start = extent_endpoint_byte (e, 0);
- e_end = extent_endpoint_byte (e, 1);
- e_val = Fextent_property (extent, closure->prop, Qnil);
- is_eq = EQ (value, e_val);
+ e_start = extent_start_byte (e);
+ e_end = extent_end_byte (e);
- if (!NILP (value) && NILP (closure->the_extent) && is_eq)
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ if ((property_in_text_props (extent_text_prop (e), prop) == !NILP (value))
&&
+ (NILP (value) ||
+ (EQ (value, Fextent_property (extent, prop, Qnil)) &&
+ extent_duplicable_for_prop (e, prop) == z->duplicable)))
+ /* Property already present here, with same duplicability. If we fail
+ this test, *something* is different and we will need to split extents
+ that overlap our start or end. */
+ ;
+ else if (e_end <= start || e_start >= end)
+ /* Extent only abuts the region, so do nothing. */
+ ;
+ else if (e_start >= start && e_end <= end)
+ {
+ /* Extent entirely in region. Add the property as necessary. */
+ set_text_property_on_extent (e, prop, value, z->duplicable);
+ z->changed_p = 1;
+ }
+ else if (e_end <= end)
+ {
+ /* Extent overlaps our start position. Split it. */
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ set_text_property_on_extent
+ (last_extent =
+ copy_extent (e, start, e_end, extent_object (e)), prop, value,
+ z->duplicable);
+ z->changed_p = 1;
+ }
+ else if (e_start >= start)
+ {
+ /* Extent overlaps our end position. Split it. */
+ set_extent_endpoints_byte (e, e_start, end, Qnil);
+ last_extent = copy_extent (e, end, e_end, extent_object (e));
+ set_text_property_on_extent (e, prop, value, z->duplicable);
+ z->changed_p = 1;
+ }
+ else
+ {
+ /* Extent surrounds our region. Split it into three parts. */
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ set_text_property_on_extent
+ (copy_extent (e, start, end, extent_object (e)), prop, value,
+ z->duplicable);
+ last_extent = copy_extent (e, end, e_end, extent_object (e));
+ z->changed_p = 1;
+ }
+
+ {
+ EXTENT preve = 0;
+ Bytexpos prev_start = 0;
+ Bytexpos prev_end = start;
+
+ /* Refetch changed values. */
+ if (!extent_detached_p (e))
+ {
+ e_start = extent_start_byte (e);
+ e_end = extent_end_byte (e);
+ }
+
+ if (!NILP (z->prev_extent))
+ {
+ preve = XEXTENT (z->prev_extent);
+ prev_start = extent_start_byte (preve);
+ prev_end = extent_end_byte (preve);
+ }
+
+ /* At this point, if we have created new extents, E is the first one
+ and LAST_EXTENT is the last one. */
+ if (!NILP (value) && prev_end < e_start)
+ {
+ /* There's a gap between this extent and the end of the previous
+ one. If the previous extent governs the same property and only
+ that property, and with the same value, we can extend it.
+ Otherwise we need to make a new one, which becomes the new
+ "previous extent". In either case, the previous extent may be
+ coalesced below. */
+ if (preve &&
+ text_props_is_exactly_property (extent_text_prop (preve), prop) &&
+ EQ (Fextent_property (z->prev_extent, prop, Qnil), value) &&
+ extent_duplicable_for_prop (preve, prop) == z->duplicable)
+ set_extent_endpoints_byte (preve, prev_start, e_start, Qnil);
+ else
+ {
+ preve = make_new_text_property_extent (object, prev_end,
+ e_start, prop, value,
+ z->duplicable);
+ z->prev_extent = wrap_extent (preve);
+ }
+ z->changed_p = 1;
+
+ /* Refetch changed values. */
+ prev_start = extent_start_byte (preve);
+ prev_end = extent_end_byte (preve);
+ }
+
+ /* Do we need to coalesce this extent with the previous one? Check if
+ our extent is detached, which may have happened if value is nil. */
+ if (!extent_detached_p (e))
+ {
+ if (preve && prev_end == e_start &&
+ text_property_extents_identical (preve, e))
+ {
+ extent_detach (e);
+ set_extent_endpoints_byte (preve, prev_start, e_end, Qnil);
+ z->changed_p = 1;
+ }
+ else
+ z->prev_extent = wrap_extent (e);
+ }
+
+ if (last_extent && !extent_detached_p (last_extent))
+ z->prev_extent = wrap_extent (last_extent);
+ }
+
+#else /* not NEW_TEXT_PROPERTY_MODEL */
+
+ if (!NILP (value) && NILP (z->the_extent) && is_eq)
{
/* We want there to be an extent here at the end, and we haven't picked
one yet, so use this one. Extend it as necessary. We only reuse an
@@ -6678,22 +6957,10 @@
{
Bytexpos new_start = min (e_start, start);
Bytexpos new_end = max (e_end, end);
- set_extent_endpoints (e, new_start, new_end, Qnil);
- /* If we changed the endpoint, then we need to set its
- openness. */
- set_extent_openness (e, new_start != e_start
- ? !NILP (get_char_property
- (start, Qstart_open, object,
- EXTENT_AT_AFTER, 1)) : -1,
- new_end != e_end
- ? NILP (get_char_property
- (prev_bytexpos (object, end),
- Qend_closed, object,
- EXTENT_AT_AFTER, 1))
- : -1);
- closure->changed_p = 1;
+ set_extent_endpoints_byte (e, new_start, new_end, Qnil);
+ z->changed_p = 1;
}
- closure->the_extent = extent;
+ z->the_extent = extent;
}
/* Even if we're adding a prop, at this point, we want all other extents of
@@ -6703,7 +6970,7 @@
it, and remove the others.
*/
- else if (EQ (extent, closure->the_extent))
+ else if (EQ (extent, z->the_extent))
{
/* just in case map-extents hits it again (does that happen?) */
;
@@ -6715,22 +6982,22 @@
duplicates in the kill ring.
*/
extent_detach (e);
- closure->changed_p = 1;
+ z->changed_p = 1;
}
- else if (!NILP (closure->the_extent) &&
+ else if (!NILP (z->the_extent) &&
is_eq &&
e_start <= end &&
e_end >= start)
{
- EXTENT te = XEXTENT (closure->the_extent);
+ EXTENT te = XEXTENT (z->the_extent);
/* This extent overlaps, and has the same prop/value as the extent we've
decided to reuse, so we can remove this existing extent as well (the
whole thing, even the part outside of the region) and extend
the-extent to cover it, resulting in the minimum number of extents in
the buffer.
*/
- Bytexpos the_start = extent_endpoint_byte (te, 0);
- Bytexpos the_end = extent_endpoint_byte (te, 1);
+ Bytexpos the_start = extent_start_byte (te);
+ Bytexpos the_end = extent_end_byte (te);
if (e_start != the_start && /* note AND not OR -- hmm, why is this
the case? I think it's because the
assumption that the text-property
@@ -6742,17 +7009,8 @@
{
Bytexpos new_start = min (e_start, the_start);
Bytexpos new_end = max (e_end, the_end);
- set_extent_endpoints (te, new_start, new_end, Qnil);
- /* If we changed the endpoint, then we need to set its
- openness. We are setting the endpoint to be the same as
- that of the extent we're about to remove, and we assume
- (the invariant mentioned above) that extent has the
- proper endpoint setting, so we just use it. */
- set_extent_openness (te, new_start != e_start ?
- (int) extent_start_open_p (e) : -1,
- new_end != e_end ?
- (int) extent_end_open_p (e) : -1);
- closure->changed_p = 1;
+ set_extent_endpoints_byte (te, new_start, new_end, Qnil);
+ z->changed_p = 1;
}
extent_detach (e);
}
@@ -6763,13 +7021,8 @@
*/
if (e_end != start)
{
- set_extent_endpoints (e, e_start, start, Qnil);
- set_extent_openness (e, -1,
- NILP (get_char_property
- (prev_bytexpos (object, start),
- Qend_closed, object,
- EXTENT_AT_AFTER, 1)));
- closure->changed_p = 1;
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ z->changed_p = 1;
}
}
else if (e_start >= start)
@@ -6779,56 +7032,19 @@
*/
if (e_start != end)
{
- set_extent_endpoints (e, end, e_end, Qnil);
- set_extent_openness (e, !NILP (get_char_property
- (end, Qstart_open, object,
- EXTENT_AT_AFTER, 1)), -1);
- closure->changed_p = 1;
+ set_extent_endpoints_byte (e, end, e_end, Qnil);
+ z->changed_p = 1;
}
}
else
{
/* Otherwise, `extent' straddles the region. We need to split it.
*/
- set_extent_endpoints (e, e_start, start, Qnil);
- set_extent_openness (e, -1, NILP (get_char_property
- (prev_bytexpos (object, start),
- Qend_closed, object,
- EXTENT_AT_AFTER, 1)));
- set_extent_openness (copy_extent (e, end, e_end, extent_object (e)),
- !NILP (get_char_property
- (end, Qstart_open, object,
- EXTENT_AT_AFTER, 1)), -1);
- closure->changed_p = 1;
- }
-
- return 0; /* to continue mapping. */
-}
-
-static int
-put_text_prop_openness_mapper (EXTENT e, void *arg)
-{
- struct put_text_prop_arg *closure = (struct put_text_prop_arg *) arg;
- Bytexpos e_start, e_end;
- Bytexpos start = closure->start;
- Bytexpos end = closure->end;
- Lisp_Object extent = wrap_extent (e);
-
- e_start = extent_endpoint_byte (e, 0);
- e_end = extent_endpoint_byte (e, 1);
-
- if (NILP (Fextent_property (extent, Qtext_prop, Qnil)))
- {
- /* It's not a text-property extent; do nothing. */
- ;
+ set_extent_endpoints_byte (e, e_start, start, Qnil);
+ copy_extent (e, end, e_end, extent_object (e));
+ z->changed_p = 1;
}
- /* Note end conditions and NILP/!NILP's carefully. */
- else if (EQ (closure->prop, Qstart_open)
- && e_start >= start && e_start < end)
- set_extent_openness (e, !NILP (closure->value), -1);
- else if (EQ (closure->prop, Qend_closed)
- && e_end > start && e_end <= end)
- set_extent_openness (e, -1, NILP (closure->value));
+#endif /* NEW_TEXT_PROPERTY_MODEL */
return 0; /* to continue mapping. */
}
@@ -6836,10 +7052,14 @@
static int
put_text_prop (Bytexpos start, Bytexpos end, Lisp_Object object,
Lisp_Object prop, Lisp_Object value,
- int duplicable_p)
+ int duplicable)
{
- /* This function can GC */
- struct put_text_prop_arg closure;
+ struct put_text_prop_arg z;
+ /* We do lots of operations on extents, which are likely to mess up the
+ count of non-text-prop extents. Rather than make sure that each
+ individual operation keeps the count correct, we just make sure it
+ stays the same at entry and exit. */
+ int num_non_text = buffer_or_string_num_non_textprop_extents (object);
if (start == end) /* There are no characters in the region. */
return 0;
@@ -6859,74 +7079,84 @@
value = canonicalize_extent_property (prop, value);
- closure.prop = prop;
- closure.value = value;
- closure.start = start;
- closure.end = end;
- closure.object = object;
- closure.changed_p = 0;
- closure.the_extent = Qnil;
+ z.prop = prop;
+ z.value = value;
+ z.start = start;
+ z.end = end;
+ z.object = object;
+ z.changed_p = 0;
+
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ z.duplicable = duplicable;
+ z.prev_extent = Qnil;
+#else
+ z.the_extent = Qnil;
+#endif
map_extents (start, end,
put_text_prop_mapper,
- (void *) &closure, object, 0,
+ (void *) &z, object, 0,
/* get all extents that abut the region */
ME_ALL_EXTENTS_CLOSED | ME_END_CLOSED |
-#if 0
- /* it might move the SOE because the callback function calls
- get_char_property(), which calls extent_at(), which calls
- map_extents()
-
- #### this was comment out before, and nothing seemed broken;
- #### but when I added the above comment and uncommented it,
- #### text property operations (e.g. font-lock) suddenly
- #### became *WAY* slow, and dominated font-lock, when a
- #### single extent spanning the entire buffer
- #### existed. --ben */
- ME_MIGHT_MOVE_SOE |
-#endif
- /* it might QUIT or error if the user has
- fucked with the extent plist. */
+ /* it might error if the user has fucked with the extent
+ plist or is passing a bad value for certain built-in
+ properties. */
ME_MIGHT_THROW |
+ /* it almost certainly will modify extents. */
ME_MIGHT_MODIFY_EXTENTS);
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ if (!NILP (value))
+ {
+ /* Check if there's a gap between the last-processed extent and the
+ end of the region. If the last extent governs the same property
+ and only that property, and with the same value, we can extend
+ it. Otherwise we need to make a new one. */
+ EXTENT preve = 0;
+ Bytexpos prev_start = 0;
+ Bytexpos prev_end = start;
+
+ if (!NILP (z.prev_extent))
+ {
+ preve = XEXTENT (z.prev_extent);
+ prev_start = extent_start_byte (preve);
+ prev_end = extent_end_byte (preve);
+ }
+
+ if (prev_end < end)
+ {
+ if (preve &&
+ text_props_is_exactly_property (extent_text_prop (preve), prop)
+ && EQ (Fextent_property (z.prev_extent, prop, Qnil), value))
+ set_extent_endpoints_byte (preve, prev_start, end, Qnil);
+ else
+ make_new_text_property_extent (object, prev_end,
+ end, prop, value,
+ z.duplicable);
+ z.changed_p = 1;
+ }
+ }
+
+#else /* not NEW_TEXT_PROPERTY_MODEL */
/* If we made it through the loop without reusing an extent
(and we want there to be one) make it now.
*/
- if (!NILP (value) && NILP (closure.the_extent))
+ if (!NILP (value) && NILP (z.the_extent))
{
Lisp_Object extent =
wrap_extent (make_extent (object, start, end));
- closure.changed_p = 1;
- Fset_extent_property (extent, Qtext_prop, prop);
+ z.changed_p = 1;
+ extent_text_prop (XEXTENT (extent)) = prop;
Fset_extent_property (extent, prop, value);
- if (duplicable_p)
- {
- extent_duplicable_p (XEXTENT (extent)) = 1;
- Fset_extent_property (extent, Qpaste_function,
- Qtext_prop_extent_paste_function);
- }
- set_extent_openness (XEXTENT (extent),
- !NILP (get_char_property
- (start, Qstart_open, object,
- EXTENT_AT_AFTER, 1)),
- NILP (get_char_property
- (prev_bytexpos (object, end),
- Qend_closed, object,
- EXTENT_AT_AFTER, 1)));
- }
-
- if (EQ (prop, Qstart_open) || EQ (prop, Qend_closed))
- {
- map_extents (start, end, put_text_prop_openness_mapper,
- (void *) &closure, object, 0,
- /* get all extents that abut the region */
- ME_ALL_EXTENTS_CLOSED | ME_END_CLOSED |
- ME_MIGHT_MODIFY_EXTENTS);
+ if (duplicable)
+ set_extent_duplicable_0 (XEXTENT (extent), Qt);
+ set_extent_openness (XEXTENT (extent), 1, 1);
}
+#endif /* NEW_TEXT_PROPERTY_MODEL */
- return closure.changed_p;
+ buffer_or_string_set_num_non_textprop_extents (object, num_non_text);
+ return z.changed_p;
}
DEFUN ("put-text-property", Fput_text_property, 4, 5, 0, /*
@@ -6935,14 +7165,17 @@
region. The properties are copied when the characters are copied/pasted.
Fifth argument OBJECT is the buffer or string containing the text, and
defaults to the current buffer.
+
+See `set-extent-property' for a description of the built-in (specially
+recognized) properties.
*/
(start, end, prop, value, object))
{
- /* This function can GC */
Bytexpos s, e;
object = decode_buffer_or_string (object);
get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
+ CHECK_SYMBOL (prop);
put_text_prop (s, e, object, prop, value, 1);
return prop;
}
@@ -6951,18 +7184,21 @@
4, 5, 0, /*
Adds the given property/value to all characters in the specified region.
The property is conceptually attached to the characters rather than the
-region, however the properties will not be copied when the characters
-are copied.
-Fifth argument OBJECT is the buffer or string containing the text, and
-defaults to the current buffer.
+region. This differs from `put-text-property' in that the properties will
+not be copied when the characters are copied/pasted. Fifth argument OBJECT
+is the buffer or string containing the text, and defaults to the current
+buffer.
+
+See `set-extent-property' for a description of the built-in (specially
+recognized) properties.
*/
(start, end, prop, value, object))
{
- /* This function can GC */
Bytexpos s, e;
object = decode_buffer_or_string (object);
get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
+ CHECK_SYMBOL (prop);
put_text_prop (s, e, object, prop, value, 0);
return prop;
}
@@ -6976,23 +7212,21 @@
*/
(start, end, props, object))
{
- /* This function can GC */
int changed = 0;
Bytexpos s, e;
object = decode_buffer_or_string (object);
get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
- CHECK_LIST (props);
- for (; !NILP (props); props = Fcdr (Fcdr (props)))
- {
- Lisp_Object prop = XCAR (props);
- Lisp_Object value = Fcar (XCDR (props));
- changed |= put_text_prop (s, e, object, prop, value, 1);
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (prop, value, props)
+ {
+ CHECK_SYMBOL (prop);
+ changed |= put_text_prop (s, e, object, prop, value, 1);
+ }
+ }
return changed ? Qt : Qnil;
}
-
DEFUN ("add-nonduplicable-text-properties",
Fadd_nonduplicable_text_properties,
3, 4, 0, /*
Add nonduplicable properties to the characters from START to END.
@@ -7004,22 +7238,40 @@
*/
(start, end, props, object))
{
- /* This function can GC */
int changed = 0;
Bytexpos s, e;
object = decode_buffer_or_string (object);
get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
- CHECK_LIST (props);
- for (; !NILP (props); props = Fcdr (Fcdr (props)))
- {
- Lisp_Object prop = XCAR (props);
- Lisp_Object value = Fcar (XCDR (props));
- changed |= put_text_prop (s, e, object, prop, value, 0);
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (prop, value, props)
+ {
+ CHECK_SYMBOL (prop);
+ changed |= put_text_prop (s, e, object, prop, value, 0);
+ }
+ }
return changed ? Qt : Qnil;
}
+DEFUN ("set-text-properties", Fset_text_properties, 3, 4, 0, /*
+Completely replace properties of text from START to END.
+The third argument PROPS is the new property list. The optional fourth
+argument, OBJECT, is the string or buffer containing the text.
+*/
+ (start, end, props, object))
+{
+ int changed = 0;
+ Bytexpos s, e;
+
+ object = decode_buffer_or_string (object);
+ get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
+
+ clear_text_properties (object, s, e);
+
+ Fadd_text_properties (start, end, props, object);
+ return Qnil;
+}
+
DEFUN ("remove-text-properties", Fremove_text_properties, 3, 4, 0, /*
Remove the given properties from all characters in the specified region.
PROPS should be a plist, but the values in that plist are ignored (treated
@@ -7029,61 +7281,21 @@
*/
(start, end, props, object))
{
- /* This function can GC */
int changed = 0;
Bytexpos s, e;
object = decode_buffer_or_string (object);
get_buffer_or_string_range_byte (object, start, end, &s, &e, 0);
- CHECK_LIST (props);
- for (; !NILP (props); props = Fcdr (Fcdr (props)))
- {
- Lisp_Object prop = XCAR (props);
- changed |= put_text_prop (s, e, object, prop, Qnil, 1);
- }
+ {
+ EXTERNAL_PROPERTY_LIST_LOOP_3 (prop, value, props)
+ {
+ CHECK_SYMBOL (prop);
+ changed |= put_text_prop (s, e, object, prop, Qnil, 1);
+ }
+ }
return changed ? Qt : Qnil;
}
-/* Whenever a text-prop extent is pasted into a buffer (via `yank' or `insert'
- or whatever) we attach the properties to the buffer by calling
- `put-text-property' instead of by simply allowing the extent to be copied or
- re-attached. Then we return nil, telling the extents code not to attach it
- again. By handing the insertion hackery in this way, we make kill/yank
- behave consistently with put-text-property and not fragment the extents
- (since text-prop extents must partition, not overlap).
-
- The lisp implementation of this was probably fast enough, but since I moved
- the rest of the put-text-prop code here, I moved this as well for
- completeness.
- */
-DEFUN ("text-prop-extent-paste-function", Ftext_prop_extent_paste_function,
- 3, 3, 0, /*
-Used as the `paste-function' property of `text-prop' extents.
-*/
- (extent, from, to))
-{
- /* This function can GC */
- Lisp_Object prop, val;
-
- prop = Fextent_property (extent, Qtext_prop, Qnil);
- if (NILP (prop))
- signal_error (Qinternal_error,
- "Internal error: no text-prop", extent);
- val = Fextent_property (extent, prop, Qnil);
-#if 0
- /* removed by bill perry, 2/9/97
- ** This little bit of code would not allow you to have a text property
- ** with a value of Qnil. This is bad bad bad.
- */
- if (NILP (val))
- signal_error_2 (Qinternal_error,
- "Internal error: no text-prop",
- extent, prop);
-#endif
- Fput_text_property (from, to, prop, val, Qnil);
- return Qnil; /* important! */
-}
-
Bytexpos
next_previous_single_property_change (Bytexpos pos, Lisp_Object prop,
Lisp_Object object, Bytexpos limit,
@@ -7219,14 +7431,12 @@
The property values are compared with `eq'.
Return nil if the property is constant all the way to the end of OBJECT.
If the value is non-nil, it is a position greater than POS, never equal.
-
If the optional fourth argument LIMIT is non-nil, don't search
past position LIMIT; return LIMIT if nothing is found before LIMIT.
If two or more extents with conflicting non-nil values for PROP overlap
a particular character, it is undefined which value is considered to be
the value of PROP. (Note that this situation will not happen if you always
use the text-property primitives.)
-
This function looks at all extents. To look at only extents created using the
text-property primitives, use `next-single-char-property-change'.
*/
@@ -7264,16 +7474,261 @@
0, 0);
}
+/* Called after text is inserted, to implement the front-sticky and
+ rear-nonsticky properties */
+
+void
+handle_sticky_properties (struct buffer *buf, Bytebpos start, Bytebpos end,
+ int inherit)
+{
+#ifdef NEW_TEXT_PROPERTY_MODEL
+ Lisp_Object buffer = wrap_buffer (buf);
+
+ /* First, clear out all text properties from the region. */
+ clear_text_properties (buffer, start, end);
+
+ if (inherit)
+ {
+ /* NOTE: The documentation on text-property-default-nonsticky in
+ text.texi implies that it only applies to rear-stickiness, not
+ front-stickiness. The documentation on the symbol itself implies
+ the opposite, and the FSF code seems to agree with this, so we
+ make it apply to both. */
+ Lisp_Object extent;
+ Lisp_Object sticky;
+
+ sticky = get_char_property (end, Qfront_sticky, buffer, EXTENT_AT_AFTER,
+ 0);
+
+ /* FSF docs say that rear properties override front properties if both
+ are inherited. Easiest way to implement in just set the front ones
+ first. */
+ if (LISTP (sticky))
+ {
+ EXTERNAL_LIST_LOOP_2 (prop, sticky)
+ {
+ Lisp_Object extent = extent_at (end, buffer, prop, 0,
+ EXTENT_AT_AFTER, 0);
+ if (!NILP (extent))
+ {
+ Lisp_Object val = Fextent_property (extent, prop, Qnil);
+ if (!NILP (val))
+ put_text_prop (start, end, buffer, prop, val,
+ extent_duplicable_for_prop
+ (XEXTENT (extent), prop));
+ }
+ }
+
+ {
+ /* Also need to handle properties explicitly defined as sticky in
+ text-property-default-nonsticky. */
+ EXTERNAL_ALIST_LOOP (car, cdr, Vtext_property_default_nonsticky)
+ {
+ if (NILP (cdr))
+ {
+ Lisp_Object extent = extent_at (end, buffer, car, 0,
+ EXTENT_AT_AFTER, 0);
+ if (!NILP (extent))
+ {
+ Lisp_Object val = Fextent_property (extent, car, Qnil);
+ if (!NILP (val))
+ put_text_prop (start, end, buffer, car, val,
+ extent_duplicable_for_prop
+ (XEXTENT (extent), car));
+ }
+ }
+ }
+ }
+ }
+
+ if (EQ (sticky, Qt))
+ {
+ EXTENT prior = 0;
+ while (1)
+ {
+ Lisp_Object props;
+ extent = extent_at (end, buffer, Qtext_prop, prior,
+ EXTENT_AT_AFTER, 0);
+ if (NILP (extent))
+ break;
+ props = extent_text_prop (XEXTENT (extent));
+ {
+ LIST_LOOP_2 (prop, props)
+ {
+ Lisp_Object val = Fextent_property (extent, prop, Qnil);
+ if (!NILP (val))
+ put_text_prop (start, end, buffer, prop, val,
+ extent_duplicable_for_prop
+ (XEXTENT (extent), prop));
+ }
+ }
+ prior = XEXTENT (extent);
+ }
+ }
+
+ sticky = get_char_property (start, Qrear_nonsticky, buffer,
+ EXTENT_AT_BEFORE, 0);
+
+ if (!EQ (sticky, Qt))
+ {
+ EXTENT prior = 0;
+ while (1)
+ {
+ Lisp_Object props;
+ extent = extent_at (start, buffer, Qtext_prop, prior,
+ EXTENT_AT_BEFORE, 0);
+ if (NILP (extent))
+ break;
+ props = extent_text_prop (XEXTENT (extent));
+ {
+ LIST_LOOP_2 (prop, props)
+ {
+ if (NILP (Fmemq (prop, sticky)) &&
+ NILP (Fcdr
+ (Fassq (prop,
+ Vtext_property_default_nonsticky))))
+ {
+ Lisp_Object val =
+ Fextent_property (extent, prop, Qnil);
+ if (!NILP (val))
+ put_text_prop (start, end, buffer, prop, val,
+ extent_duplicable_for_prop
+ (XEXTENT (extent), prop));
+ }
+ }
+ }
+ prior = XEXTENT (extent);
+ }
+ }
+ }
+#endif /* NEW_TEXT_PROPERTY_MODEL */
+}
+
#ifdef MEMORY_USAGE_STATS
-int
-compute_buffer_extent_usage (struct buffer *UNUSED (b),
- struct overhead_stats *UNUSED (ovstats))
+/* Return the amount of usage of extent structures, aux structures, and cons
+ structures for the specified extent. */
+static void
+compute_extent_usage (EXTENT e, Elemcount *extent, Elemcount *aux,
+ Elemcount *cons, struct overhead_stats *ovstats)
{
- /* #### not yet written */
- return 0;
+ (*extent)++;
+ *cons += XINT (Fsafe_length (e->plist));
+ *cons += XINT (Fsafe_length (e->text_prop));
+ if (e->flags.has_aux)
+ {
+ struct extent_auxiliary *ea = extent_aux_or_default (e);
+
+ (*aux)++;
+ *cons += XINT (Fsafe_length (ea->duplicable));
+
+ if (!NILP (ea->children))
+ *cons += weak_list_usage (ea->children, ovstats);
+ }
+}
+
+static Bytecount
+compute_gap_array_marker_usage (Gap_Array_Marker *markers,
+ struct overhead_stats *ovstats)
+{
+ Bytecount val = 0;
+
+ while (markers)
+ {
+ val += malloced_storage_size (markers, sizeof (*markers), ovstats);
+ markers = markers->next;
+ }
+
+ return val;
+}
+
+static Bytecount
+compute_gap_array_usage (Gap_Array *ga, struct overhead_stats *ovstats)
+{
+ return compute_gap_array_marker_usage (ga->markers, ovstats) +
+ malloced_storage_size (ga,
+ FLEXIBLE_ARRAY_STRUCT_SIZEOF
+ (Gap_Array, char, array,
+ ga->elsize * (ga->numels + ga->gapsize)),
+ ovstats);
}
+static Bytecount
+compute_extent_list_marker_usage (Extent_List_Marker *markers,
+ struct overhead_stats *ovstats)
+{
+ Bytecount val = 0;
+
+ while (markers)
+ {
+ val += malloced_storage_size (markers, sizeof (*markers), ovstats);
+ markers = markers->next;
+ }
+
+ return val;
+}
+
+static Bytecount
+compute_extent_list_usage (Extent_List *el, struct overhead_stats *ovstats)
+{
+ Bytecount val = 0;
+
+ val += compute_gap_array_usage (el->start, ovstats);
+ val += compute_gap_array_usage (el->end, ovstats);
+ val += compute_extent_list_marker_usage (el->markers, ovstats);
+ val += malloced_storage_size (el, sizeof (*el), ovstats);
+
+ return val;
+}
+
+static Bytecount
+compute_stack_of_extents_usage (Stack_Of_Extents *s,
+ struct overhead_stats *ovstats)
+{
+ Bytecount val = 0;
+
+ val += compute_extent_list_usage (s->extents, ovstats);
+ val += malloced_storage_size (s, sizeof (*s), ovstats);
+
+ return val;
+}
+
+static double
+compute_extent_info_usage (struct extent_info *e,
+ struct overhead_stats *ovstats)
+{
+ double val = 0;
+ int i;
+ Elemcount extent = 0, aux = 0, cons = 0;
+ Extent_List *el = e->extents;
+
+ val += compute_extent_list_usage (e->extents, ovstats);
+ val += compute_stack_of_extents_usage (e->soe, ovstats);
+ val += malloced_storage_size (e, sizeof (*e), ovstats);
+
+ for (i = 0; i < extent_list_num_els (el); i++)
+ {
+ compute_extent_usage (extent_list_at (el, i, 0), &extent, &aux,
+ &cons, ovstats);
+ }
+
+ val += compute_fixed_type_block_usage (extent, sizeof (struct extent),
+ ovstats);
+ val += compute_fixed_type_block_usage (aux, sizeof (struct extent_auxiliary),
+ ovstats);
+ val += compute_fixed_type_block_usage (extent, sizeof (Lisp_Cons),
+ ovstats);
+
+ return val;
+}
+
+double
+compute_buffer_extent_usage (struct buffer *b, struct overhead_stats *ovstats)
+{
+ return compute_extent_info_usage (XEXTENT_INFO (b->extent_info),
+ ovstats);
+}
+
#endif /* MEMORY_USAGE_STATS */
@@ -7300,6 +7755,7 @@
DEFSYMBOL (Qstart_and_end_in_region);
DEFSYMBOL (Qstart_or_end_in_region);
DEFSYMBOL (Qnegate_in_region);
+ DEFSYMBOL (Qdisjoint);
DEFSYMBOL (Qdetached);
DEFSYMBOL (Qdestroyed);
@@ -7326,12 +7782,13 @@
DEFSYMBOL (Qinside_margin);
DEFSYMBOL (Qwhitespace);
/* Qtext defined in general.c */
+ DEFSYMBOL (Qfront_sticky);
+ DEFSYMBOL (Qrear_nonsticky);
DEFSYMBOL (Qpaste_function);
DEFSYMBOL (Qcopy_function);
DEFSYMBOL (Qtext_prop);
- DEFSYMBOL (Qtext_prop_extent_paste_function);
DEFSUBR (Fextentp);
DEFSUBR (Fextent_live_p);
@@ -7361,24 +7818,15 @@
DEFSUBR (Fextent_in_region_p);
DEFSUBR (Fmap_extents);
- DEFSUBR (Fmap_extent_children);
DEFSUBR (Fextent_at);
DEFSUBR (Fextents_at);
- DEFSUBR (Fset_extent_initial_redisplay_function);
DEFSUBR (Fextent_face);
- DEFSUBR (Fset_extent_face);
DEFSUBR (Fextent_mouse_face);
- DEFSUBR (Fset_extent_mouse_face);
- DEFSUBR (Fset_extent_begin_glyph);
- DEFSUBR (Fset_extent_end_glyph);
DEFSUBR (Fextent_begin_glyph);
DEFSUBR (Fextent_end_glyph);
- DEFSUBR (Fset_extent_begin_glyph_layout);
- DEFSUBR (Fset_extent_end_glyph_layout);
DEFSUBR (Fextent_begin_glyph_layout);
DEFSUBR (Fextent_end_glyph_layout);
- DEFSUBR (Fset_extent_priority);
DEFSUBR (Fextent_priority);
DEFSUBR (Fset_extent_property);
DEFSUBR (Fset_extent_properties);
@@ -7396,8 +7844,8 @@
DEFSUBR (Fput_nonduplicable_text_property);
DEFSUBR (Fadd_text_properties);
DEFSUBR (Fadd_nonduplicable_text_properties);
+ DEFSUBR (Fset_text_properties);
DEFSUBR (Fremove_text_properties);
- DEFSUBR (Ftext_prop_extent_paste_function);
DEFSUBR (Fnext_single_property_change);
DEFSUBR (Fprevious_single_property_change);
DEFSUBR (Fnext_single_char_property_change);
@@ -7412,6 +7860,7 @@
extent_auxiliary_defaults.parent = Qnil;
extent_auxiliary_defaults.children = Qnil;
extent_auxiliary_defaults.priority = 0;
+ extent_auxiliary_defaults.duplicable = Qnil;
extent_auxiliary_defaults.invisible = Qnil;
extent_auxiliary_defaults.read_only = Qnil;
extent_auxiliary_defaults.mouse_face = Qnil;
@@ -7426,15 +7875,27 @@
DEFVAR_INT ("mouse-highlight-priority", &mouse_highlight_priority /*
The priority to use for the mouse-highlighting pseudo-extent
that is used to highlight extents with the `mouse-face' attribute set.
-See `set-extent-priority'.
+See `set-extent-property'.
*/ );
/* Set mouse-highlight-priority (which ends up being used both for the
mouse-highlighting pseudo-extent and the primary selection extent)
to a very high value because very few extents should override it.
- 1000 gives lots of room below it for different-prioritized extents.
+ 100000 gives lots of room below it for different-prioritized extents.
10 doesn't. ediff, for example, likes to use priorities around 100.
--ben */
- mouse_highlight_priority = /* 10 */ 1000;
+ mouse_highlight_priority = /* 10 */ 100000;
+
+ DEFVAR_LISP ("text-property-default-nonsticky",
+ &Vtext_property_default_nonsticky /*
+Alist of properties vs the corresponding non-stickinesses.
+Each element has the form (PROPERTY . NONSTICKINESS).
+
+If a character in a buffer has PROPERTY, new text inserted adjacent to
+the character doesn't inherit PROPERTY if NONSTICKINESS is non-nil,
+inherits it if NONSTICKINESS is nil. The front-sticky and
+rear-nonsticky properties of the character overrides NONSTICKINESS.
+*/ );
+ Vtext_property_default_nonsticky = Qnil;
DEFVAR_LISP ("default-text-properties", &Vdefault_text_properties /*
Property list giving default values for text properties.
1.19.2.1 +43 -18 XEmacs/xemacs/src/extents.h
Index: extents.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/extents.h,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- extents.h 2005/01/26 05:11:12 1.19
+++ extents.h 2005/02/15 01:20:15 1.19.2.1
@@ -1,5 +1,5 @@
/* Copyright (c) 1994, 1995 Free Software Foundation.
- Copyright (c) 1995, 1996, 2002 Ben Wing.
+ Copyright (c) 1995, 1996, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -60,16 +60,13 @@
struct extent;
-void set_extent_endpoints (EXTENT extent, Bytexpos s, Bytexpos e,
- Lisp_Object object);
+void set_extent_endpoints_byte (EXTENT extent, Bytexpos s, Bytexpos e,
+ Lisp_Object object);
void flush_cached_extent_info (Lisp_Object extent_info);
-void set_extent_glyph (EXTENT extent, Lisp_Object glyph, int endp,
- glyph_layout layout);
-
/* flags for map_extents() and friends */
#define ME_END_CLOSED (1 << 0)
#define ME_START_OPEN (1 << 1)
@@ -84,12 +81,13 @@
#define ME_START_OR_END_IN_REGION (4 << 5)
#define ME_IN_REGION_MASK (7 << 5)
#define ME_NEGATE_IN_REGION (1 << 8)
+#define ME_DISJOINT (1 << 9)
/* the following flags are internal-only */
-#define ME_INCLUDE_INTERNAL (1 << 9)
-#define ME_MIGHT_THROW (1 << 10)
-#define ME_MIGHT_MODIFY_TEXT (1 << 11)
-#define ME_MIGHT_MODIFY_EXTENTS (1 << 12)
-#define ME_MIGHT_MOVE_SOE (1 << 13)
+#define ME_INCLUDE_INTERNAL (1 << 16)
+#define ME_MIGHT_THROW (1 << 17)
+#define ME_MIGHT_MODIFY_TEXT (1 << 18)
+#define ME_MIGHT_MODIFY_EXTENTS (1 << 19)
+#define ME_MIGHT_MOVE_SOE (1 << 20)
#define ME_MIGHT_CALL_ELISP (ME_MIGHT_THROW | ME_MIGHT_MODIFY_TEXT | \
ME_MIGHT_MODIFY_EXTENTS | ME_MIGHT_MOVE_SOE)
@@ -125,6 +123,13 @@
Bytexpos extent_endpoint_byte (EXTENT extent, int endp);
Charxpos extent_endpoint_char (EXTENT extent, int endp);
+
+#define extent_start_byte(e) extent_endpoint_byte (e, 0)
+#define extent_end_byte(e) extent_endpoint_byte (e, 1)
+
+#define extent_start_char(e) extent_endpoint_char (e, 0)
+#define extent_end_char(e) extent_endpoint_char (e, 1)
+
Bytexpos next_previous_single_property_change (Bytexpos pos, Lisp_Object prop,
Lisp_Object object,
Bytexpos limit,
@@ -145,14 +150,20 @@
Bytexpos opoint, Bytecount length);
void process_extents_for_deletion (Lisp_Object object, Bytexpos from,
Bytexpos to, int destroy_them);
+void handle_sticky_properties (struct buffer *buf, Bytebpos start,
+ Bytebpos end, int inherit);
/* Note the following function is in Charbpos's */
void report_extent_modification (Lisp_Object buffer, Charbpos start,
Charbpos end, int afterp);
-void add_string_extents (Lisp_Object string, struct buffer *buf,
- Bytexpos opoint, Bytecount length);
-void splice_in_string_extents (Lisp_Object string, struct buffer *buf,
- Bytexpos opoint, Bytecount length,
- Bytecount pos);
+
+#define RUN_NO_FUNCTION 0
+#define RUN_COPY_HOOK 1
+#define RUN_PASTE_HOOK 2
+
+void copy_extents_between_objects (Lisp_Object object, Bytexpos pos,
+ Bytecount len, Lisp_Object newobj,
+ Bytexpos newpos, int run_function);
+
void copy_string_extents (Lisp_Object new_string,
Lisp_Object old_string,
Bytecount new_pos, Bytecount old_pos,
@@ -182,8 +193,22 @@
#endif
#ifdef MEMORY_USAGE_STATS
-int compute_buffer_extent_usage (struct buffer *b,
- struct overhead_stats *ovstats);
+double compute_buffer_extent_usage (struct buffer *b,
+ struct overhead_stats *ovstats);
#endif
+
+/* If NEW_TEXT_PROPERTY_MODEL is defined, the new implementation of
+ text properties in extents.c is used. This is a more efficient
+ implementation that follows the FSF way of doing things; in the
+ process it also properly implements the FSF properties of front-sticky
+ and rear-sticky. See the comment above put_text_prop_mapper().
+
+ #### NOTE: It appers that the new code doesn't quite work currently.
+ It hits an abort in sledgehammer_text_property_check(). I don't know
+ if the code used to work properly and then I changed something and was
+ in the middle of this when work stopped, or if I simply never got it
+ working right.
+*/
+/* #define NEW_TEXT_PROPERTY_MODEL */
#endif /* INCLUDED_extents_h_ */
1.44.2.1 +2 -2 XEmacs/xemacs/src/faces.c
Index: faces.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/faces.c,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -r1.44 -r1.44.2.1
--- faces.c 2005/01/24 23:33:54 1.44
+++ faces.c 2005/02/15 01:20:16 1.44.2.1
@@ -1483,11 +1483,11 @@
#ifdef MEMORY_USAGE_STATS
-int
+Bytecount
compute_face_cachel_usage (face_cachel_dynarr *face_cachels,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
if (face_cachels)
{
1.12.10.1 +2 -2 XEmacs/xemacs/src/faces.h
Index: faces.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/faces.h,v
retrieving revision 1.12
retrieving revision 1.12.10.1
diff -u -r1.12 -r1.12.10.1
--- faces.h 2002/03/29 04:47:31 1.12
+++ faces.h 2005/02/15 01:20:16 1.12.10.1
@@ -248,8 +248,8 @@
face_index get_builtin_face_cache_index (struct window *w,
Lisp_Object face);
#ifdef MEMORY_USAGE_STATS
-int compute_face_cachel_usage (face_cachel_dynarr *face_cachels,
- struct overhead_stats *ovstats);
+Bytecount compute_face_cachel_usage (face_cachel_dynarr *face_cachels,
+ struct overhead_stats *ovstats);
#endif /* MEMORY_USAGE_STATS */
EXFUN (Fface_name, 1);
1.44.2.1 +11 -0 XEmacs/xemacs/src/file-coding.c
Index: file-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/file-coding.c,v
retrieving revision 1.44
retrieving revision 1.44.2.1
diff -u -r1.44 -r1.44.2.1
--- file-coding.c 2005/02/03 16:14:06 1.44
+++ file-coding.c 2005/02/15 01:20:17 1.44.2.1
@@ -1321,6 +1321,7 @@
be used with UTF-8. That is the term used in the standard. ]]
+
The following additional properties are recognized if TYPE is
'mswindows-multibyte:
@@ -1944,6 +1945,15 @@
}
static int
+coding_can_gc_p (Lstream *stream, int write_p)
+{
+ /* #### In fact, we should be smarter. It seems that we can GC if either
+ our converter can GC or if reading from/writing to the other end can
+ GC. We should have a coding-system method for the former. */
+ return 1;
+}
+
+static int
coding_rewinder (Lstream *stream)
{
struct coding_stream *str = CODING_STREAM_DATA (stream);
@@ -4450,6 +4460,7 @@
LSTREAM_HAS_METHOD (coding, rewinder);
LSTREAM_HAS_METHOD (coding, seekable_p);
LSTREAM_HAS_METHOD (coding, marker);
+ LSTREAM_HAS_METHOD (coding, can_gc_p);
LSTREAM_HAS_METHOD (coding, flusher);
LSTREAM_HAS_METHOD (coding, closer);
LSTREAM_HAS_METHOD (coding, finalizer);
1.104.2.1 +7 -8 XEmacs/xemacs/src/fileio.c
Index: fileio.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fileio.c,v
retrieving revision 1.104
retrieving revision 1.104.2.1
diff -u -r1.104 -r1.104.2.1
--- fileio.c 2005/01/28 02:36:24 1.104
+++ fileio.c 2005/02/15 01:20:18 1.104.2.1
@@ -4136,19 +4136,18 @@
const Extbyte *auto_save_file_name_ext;
Bytecount auto_save_file_name_ext_len;
- TO_EXTERNAL_FORMAT (LISP_STRING, b->auto_save_file_name,
- ALLOCA, (auto_save_file_name_ext,
- auto_save_file_name_ext_len),
- Qescape_quoted);
+ LISP_STRING_TO_SIZED_EXTERNAL (b->auto_save_file_name,
+ auto_save_file_name_ext,
+ auto_save_file_name_ext_len,
+ Qescape_quoted);
if (!NILP (b->filename))
{
const Extbyte *filename_ext;
Bytecount filename_ext_len;
- TO_EXTERNAL_FORMAT (LISP_STRING, b->filename,
- ALLOCA, (filename_ext,
- filename_ext_len),
- Qescape_quoted);
+ LISP_STRING_TO_SIZED_EXTERNAL (b->filename, filename_ext,
+ filename_ext_len,
+ Qescape_quoted);
retry_write (listdesc, filename_ext, filename_ext_len);
}
retry_write (listdesc, "\n", 1);
1.22.4.1 +3 -3 XEmacs/xemacs/src/floatfns.c
Index: floatfns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/floatfns.c,v
retrieving revision 1.22
retrieving revision 1.22.4.1
diff -u -r1.22 -r1.22.4.1
--- floatfns.c 2004/09/20 19:19:43 1.22
+++ floatfns.c 2005/02/15 01:20:20 1.22.4.1
@@ -74,7 +74,7 @@
/* If an argument is out of range for a mathematical function,
here is the actual argument value to use in the error message. */
static Lisp_Object float_error_arg, float_error_arg2;
-static const char *float_error_fn_name;
+static const Ascbyte *float_error_fn_name;
/* Evaluate the floating point expression D, recording NUM
as the original argument for error messages.
@@ -124,10 +124,10 @@
static Lisp_Object
float_to_int (double x,
#ifdef HAVE_BIGNUM
- const char *UNUSED (name), Lisp_Object UNUSED (num),
+ const Ascbyte *UNUSED (name), Lisp_Object UNUSED (num),
Lisp_Object UNUSED (num2)
#else
- const char *name, Lisp_Object num, Lisp_Object num2
+ const Ascbyte *name, Lisp_Object num, Lisp_Object num2
#endif
)
{
1.62.2.1 +6 -7 XEmacs/xemacs/src/fns.c
Index: fns.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fns.c,v
retrieving revision 1.62
retrieving revision 1.62.2.1
diff -u -r1.62 -r1.62.2.1
--- fns.c 2005/01/24 23:33:55 1.62
+++ fns.c 2005/02/15 01:20:21 1.62.2.1
@@ -845,9 +845,10 @@
for (argnum = 0; argnum < nargs; argnum++)
{
if (STRINGP (args_mse[argnum].string))
- copy_string_extents (val, args_mse[argnum].string,
- args_mse[argnum].entry_offset, 0,
- args_mse[argnum].entry_length);
+ copy_extents_between_objects (args_mse[argnum].string,
+ 0, args_mse[argnum].entry_length,
+ val, args_mse[argnum].entry_offset,
+ RUN_NO_FUNCTION);
}
}
@@ -954,7 +955,7 @@
blen = string_offset_char_to_byte_len (string, bstart, ccend - ccstart);
val = make_string (XSTRING_DATA (string) + bstart, blen);
/* Copy any applicable extent information into the new string. */
- copy_string_extents (val, string, 0, bstart, blen);
+ copy_extents_between_objects (string, bstart, blen, val, 0, RUN_NO_FUNCTION);
return val;
}
@@ -1078,7 +1079,7 @@
if (!path)
return Qnil;
- TO_INTERNAL_FORMAT (C_STRING, path, ALLOCA, (newpath, newlen), Qfile_name);
+ EXTERNAL_TO_SIZED_C_STRING (path, newpath, newlen, Qfile_name);
/* #### Does this make sense? It certainly does for
split_env_path(), but it looks dubious here. Does any code
@@ -1439,7 +1440,6 @@
*/
(key, alist))
{
- /* This function can GC. */
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, alist)
{
if (internal_equal (key, elt_car, 0))
@@ -1454,7 +1454,6 @@
*/
(key, alist))
{
- /* This function can GC. */
EXTERNAL_ALIST_LOOP_4 (elt, elt_car, elt_cdr, alist)
{
if (internal_old_equal (key, elt_car, 0))
1.20.2.1 +228 -206 XEmacs/xemacs/src/frame-gtk.c
Index: frame-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-gtk.c,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -r1.20 -r1.20.2.1
--- frame-gtk.c 2005/01/24 23:33:56 1.20
+++ frame-gtk.c 2005/02/15 01:20:22 1.20.2.1
@@ -325,14 +325,14 @@
if (!byte_ascii_p (*ptr))
{
char *tmp;
- C_STRING_TO_EXTERNAL (value, tmp, Qctext);
+ C_STRING_TO_EXTERNAL (value, tmp, Vgtk_text_encoding);
the_text = tmp;
break;
}
}
#endif /* MULE */
- (*func) (arg, (gchar *) the_text);
+ (*func) (arg, the_text);
}
static void
@@ -340,16 +340,18 @@
{
if (GTK_IS_WINDOW (FRAME_GTK_SHELL_WIDGET (f)))
gtk_set_frame_text_value (f, name,
- (void (*)(gpointer, gchar *))
- gtk_window_set_title, FRAME_GTK_SHELL_WIDGET (f));
+ (void (*) (gpointer, gchar *))
+ gtk_window_set_title,
+ FRAME_GTK_SHELL_WIDGET (f));
}
static void
gtk_set_icon_name_from_ibyte (struct frame *f, Ibyte *name)
{
gtk_set_frame_text_value (f, name,
- (void (*)(gpointer, gchar *))
- gdk_window_set_icon_name, FRAME_GTK_SHELL_WIDGET (f)->window);
+ (void (*) (gpointer, gchar *))
+ gdk_window_set_icon_name,
+ FRAME_GTK_SHELL_WIDGET (f)->window);
}
/* Set the initial frame size as specified. This function is used
@@ -366,11 +368,14 @@
{
GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC;
/* Deal with the cell size */
- default_face_height_and_width (wrap_frame (f), &geometry.height_inc,
&geometry.width_inc);
+ default_face_height_and_width (wrap_frame (f), &geometry.height_inc,
+ &geometry.width_inc);
gtk_window_set_geometry_hints (GTK_WINDOW (shell),
- FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask);
- gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0,
GDK_HINT_POS);
+ FRAME_GTK_TEXT_WIDGET (f), &geometry,
+ geometry_mask);
+ gdk_window_set_hints (GET_GTK_WIDGET_WINDOW (shell), x, y, 0, 0, 0, 0,
+ GDK_HINT_POS);
gtk_window_set_policy (GTK_WINDOW (shell), TRUE, TRUE, FALSE);
}
@@ -409,10 +414,10 @@
if (SYMBOLP (prop))
{
if (EQ (prop, Qfont))
- {
+ {
/* If the value is not a string we silently ignore it. */
if (STRINGP (val))
- {
+ {
Lisp_Object frm, font_spec;
frm = wrap_frame (f);
@@ -420,46 +425,47 @@
Fadd_spec_to_specifier (font_spec, val, frm, Qnil, Qnil);
update_frame_face_values (f);
- }
+ }
continue;
- }
+ }
else if (EQ (prop, Qwidth))
- {
+ {
CHECK_INT (val);
width = XINT (val);
width_specified_p = TRUE;
continue;
- }
+ }
else if (EQ (prop, Qheight))
- {
+ {
CHECK_INT (val);
height = XINT (val);
height_specified_p = TRUE;
continue;
- }
+ }
/* Further kludge the x/y. */
else if (EQ (prop, Qx))
- {
+ {
CHECK_INT (val);
x = (gint) XINT (val);
x_position_specified_p = TRUE;
continue;
- }
+ }
else if (EQ (prop, Qy))
- {
+ {
CHECK_INT (val);
y = (gint) XINT (val);
y_position_specified_p = TRUE;
continue;
- }
+ }
}
}
/* Kludge kludge kludge. We need to deal with the size and position
- specially. */
+ specially. */
{
int size_specified_p = width_specified_p || height_specified_p;
- int position_specified_p = x_position_specified_p || y_position_specified_p;
+ int position_specified_p =
+ x_position_specified_p || y_position_specified_p;
if (!width_specified_p)
width = 80;
@@ -473,8 +479,10 @@
gint dummy;
GtkWidget *shell = FRAME_GTK_SHELL_WIDGET (f);
gdk_window_get_deskrelative_origin (GET_GTK_WIDGET_WINDOW (shell),
- (x_position_specified_p ? &dummy : &x),
- (y_position_specified_p ? &dummy : &y));
+ (x_position_specified_p ? &dummy :
+ &x),
+ (y_position_specified_p ? &dummy :
+ &y));
}
if (!f->init_finished)
@@ -511,20 +519,26 @@
extern Lisp_Object Vgtk_initial_geometry;
#ifndef HAVE_GNOME
+
+/* These functions work with external data because they mimic functions
+ that exist as library functions when HAVE_GNOME is defined. */
+
static int
-get_number (const char **geometry)
+get_number (const gchar **geometry)
{
int value = 0;
int mult = 1;
- if (**geometry == '-'){
- mult = -1;
- (*geometry)++;
- }
- while (**geometry && isdigit (**geometry)){
- value = value * 10 + (**geometry - '0');
- (*geometry)++;
- }
+ if (**geometry == '-')
+ {
+ mult = -1;
+ (*geometry)++;
+ }
+ while (**geometry && isdigit (**geometry))
+ {
+ value = value * 10 + (**geometry - '0');
+ (*geometry)++;
+ }
return value * mult;
}
@@ -574,32 +588,41 @@
*width = get_number (&geometry);
if (!*geometry)
return TRUE;
- if (*geometry == 'x' || *geometry == 'X'){
- geometry++;
- *height = get_number (&geometry);
- }
+ if (*geometry == 'x' || *geometry == 'X')
+ {
+ geometry++;
+ *height = get_number (&geometry);
+ }
if (!*geometry)
return 1;
- if (*geometry == '+'){
- subtract = 0;
- geometry++;
- } else if (*geometry == '-'){
- subtract = gdk_screen_width ();
- geometry++;
- } else
+ if (*geometry == '+')
+ {
+ subtract = 0;
+ geometry++;
+ }
+ else if (*geometry == '-')
+ {
+ subtract = gdk_screen_width ();
+ geometry++;
+ }
+ else
return FALSE;
*xpos = get_number (&geometry);
if (subtract)
*xpos = subtract - *xpos;
if (!*geometry)
return TRUE;
- if (*geometry == '+'){
- subtract = 0;
- geometry++;
- } else if (*geometry == '-'){
- subtract = gdk_screen_height ();
- geometry++;
- } else
+ if (*geometry == '+')
+ {
+ subtract = 0;
+ geometry++;
+ }
+ else if (*geometry == '-')
+ {
+ subtract = gdk_screen_height ();
+ geometry++;
+ }
+ else
return FALSE;
*ypos = get_number (&geometry);
if (subtract)
@@ -615,7 +638,9 @@
if (STRINGP (Vgtk_initial_geometry))
{
- if (!gnome_parse_geometry ((char*) XSTRING_DATA (Vgtk_initial_geometry),
&x,&y,&w,&h))
+ if (!gnome_parse_geometry (LISP_STRING_TO_GTK_TEXT
+ (Vgtk_initial_geometry),
+ &x, &y, &w, &h))
{
x = y = 10;
w = 80;
@@ -676,12 +701,13 @@
return (TRUE);
}
-extern gboolean emacs_shell_event_handler (GtkWidget *wid, GdkEvent *event, gpointer
closure);
+extern gboolean emacs_shell_event_handler (GtkWidget *wid, GdkEvent *event,
+ gpointer closure);
extern Lisp_Object build_gtk_object (GtkObject *obj);
#ifndef GNOME_IS_APP
#define GNOME_IS_APP(x) 0
-#define gnome_app_set_contents(x,y) 0
+#define gnome_app_set_contents(x,y)
#endif
static void
@@ -723,7 +749,7 @@
gpointer UNUSED (user_data))
{
gtk_selection_data_set (data, GDK_SELECTION_TYPE_STRING, 8,
- DRAG_SELECTION_DATA_ERROR,
+ (guchar *) DRAG_SELECTION_DATA_ERROR,
strlen (DRAG_SELECTION_DATA_ERROR));
switch (info)
@@ -731,15 +757,18 @@
case TARGET_TYPE_STRING:
{
Lisp_Object string = Vcurrent_drag_object;
+ guchar *strext;
+ Bytecount strextlen;
if (!STRINGP (Vcurrent_drag_object))
- {
- string = Fprin1_to_string (string, Qnil);
- /* Convert to a string */
- }
+ /* Convert to a string */
+ string = Fprin1_to_string (string, Qnil);
+
+ LISP_STRING_TO_SIZED_EXTERNAL (string, strext, strextlen,
+ Vgtk_text_encoding);
gtk_selection_data_set (data, GDK_SELECTION_TYPE_STRING,
- 8, XSTRING_DATA (string), XSTRING_LENGTH (string));
+ 8, strext, strextlen);
}
break;
case TARGET_TYPE_URI_LIST:
@@ -752,28 +781,32 @@
DEFUN ("gtk-start-drag-internal", Fgtk_start_drag_internal, 2, 3, 0, /*
Start a GTK drag from a buffer.
-First arg is the event that started the drag,
-second arg should be some string, and the third
-is the type of the data (this should be a MIME type as a string (ie: text/plain)).
-The type defaults to text/plain.
+First arg is the event that started the drag, second arg should be some
+string, and the third is the type of the data (this should be a MIME type
+as a string, e.g. `text/plain'). The type defaults to text/plain.
*/
(event, data, dtyp))
{
- if (EVENTP(event))
+ if (EVENTP (event))
{
struct frame *f = decode_gtk_frame (Fselected_frame (Qnil));
GtkWidget *wid = FRAME_GTK_TEXT_WIDGET (f);
- struct Lisp_Event *lisp_event = XEVENT(event);
+ struct Lisp_Event *lisp_event = XEVENT (event);
GdkAtom dnd_typ;
- GtkTargetList *tl = gtk_target_list_new (dnd_target_table, dnd_n_targets);
+ GtkTargetList *tl = gtk_target_list_new (dnd_target_table,
+ dnd_n_targets);
/* only drag if this is really a press */
- if (EVENT_TYPE(lisp_event) != button_press_event)
+ if (EVENT_TYPE (lisp_event) != button_press_event)
return Qnil;
/* get the desired type */
if (!NILP (dtyp) && STRINGP (dtyp))
- dnd_typ = gdk_atom_intern (XSTRING_DATA (dtyp), FALSE);
+ {
+ Extbyte *dtypext;
+ LISP_STRING_TO_EXTERNAL (dtyp, dtypext, Vgtk_text_encoding);
+ dnd_typ = gdk_atom_intern (dtypext, FALSE);
+ }
gtk_drag_begin (wid, tl, GDK_ACTION_COPY,
EVENT_BUTTON_BUTTON (lisp_event), NULL);
@@ -794,18 +827,24 @@
done by gtk_popup_frame().)
*/
static void
-gtk_create_widgets (struct frame *f, Lisp_Object lisp_window_id, Lisp_Object parent)
+gtk_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
+ Lisp_Object parent, int no_title_bar)
{
- const char *name;
+ const Extbyte *name;
GtkWidget *text, *container, *shell;
gboolean embedded_p = !NILP (lisp_window_id);
#ifdef HAVE_MENUBARS
int menubar_visible;
#endif
+ int popup = !NILP (parent); /* #### implement me! */
+
+ if (EQ (parent, Qt))
+ parent = Qnil;
if (STRINGP (f->name))
- TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, name, Qctext);
+ LISP_STRING_TO_EXTERNAL (f->name, name, Vgtk_text_encoding);
else
+ /* #### not used */
name = "emacs";
FRAME_GTK_TOP_LEVEL_FRAME_P (f) = 1;
@@ -816,13 +855,15 @@
if (!GTK_IS_CONTAINER (XGTK_OBJECT (lisp_window_id)->object))
{
- invalid_argument ("Window ID must be a GtkContainer subclass",
lisp_window_id);
+ invalid_argument ("Window ID must be a GtkContainer subclass",
+ lisp_window_id);
}
shell = gtk_vbox_new (FALSE, 0);
gtk_object_weakref (GTK_OBJECT (shell), cleanup_deleted_frame, f);
- gtk_container_add (GTK_CONTAINER (XGTK_OBJECT (lisp_window_id)->object),
shell);
+ gtk_container_add (GTK_CONTAINER (XGTK_OBJECT (lisp_window_id)->object),
+ shell);
}
else
{
@@ -834,11 +875,17 @@
}
if (!NILP (parent))
- {
+ {
+ /* the generic code checked that the frame is on the correct
+ device */
+ CHECK_FRAME (parent);
+
/* If this is a transient window, keep the parent info around */
GtkWidget *parentwid = FRAME_GTK_SHELL_WIDGET (XFRAME (parent));
- gtk_object_set_data (GTK_OBJECT (shell), TRANSIENT_DATA_IDENTIFIER, parentwid);
- gtk_window_set_transient_for (GTK_WINDOW (shell), GTK_WINDOW (parentwid));
+ gtk_object_set_data (GTK_OBJECT (shell), TRANSIENT_DATA_IDENTIFIER,
+ parentwid);
+ gtk_window_set_transient_for (GTK_WINDOW (shell),
+ GTK_WINDOW (parentwid));
}
gtk_container_set_border_width (GTK_CONTAINER (shell), 0);
@@ -860,9 +907,12 @@
FRAME_GTK_TEXT_WIDGET (f) = text;
#ifdef HAVE_DRAGNDROP
- gtk_drag_dest_set (text, GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT,
+ gtk_drag_dest_set (text,
+ (GtkDestDefaults)
+ (GTK_DEST_DEFAULT_MOTION | GTK_DEST_DEFAULT_HIGHLIGHT),
dnd_target_table, dnd_n_targets,
- GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_ASK);
+ (GdkDragAction)
+ (GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_ASK));
gtk_signal_connect (GTK_OBJECT (text), "drag_drop",
GTK_SIGNAL_FUNC (dragndrop_dropped), text);
gtk_signal_connect (GTK_OBJECT (text), "drag_data_received",
@@ -876,9 +926,7 @@
menubar_visible = gtk_initialize_frame_menubar (f);
if (menubar_visible)
- {
- gtk_widget_show_all (FRAME_GTK_MENUBAR_WIDGET (f));
- }
+ gtk_widget_show_all (FRAME_GTK_MENUBAR_WIDGET (f));
#endif /* HAVE_MENUBARS */
if (GNOME_IS_APP (shell))
@@ -890,23 +938,24 @@
gtk_box_pack_end (GTK_BOX (container), text, TRUE, TRUE, 0);
/* Connect main event handler */
- gtk_signal_connect (GTK_OBJECT (shell), "delete-event", GTK_SIGNAL_FUNC
(delete_event_cb), f);
+ gtk_signal_connect (GTK_OBJECT (shell), "delete-event",
+ GTK_SIGNAL_FUNC (delete_event_cb), f);
{
- static char *events_to_frob[] = { "focus-in-event",
- "focus-out-event",
- "enter-notify-event",
- "leave-notify-event",
- "map-event",
- "unmap-event",
- "property-notify-event",
- "selection-clear-event",
- "selection-request-event",
- "selection-notify-event",
- "client-event",
- /* "configure-event", */
- "visibility-notify-event",
- NULL };
+ static Ascbyte *events_to_frob[] = { "focus-in-event",
+ "focus-out-event",
+ "enter-notify-event",
+ "leave-notify-event",
+ "map-event",
+ "unmap-event",
+ "property-notify-event",
+ "selection-clear-event",
+ "selection-request-event",
+ "selection-notify-event",
+ "client-event",
+ /* "configure-event", */
+ "visibility-notify-event",
+ NULL };
int i;
for (i = 0; events_to_frob[i]; i++)
@@ -916,10 +965,12 @@
}
}
- gtk_signal_connect (GTK_OBJECT (shell), "size-allocate", GTK_SIGNAL_FUNC
(resize_event_cb), f);
+ gtk_signal_connect (GTK_OBJECT (shell), "size-allocate",
+ GTK_SIGNAL_FUNC (resize_event_cb), f);
/* This might be safe to call now... */
- /* gtk_signal_connect (GTK_OBJECT (shell), "event", GTK_SIGNAL_FUNC
(emacs_shell_event_handler), f); */
+ /* gtk_signal_connect (GTK_OBJECT (shell), "event",
+ GTK_SIGNAL_FUNC (emacs_shell_event_handler), f); */
/* Let's make sure we get all the events we can */
gtk_widget_set_events (text, GDK_ALL_EVENTS_MASK);
@@ -998,22 +1049,6 @@
int UNUSED (frame_name_is_defaulted))
{
/* This function can GC */
- Lisp_Object initially_unmapped;
- Lisp_Object device = FRAME_DEVICE (f);
- Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil);
- Lisp_Object popup = Fplist_get (props, Qpopup, Qnil);
-
- if (!NILP (popup))
- {
- if (EQ (popup, Qt))
- popup = Fselected_frame (device);
- CHECK_LIVE_FRAME (popup);
- if (!EQ (device, FRAME_DEVICE (XFRAME (popup))))
- invalid_argument_2 ("Parent must be on same device as frame",
- device, popup);
- }
-
- initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil);
/*
* Previously we set this only if NILP (DEVICE_SELECTED_FRAME (d))
@@ -1028,9 +1063,11 @@
f->visible = 1;
allocate_gtk_frame_struct (f);
- gtk_create_widgets (f, lisp_window_id, popup);
+ gtk_create_widgets (f, Fplist_get (props, Qwindow_id, Qnil),
+ Fplist_get (props, Qpopup, Qnil),
+ !NILP (Fplist_get (props, Qno_title_bar, Qnil)));
- if (!NILP (initially_unmapped))
+ if (!NILP (Fplist_get (props, Qinitially_unmapped, Qnil)))
{
gtk_object_set_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)),
UNMAPPED_DATA_IDENTIFIER, (gpointer) 1);
@@ -1095,7 +1132,8 @@
gtk_mask = 0;
}
- gdk_window_set_icon (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f)), NULL,
gtk_pixmap, gtk_mask);
+ gdk_window_set_icon (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f)),
+ NULL, gtk_pixmap, gtk_mask);
}
static void
@@ -1119,21 +1157,23 @@
static Lisp_Object
gtk_get_frame_parent (struct frame *f)
{
- GtkWidget *parentwid = (GtkWidget*) gtk_object_get_data (GTK_OBJECT
(FRAME_GTK_SHELL_WIDGET (f)),
- TRANSIENT_DATA_IDENTIFIER);
+ GtkWidget *parentwid =
+ (GtkWidget *)
+ gtk_object_get_data (GTK_OBJECT (FRAME_GTK_SHELL_WIDGET (f)),
+ TRANSIENT_DATA_IDENTIFIER);
- /* find the frame whose wid is parentwid */
- if (parentwid)
+ /* find the frame whose wid is parentwid */
+ if (parentwid)
{
- Lisp_Object frmcons;
- DEVICE_FRAME_LOOP (frmcons, XDEVICE (FRAME_DEVICE (f)))
- {
- Lisp_Object frame = XCAR (frmcons);
- if (FRAME_GTK_SHELL_WIDGET (XFRAME (frame)) == parentwid)
- return frame;
- }
+ Lisp_Object frmcons;
+ DEVICE_FRAME_LOOP (frmcons, XDEVICE (FRAME_DEVICE (f)))
+ {
+ Lisp_Object frame = XCAR (frmcons);
+ if (FRAME_GTK_SHELL_WIDGET (XFRAME (frame)) == parentwid)
+ return frame;
+ }
}
- return Qnil;
+ return Qnil;
}
#ifdef STUPID_X_SPECIFIC_GTK_STUFF
@@ -1145,11 +1185,13 @@
*/
(frame))
{
- char str[255];
+ Ascbyte str[255];
struct frame *f = decode_gtk_frame (frame);
- /* Arrrrggghhh... this defeats the whole purpose of using Gdk... do we really need
this? */
- sprintf (str, "%lu", GDK_WINDOW_XWINDOW( GET_GTK_WIDGET_WINDOW
(FRAME_GTK_TEXT_WIDGET (f))));
+ /* Arrrrggghhh... this defeats the whole purpose of using Gdk... do we
+ really need this? */
+ sprintf (str, "%lu", GDK_WINDOW_XWINDOW (GET_GTK_WIDGET_WINDOW
+ (FRAME_GTK_TEXT_WIDGET (f))));
return build_string (str);
}
#endif
@@ -1162,7 +1204,7 @@
static void
gtk_set_frame_position (struct frame *f, int xoff, int yoff)
{
- gtk_widget_set_uposition (FRAME_GTK_SHELL_WIDGET (f), xoff, yoff);
+ gtk_widget_set_uposition (FRAME_GTK_SHELL_WIDGET (f), xoff, yoff);
}
/* Call this to change the size of frame S's x-window. */
@@ -1178,10 +1220,12 @@
GdkWindowHints geometry_mask = GDK_HINT_RESIZE_INC;
/* Update the cell size */
- default_face_height_and_width (wrap_frame (f), &geometry.height_inc,
&geometry.width_inc);
+ default_face_height_and_width (wrap_frame (f), &geometry.height_inc,
+ &geometry.width_inc);
gtk_window_set_geometry_hints (GTK_WINDOW (shell),
- FRAME_GTK_TEXT_WIDGET (f), &geometry, geometry_mask);
+ FRAME_GTK_TEXT_WIDGET (f), &geometry,
+ geometry_mask);
}
change_frame_size (f, rows, cols, 0);
@@ -1202,7 +1246,8 @@
struct frame *f = XFRAME (w->frame);
Display *display = GDK_DISPLAY ();
XWarpPointer (display, None,
- GDK_WINDOW_XWINDOW (GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f))),
+ GDK_WINDOW_XWINDOW (GET_GTK_WIDGET_WINDOW
+ (FRAME_GTK_TEXT_WIDGET (f))),
0, 0, 0, 0, w->pixel_left + x, w->pixel_top + y);
}
#endif /* STUPID_X_SPECIFIC_GTK_STUFF */
@@ -1210,29 +1255,29 @@
static int
gtk_get_mouse_position (struct device *d, Lisp_Object *frame, int *x, int *y)
{
- /* Returns the pixel position within the editor text widget */
- gint win_x, win_y;
- GdkWindow *w = gdk_window_at_pointer (&win_x, &win_y);
- struct frame *f = NULL;
+ /* Returns the pixel position within the editor text widget */
+ gint win_x, win_y;
+ GdkWindow *w = gdk_window_at_pointer (&win_x, &win_y);
+ struct frame *f = NULL;
- if (!w) return (0);
+ if (!w) return (0);
- /* At this point, w is the innermost GdkWindow containing the
- ** pointer and win_x and win_y are the coordinates of that window.
- */
- f = gtk_any_window_to_frame (d, w);
+ /* At this point, w is the innermost GdkWindow containing the
+ ** pointer and win_x and win_y are the coordinates of that window.
+ */
+ f = gtk_any_window_to_frame (d, w);
- if (!f) return (0);
+ if (!f) return (0);
- *frame = wrap_frame (f);
+ *frame = wrap_frame (f);
- gdk_window_get_pointer (GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f)),
- &win_x, &win_y, NULL);
+ gdk_window_get_pointer (GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f)),
+ &win_x, &win_y, NULL);
- *x = win_x;
- *y = win_y;
+ *x = win_x;
+ *y = win_y;
- return (1);
+ return (1);
}
static DECLARE_DOESNT_RETURN (gtk_cant_notify_wm_error (void));
@@ -1240,7 +1285,8 @@
static DOESNT_RETURN
gtk_cant_notify_wm_error ()
{
- signal_error (Qgui_error, "Can't notify window manager of
iconification", Qunbound);
+ signal_error (Qgui_error, "Can't notify window manager of
iconification",
+ Qunbound);
}
/* Raise frame F. */
@@ -1249,7 +1295,8 @@
{
if (FRAME_VISIBLE_P (f) || force)
{
- GdkWindow *emacs_window = GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f));
+ GdkWindow *emacs_window =
+ GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f));
gdk_window_raise (emacs_window);
}
@@ -1266,34 +1313,32 @@
gtk_lower_frame (struct frame *f)
{
if (FRAME_VISIBLE_P (f))
- {
- gdk_window_lower (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f)));
- }
+ gdk_window_lower (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET (f)));
}
/* Change from withdrawn state to mapped state. */
static void
gtk_make_frame_visible (struct frame *f)
{
- gtk_widget_map (FRAME_GTK_SHELL_WIDGET (f));
- gtk_raise_frame_1 (f, 0);
+ gtk_widget_map (FRAME_GTK_SHELL_WIDGET (f));
+ gtk_raise_frame_1 (f, 0);
}
/* Change from mapped state to withdrawn state. */
static void
gtk_make_frame_invisible (struct frame *f)
{
- gtk_widget_unmap(FRAME_GTK_SHELL_WIDGET (f));
+ gtk_widget_unmap (FRAME_GTK_SHELL_WIDGET (f));
}
static int
gtk_frame_visible_p (struct frame *f)
{
- GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f);
+ GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f);
- f->visible = (GTK_OBJECT_FLAGS (w) & GTK_VISIBLE);
+ f->visible = (GTK_OBJECT_FLAGS (w) & GTK_VISIBLE);
- return f->visible;
+ return f->visible;
}
static int
@@ -1336,14 +1381,14 @@
static void
gtk_delete_frame (struct frame *f)
{
- GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f);
+ GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f);
- gtk_widget_destroy (w);
+ gtk_widget_destroy (w);
- if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f))
- xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *);
- xfree (f->frame_data, void *);
- f->frame_data = 0;
+ if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f))
+ xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *);
+ xfree (f->frame_data, void *);
+ f->frame_data = 0;
}
static void
@@ -1357,12 +1402,14 @@
gint width_inc = 10;
gint height_inc = 10;
- default_face_height_and_width (wrap_frame (frm), &height_inc,
&width_inc);
+ default_face_height_and_width (wrap_frame (frm), &height_inc,
+ &width_inc);
geometry_mask = GDK_HINT_RESIZE_INC;
geometry.width_inc = width_inc;
geometry.height_inc = height_inc;
- gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm), &geometry,
geometry_mask);
+ gtk_window_set_geometry_hints (w, FRAME_GTK_TEXT_WIDGET (frm),
+ &geometry, geometry_mask);
}
}
@@ -1397,11 +1444,13 @@
bgc = COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (color));
if (FRAME_GTK_SHELL_WIDGET (frm)->window)
{
- gdk_window_set_background (FRAME_GTK_SHELL_WIDGET (frm)->window, bgc);
+ gdk_window_set_background (FRAME_GTK_SHELL_WIDGET (frm)->window,
+ bgc);
}
if (FRAME_GTK_TEXT_WIDGET (frm)->window)
{
- gdk_window_set_background (FRAME_GTK_TEXT_WIDGET (frm)->window, bgc);
+ gdk_window_set_background (FRAME_GTK_TEXT_WIDGET (frm)->window,
+ bgc);
}
}
@@ -1415,12 +1464,12 @@
Lisp_Object font = FACE_FONT (Vdefault_face, frame, Vcharset_ascii);
if (!EQ (font, Vthe_null_font_instance))
- {
+ {
/* #### BILL!!! The X code set the XtNfont property of the
text widget here. Why did they bother? All that type of
thing is done down in the guts of the redisplay code, not
in the Emacs* widgets. */
- }
+ }
}
else
ABORT ();
@@ -1436,7 +1485,7 @@
/* Set window manager resize increment hints according to
the new character size */
if (EQ (name, Qfont) && FRAME_GTK_TOP_LEVEL_FRAME_P (frm))
- gtk_recompute_cell_sizes (frm);
+ gtk_recompute_cell_sizes (frm);
}
@@ -1511,40 +1560,13 @@
instead of through the frame-properties mechanism.
Here is a list of recognized frame properties, other than those
-documented in `set-frame-properties' (they can be queried and
+documented in `set-frame-property' (they can be queried and
set at any time, except as otherwise noted):
- initially-unmapped If non-nil, the frame will not be visible
- when it is created. In this case, you
- need to call `make-frame-visible' to make
- the frame appear.
- popup If non-nil, it should be a frame, and this
- frame will be created as a "popup" frame
- whose parent is the given frame. This
- will make the window manager treat the
- frame as a dialog box, which may entail
- doing different things (e.g. not asking
- for positioning, and not iconifying
- separate from its parent).
inter-line-space Not currently implemented.
- toolbar-shadow-thickness Thickness of toolbar shadows.
- background-toolbar-color Color of toolbar background.
- bottom-toolbar-shadow-color Color of bottom shadows on toolbars.
- (*Not* specific to the bottom-toolbar.)
- top-toolbar-shadow-color Color of top shadows on toolbars.
- (*Not* specific to the top-toolbar.)
internal-border-width Width of internal border around text area.
border-width Width of external border around text area.
- top Y position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
- left X position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
border-color Color of external border around text area.
- cursor-color Color of text cursor.
See also `default-frame-plist', which specifies properties which apply
to all frames, not just Gtk frames.
1.55.4.1 +31 -36 XEmacs/xemacs/src/frame-msw.c
Index: frame-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-msw.c,v
retrieving revision 1.55
retrieving revision 1.55.4.1
diff -u -r1.55 -r1.55.4.1
--- frame-msw.c 2004/11/04 23:06:30 1.55
+++ frame-msw.c 2005/02/15 01:20:23 1.55.4.1
@@ -1,6 +1,6 @@
/* Functions for the mswindows window system.
Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2001, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -46,9 +46,12 @@
#include "console-msw-impl.h"
#include "glyphs-msw.h"
-#define MSWINDOWS_FRAME_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
WS_OVERLAPPEDWINDOW)
-#define MSWINDOWS_POPUP_STYLE (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP \
- | WS_CAPTION | WS_BORDER | WS_SYSMENU | WS_MINIMIZEBOX)
+#define MSWINDOWS_FRAME_STYLE \
+ (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_OVERLAPPEDWINDOW)
+#define MSWINDOWS_POPUP_STYLE \
+ (WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP | WS_BORDER)
+#define MSWINDOWS_POPUP_TITLE_STYLE \
+ (WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX)
#define MSWINDOWS_FRAME_EXSTYLE WS_EX_OVERLAPPEDWINDOW
#define MSWINDOWS_POPUP_EXSTYLE WS_EX_PALETTEWINDOW
@@ -121,21 +124,22 @@
mswindows_init_frame_1 (struct frame *f, Lisp_Object props,
int UNUSED (frame_name_is_defaulted))
{
+ Lisp_Object device = FRAME_DEVICE (f);
Lisp_Object initially_unmapped;
Lisp_Object name, height, width, popup, top, left;
Lisp_Object frame_obj = Qnil;
RECT rect;
XEMACS_RECT_WH rect_default;
DWORD style, exstyle;
- HWND hwnd, hwnd_parent;
+ HWND hwnd, hwnd_parent = 0;
+ int no_title_bar;
/* Pick up relevant properties */
initially_unmapped = Fplist_get (props, Qinitially_unmapped, Qnil);
name = Fplist_get (props, Qname, Qnil);
popup = Fplist_get (props, Qpopup, Qnil);
- if (EQ (popup, Qt))
- popup = Fselected_frame (Qnil);
+ no_title_bar = !NILP (Fplist_get (props, Qno_title_bar, Qnil));
left = Fplist_get (props, Qleft, Qnil);
if (!NILP (left))
@@ -198,18 +202,30 @@
}
else
{
+ int no_parent = EQ (popup, Qt);
+
style = MSWINDOWS_POPUP_STYLE;
exstyle = MSWINDOWS_POPUP_EXSTYLE;
+
+ if (!no_title_bar)
+ style |= MSWINDOWS_POPUP_TITLE_STYLE;
- CHECK_MSWINDOWS_FRAME (popup);
- hwnd_parent = FRAME_MSWINDOWS_HANDLE (XFRAME (popup));
- assert (IsWindow (hwnd_parent));
+ if (!no_parent)
+ {
+ /* the generic code checked that the frame is on the correct
+ device */
+ CHECK_FRAME (popup);
+ hwnd_parent = FRAME_MSWINDOWS_HANDLE (XFRAME (popup));
+ assert (IsWindow (hwnd_parent));
+ GetWindowRect (hwnd_parent, &rect);
+ }
+ else
+ xzero (rect);
/* We cannot use CW_USEDEFAULT when creating a popup window.
So by default, we offset the new popup 30 pixels right
and down from its parent, and give it size of 30x10 characters.
These dimensions look adequate on both high and low res monitors */
- GetWindowRect (hwnd_parent, &rect);
rect_default.left = rect.left + POPUP_OFFSET;
rect_default.top = rect.top + POPUP_OFFSET;
char_to_real_pixel_size (f, POPUP_WIDTH, POPUP_HEIGHT,
@@ -1184,31 +1200,10 @@
Note: In many cases, properties of a frame are available as specifiers
instead of through the frame-properties mechanism.
-
-Here is a list of recognized frame properties, other than those
-documented in `set-frame-properties' (they can be queried and
-set at any time, except as otherwise noted):
- initially-unmapped If non-nil, the frame will not be visible
- when it is created. In this case, you
- need to call `make-frame-visible' to make
- the frame appear.
- popup If non-nil, it should be a frame, and this
- frame will be created as a "popup" frame
- whose parent is the given frame. This
- will make the window manager treat the
- frame as a dialog box, which may entail
- doing different things (e.g. not asking
- for positioning, and not iconifying
- separate from its parent).
- top Y position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
- left X position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
+There are currently no recognized frame properties specific to MS-Windows
+frames. See `set-frame-property' for a description of predefined frame
+properties.
See also `default-frame-plist', which specifies properties which apply
to all frames, not just mswindows frames.
@@ -1227,7 +1222,7 @@
instead of through the frame-properties mechanism.
Here is a list of recognized frame properties, other than those
-documented in `set-frame-properties' (they can be queried and
+documented in `set-frame-property' (they can be queried and
set at any time, except as otherwise noted):
left-margin Margin of the page, in twips. Twip is a
1.14.4.1 +6 -2 XEmacs/xemacs/src/frame-tty.c
Index: frame-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-tty.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -r1.14 -r1.14.4.1
--- frame-tty.c 2004/09/20 19:19:44 1.14
+++ frame-tty.c 2005/02/15 01:20:24 1.14.4.1
@@ -1,6 +1,6 @@
/* TTY frame functions.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -156,7 +156,7 @@
if (!FRAME_REPAINT_P (f))
return;
- LIST_LOOP (tail, frame_list)
+ OLD_LIST_LOOP (tail, frame_list)
{
if (f == XFRAME (XCAR (tail)))
break;
@@ -245,6 +245,10 @@
These are in addition to and override what is specified in
`default-frame-plist', but are overridden by the arguments to the
particular call to `make-frame'.
+
+There are currently no recognized frame properties specific to TTY
+frames. See `set-frame-property' for a description of predefined frame
+properties.
*/ );
Vdefault_tty_frame_plist = Qnil;
1.69.2.1 +90 -78 XEmacs/xemacs/src/frame-x.c
Index: frame-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame-x.c,v
retrieving revision 1.69
retrieving revision 1.69.2.1
diff -u -r1.69 -r1.69.2.1
--- frame-x.c 2005/01/24 23:33:56 1.69
+++ frame-x.c 2005/02/15 01:20:24 1.69.2.1
@@ -1,6 +1,6 @@
/* Functions for the X window system.
Copyright (C) 1989, 1992-5, 1997 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005 Ben Wing.
This file is part of XEmacs.
@@ -636,22 +636,19 @@
String Xt_resource_encoding_name)
{
Atom encoding = XA_STRING;
- String new_XtValue = (String) value;
+ String new_XtValue;
String old_XtValue = NULL;
+ Extbyte *valext;
+ Bytecount lenext;
+ enum external_x_data datatype;
-#ifdef MULE
- Ibyte *ptr;
- /* Optimize for common ASCII case */
- for (ptr = value; *ptr; ptr++)
- if (!byte_ascii_p (*ptr))
- {
- const Extbyte *tmp;
- encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
- C_STRING_TO_EXTERNAL (value, tmp, Qctext);
- new_XtValue = (String) tmp;
- break;
- }
-#endif /* MULE */
+ datatype = x_convert_to_external_property_data (value, qxestrlen (value),
+ &valext, &lenext);
+
+ new_XtValue = (String) valext;
+
+ if (datatype == X_COMPOUND_TEXT)
+ encoding = DEVICE_XATOM_COMPOUND_TEXT (XDEVICE (FRAME_DEVICE (f)));
/* #### Caching is device-independent - belongs in update_frame_title. */
Xt_GET_VALUE (FRAME_X_SHELL_WIDGET (f), Xt_resource_name, &old_XtValue);
@@ -662,6 +659,9 @@
XtSetArg (al[1], Xt_resource_encoding_name, encoding);
XtSetValues (FRAME_X_SHELL_WIDGET (f), al, 2);
}
+
+ if (datatype != X_ASCII)
+ xfree (valext, Extbyte *);
}
static void
@@ -759,9 +759,8 @@
for the value of a widget argument; it depends on the
semantics of the argument. So use of
Qxt_widget_arg_encoding is totally bogus. --ben */
- TO_EXTERNAL_FORMAT (LISP_STRING, val,
- ALLOCA, (extval, extvallen),
- Qxt_widget_arg_encoding);
+ LISP_STRING_TO_SIZED_EXTERNAL (val, extval, extvallen,
+ Qxt_widget_arg_encoding);
XtVaSetValues (w, XtVaTypedArg, extprop,
/* !!#### Verify this + 1 and document
as zero-termination */
@@ -1776,7 +1775,7 @@
*/
static void
x_create_widgets (struct frame *f, Lisp_Object lisp_window_id,
- Lisp_Object parent)
+ Lisp_Object parent, int no_title_bar)
{
struct device *d = XDEVICE (f->device);
Visual *visual = DEVICE_X_VISUAL (d);
@@ -1794,9 +1793,13 @@
int menubar_visible;
Widget menubar;
#endif
+ int popup = !NILP (parent);
+
+ if (EQ (parent, Qt))
+ parent = Qnil;
if (STRINGP (f->name))
- LISP_STRING_TO_EXTERNAL (f->name, name, Qctext);
+ LISP_STRING_TO_EXTERNAL (f->name, name, Qx_application_class_encoding);
else
name = "emacs";
@@ -1876,6 +1879,9 @@
if (!NILP (parent))
{
+ /* the generic code checked that the frame is on the correct
+ device */
+ CHECK_FRAME (parent);
parentwid = FRAME_X_SHELL_WIDGET (XFRAME (parent));
XtSetArg (al[ac], XtNtransientFor, parentwid); ac++;
}
@@ -1884,8 +1890,11 @@
(
#ifdef EXTERNAL_WIDGET
window_id ? externalShellWidgetClass :
+#endif
+#if 0 /* do we dare? */
+ no_title_bar ? overrideEmacsShellWidgetClass :
#endif
- parentwid ? transientEmacsShellWidgetClass :
+ popup ? transientEmacsShellWidgetClass :
topLevelEmacsShellWidgetClass
),
parentwid ? parentwid :
@@ -2082,19 +2091,6 @@
int UNUSED (frame_name_is_defaulted))
{
/* This function can GC */
- Lisp_Object device = FRAME_DEVICE (f);
- Lisp_Object lisp_window_id = Fplist_get (props, Qwindow_id, Qnil);
- Lisp_Object popup = Fplist_get (props, Qpopup, Qnil);
-
- if (!NILP (popup))
- {
- if (EQ (popup, Qt))
- popup = Fselected_frame (device);
- CHECK_LIVE_FRAME (popup);
- if (!EQ (device, FRAME_DEVICE (XFRAME (popup))))
- invalid_argument_2 ("Parent must be on same device as frame",
- device, popup);
- }
/*
* Previously we set this only if NILP (DEVICE_SELECTED_FRAME (d))
@@ -2109,7 +2105,9 @@
f->visible = 1;
allocate_x_frame_struct (f);
- x_create_widgets (f, lisp_window_id, popup);
+ x_create_widgets (f, Fplist_get (props, Qwindow_id, Qnil),
+ Fplist_get (props, Qpopup, Qnil),
+ !NILP (Fplist_get (props, Qno_title_bar, Qnil)));
}
static void
@@ -2775,50 +2773,64 @@
Note: In many cases, properties of a frame are available as specifiers
instead of through the frame-properties mechanism.
+
+Frame properties that are strings are set as X resources on the frame.
+Some of the X resource strings have symbol equivalents.
+
+Here is a list of recognized frame properties, other than those documented
+in `set-frame-property' (they can be queried and set at any time, except as
+otherwise noted). On the left side is the symbol name and on the right
+side the string equivalent as an X resource. Note that many of the
+resources are equivalent to using specifiers (see `set-frame-property') and
+using specifiers is preferred over resource strings. #### More documentation
+needed here.
+
+ window-id No resource equivalent. The X window ID
+ corresponding to the frame. May be set
+ only at startup, and only if external
+ widget support was compiled in; doing so
+ causes the frame to be created as an
+ "external widget" in another program that
+ uses an existing window in the program
+ rather than creating a new one.
+ inter-line-space "interline"
+ [Not currently implemented]
+ internal-border-width "internalBorderWidth"
+ [Width of internal border around text area]
+ border-width "borderWidth"
+ [Width of external border around text area]
+ border-color "borderColor"
+ [Color of external border around text area]
+ scrollbar-placement "scrollBarPlacement"
+ iconic "iconic"
+ bar-cursor "barCursor"
+ visual-bell "visualBell"
+ bell-volume "bellVolume"
+ pointer-background "pointerBackground"
+ pointer-color "pointerColor"
+ text-pointer "textPointer"
+ space-pointer "spacePointer"
+ modeline-pointer "modelinePointer"
+ gc-pointer "gcPointer"
+ use-backing-store "useBackingStore"
+
+ [none] "selectionPointer"
+ [none] "spacePointer"
+ [none] "modeLinePointer"
+ [none] "gcPointer"
+ [none] "scrollbarPointer"
+ [none] "busyPointer"
+ [none] "toolBarPointer"
+ [none] "dividerPointer"
+ [none] "pointerColor"
+ [none] "pointerBackground"
+
+ [none] "scrollBarWidth"
+ [none] "scrollBarHeight"
+ [none] "scrollbar.thickness"
+ [none] "scrollbar.width"
+ [none] "scrollbar.height"
-Here is a list of recognized frame properties, other than those
-documented in `set-frame-properties' (they can be queried and
-set at any time, except as otherwise noted):
-
- window-id The X window ID corresponding to the
- frame. May be set only at startup, and
- only if external widget support was
- compiled in; doing so causes the frame
- to be created as an "external widget"
- in another program that uses an existing
- window in the program rather than creating
- a new one.
- initially-unmapped If non-nil, the frame will not be visible
- when it is created. In this case, you
- need to call `make-frame-visible' to make
- the frame appear.
- popup If non-nil, it should be a frame, and this
- frame will be created as a "popup" frame
- whose parent is the given frame. This
- will make the window manager treat the
- frame as a dialog box, which may entail
- doing different things (e.g. not asking
- for positioning, and not iconifying
- separate from its parent).
- inter-line-space Not currently implemented.
- toolbar-shadow-thickness Thickness of toolbar shadows.
- background-toolbar-color Color of toolbar background.
- bottom-toolbar-shadow-color Color of bottom shadows on toolbars.
- (*Not* specific to the bottom-toolbar.)
- top-toolbar-shadow-color Color of top shadows on toolbars.
- (*Not* specific to the top-toolbar.)
- internal-border-width Width of internal border around text area.
- border-width Width of external border around text area.
- top Y position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
- left X position (in pixels) of the upper-left
- outermost corner of the frame (i.e. the
- upper-left of the window-manager
- decorations).
- border-color Color of external border around text area.
- cursor-color Color of text cursor.
See also `default-frame-plist', which specifies properties which apply
to all frames, not just X frames.
1.68.2.1 +36 -79 XEmacs/xemacs/src/frame.c
Index: frame.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame.c,v
retrieving revision 1.68
retrieving revision 1.68.2.1
diff -u -r1.68 -r1.68.2.1
--- frame.c 2005/02/03 16:30:36 1.68
+++ frame.c 2005/02/15 01:20:24 1.68.2.1
@@ -65,6 +65,7 @@
Lisp_Object Qminibuffer;
Lisp_Object Qunsplittable;
+Lisp_Object Qno_title_bar;
Lisp_Object Qinternal_border_width;
Lisp_Object Qtop_toolbar_shadow_color;
Lisp_Object Qbottom_toolbar_shadow_color;
@@ -455,8 +456,8 @@
\(An alist is accepted for backward compatibility but should not
be passed in.)
-See `set-frame-properties', `default-x-frame-plist', and
-`default-tty-frame-plist' for the specially-recognized properties.
+See `set-frame-properties', `default-x-frame-plist',
`default-tty-frame-plist'
+ for the specially-recognized properties.
*/
(props, device))
{
@@ -507,6 +508,19 @@
specbind (Qframe_being_created, name);
f->name = name;
+ /* Verify the format of `popup' */
+ {
+ Lisp_Object popup = Fplist_get (props, Qpopup, Qnil);
+
+ if (!SYMBOLP (popup))
+ {
+ CHECK_LIVE_FRAME (popup);
+ if (!EQ (device, FRAME_DEVICE (XFRAME (popup))))
+ invalid_argument_2 ("Parent must be on same device as frame",
+ device, popup);
+ }
+ }
+
FRAMEMETH (f, init_frame_1, (f, props, frame_name_is_defaulted));
minibuf = Flax_plist_get (props, Qminibuffer, Qunbound);
@@ -2373,72 +2387,7 @@
Frame properties can be retrieved using `frame-property' or
`frame-properties'.
-The following symbols etc. have predefined meanings:
-
- name Name of the frame. Used with X resources.
- Unchangeable after creation.
-
- height Height of the frame, in lines.
-
- width Width of the frame, in characters.
-
- minibuffer Gives the minibuffer behavior for this frame. Either
- t (frame has its own minibuffer), `only' (frame is
- a minibuffer-only frame), `none' (frame has no minibuffer)
- or a window (frame uses that window, which is on another
- frame, as the minibuffer).
-
- unsplittable If non-nil, frame cannot be split by `display-buffer'.
-
- current-display-table, menubar-visible-p, left-margin-width,
- right-margin-width, minimum-line-ascent, minimum-line-descent,
- use-left-overflow, use-right-overflow, scrollbar-width, scrollbar-height,
- default-toolbar, top-toolbar, bottom-toolbar, left-toolbar, right-toolbar,
- default-toolbar-height, default-toolbar-width, top-toolbar-height,
- bottom-toolbar-height, left-toolbar-width, right-toolbar-width,
- default-toolbar-visible-p, top-toolbar-visible-p, bottom-toolbar-visible-p,
- left-toolbar-visible-p, right-toolbar-visible-p, toolbar-buttons-captioned-p,
- top-toolbar-border-width, bottom-toolbar-border-width,
- left-toolbar-border-width, right-toolbar-border-width,
- modeline-shadow-thickness, has-modeline-p,
- default-gutter, top-gutter, bottom-gutter, left-gutter, right-gutter,
- default-gutter-height, default-gutter-width, top-gutter-height,
- bottom-gutter-height, left-gutter-width, right-gutter-width,
- default-gutter-visible-p, top-gutter-visible-p, bottom-gutter-visible-p,
- left-gutter-visible-p, right-gutter-visible-p, top-gutter-border-width,
- bottom-gutter-border-width, left-gutter-border-width, right-gutter-border-width,
- [Giving the name of any built-in specifier variable is
- equivalent to calling `set-specifier' on the specifier,
- with a locale of FRAME. Giving the name to `frame-property'
- calls `specifier-instance' on the specifier.]
-
- text-pointer-glyph, nontext-pointer-glyph, modeline-pointer-glyph,
- selection-pointer-glyph, busy-pointer-glyph, toolbar-pointer-glyph,
- menubar-pointer-glyph, scrollbar-pointer-glyph, gc-pointer-glyph,
- octal-escape-glyph, control-arrow-glyph, invisible-text-glyph,
- hscroll-glyph, truncation-glyph, continuation-glyph
- [Giving the name of any glyph variable is equivalent to
- calling `set-glyph-image' on the glyph, with a locale
- of FRAME. Giving the name to `frame-property' calls
- `glyph-image-instance' on the glyph.]
-
- [default foreground], [default background], [default font],
- [modeline foreground], [modeline background], [modeline font],
- etc.
- [Giving a vector of a face and a property is equivalent
- to calling `set-face-property' on the face and property,
- with a locale of FRAME. Giving the vector to
- `frame-property' calls `face-property-instance' on the
- face and property.]
-
-Finally, if a frame property symbol has the property `frame-property-alias'
-on it, then the value will be used in place of that symbol when looking
-up and setting frame property values. This allows you to alias one
-frame property name to another.
-
-See the variables `default-x-frame-plist', `default-tty-frame-plist'
-and `default-mswindows-frame-plist' for a description of the properties
-recognized for particular types of frames.
+See `set-frame-property' for a list of predefined properties.
*/
(frame, plist))
{
@@ -3592,6 +3541,7 @@
DEFSYMBOL (Qvisible_iconic_nomini);
DEFSYMBOL (Qinvisible_iconic_nomini);
+ DEFSYMBOL (Qno_title_bar);
DEFSYMBOL (Qminibuffer);
DEFSYMBOL (Qunsplittable);
DEFSYMBOL (Qinternal_border_width);
@@ -3833,18 +3783,25 @@
These override values given in window system configuration data,
including X Windows' defaults database.
-
-Since the first X frame is created before loading your .emacs file,
-you must use the X resource database for that.
-For values specific to the first Emacs frame, see `initial-frame-plist'.
-For values specific to the separate minibuffer frame, see
- `minibuffer-frame-plist'.
-
-See also the variables `default-x-frame-plist' and
-`default-tty-frame-plist', which are like `default-frame-plist'
-except that they apply only to X or tty frames, respectively
-\(whereas `default-frame-plist' applies to all types of frames).
+Since the first frame is created before loading your .emacs file,
+ you must use the X resource database (if under X) for that; if under
+ MS Windows, ####?
+
+See `set-frame-property' for a description of predefined properties for all
+types of frames, and the variables `default-x-frame-plist',
+`default-tty-frame-plist', `default-mswindows-frame-plist', and
+`default-gtk-frame-plist' for a description of the properties recognized
+for particular types of frames.
+
+Values specific to the first Emacs frame are controlled with
+`initial-frame-plist'. Values specific to the separate minibuffer frame
+are controlled with `minibuffer-frame-plist'.
+
+The aforementioned variables `default-*-frame-plist' are like
+`default-frame-plist' except that they apply only to X, TTY, MS-Windows, or
+GTK frames, respectively \(whereas `default-frame-plist' applies to all
+types of frames).
*/ );
Vdefault_frame_plist = Qnil;
1.29.4.1 +2 -2 XEmacs/xemacs/src/frame.h
Index: frame.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/frame.h,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -u -r1.29 -r1.29.4.1
--- frame.h 2003/02/21 06:56:57 1.29
+++ frame.h 2005/02/15 01:20:25 1.29.4.1
@@ -1,6 +1,6 @@
/* Define frame-object for XEmacs.
Copyright (C) 1988, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 1995, 2002 Ben Wing.
+ Copyright (C) 1995, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -50,7 +50,7 @@
extern Lisp_Object Qiconic, Qinitially_unmapped, Qinter_line_space;
extern Lisp_Object Qinternal_border_width, Qinvisible, Qmap_frame_hook;
extern Lisp_Object Qminibuffer, Qmodeline_pointer, Qmouse_enter_frame_hook;
-extern Lisp_Object Qmouse_leave_frame_hook, Qpointer_background;
+extern Lisp_Object Qmouse_leave_frame_hook, Qno_title_bar, Qpointer_background;
extern Lisp_Object Qpointer_color, Qpopup, Qscrollbar_placement;
extern Lisp_Object Qselect_frame_hook, Qspace_pointer;
extern Lisp_Object Qsynchronize_minibuffers, Qtext_pointer;
1.7.2.1 +3 -253 XEmacs/xemacs/src/gccache-gtk.c
Index: gccache-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gccache-gtk.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- gccache-gtk.c 2005/01/26 10:22:26 1.7
+++ gccache-gtk.c 2005/02/15 01:20:26 1.7.2.1
@@ -1,6 +1,7 @@
/* Efficient caching of Gtk GCs (graphics contexts).
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -21,256 +22,5 @@
/* Synched up with: Not in FSF. */
-/* Emacs uses a lot of different display attributes; for example, assume
- that only four fonts are in use (normal, bold, italic, and bold-italic).
- Then assume that one stipple or background is used for text selections,
- and another is used for highlighting mousable regions. That makes 16
- GCs already. Add in the fact that another GC may be needed to display
- the text cursor in any of those regions, and you've got 32. Add in
- more fonts, and it keeps increasing exponentially.
-
- We used to keep these GCs in a cache of merged (fully qualified) faces.
- However, a lot of other code in xterm.c used XChangeGC of existing GCs,
- which is kind of slow and kind of random. Also, managing the face cache
- was tricky because it was hard to know when a face was no longer visible
- on the frame -- we had to mark all frames as garbaged whenever a face
- was changed, which caused an unpleasant amount of flicker (since faces are
- created/destroyed (= changed) whenever a frame is created/destroyed.
-
- So this code maintains a cache at the GC level instead of at the face
- level. There is an upper limit on the size of the cache, after which we
- will stop creating GCs and start reusing them (reusing the least-recently-
- used ones first). So if faces get changed, their GCs will eventually be
- recycled. Also more sharing of GCs is possible.
-
- This code uses hashtables. It could be that, if the cache size is small
- enough, a linear search might be faster; but I doubt it, since we need
- `equal' comparisons, not `eq', and I expect that the optimal cache size
- will be ~100.
-
- Written by jwz, 14 jun 93
- Hacked by William Perry, apr 2000
- */
-
-#include <config.h>
-#include <gtk/gtk.h>
-#include "lisp.h"
-#include "gccache-gtk.h"
-
-#define GC_CACHE_SIZE 100
-
-#define GCCACHE_HASH
-
-#ifdef GCCACHE_HASH
-#include "lisp.h"
-#include "hash.h"
-#endif
-
-struct gcv_and_mask {
- GdkGCValues gcv;
- unsigned long mask; /* contains a GdkGCValuesMask bitmask. */
-};
-
-struct gc_cache_cell {
- GdkGC *gc;
- struct gcv_and_mask gcvm;
- struct gc_cache_cell *prev, *next;
-};
-
-struct gc_cache {
- GdkWindow *window; /* used only as arg to XCreateGC */
- int size;
- struct gc_cache_cell *head;
- struct gc_cache_cell *tail;
-#ifdef GCCACHE_HASH
- struct hash_table * table;
-#endif
-
- int create_count;
- int delete_count;
-};
-
-#ifdef GCCACHE_HASH
-static Hashcode
-gc_cache_hash (const void *arg)
-{
- const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
- unsigned long *longs = (unsigned long *) &gcvm->gcv;
- Hashcode hash = gcvm->mask;
- unsigned int i;
- /* This could look at the mask and only use the used slots in the
- hash code. That would win in that we wouldn't have to initialize
- every slot of the gcv when calling gc_cache_lookup. But we need
- the hash function to be as fast as possible; some timings should
- be done. */
- for (i = 0; i < (sizeof (GdkGCValues) / sizeof (unsigned long)); i++)
- hash = (hash << 1) ^ *longs++;
- return hash;
-}
-
-#endif /* GCCACHE_HASH */
-
-static int
-gc_cache_eql (const void *arg1, const void *arg2)
-{
- /* See comment in gc_cache_hash */
- const struct gcv_and_mask *gcvm1 = (const struct gcv_and_mask *) arg1;
- const struct gcv_and_mask *gcvm2 = (const struct gcv_and_mask *) arg2;
-
- return !memcmp(&gcvm1->gcv, &gcvm2->gcv, sizeof(gcvm1->gcv))
- && gcvm1->mask == gcvm2->mask;
-}
-
-struct gc_cache *
-make_gc_cache (GtkWidget *widget)
-{
- struct gc_cache *cache = xnew (struct gc_cache);
- cache->window = widget->window;
- cache->size = 0;
- cache->head = cache->tail = 0;
- cache->create_count = cache->delete_count = 0;
-#ifdef GCCACHE_HASH
- cache->table =
- make_general_hash_table (GC_CACHE_SIZE, gc_cache_hash, gc_cache_eql);
-#endif
- return cache;
-}
-
-void
-free_gc_cache (struct gc_cache *cache)
-{
- struct gc_cache_cell *rest, *next;
- rest = cache->head;
- while (rest)
- {
- gdk_gc_destroy(rest->gc);
- next = rest->next;
- xfree (rest, struct gc_cache_cell *);
- rest = next;
- }
-#ifdef GCCACHE_HASH
- free_hash_table (cache->table);
-#endif
- xfree (cache, struct gc_cache *);
-}
-
-GdkGC *
-gc_cache_lookup (struct gc_cache *cache, GdkGCValues *gcv, unsigned long mask)
-{
- struct gc_cache_cell *cell, *next, *prev;
- struct gcv_and_mask gcvm;
-
- if ((!!cache->head) != (!!cache->tail)) ABORT ();
- if (cache->head && (cache->head->prev || cache->tail->next))
ABORT ();
-
- /* Gdk does not have the equivalent of 'None' for the clip_mask, so
- we need to check it carefully, or gdk_gc_new_with_values will
- coredump */
- if ((mask & GDK_GC_CLIP_MASK) && !gcv->clip_mask)
- {
- mask &= ~GDK_GC_CLIP_MASK;
- }
-
- gcvm.mask = mask;
- gcvm.gcv = *gcv; /* this copies... */
-
-#ifdef GCCACHE_HASH
-
- if (gethash (&gcvm, cache->table, (const void **) &cell))
-
-#else /* !GCCACHE_HASH */
-
- cell = cache->tail; /* start at the end (most recently used) */
- while (cell)
- {
- if (gc_cache_eql (&gcvm, &cell->gcvm))
- break;
- else
- cell = cell->prev;
- }
-
- /* #### This whole file needs some serious overhauling. */
- if (!(mask | GDK_GC_TILE) && cell->gcvm.gcv.tile)
- cell = 0;
- else if (!(mask | GDK_GC_STIPPLE) && cell->gcvm.gcv.stipple)
- cell = 0;
-
- if (cell)
-
-#endif /* !GCCACHE_HASH */
-
- {
- /* Found a cell. Move this cell to the end of the list, so that it
- will be less likely to be collected than a cell that was accessed
- less recently.
- */
- if (cell == cache->tail)
- return cell->gc;
-
- next = cell->next;
- prev = cell->prev;
- if (prev) prev->next = next;
- if (next) next->prev = prev;
- if (cache->head == cell) cache->head = next;
- cell->next = 0;
- cell->prev = cache->tail;
- cache->tail->next = cell;
- cache->tail = cell;
- if (cache->head == cell) ABORT ();
- if (cell->next) ABORT ();
- if (cache->head->prev) ABORT ();
- if (cache->tail->next) ABORT ();
- return cell->gc;
- }
-
- /* else, cache miss. */
-
- if (cache->size == GC_CACHE_SIZE)
- /* Reuse the first cell on the list (least-recently-used).
- Remove it from the list, and unhash it from the table.
- */
- {
- cell = cache->head;
- cache->head = cell->next;
- cache->head->prev = 0;
- if (cache->tail == cell) cache->tail = 0; /* only one */
- gdk_gc_destroy (cell->gc);
- cache->delete_count++;
-#ifdef GCCACHE_HASH
- remhash (&cell->gcvm, cache->table);
-#endif
- }
- else if (cache->size > GC_CACHE_SIZE)
- ABORT ();
- else
- {
- /* Allocate a new cell (don't put it in the list or table yet). */
- cell = xnew (struct gc_cache_cell);
- cache->size++;
- }
-
- /* Now we've got a cell (new or reused). Fill it in. */
- memcpy (&cell->gcvm.gcv, gcv, sizeof (GdkGCValues));
- cell->gcvm.mask = mask;
-
- /* Put the cell on the end of the list. */
- cell->next = 0;
- cell->prev = cache->tail;
- if (cache->tail) cache->tail->next = cell;
- cache->tail = cell;
- if (! cache->head) cache->head = cell;
-
- cache->create_count++;
-#ifdef GCCACHE_HASH
- /* Hash it in the table */
- puthash (&cell->gcvm, cell, cache->table);
-#endif
-
- /* Now make and return the GC. */
- cell->gc = gdk_gc_new_with_values (cache->window, gcv, (GdkGCValuesMask)
mask);
-
- /* debug */
- assert (cell->gc == gc_cache_lookup (cache, gcv, mask));
-
- return cell->gc;
-}
+#define THIS_IS_GTK
+#include "gccache-xlike-inc.c"
1.5.4.1 +11 -9 XEmacs/xemacs/src/glade.c
Index: glade.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glade.c,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- glade.c 2004/05/02 04:06:59 1.5
+++ glade.c 2005/02/15 01:20:27 1.5.4.1
@@ -35,19 +35,18 @@
func = VOID_TO_LISP (user_data);
if (NILP (func))
- {
/* Look for a lisp function called HANDLER_NAME */
- func = intern (handler_name);
- }
+ func = INTERN_GTK_TEXT (handler_name);
if (signal_data && signal_data[0])
{
- lisp_data = Feval (Fread (build_string (signal_data)));
+ lisp_data = Feval (Fread (build_ext_string (signal_data,
+ Vgtk_text_encoding)));
}
/* obj, name, func, cb_data, object_signal, after_p */
Fgtk_signal_connect (build_gtk_object (object),
- intern (signal_name),
+ INTERN_GTK_TEXT (signal_name),
func,
lisp_data,
connect_object ? Qt : Qnil,
@@ -57,7 +56,8 @@
/* This differs from lisp/subr.el (functionp) definition by allowing
** symbol names that may not necessarily be fboundp yet.
*/
-static int __almost_functionp (Lisp_Object obj)
+static int
+__almost_functionp (Lisp_Object obj)
{
return (SYMBOLP (obj) ||
SUBRP (obj) ||
@@ -77,9 +77,10 @@
{
func = wrong_type_argument (intern ("functionp"), func);
}
+
glade_xml_signal_connect_full (GLADE_XML (XGTK_OBJECT (xml)->object),
- (char*) XSTRING_DATA (handler_name),
+ LISP_STRING_TO_GTK_TEXT (handler_name),
connector, LISP_TO_VOID (func));
return (Qt);
}
@@ -115,10 +116,11 @@
#else
the_domain = GLADE_XML (XGTK_OBJECT (xml)->object)->textdomain;
#endif
- return (build_string (the_domain));
+ return (build_ext_string (the_domain, Vgtk_text_encoding));
}
-void syms_of_glade (void)
+void
+syms_of_glade (void)
{
DEFSUBR (Fglade_xml_signal_connect);
DEFSUBR (Fglade_xml_signal_autoconnect);
1.25.2.1 +5 -7 XEmacs/xemacs/src/glyphs-eimage.c
Index: glyphs-eimage.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-eimage.c,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- glyphs-eimage.c 2005/02/04 03:01:21 1.25
+++ glyphs-eimage.c 2005/02/15 01:20:27 1.25.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1993, 1994, 1998 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems
- Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 Ben Wing
Copyright (C) 1995 Sun Microsystems
This file is part of XEmacs.
@@ -393,7 +393,7 @@
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Need to be able to convert and
write out to a file. */
- TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
jpeg_memory_src (&cinfo, (JOCTET *) bytes, len);
}
@@ -657,7 +657,7 @@
}
GifSetErrorFunc(unwind.giffile, (Gif_error_func)gif_error_func,
(VoidPtr)&gif_err);
- TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
mem_struct.bytes = bytes;
mem_struct.len = len;
mem_struct.index = 0;
@@ -924,7 +924,7 @@
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Need to think about using Lstreams */
- TO_EXTERNAL_FORMAT (LISP_STRING, data, ALLOCA, (bytes, len), Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
tbr.bytes = bytes;
tbr.len = len;
tbr.index = 0;
@@ -1281,9 +1281,7 @@
/* #### This is a definite problem under Mule due to the amount of
stack data it might allocate. Think about Lstreams... */
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- ALLOCA, (bytes, len),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
mem_struct.bytes = bytes;
mem_struct.len = len;
mem_struct.index = 0;
1.30.2.1 +238 -604 XEmacs/xemacs/src/glyphs-gtk.c
Index: glyphs-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-gtk.c,v
retrieving revision 1.30
retrieving revision 1.30.2.1
diff -u -r1.30 -r1.30.2.1
--- glyphs-gtk.c 2005/01/26 10:22:26 1.30
+++ glyphs-gtk.c 2005/02/15 01:20:27 1.30.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems
- Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005 Ben Wing
Copyright (C) 1995 Sun Microsystems
This file is part of XEmacs.
@@ -97,25 +97,22 @@
#ifdef HAVE_GIF
DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif);
#endif
-
#ifdef HAVE_XFACE
-DEFINE_DEVICE_IIFORMAT (gtk, xface);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xface);
#endif
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xbm);
+
#ifdef HAVE_XPM
DEFINE_DEVICE_IIFORMAT (gtk, xpm);
#endif
-DEFINE_DEVICE_IIFORMAT (gtk, xbm);
DEFINE_DEVICE_IIFORMAT (gtk, subwindow);
-
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (cursor_font);
-Lisp_Object Qcursor_font;
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (font);
+DEFINE_DEVICE_IIFORMAT (gtk, autodetect);
+DEFINE_DEVICE_IIFORMAT (gtk, font);
+DEFINE_DEVICE_IIFORMAT (gtk, cursor_font);
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect);
-
#ifdef HAVE_WIDGETS
DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout);
DEFINE_DEVICE_IIFORMAT (gtk, widget);
@@ -130,24 +127,18 @@
static void update_widget_face (GtkWidget *w, Lisp_Image_Instance *ii,
Lisp_Object domain);
-static void cursor_font_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask,
- Lisp_Object domain);
+static void gtk_cursor_font_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator,
+ Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg,
+ int dest_mask,
+ Lisp_Object domain);
+static int gtk_colorize_image_instance (Lisp_Object image_instance,
+ Lisp_Object foreground,
+ Lisp_Object background);
-static GdkCursorType cursor_name_to_index (const char *name);
+static GdkCursorType cursor_name_to_index (const CIbyte *name);
-#ifndef BitmapSuccess
-#define BitmapSuccess 0
-#define BitmapOpenFailed 1
-#define BitmapFileInvalid 2
-#define BitmapNoMemory 3
-#endif
-
-#include "bitmaps.h"
-
DEFINE_IMAGE_INSTANTIATOR_FORMAT (gtk_resource);
Lisp_Object Qgtk_resource;
#ifdef HAVE_WIDGETS
@@ -208,7 +199,7 @@
byte_cnt = outimg->bpp;
- data = (unsigned char *) outimg->mem;
+ data = (Binbyte *) outimg->mem;
if (!data)
{
@@ -235,7 +226,7 @@
color.red = qtable->rm[i] ? qtable->rm[i] << 8 : 0;
color.green = qtable->gm[i] ? qtable->gm[i] << 8 : 0;
color.blue = qtable->bm[i] ? qtable->bm[i] << 8 : 0;
- res = allocate_nearest_color (cmap, vis, &color);
+ res = gtk_allocate_nearest_color (cmap, vis, &color);
if (res > 0 && res < 3)
{
DO_REALLOC(*pixtbl, pixcount, n+1, unsigned long);
@@ -255,7 +246,7 @@
gr = *ip++;
bl = *ip++;
conv.val = pixarray[QUANT_GET_COLOR(qtable,rd,gr,bl)];
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (outimg->byte_order == GDK_MSB_FIRST)
for (q = 4-byte_cnt; q < 4; q++) *dp++ = conv.cp[q];
else
@@ -330,7 +321,7 @@
bl = *ip++ >> (8 - bbits);
conv.val = (rd << rshift) | (gr << gshift) | (bl << bshift);
-#if WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
if (outimg->byte_order == GDK_MSB_FIRST)
for (q = 4-byte_cnt; q < 4; q++) *dp++ = conv.cp[q];
else
@@ -388,7 +379,8 @@
{
if (IMAGE_INSTANCE_SUBWINDOW_ID (p))
{
- gtk_widget_destroy ((GtkWidget*) IMAGE_INSTANCE_SUBWINDOW_ID (p));
+ gtk_widget_destroy ((GtkWidget *)
+ IMAGE_INSTANCE_SUBWINDOW_ID (p));
/* We can release the callbacks again. */
/* #### FIXME! */
@@ -501,28 +493,13 @@
}
}
-/* Set all the slots in an image instance structure to reasonable
- default values. This is used somewhere within an instantiate
- method. It is assumed that the device slot within the image
- instance is already set -- this is the case when instantiate
- methods are called. */
-
static void
-gtk_initialize_pixmap_image_instance (struct Lisp_Image_Instance *ii,
- int slices,
- enum image_instance_type type)
+gtk_initialize_pixmap_image_instance_data (struct Lisp_Image_Instance *ii,
+ int slices)
{
ii->data = xnew_and_zero (struct gtk_image_instance_data);
- IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices;
IMAGE_INSTANCE_GTK_PIXMAP_SLICES (ii) =
xnew_array_and_zero (GdkPixmap *, slices);
- IMAGE_INSTANCE_TYPE (ii) = type;
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil;
}
@@ -583,12 +560,6 @@
}
}
-static Lisp_Object
-locate_pixmap_file (Lisp_Object name)
-{
- return gtk_locate_pixmap_file (name);
-}
-
/************************************************************************/
/* cursor functions */
@@ -737,7 +708,7 @@
gdk_gc_destroy (gc);
- gtk_initialize_pixmap_image_instance (ii, slices, IMAGE_COLOR_PIXMAP);
+ initialize_pixmap_image_instance (ii, slices, IMAGE_COLOR_PIXMAP);
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
find_keyword_in_vector (instantiator, Q_file);
@@ -774,7 +745,7 @@
incompatible_image_types (instantiator, dest_mask,
IMAGE_COLOR_PIXMAP_MASK);
- gtk_initialize_pixmap_image_instance (ii, IMAGE_COLOR_PIXMAP);
+ initialize_pixmap_image_instance (ii, IMAGE_COLOR_PIXMAP);
gdk_window_get_geometry (gdk_pixmap, NULL, NULL, &width, &height,
&depth);
@@ -873,76 +844,54 @@
static GdkPixmap *
pixmap_from_xbm_inline (Lisp_Object device, int width, int height,
- /* Note that data is in ext-format! */
- const Extbyte *bits)
+ const Binbyte *bits)
{
- return (gdk_bitmap_create_from_data (GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL
(XDEVICE (device))),
- (char *) bits, width, height));
+ return (gdk_bitmap_create_from_data
+ (GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device))),
+ (CBinbyte *) bits, width, height));
}
-/* Given inline data for a mono pixmap, initialize the given
- image instance accordingly. */
-
static void
-init_image_instance_from_xbm_inline (struct Lisp_Image_Instance *ii,
- int width, int height,
- /* Note that data is in ext-format! */
- const char *bits,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask,
- GdkPixmap *mask,
- Lisp_Object UNUSED (mask_filename))
+gtk_xbm_instantiate_1 (Lisp_Image_Instance *ii, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int width, int height, const Binbyte *bits,
+ enum image_instance_type type, Lisp_Object device,
+ Lisp_Object mask_data, Lisp_Object mask_file,
+ Lisp_Object foreground, Lisp_Object background)
{
- Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground);
- Lisp_Object background = find_keyword_in_vector (instantiator, Q_background);
+ GdkPixmap *mask = 0;
GdkColor fg;
GdkColor bg;
- enum image_instance_type type;
- GdkWindow *draw = GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device)));
- GdkColormap *cmap = DEVICE_GTK_COLORMAP (XDEVICE(device));
+ GdkWindow *draw =
+ GET_GTK_WIDGET_WINDOW (DEVICE_GTK_APP_SHELL (XDEVICE (device)));
+ GdkColormap *cmap = DEVICE_GTK_COLORMAP (XDEVICE (device));
GdkColor black;
GdkColor white;
- gdk_color_black(cmap, &black);
- gdk_color_white(cmap, &white);
+ gdk_color_black (cmap, &black);
+ gdk_color_white (cmap, &white);
- if (!DEVICE_GTK_P (XDEVICE (device)))
- gui_error ("Not a Gtk device", device);
-
- if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) &&
- (dest_mask & IMAGE_COLOR_PIXMAP_MASK))
+ if (!NILP (mask_data))
{
- if (!NILP (foreground) || !NILP (background))
- type = IMAGE_COLOR_PIXMAP;
- else
- type = IMAGE_MONO_PIXMAP;
+ Binbyte *ext_data;
+
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (mask_data))), ext_data,
+ Qbinary);
+ mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
+ XINT (XCAR (mask_data)),
+ XINT (XCAR (XCDR (mask_data))),
+ ext_data);
}
- else if (dest_mask & IMAGE_MONO_PIXMAP_MASK)
- type = IMAGE_MONO_PIXMAP;
- else if (dest_mask & IMAGE_COLOR_PIXMAP_MASK)
- type = IMAGE_COLOR_PIXMAP;
- else if (dest_mask & IMAGE_POINTER_MASK)
- type = IMAGE_POINTER;
- else
- incompatible_image_types (instantiator, dest_mask,
- IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK
- | IMAGE_POINTER_MASK);
- gtk_initialize_pixmap_image_instance (ii, 1, type);
IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = width;
IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = height;
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
- find_keyword_in_vector (instantiator, Q_file);
switch (type)
{
case IMAGE_MONO_PIXMAP:
{
IMAGE_INSTANCE_GTK_PIXMAP (ii) =
- pixmap_from_xbm_inline (device, width, height, (Extbyte *) bits);
+ pixmap_from_xbm_inline (device, width, height, bits);
}
break;
@@ -973,19 +922,21 @@
IMAGE_INSTANCE_PIXMAP_FG (ii) = foreground;
IMAGE_INSTANCE_PIXMAP_BG (ii) = background;
IMAGE_INSTANCE_GTK_PIXMAP (ii) =
- gdk_pixmap_create_from_data (draw, (char *) bits, width, height, d, &fg,
&bg);
+ gdk_pixmap_create_from_data (draw, (char *) bits, width, height,
+ d, &fg, &bg);
IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = d;
}
break;
case IMAGE_POINTER:
- {
+ {
GdkColor fg_color, bg_color;
GdkPixmap *source;
check_pointer_sizes (width, height, instantiator);
- source = gdk_pixmap_create_from_data (draw, (char *) bits, width, height, 1,
&black, &white);
+ source = gdk_pixmap_create_from_data (draw, (char *) bits, width,
+ height, 1, &black, &white);
if (NILP (foreground))
foreground = pointer_fg;
@@ -1001,11 +952,12 @@
IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) =
find_keyword_in_vector (instantiator, Q_hotspot_y);
IMAGE_INSTANCE_GTK_CURSOR (ii) =
- gdk_cursor_new_from_pixmap (source, mask, &fg_color, &bg_color,
- !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)) ?
- XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)) : 0,
- !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)) ?
- XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)) : 0);
+ gdk_cursor_new_from_pixmap
+ (source, mask, &fg_color, &bg_color,
+ !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)) ?
+ XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii)) : 0,
+ !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)) ?
+ XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii)) : 0);
}
break;
@@ -1014,70 +966,18 @@
}
}
-static void
-xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, int width, int height,
- /* Note that data is in ext-format! */
- const char *bits)
-{
- Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
- Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
- struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- GdkPixmap *mask = 0;
- const Extbyte *gcc_may_you_rot_in_hell;
-
- if (!NILP (mask_data))
- {
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
- C_STRING_ALLOCA, gcc_may_you_rot_in_hell,
- Qfile_name);
- mask =
- pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
- XINT (XCAR (mask_data)),
- XINT (XCAR (XCDR (mask_data))),
- gcc_may_you_rot_in_hell);
- }
-
- init_image_instance_from_xbm_inline (ii, width, height, bits,
- instantiator, pointer_fg, pointer_bg,
- dest_mask, mask, mask_file);
-}
-
-/* Instantiate method for XBM's. */
-
-static void
-gtk_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- const char *gcc_go_home;
-
- assert (!NILP (data));
-
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (data))),
- C_STRING_ALLOCA, gcc_go_home,
- Qbinary);
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, XINT (XCAR (data)),
- XINT (XCAR (XCDR (data))), gcc_go_home);
-}
-
#ifdef HAVE_XPM
/**********************************************************************
* XPM *
**********************************************************************/
-
struct color_symbol
{
- Ibyte* name;
+ Ibyte * name;
GdkColor color;
};
-static struct color_symbol*
+static struct color_symbol *
extract_xpm_color_names (Lisp_Object device,
Lisp_Object domain,
Lisp_Object color_symbol_alist,
@@ -1096,7 +996,7 @@
error happens we don't lose any malloc()ed data, or more importantly,
leave any pixels allocated in the server. */
i = 0;
- LIST_LOOP (rest, color_symbol_alist)
+ OLD_LIST_LOOP (rest, color_symbol_alist)
{
Lisp_Object cons = XCAR (rest);
Lisp_Object name = XCAR (cons);
@@ -1120,7 +1020,7 @@
}
UNGCPRO; /* no more evaluation */
- *nsymbols=i;
+ *nsymbols = i;
if (i == 0) return 0;
colortbl = xnew_array_and_zero (struct color_symbol, i);
@@ -1187,7 +1087,7 @@
depth = DEVICE_GTK_DEPTH (XDEVICE (device));
visual = DEVICE_GTK_VISUAL (XDEVICE (device));
- gtk_initialize_pixmap_image_instance (ii, 1, type);
+ initialize_pixmap_image_instance (ii, 1, type);
assert (!NILP (data));
@@ -1196,7 +1096,7 @@
&nsymbols);
assert (!NILP (data));
- LISP_STRING_TO_EXTERNAL(data, dstring, Qbinary);
+ LISP_STRING_TO_EXTERNAL (data, dstring, Qbinary);
/*
* GTK only uses the 'c' color entry of an XPM and doesn't use the
symbolic
@@ -1213,7 +1113,7 @@
{
XpmImage image;
XpmInfo info;
- char** data;
+ Extbyte **data;
XpmCreateXpmImageFromBuffer ((char*) dstring, &image, &info);
@@ -1224,13 +1124,15 @@
for (j = 0; j < image.ncolors; j++)
{
if (image.colorTable[j].symbolic != NULL &&
- !qxestrcasecmp_ascii(color_symbols[i].name, image.colorTable[j].symbolic))
+ !qxestrcasecmp_ascii (color_symbols[i].name,
+ image.colorTable[j].symbolic))
{
image.colorTable[j].c_color = xnew_ascbytes (16);
- sprintf(image.colorTable[j].c_color, "#%.4x%.4x%.4x",
- color_symbols[i].color.red, color_symbols[i].color.green,
- color_symbols[i].color.blue);
+ sprintf (image.colorTable[j].c_color, "#%.4x%.4x%.4x",
+ color_symbols[i].color.red,
+ color_symbols[i].color.green,
+ color_symbols[i].color.blue);
}
}
}
@@ -1312,93 +1214,7 @@
#endif /* HAVE_XPM */
-#ifdef HAVE_XFACE
-
/**********************************************************************
- * X-Face *
- **********************************************************************/
-#if defined(EXTERN)
-/* This is about to get redefined! */
-#undef EXTERN
-#endif
-/* We have to define SYSV32 so that compface.h includes string.h
- instead of strings.h. */
-#define SYSV32
-BEGIN_C_DECLS
-#include <compface.h>
-END_C_DECLS
-
-/* JMP_BUF cannot be used here because if it doesn't get defined
- to jmp_buf we end up with a conflicting type error with the
- definition in compface.h */
-extern jmp_buf comp_env;
-#undef SYSV32
-
-static void
-gtk_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- int i, stattis;
- char *p, *bits, *bp;
- const char * volatile emsg = 0;
- const char * volatile dstring;
-
- assert (!NILP (data));
-
- LISP_STRING_TO_EXTERNAL (data, dstring, Qbinary);
-
- if ((p = strchr (dstring, ':')))
- {
- dstring = p + 1;
- }
-
- /* Must use setjmp not SETJMP because we used jmp_buf above not JMP_BUF */
- if (!(stattis = setjmp (comp_env)))
- {
- UnCompAll ((char *) dstring);
- UnGenFace ();
- }
-
- switch (stattis)
- {
- case -2:
- emsg = "uncompface: internal error";
- break;
- case -1:
- emsg = "uncompface: insufficient or invalid data";
- break;
- case 1:
- emsg = "uncompface: excess data ignored";
- break;
- }
-
- if (emsg)
- gui_error_2 (emsg, data, Qimage);
-
- bp = bits = (char *) ALLOCA (PIXELS / 8);
-
- /* the compface library exports char F[], which uses a single byte per
- pixel to represent a 48x48 bitmap. Yuck. */
- for (i = 0, p = F; i < (PIXELS / 8); ++i)
- {
- int n, b;
- /* reverse the bit order of each byte... */
- for (b = n = 0; b < 8; ++b)
- {
- n |= ((*p++) << b);
- }
- *bp++ = (char) n;
- }
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, 48, 48, bits);
-}
-
-#endif /* HAVE_XFACE */
-
-/**********************************************************************
* RESOURCES *
**********************************************************************/
@@ -1430,13 +1246,14 @@
extern guint symbol_to_enum (Lisp_Object, GtkType);
-static guint resource_name_to_resource (Lisp_Object name,
- enum image_instance_type type)
+static GdkCursorType
+resource_name_to_resource (Lisp_Object name,
+ enum image_instance_type type)
{
if (type == IMAGE_POINTER)
- return (symbol_to_enum (name, GTK_TYPE_GDK_CURSOR_TYPE));
+ return (GdkCursorType) symbol_to_enum (name, GTK_TYPE_GDK_CURSOR_TYPE);
else
- return (0);
+ return (GdkCursorType) 0;
}
static enum image_instance_type
@@ -1464,8 +1281,10 @@
GdkCursor *c = NULL;
enum image_instance_type type;
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- Lisp_Object resource_type = find_keyword_in_vector (instantiator, Q_resource_type);
- Lisp_Object resource_id = find_keyword_in_vector (instantiator, Q_resource_id);
+ Lisp_Object resource_type = find_keyword_in_vector (instantiator,
+ Q_resource_type);
+ Lisp_Object resource_id = find_keyword_in_vector (instantiator,
+ Q_resource_id);
if (!DEVICE_GTK_P (XDEVICE (device)))
gui_error ("Not a GTK device", device);
@@ -1483,8 +1302,8 @@
#endif
/* mess with the keyword info we were provided with */
- gtk_initialize_pixmap_image_instance (ii, 1, type);
- c = gdk_cursor_new ((GdkCursorType) resource_name_to_resource (resource_id, type));
+ initialize_pixmap_image_instance (ii, 1, type);
+ c = gdk_cursor_new (resource_name_to_resource (resource_id, type));
IMAGE_INSTANCE_GTK_CURSOR (ii) = c;
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = resource_id;
IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = 10;
@@ -1527,113 +1346,15 @@
/**********************************************************************
- * Autodetect *
+ * Autodetect *
**********************************************************************/
-static void
-autodetect_validate (Lisp_Object instantiator)
-{
- data_must_be_present (instantiator);
-}
-
-static Lisp_Object
-autodetect_normalize (Lisp_Object instantiator,
- Lisp_Object console_type,
- Lisp_Object UNUSED (dest_mask))
-{
- Lisp_Object file = find_keyword_in_vector (instantiator, Q_data);
- Lisp_Object filename = Qnil;
- Lisp_Object data = Qnil;
- struct gcpro gcpro1, gcpro2, gcpro3;
- Lisp_Object alist = Qnil;
-
- GCPRO3 (filename, data, alist);
-
- if (NILP (file)) /* no conversion necessary */
- RETURN_UNGCPRO (instantiator);
-
- alist = tagged_vector_to_alist (instantiator);
-
- filename = locate_pixmap_file (file);
- if (!NILP (filename))
- {
- int xhot, yhot;
- /* #### Apparently some versions of XpmReadFileToData, which is
- called by pixmap_to_lisp_data, don't return an error value
- if the given file is not a valid XPM file. Instead, they
- just seg fault. It is definitely caused by passing a
- bitmap. To try and avoid this we check for bitmaps first. */
-
- data = bitmap_to_lisp_data (filename, &xhot, &yhot, 1);
-
- if (!EQ (data, Qt))
- {
- alist = remassq_no_quit (Q_data, alist);
- alist = Fcons (Fcons (Q_file, filename),
- Fcons (Fcons (Q_data, data), alist));
- if (xhot != -1)
- alist = Fcons (Fcons (Q_hotspot_x, make_int (xhot)),
- alist);
- if (yhot != -1)
- alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)),
- alist);
-
- alist = xbm_mask_file_munging (alist, filename, Qnil, console_type);
-
- {
- Lisp_Object result = alist_to_tagged_vector (Qxbm, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
- }
-
-#ifdef HAVE_XPM
- data = pixmap_to_lisp_data (filename, 1);
-
- if (!EQ (data, Qt))
- {
- alist = remassq_no_quit (Q_data, alist);
- alist = Fcons (Fcons (Q_file, filename),
- Fcons (Fcons (Q_data, data), alist));
- alist = Fcons (Fcons (Q_color_symbols,
- evaluate_xpm_color_symbols ()),
- alist);
- {
- Lisp_Object result = alist_to_tagged_vector (Qxpm, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
- }
-#endif
- }
-
- /* If we couldn't convert it, just put it back as it is.
- We might try to further frob it later as a cursor-font
- specification. (We can't do that now because we don't know
- what dest-types it's going to be instantiated into.) */
- {
- Lisp_Object result = alist_to_tagged_vector (Qautodetect, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
-}
-
-static int
-autodetect_possible_dest_types (void)
-{
- return
- IMAGE_MONO_PIXMAP_MASK |
- IMAGE_COLOR_PIXMAP_MASK |
- IMAGE_POINTER_MASK |
- IMAGE_TEXT_MASK;
-}
-
static void
-autodetect_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object domain)
+gtk_autodetect_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator,
+ Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object domain)
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
struct gcpro gcpro1, gcpro2, gcpro3;
@@ -1646,13 +1367,7 @@
alist = tagged_vector_to_alist (instantiator);
if (dest_mask & IMAGE_POINTER_MASK)
{
- const char *name_ext;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, name_ext,
- Qfile_name);
-
- if (cursor_name_to_index (name_ext) != -1)
+ if (cursor_name_to_index ((CIbyte *) XSTRING_DATA (data)) != -1)
{
result = alist_to_tagged_vector (Qcursor_font, alist);
is_cursor_font = 1;
@@ -1664,8 +1379,8 @@
free_alist (alist);
if (is_cursor_font)
- cursor_font_instantiate (image_instance, result, pointer_fg,
- pointer_bg, dest_mask, domain);
+ gtk_cursor_font_instantiate (image_instance, result, pointer_fg,
+ pointer_bg, dest_mask, domain);
else
string_instantiate (image_instance, result, pointer_fg,
pointer_bg, dest_mask, domain);
@@ -1679,29 +1394,17 @@
**********************************************************************/
static void
-font_validate (Lisp_Object instantiator)
+gtk_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object UNUSED (domain))
{
- data_must_be_present (instantiator);
-}
-
-static int
-font_possible_dest_types (void)
-{
- return IMAGE_POINTER_MASK;
-}
-
-static void
-font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
/* This function can GC */
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
GdkColor fg, bg;
GdkFont *source, *mask;
- char source_name[PATH_MAX_INTERNAL], mask_name[PATH_MAX_INTERNAL], dummy;
+ Ibyte source_name[PATH_MAX_INTERNAL], mask_name[PATH_MAX_INTERNAL], dummy;
int source_char, mask_char;
int count;
Lisp_Object foreground, background;
@@ -1710,7 +1413,7 @@
gui_error ("Not a Gtk device", device);
if (!STRINGP (data) ||
- strncmp ("FONT ", (char *) XSTRING_DATA (data), 5))
+ strncmp ("FONT ", (CIbyte *) XSTRING_DATA (data), 5))
invalid_argument ("Invalid font-glyph instantiator",
instantiator);
@@ -1726,39 +1429,38 @@
generate_cursor_fg_bg (device, &foreground, &background, &fg, &bg);
- count = sscanf ((char *) XSTRING_DATA (data),
+ count = sscanf ((CIbyte *) XSTRING_DATA (data),
"FONT %s %d %s %d %c",
source_name, &source_char,
mask_name, &mask_char, &dummy);
/* Allow "%s %d %d" as well... */
- if (count == 3 && (1 == sscanf (mask_name, "%d %c", &mask_char,
&dummy)))
+ if (count == 3 && (1 == sscanf ((CIbyte *) mask_name, "%d %c",
&mask_char,
+ &dummy)))
count = 4, mask_name[0] = 0;
if (count != 2 && count != 4)
syntax_error ("invalid cursor specification", data);
- source = gdk_font_load (source_name);
+ source = gdk_font_load (C_STRING_TO_GTK_TEXT (source_name));
if (! source)
- gui_error_2 ("couldn't load font",
- build_string (source_name),
- data);
+ gui_error_2 ("couldn't load font", build_intstring (source_name),
data);
if (count == 2)
mask = 0;
else if (!mask_name[0])
mask = source;
else
{
- mask = gdk_font_load (mask_name);
+ mask = gdk_font_load (C_STRING_TO_GTK_TEXT (mask_name));
if (!mask)
/* continuable */
Fsignal (Qgui_error, list3 (build_msg_string ("couldn't load font"),
- build_string (mask_name), data));
+ build_intstring (mask_name), data));
}
if (!mask)
mask_char = 0;
/* #### call XQueryTextExtents() and check_pointer_sizes() here. */
- gtk_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
+ initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
IMAGE_INSTANCE_GTK_CURSOR (ii) = NULL;
@@ -1778,114 +1480,103 @@
/**********************************************************************
* Cursor-Font *
**********************************************************************/
-
-static void
-cursor_font_validate (Lisp_Object instantiator)
-{
- data_must_be_present (instantiator);
-}
-
-static int
-cursor_font_possible_dest_types (void)
-{
- return IMAGE_POINTER_MASK;
-}
-static char *__downcase (const char *name)
+static Ascbyte *
+__downcase (const Ascbyte *name)
{
- char *converted = strdup(name);
- char *work = converted;
+ Ascbyte *converted = strdup (name);
+ Ascbyte *work = converted;
- while (*work)
+ while (*work)
{
- *work = tolower(*work);
- work++;
+ *work = tolower (*work);
+ work++;
}
- return(converted);
+ return converted;
}
/* This is basically the equivalent of XmuCursorNameToIndex */
static GdkCursorType
-cursor_name_to_index (const char *name)
+cursor_name_to_index (const CIbyte *name)
{
- int i;
- static char *the_gdk_cursors[GDK_NUM_GLYPHS];
+ int i;
+ static Ascbyte *the_gdk_cursors[GDK_NUM_GLYPHS];
- if (!the_gdk_cursors[GDK_BASED_ARROW_UP])
+ if (!the_gdk_cursors[GDK_BASED_ARROW_UP])
{
- /* Need to initialize the array */
- /* Supposedly since this array is static it should be
- initialized to NULLs for us, but I'm very paranoid. */
- for (i = 0; i < GDK_NUM_GLYPHS; i++)
+ /* Need to initialize the array */
+ /* Supposedly since this array is static it should be
+ initialized to NULLs for us, but I'm very paranoid. */
+ for (i = 0; i < GDK_NUM_GLYPHS; i++)
{
- the_gdk_cursors[i] = NULL;
+ the_gdk_cursors[i] = NULL;
}
#define FROB_CURSOR(x) the_gdk_cursors[GDK_##x] = __downcase(#x)
- FROB_CURSOR(ARROW); FROB_CURSOR(BASED_ARROW_DOWN);
- FROB_CURSOR(BASED_ARROW_UP); FROB_CURSOR(BOAT);
- FROB_CURSOR(BOGOSITY); FROB_CURSOR(BOTTOM_LEFT_CORNER);
- FROB_CURSOR(BOTTOM_RIGHT_CORNER); FROB_CURSOR(BOTTOM_SIDE);
- FROB_CURSOR(BOTTOM_TEE); FROB_CURSOR(BOX_SPIRAL);
- FROB_CURSOR(CENTER_PTR); FROB_CURSOR(CIRCLE);
- FROB_CURSOR(CLOCK); FROB_CURSOR(COFFEE_MUG);
- FROB_CURSOR(CROSS); FROB_CURSOR(CROSS_REVERSE);
- FROB_CURSOR(CROSSHAIR); FROB_CURSOR(DIAMOND_CROSS);
- FROB_CURSOR(DOT); FROB_CURSOR(DOTBOX);
- FROB_CURSOR(DOUBLE_ARROW); FROB_CURSOR(DRAFT_LARGE);
- FROB_CURSOR(DRAFT_SMALL); FROB_CURSOR(DRAPED_BOX);
- FROB_CURSOR(EXCHANGE); FROB_CURSOR(FLEUR);
- FROB_CURSOR(GOBBLER); FROB_CURSOR(GUMBY);
- FROB_CURSOR(HAND1); FROB_CURSOR(HAND2);
- FROB_CURSOR(HEART); FROB_CURSOR(ICON);
- FROB_CURSOR(IRON_CROSS); FROB_CURSOR(LEFT_PTR);
- FROB_CURSOR(LEFT_SIDE); FROB_CURSOR(LEFT_TEE);
- FROB_CURSOR(LEFTBUTTON); FROB_CURSOR(LL_ANGLE);
- FROB_CURSOR(LR_ANGLE); FROB_CURSOR(MAN);
- FROB_CURSOR(MIDDLEBUTTON); FROB_CURSOR(MOUSE);
- FROB_CURSOR(PENCIL); FROB_CURSOR(PIRATE);
- FROB_CURSOR(PLUS); FROB_CURSOR(QUESTION_ARROW);
- FROB_CURSOR(RIGHT_PTR); FROB_CURSOR(RIGHT_SIDE);
- FROB_CURSOR(RIGHT_TEE); FROB_CURSOR(RIGHTBUTTON);
- FROB_CURSOR(RTL_LOGO); FROB_CURSOR(SAILBOAT);
- FROB_CURSOR(SB_DOWN_ARROW); FROB_CURSOR(SB_H_DOUBLE_ARROW);
- FROB_CURSOR(SB_LEFT_ARROW); FROB_CURSOR(SB_RIGHT_ARROW);
- FROB_CURSOR(SB_UP_ARROW); FROB_CURSOR(SB_V_DOUBLE_ARROW);
- FROB_CURSOR(SHUTTLE); FROB_CURSOR(SIZING);
- FROB_CURSOR(SPIDER); FROB_CURSOR(SPRAYCAN);
- FROB_CURSOR(STAR); FROB_CURSOR(TARGET);
- FROB_CURSOR(TCROSS); FROB_CURSOR(TOP_LEFT_ARROW);
- FROB_CURSOR(TOP_LEFT_CORNER); FROB_CURSOR(TOP_RIGHT_CORNER);
- FROB_CURSOR(TOP_SIDE); FROB_CURSOR(TOP_TEE);
- FROB_CURSOR(TREK); FROB_CURSOR(UL_ANGLE);
- FROB_CURSOR(UMBRELLA); FROB_CURSOR(UR_ANGLE);
- FROB_CURSOR(WATCH); FROB_CURSOR(XTERM);
- FROB_CURSOR(X_CURSOR);
+ FROB_CURSOR(ARROW); FROB_CURSOR(BASED_ARROW_DOWN);
+ FROB_CURSOR(BASED_ARROW_UP); FROB_CURSOR(BOAT);
+ FROB_CURSOR(BOGOSITY); FROB_CURSOR(BOTTOM_LEFT_CORNER);
+ FROB_CURSOR(BOTTOM_RIGHT_CORNER); FROB_CURSOR(BOTTOM_SIDE);
+ FROB_CURSOR(BOTTOM_TEE); FROB_CURSOR(BOX_SPIRAL);
+ FROB_CURSOR(CENTER_PTR); FROB_CURSOR(CIRCLE);
+ FROB_CURSOR(CLOCK); FROB_CURSOR(COFFEE_MUG);
+ FROB_CURSOR(CROSS); FROB_CURSOR(CROSS_REVERSE);
+ FROB_CURSOR(CROSSHAIR); FROB_CURSOR(DIAMOND_CROSS);
+ FROB_CURSOR(DOT); FROB_CURSOR(DOTBOX);
+ FROB_CURSOR(DOUBLE_ARROW); FROB_CURSOR(DRAFT_LARGE);
+ FROB_CURSOR(DRAFT_SMALL); FROB_CURSOR(DRAPED_BOX);
+ FROB_CURSOR(EXCHANGE); FROB_CURSOR(FLEUR);
+ FROB_CURSOR(GOBBLER); FROB_CURSOR(GUMBY);
+ FROB_CURSOR(HAND1); FROB_CURSOR(HAND2);
+ FROB_CURSOR(HEART); FROB_CURSOR(ICON);
+ FROB_CURSOR(IRON_CROSS); FROB_CURSOR(LEFT_PTR);
+ FROB_CURSOR(LEFT_SIDE); FROB_CURSOR(LEFT_TEE);
+ FROB_CURSOR(LEFTBUTTON); FROB_CURSOR(LL_ANGLE);
+ FROB_CURSOR(LR_ANGLE); FROB_CURSOR(MAN);
+ FROB_CURSOR(MIDDLEBUTTON); FROB_CURSOR(MOUSE);
+ FROB_CURSOR(PENCIL); FROB_CURSOR(PIRATE);
+ FROB_CURSOR(PLUS); FROB_CURSOR(QUESTION_ARROW);
+ FROB_CURSOR(RIGHT_PTR); FROB_CURSOR(RIGHT_SIDE);
+ FROB_CURSOR(RIGHT_TEE); FROB_CURSOR(RIGHTBUTTON);
+ FROB_CURSOR(RTL_LOGO); FROB_CURSOR(SAILBOAT);
+ FROB_CURSOR(SB_DOWN_ARROW); FROB_CURSOR(SB_H_DOUBLE_ARROW);
+ FROB_CURSOR(SB_LEFT_ARROW); FROB_CURSOR(SB_RIGHT_ARROW);
+ FROB_CURSOR(SB_UP_ARROW); FROB_CURSOR(SB_V_DOUBLE_ARROW);
+ FROB_CURSOR(SHUTTLE); FROB_CURSOR(SIZING);
+ FROB_CURSOR(SPIDER); FROB_CURSOR(SPRAYCAN);
+ FROB_CURSOR(STAR); FROB_CURSOR(TARGET);
+ FROB_CURSOR(TCROSS); FROB_CURSOR(TOP_LEFT_ARROW);
+ FROB_CURSOR(TOP_LEFT_CORNER); FROB_CURSOR(TOP_RIGHT_CORNER);
+ FROB_CURSOR(TOP_SIDE); FROB_CURSOR(TOP_TEE);
+ FROB_CURSOR(TREK); FROB_CURSOR(UL_ANGLE);
+ FROB_CURSOR(UMBRELLA); FROB_CURSOR(UR_ANGLE);
+ FROB_CURSOR(WATCH); FROB_CURSOR(XTERM);
+ FROB_CURSOR(X_CURSOR);
#undef FROB_CURSOR
}
- for (i = 0; i < GDK_NUM_GLYPHS; i++)
+ for (i = 0; i < GDK_NUM_GLYPHS; i++)
{
- if (!the_gdk_cursors[i]) continue;
- if (!strcmp (the_gdk_cursors[i], name))
+ if (!the_gdk_cursors[i]) continue;
+ if (!strcmp (the_gdk_cursors[i], name))
{
return (GdkCursorType) i;
}
}
- return (GdkCursorType) -1;
+ return (GdkCursorType) -1;
}
static void
-cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
+gtk_cursor_font_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator, Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg, int dest_mask,
+ Lisp_Object UNUSED (domain))
{
/* This function can GC */
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
GdkCursorType i;
- const char *name_ext;
Lisp_Object foreground, background;
if (!DEVICE_GTK_P (XDEVICE (device)))
@@ -1893,15 +1584,11 @@
if (!(dest_mask & IMAGE_POINTER_MASK))
incompatible_image_types (instantiator, dest_mask, IMAGE_POINTER_MASK);
-
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, name_ext,
- Qfile_name);
- if ((i = cursor_name_to_index (name_ext)) == -1)
+ if ((i = cursor_name_to_index ((CIbyte *) XSTRING_DATA (data))) == -1)
invalid_argument ("Unrecognized cursor-font name", data);
- gtk_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
+ initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
IMAGE_INSTANCE_GTK_CURSOR (ii) = gdk_cursor_new (i);
foreground = find_keyword_in_vector (instantiator, Q_foreground);
if (NILP (foreground))
@@ -1912,13 +1599,9 @@
maybe_recolor_cursor (image_instance, foreground, background);
}
-static int
-gtk_colorize_image_instance (Lisp_Object image_instance,
- Lisp_Object foreground, Lisp_Object background);
-
/************************************************************************/
-/* subwindow and widget support */
+/* subwindow and widget support */
/************************************************************************/
/* unmap the image if it is a widget. This is used by redisplay via
@@ -2093,11 +1776,13 @@
/* Possibly update the text. */
if (IMAGE_INSTANCE_TEXT_CHANGED (p))
{
- char* str;
+#if 0
+ /* #### Write this code BILL! */
Lisp_Object val = IMAGE_INSTANCE_WIDGET_TEXT (p);
- LISP_STRING_TO_EXTERNAL (val, str, Qnative);
+ gchar *str = LISP_STRING_TO_GTK_TEXT (val);
/* #### Need to special case each type of GtkWidget here! */
+#endif
}
/* Possibly update the size. */
@@ -2161,7 +1846,7 @@
#ifdef HAVE_WIDGETS
/************************************************************************/
-/* widgets */
+/* widgets */
/************************************************************************/
static void
update_widget_face (GtkWidget *w, Lisp_Image_Instance *ii,
@@ -2235,16 +1920,14 @@
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
Lisp_Object widget = Qnil;
- char *nm = NULL;
+ gchar *nm = NULL;
GtkWidget *w = NULL;
struct gcpro gcpro1;
IMAGE_INSTANCE_TYPE (ii) = IMAGE_WIDGET;
if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
- {
- LISP_STRING_TO_EXTERNAL (IMAGE_INSTANCE_WIDGET_TEXT (ii), nm, Qnative);
- }
+ nm = LISP_STRING_TO_GTK_TEXT (IMAGE_INSTANCE_WIDGET_TEXT (ii));
ii->data = xnew_and_zero (struct gtk_subwindow_data);
@@ -2466,13 +2149,13 @@
setup.
*/
static void
-gtk_add_tab_item(Lisp_Object image_instance,
- GtkNotebook* nb, Lisp_Object item,
- Lisp_Object domain, int UNUSED (i))
+gtk_add_tab_item (Lisp_Object image_instance,
+ GtkNotebook *nb, Lisp_Object item,
+ Lisp_Object domain, int UNUSED (i))
{
Lisp_Object name;
int hash_id = 0;
- char *c_name = NULL;
+ Extbyte *c_name = NULL;
GtkWidget* box;
if (GUI_ITEMP (item))
@@ -2481,13 +2164,14 @@
if (!STRINGP (pgui->name))
pgui->name = eval_within_redisplay (pgui->name);
-
- if (!STRINGP (pgui->name)) {
- warn_when_safe (Qredisplay, Qwarning,
- "Name does not evaluate to string");
- return;
- }
+ if (!STRINGP (pgui->name))
+ {
+ warn_when_safe (Qredisplay, Qwarning,
+ "Name does not evaluate to string");
+
+ return;
+ }
hash_id = gtk_register_gui_item (image_instance, item, domain);
name = pgui->name;
@@ -2498,9 +2182,7 @@
name = item;
}
- TO_EXTERNAL_FORMAT (LISP_STRING, name,
- C_STRING_ALLOCA, c_name,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (name, c_name, Vgtk_text_encoding);
/* Dummy widget that the notbook wants to display when a tab is selected. */
box = gtk_vbox_new (FALSE, 3);
@@ -2511,17 +2193,17 @@
worry about the garbage collector running between here and the callback
function.
*/
- gtk_object_set_data(GTK_OBJECT(box), GTK_DATA_TAB_HASHCODE_IDENTIFIER,
- (gpointer) hash_id);
+ gtk_object_set_data (GTK_OBJECT (box), GTK_DATA_TAB_HASHCODE_IDENTIFIER,
+ (gpointer) hash_id);
gtk_notebook_append_page (nb, box, gtk_label_new (c_name));
}
/* Signal handler for the switch-page signal. */
-static void gtk_tab_control_callback(GtkNotebook *notebook,
- GtkNotebookPage *page,
- gint UNUSED (page_num),
- gpointer UNUSED (user_data))
+static void gtk_tab_control_callback (GtkNotebook *notebook,
+ GtkNotebookPage *page,
+ gint UNUSED (page_num),
+ gpointer UNUSED (user_data))
{
/*
This callback is called for every selection, not just user selection.
@@ -2534,21 +2216,24 @@
Lisp_Object image_instance, callback, callback_ex;
Lisp_Object frame, event;
int update_subwindows_p = 0;
- struct frame *f = gtk_widget_to_frame(GTK_WIDGET(notebook));
+ struct frame *f = gtk_widget_to_frame (GTK_WIDGET (notebook));
int id;
if (!f)
return;
frame = wrap_frame (f);
- id = (int) gtk_object_get_data(GTK_OBJECT(page->child),
- GTK_DATA_TAB_HASHCODE_IDENTIFIER);
- image_instance = Fgethash(make_int_verify(id),
- FRAME_GTK_WIDGET_INSTANCE_HASH_TABLE(f), Qnil);
- callback = Fgethash(make_int(id),
- FRAME_GTK_WIDGET_CALLBACK_HASH_TABLE(f), Qnil);
- callback_ex = Fgethash(make_int(id),
- FRAME_GTK_WIDGET_CALLBACK_EX_HASH_TABLE(f), Qnil);
+ id= (int) gtk_object_get_data (GTK_OBJECT (page->child),
+ GTK_DATA_TAB_HASHCODE_IDENTIFIER);
+ image_instance = Fgethash (make_int_verify (id),
+ FRAME_GTK_WIDGET_INSTANCE_HASH_TABLE (f),
+ Qnil);
+ callback = Fgethash (make_int (id),
+ FRAME_GTK_WIDGET_CALLBACK_HASH_TABLE (f),
+ Qnil);
+ callback_ex = Fgethash (make_int (id),
+ FRAME_GTK_WIDGET_CALLBACK_EX_HASH_TABLE (f),
+ Qnil);
update_subwindows_p = 1;
/* It is possible for a widget action to cause it to get out of
@@ -2564,7 +2249,8 @@
XSET_EVENT_TYPE (event, misc_user_event);
XSET_EVENT_CHANNEL (event, frame);
XSET_EVENT_MISC_USER_FUNCTION (event, Qeval);
- XSET_EVENT_MISC_USER_OBJECT (event, list4 (Qfuncall, callback_ex, image_instance,
event));
+ XSET_EVENT_MISC_USER_OBJECT (event, list4 (Qfuncall, callback_ex,
+ image_instance, event));
}
else if (NILP (callback) || UNBOUNDP (callback))
event = Qnil;
@@ -2613,7 +2299,7 @@
nb = GTK_NOTEBOOK (IMAGE_INSTANCE_GTK_CLIPWIDGET (ii));
/* Add items to the tab, find the current selection */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
gtk_add_tab_item (image_instance, nb, XCAR (rest), domain, i);
@@ -2623,7 +2309,7 @@
i++;
}
- gtk_notebook_set_page(nb, selected);
+ gtk_notebook_set_page (nb, selected);
/* Call per-tab lisp callback when a tab is pressed. */
gtk_signal_connect (GTK_OBJECT (nb), "switch-page",
@@ -2653,7 +2339,7 @@
XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)) :
XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
if (gui_item_equal_sans_selected (XCAR (rest), selected, 0))
{
@@ -2669,8 +2355,8 @@
IMAGE_INSTANCE_WIDGET_ITEMS_CHANGED (ii) = 0;
IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii) = Qnil;
- gtk_notebook_set_page(GTK_NOTEBOOK (IMAGE_INSTANCE_GTK_CLIPWIDGET (ii)),
- i);
+ gtk_notebook_set_page
+ (GTK_NOTEBOOK (IMAGE_INSTANCE_GTK_CLIPWIDGET (ii)), i);
break;
}
@@ -2696,10 +2382,10 @@
i = 0;
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
{
- gtk_add_tab_item(image_instance, nb, XCAR(rest),
- IMAGE_INSTANCE_FRAME(ii), i);
+ gtk_add_tab_item (image_instance, nb, XCAR (rest),
+ IMAGE_INSTANCE_FRAME (ii), i);
}
/* Show all the new widgets we just added... */
@@ -2750,6 +2436,8 @@
CONSOLE_HAS_METHOD (gtk, locate_pixmap_file);
CONSOLE_HAS_METHOD (gtk, unmap_subwindow);
CONSOLE_HAS_METHOD (gtk, map_subwindow);
+ CONSOLE_HAS_METHOD (gtk, initialize_pixmap_image_instance_data);
+ CONSOLE_HAS_METHOD (gtk, xbm_instantiate_1);
CONSOLE_HAS_METHOD (gtk, redisplay_widget);
CONSOLE_HAS_METHOD (gtk, redisplay_subwindow);
}
@@ -2765,6 +2453,10 @@
IIFORMAT_VALID_CONSOLE (gtk, formatted_string);
IIFORMAT_VALID_CONSOLE (gtk, inherit);
#ifdef HAVE_XPM
+ IIFORMAT_VALID_CONSOLE (gtk, xbm);
+#ifdef HAVE_XFACE
+ IIFORMAT_VALID_CONSOLE (gtk, xface);
+#endif
INITIALIZE_DEVICE_IIFORMAT (gtk, xpm);
IIFORMAT_HAS_DEVMETHOD (gtk, xpm, instantiate);
#endif
@@ -2821,42 +2513,11 @@
IIFORMAT_HAS_DEVMETHOD (gtk, label, instantiate);
#endif
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
- IIFORMAT_VALID_CONSOLE (gtk, cursor_font);
-
- IIFORMAT_HAS_METHOD (cursor_font, validate);
- IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types);
- IIFORMAT_HAS_METHOD (cursor_font, instantiate);
-
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_data, check_valid_string);
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_foreground, check_valid_string);
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_background, check_valid_string);
-
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (font, "font");
- IIFORMAT_VALID_CONSOLE (gtk, font);
-
- IIFORMAT_HAS_METHOD (font, validate);
- IIFORMAT_HAS_METHOD (font, possible_dest_types);
- IIFORMAT_HAS_METHOD (font, instantiate);
-
- IIFORMAT_VALID_KEYWORD (font, Q_data, check_valid_string);
- IIFORMAT_VALID_KEYWORD (font, Q_foreground, check_valid_string);
- IIFORMAT_VALID_KEYWORD (font, Q_background, check_valid_string);
-
#ifdef HAVE_XPM
INITIALIZE_DEVICE_IIFORMAT (gtk, xpm);
IIFORMAT_HAS_DEVMETHOD (gtk, xpm, instantiate);
#endif
-#ifdef HAVE_XFACE
- INITIALIZE_DEVICE_IIFORMAT (gtk, xface);
- IIFORMAT_HAS_DEVMETHOD (gtk, xface, instantiate);
-#endif
-
- INITIALIZE_DEVICE_IIFORMAT (gtk, xbm);
- IIFORMAT_HAS_DEVMETHOD (gtk, xbm, instantiate);
- IIFORMAT_VALID_CONSOLE (gtk, xbm);
-
INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (gtk_resource, "gtk-resource");
IIFORMAT_VALID_CONSOLE (gtk, gtk_resource);
@@ -2869,24 +2530,19 @@
IIFORMAT_VALID_KEYWORD (gtk_resource, Q_resource_id, check_valid_resource_id);
IIFORMAT_VALID_KEYWORD (gtk_resource, Q_file, check_valid_string);
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (autodetect, "autodetect");
- IIFORMAT_VALID_CONSOLE (gtk, autodetect);
+ INITIALIZE_DEVICE_IIFORMAT (gtk, autodetect);
+ IIFORMAT_HAS_DEVMETHOD (gtk, autodetect, instantiate);
- IIFORMAT_HAS_METHOD (autodetect, validate);
- IIFORMAT_HAS_METHOD (autodetect, normalize);
- IIFORMAT_HAS_METHOD (autodetect, possible_dest_types);
- IIFORMAT_HAS_METHOD (autodetect, instantiate);
+ INITIALIZE_DEVICE_IIFORMAT (gtk, font);
+ IIFORMAT_HAS_DEVMETHOD (gtk, font, instantiate);
- IIFORMAT_VALID_KEYWORD (autodetect, Q_data, check_valid_string);
+ INITIALIZE_DEVICE_IIFORMAT (gtk, cursor_font);
+ IIFORMAT_HAS_DEVMETHOD (gtk, cursor_font, instantiate);
}
void
vars_of_glyphs_gtk (void)
{
-#ifdef HAVE_XFACE
- Fprovide (Qxface);
-#endif
-
DEFVAR_LISP ("gtk-bitmap-file-path", &Vgtk_bitmap_file_path /*
A list of the directories in which X bitmap files may be found.
If nil, this is initialized from the "*bitmapFilePath" resource.
@@ -2896,28 +2552,6 @@
Vgtk_bitmap_file_path = Qnil;
}
-void
-complex_vars_of_glyphs_gtk (void)
-{
-#define BUILD_GLYPH_INST(variable, name) \
- Fadd_spec_to_specifier \
- (GLYPH_IMAGE (XGLYPH (variable)), \
- vector3 (Qxbm, Q_data, \
- list3 (make_int (name##_width), \
- make_int (name##_height), \
- make_ext_string ((Extbyte*) name##_bits, \
- sizeof (name##_bits), \
- Qbinary))), \
- Qglobal, Qgtk, Qnil)
-
- BUILD_GLYPH_INST (Vtruncation_glyph, truncator);
- BUILD_GLYPH_INST (Vcontinuation_glyph, continuer);
- BUILD_GLYPH_INST (Vxemacs_logo, xemacs);
- BUILD_GLYPH_INST (Vhscroll_glyph, hscroll);
-
-#undef BUILD_GLYPH_INST
-}
-
/* X specific crap */
#include <gdk/gdkx.h>
/* #### Should remove all this X specific stuff when GTK/GDK matures a
@@ -2955,7 +2589,8 @@
gcv.foreground = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (foreground));
gcv.background = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (background));
gc = gdk_gc_new_with_values (new_pxmp, &gcv,
- (GdkGCValuesMask) (GDK_GC_BACKGROUND | GDK_GC_FOREGROUND));
+ (GdkGCValuesMask)
+ (GDK_GC_BACKGROUND | GDK_GC_FOREGROUND));
XCopyPlane (GDK_WINDOW_XDISPLAY (draw),
GDK_WINDOW_XWINDOW (IMAGE_INSTANCE_GTK_PIXMAP (p)),
@@ -2973,4 +2608,3 @@
return 1;
}
}
-
1.55.2.1 +55 -251 XEmacs/xemacs/src/glyphs-msw.c
Index: glyphs-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-msw.c,v
retrieving revision 1.55
retrieving revision 1.55.2.1
diff -u -r1.55 -r1.55.2.1
--- glyphs-msw.c 2005/01/24 23:33:57 1.55
+++ glyphs-msw.c 2005/02/15 01:20:28 1.55.2.1
@@ -67,16 +67,17 @@
#ifdef HAVE_GIF
DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif);
#endif
+#ifdef HAVE_XFACE
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xface);
+#endif
+
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xbm);
+
#ifdef HAVE_XPM
DEFINE_DEVICE_IIFORMAT (mswindows, xpm);
DEFINE_DEVICE_IIFORMAT (msprinter, xpm);
#endif
-DEFINE_DEVICE_IIFORMAT (mswindows, xbm);
-DEFINE_DEVICE_IIFORMAT (msprinter, xbm);
-#ifdef HAVE_XFACE
-DEFINE_DEVICE_IIFORMAT (mswindows, xface);
-DEFINE_DEVICE_IIFORMAT (msprinter, xface);
-#endif
+
DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout);
DEFINE_DEVICE_IIFORMAT (mswindows, native_layout);
DEFINE_DEVICE_IIFORMAT (mswindows, button);
@@ -99,10 +100,6 @@
Lisp_Object Qmswindows_resource;
static void
-mswindows_initialize_dibitmap_image_instance (Lisp_Image_Instance *ii,
- int slices,
- enum image_instance_type type);
-static void
mswindows_initialize_image_instance_mask (Lisp_Image_Instance *image,
HDC hcdc);
@@ -128,7 +125,8 @@
* only here.
* #### Add support for unscalable bitmaps.
*/
-static void init_image_instance_geometry (Lisp_Image_Instance *ii)
+static void
+init_image_instance_geometry (Lisp_Image_Instance *ii)
{
struct device *d = DOMAIN_XDEVICE (ii->domain);
@@ -316,7 +314,8 @@
return Qnil;
}
- if (locate_file (Vmswindows_bitmap_file_path, name, Qnil, &found, R_OK) < 0)
+ if (locate_file (Vmswindows_bitmap_file_path, name, Qnil, &found, R_OK)
+ < 0)
{
Lisp_Object temp = list1 (Vdata_directory);
struct gcpro gcpro1;
@@ -375,7 +374,7 @@
/* copy in the actual bitmap */
memcpy (bmp_buf, bmp_data, bmp_bits);
- mswindows_initialize_dibitmap_image_instance (ii, slices, type);
+ initialize_pixmap_image_instance (ii, slices, type);
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
find_keyword_in_vector (instantiator, Q_file);
@@ -746,7 +745,7 @@
error happens we don't lose any malloc()ed data, or more importantly,
leave any pixels allocated in the server. */
i = 0;
- LIST_LOOP (rest, color_symbol_alist)
+ OLD_LIST_LOOP (rest, color_symbol_alist)
{
Lisp_Object cons = XCAR (rest);
Lisp_Object name = XCAR (cons);
@@ -966,9 +965,7 @@
assert (!NILP (data));
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- ALLOCA, (bytes, len),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
/* in case we have color symbols */
color_symbols = extract_xpm_color_names (device, domain,
@@ -1053,9 +1050,7 @@
assert (!NILP (data));
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- ALLOCA, (bytes, len),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (data, bytes, len, Qbinary);
/* Then slurp the image into memory, decoding along the way.
The result is the image in a simple one-byte-per-pixel
@@ -1269,7 +1264,7 @@
if (hinst)
FreeLibrary (hinst);
- mswindows_initialize_dibitmap_image_instance (ii, 1, iitype);
+ initialize_pixmap_image_instance (ii, 1, iitype);
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = file;
IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii) =
@@ -1425,60 +1420,36 @@
return bitmap;
}
-/* Given inline data for a mono pixmap, initialize the given
- image instance accordingly. */
-
static void
-init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
- int width, int height,
- const Binbyte *bits,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask,
- HBITMAP mask,
- Lisp_Object UNUSED (mask_filename))
+mswindows_xbm_instantiate_1 (Lisp_Image_Instance *ii, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int width, int height, const Binbyte *bits,
+ enum image_instance_type type, Lisp_Object device,
+ Lisp_Object mask_data, Lisp_Object mask_file,
+ Lisp_Object foreground, Lisp_Object background)
{
- Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground);
- Lisp_Object background = find_keyword_in_vector (instantiator, Q_background);
- enum image_instance_type type;
+ HBITMAP mask = 0;
COLORREF black = PALETTERGB (0,0,0);
COLORREF white = PALETTERGB (255,255,255);
- HDC hdc;
+ HDC hdc = get_device_compdc (XDEVICE (device));
- CHECK_MSGDI_DEVICE (device);
-
- hdc = get_device_compdc (XDEVICE (device));
-
- if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) &&
- (dest_mask & IMAGE_COLOR_PIXMAP_MASK))
+ if (!NILP (mask_data))
{
- if (!NILP (foreground) || !NILP (background))
- type = IMAGE_COLOR_PIXMAP;
- else
- type = IMAGE_MONO_PIXMAP;
- }
- else if (dest_mask & IMAGE_MONO_PIXMAP_MASK)
- type = IMAGE_MONO_PIXMAP;
- else if (dest_mask & IMAGE_COLOR_PIXMAP_MASK)
- type = IMAGE_COLOR_PIXMAP;
- else if (dest_mask & IMAGE_POINTER_MASK)
- type = IMAGE_POINTER;
- else
- incompatible_image_types (instantiator, dest_mask,
- IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK
- | IMAGE_POINTER_MASK);
+ Binbyte *ext_data;
- mswindows_initialize_dibitmap_image_instance (ii, 1, type);
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (mask_data))), ext_data,
+ Qbinary);
+ mask = xbm_create_bitmap_from_data (hdc,
+ ext_data,
+ XINT (XCAR (mask_data)),
+ XINT (XCAR (XCDR (mask_data))),
+ FALSE,
+ PALETTERGB (0,0,0),
+ PALETTERGB (255,255,255));
+ }
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
- find_keyword_in_vector (instantiator, Q_file);
IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_WIDTH (ii) = width;
IMAGE_INSTANCE_MSWINDOWS_BITMAP_REAL_HEIGHT (ii) = height;
- IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = 1;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = make_int (0);
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = make_int (0);
init_image_instance_geometry (ii);
IMAGE_INSTANCE_MSWINDOWS_MASK (ii) = mask ? mask :
@@ -1555,151 +1526,6 @@
}
}
-static void
-xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, int width, int height,
- const Binbyte *bits)
-{
- Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
- Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- HDC hdc = get_device_compdc (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)));
- HBITMAP mask = 0;
-
- if (!NILP (mask_data))
- {
- Binbyte *ext_data;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (mask_data))),
- C_STRING_ALLOCA, ext_data,
- Qbinary);
- mask = xbm_create_bitmap_from_data (hdc,
- ext_data,
- XINT (XCAR (mask_data)),
- XINT (XCAR (XCDR (mask_data))),
- FALSE,
- PALETTERGB (0,0,0),
- PALETTERGB (255,255,255));
- }
-
- init_image_instance_from_xbm_inline (ii, width, height, bits,
- instantiator, pointer_fg, pointer_bg,
- dest_mask, mask, mask_file);
-}
-
-/* Instantiate method for XBM's. */
-
-static void
-mswindows_xbm_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- const Binbyte *ext_data;
-
- assert (!NILP (data));
-
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (XCDR (XCDR (data))),
- C_STRING_ALLOCA, ext_data,
- Qbinary);
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, XINT (XCAR (data)),
- XINT (XCAR (XCDR (data))), ext_data);
-}
-
-#ifdef HAVE_XFACE
-/**********************************************************************
- * X-Face *
- **********************************************************************/
-#if defined(EXTERN)
-/* This is about to get redefined! */
-#undef EXTERN
-#endif
-/* We have to define SYSV32 so that compface.h includes string.h
- instead of strings.h. */
-#define SYSV32
-BEGIN_C_DECLS
-#ifndef __STDC__ /* Needed to avoid prototype warnings */
-#define __STDC__
-#endif
-#include <compface.h>
-END_C_DECLS
-
-/* JMP_BUF cannot be used here because if it doesn't get defined
- to jmp_buf we end up with a conflicting type error with the
- definition in compface.h */
-extern jmp_buf comp_env;
-#undef SYSV32
-
-static void
-mswindows_xface_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- int i, stattis;
- Binbyte *p, *bits, *bp;
- const CIbyte * volatile emsg = 0;
- const Binbyte * volatile dstring;
-
- assert (!NILP (data));
-
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, dstring,
- Qbinary);
-
- if ((p = (Binbyte *) strchr ((char *) dstring, ':')))
- {
- dstring = p + 1;
- }
-
- /* Must use setjmp not SETJMP because we used jmp_buf above not JMP_BUF */
- if (!(stattis = setjmp (comp_env)))
- {
- UnCompAll ((char *) dstring);
- UnGenFace ();
- }
-
- switch (stattis)
- {
- case -2:
- emsg = "uncompface: internal error";
- break;
- case -1:
- emsg = "uncompface: insufficient or invalid data";
- break;
- case 1:
- emsg = "uncompface: excess data ignored";
- break;
- }
-
- if (emsg)
- signal_image_error_2 (emsg, data, Qimage);
-
- bp = bits = alloca_binbytes (PIXELS / 8);
-
- /* the compface library exports char F[], which uses a single byte per
- pixel to represent a 48x48 bitmap. Yuck. */
- for (i = 0, p = (Binbyte *) F; i < (PIXELS / 8); ++i)
- {
- int n, b;
- /* reverse the bit order of each byte... */
- for (b = n = 0; b < 8; ++b)
- {
- n |= ((*p++) << b);
- }
- *bp++ = (Binbyte) n;
- }
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, 48, 48, bits);
-}
-#endif /* HAVE_XFACE */
-
/************************************************************************/
/* image instance methods */
@@ -2186,26 +2012,11 @@
}
}
-/* Set all the slots in an image instance structure to reasonable
- default values. This is used somewhere within an instantiate
- method. It is assumed that the device slot within the image
- instance is already set -- this is the case when instantiate
- methods are called. */
-
static void
-mswindows_initialize_dibitmap_image_instance (Lisp_Image_Instance *ii,
- int slices,
- enum image_instance_type type)
+mswindows_initialize_pixmap_image_instance_data (Lisp_Image_Instance *ii,
+ int slices)
{
ii->data = xnew_and_zero (struct mswindows_image_instance_data);
- IMAGE_INSTANCE_TYPE (ii) = type;
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices;
IMAGE_INSTANCE_MSWINDOWS_BITMAP_SLICES (ii) =
xnew_array_and_zero (HBITMAP, slices);
}
@@ -2507,7 +2318,7 @@
/* get the first item */
parent = add_tree_item (image_instance, wnd, parent, XCAR (list), TRUE, domain);
/* recursively add items to the tree view */
- LIST_LOOP (rest, XCDR (list))
+ OLD_LIST_LOOP (rest, XCDR (list))
{
if (LISTP (XCAR (rest)))
add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
@@ -2542,7 +2353,7 @@
/* recursively add items to the tree view */
/* add items to the tab */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
if (LISTP (XCAR (rest)))
add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
@@ -2572,7 +2383,7 @@
/* recursively add items to the tree view */
/* add items to the tab */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
{
if (LISTP (XCAR (rest)))
add_tree_item_list (image_instance, wnd, parent, XCAR (rest),
@@ -2646,7 +2457,7 @@
flags, 0);
wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* add items to the tab */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
int idx = add_tab_item (image_instance, wnd, XCAR (rest), domain, i);
assert (idx == i);
@@ -2688,7 +2499,7 @@
XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)) :
XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
if (gui_item_equal_sans_selected (XCAR (rest), selected, 0))
{
@@ -2721,7 +2532,7 @@
qxeSendMessage (wnd, TCM_DELETEALLITEMS, 0, 0);
/* add items to the tab */
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
{
add_tab_item (image_instance, wnd, XCAR (rest),
IMAGE_INSTANCE_FRAME (ii), i);
@@ -2808,7 +2619,7 @@
wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
/* add items to the combo box */
qxeSendMessage (wnd, CB_RESETCONTENT, 0, 0);
- LIST_LOOP (rest, items)
+ OLD_LIST_LOOP (rest, items)
{
Extbyte *lparam;
LISP_STRING_TO_TSTR (XCAR (rest), lparam);
@@ -2928,8 +2739,7 @@
SIZE size;
SelectObject (hdc, mswindows_widget_hfont (face, domain, string));
- TO_EXTERNAL_FORMAT (LISP_STRING, string, ALLOCA, (str, len),
- Qmswindows_tstr);
+ LISP_STRING_TO_SIZED_EXTERNAL (string, str, len, Qmswindows_tstr);
qxeGetTextExtentPoint32 (hdc, str, len / XETCHAR_SIZE, &size);
*width = size.cx;
}
@@ -2962,6 +2772,8 @@
CONSOLE_HAS_METHOD (mswindows, image_instance_hash);
CONSOLE_HAS_METHOD (mswindows, init_image_instance_from_eimage);
CONSOLE_HAS_METHOD (mswindows, locate_pixmap_file);
+ CONSOLE_HAS_METHOD (mswindows, initialize_pixmap_image_instance_data);
+ CONSOLE_HAS_METHOD (mswindows, xbm_instantiate_1);
#ifdef HAVE_WIDGETS
CONSOLE_HAS_METHOD (mswindows, widget_query_string_geometry);
CONSOLE_HAS_METHOD (mswindows, widget_border_width);
@@ -2975,6 +2787,9 @@
CONSOLE_INHERITS_METHOD (msprinter, mswindows,
init_image_instance_from_eimage);
CONSOLE_INHERITS_METHOD (msprinter, mswindows, locate_pixmap_file);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows,
+ initialize_pixmap_image_instance_data);
+ CONSOLE_INHERITS_METHOD (msprinter, mswindows, xbm_instantiate_1);
}
void
@@ -2984,23 +2799,17 @@
IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, string);
IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, formatted_string);
IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, inherit);
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, xbm);
+#ifdef HAVE_XFACE
+ IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, xface);
+#endif
/* image-instantiator types */
- INITIALIZE_DEVICE_IIFORMAT (mswindows, xbm);
- INITIALIZE_DEVICE_IIFORMAT (msprinter, xbm);
- IIFORMAT_HAS_DEVMETHOD (mswindows, xbm, instantiate);
- IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xbm, instantiate);
#ifdef HAVE_XPM
INITIALIZE_DEVICE_IIFORMAT (mswindows, xpm);
INITIALIZE_DEVICE_IIFORMAT (msprinter, xpm);
IIFORMAT_HAS_DEVMETHOD (mswindows, xpm, instantiate);
IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xpm, instantiate);
#endif
-#ifdef HAVE_XFACE
- INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
- INITIALIZE_DEVICE_IIFORMAT (msprinter, xface);
- IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
- IIFORMAT_INHERITS_DEVMETHOD (msprinter, mswindows, xface, instantiate);
-#endif
#ifdef HAVE_JPEG
IIFORMAT_VALID_CONSOLE2 (mswindows, msprinter, jpeg);
#endif
@@ -3089,9 +2898,4 @@
This is used by the `make-image-instance' function.
*/ );
Vmswindows_bitmap_file_path = Qnil;
-}
-
-void
-complex_vars_of_glyphs_mswindows (void)
-{
}
1.8.4.1 +38 -1 XEmacs/xemacs/src/glyphs-shared.c
Index: glyphs-shared.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-shared.c,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -u -r1.8 -r1.8.4.1
--- glyphs-shared.c 2004/11/04 23:06:33 1.8
+++ glyphs-shared.c 2005/02/15 01:20:29 1.8.4.1
@@ -2,7 +2,7 @@
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems
- Copyright (C) 1995, 1996, 2001 Ben Wing
+ Copyright (C) 1995, 1996, 2001, 2003 Ben Wing
Copyright (C) 1995 Sun Microsystems
Copyright (C) 1998, 1999, 2000 Andy Piper.
@@ -46,6 +46,8 @@
#include "sysfile.h"
+#include "bitmaps.h"
+
Lisp_Object Q_resource_type, Q_resource_id;
void
@@ -338,4 +340,39 @@
{
DEFKEYWORD (Q_resource_id);
DEFKEYWORD (Q_resource_type);
+}
+
+void
+complex_vars_of_glyphs_shared (void)
+{
+#define BUILD_GLYPH_INST(variable, name, tag) \
+ Fadd_spec_to_specifier \
+ (GLYPH_IMAGE (XGLYPH (variable)), \
+ vector3 (Qxbm, Q_data, \
+ list3 (make_int (name##_width), \
+ make_int (name##_height), \
+ make_ext_string ((Extbyte *) name##_bits, \
+ sizeof (name##_bits), \
+ Qbinary))), \
+ Qglobal, tag, Qnil)
+
+#ifdef HAVE_X_WINDOWS
+ BUILD_GLYPH_INST (Vtruncation_glyph, truncator, Qx);
+ BUILD_GLYPH_INST (Vcontinuation_glyph, continuer, Qx);
+ BUILD_GLYPH_INST (Vxemacs_logo, xemacs, Qx);
+ BUILD_GLYPH_INST (Vhscroll_glyph, hscroll, Qx);
+#endif /* HAVE_X_WINDOWS */
+
+#ifdef HAVE_GTK
+ BUILD_GLYPH_INST (Vtruncation_glyph, truncator, Qx);
+ BUILD_GLYPH_INST (Vcontinuation_glyph, continuer, Qx);
+ BUILD_GLYPH_INST (Vxemacs_logo, xemacs, Qx);
+ BUILD_GLYPH_INST (Vhscroll_glyph, hscroll, Qx);
+#endif /* HAVE_GTK */
+
+#undef BUILD_GLYPH_INST
+
+ /* #### What gets handled on Windows? Obviously it DOES get handled, but
+ I don't know how. Maybe we're using a symbol out of a special
+ font. */
}
1.17.4.1 +8 -8 XEmacs/xemacs/src/glyphs-widget.c
Index: glyphs-widget.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-widget.c,v
retrieving revision 1.17
retrieving revision 1.17.4.1
diff -u -r1.17 -r1.17.4.1
--- glyphs-widget.c 2004/11/04 23:06:33 1.17
+++ glyphs-widget.c 2005/02/15 01:20:29 1.17.4.1
@@ -968,7 +968,7 @@
Lisp_Object rest;
int tw = 0, th = 0;
- LIST_LOOP (rest, items)
+ OLD_LIST_LOOP (rest, items)
{
int h, w;
@@ -1017,11 +1017,11 @@
pending_len);
if (len == pending_len)
{
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
Lisp_Object pending_rest;
found = 0;
- LIST_LOOP (pending_rest,
+ OLD_LIST_LOOP (pending_rest,
XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)))
{
if (gui_item_equal_sans_selected (XCAR (rest),
@@ -1061,7 +1061,7 @@
if (!NILP (items))
{
Lisp_Object rest;
- LIST_LOOP (rest, XCDR (items))
+ OLD_LIST_LOOP (rest, XCDR (items))
{
/* Substitute the new instantiator */
new_items = Fcons (normalize_image_instantiator (XCAR (rest),
@@ -1355,7 +1355,7 @@
}
/* Flip through the items to work out how much stuff we have to display */
- LIST_LOOP (rest, items)
+ OLD_LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
glyph_query_geometry (glyph, &gwidth, &gheight, disp, image_instance);
@@ -1472,7 +1472,7 @@
}
/* Flip through the items to work out how much stuff we have to display. */
- LIST_LOOP (rest, items)
+ OLD_LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
@@ -1538,7 +1538,7 @@
/* Now flip through putting items where we want them, paying
attention to justification. Make sure we don't mess with the
border glyph. */
- LIST_LOOP (rest, items)
+ OLD_LIST_LOOP (rest, items)
{
Lisp_Object glyph = XCAR (rest);
@@ -1625,7 +1625,7 @@
suitable instances and values set up. */
layout_layout (image_instance, width, height, xoffset, yoffset, domain);
- LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (ii))
+ OLD_LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (ii))
{
struct display_glyph_area dga;
dga.xoffset = 0;
1.82.2.1 +152 -508 XEmacs/xemacs/src/glyphs-x.c
Index: glyphs-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs-x.c,v
retrieving revision 1.82
retrieving revision 1.82.2.1
diff -u -r1.82 -r1.82.2.1
--- glyphs-x.c 2005/01/24 23:33:58 1.82
+++ glyphs-x.c 2005/02/15 01:20:31 1.82.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems
- Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 Ben Wing
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004, 2005 Ben Wing
Copyright (C) 1995 Sun Microsystems
Copyright (C) 1999, 2000, 2002 Andy Piper
@@ -83,8 +83,6 @@
#endif
#include <X11/IntrinsicP.h>
-#define LISP_DEVICE_TO_X_SCREEN(dev) XDefaultScreenOfDisplay (DEVICE_X_DISPLAY (XDEVICE
(dev)))
-
DECLARE_IMAGE_INSTANTIATOR_FORMAT (nothing);
DECLARE_IMAGE_INSTANTIATOR_FORMAT (string);
DECLARE_IMAGE_INSTANTIATOR_FORMAT (formatted_string);
@@ -101,21 +99,20 @@
#ifdef HAVE_GIF
DECLARE_IMAGE_INSTANTIATOR_FORMAT (gif);
#endif
-#ifdef HAVE_XPM
-DEFINE_DEVICE_IIFORMAT (x, xpm);
-#endif
-DEFINE_DEVICE_IIFORMAT (x, xbm);
-DEFINE_DEVICE_IIFORMAT (x, subwindow);
#ifdef HAVE_XFACE
-DEFINE_DEVICE_IIFORMAT (x, xface);
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xface);
#endif
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (cursor_font);
-Lisp_Object Qcursor_font;
+DECLARE_IMAGE_INSTANTIATOR_FORMAT (xbm);
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (font);
+#ifdef HAVE_XPM
+DEFINE_DEVICE_IIFORMAT (x, xpm);
+#endif
+DEFINE_DEVICE_IIFORMAT (x, subwindow);
-DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect);
+DEFINE_DEVICE_IIFORMAT (x, autodetect);
+DEFINE_DEVICE_IIFORMAT (x, font);
+DEFINE_DEVICE_IIFORMAT (x, cursor_font);
#ifdef HAVE_X_WIDGETS
DECLARE_IMAGE_INSTANTIATOR_FORMAT (layout);
@@ -131,12 +128,12 @@
DEFINE_DEVICE_IIFORMAT (x, label);
#endif
-static void cursor_font_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask,
- Lisp_Object domain);
+static void x_cursor_font_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator,
+ Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg,
+ int dest_mask,
+ Lisp_Object domain);
#ifdef HAVE_X_WIDGETS
static void update_widget_face (widget_value* wv,
@@ -150,8 +147,6 @@
void emacs_Xt_enqueue_focus_event (Widget wants_it, Lisp_Object frame,
int in_p);
-#include "bitmaps.h"
-
/************************************************************************/
/* image instance methods */
@@ -239,7 +234,7 @@
color.green = qtable->gm[i] ? qtable->gm[i] << 8 : 0;
color.blue = qtable->bm[i] ? qtable->bm[i] << 8 : 0;
color.flags = DoRed | DoGreen | DoBlue;
- res = allocate_nearest_color (dpy, cmap, vis, &color);
+ res = x_allocate_nearest_color (dpy, cmap, vis, &color);
if (res > 0 && res < 3)
{
DO_REALLOC(*pixtbl, pixcount, n+1, unsigned long);
@@ -351,8 +346,6 @@
return outimg;
}
-
-
static void
x_print_image_instance (Lisp_Image_Instance *p,
Lisp_Object printcharfun,
@@ -507,29 +500,63 @@
return 0;
}
}
+
+static int
+x_colorize_image_instance (Lisp_Object image_instance,
+ Lisp_Object foreground, Lisp_Object background)
+{
+ Lisp_Image_Instance *p;
-/* Set all the slots in an image instance structure to reasonable
- default values. This is used somewhere within an instantiate
- method. It is assumed that the device slot within the image
- instance is already set -- this is the case when instantiate
- methods are called. */
+ p = XIMAGE_INSTANCE (image_instance);
+
+ switch (IMAGE_INSTANCE_TYPE (p))
+ {
+ case IMAGE_MONO_PIXMAP:
+ IMAGE_INSTANCE_TYPE (p) = IMAGE_COLOR_PIXMAP;
+ /* Make sure there aren't two pointers to the same mask, causing
+ it to get freed twice. */
+ IMAGE_INSTANCE_PIXMAP_MASK (p) = 0;
+ break;
+
+ default:
+ return 0;
+ }
+
+ {
+ Display *dpy = DEVICE_X_DISPLAY (XDEVICE (IMAGE_INSTANCE_DEVICE (p)));
+ Drawable draw =
+ XtWindow (DEVICE_XT_APP_SHELL (XDEVICE (IMAGE_INSTANCE_DEVICE (p))));
+ Dimension d = DEVICE_X_DEPTH (XDEVICE (IMAGE_INSTANCE_DEVICE (p)));
+ Pixmap new = XCreatePixmap (dpy, draw,
+ IMAGE_INSTANCE_PIXMAP_WIDTH (p),
+ IMAGE_INSTANCE_PIXMAP_HEIGHT (p), d);
+ XColor color;
+ XGCValues gcv;
+ GC gc;
+ color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (foreground));
+ gcv.foreground = color.pixel;
+ color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (background));
+ gcv.background = color.pixel;
+ gc = XCreateGC (dpy, new, GCBackground|GCForeground, &gcv);
+ XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP (p), new, gc, 0, 0,
+ IMAGE_INSTANCE_PIXMAP_WIDTH (p),
+ IMAGE_INSTANCE_PIXMAP_HEIGHT (p),
+ 0, 0, 1);
+ XFreeGC (dpy, gc);
+ IMAGE_INSTANCE_X_PIXMAP (p) = new;
+ IMAGE_INSTANCE_PIXMAP_DEPTH (p) = d;
+ IMAGE_INSTANCE_PIXMAP_FG (p) = foreground;
+ IMAGE_INSTANCE_PIXMAP_BG (p) = background;
+ return 1;
+ }
+}
static void
-x_initialize_pixmap_image_instance (Lisp_Image_Instance *ii,
- int slices,
- enum image_instance_type type)
+x_initialize_pixmap_image_instance_data (Lisp_Image_Instance *ii,
+ int slices)
{
ii->data = xnew_and_zero (struct x_image_instance_data);
- IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices;
- IMAGE_INSTANCE_X_PIXMAP_SLICES (ii) =
- xnew_array_and_zero (Pixmap, slices);
- IMAGE_INSTANCE_TYPE (ii) = type;
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil;
- IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil;
+ IMAGE_INSTANCE_X_PIXMAP_SLICES (ii) = xnew_array_and_zero (Pixmap, slices);
}
@@ -638,12 +665,6 @@
}
}
-static Lisp_Object
-locate_pixmap_file (Lisp_Object name)
-{
- return x_locate_pixmap_file (name);
-}
-
/************************************************************************/
/* cursor functions */
@@ -787,7 +808,7 @@
XFreeGC (dpy, gc);
- x_initialize_pixmap_image_instance (ii, slices, IMAGE_COLOR_PIXMAP);
+ initialize_pixmap_image_instance (ii, slices, IMAGE_COLOR_PIXMAP);
IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
find_keyword_in_vector (instantiator, Q_file);
@@ -893,68 +914,42 @@
static Pixmap
pixmap_from_xbm_inline (Lisp_Object device, int width, int height,
- CBinbyte *bits)
+ const Binbyte *bits)
{
return XCreatePixmapFromBitmapData (DEVICE_X_DISPLAY (XDEVICE (device)),
XtWindow (DEVICE_XT_APP_SHELL
(XDEVICE (device))),
- bits, width, height,
+ (CBinbyte *) bits, width, height,
1, 0, 1);
}
-/* Given inline data for a mono pixmap, initialize the given
- image instance accordingly. */
-
static void
-init_image_instance_from_xbm_inline (Lisp_Image_Instance *ii,
- int width, int height,
- CBinbyte *bits,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask,
- Pixmap mask,
- Lisp_Object UNUSED (mask_filename))
+x_xbm_instantiate_1 (Lisp_Image_Instance *ii, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int width, int height, const Binbyte *bits,
+ enum image_instance_type type, Lisp_Object device,
+ Lisp_Object mask_data, Lisp_Object mask_file,
+ Lisp_Object foreground, Lisp_Object background)
{
- Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
- Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground);
- Lisp_Object background = find_keyword_in_vector (instantiator, Q_background);
- Display *dpy;
- Screen *scr;
- Drawable draw;
- enum image_instance_type type;
-
- if (!DEVICE_X_P (XDEVICE (device)))
- gui_error ("Not an X device", device);
-
- dpy = DEVICE_X_DISPLAY (XDEVICE (device));
- draw = XtWindow(DEVICE_XT_APP_SHELL (XDEVICE (device)));
- scr = DefaultScreenOfDisplay (dpy);
+ Pixmap mask = 0;
+ Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
+ Screen *scr = DefaultScreenOfDisplay (dpy);
+ Drawable draw = XtWindow (DEVICE_XT_APP_SHELL (XDEVICE (device)));
- if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) &&
- (dest_mask & IMAGE_COLOR_PIXMAP_MASK))
+ if (!NILP (mask_data))
{
- if (!NILP (foreground) || !NILP (background))
- type = IMAGE_COLOR_PIXMAP;
- else
- type = IMAGE_MONO_PIXMAP;
+ Binbyte *ext_data;
+
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (mask_data))), ext_data,
+ Qbinary);
+ mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
+ XINT (XCAR (mask_data)),
+ XINT (XCAR (XCDR (mask_data))),
+ ext_data);
}
- else if (dest_mask & IMAGE_MONO_PIXMAP_MASK)
- type = IMAGE_MONO_PIXMAP;
- else if (dest_mask & IMAGE_COLOR_PIXMAP_MASK)
- type = IMAGE_COLOR_PIXMAP;
- else if (dest_mask & IMAGE_POINTER_MASK)
- type = IMAGE_POINTER;
- else
- incompatible_image_types (instantiator, dest_mask,
- IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK
- | IMAGE_POINTER_MASK);
- x_initialize_pixmap_image_instance (ii, 1, type);
IMAGE_INSTANCE_PIXMAP_WIDTH (ii) = width;
IMAGE_INSTANCE_PIXMAP_HEIGHT (ii) = height;
- IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
- find_keyword_in_vector (instantiator, Q_file);
switch (type)
{
@@ -1002,7 +997,7 @@
break;
case IMAGE_POINTER:
- {
+ {
XColor fg_color, bg_color;
Pixmap source;
@@ -1041,53 +1036,6 @@
}
}
-static void
-xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, int width, int height,
- CBinbyte *bits)
-{
- Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
- Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
- Pixmap mask = 0;
-
- if (!NILP (mask_data))
- {
- CBinbyte *ext_data;
-
- LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (mask_data))), ext_data,
- Qbinary);
- mask = pixmap_from_xbm_inline (IMAGE_INSTANCE_DEVICE (ii),
- XINT (XCAR (mask_data)),
- XINT (XCAR (XCDR (mask_data))),
- ext_data);
- }
-
- init_image_instance_from_xbm_inline (ii, width, height, bits,
- instantiator, pointer_fg, pointer_bg,
- dest_mask, mask, mask_file);
-}
-
-/* Instantiate method for XBM's. */
-
-static void
-x_xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- CBinbyte *ext_data;
-
- assert (!NILP (data));
-
- LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (data))), ext_data, Qbinary);
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, XINT (XCAR (data)),
- XINT (XCAR (XCDR (data))), ext_data);
-}
-
#ifdef HAVE_XPM
@@ -1127,7 +1075,7 @@
error happens we don't lose any malloc()ed data, or more importantly,
leave any pixels allocated in the server. */
i = 0;
- LIST_LOOP (rest, color_symbol_alist)
+ OLD_LIST_LOOP (rest, color_symbol_alist)
{
Lisp_Object cons = XCAR (rest);
Lisp_Object name = XCAR (cons);
@@ -1166,8 +1114,8 @@
if (! XAllocColor (dpy, cmap, &color))
ABORT (); /* it must be allocable since we're just duplicating it */
- TO_EXTERNAL_FORMAT (LISP_STRING, XCAR (cons), C_STRING_MALLOC,
- symbols[i].name, Qctext);
+ LISP_STRING_TO_EXTERNAL_MALLOC (XCAR (cons), symbols[i].name,
+ Qx_color_name_encoding);
symbols[i].pixel = color.pixel;
symbols[i].value = 0;
free_cons (cons);
@@ -1252,7 +1200,7 @@
visual = DEVICE_X_VISUAL (XDEVICE(device));
#endif
- x_initialize_pixmap_image_instance (ii, 1, type);
+ initialize_pixmap_image_instance (ii, 1, type);
assert (!NILP (data));
@@ -1288,7 +1236,7 @@
{
Extbyte *dataext;
- LISP_STRING_TO_EXTERNAL (data, dataext, Qctext);
+ LISP_STRING_TO_EXTERNAL (data, dataext, Qx_xpm_data_encoding);
result =
XpmCreatePixmapFromBuffer (dpy,
@@ -1533,203 +1481,16 @@
#endif /* HAVE_XPM */
-#ifdef HAVE_XFACE
-
-/**********************************************************************
- * X-Face *
- **********************************************************************/
-#if defined(EXTERN)
-/* This is about to get redefined! */
-#undef EXTERN
-#endif
-/* We have to define SYSV32 so that compface.h includes string.h
- instead of strings.h. */
-#define SYSV32
-BEGIN_C_DECLS
-#include <compface.h>
-END_C_DECLS
-
-/* JMP_BUF cannot be used here because if it doesn't get defined
- to jmp_buf we end up with a conflicting type error with the
- definition in compface.h */
-extern jmp_buf comp_env;
-#undef SYSV32
-
-static void
-x_xface_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
- Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
- int i, stattis;
- Binbyte *p, *bits, *bp;
- const CIbyte * volatile emsg = 0;
- const Binbyte * volatile dstring;
-
- assert (!NILP (data));
-
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- C_STRING_ALLOCA, dstring,
- Qbinary);
-
- if ((p = (Binbyte *) strchr ((char *) dstring, ':')))
- {
- dstring = p + 1;
- }
-
- /* Must use setjmp not SETJMP because we used jmp_buf above not JMP_BUF */
- if (!(stattis = setjmp (comp_env)))
- {
- UnCompAll ((char *) dstring);
- UnGenFace ();
- }
-
- switch (stattis)
- {
- case -2:
- emsg = "uncompface: internal error";
- break;
- case -1:
- emsg = "uncompface: insufficient or invalid data";
- break;
- case 1:
- emsg = "uncompface: excess data ignored";
- break;
- }
-
- if (emsg)
- signal_image_error_2 (emsg, data, Qimage);
-
- bp = bits = alloca_binbytes (PIXELS / 8);
-
- /* the compface library exports char F[], which uses a single byte per
- pixel to represent a 48x48 bitmap. Yuck. */
- for (i = 0, p = (Binbyte *) F; i < (PIXELS / 8); ++i)
- {
- int n, b;
- /* reverse the bit order of each byte... */
- for (b = n = 0; b < 8; ++b)
- {
- n |= ((*p++) << b);
- }
- *bp++ = (Binbyte) n;
- }
-
- xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
- pointer_bg, dest_mask, 48, 48, (CBinbyte *) bits);
-}
-
-#endif /* HAVE_XFACE */
-
-
/**********************************************************************
- * Autodetect *
+ * Autodetect *
**********************************************************************/
-static void
-autodetect_validate (Lisp_Object instantiator)
-{
- data_must_be_present (instantiator);
-}
-
-static Lisp_Object
-autodetect_normalize (Lisp_Object instantiator,
- Lisp_Object console_type,
- Lisp_Object UNUSED (dest_mask))
-{
- Lisp_Object file = find_keyword_in_vector (instantiator, Q_data);
- Lisp_Object filename = Qnil;
- Lisp_Object data = Qnil;
- struct gcpro gcpro1, gcpro2, gcpro3;
- Lisp_Object alist = Qnil;
-
- GCPRO3 (filename, data, alist);
-
- if (NILP (file)) /* no conversion necessary */
- RETURN_UNGCPRO (instantiator);
-
- alist = tagged_vector_to_alist (instantiator);
-
- filename = locate_pixmap_file (file);
- if (!NILP (filename))
- {
- int xhot, yhot;
- /* #### Apparently some versions of XpmReadFileToData, which is
- called by pixmap_to_lisp_data, don't return an error value
- if the given file is not a valid XPM file. Instead, they
- just seg fault. It is definitely caused by passing a
- bitmap. To try and avoid this we check for bitmaps first. */
-
- data = bitmap_to_lisp_data (filename, &xhot, &yhot, 1);
-
- if (!EQ (data, Qt))
- {
- alist = remassq_no_quit (Q_data, alist);
- alist = Fcons (Fcons (Q_file, filename),
- Fcons (Fcons (Q_data, data), alist));
- if (xhot != -1)
- alist = Fcons (Fcons (Q_hotspot_x, make_int (xhot)),
- alist);
- if (yhot != -1)
- alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)),
- alist);
-
- alist = xbm_mask_file_munging (alist, filename, Qnil, console_type);
-
- {
- Lisp_Object result = alist_to_tagged_vector (Qxbm, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
- }
-
-#ifdef HAVE_XPM
- data = pixmap_to_lisp_data (filename, 1);
-
- if (!EQ (data, Qt))
- {
- alist = remassq_no_quit (Q_data, alist);
- alist = Fcons (Fcons (Q_file, filename),
- Fcons (Fcons (Q_data, data), alist));
- alist = Fcons (Fcons (Q_color_symbols,
- evaluate_xpm_color_symbols ()),
- alist);
- {
- Lisp_Object result = alist_to_tagged_vector (Qxpm, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
- }
-#endif
- }
-
- /* If we couldn't convert it, just put it back as it is.
- We might try to further frob it later as a cursor-font
- specification. (We can't do that now because we don't know
- what dest-types it's going to be instantiated into.) */
- {
- Lisp_Object result = alist_to_tagged_vector (Qautodetect, alist);
- free_alist (alist);
- RETURN_UNGCPRO (result);
- }
-}
-
-static int
-autodetect_possible_dest_types (void)
-{
- return
- IMAGE_MONO_PIXMAP_MASK |
- IMAGE_COLOR_PIXMAP_MASK |
- IMAGE_POINTER_MASK |
- IMAGE_TEXT_MASK;
-}
-
static void
-autodetect_instantiate (Lisp_Object image_instance,
- Lisp_Object instantiator,
- Lisp_Object pointer_fg,
- Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object domain)
+x_autodetect_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator,
+ Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object domain)
{
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
struct gcpro gcpro1, gcpro2, gcpro3;
@@ -1756,8 +1517,8 @@
free_alist (alist);
if (is_cursor_font)
- cursor_font_instantiate (image_instance, result, pointer_fg,
- pointer_bg, dest_mask, domain);
+ x_cursor_font_instantiate (image_instance, result, pointer_fg,
+ pointer_bg, dest_mask, domain);
else
string_instantiate (image_instance, result, pointer_fg,
pointer_bg, dest_mask, domain);
@@ -1770,12 +1531,6 @@
* Font *
**********************************************************************/
-static void
-font_validate (Lisp_Object instantiator)
-{
- data_must_be_present (instantiator);
-}
-
/* XmuCvtStringToCursor is bogus in the following ways:
- When it can't convert the given string to a real cursor, it will
@@ -1812,7 +1567,7 @@
XLoadFont_got_error = 0;
XSync (dpy, 0);
old_handler = XSetErrorHandler (XLoadFont_error_handler);
- C_STRING_TO_EXTERNAL (name, nameext, Qfile_name);
+ C_STRING_TO_EXTERNAL (name, nameext, Qx_font_name_encoding);
font = XLoadFont (dpy, nameext);
XSync (dpy, 0);
XSetErrorHandler (old_handler);
@@ -1820,16 +1575,10 @@
return font;
}
-static int
-font_possible_dest_types (void)
-{
- return IMAGE_POINTER_MASK;
-}
-
static void
-font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
+x_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object UNUSED (domain))
{
/* This function can GC */
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
@@ -1849,7 +1598,7 @@
dpy = DEVICE_X_DISPLAY (XDEVICE (device));
if (!STRINGP (data) ||
- strncmp ("FONT ", (char *) XSTRING_DATA (data), 5))
+ strncmp ("FONT ", (CIbyte *) XSTRING_DATA (data), 5))
invalid_argument ("Invalid font-glyph instantiator",
instantiator);
@@ -1865,12 +1614,12 @@
generate_cursor_fg_bg (device, &foreground, &background, &fg, &bg);
- count = sscanf ((char *) XSTRING_DATA (data),
+ count = sscanf ((CIbyte *) XSTRING_DATA (data),
"FONT %s %d %s %d %c",
source_name, &source_char,
mask_name, &mask_char, &dummy);
/* Allow "%s %d %d" as well... */
- if (count == 3 && (1 == sscanf ((char *) mask_name, "%d %c",
&mask_char,
+ if (count == 3 && (1 == sscanf ((CIbyte *) mask_name, "%d %c",
&mask_char,
&dummy)))
count = 4, mask_name[0] = 0;
@@ -1897,7 +1646,7 @@
/* #### call XQueryTextExtents() and check_pointer_sizes() here. */
- x_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
+ initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
IMAGE_INSTANCE_X_CURSOR (ii) =
XCreateGlyphCursor (dpy, source, mask, source_char, mask_char,
&fg, &bg);
@@ -1913,22 +1662,11 @@
**********************************************************************/
static void
-cursor_font_validate (Lisp_Object instantiator)
+x_cursor_font_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator, Lisp_Object pointer_fg,
+ Lisp_Object pointer_bg, int dest_mask,
+ Lisp_Object UNUSED (domain))
{
- data_must_be_present (instantiator);
-}
-
-static int
-cursor_font_possible_dest_types (void)
-{
- return IMAGE_POINTER_MASK;
-}
-
-static void
-cursor_font_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
- Lisp_Object pointer_fg, Lisp_Object pointer_bg,
- int dest_mask, Lisp_Object UNUSED (domain))
-{
/* This function can GC */
Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
@@ -1950,7 +1688,7 @@
if ((i = XmuCursorNameToIndex (name_ext)) == -1)
invalid_argument ("Unrecognized cursor-font name", data);
- x_initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
+ initialize_pixmap_image_instance (ii, 1, IMAGE_POINTER);
IMAGE_INSTANCE_X_CURSOR (ii) = XCreateFontCursor (dpy, i);
foreground = find_keyword_in_vector (instantiator, Q_foreground);
if (NILP (foreground))
@@ -1961,58 +1699,9 @@
maybe_recolor_cursor (image_instance, foreground, background);
}
-static int
-x_colorize_image_instance (Lisp_Object image_instance,
- Lisp_Object foreground, Lisp_Object background)
-{
- Lisp_Image_Instance *p;
-
- p = XIMAGE_INSTANCE (image_instance);
-
- switch (IMAGE_INSTANCE_TYPE (p))
- {
- case IMAGE_MONO_PIXMAP:
- IMAGE_INSTANCE_TYPE (p) = IMAGE_COLOR_PIXMAP;
- /* Make sure there aren't two pointers to the same mask, causing
- it to get freed twice. */
- IMAGE_INSTANCE_PIXMAP_MASK (p) = 0;
- break;
-
- default:
- return 0;
- }
-
- {
- Display *dpy = DEVICE_X_DISPLAY (XDEVICE (IMAGE_INSTANCE_DEVICE (p)));
- Drawable draw = XtWindow(DEVICE_XT_APP_SHELL (XDEVICE (IMAGE_INSTANCE_DEVICE
(p))));
- Dimension d = DEVICE_X_DEPTH (XDEVICE (IMAGE_INSTANCE_DEVICE (p)));
- Pixmap new = XCreatePixmap (dpy, draw,
- IMAGE_INSTANCE_PIXMAP_WIDTH (p),
- IMAGE_INSTANCE_PIXMAP_HEIGHT (p), d);
- XColor color;
- XGCValues gcv;
- GC gc;
- color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (foreground));
- gcv.foreground = color.pixel;
- color = COLOR_INSTANCE_X_COLOR (XCOLOR_INSTANCE (background));
- gcv.background = color.pixel;
- gc = XCreateGC (dpy, new, GCBackground|GCForeground, &gcv);
- XCopyPlane (dpy, IMAGE_INSTANCE_X_PIXMAP (p), new, gc, 0, 0,
- IMAGE_INSTANCE_PIXMAP_WIDTH (p),
- IMAGE_INSTANCE_PIXMAP_HEIGHT (p),
- 0, 0, 1);
- XFreeGC (dpy, gc);
- IMAGE_INSTANCE_X_PIXMAP (p) = new;
- IMAGE_INSTANCE_PIXMAP_DEPTH (p) = d;
- IMAGE_INSTANCE_PIXMAP_FG (p) = foreground;
- IMAGE_INSTANCE_PIXMAP_BG (p) = background;
- return 1;
- }
-}
-
/************************************************************************/
-/* subwindow and widget support */
+/* subwindow and widget support */
/************************************************************************/
/* unmap the image if it is a widget. This is used by redisplay via
@@ -2267,7 +1956,8 @@
#if 0
-/* #### Should this function exist? If there's any doubt I'm not implementing
it --andyp */
+/* #### Should this function exist? If there's any doubt I'm not
+ implementing it --andyp */
DEFUN ("change-subwindow-property", Fchange_subwindow_property, 3, 3, 0, /*
For the given SUBWINDOW, set PROPERTY to DATA, which is a string.
Subwindows are not currently implemented.
@@ -2279,21 +1969,32 @@
Display *dpy;
Extbyte *propext, *dataext;
Bytecount datalen;
+ enum external_x_data datatype;
+ Atom type_atom = XA_STRING;
+ struct device *d;
CHECK_SUBWINDOW (subwindow);
CHECK_STRING (property);
CHECK_STRING (data);
sw = XSUBWINDOW (subwindow);
- dpy = DisplayOfScreen (LISP_DEVICE_TO_X_SCREEN
- (FRAME_DEVICE (XFRAME (sw->frame))));
+ d = FRAME_DEVICE (XFRAME (sw->frame));
+ dpy = DEVICE_X_DISPLAY (d);
+
+ LISP_STRING_TO_EXTERNAL (property, propext, Qx_atom_name_encoding);
+
+ datatype = x_convert_to_external_property_data (XSTRING_DATA (data),
+ XSTRING_LENGTH (data),
+ &dataext, &datalen);
- LISP_TO_EXTERNAL (property, propext, Qctext);
- TO_EXTERNAL_FORMAT (LISP_STRING, data,
- ALLOCA, (dataext, datalen), Qctext);
+ if (datatype == X_COMPOUND_TEXT)
+ type_atom = DEVICE_XATOM_COMPOUND_TEXT (d);
+
property_atom = XInternAtom (dpy, propext, False);
- XChangeProperty (dpy, sw->subwindow, property_atom, XA_STRING, 8,
+ XChangeProperty (dpy, sw->subwindow, property_atom, type_atom, 8,
PropModeReplace, dataext, datalen);
+ if (datatype != X_ASCII)
+ xfree (dataext);
return property;
}
#endif
@@ -2302,7 +2003,7 @@
#ifdef HAVE_X_WIDGETS
/************************************************************************/
-/* widgets */
+/* widgets */
/************************************************************************/
static void
@@ -2700,7 +2401,7 @@
XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)) :
XCDR (IMAGE_INSTANCE_WIDGET_PENDING_ITEMS (ii)));
- LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
+ OLD_LIST_LOOP (rest, XCDR (IMAGE_INSTANCE_WIDGET_ITEMS (ii)))
{
if (gui_item_equal_sans_selected (XCAR (rest), selected, 0))
{
@@ -2811,6 +2512,8 @@
CONSOLE_HAS_METHOD (x, locate_pixmap_file);
CONSOLE_HAS_METHOD (x, unmap_subwindow);
CONSOLE_HAS_METHOD (x, map_subwindow);
+ CONSOLE_HAS_METHOD (x, initialize_pixmap_image_instance_data);
+ CONSOLE_HAS_METHOD (x, xbm_instantiate_1);
CONSOLE_HAS_METHOD (x, redisplay_widget);
CONSOLE_HAS_METHOD (x, redisplay_subwindow);
CONSOLE_HAS_METHOD (x, widget_border_width);
@@ -2826,6 +2529,10 @@
#endif
IIFORMAT_VALID_CONSOLE (x, formatted_string);
IIFORMAT_VALID_CONSOLE (x, inherit);
+ IIFORMAT_VALID_CONSOLE (x, xbm);
+#ifdef HAVE_XFACE
+ IIFORMAT_VALID_CONSOLE (x, xface);
+#endif
#ifdef HAVE_XPM
INITIALIZE_DEVICE_IIFORMAT (x, xpm);
IIFORMAT_HAS_DEVMETHOD (x, xpm, instantiate);
@@ -2842,8 +2549,6 @@
#ifdef HAVE_GIF
IIFORMAT_VALID_CONSOLE (x, gif);
#endif
- INITIALIZE_DEVICE_IIFORMAT (x, xbm);
- IIFORMAT_HAS_DEVMETHOD (x, xbm, instantiate);
INITIALIZE_DEVICE_IIFORMAT (x, subwindow);
IIFORMAT_HAS_DEVMETHOD (x, subwindow, instantiate);
@@ -2880,54 +2585,15 @@
INITIALIZE_DEVICE_IIFORMAT (x, label);
IIFORMAT_HAS_DEVMETHOD (x, label, instantiate);
#endif
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
- IIFORMAT_VALID_CONSOLE (x, cursor_font);
- IIFORMAT_HAS_METHOD (cursor_font, validate);
- IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types);
- IIFORMAT_HAS_METHOD (cursor_font, instantiate);
-
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_data, check_valid_string);
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_foreground, check_valid_string);
- IIFORMAT_VALID_KEYWORD (cursor_font, Q_background, check_valid_string);
-
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (font, "font");
-
- IIFORMAT_HAS_METHOD (font, validate);
- IIFORMAT_HAS_METHOD (font, possible_dest_types);
- IIFORMAT_HAS_METHOD (font, instantiate);
- IIFORMAT_VALID_CONSOLE (x, font);
-
- IIFORMAT_VALID_KEYWORD (font, Q_data, check_valid_string);
- IIFORMAT_VALID_KEYWORD (font, Q_foreground, check_valid_string);
- IIFORMAT_VALID_KEYWORD (font, Q_background, check_valid_string);
+ INITIALIZE_DEVICE_IIFORMAT (x, autodetect);
+ IIFORMAT_HAS_DEVMETHOD (x, autodetect, instantiate);
-#ifdef HAVE_XFACE
- INITIALIZE_DEVICE_IIFORMAT (x, xface);
- IIFORMAT_HAS_DEVMETHOD (x, xface, instantiate);
-#endif
-
- INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (autodetect,
- "autodetect");
+ INITIALIZE_DEVICE_IIFORMAT (x, font);
+ IIFORMAT_HAS_DEVMETHOD (x, font, instantiate);
- IIFORMAT_HAS_METHOD (autodetect, validate);
- IIFORMAT_HAS_METHOD (autodetect, normalize);
- IIFORMAT_HAS_METHOD (autodetect, possible_dest_types);
- /* #### autodetect is flawed IMO:
- 1. It makes the assumption that you can detect whether the user
- wanted a cursor or a string based on the data, since the data is a
- string you have to prioritise cursors. Instead we will force users
- to pick the appropriate image type, this is what we do under
- MS-Windows anyway.
- 2. It doesn't fit with the new domain model - you cannot tell which
- domain it needs to be instantiated in until you've actually
- instantiated it, which mucks up caching.
- 3. It only copes with cursors and strings which seems bogus. */
- IIFORMAT_HAS_SHARED_METHOD (autodetect, governing_domain, subwindow);
- IIFORMAT_HAS_METHOD (autodetect, instantiate);
- IIFORMAT_VALID_CONSOLE (x, autodetect);
-
- IIFORMAT_VALID_KEYWORD (autodetect, Q_data, check_valid_string);
+ INITIALIZE_DEVICE_IIFORMAT (x, cursor_font);
+ IIFORMAT_HAS_DEVMETHOD (x, cursor_font, instantiate);
}
void
@@ -2940,26 +2606,4 @@
the environment variable XBMLANGPATH is set, it is consulted first).
*/ );
Vx_bitmap_file_path = Qnil;
-}
-
-void
-complex_vars_of_glyphs_x (void)
-{
-#define BUILD_GLYPH_INST(variable, name) \
- Fadd_spec_to_specifier \
- (GLYPH_IMAGE (XGLYPH (variable)), \
- vector3 (Qxbm, Q_data, \
- list3 (make_int (name##_width), \
- make_int (name##_height), \
- make_ext_string ((Extbyte *) name##_bits, \
- sizeof (name##_bits), \
- Qbinary))), \
- Qglobal, Qx, Qnil)
-
- BUILD_GLYPH_INST (Vtruncation_glyph, truncator);
- BUILD_GLYPH_INST (Vcontinuation_glyph, continuer);
- BUILD_GLYPH_INST (Vxemacs_logo, xemacs);
- BUILD_GLYPH_INST (Vhscroll_glyph, hscroll);
-
-#undef BUILD_GLYPH_INST
}
1.51.2.1 +383 -27 XEmacs/xemacs/src/glyphs.c
Index: glyphs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.c,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -u -r1.51 -r1.51.2.1
--- glyphs.c 2005/02/03 16:14:06 1.51
+++ glyphs.c 2005/02/15 01:20:33 1.51.2.1
@@ -1,7 +1,7 @@
/* Generic glyph/image implementation + display tables
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems
- Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004 Ben Wing
+ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing
Copyright (C) 1995 Sun Microsystems
Copyright (C) 1998, 1999, 2000 Andy Piper
@@ -111,6 +111,13 @@
Lisp_Object Q_color_symbols;
#endif
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (cursor_font);
+Lisp_Object Qcursor_font;
+
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (font);
+
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (autodetect);
+
typedef struct image_instantiator_format_entry image_instantiator_format_entry;
struct image_instantiator_format_entry
{
@@ -371,7 +378,7 @@
{
Lisp_Object tail;
- LIST_LOOP (tail, *get_image_conversion_list (console_type))
+ OLD_LIST_LOOP (tail, *get_image_conversion_list (console_type))
{
Lisp_Object mapping = XCAR (tail);
Lisp_Object regexp = XCAR (mapping);
@@ -622,7 +629,7 @@
i = 0;
elt[i++] = tag;
- LIST_LOOP (rest, alist)
+ OLD_LIST_LOOP (rest, alist)
{
Lisp_Object pair = XCAR (rest);
elt[i] = XCAR (pair);
@@ -1513,7 +1520,7 @@
invalid_argument ("Image instances not allowed here", data);
image_validate (data);
domain = decode_domain (domain);
- /* instantiate_image_instantiator() will abort if given an
+ /* instantiate_image_instantiator() will ABORT if given an
image instance ... */
dest_mask = decode_image_instance_type_list (dest_types);
data = normalize_image_instantiator (data,
@@ -2130,8 +2137,8 @@
Lisp_Object diffs = find_instantiator_differences
(instantiator,
IMAGE_INSTANCE_INSTANTIATOR (ii));
- Lisp_Object type = encode_image_instance_type
- (IMAGE_INSTANCE_TYPE (ii));
+ Lisp_Object type =
+ encode_image_instance_type (IMAGE_INSTANCE_TYPE (ii));
struct gcpro gcpro1;
GCPRO1 (diffs);
@@ -2512,6 +2519,15 @@
/* pixmap file functions */
/************************************************************************/
+static Lisp_Object
+locate_pixmap_file (Lisp_Object console_type, Lisp_Object name)
+{
+ return
+ MAYBE_LISP_CONTYPE_METH
+ (decode_console_type (console_type, ERROR_ME),
+ locate_pixmap_file, (name));
+}
+
/* If INSTANTIATOR refers to inline data, return Qnil.
If INSTANTIATOR refers to data in a file, return the full filename
if it exists; otherwise, return a cons of (filename).
@@ -2537,9 +2553,7 @@
if (!NILP (file) && NILP (data))
{
- Lisp_Object retval = MAYBE_LISP_CONTYPE_METH
- (decode_console_type(console_type, ERROR_ME),
- locate_pixmap_file, (file));
+ Lisp_Object retval = locate_pixmap_file (console_type, file);
if (!NILP (retval))
return retval;
@@ -2728,13 +2742,11 @@
&& NILP (assq_no_quit (Q_mask_data, alist))
&& !NILP (file))
{
- mask_file = MAYBE_LISP_CONTYPE_METH
- (decode_console_type(console_type, ERROR_ME),
- locate_pixmap_file, (concat2 (file, build_string ("Mask"))));
+ mask_file = locate_pixmap_file (console_type,
+ concat2 (file, build_string ("Mask")));
if (NILP (mask_file))
- mask_file = MAYBE_LISP_CONTYPE_METH
- (decode_console_type(console_type, ERROR_ME),
- locate_pixmap_file, (concat2 (file, build_string ("msk"))));
+ mask_file = locate_pixmap_file (console_type,
+ concat2 (file, build_string ("msk")));
}
if (!NILP (mask_file))
@@ -2822,7 +2834,92 @@
IMAGE_POINTER_MASK;
}
-#endif
+/* Set all the slots in an image instance structure to reasonable
+ default values. This is used somewhere within an instantiate
+ method. It is assumed that the device slot within the image
+ instance is already set -- this is the case when instantiate
+ methods are called. */
+
+void
+initialize_pixmap_image_instance (Lisp_Image_Instance *ii,
+ int slices, enum image_instance_type type)
+{
+ IMAGE_INSTANCE_TYPE (ii) = type;
+ IMAGE_INSTANCE_PIXMAP_FILENAME (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_MASK_FILENAME (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_FG (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_BG (ii) = Qnil;
+ IMAGE_INSTANCE_PIXMAP_MAXSLICE (ii) = slices;
+ DEVMETH (XDEVICE (IMAGE_INSTANCE_DEVICE (ii)),
+ initialize_pixmap_image_instance_data, (ii, slices));
+}
+
+static void
+xbm_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int dest_mask, int width, int height,
+ const Binbyte *bits)
+{
+ Lisp_Object mask_data = find_keyword_in_vector (instantiator, Q_mask_data);
+ Lisp_Object mask_file = find_keyword_in_vector (instantiator, Q_mask_file);
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+ Lisp_Object device = IMAGE_INSTANCE_DEVICE (ii);
+ Lisp_Object foreground = find_keyword_in_vector (instantiator, Q_foreground);
+ Lisp_Object background = find_keyword_in_vector (instantiator, Q_background);
+ enum image_instance_type type;
+
+ if ((dest_mask & IMAGE_MONO_PIXMAP_MASK) &&
+ (dest_mask & IMAGE_COLOR_PIXMAP_MASK))
+ {
+ if (!NILP (foreground) || !NILP (background))
+ type = IMAGE_COLOR_PIXMAP;
+ else
+ type = IMAGE_MONO_PIXMAP;
+ }
+ else if (dest_mask & IMAGE_MONO_PIXMAP_MASK)
+ type = IMAGE_MONO_PIXMAP;
+ else if (dest_mask & IMAGE_COLOR_PIXMAP_MASK)
+ type = IMAGE_COLOR_PIXMAP;
+ else if (dest_mask & IMAGE_POINTER_MASK)
+ type = IMAGE_POINTER;
+ else
+ incompatible_image_types (instantiator, dest_mask,
+ IMAGE_MONO_PIXMAP_MASK | IMAGE_COLOR_PIXMAP_MASK
+ | IMAGE_POINTER_MASK);
+
+ initialize_pixmap_image_instance (ii, 1, type);
+
+ IMAGE_INSTANCE_PIXMAP_FILENAME (ii) =
+ find_keyword_in_vector (instantiator, Q_file);
+ IMAGE_INSTANCE_PIXMAP_DEPTH (ii) = 1;
+
+ DEVMETH (XDEVICE (device), xbm_instantiate_1,
+ (ii, instantiator, pointer_fg, pointer_bg, width, height, bits,
+ type, device, mask_data, mask_file, foreground, background));
+}
+
+/* Instantiate method for XBM's. */
+
+static void
+xbm_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object domain)
+{
+ Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
+ Binbyte *ext_data;
+
+ assert (!NILP (data));
+
+ LISP_STRING_TO_EXTERNAL (XCAR (XCDR (XCDR (data))), ext_data, Qbinary);
+
+ xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
+ pointer_bg, dest_mask, XINT (XCAR (data)),
+ XINT (XCAR (XCDR (data))), ext_data);
+}
+
+#endif /* HAVE_WINDOW_SYSTEM */
#ifdef HAVE_XFACE
@@ -2897,6 +2994,88 @@
IMAGE_POINTER_MASK;
}
+#if defined(EXTERN)
+/* This is about to get redefined! */
+#undef EXTERN
+#endif
+/* We have to define SYSV32 so that compface.h includes string.h
+ instead of strings.h. */
+#define SYSV32
+BEGIN_C_DECLS
+#ifndef __STDC__ /* Needed to avoid prototype warnings */
+#define __STDC__
+#endif
+#include <compface.h>
+END_C_DECLS
+/* JMP_BUF cannot be used here because if it doesn't get defined
+ to jmp_buf we end up with a conflicting type error with the
+ definition in compface.h */
+extern jmp_buf comp_env;
+#undef SYSV32
+
+static void
+xface_instantiate (Lisp_Object image_instance,
+ Lisp_Object instantiator,
+ Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+ int dest_mask, Lisp_Object UNUSED (domain))
+{
+ Lisp_Object data = find_keyword_in_vector (instantiator, Q_data);
+ int i, stattis;
+ Binbyte *p, *bits, *bp;
+ const CIbyte * volatile emsg = 0;
+ const Binbyte * volatile dstring;
+
+ assert (!NILP (data));
+
+ LISP_STRING_TO_EXTERNAL (data, dstring, Qbinary);
+
+ if ((p = (Binbyte *) strchr ((char *) dstring, ':')))
+ {
+ dstring = p + 1;
+ }
+
+ /* Must use setjmp not SETJMP because we used jmp_buf above not JMP_BUF */
+ if (!(stattis = setjmp (comp_env)))
+ {
+ UnCompAll ((char *) dstring);
+ UnGenFace ();
+ }
+
+ switch (stattis)
+ {
+ case -2:
+ emsg = "uncompface: internal error";
+ break;
+ case -1:
+ emsg = "uncompface: insufficient or invalid data";
+ break;
+ case 1:
+ emsg = "uncompface: excess data ignored";
+ break;
+ }
+
+ if (emsg)
+ signal_image_error_2 (emsg, data, Qimage);
+
+ bp = bits = alloca_binbytes (PIXELS / 8);
+
+ /* the compface library exports char F[], which uses a single byte per
+ pixel to represent a 48x48 bitmap. Yuck. */
+ for (i = 0, p = (Binbyte *) F; i < (PIXELS / 8); ++i)
+ {
+ int n, b;
+ /* reverse the bit order of each byte... */
+ for (b = n = 0; b < 8; ++b)
+ {
+ n |= ((*p++) << b);
+ }
+ *bp++ = (Binbyte) n;
+ }
+
+ xbm_instantiate_1 (image_instance, instantiator, pointer_fg,
+ pointer_bg, dest_mask, 48, 48, bits);
+}
+
#endif /* HAVE_XFACE */
@@ -3126,6 +3305,143 @@
#endif /* HAVE_XPM */
+/**********************************************************************
+ * Autodetect *
+ **********************************************************************/
+
+static void
+autodetect_validate (Lisp_Object instantiator)
+{
+ data_must_be_present (instantiator);
+}
+
+static Lisp_Object
+autodetect_normalize (Lisp_Object instantiator,
+ Lisp_Object console_type,
+ Lisp_Object dest_mask)
+{
+ Lisp_Object file = find_keyword_in_vector (instantiator, Q_data);
+ Lisp_Object filename = Qnil;
+ Lisp_Object data = Qnil;
+ struct gcpro gcpro1, gcpro2, gcpro3;
+ Lisp_Object alist = Qnil;
+
+ GCPRO3 (filename, data, alist);
+
+ if (NILP (file)) /* no conversion necessary */
+ RETURN_UNGCPRO (instantiator);
+
+ alist = tagged_vector_to_alist (instantiator);
+
+ filename = locate_pixmap_file (console_type, file);
+ if (!NILP (filename))
+ {
+ int xhot, yhot;
+ /* #### Apparently some versions of XpmReadFileToData, which is
+ called by pixmap_to_lisp_data, don't return an error value
+ if the given file is not a valid XPM file. Instead, they
+ just seg fault. It is definitely caused by passing a
+ bitmap. To try and avoid this we check for bitmaps first. */
+
+ data = bitmap_to_lisp_data (filename, &xhot, &yhot, 1);
+
+ if (!EQ (data, Qt))
+ {
+ alist = remassq_no_quit (Q_data, alist);
+ alist = Fcons (Fcons (Q_file, filename),
+ Fcons (Fcons (Q_data, data), alist));
+ if (xhot != -1)
+ alist = Fcons (Fcons (Q_hotspot_x, make_int (xhot)),
+ alist);
+ if (yhot != -1)
+ alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)),
+ alist);
+
+ alist = xbm_mask_file_munging (alist, filename, Qnil, console_type);
+
+ {
+ Lisp_Object result = alist_to_tagged_vector (Qxbm, alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+ }
+
+#ifdef HAVE_XPM
+ data = pixmap_to_lisp_data (filename, 1);
+
+ if (!EQ (data, Qt))
+ {
+ alist = remassq_no_quit (Q_data, alist);
+ alist = Fcons (Fcons (Q_file, filename),
+ Fcons (Fcons (Q_data, data), alist));
+ alist = Fcons (Fcons (Q_color_symbols,
+ evaluate_xpm_color_symbols ()),
+ alist);
+ {
+ Lisp_Object result = alist_to_tagged_vector (Qxpm, alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+ }
+#endif
+ }
+
+ /* If we couldn't convert it, just put it back as it is.
+ We might try to further frob it later as a cursor-font
+ specification. (We can't do that now because we don't know
+ what dest-types it's going to be instantiated into.) */
+ {
+ Lisp_Object result = alist_to_tagged_vector (Qautodetect, alist);
+ free_alist (alist);
+ RETURN_UNGCPRO (result);
+ }
+}
+
+static int
+autodetect_possible_dest_types (void)
+{
+ return
+ IMAGE_MONO_PIXMAP_MASK |
+ IMAGE_COLOR_PIXMAP_MASK |
+ IMAGE_POINTER_MASK |
+ IMAGE_TEXT_MASK;
+}
+
+
+/**********************************************************************
+ * Font *
+ **********************************************************************/
+
+static void
+font_validate (Lisp_Object instantiator)
+{
+ data_must_be_present (instantiator);
+}
+
+static int
+font_possible_dest_types (void)
+{
+ return IMAGE_POINTER_MASK;
+}
+
+
+/**********************************************************************
+ * Cursor-Font *
+ **********************************************************************/
+
+static void
+cursor_font_validate (Lisp_Object instantiator)
+{
+ data_must_be_present (instantiator);
+}
+
+static int
+cursor_font_possible_dest_types (void)
+{
+ return IMAGE_POINTER_MASK;
+}
+
+
/****************************************************************************
* Image Specifier Object *
****************************************************************************/
@@ -3519,7 +3835,7 @@
Lisp_Object retlist = Qnil;
struct gcpro gcpro1, gcpro2;
- LIST_LOOP (rest, Vconsole_type_list)
+ OLD_LIST_LOOP (rest, Vconsole_type_list)
{
Lisp_Object contype = XCAR (rest);
if (!NILP (memq_no_quit (contype, tag_set)))
@@ -3535,7 +3851,7 @@
GCPRO2 (retlist, possible_console_types);
- LIST_LOOP (rest, possible_console_types)
+ OLD_LIST_LOOP (rest, possible_console_types)
{
Lisp_Object contype = XCAR (rest);
Lisp_Object newinst = call_with_suspended_errors
@@ -4400,11 +4716,11 @@
#ifdef MEMORY_USAGE_STATS
-int
+Bytecount
compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
if (glyph_cachels)
total += Dynarr_memory_usage (glyph_cachels, ovstats);
@@ -4506,7 +4822,7 @@
{
Lisp_Object rest;
- LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
+ OLD_LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
{
Lisp_Object value = XCAR (rest);
unmap_subwindow (value);
@@ -4606,7 +4922,7 @@
{
Lisp_Object rest;
- LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
+ OLD_LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
{
Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest));
@@ -4645,7 +4961,7 @@
/* The update method is allowed to call eval. Since it is quite
common for this function to get called from somewhere in
redisplay we need to make sure that quits are ignored. Otherwise
- Fsignal will abort. */
+ Fsignal will ABORT. */
specbind (Qinhibit_quit, Qt);
ERROR_CHECK_IMAGE_INSTANCE (subwindow);
@@ -4740,7 +5056,7 @@
f = XFRAME (frame);
/* If we get called we know something has changed. */
- LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
+ OLD_LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
{
Lisp_Object widget = XCAR (rest);
@@ -5369,6 +5685,7 @@
IIFORMAT_HAS_METHOD (xbm, validate);
IIFORMAT_HAS_METHOD (xbm, normalize);
IIFORMAT_HAS_METHOD (xbm, possible_dest_types);
+ IIFORMAT_HAS_METHOD (xbm, instantiate);
IIFORMAT_VALID_KEYWORD (xbm, Q_data, check_valid_xbm_inline);
IIFORMAT_VALID_KEYWORD (xbm, Q_file, check_valid_string);
@@ -5386,6 +5703,7 @@
IIFORMAT_HAS_METHOD (xface, validate);
IIFORMAT_HAS_METHOD (xface, normalize);
IIFORMAT_HAS_METHOD (xface, possible_dest_types);
+ IIFORMAT_HAS_METHOD (xface, instantiate);
IIFORMAT_VALID_KEYWORD (xface, Q_data, check_valid_string);
IIFORMAT_VALID_KEYWORD (xface, Q_file, check_valid_string);
@@ -5406,6 +5724,44 @@
IIFORMAT_VALID_KEYWORD (xpm, Q_file, check_valid_string);
IIFORMAT_VALID_KEYWORD (xpm, Q_color_symbols, check_valid_xpm_color_symbols);
#endif /* HAVE_XPM */
+
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (cursor_font, "cursor-font");
+
+ IIFORMAT_HAS_METHOD (cursor_font, validate);
+ IIFORMAT_HAS_METHOD (cursor_font, possible_dest_types);
+
+ IIFORMAT_VALID_KEYWORD (cursor_font, Q_data, check_valid_string);
+ IIFORMAT_VALID_KEYWORD (cursor_font, Q_foreground, check_valid_string);
+ IIFORMAT_VALID_KEYWORD (cursor_font, Q_background, check_valid_string);
+
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (font, "font");
+
+ IIFORMAT_HAS_METHOD (font, validate);
+ IIFORMAT_HAS_METHOD (font, possible_dest_types);
+
+ IIFORMAT_VALID_KEYWORD (font, Q_data, check_valid_string);
+ IIFORMAT_VALID_KEYWORD (font, Q_foreground, check_valid_string);
+ IIFORMAT_VALID_KEYWORD (font, Q_background, check_valid_string);
+
+ INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (autodetect,
+ "autodetect");
+
+ IIFORMAT_HAS_METHOD (autodetect, validate);
+ IIFORMAT_HAS_METHOD (autodetect, normalize);
+ IIFORMAT_HAS_METHOD (autodetect, possible_dest_types);
+ /* #### autodetect is flawed IMO:
+ 1. It makes the assumption that you can detect whether the user
+ wanted a cursor or a string based on the data, since the data is a
+ string you have to prioritise cursors. Instead we will force users
+ to pick the appropriate image type, this is what we do under
+ MS-Windows anyway.
+ 2. It doesn't fit with the new domain model - you cannot tell which
+ domain it needs to be instantiated in until you've actually
+ instantiated it, which mucks up caching.
+ 3. It only copes with cursors and strings which seems bogus. --andy */
+ IIFORMAT_HAS_SHARED_METHOD (autodetect, governing_domain, subwindow);
+
+ IIFORMAT_VALID_KEYWORD (autodetect, Q_data, check_valid_string);
}
void
@@ -5536,13 +5892,13 @@
void
complex_vars_of_glyphs (void)
{
- /* Partially initialized in glyphs-x.c, glyphs.el */
+ /* Partially initialized in glyphs-shared.c, glyphs.el */
DEFVAR_LISP ("truncation-glyph", &Vtruncation_glyph /*
What to display at the end of truncated lines.
*/ );
Vtruncation_glyph = allocate_glyph (GLYPH_BUFFER, redisplay_glyph_changed);
- /* Partially initialized in glyphs-x.c, glyphs.el */
+ /* Partially initialized in glyphs-shared.c, glyphs.el */
DEFVAR_LISP ("continuation-glyph", &Vcontinuation_glyph /*
What to display at the end of wrapped lines.
*/ );
@@ -5577,7 +5933,7 @@
*/);
Vhscroll_glyph = allocate_glyph (GLYPH_BUFFER, redisplay_glyph_changed);
- /* Partially initialized in glyphs-x.c, glyphs.el */
+ /* Partially initialized in glyphs-shared.c, glyphs.el */
DEFVAR_LISP ("xemacs-logo", &Vxemacs_logo /*
The glyph used to display the XEmacs logo at startup.
*/ );
1.38.4.1 +7 -15 XEmacs/xemacs/src/glyphs.h
Index: glyphs.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/glyphs.h,v
retrieving revision 1.38
retrieving revision 1.38.4.1
diff -u -r1.38 -r1.38.4.1
--- glyphs.h 2004/11/04 23:06:34 1.38
+++ glyphs.h 2005/02/15 01:20:35 1.38.4.1
@@ -1,6 +1,6 @@
/* Generic glyph data structures + display tables
Copyright (C) 1994 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing
This file is part of XEmacs.
@@ -377,6 +377,9 @@
void image_instance_layout (Lisp_Object image_instance,
int width, int height, int xoffset, int yoffset,
Lisp_Object domain);
+void initialize_pixmap_image_instance (Lisp_Image_Instance *ii,
+ int slices,
+ enum image_instance_type type);
int layout_layout (Lisp_Object image_instance,
int width, int height, int xoffset, int yoffset,
Lisp_Object domain);
@@ -449,18 +452,6 @@
#define ERROR_CHECK_SUBWINDOW_CACHE(w)
#endif
-enum image_instance_type
-{
- IMAGE_UNKNOWN,
- IMAGE_NOTHING,
- IMAGE_TEXT,
- IMAGE_MONO_PIXMAP,
- IMAGE_COLOR_PIXMAP,
- IMAGE_POINTER,
- IMAGE_SUBWINDOW,
- IMAGE_WIDGET
-};
-
#define IMAGE_NOTHING_MASK (1 << 0)
#define IMAGE_TEXT_MASK (1 << 1)
#define IMAGE_MONO_PIXMAP_MASK (1 << 2)
@@ -1018,6 +1009,7 @@
extern Lisp_Object Vcontinuation_glyph, Vcontrol_arrow_glyph, Vhscroll_glyph;
extern Lisp_Object Vinvisible_text_glyph, Voctal_escape_glyph, Vtruncation_glyph;
extern Lisp_Object Vxemacs_logo;
+extern Lisp_Object Qcursor_font;
unsigned short glyph_width (Lisp_Object glyph, Lisp_Object domain);
@@ -1146,8 +1138,8 @@
glyph_index get_glyph_cachel_index (struct window *w, Lisp_Object glyph);
#ifdef MEMORY_USAGE_STATS
-int compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
- struct overhead_stats *ovstats);
+Bytecount compute_glyph_cachel_usage (glyph_cachel_dynarr *glyph_cachels,
+ struct overhead_stats *ovstats);
#endif /* MEMORY_USAGE_STATS */
/************************************************************************/
1.18.4.1 +1 -3 XEmacs/xemacs/src/gpmevent.c
Index: gpmevent.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gpmevent.c,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- gpmevent.c 2004/09/20 19:19:47 1.18
+++ gpmevent.c 2005/02/15 01:20:35 1.18.4.1
@@ -287,9 +287,7 @@
Lstream_flush (XLSTREAM (output_stream));
- output_string =
- make_string (resizing_buffer_stream_ptr (XLSTREAM (output_stream)),
- Lstream_byte_count (XLSTREAM (output_stream)));
+ output_string = resizing_buffer_to_lisp_string (XLSTREAM (output_stream));
Lstream_delete (XLSTREAM (output_stream));
Lstream_delete (XLSTREAM (terminal_stream));
1.7.2.1 +116 -59 XEmacs/xemacs/src/gtk-glue.c
Index: gtk-glue.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gtk-glue.c,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- gtk-glue.c 2005/01/24 23:33:59 1.7
+++ gtk-glue.c 2005/02/15 01:20:36 1.7.2.1
@@ -1,3 +1,31 @@
+/* Convert between GTK and XEmacs types -- included source code.
+ Copyright (C) 2003 Ben Wing.
+
+This file is part of XEmacs.
+
+XEmacs is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+XEmacs is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with XEmacs; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Synched up with: Not in FSF. */
+
+/* Authorship:
+
+ Bill Perry.
+ Cleaned up, Mule-ized by Ben Wing.
+ */
+
GtkType GTK_TYPE_ARRAY = 0;
GtkType GTK_TYPE_STRING_ARRAY = 0;
GtkType GTK_TYPE_FLOAT_ARRAY = 0;
@@ -33,15 +61,23 @@
{
if (!GTK_TYPE_ARRAY)
{
- GTK_TYPE_ARRAY = xemacs_type_register ("GtkArrayOf", 0);
- GTK_TYPE_STRING_ARRAY = xemacs_type_register ("GtkArrayOfString",
GTK_TYPE_ARRAY);
- GTK_TYPE_FLOAT_ARRAY = xemacs_type_register ("GtkArrayOfFloat",
GTK_TYPE_ARRAY);
- GTK_TYPE_INT_ARRAY = xemacs_type_register ("GtkArrayOfInteger",
GTK_TYPE_ARRAY);
- GTK_TYPE_LISTOF = xemacs_type_register ("GtkListOf", 0);
- GTK_TYPE_STRING_LIST = xemacs_type_register ("GtkListOfString",
GTK_TYPE_LISTOF);
- GTK_TYPE_OBJECT_LIST = xemacs_type_register ("GtkListOfObject",
GTK_TYPE_LISTOF);
- GTK_TYPE_GDK_GC = xemacs_type_register ("GdkGC", GTK_TYPE_BOXED);
- }
+ GTK_TYPE_ARRAY =
+ xemacs_type_register ("GtkArrayOf", 0);
+ GTK_TYPE_STRING_ARRAY =
+ xemacs_type_register ("GtkArrayOfString", GTK_TYPE_ARRAY);
+ GTK_TYPE_FLOAT_ARRAY =
+ xemacs_type_register ("GtkArrayOfFloat", GTK_TYPE_ARRAY);
+ GTK_TYPE_INT_ARRAY =
+ xemacs_type_register ("GtkArrayOfInteger", GTK_TYPE_ARRAY);
+ GTK_TYPE_LISTOF =
+ xemacs_type_register ("GtkListOf", 0);
+ GTK_TYPE_STRING_LIST =
+ xemacs_type_register ("GtkListOfString", GTK_TYPE_LISTOF);
+ GTK_TYPE_OBJECT_LIST =
+ xemacs_type_register ("GtkListOfObject", GTK_TYPE_LISTOF);
+ GTK_TYPE_GDK_GC =
+ xemacs_type_register ("GdkGC", GTK_TYPE_BOXED);
+ }
}
static void
@@ -64,11 +100,14 @@
while (!NILP (temp))
{
- strings = g_list_append (strings, XSTRING_DATA (XCAR (temp)));
+ gchar *tempext;
+ LISP_STRING_TO_EXTERNAL_MALLOC (XCAR (temp), tempext,
+ Vgtk_text_encoding);
+ strings = g_list_append (strings, tempext);
temp = XCDR (temp);
}
- GTK_VALUE_POINTER(*arg) = strings;
+ GTK_VALUE_POINTER (*arg) = strings;
}
else if (arg->type == GTK_TYPE_OBJECT_LIST)
{
@@ -89,7 +128,7 @@
temp = XCDR (temp);
}
- GTK_VALUE_POINTER(*arg) = objects;
+ GTK_VALUE_POINTER (*arg) = objects;
}
else
{
@@ -110,7 +149,7 @@
{
Lisp_Object *rv = (Lisp_Object *) user_data;
- *rv = Fcons (build_string ((char *)data), *rv);
+ *rv = Fcons (build_ext_string ((Extbyte *) data, Vgtk_text_encoding), *rv);
}
static Lisp_Object
@@ -122,15 +161,17 @@
{
if (arg->type == GTK_TYPE_STRING_LIST)
{
- g_list_foreach ((GList*) GTK_VALUE_POINTER (*arg), __make_string_mapper,
&rval);
+ g_list_foreach ((GList *) GTK_VALUE_POINTER (*arg),
+ __make_string_mapper, &rval);
}
else if (arg->type == GTK_TYPE_OBJECT_LIST)
{
- g_list_foreach ((GList*) GTK_VALUE_POINTER (*arg), __make_gtk_object_mapper,
&rval);
+ g_list_foreach ((GList *) GTK_VALUE_POINTER (*arg),
+ __make_gtk_object_mapper, &rval);
}
else
{
- ABORT();
+ ABORT ();
}
}
return (rval);
@@ -141,53 +182,55 @@
{
CHECK_LIST (obj);
-#define FROB(ret_type,check_fn,extract_fn) \
- do { \
- Lisp_Object temp = obj; \
- int length = 0; \
- ret_type *array = NULL; \
+#define FROB(ret_type, check_fn, extract_fn) \
+ do \
+ { \
+ Lisp_Object temp = obj; \
+ int length = 0; \
+ ret_type *array = NULL; \
\
- while (!NILP (temp)) \
- { \
- check_fn (XCAR (temp)); \
- length++; \
- temp = XCDR (temp); \
- } \
+ while (!NILP (temp)) \
+ { \
+ check_fn (XCAR (temp)); \
+ length++; \
+ temp = XCDR (temp); \
+ } \
\
- array = xnew_array_and_zero (ret_type, length + 2); \
- temp = obj; \
- length = 0; \
+ array = xnew_array_and_zero (ret_type, length + 2); \
+ temp = obj; \
+ length = 0; \
\
- while (!NILP (temp)) \
- { \
- array[length++] = extract_fn (XCAR (temp)); \
- temp = XCDR (temp); \
- } \
+ while (!NILP (temp)) \
+ { \
+ array[length++] = extract_fn (XCAR (temp)); \
+ temp = XCDR (temp); \
+ } \
\
- GTK_VALUE_POINTER(*arg) = array; \
- } while (0);
+ GTK_VALUE_POINTER (*arg) = array; \
+ } while (0)
if (arg->type == GTK_TYPE_STRING_ARRAY)
{
- FROB(gchar *, CHECK_STRING, (gchar*) XSTRING_DATA);
+ FROB (gchar *, CHECK_STRING, LISP_STRING_TO_GTK_TEXT_MALLOC);
}
else if (arg->type == GTK_TYPE_FLOAT_ARRAY)
{
- FROB(gfloat, CHECK_FLOAT, extract_float);
+ FROB (gfloat, CHECK_FLOAT, extract_float);
}
else if (arg->type == GTK_TYPE_INT_ARRAY)
{
- FROB(gint, CHECK_INT, XINT);
+ FROB (gint, CHECK_INT, XINT);
}
else
{
- ABORT();
+ ABORT ();
}
#undef FROB
}
-extern GdkGC *gtk_get_gc (struct device *d, Lisp_Object font, Lisp_Object fg,
Lisp_Object bg,
- Lisp_Object bg_pmap, Lisp_Object lwidth);
+extern GdkGC *gtk_get_gc (struct device *d, Lisp_Object font, Lisp_Object fg,
+ Lisp_Object bg, Lisp_Object bg_pmap,
+ Lisp_Object lwidth);
static GdkGC *
face_to_gc (Lisp_Object face)
@@ -195,10 +238,14 @@
Lisp_Object device = Fselected_device (Qnil);
return (gtk_get_gc (XDEVICE (device),
- Fspecifier_instance (Fget (face, Qfont, Qnil), device, Qnil, Qnil),
- Fspecifier_instance (Fget (face, Qforeground, Qnil), device, Qnil, Qnil),
- Fspecifier_instance (Fget (face, Qbackground, Qnil), device, Qnil, Qnil),
- Fspecifier_instance (Fget (face, Qbackground_pixmap, Qnil), device, Qnil,
Qnil),
+ Fspecifier_instance (Fget (face, Qfont, Qnil),
+ device, Qnil, Qnil),
+ Fspecifier_instance (Fget (face, Qforeground, Qnil),
+ device, Qnil, Qnil),
+ Fspecifier_instance (Fget (face, Qbackground, Qnil),
+ device, Qnil, Qnil),
+ Fspecifier_instance (Fget (face, Qbackground_pixmap,
+ Qnil), device, Qnil, Qnil),
Qnil));
}
@@ -208,18 +255,25 @@
Lisp_Object device = Fselected_device (Qnil);
GtkStyle *style = gtk_style_new ();
int i;
-
- Lisp_Object font = Fspecifier_instance (Fget (face, Qfont, Qnil), device, Qnil,
Qnil);
- Lisp_Object fg = Fspecifier_instance (Fget (face, Qforeground, Qnil), device, Qnil,
Qnil);
- Lisp_Object bg = Fspecifier_instance (Fget (face, Qbackground, Qnil), device, Qnil,
Qnil);
- Lisp_Object pm = Fspecifier_instance (Fget (face, Qbackground_pixmap, Qnil), device,
Qnil, Qnil);
- for (i = 0; i < 5; i++) style->fg[i] = * COLOR_INSTANCE_GTK_COLOR
(XCOLOR_INSTANCE (fg));
- for (i = 0; i < 5; i++) style->bg[i] = * COLOR_INSTANCE_GTK_COLOR
(XCOLOR_INSTANCE (bg));
+ Lisp_Object font = Fspecifier_instance (Fget (face, Qfont, Qnil), device,
+ Qnil, Qnil);
+ Lisp_Object fg = Fspecifier_instance (Fget (face, Qforeground, Qnil), device,
+ Qnil, Qnil);
+ Lisp_Object bg = Fspecifier_instance (Fget (face, Qbackground, Qnil), device,
+ Qnil, Qnil);
+ Lisp_Object pm = Fspecifier_instance (Fget (face, Qbackground_pixmap, Qnil),
+ device, Qnil, Qnil);
+
+ for (i = 0; i < 5; i++)
+ style->fg[i] = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (fg));
+ for (i = 0; i < 5; i++)
+ style->bg[i] = * COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (bg));
if (IMAGE_INSTANCEP (pm))
{
- for (i = 0; i < 5; i++) style->bg_pixmap[i] = XIMAGE_INSTANCE_GTK_PIXMAP
(pm);
+ for (i = 0; i < 5; i++)
+ style->bg_pixmap[i] = XIMAGE_INSTANCE_GTK_PIXMAP (pm);
}
style->font = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (font));
@@ -228,7 +282,7 @@
}
static Lisp_Object
-gdk_event_to_emacs_event(GdkEvent *ev)
+gdk_event_to_emacs_event (GdkEvent *ev)
{
Lisp_Object event = Qnil;
@@ -244,7 +298,8 @@
/* We need to handle a few more cases than the normal event
** loop does. Mainly the double/triple click events.
*/
- if ((ev->type == GDK_2BUTTON_PRESS) || (ev->type == GDK_3BUTTON_PRESS))
+ if ((ev->type == GDK_2BUTTON_PRESS) ||
+ (ev->type == GDK_3BUTTON_PRESS))
{
set_event_type (emacs_event, misc_user_event);
SET_EVENT_MISC_USER_BUTTON (emacs_event, ev->button.button);
@@ -252,9 +307,11 @@
SET_EVENT_MISC_USER_X (emacs_event, (int) ev->button.x);
SET_EVENT_MISC_USER_Y (emacs_event, (int) ev->button.y);
if (ev->type == GDK_2BUTTON_PRESS)
- SET_EVENT_MISC_USER_FUNCTION (emacs_event, intern ("double-click"));
+ SET_EVENT_MISC_USER_FUNCTION (emacs_event,
+ intern ("double-click"));
else
- SET_EVENT_MISC_USER_FUNCTION (emacs_event, intern ("triple-click"));
+ SET_EVENT_MISC_USER_FUNCTION (emacs_event,
+ intern ("triple-click"));
}
else
{
1.14.4.1 +137 -124 XEmacs/xemacs/src/gtk-xemacs.c
Index: gtk-xemacs.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gtk-xemacs.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -r1.14 -r1.14.4.1
--- gtk-xemacs.c 2004/10/16 13:08:58 1.14
+++ gtk-xemacs.c 2005/02/15 01:20:36 1.14.4.1
@@ -45,16 +45,16 @@
if (!xemacs_type)
{
static const GtkTypeInfo xemacs_info =
- {
- "GtkXEmacs",
- sizeof (GtkXEmacs),
- sizeof (GtkXEmacsClass),
- (GtkClassInitFunc) gtk_xemacs_class_init,
- (GtkObjectInitFunc) gtk_xemacs_init,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
+ {
+ "GtkXEmacs",
+ sizeof (GtkXEmacs),
+ sizeof (GtkXEmacsClass),
+ (GtkClassInitFunc) gtk_xemacs_class_init,
+ (GtkObjectInitFunc) gtk_xemacs_init,
+ /* reserved_1 */ NULL,
+ /* reserved_2 */ NULL,
+ (GtkClassInitFunc) NULL,
+ };
xemacs_type = gtk_type_unique (gtk_fixed_get_type (), &xemacs_info);
}
@@ -88,7 +88,7 @@
static void
gtk_xemacs_init (GtkXEmacs *xemacs)
{
- GTK_WIDGET_SET_FLAGS (xemacs, GTK_CAN_FOCUS);
+ GTK_WIDGET_SET_FLAGS (xemacs, GTK_CAN_FOCUS);
}
GtkWidget*
@@ -96,7 +96,7 @@
{
GtkXEmacs *xemacs;
- xemacs = (GtkXEmacs*) gtk_type_new (gtk_xemacs_get_type ());
+ xemacs = (GtkXEmacs *) gtk_type_new (gtk_xemacs_get_type ());
xemacs->f = f;
return GTK_WIDGET (xemacs);
@@ -141,35 +141,43 @@
static void
smash_face_fallbacks (struct frame *f, GtkStyle *style)
{
-#define FROB(face,prop,slot) do { \
- Lisp_Object fallback = Qnil; \
- Lisp_Object specifier = Fget (face, prop, Qnil); \
- struct Lisp_Specifier *sp = NULL; \
- if (NILP (specifier)) continue; \
- sp = XSPECIFIER (specifier); \
- fallback = sp->fallback; \
- if (EQ (Fcar (Fcar (Fcar (fallback))), Qgtk)) \
- fallback = XCDR (fallback); \
- if (! NILP (slot)) \
- fallback = acons (list1 (Qgtk), \
- slot, \
- fallback); \
- set_specifier_fallback (specifier, fallback); \
- } while (0);
-#define FROB_FACE(face,fg_slot,bg_slot) \
-do { \
- FROB (face, Qforeground, xemacs_gtk_convert_color
(&style->fg_slot[GTK_STATE_NORMAL], FRAME_GTK_SHELL_WIDGET (f))); \
- FROB (face, Qbackground, xemacs_gtk_convert_color
(&style->bg_slot[GTK_STATE_NORMAL], FRAME_GTK_SHELL_WIDGET (f))); \
- if (style->rc_style &&
style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL]) \
- { \
- FROB (Vdefault_face, Qbackground_pixmap, \
- Fmake_image_instance (build_string
(style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL]), \
- f->device, Qnil, make_int (5))); \
- } \
- else \
- { \
- FROB (Vdefault_face, Qbackground_pixmap, Qnil); \
- } \
+#define FROB(face,prop,slot) \
+do { \
+ Lisp_Object fallback = Qnil; \
+ Lisp_Object specifier = Fget (face, prop, Qnil); \
+ struct Lisp_Specifier *sp = NULL; \
+ if (NILP (specifier)) continue; \
+ sp = XSPECIFIER (specifier); \
+ fallback = sp->fallback; \
+ if (EQ (Fcar (Fcar (Fcar (fallback))), Qgtk)) \
+ fallback = XCDR (fallback); \
+ if (! NILP (slot)) \
+ fallback = acons (list1 (Qgtk), \
+ slot, \
+ fallback); \
+ set_specifier_fallback (specifier, fallback); \
+ } while (0)
+#define FROB_FACE(face, fg_slot, bg_slot) \
+do { \
+ FROB (face, Qforeground, \
+ xemacs_gtk_convert_color (&style->fg_slot[GTK_STATE_NORMAL], \
+ FRAME_GTK_SHELL_WIDGET (f))); \
+ FROB (face, Qbackground, \
+ xemacs_gtk_convert_color (&style->bg_slot[GTK_STATE_NORMAL], \
+ FRAME_GTK_SHELL_WIDGET (f))); \
+ if (style->rc_style &&
style->rc_style->bg_pixmap_name[GTK_STATE_NORMAL]) \
+ { \
+ FROB (Vdefault_face, Qbackground_pixmap, \
+ Fmake_image_instance \
+ (build_ext_string (style->rc_style->bg_pixmap_name \
+ [GTK_STATE_NORMAL], \
+ Vgtk_text_encoding), \
+ f->device, Qnil, make_int (5))); \
+ } \
+ else \
+ { \
+ FROB (Vdefault_face, Qbackground_pixmap, Qnil); \
+ } \
} while (0)
FROB (Vdefault_face, Qfont, convert_font (style->font));
@@ -254,23 +262,24 @@
static void
gtk_xemacs_size_request (GtkWidget *widget, GtkRequisition *requisition)
{
- GtkXEmacs *x = GTK_XEMACS (widget);
- struct frame *f = GTK_XEMACS_FRAME (x);
- int width, height;
-
- if (f)
- {
- char_to_pixel_size (f, FRAME_WIDTH (f), FRAME_HEIGHT (f),
- &width, &height);
- requisition->width = width;
- requisition->height = height;
- }
- else
- {
- parent_class->size_request (widget, requisition);
- }
+ GtkXEmacs *x = GTK_XEMACS (widget);
+ struct frame *f = GTK_XEMACS_FRAME (x);
+ int width, height;
+
+ if (f)
+ {
+ char_to_pixel_size (f, FRAME_WIDTH (f), FRAME_HEIGHT (f),
+ &width, &height);
+ requisition->width = width;
+ requisition->height = height;
+ }
+ else
+ {
+ parent_class->size_request (widget, requisition);
+ }
}
+
/* Assign a size and position to the child widgets. This differs from the
super class method in that for all widgets except the scrollbars the size
and position are not caclulated here. This is because these widgets have
@@ -282,89 +291,90 @@
static void
gtk_xemacs_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
- GtkXEmacs *x = GTK_XEMACS (widget);
- GtkFixed *fixed = GTK_FIXED (widget);
- struct frame *f = GTK_XEMACS_FRAME (x);
- int columns, rows;
- GList *children;
- guint16 border_width;
-
- widget->allocation = *allocation;
- if (GTK_WIDGET_REALIZED (widget))
- gdk_window_move_resize (widget->window,
- allocation->x,
- allocation->y,
- allocation->width,
- allocation->height);
+ GtkXEmacs *x = GTK_XEMACS (widget);
+ GtkFixed *fixed = GTK_FIXED (widget);
+ struct frame *f = GTK_XEMACS_FRAME (x);
+ int columns, rows;
+ GList *children;
+ guint16 border_width;
+
+ widget->allocation = *allocation;
+ if (GTK_WIDGET_REALIZED (widget))
+ gdk_window_move_resize (widget->window,
+ allocation->x,
+ allocation->y,
+ allocation->width,
+ allocation->height);
- border_width = GTK_CONTAINER (fixed)->border_width;
+ border_width = GTK_CONTAINER (fixed)->border_width;
- children = fixed->children;
- while (children)
- {
- GtkFixedChild* child = (GtkFixedChild*) children->data;
- children = children->next;
+ children = fixed->children;
+ while (children)
+ {
+ GtkFixedChild* child = (GtkFixedChild*) children->data;
+ children = children->next;
- /*
- Scrollbars are the only widget that is managed by GTK. See
- comments in gtk_create_scrollbar_instance().
- */
- if (GTK_WIDGET_VISIBLE (child->widget) &&
- gtk_type_is_a(GTK_OBJECT_TYPE(child->widget), GTK_TYPE_SCROLLBAR))
- {
- GtkAllocation child_allocation;
- GtkRequisition child_requisition;
-
- gtk_widget_get_child_requisition (child->widget, &child_requisition);
- child_allocation.x = child->x + border_width;
- child_allocation.y = child->y + border_width;
- child_allocation.width = child_requisition.width;
- child_allocation.height = child_requisition.height;
- gtk_widget_size_allocate (child->widget, &child_allocation);
- }
- }
-
- if (f)
- {
- f->pixwidth = allocation->width;
- f->pixheight = allocation->height;
-
- pixel_to_char_size (f,
- allocation->width,
- allocation->height, &columns, &rows);
+ /*
+ Scrollbars are the only widget that is managed by GTK. See
+ comments in gtk_create_scrollbar_instance().
+ */
+ if (GTK_WIDGET_VISIBLE (child->widget) &&
+ gtk_type_is_a(GTK_OBJECT_TYPE(child->widget), GTK_TYPE_SCROLLBAR))
+ {
+ GtkAllocation child_allocation;
+ GtkRequisition child_requisition;
+
+ gtk_widget_get_child_requisition (child->widget, &child_requisition);
+ child_allocation.x = child->x + border_width;
+ child_allocation.y = child->y + border_width;
+ child_allocation.width = child_requisition.width;
+ child_allocation.height = child_requisition.height;
+ gtk_widget_size_allocate (child->widget, &child_allocation);
+ }
+ }
- change_frame_size (f, rows, columns, 1);
- }
+
+ if (f)
+ {
+ f->pixwidth = allocation->width;
+ f->pixheight = allocation->height;
+
+ pixel_to_char_size (f,
+ allocation->width,
+ allocation->height, &columns, &rows);
+
+ change_frame_size (f, rows, columns, 1);
+ }
}
static void
gtk_xemacs_paint (GtkWidget *widget, GdkRectangle *area)
{
- GtkXEmacs *x = GTK_XEMACS (widget);
- struct frame *f = GTK_XEMACS_FRAME (x);
+ GtkXEmacs *x = GTK_XEMACS (widget);
+ struct frame *f = GTK_XEMACS_FRAME (x);
- if (GTK_WIDGET_DRAWABLE (widget))
- redisplay_redraw_exposed_area (f, area->x, area->y, area->width,
- area->height);
+ if (GTK_WIDGET_DRAWABLE (widget))
+ redisplay_redraw_exposed_area (f, area->x, area->y, area->width,
+ area->height);
}
static void
gtk_xemacs_draw (GtkWidget *widget, GdkRectangle *area)
{
- GtkFixed *fixed = GTK_FIXED (widget);
- GtkFixedChild *child;
- GdkRectangle child_area;
- GList *children;
-
- /* I need to manually iterate over the children instead of just
- chaining to parent_class->draw() because it calls
- gtk_fixed_paint() directly, which clears the background window,
- which causes A LOT of flashing. */
+ GtkFixed *fixed = GTK_FIXED (widget);
+ GtkFixedChild *child;
+ GdkRectangle child_area;
+ GList *children;
+
+ /* I need to manually iterate over the children instead of just
+ chaining to parent_class->draw() because it calls
+ gtk_fixed_paint() directly, which clears the background window,
+ which causes A LOT of flashing. */
if (GTK_WIDGET_DRAWABLE (widget))
{
gtk_xemacs_paint (widget, area);
-
+
children = fixed->children;
while (children)
@@ -395,9 +405,9 @@
static gint
gtk_xemacs_expose (GtkWidget *widget, GdkEventExpose *event)
{
- GtkXEmacs *x = GTK_XEMACS (widget);
- struct frame *f = GTK_XEMACS_FRAME (x);
- GdkRectangle *a = &event->area;
+ GtkXEmacs *x = GTK_XEMACS (widget);
+ struct frame *f = GTK_XEMACS_FRAME (x);
+ GdkRectangle *a = &event->area;
if (GTK_WIDGET_DRAWABLE (widget))
{
@@ -410,12 +420,15 @@
redisplay_redraw_exposed_area (f, a->x, a->y, a->width, a->height);
return (TRUE);
}
+
+ /* #### BILL!!! What do we return here? True or false? */
+ return (TRUE);
}
Lisp_Object
xemacs_gtk_convert_color(GdkColor *c, GtkWidget *UNUSED (w))
{
- char color_buf[255];
+ CIbyte color_buf[255];
sprintf (color_buf, "#%04x%04x%04x", c->red, c->green, c->blue);
1.8.2.1 +1 -15 XEmacs/xemacs/src/gui-gtk.c
Index: gui-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui-gtk.c,v
retrieving revision 1.8
retrieving revision 1.8.2.1
diff -u -r1.8 -r1.8.2.1
--- gui-gtk.c 2005/02/03 16:30:37 1.8
+++ gui-gtk.c 2005/02/15 01:20:36 1.8.2.1
@@ -1,6 +1,6 @@
/* General GUI code -- GTK-specific. (menubars, scrollbars, toolbars, dialogs)
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1998 Free Software Foundation, Inc.
@@ -77,9 +77,6 @@
void
syms_of_gui_gtk (void)
{
-#ifdef HAVE_POPUPS
- DEFSYMBOL (Qmenu_no_selection_hook);
-#endif
}
void
@@ -89,16 +86,5 @@
Vpopup_callbacks = Qnil;
#ifdef HAVE_POPUPS
popup_up_p = 0;
-
-#if 0
- /* This DEFVAR_LISP is just for the benefit of make-docfile. */
- /* #### misnamed */
- DEFVAR_LISP ("menu-no-selection-hook", &Vmenu_no_selection_hook /*
-Function or functions to call when a menu or dialog box is dismissed
-without a selection having been made.
-*/ );
#endif
-
- Fset (Qmenu_no_selection_hook, Qnil);
-#endif /* HAVE_POPUPS */
}
1.39.2.1 +3 -7 XEmacs/xemacs/src/gui-x.c
Index: gui-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui-x.c,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -r1.39 -r1.39.2.1
--- gui-x.c 2005/02/03 16:30:37 1.39
+++ gui-x.c 2005/02/15 01:20:37 1.39.2.1
@@ -510,9 +510,8 @@
This way, dashes will show up as a separator. */
if (!wv->enabled)
wv->type = BUTTON_TYPE;
- TO_INTERNAL_FORMAT (C_STRING, wv->name,
- ALLOCA, (intname, unused_intlen),
- Qlwlib_encoding);
+ EXTERNAL_TO_SIZED_C_STRING (wv->name, intname, unused_intlen,
+ Qlwlib_encoding);
if (separator_string_p (intname))
{
wv->type = SEPARATOR_TYPE;
@@ -628,7 +627,7 @@
prev = gui_items_to_widget_values_1 (gui_object_instance, XCAR (items),
parent, 0, accel_p);
/* the rest are the children */
- LIST_LOOP (rest, XCDR (items))
+ OLD_LIST_LOOP (rest, XCDR (items))
{
Lisp_Object tab = XCAR (rest);
wv = gui_items_to_widget_values_1 (gui_object_instance, tab, 0, prev,
@@ -686,9 +685,6 @@
reinit_vars_of_gui_x (void)
{
lwlib_id_tick = (1<<16); /* start big, to not conflict with Energize */
-#ifdef HAVE_POPUPS
- popup_up_p = 0;
-#endif
}
void
1.29.4.1 +12 -2 XEmacs/xemacs/src/gui.c
Index: gui.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/gui.c,v
retrieving revision 1.29
retrieving revision 1.29.4.1
diff -u -r1.29 -r1.29.4.1
--- gui.c 2004/11/04 23:06:35 1.29
+++ gui.c 2005/02/15 01:20:37 1.29.4.1
@@ -460,7 +460,7 @@
/* This function can call Lisp but cannot GC because it is called within
redisplay, and redisplay disables GC. */
Lisp_Object rest;
- LIST_LOOP (rest, gui_item_list)
+ OLD_LIST_LOOP (rest, gui_item_list)
{
if (gui_item_selected_p (XCAR (rest)))
return XCAR (rest);
@@ -778,7 +778,7 @@
GCPRO2 (ret, sub);
CHECK_CONS (list);
/* recursively add items to the tree view */
- LIST_LOOP (rest, list)
+ OLD_LIST_LOOP (rest, list)
{
if (CONSP (XCAR (rest)))
sub = parse_gui_item_tree_list (XCAR (rest));
@@ -844,8 +844,18 @@
}
void
+reinit_vars_of_gui (void)
+{
+#ifdef HAVE_POPUPS
+ popup_up_p = 0;
+#endif
+}
+
+void
vars_of_gui (void)
{
+ reinit_vars_of_gui ();
+
DEFVAR_LISP ("menu-no-selection-hook", &Vmenu_no_selection_hook /*
Function or functions to call when a menu or dialog box is dismissed
without a selection having been made.
1.20.2.1 +3 -7 XEmacs/xemacs/src/indent.c
Index: indent.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/indent.c,v
retrieving revision 1.20
retrieving revision 1.20.2.1
diff -u -r1.20 -r1.20.2.1
--- indent.c 2005/01/26 05:11:12 1.20
+++ indent.c 2005/02/15 01:20:37 1.20.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -736,9 +736,7 @@
if (selected)
BUF_SET_PT (XBUFFER (w->buffer), charbpos);
else
- set_marker_restricted (w->pointm[CURRENT_DISP],
- make_int(charbpos),
- w->buffer);
+ set_marker_restricted (w->pointm[CURRENT_DISP], charbpos, w->buffer);
return make_int (value);
}
@@ -917,9 +915,7 @@
if (selected)
BUF_SET_PT (XBUFFER (w->buffer), charbpos);
else
- set_marker_restricted (w->pointm[CURRENT_DISP],
- make_int(charbpos),
- w->buffer);
+ set_marker_restricted (w->pointm[CURRENT_DISP], charbpos, w->buffer);
return make_int (motion);
}
1.20.4.1 +2 -2 XEmacs/xemacs/src/inline.c
Index: inline.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/inline.c,v
retrieving revision 1.20
retrieving revision 1.20.4.1
diff -u -r1.20 -r1.20.4.1
--- inline.c 2003/03/09 02:27:44 1.20
+++ inline.c 2005/02/15 01:20:38 1.20.4.1
@@ -67,11 +67,11 @@
#include "syntax.h"
#include "window.h"
-#if defined (HAVE_LDAP) && !defined (HAVE_SHLIB)
+#if defined (HAVE_LDAP) && !defined (HAVE_MODULES)
#include "../modules/ldap/eldap.h"
#endif
-#if defined (HAVE_POSTGRESQL) && !defined (HAVE_SHLIB)
+#if defined (HAVE_POSTGRESQL) && !defined (HAVE_MODULES)
#include "../modules/postgresql/postgresql.h"
#endif
1.34.2.1 +23 -23 XEmacs/xemacs/src/insdel.c
Index: insdel.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/insdel.c,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -r1.34 -r1.34.2.1
--- insdel.c 2005/01/24 23:33:59 1.34
+++ insdel.c 2005/02/15 01:20:38 1.34.2.1
@@ -817,19 +817,13 @@
{
buffer = wrap_buffer (mbuf);
if (!NILP (symbol_value_in_buffer (Qbefore_change_functions, buffer))
- /* Obsolete, for compatibility */
- || !NILP (symbol_value_in_buffer (Qbefore_change_function, buffer)))
+ )
{
set_buffer_internal (buf);
va_run_hook_with_args_trapping_problems
(Qchange, Qbefore_change_functions, 2,
make_int (start), make_int (end),
INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION);
- /* Obsolete, for compatibility */
- va_run_hook_with_args_trapping_problems
- (Qchange, Qbefore_change_function, 2,
- make_int (start), make_int (end),
- INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION);
}
}
@@ -903,9 +897,7 @@
{
buffer = wrap_buffer (mbuf);
- if (!NILP (symbol_value_in_buffer (Qafter_change_functions, buffer))
- /* Obsolete, for compatibility */
- || !NILP (symbol_value_in_buffer (Qafter_change_function, buffer)))
+ if (!NILP (symbol_value_in_buffer (Qafter_change_functions, buffer)))
{
set_buffer_internal (buf);
/* The actual after-change functions take slightly
@@ -915,12 +907,6 @@
make_int (start), make_int (new_end),
make_int (orig_end - start),
INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION);
- /* Obsolete, for compatibility */
- va_run_hook_with_args_trapping_problems
- (Qchange, Qafter_change_function, 3,
- make_int (start), make_int (new_end),
- make_int (orig_end - start),
- INHIBIT_EXISTING_PERMANENT_DISPLAY_OBJECT_DELETION);
}
}
@@ -1214,7 +1200,8 @@
buf->text->entirely_one_byte_p =
(BUF_FORMAT (buf) == FORMAT_8_BIT_FIXED ||
- (BUF_FORMAT (buf) == FORMAT_DEFAULT && BUF_Z (buf) == BYTE_BUF_Z
(buf)));
+ (BUF_FORMAT (buf) == FORMAT_DEFAULT &&
+ BUF_Z (buf) == BYTE_BUF_Z (buf)));
}
#endif
@@ -1248,7 +1235,9 @@
{
MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons)
{
- splice_in_string_extents (reloc, mbuf, bytepos, length, offset);
+ copy_extents_between_objects (reloc, offset, length,
+ wrap_buffer (mbuf), bytepos,
+ RUN_PASTE_HOOK);
}
}
@@ -1265,6 +1254,13 @@
MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons)
{
+ handle_sticky_properties (mbuf, bytepos,
+ bytepos + length_in_buffer,
+ flags & INSDEL_INHERIT);
+ }
+
+ MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons)
+ {
signal_syntax_table_extent_adjust (mbuf);
}
@@ -1411,10 +1407,6 @@
do_move_gap = 1;
}
- /* At this point, no more QUITting or processing of Lisp code. Buffer is
- in a consistent state. Following code puts buffer in an inconsistent
- state and can be considered a "critical section". */
-
MAP_INDIRECT_BUFFERS (buf, mbuf, bufcons)
{
record_delete (mbuf, from, numdel);
@@ -1422,6 +1414,10 @@
BUF_MODIFF (buf)++;
MARK_BUFFERS_CHANGED;
+ /* At this point, no more QUITting or processing of Lisp code. Buffer is
+ in a consistent state. Following code puts buffer in an inconsistent
+ state and can be considered a "critical section". */
+
/* We used to do the following before the gap move. But that might QUIT,
and (as a result of this) the gap code always leaves the buffer in
a consistent state. Therefore, it's totally safe to do these operations
@@ -1549,6 +1545,8 @@
signal_syntax_table_extent_adjust (mbuf);
}
+ /* Now we might call Lisp again. */
+
/* &&#### Here we consider converting the buffer from default to
8-bit-fixed if is entirely 8-bit-fixed chars and has been that way for
a long time, e.g. 20 minutes. And if the buffer just switched to all
@@ -1703,7 +1701,8 @@
GCPRO1 (val);
if (!no_extents)
- add_string_extents (val, buf, bytepos, bytelen);
+ copy_extents_between_objects (wrap_buffer (buf), bytepos, bytelen,
+ val, 0, RUN_COPY_HOOK);
copy_buffer_text_out (buf, bytepos, bytelen, XSTRING_DATA (val), needed,
FORMAT_DEFAULT, Qnil, NULL);
init_string_ascii_begin (val);
@@ -1716,6 +1715,7 @@
Lisp_Object
make_string_from_buffer (struct buffer *buf, Charbpos pos, Charcount length)
{
+ /* This function can GC */
return make_string_from_buffer_1 (buf, pos, length, 0);
}
1.5.8.1 +2 -0 XEmacs/xemacs/src/insdel.h
Index: insdel.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/insdel.h,v
retrieving revision 1.5
retrieving revision 1.5.8.1
diff -u -r1.5 -r1.5.8.1
--- insdel.h 2002/06/05 09:56:09 1.5
+++ insdel.h 2005/02/15 01:20:39 1.5.8.1
@@ -1,5 +1,6 @@
/* Buffer insertion/deletion and gap motion for XEmacs.
Copyright (C) 1985-1994 Free Software Foundation, Inc.
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -36,6 +37,7 @@
#define INSDEL_BEFORE_MARKERS 1
#define INSDEL_NO_LOCKING 2
+#define INSDEL_INHERIT 4
Charcount buffer_insert_string_1 (struct buffer *buf, Charbpos pos,
const Ibyte *nonreloc, Lisp_Object reloc,
1.14.2.1 +3 -3 XEmacs/xemacs/src/intl-win32.c
Index: intl-win32.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/intl-win32.c,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -r1.14 -r1.14.2.1
--- intl-win32.c 2005/01/24 23:34:00 1.14
+++ intl-win32.c 2005/02/15 01:20:39 1.14.2.1
@@ -1,5 +1,5 @@
/* Win32 internationalization functions.
- Copyright (C) 2000, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004 Ben Wing.
Copyright (C) 2000 IKEYAMA Tomonori.
This file is part of XEmacs.
@@ -1197,7 +1197,7 @@
Lisp_Object charset_tail;
Lisp_Object charset = Qunbound;
- LIST_LOOP (charset_tail, Fcharset_list ())
+ OLD_LIST_LOOP (charset_tail, Fcharset_list ())
{
Lisp_Object charset_code_page;
@@ -1249,7 +1249,7 @@
Lisp_Object charset_tail;
Lisp_Object charset = Qunbound;
- LIST_LOOP (charset_tail, Fcharset_list ())
+ OLD_LIST_LOOP (charset_tail, Fcharset_list ())
{
Lisp_Object charset_registry;
1.9.8.1 +4 -6 XEmacs/xemacs/src/intl.c
Index: intl.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/intl.c,v
retrieving revision 1.9
retrieving revision 1.9.8.1
diff -u -r1.9 -r1.9.8.1
--- intl.c 2002/05/28 08:44:55 1.9
+++ intl.c 2005/02/15 01:20:40 1.9.8.1
@@ -1,6 +1,6 @@
/* Various functions for internationalizing XEmacs.
Copyright (C) 1993, 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 2000, 2001, 2002 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -49,7 +49,7 @@
loc = setlocale (LC_CTYPE, NULL);
if (!loc)
return Qnil;
- return build_ext_string (loc, Qctext);
+ return build_ext_string (loc, Qlocale_name_encoding);
}
DEFUN ("set-current-locale", Fset_current_locale, 1, 1, 0, /*
@@ -72,9 +72,7 @@
Extbyte *loc;
CHECK_STRING (locale);
- /* RedHat 6.2 contains a locale called "Francais" with the C-cedilla
- encoded in ISO2022! */
- LISP_STRING_TO_EXTERNAL (locale, loc, Qctext);
+ LISP_STRING_TO_EXTERNAL (locale, loc, Qlocale_name_encoding);
loc = setlocale (LC_ALL, loc);
setlocale (LC_NUMERIC, "C");
if (!loc)
@@ -89,7 +87,7 @@
}
#endif
- return build_ext_string (loc, Qctext);
+ return build_ext_string (loc, Qlocale_name_encoding);
}
#if 0
1.54.2.1 +15 -11 XEmacs/xemacs/src/keymap.c
Index: keymap.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/keymap.c,v
retrieving revision 1.54
retrieving revision 1.54.2.1
diff -u -r1.54 -r1.54.2.1
--- keymap.c 2005/01/24 23:34:01 1.54
+++ keymap.c 2005/02/15 01:20:40 1.54.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1985, 1991-1995 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
Totally redesigned by jwz in 1991.
This file is part of XEmacs.
@@ -824,6 +824,7 @@
*/
(keymap))
{
+ /* This function can GC */
keymap = get_keymap (keymap, 1, 1);
return Fcopy_sequence (XKEYMAP (keymap)->parents);
}
@@ -883,6 +884,7 @@
*/
(keymap, new_name))
{
+ /* This function can GC */
keymap = get_keymap (keymap, 1, 1);
XKEYMAP (keymap)->name = new_name;
@@ -896,6 +898,7 @@
*/
(keymap))
{
+ /* This function can GC */
keymap = get_keymap (keymap, 1, 1);
return XKEYMAP (keymap)->name;
@@ -908,6 +911,7 @@
*/
(keymap, new_prompt))
{
+ /* This function can GC */
keymap = get_keymap (keymap, 1, 1);
if (!NILP (new_prompt))
@@ -978,8 +982,7 @@
*/
(object))
{
- /* This function can GC */
- return KEYMAPP (get_keymap (object, 0, 0)) ? Qt : Qnil;
+ return KEYMAPP (get_keymap (object, 0, 1)) ? Qt : Qnil;
}
/* Check that OBJECT is a keymap (after dereferencing through any
@@ -2026,8 +2029,7 @@
keymap_store (keymap, &raw_key1, cmd);
}
if (NILP (Fkeymapp (cmd)))
- sferror_2 ("Invalid prefix keys in sequence",
- c, keys);
+ sferror_2 ("Invalid prefix keys in sequence", c, keys);
if (ascii_hack && !NILP (raw_key2.keysym) &&
NILP (keymap_lookup_1 (keymap, &raw_key2, 0)))
@@ -2686,6 +2688,7 @@
static Lisp_Object
process_event_binding_result (Lisp_Object result)
{
+ /* This function can GC */
if (EQ (result, Qundefined))
/* The suppress-keymap function binds keys to 'undefined - special-case
that here, so that being bound to that has the same error-behavior as
@@ -3332,7 +3335,7 @@
DECLARE_EISTRING (bufp);
Lisp_Object rest;
- LIST_LOOP (rest, key)
+ OLD_LIST_LOOP (rest, key)
{
Lisp_Object keysym = XCAR (rest);
if (EQ (keysym, Qcontrol)) eicat_ascii (bufp, "C-");
@@ -3936,12 +3939,12 @@
if (SYMBOLP (definition))
{
- buffer_insert1 (XBUFFER (buffer), Fsymbol_name (definition));
+ buffer_insert1 (XBUFFER (buffer), Fsymbol_name (definition), 0);
}
else if (STRINGP (definition) || VECTORP (definition))
{
buffer_insert_c_string (XBUFFER (buffer), "Kbd Macro: ");
- buffer_insert1 (XBUFFER (buffer), Fkey_description (definition));
+ buffer_insert1 (XBUFFER (buffer), Fkey_description (definition), 0);
}
else if (COMPILED_FUNCTIONP (definition))
buffer_insert_c_string (XBUFFER (buffer), "Anonymous Compiled
Function");
@@ -3955,10 +3958,11 @@
buffer_insert_c_string (XBUFFER (buffer), "Prefix command ");
if (SYMBOLP (name)
&& EQ (find_symbol_value (name), definition))
- buffer_insert1 (XBUFFER (buffer), Fsymbol_name (name));
+ buffer_insert1 (XBUFFER (buffer), Fsymbol_name (name), 0);
else
{
- buffer_insert1 (XBUFFER (buffer), Fprin1_to_string (name, Qnil));
+ buffer_insert1 (XBUFFER (buffer), Fprin1_to_string (name, Qnil),
+ 0);
}
}
else
@@ -4259,7 +4263,7 @@
#endif
if (c >= printable_min)
buffer_insert_emacs_char (buf, c);
- else buffer_insert1 (buf, Fsymbol_name (keysym));
+ else buffer_insert1 (buf, Fsymbol_name (keysym), 0);
}
else if (CHARP (keysym))
buffer_insert_emacs_char (buf, XCHAR (keysym));
1.124.2.1 +102 -45 XEmacs/xemacs/src/lisp.h
Index: lisp.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lisp.h,v
retrieving revision 1.124
retrieving revision 1.124.2.1
diff -u -r1.124 -r1.124.2.1
--- lisp.h 2005/02/03 16:30:37 1.124
+++ lisp.h 2005/02/15 01:20:41 1.124.2.1
@@ -1551,6 +1551,9 @@
/* enum typedefs */
/* ------------------------------- */
+/* Unfortunately, forward declarations of enums are not allowed by some
+ compilers, for example g++. */
+
enum run_hooks_condition
{
RUN_HOOKS_TO_COMPLETION,
@@ -1582,6 +1585,18 @@
MUNGE_ME_KEY_TRANSLATION
};
+enum image_instance_type
+{
+ IMAGE_UNKNOWN,
+ IMAGE_NOTHING,
+ IMAGE_TEXT,
+ IMAGE_MONO_PIXMAP,
+ IMAGE_COLOR_PIXMAP,
+ IMAGE_POINTER,
+ IMAGE_SUBWINDOW,
+ IMAGE_WIDGET
+};
+
/* ------------------------------- */
/* misc */
/* ------------------------------- */
@@ -1591,17 +1606,16 @@
/* This structure is used to keep statistics on the amount of memory
in use.
- WAS_REQUESTED stores the actual amount of memory that was requested
- of the allocation function. The *_OVERHEAD fields store the
- additional amount of memory that was grabbed by the functions to
- facilitate allocation, reallocation, etc. MALLOC_OVERHEAD is for
- memory allocated with malloc(); DYNARR_OVERHEAD is for dynamic
- arrays; GAP_OVERHEAD is for gap arrays. Note that for (e.g.)
- dynamic arrays, there is both MALLOC_OVERHEAD and DYNARR_OVERHEAD
- memory: The dynamic array allocates memory above and beyond what
- was asked of it, and when it in turns allocates memory using
- malloc(), malloc() allocates memory beyond what it was asked
- to allocate.
+ WAS_REQUESTED stores the actual amount of memory that was requested of
+ the allocation function. The *_OVERHEAD fields store the additional
+ amount of memory that was grabbed by the functions to facilitate
+ allocation, reallocation, etc. MALLOC_OVERHEAD is for memory allocated
+ with malloc(); DYNARR_OVERHEAD is for dynamic arrays; GAP_OVERHEAD is
+ for gap arrays. Note that for (e.g.) dynamic arrays, there is both
+ MALLOC_OVERHEAD and DYNARR_OVERHEAD memory: The dynamic array allocates
+ memory above and beyond what was asked of it, and when it in turns
+ allocates memory using malloc(), malloc() allocates memory beyond what
+ it was asked to allocate. Similarly for gap arrays and frob blocks.
Functions that accept a structure of this sort do not initialize
the fields to 0, and add any existing values to whatever was there
@@ -1609,10 +1623,12 @@
struct overhead_stats
{
- int was_requested;
- int malloc_overhead;
- int dynarr_overhead;
- int gap_overhead;
+ Bytecount was_requested;
+ /* double because of fractional frob-block usage (see
+ compute_fixed_type_block_usage()) */
+ double malloc_overhead;
+ Bytecount dynarr_overhead;
+ Bytecount gap_overhead;
};
#endif /* MEMORY_USAGE_STATS */
@@ -1674,6 +1690,16 @@
Dynarr_declare (Lisp_Object *);
} Lisp_Object_ptr_dynarr;
+typedef struct
+{
+ Lisp_Object key, value;
+} Lisp_Object_pair;
+
+typedef struct
+{
+ Dynarr_declare (Lisp_Object_pair);
+} Lisp_Object_pair_dynarr;
+
/* Close your eyes now lest you vomit or spontaneously combust ... */
#define HACKEQ_UNSAFE(obj1, obj2) \
@@ -1836,7 +1862,7 @@
malformed-list error or a circular-list error.
*/
-/* LIST_LOOP is a simple, old-fashioned macro. It doesn't require brace
+/* OLD_LIST_LOOP is a simple, old-fashioned macro. It doesn't require brace
surrounding, and iterates through a list, which may or may not known to
be syntactically correct. It accepts two args, TAIL (set progressively
to each cons starting with the first), and LIST, the list to iterate
@@ -1844,9 +1870,11 @@
In each iteration, you can retrieve the current list item using XCAR
(tail), or destructively modify the list using XSETCAR (tail,
- ...). */
+ ...).
-#define LIST_LOOP(tail, list) \
+ When writing new code, you should use the non-OLD versions below. */
+
+#define OLD_LIST_LOOP(tail, list) \
for (tail = list; \
!NILP (tail); \
tail = XCDR (tail))
@@ -2064,11 +2092,10 @@
*** ALL OF THESE MACROS MUST BE DECLARED INSIDE BRACES -- SEE ABOVE. ***
- EXTERNAL_ALIST_LOOP_4 is similar to EXTERNAL_LIST_LOOP_2, but it
- assumes the elements are aconses (the elements in an alist) and
- sets two additional argument variables ELT_CAR and ELT_CDR to the
- car and cdr of the acons. All of the variables ELT, ELT_CAR and
- ELT_CDR are automatically declared.
+ EXTERNAL_ALIST_LOOP is similar to EXTERNAL_LIST_LOOP, but it assumes the
+ elements are aconses (the elements in an alist) and sets argument
+ variables ELT_CAR and ELT_CDR to the car and cdr of the acons. The
+ variables ELT, ELT_CAR and ELT_CDR are automatically declared.
EXTERNAL_ALIST_LOOP_5 adds a TAIL argument to EXTERNAL_ALIST_LOOP_4,
just like EXTERNAL_LIST_LOOP_3 does, and again TAIL is automatically
@@ -2084,6 +2111,17 @@
*/
/* Optimized and safe macros for looping over external alists. */
+#define EXTERNAL_ALIST_LOOP(elt_car, elt_cdr, list) \
+Lisp_Object elt_car, elt_cdr; \
+Lisp_Object elt_##elt_car##elt_cdr, hare_##elt_car##elt_cdr; \
+Lisp_Object tortoise_##elt_car##elt_cdr; \
+EMACS_INT len_##elt_car##elt_cdr; \
+PRIVATE_EXTERNAL_ALIST_LOOP_8 (elt_##elt_car##elt_cdr, elt_car, \
+ elt_cdr, list, len_##elt_car##elt_cdr, \
+ hare_##elt_car##elt_cdr, \
+ tortoise_##elt_car##elt_cdr, \
+ CIRCULAR_LIST_SUSPICION_LENGTH)
+
#define EXTERNAL_ALIST_LOOP_4(elt, elt_car, elt_cdr, list) \
Lisp_Object elt, elt_car, elt_cdr; \
Lisp_Object hare_##elt, tortoise_##elt; \
@@ -2292,6 +2330,8 @@
} v;
} u;
Bytecount size_;
+ /* NOTE: This may be NULL, in the case of a "fake string" used to keep
+ track of extent data in a resizable-buffer dynarr. */
Ibyte *data_;
Lisp_Object plist;
};
@@ -2329,7 +2369,9 @@
#define XSTRING_FORMAT(s) FORMAT_DEFAULT
/* Return the true aligned size of a struct whose last member is a
- variable-length array field. (this is known as the "struct hack") */
+ variable-length array field. (this is known as the "struct hack")
+ The structure is of type STRUCTTYPE. The last field is named
+ FIELDNAME, of type FIELDTYPE, of actual length ARRAY_LENGTH. */
/* Implementation: in practice, structtype and fieldtype usually have
the same alignment, but we can't be sure. We need to use
ALIGN_SIZE to be absolutely sure of getting the correct alignment.
@@ -3209,10 +3251,10 @@
at our list of stack-based Lisp_Objects, and if there are any that
point to Lisp objects with no non-stack references, see if there are
any gcpros pointing to the object, and if not, set a flag indicating
- that the object is "destroyed". (Don't abort yet because the
function
+ that the object is "destroyed". (Don't ABORT yet because the
function
might not use the object any more.)
- 4. When we detag a pointer using XFOO(), abort if its "destroyed" flag
+ 4. When we detag a pointer using XFOO(), ABORT if its "destroyed" flag
is set.
--ben
@@ -3462,7 +3504,7 @@
#define staticpro(ptr) staticpro_1 (ptr, #ptr)
#define staticpro_nodump(ptr) staticpro_nodump_1 (ptr, #ptr)
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
MODULE_API void unstaticpro_nodump_1 (Lisp_Object *, Ascbyte *);
#define unstaticpro_nodump(ptr) unstaticpro_nodump_1 (ptr, #ptr)
#endif
@@ -3476,7 +3518,7 @@
/* var will not be saved at dump time */
MODULE_API void staticpro_nodump (Lisp_Object *);
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */
MODULE_API void unstaticpro_nodump (Lisp_Object *);
#endif
@@ -3573,9 +3615,10 @@
MODULE_API Lisp_Object build_msg_intstring (const Ibyte *);
MODULE_API Lisp_Object build_msg_string (const CIbyte *);
MODULE_API Lisp_Object make_string (const Ibyte *, Bytecount);
-MODULE_API Lisp_Object make_ext_string (const Extbyte *, EMACS_INT, Lisp_Object);
+MODULE_API Lisp_Object make_ext_string (const Extbyte *, Bytecount, Lisp_Object);
void init_string_ascii_begin (Lisp_Object string);
Lisp_Object make_uninit_string (Bytecount);
+Lisp_Object make_fake_string (void);
MODULE_API Lisp_Object make_float (double);
Lisp_Object make_string_nocopy (const Ibyte *, Bytecount);
void free_cons (Lisp_Object);
@@ -3592,12 +3635,15 @@
extern int need_to_garbage_collect;
extern MODULE_API int need_to_check_c_alloca;
extern int need_to_signal_post_gc;
+extern int gc_currently_forbidden;
extern Lisp_Object Qpost_gc_hook, Qgarbage_collecting;
void recompute_funcall_allocation_flag (void);
#ifdef MEMORY_USAGE_STATS
Bytecount malloced_storage_size (void *, Bytecount, struct overhead_stats *);
-Bytecount fixed_type_block_overhead (Bytecount);
+Bytecount list_cons_usage (Lisp_Object list);
+double compute_fixed_type_block_usage (Elemcount numels, Bytecount obj_size,
+ struct overhead_stats *ovstats);
#endif
#ifdef EVENT_DATA_AS_OBJECTS
@@ -3657,12 +3703,12 @@
MODULE_API EXFUN (Fset_buffer, 1);
EXFUN (Fset_buffer_modified_p, 2);
-extern Lisp_Object QSscratch, Qafter_change_function, Qafter_change_functions;
-extern Lisp_Object Qbefore_change_function, Qbefore_change_functions;
+extern Lisp_Object QSscratch, Qafter_change_functions;
+extern Lisp_Object Qbefore_change_functions;
extern Lisp_Object Qbuffer_or_string_p, Qdefault_directory, Qfirst_change_hook;
-extern Lisp_Object Qpermanent_local, Vafter_change_function;
-extern Lisp_Object Vafter_change_functions, Vbefore_change_function;
-extern Lisp_Object Vbefore_change_functions, Vbuffer_alist, Vbuffer_defaults;
+extern Lisp_Object Qpermanent_local;
+extern Lisp_Object Vafter_change_functions, Vbefore_change_functions;
+extern Lisp_Object Vbuffer_alist, Vbuffer_defaults;
extern Lisp_Object Vinhibit_read_only, Vtransient_mark_mode;
/* Defined in bytecode.c */
@@ -3749,6 +3795,8 @@
values! Use make_time. */
Lisp_Object word_to_lisp (unsigned int);
unsigned int lisp_to_word (Lisp_Object);
+int halfspace_lessp_unsigned_long (unsigned long a, unsigned long b);
+Bytecount weak_list_usage (Lisp_Object list, struct overhead_stats *ovstats);
/* Defined in dired.c */
Lisp_Object make_directory_hash_table (const Ibyte *);
@@ -3824,7 +3872,7 @@
void uncache_home_directory (void);
Ibyte *get_home_directory (void);
Ibyte *user_login_name (uid_t *);
-void buffer_insert1 (struct buffer *, Lisp_Object);
+void buffer_insert1 (struct buffer *, Lisp_Object, int);
Lisp_Object make_string_from_buffer (struct buffer *, Charbpos, Charcount);
Lisp_Object make_string_from_buffer_no_extents (struct buffer *, Charbpos, Charcount);
Lisp_Object make_time (time_t);
@@ -3862,7 +3910,7 @@
void zero_out_command_line_status_vars (void);
/* Defined in emodules.c */
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
EXFUN (Flist_modules, 0);
EXFUN (Fload_module, 3);
extern int unloading_module;
@@ -4360,6 +4408,7 @@
EXFUN (Fsort, 2);
EXFUN (Fstring_equal, 2);
EXFUN (Fstring_lessp, 2);
+EXFUN (Fstring_modified_tick, 1);
EXFUN (Fsubstring, 3);
EXFUN (Fvalid_plist_p, 1);
@@ -4464,9 +4513,9 @@
void close_load_descs (void);
int locate_file (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object *, int);
EXFUN (Flocate_file_clear_hashing, 1);
-int isfloat_string (const char *);
+int isfloat_string (const Ibyte *);
#ifdef HAVE_RATIO
-int isratio_string (const char *);
+int isratio_string (const Ibyte *);
#endif
/* Well, I've decided to enable this. -- ben */
@@ -4502,9 +4551,12 @@
void set_marker_position (Lisp_Object, Charbpos);
void unchain_marker (Lisp_Object);
Lisp_Object noseeum_copy_marker (Lisp_Object, Lisp_Object);
-Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
+Lisp_Object byte_set_marker_internal (Lisp_Object marker, Bytebpos position,
+ struct buffer *b);
+Lisp_Object set_marker_restricted (Lisp_Object, Charbpos, Lisp_Object);
#ifdef MEMORY_USAGE_STATS
-int compute_buffer_marker_usage (struct buffer *, struct overhead_stats *);
+double compute_buffer_marker_usage (struct buffer *,
+ struct overhead_stats *);
#endif
void init_buffer_markers (struct buffer *b);
void uninit_buffer_markers (struct buffer *b);
@@ -4594,13 +4646,13 @@
constant. */
#define DECIMAL_PRINT_SIZE(integral_type) \
(((2410824 * sizeof (integral_type)) / 1000000) + 3)
-void long_to_string (char *, long);
+void long_to_string (Ibyte *, long);
extern int print_escape_newlines;
extern MODULE_API int print_readably;
Lisp_Object internal_with_output_to_temp_buffer (Lisp_Object,
Lisp_Object (*) (Lisp_Object),
Lisp_Object, Lisp_Object);
-void float_to_string (char *, double);
+void float_to_string (Ibyte *, double);
void internal_object_printer (Lisp_Object, Lisp_Object, int);
/* Defined in rangetab.c */
@@ -5023,6 +5075,11 @@
return atoi ((const Chbyte *) string);
}
+DECLARE_INLINE_HEADER (double qxeatof (const Ibyte *string))
+{
+ return atof ((const Chbyte *) string);
+}
+
DECLARE_INLINE_HEADER (Ibyte *qxestrupr (Ibyte *s))
{
return (Ibyte *) strupr ((Chbyte *) s);
@@ -5111,9 +5168,9 @@
extern Lisp_Object Qutf_16, Qutf_8, Qucs_4, Qutf_7;
#ifdef MEMORY_USAGE_STATS
Bytecount compute_from_unicode_table_size (Lisp_Object charset,
- struct overhead_stats *stats);
+ struct overhead_stats *stats);
Bytecount compute_to_unicode_table_size (Lisp_Object charset,
- struct overhead_stats *stats);
+ struct overhead_stats *stats);
#endif /* MEMORY_USAGE_STATS */
/* Defined in undo.c */
1.75.2.1 +21 -22 XEmacs/xemacs/src/lread.c
Index: lread.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lread.c,v
retrieving revision 1.75
retrieving revision 1.75.2.1
diff -u -r1.75 -r1.75.2.1
--- lread.c 2005/02/04 11:57:29 1.75
+++ lread.c 2005/02/15 01:20:42 1.75.2.1
@@ -1,7 +1,7 @@
/* Lisp parsing and input streams.
Copyright (C) 1985-1989, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems.
- Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -196,7 +196,7 @@
doc strings at once. --ben */
/* This contains the last string skipped with #@. */
-static char *saved_doc_string;
+static Ibyte *saved_doc_string;
/* Length of buffer allocated in saved_doc_string. */
static int saved_doc_string_size;
/* Length of actual data in saved_doc_string. */
@@ -219,13 +219,13 @@
static DECLARE_DOESNT_RETURN (read_syntax_error (const char *));
static DOESNT_RETURN
-read_syntax_error (const char *string)
+read_syntax_error (const Ascbyte *string)
{
signal_error (Qinvalid_read_syntax, string, Qunbound);
}
static Lisp_Object
-continuable_read_syntax_error (const char *string)
+continuable_read_syntax_error (const Ascbyte *string)
{
return signal_continuable_error (Qinvalid_read_syntax, string, Qunbound);
}
@@ -449,7 +449,7 @@
/* restore the old value first just in case an error occurs. */
Vload_force_doc_string_list = oldlist;
- LIST_LOOP (tail, list)
+ OLD_LIST_LOOP (tail, list)
{
Lisp_Object john = Fcar (tail);
if (CONSP (john))
@@ -509,7 +509,7 @@
close_load_descs (void)
{
Lisp_Object tail;
- LIST_LOOP (tail, Vload_descriptor_list)
+ OLD_LIST_LOOP (tail, Vload_descriptor_list)
retry_close (XINT (XCAR (tail)));
}
@@ -933,8 +933,8 @@
locate_file is rarely called with enough suffixes for funcalls to
make any difference. */
-/* Map FUN over SUFFIXES, as described above. FUN will be called with a
- char * containing the current file name, and ARG. Mapping stops when
+/* Map FUN over SUFFIXES, as described above. FUN will be called with an
+ Ibyte * containing the current file name, and ARG. Mapping stops when
FUN returns non-zero. */
static void
locate_file_map_suffixes (Lisp_Object filename, Lisp_Object suffixes,
@@ -952,7 +952,7 @@
/* We must traverse the list, so why not do it right. */
Lisp_Object tail;
max = 0;
- LIST_LOOP (tail, suffixes)
+ OLD_LIST_LOOP (tail, suffixes)
{
if (XSTRING_LENGTH (XCAR (tail)) > max)
max = XSTRING_LENGTH (XCAR (tail));
@@ -982,7 +982,7 @@
{
/* Case b) */
Lisp_Object tail;
- LIST_LOOP (tail, suffixes)
+ OLD_LIST_LOOP (tail, suffixes)
{
memcpy (fn + fn_len, XSTRING_DATA (XCAR (tail)),
XSTRING_LENGTH (XCAR (tail)));
@@ -1851,7 +1851,7 @@
/* This function can GC */
int saw_a_backslash;
Bytecount len = read_atom_0 (readcharfun, firstchar, &saw_a_backslash);
- char *read_ptr = (char *)
+ Ibyte *read_ptr =
resizing_buffer_stream_ptr (XLSTREAM (Vread_buffer_stream));
/* Is it an integer? */
@@ -1862,8 +1862,8 @@
symbol, as is \123 (which is the way (intern "123") prints).
Also, if token was preceded by #:, it's always a symbol.
*/
- char *p = read_ptr + len;
- char *p1 = read_ptr;
+ Ibyte *p = read_ptr + len;
+ Ibyte *p1 = read_ptr;
if (*p1 == '+' || *p1 == '-') p1++;
if (p1 != p)
@@ -1892,7 +1892,7 @@
return make_int (number);
}
#else
- return parse_integer ((Ibyte *) read_ptr, len, 10);
+ return parse_integer (read_ptr, len, 10);
#endif
}
}
@@ -1908,16 +1908,16 @@
}
#endif
if (isfloat_string (read_ptr))
- return make_float (atof (read_ptr));
+ return make_float (qxeatof (read_ptr));
}
{
Lisp_Object sym;
if (uninterned_symbol)
- sym = Fmake_symbol ( make_string ((Ibyte *) read_ptr, len));
+ sym = Fmake_symbol (make_string (read_ptr, len));
else
{
- Lisp_Object name = make_string ((Ibyte *) read_ptr, len);
+ Lisp_Object name = make_string (read_ptr, len);
sym = Fintern (name, Qnil);
}
return sym;
@@ -1981,7 +1981,7 @@
overflow:
#ifdef HAVE_BIGNUM
{
- bignum_set_string (scratch_bignum, (const char *) buf, 0);
+ bignum_set_string (scratch_bignum, (const Ascbyte *) buf, 0);
return make_bignum_bg (scratch_bignum);
}
#else
@@ -2672,10 +2672,9 @@
#define EXP_INT 16
int
-isfloat_string (const char *cp)
+isfloat_string (const Ibyte *ucp)
{
int state = 0;
- const Ibyte *ucp = (const Ibyte *) cp;
if (*ucp == '+' || *ucp == '-')
ucp++;
@@ -2722,7 +2721,7 @@
#ifdef HAVE_RATIO
int
-isratio_string (const char *cp)
+isratio_string (const Ibyte *cp)
{
/* Possible minus/plus sign */
if (*cp == '-' || *cp == '+')
@@ -2916,7 +2915,7 @@
Lisp_Object tail;
/* We might be dealing with an imperfect list so don't
- use LIST_LOOP */
+ use OLD_LIST_LOOP */
for (tail = s.head; CONSP (tail); tail = XCDR (tail))
{
Lisp_Object holding_cons = Qnil;
1.36.2.1 +23 -4 XEmacs/xemacs/src/lrecord.h
Index: lrecord.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lrecord.h,v
retrieving revision 1.36
retrieving revision 1.36.2.1
diff -u -r1.36 -r1.36.2.1
--- lrecord.h 2005/02/03 16:14:07 1.36
+++ lrecord.h 2005/02/15 01:20:43 1.36.2.1
@@ -1,6 +1,6 @@
/* The "lrecord" structure (header of a compound lisp object).
Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 1996, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -1013,7 +1013,7 @@
INIT_LRECORD_IMPLEMENTATION(type); \
} while (0)
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* Allow undefining types in order to support module unloading. */
#ifdef USE_KKCC
@@ -1036,7 +1036,7 @@
UNDEF_LRECORD_IMPLEMENTATION(type); \
} while (0)
-#endif /* HAVE_SHLIB */
+#endif /* HAVE_MODULES */
#define LRECORDP(a) (XTYPE (a) == Lisp_Type_Record)
#define XRECORD_LHEADER(a) ((struct lrecord_header *) XPNTR (a))
@@ -1473,6 +1473,19 @@
#define zero_lcrecord(lcr) zero_sized_lcrecord (lcr, sizeof (*(lcr)))
+#define copy_sized_lrecord(dst, src, size) \
+ memcpy ((char *) (dst) + sizeof (struct lrecord_header), \
+ (char *) (src) + sizeof (struct lrecord_header), \
+ (size) - sizeof (struct lrecord_header))
+
+#define copy_lrecord(dst, src) copy_sized_lrecord (dst, src, sizeof (*(dst)))
+
+#define zero_sized_lrecord(lr, size) \
+ memset ((char *) (lr) + sizeof (struct lrecord_header), 0, \
+ (size) - sizeof (struct lrecord_header))
+
+#define zero_lrecord(lr) zero_sized_lrecord (lr, sizeof (*(lr)))
+
DECLARE_INLINE_HEADER (
Bytecount
detagged_lisp_object_size (const struct lrecord_header *h)
@@ -1583,7 +1596,13 @@
extern MODULE_API int initialized;
#ifdef PDUMP
-#include "dumper.h"
+void pdump_objects_unmark (void);
+void pdump (void);
+int pdump_load (const Wexttext *argv0);
+void pdump_backtrace (void);
+extern unsigned int dump_id;
+extern Rawbyte *pdump_start, *pdump_end;
+
#define DUMPEDP(adr) ((((Rawbyte *) (adr)) < pdump_end) && \
(((Rawbyte *) (adr)) >= pdump_start))
#else
1.33.2.1 +126 -5 XEmacs/xemacs/src/lstream.c
Index: lstream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lstream.c,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -r1.33 -r1.33.2.1
--- lstream.c 2005/02/03 16:14:07 1.33
+++ lstream.c 2005/02/15 01:20:44 1.33.2.1
@@ -1,7 +1,7 @@
/* Generic stream implementation.
Copyright (C) 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1996, 2001, 2002 Ben Wing.
+ Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -28,6 +28,7 @@
#include "lisp.h"
#include "buffer.h"
+#include "extents.h"
#include "insdel.h"
#include "lstream.h"
@@ -71,6 +72,8 @@
static void
finalize_lstream (void *header, int for_disksave)
{
+ /* #### This function can GC (it depends on the writer method of the
+ stream; use Lstream_can_gc_p()) -- this seems majorly problematic. */
/* WARNING WARNING WARNING. This function (and all finalize functions)
may get called more than once on the same object, and may get called
(at dump time) on objects that are not being released. */
@@ -283,7 +286,7 @@
general, it's a good idea to close everything before deleting anything.
NOTE: DO NOT CALL DURING GARBAGE COLLECTION (e.g. in a finalizer). You
- will be aborted. See free_managed_lcrecord(). */
+ will be ABORTed. See free_managed_lcrecord(). */
void
Lstream_delete (Lstream *lstr)
@@ -325,6 +328,8 @@
static int
Lstream_really_write (Lstream *lstr, const unsigned char *data, int size)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
Bytecount num_written;
const unsigned char *orig_data = data;
int error_occurred = 0;
@@ -401,6 +406,8 @@
int
Lstream_flush_out (Lstream *lstr)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
Bytecount num_written =
Lstream_really_write (lstr, lstr->out_buffer, lstr->out_buffer_ind);
if (num_written == lstr->out_buffer_ind)
@@ -426,6 +433,8 @@
int
Lstream_flush (Lstream *lstr)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
if (Lstream_flush_out (lstr) < 0)
return -1;
@@ -474,6 +483,8 @@
static int
Lstream_write_1 (Lstream *lstr, const void *data, Bytecount size)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
const unsigned char *p = (const unsigned char *) data;
Bytecount off = 0;
if (! (lstr->flags & LSTREAM_FL_IS_OPEN))
@@ -574,6 +585,8 @@
int
Lstream_write (Lstream *lstr, const void *data, Bytecount size)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
Bytecount i;
const unsigned char *p = (const unsigned char *) data;
@@ -604,6 +617,8 @@
Lstream_raw_read (Lstream *lstr, unsigned char *buffer,
Bytecount size)
{
+ /* This function can GC (it depends on the reader method of the stream;
+ use Lstream_can_gc_p()). */
if (! (lstr->flags & LSTREAM_FL_IS_OPEN))
Lstream_internal_error ("lstream not open", lstr);
if (! (lstr->flags & LSTREAM_FL_READ))
@@ -619,6 +634,8 @@
static Bytecount
Lstream_read_more (Lstream *lstr)
{
+ /* This function can GC (it depends on the reader method of the stream;
+ use Lstream_can_gc_p()). */
#if 0
Bytecount size_needed
= max (1, min (MAX_READ_SIZE, lstr->buffering_size));
@@ -646,6 +663,8 @@
Lstream_read_1 (Lstream *lstr, void *data, Bytecount size,
int override_no_partial_chars)
{
+ /* This function can GC (it depends on the reader method of the stream;
+ use Lstream_can_gc_p()). */
unsigned char *p = (unsigned char *) data;
Bytecount off = 0;
Bytecount chunk;
@@ -726,6 +745,8 @@
Bytecount
Lstream_read (Lstream *lstr, void *data, Bytecount size)
{
+ /* This function can GC (it depends on the reader method of the stream;
+ use Lstream_can_gc_p()). */
return Lstream_read_1 (lstr, data, size, 0);
}
@@ -775,9 +796,22 @@
return (lstr->imp->seekable_p) (lstr);
}
+/* Return non-zero if the stream can garbage-collect as a result of
+ reading from it (WRITE_P == 0) or writing to it (WRITE_P == 1). */
+
+int
+Lstream_can_gc_p (Lstream *lstr, int write_p)
+{
+ if (!lstr->imp->can_gc_p)
+ return 0; /* #### is this reasonable? */
+ return (lstr->imp->can_gc_p) (lstr, write_p);
+}
+
static int
Lstream_pseudo_close (Lstream *lstr)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
if (! (lstr->flags & LSTREAM_FL_IS_OPEN))
Lstream_internal_error ("lstream is not open", lstr);
@@ -795,6 +829,8 @@
int
Lstream_close (Lstream *lstr)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
int rc = 0;
if (lstr->flags & LSTREAM_FL_IS_OPEN)
@@ -866,6 +902,8 @@
int
Lstream_fputc (Lstream *lstr, int c)
{
+ /* This function can GC (it depends on the writer method of the stream;
+ use Lstream_can_gc_p()). */
unsigned char ch = (unsigned char) c;
int retval = Lstream_write_1 (lstr, &ch, 1);
if (retval == 0 && lstr->buffering == LSTREAM_LINE_BUFFERED && ch
== '\n')
@@ -878,6 +916,8 @@
int
Lstream_fgetc (Lstream *lstr)
{
+ /* This function can GC (it depends on the reader method of the stream;
+ use Lstream_can_gc_p()). */
unsigned char ch;
if (Lstream_read_1 (lstr, &ch, 1, 1) <= 0)
return -1;
@@ -1506,6 +1546,7 @@
Bytecount allocked;
int max_stored;
int stored;
+ Lisp_Object fake_extent_string;
};
DEFINE_LSTREAM_IMPLEMENTATION ("resizing-buffer", resizing_buffer);
@@ -1513,7 +1554,10 @@
Lisp_Object
make_resizing_buffer_output_stream (void)
{
- return wrap_lstream (Lstream_new (lstream_resizing_buffer, "w"));
+ Lstream *val = Lstream_new (lstream_resizing_buffer, "w");
+
+ RESIZING_BUFFER_STREAM_DATA (val)->fake_extent_string = make_fake_string ();
+ return wrap_lstream (val);
}
static Bytecount
@@ -1535,6 +1579,12 @@
return 0;
}
+static Lisp_Object
+resizing_buffer_marker (Lisp_Object stream)
+{
+ return RESIZING_BUFFER_STREAM_DATA (XLSTREAM (stream))->fake_extent_string;
+}
+
static int
resizing_buffer_closer (Lstream *stream)
{
@@ -1553,11 +1603,73 @@
return RESIZING_BUFFER_STREAM_DATA (stream)->buf;
}
+/* Add a substring of STRING (starting at OFFSET, of length LEN) to
+ STREAM using Lstream_write(). If STREAM is a resizing-buffer stream,
+ also copy the relevant extent data. */
+
+void
+write_string_to_lstream (Lstream *stream, Lisp_Object string, Bytecount offset,
+ Bytecount len)
+{
+ Ibyte *data = XSTRING_DATA (string) + offset;
+ /* This function can GC */
+
+ if (LSTREAM_TYPE_P (stream, resizing_buffer))
+ {
+ Lisp_Object fake =
+ RESIZING_BUFFER_STREAM_DATA (stream)->fake_extent_string;
+ if (!NILP (fake))
+ {
+ Bytecount fakelen = Lstream_byte_count (stream);
+ XSET_STRING_LENGTH (fake, fakelen + len);
+ copy_extents_between_objects (string, offset, len, fake, fakelen,
+ RUN_NO_FUNCTION);
+ }
+ }
+
+ if (Lstream_can_gc_p (stream, 1) && !gc_currently_forbidden)
+ {
+ /* Protect against Lstream_write() causing a GC and relocating the
+ string. For small strings, we do it by alloc'ing the string and
+ using a copy; for large strings, we inhibit GC. */
+ if (len < 4096)
+ {
+ Ibyte *copied = alloca_ibytes (len);
+ memcpy (copied, data, len);
+ Lstream_write (stream, copied, len);
+ }
+ else if (gc_currently_forbidden)
+ {
+ /* Avoid calling begin_gc_forbidden, which conses. We can reach
+ this point from the cons debug code, which will get us into
+ an infinite loop if we cons again. */
+ Lstream_write (stream, data, len);
+ }
+ else
+ {
+ int speccount = begin_gc_forbidden ();
+ Lstream_write (stream, data, len);
+ unbind_to (speccount);
+ }
+ }
+ else
+ Lstream_write (stream, data, len);
+}
+
Lisp_Object
resizing_buffer_to_lisp_string (Lstream *stream)
{
- return make_string (resizing_buffer_stream_ptr (stream),
- Lstream_byte_count (stream));
+ Lisp_Object real =
+ make_string (resizing_buffer_stream_ptr (stream),
+ Lstream_byte_count (stream));
+ Lisp_Object fake = RESIZING_BUFFER_STREAM_DATA (stream)->fake_extent_string;
+ if (!NILP (fake))
+ {
+ assert (XSTRING_LENGTH (real) == XSTRING_LENGTH (fake));
+ copy_extents_between_objects (fake, 0, XSTRING_LENGTH (fake), real, 0,
+ RUN_NO_FUNCTION);
+ }
+ return real;
}
/*********** write to an unsigned-char dynarr ***********/
@@ -1757,6 +1869,7 @@
lisp_buffer_writer (Lstream *stream, const Ibyte *data,
Bytecount size)
{
+ /* This function can GC */
struct lisp_buffer_stream *str = LISP_BUFFER_STREAM_DATA (stream);
Charbpos pos;
struct buffer *buf = XBUFFER (str->buffer);
@@ -1801,6 +1914,12 @@
return str->buffer;
}
+static int
+lisp_buffer_can_gc_p (Lstream *stream, int write_p)
+{
+ return write_p;
+}
+
Charbpos
lisp_buffer_stream_startpos (Lstream *stream)
{
@@ -1839,6 +1958,7 @@
LSTREAM_HAS_METHOD (resizing_buffer, writer);
LSTREAM_HAS_METHOD (resizing_buffer, rewinder);
+ LSTREAM_HAS_METHOD (resizing_buffer, marker);
LSTREAM_HAS_METHOD (resizing_buffer, closer);
LSTREAM_HAS_METHOD (dynarr, writer);
@@ -1849,6 +1969,7 @@
LSTREAM_HAS_METHOD (lisp_buffer, writer);
LSTREAM_HAS_METHOD (lisp_buffer, rewinder);
LSTREAM_HAS_METHOD (lisp_buffer, marker);
+ LSTREAM_HAS_METHOD (lisp_buffer, can_gc_p);
}
void
1.18.4.1 +13 -0 XEmacs/xemacs/src/lstream.h
Index: lstream.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/lstream.h,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- lstream.h 2003/01/12 11:08:18 1.18
+++ lstream.h 2005/02/15 01:20:45 1.18.4.1
@@ -202,6 +202,9 @@
/* Mark this object for garbage collection. Same semantics as
a standard Lisp_Object marker. This function can be NULL. */
Lisp_Object (*marker) (Lisp_Object lstream);
+ /* Return non-zero if the stream might garbage-collect as a result of
+ reading from it (WRITE_P == 0) or writing to it (WRITE_P == 1). */
+ int (*can_gc_p) (Lstream *stream, int write_p);
} Lstream_implementation;
#define DEFINE_LSTREAM_IMPLEMENTATION(name, c_name) \
@@ -307,6 +310,7 @@
void Lstream_unread (Lstream *lstr, const void *data, Bytecount size);
int Lstream_rewind (Lstream *lstr);
int Lstream_seekable_p (Lstream *lstr);
+int Lstream_might_gc_p (Lstream *lstr, int write_p);
int Lstream_close (Lstream *lstr);
void Lstream_delete (Lstream *lstr);
@@ -369,6 +373,13 @@
(unsigned char) (c))))
#define Lstream_data(stream) ((void *) ((stream)->data))
+
+/* Lstream_byte_count: Return the number of bytes written to the stream so
+ far. This is always kept accurate even in the presence of buffering,
+ ungetting (which will cause the count to go down), etc. Note that this
+ does NOT in general reflect the number of bytes flushed out to whatever
+ is at the other end, if anything (an attached file descriptor, a stdio
+ stream, another lstream in the case of a coding lstream, etc.). */
#define Lstream_byte_count(stream) ((stream)->byte_count)
@@ -465,6 +476,8 @@
Lisp_Object make_resizing_buffer_output_stream (void);
unsigned char *resizing_buffer_stream_ptr (Lstream *stream);
Lisp_Object resizing_buffer_to_lisp_string (Lstream *stream);
+void write_string_to_lstream (Lstream *stream, Lisp_Object string,
+ Bytecount offset, Bytecount len);
Lisp_Object make_dynarr_output_stream (unsigned_char_dynarr *dyn);
#define LSTR_SELECTIVE 1
#define LSTR_IGNORE_ACCESSIBLE 2
1.16.2.1 +73 -76 XEmacs/xemacs/src/marker.c
Index: marker.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/marker.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- marker.c 2005/02/03 16:14:07 1.16
+++ marker.c 2005/02/15 01:20:46 1.16.2.1
@@ -1,6 +1,6 @@
/* Markers: examining, setting and killing.
Copyright (C) 1985, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -168,78 +168,26 @@
#endif
-static Lisp_Object
-set_marker_internal (Lisp_Object marker, Lisp_Object position,
- Lisp_Object buffer, int restricted_p)
+Lisp_Object
+byte_set_marker_internal (Lisp_Object marker, Bytebpos position,
+ struct buffer *b)
{
- Charbpos charno;
- struct buffer *b;
Lisp_Marker *m;
- int point_p;
-
- CHECK_MARKER (marker);
-
- point_p = POINT_MARKER_P (marker);
-
- /* If position is nil or a marker that points nowhere,
- make this marker point nowhere. */
- if (NILP (position) ||
- (MARKERP (position) && !XMARKER (position)->buffer))
- {
- if (point_p)
- invalid_operation ("Can't make point-marker point nowhere",
- marker);
- if (XMARKER (marker)->buffer)
- unchain_marker (marker);
- return marker;
- }
-
- CHECK_INT_COERCE_MARKER (position);
- if (NILP (buffer))
- b = current_buffer;
- else
- {
- CHECK_BUFFER (buffer);
- b = XBUFFER (buffer);
- /* If buffer is dead, set marker to point nowhere. */
- if (!BUFFER_LIVE_P (XBUFFER (buffer)))
- {
- if (point_p)
- invalid_operation
- ("Can't move point-marker in a killed buffer", marker);
- if (XMARKER (marker)->buffer)
- unchain_marker (marker);
- return marker;
- }
- }
+ int point_p = POINT_MARKER_P (marker);
- charno = XINT (position);
m = XMARKER (marker);
- if (restricted_p)
- {
- if (charno < BUF_BEGV (b)) charno = BUF_BEGV (b);
- if (charno > BUF_ZV (b)) charno = BUF_ZV (b);
- }
- else
- {
- if (charno < BUF_BEG (b)) charno = BUF_BEG (b);
- if (charno > BUF_Z (b)) charno = BUF_Z (b);
- }
-
if (point_p)
{
#ifndef moving_point_by_moving_its_marker_is_a_bug
- BUF_SET_PT (b, charno); /* this will move the marker */
+ BYTE_BUF_SET_PT (b, position); /* this will move the marker */
#else /* It's not a feature, so it must be a bug */
invalid_operation ("DEBUG: attempt to move point via point-marker",
marker);
#endif
}
else
- {
- m->membpos = charbpos_to_membpos (b, charno);
- }
+ m->membpos = bytebpos_to_membpos (b, position);
if (m->buffer != b)
{
@@ -258,7 +206,25 @@
return marker;
}
+static Lisp_Object
+set_marker_internal (Lisp_Object marker, Charbpos position,
+ struct buffer *b, int restricted_p)
+{
+ if (restricted_p)
+ {
+ if (position < BUF_BEGV (b)) position = BUF_BEGV (b);
+ if (position > BUF_ZV (b)) position = BUF_ZV (b);
+ }
+ else
+ {
+ if (position < BUF_BEG (b)) position = BUF_BEG (b);
+ if (position > BUF_Z (b)) position = BUF_Z (b);
+ }
+ return byte_set_marker_internal (marker,
+ charbpos_to_bytebpos (b, position), b);
+}
+
DEFUN ("set-marker", Fset_marker, 2, 3, 0, /*
Move MARKER to position POSITION in BUFFER.
POSITION can be a marker, an integer or nil. If POSITION is an
@@ -275,23 +241,59 @@
*/
(marker, position, buffer))
{
- return set_marker_internal (marker, position, buffer, 0);
-}
+ int point_p;
+ struct buffer *b;
+ CHECK_MARKER (marker);
+ point_p = POINT_MARKER_P (marker);
+
+ /* If position is nil or a marker that points nowhere,
+ make this marker point nowhere. */
+ if (NILP (position) ||
+ (MARKERP (position) && !XMARKER (position)->buffer))
+ {
+ if (point_p)
+ invalid_operation ("Can't make point-marker point nowhere",
+ marker);
+ if (XMARKER (marker)->buffer)
+ unchain_marker (marker);
+ return marker;
+ }
+
+ CHECK_INT_COERCE_MARKER (position);
+
+ if (NILP (buffer))
+ b = current_buffer;
+ else
+ {
+ CHECK_BUFFER (buffer);
+ b = XBUFFER (buffer);
+ /* If buffer is dead, set marker to point nowhere. */
+ if (!BUFFER_LIVE_P (XBUFFER (buffer)))
+ {
+ if (point_p)
+ invalid_operation
+ ("Can't move point-marker in a killed buffer", marker);
+ if (XMARKER (marker)->buffer)
+ unchain_marker (marker);
+ return marker;
+ }
+ }
+
+ return set_marker_internal (marker, XINT (position), b, 0);
+}
/* This version of Fset_marker won't let the position
be outside the visible part. */
Lisp_Object
-set_marker_restricted (Lisp_Object marker, Lisp_Object position,
+set_marker_restricted (Lisp_Object marker, Charbpos position,
Lisp_Object buffer)
{
- return set_marker_internal (marker, position, buffer, 1);
+ return set_marker_internal (marker, position, XBUFFER (buffer), 1);
}
-/* This is called during garbage collection,
- so we must be careful to ignore and preserve mark bits,
- including those in chain fields of markers. */
+/* This is called during garbage collection. */
void
unchain_marker (Lisp_Object m)
@@ -483,21 +485,16 @@
#ifdef MEMORY_USAGE_STATS
-int
+double
compute_buffer_marker_usage (struct buffer *b, struct overhead_stats *ovstats)
{
Lisp_Marker *m;
- int total = 0;
- int overhead;
+ Elemcount total = 0;
for (m = BUF_MARKERS (b); m; m = m->next)
- total += sizeof (Lisp_Marker);
- ovstats->was_requested += total;
- overhead = fixed_type_block_overhead (total);
- /* #### claiming this is all malloc overhead is not really right,
- but it has to go somewhere. */
- ovstats->malloc_overhead += overhead;
- return total + overhead;
+ total++;
+ return compute_fixed_type_block_usage (total, sizeof (Lisp_Marker),
+ ovstats);
}
#endif /* MEMORY_USAGE_STATS */
1.22.2.1 +102 -78 XEmacs/xemacs/src/menubar-gtk.c
Index: menubar-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/menubar-gtk.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- menubar-gtk.c 2005/01/24 23:34:03 1.22
+++ menubar-gtk.c 2005/02/15 01:20:46 1.22.2.1
@@ -1,7 +1,7 @@
/* Implements an elisp-programmable menubar -- Gtk interface.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
- Copyright (C) 2002, 2003 Ben Wing.
+ Copyright (C) 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -153,7 +153,8 @@
GtkWidget *
gtk_xemacs_menubar_new (struct frame *f)
{
- GtkXEmacsMenubar *menubar = (GtkXEmacsMenubar*) gtk_type_new
(gtk_xemacs_menubar_get_type ());
+ GtkXEmacsMenubar *menubar =
+ (GtkXEmacsMenubar *) gtk_type_new (gtk_xemacs_menubar_get_type ());
menubar->frame = f;
@@ -189,15 +190,16 @@
GtkAccelLabelClass parent_class;
};
-static GtkType gtk_xemacs_accel_label_get_type(void);
-static GtkWidget* gtk_xemacs_accel_label_new(const gchar *string);
-static void gtk_xemacs_set_accel_keys(GtkXEmacsAccelLabel* l,
- Lisp_Object keys);
-static void gtk_xemacs_accel_label_class_init(GtkXEmacsAccelLabelClass *klass);
-static void gtk_xemacs_accel_label_init(GtkXEmacsAccelLabel *xemacs);
+static GtkType gtk_xemacs_accel_label_get_type (void);
+static GtkWidget* gtk_xemacs_accel_label_new (const gchar *string);
+static void gtk_xemacs_set_accel_keys (GtkXEmacsAccelLabel* l,
+ Lisp_Object keys);
+static void gtk_xemacs_accel_label_class_init (GtkXEmacsAccelLabelClass
+ *klass);
+static void gtk_xemacs_accel_label_init (GtkXEmacsAccelLabel *xemacs);
static GtkType
-gtk_xemacs_accel_label_get_type(void)
+gtk_xemacs_accel_label_get_type (void)
{
static GtkType xemacs_accel_label_type = 0;
@@ -248,7 +250,7 @@
/* Make the string <keys> the accelerator string for the label. */
static void
-gtk_xemacs_set_accel_keys(GtkXEmacsAccelLabel* l, Lisp_Object keys)
+gtk_xemacs_set_accel_keys (GtkXEmacsAccelLabel *l, Lisp_Object keys)
{
g_return_if_fail (l != NULL);
g_return_if_fail (GTK_IS_XEMACS_ACCEL_LABEL (l));
@@ -260,9 +262,7 @@
/* Set the string straight from the object. */
if (STRINGP (keys) && XSTRING_LENGTH (keys))
{
- C_STRING_TO_EXTERNAL_MALLOC(XSTRING_DATA (keys),
- l->label.accel_string,
- Qctext);
+ l->label.accel_string = LISP_STRING_TO_GTK_TEXT_MALLOC (keys);
}
else
{
@@ -284,21 +284,25 @@
/* Converting from XEmacs to GTK representation */
static Lisp_Object
-menu_name_to_accelerator (Ibyte *name)
+menu_name_to_accelerator (Lisp_Object menuname)
{
- while (*name) {
- if (*name=='%') {
- ++name;
- if (!(*name))
- return Qnil;
- if (*name=='_' && *(name+1))
+ const Ibyte *name = XSTRING_DATA (menuname);
+
+ while (*name)
+ {
+ if (*name == '%')
{
- int accelerator = (int) (*(name+1));
- return make_char (tolower (accelerator));
+ ++name;
+ if (!(*name))
+ return Qnil;
+ if (*name == '_' && *(name + 1))
+ {
+ Ichar accelerator = itext_ichar (name + 1);
+ return make_char (DOWNCASE (0, accelerator));
+ }
}
+ ++name;
}
- ++name;
- }
return Qnil;
}
@@ -472,10 +476,10 @@
mirrors the behaviour under X). This algorithm is also found in
dialog-gtk.el:gtk-popup-convert-underscores.
*/
-static char *
-convert_underscores(const Ibyte *name)
+static Ibyte *
+convert_underscores (const Ibyte *name)
{
- char *rval;
+ Ibyte *rval;
int i,j;
int found_accel = FALSE;
int underscores = 0;
@@ -490,10 +494,11 @@
underscores++;
}
- /* Allocate space for the original string, plus zero byte plus extra space
- for all quoted underscores plus possible additional leading accelerator. */
- rval = (char*) xmalloc_and_zero (qxestrlen(name) + 1 + underscores
- + (found_accel ? 0 : 1));
+ /* Allocate space for the original string, plus zero byte plus extra
+ space for all quoted underscores plus possible additional leading
+ accelerator. */
+ rval = (Ibyte*) xmalloc_and_zero (qxestrlen (name) + 1 + underscores
+ + (found_accel ? 0 : 1));
if (!found_accel)
rval[0] = '_';
@@ -523,24 +528,25 @@
}
/* Remove the XEmacs menu accellerator representation from a string. */
-static char *
-remove_underscores(const Ibyte *name)
+static Ibyte *
+remove_underscores (const Ibyte *name)
{
- char *rval = (char*) xmalloc_and_zero (qxestrlen(name) + 1);
+ Ibyte *rval = (Ibyte *) xmalloc_and_zero (qxestrlen (name) + 1);
int i,j;
for (i = 0, j = 0; name[i]; i++)
{
- if (name[i]=='%') {
- i++;
- if (!(name[i]))
- continue;
+ if (name[i] == '%')
+ {
+ i++;
+ if (!(name[i]))
+ continue;
- if ((name[i] != '_') && (name[i] != '%'))
- i--;
- else
- continue;
- }
+ if ((name[i] != '_') && (name[i] != '%'))
+ i--;
+ else
+ continue;
+ }
rval[j++] = name[i];
}
return rval;
@@ -565,16 +571,19 @@
if (STRINGP (XCAR (desc)))
{
- accel = menu_name_to_accelerator (XSTRING_DATA (XCAR (desc)));
+ accel = menu_name_to_accelerator (XCAR (desc));
if (!reuse)
{
- char *temp_menu_name = convert_underscores (XSTRING_DATA (XCAR (desc)));
- GtkWidget* accel_label = gtk_xemacs_accel_label_new(NULL);
+ Ibyte *temp_menu_name =
+ convert_underscores (XSTRING_DATA (XCAR (desc)));
+ GtkWidget *accel_label = gtk_xemacs_accel_label_new (NULL);
guint accel_key;
gtk_misc_set_alignment (GTK_MISC (accel_label), 0.0, 0.5);
- accel_key = gtk_label_parse_uline (GTK_LABEL (accel_label), temp_menu_name);
+ accel_key =
+ gtk_label_parse_uline (GTK_LABEL (accel_label),
+ C_STRING_TO_GTK_TEXT (temp_menu_name));
menu_item = gtk_menu_item_new ();
gtk_container_add (GTK_CONTAINER (menu_item), accel_label);
@@ -586,7 +595,7 @@
menubar_accel_group,
accel_key, GDK_MOD1_MASK,
GTK_ACCEL_LOCKED);
- free (temp_menu_name);
+ xfree (temp_menu_name, Ibyte *);
}
else
{
@@ -788,7 +797,7 @@
int plist_p;
int selected_spec = 0, included_spec = 0;
GtkWidget *widget = NULL;
- guint accel_key;
+ guint accel_key = 0;
if (length < 2)
sferror ("button descriptors must be at least 2 long", descr);
@@ -815,9 +824,9 @@
/* the new way */
int i;
if (length & 1)
- sferror (
- "button descriptor has an odd number of keywords and values",
- descr);
+ sferror
+ ("button descriptor has an odd number of keywords and values",
+ descr);
name = contents [0];
callback = contents [1];
@@ -834,8 +843,10 @@
else if (EQ (key, Q_key_sequence)) ; /* ignored for FSF compat */
else if (EQ (key, Q_label)) ; /* implement for 21.0 */
else if (EQ (key, Q_style)) style = val;
- else if (EQ (key, Q_selected)) selected_p = val, selected_spec = 1;
- else if (EQ (key, Q_included)) include_p = val, included_spec = 1;
+ else if (EQ (key, Q_selected)) selected_p = val,
+ selected_spec = 1;
+ else if (EQ (key, Q_included)) include_p = val,
+ included_spec = 1;
else if (EQ (key, Q_config)) config_tag = val;
else if (EQ (key, Q_accelerator))
{
@@ -852,7 +863,8 @@
}
#ifdef HAVE_MENUBARS
- if ((!NILP (config_tag) && NILP (Fmemq (config_tag,
Vmenubar_configuration)))
+ if ((!NILP (config_tag) && NILP (Fmemq (config_tag,
+ Vmenubar_configuration)))
|| (included_spec && NILP (Feval (include_p))))
{
/* the include specification says to ignore this item. */
@@ -863,7 +875,7 @@
CHECK_STRING (name);
if (NILP (accel))
- accel = menu_name_to_accelerator (XSTRING_DATA (name));
+ accel = menu_name_to_accelerator (name);
if (!NILP (suffix))
suffix = Feval (suffix);
@@ -871,12 +883,14 @@
if (!separator_string_p (XSTRING_DATA (name)))
{
Ibyte *label_buffer = NULL;
- char *temp_label = NULL;
+ Ibyte *temp_label = NULL;
+ Extbyte *labelext;
if (STRINGP (suffix) && XSTRING_LENGTH (suffix))
{
- /* !!#### */
- label_buffer = alloca_ibytes (XSTRING_LENGTH (name) + 15 + XSTRING_LENGTH
(suffix));
+ label_buffer =
+ alloca_ibytes (XSTRING_LENGTH (name) + 15 +
+ XSTRING_LENGTH (suffix));
qxesprintf (label_buffer, "%s %s ", XSTRING_DATA (name),
XSTRING_DATA (suffix));
}
@@ -887,9 +901,10 @@
}
temp_label = convert_underscores (label_buffer);
+ C_STRING_TO_EXTERNAL (temp_label, labelext, Vgtk_text_encoding);
main_label = gtk_xemacs_accel_label_new (NULL);
- accel_key = gtk_label_parse_uline (GTK_LABEL (main_label), temp_label);
- free (temp_label);
+ accel_key = gtk_label_parse_uline (GTK_LABEL (main_label), labelext);
+ xfree (temp_label, Ibyte *);
}
/* Evaluate the selected and active items now */
@@ -993,14 +1008,13 @@
for a toggle menu item is to not show the toggle unless it
is turned on or actively highlighted. How absolutely
hideous. */
- gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget), TRUE);
+ gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (widget),
+ TRUE);
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget),
NILP (selected_p) ? FALSE : TRUE);
}
else
- {
- invalid_argument_2 ("unknown style", style, descr);
- }
+ invalid_argument_2 ("unknown style", style, descr);
gtk_widget_set_sensitive (widget, ! NILP (active_p));
@@ -1021,7 +1035,8 @@
gtk_container_add (GTK_CONTAINER (widget), main_label);
gtk_misc_set_alignment (GTK_MISC (main_label), 0.0, 0.5);
- gtk_xemacs_set_accel_keys(GTK_XEMACS_ACCEL_LABEL(main_label), keys);
+ gtk_xemacs_set_accel_keys (GTK_XEMACS_ACCEL_LABEL (main_label),
+ keys);
if (accel_group)
gtk_widget_add_accelerator (widget,
@@ -1054,7 +1069,7 @@
}
static gboolean
-menu_can_reuse_widget (GtkWidget *child, const Ibyte *label)
+menu_can_reuse_widget (GtkWidget *child, Lisp_Object label)
{
/* Everything up at the top level was done using
** gtk_xemacs_accel_label_new(), but we still double check to make
@@ -1066,12 +1081,14 @@
if (possible_child && GTK_IS_LABEL (possible_child))
{
- char *temp_label = remove_underscores (label);
+ Extbyte *labelext;
+ Ibyte *temp_label = remove_underscores (XSTRING_DATA (label));
+ C_STRING_TO_EXTERNAL (temp_label, labelext, Vgtk_text_encoding);
- if (!strcmp (GTK_LABEL (possible_child)->label, temp_label))
+ if (!strcmp (GTK_LABEL (possible_child)->label, labelext))
ret_val = TRUE;
- free (temp_label);
+ xfree (temp_label, Ibyte *);
}
return ret_val;
@@ -1086,7 +1103,8 @@
gboolean right_justify = FALSE;
Lisp_Object value = descr;
GtkWidget *menubar = FRAME_GTK_MENUBAR_WIDGET (f);
- GUI_ID id = (GUI_ID) gtk_object_get_data (GTK_OBJECT (menubar),
XEMACS_MENU_GUIID_TAG);
+ GUI_ID id = (GUI_ID) gtk_object_get_data (GTK_OBJECT (menubar),
+ XEMACS_MENU_GUIID_TAG);
guint menu_position = 0;
GtkAccelGroup *menubar_accel_group;
@@ -1101,7 +1119,8 @@
{
EXTERNAL_LIST_LOOP_2 (item_descr, value)
{
- gpointer current_child = g_list_nth_data (GTK_MENU_SHELL (menubar)->children,
menu_position);
+ gpointer current_child =
+ g_list_nth_data (GTK_MENU_SHELL (menubar)->children, menu_position);
if (NILP (item_descr))
{
@@ -1133,8 +1152,9 @@
gboolean reused_p = FALSE;
/* We may be able to reuse the widget, let's at least check. */
- if (current_child && menu_can_reuse_widget (GTK_WIDGET (current_child),
- XSTRING_DATA (XCAR (item_descr))))
+ if (current_child &&
+ menu_can_reuse_widget (GTK_WIDGET (current_child),
+ XCAR (item_descr)))
{
widget = menu_convert (item_descr, GTK_WIDGET (current_child),
menubar_accel_group);
@@ -1143,13 +1163,16 @@
else
{
widget = menu_convert (item_descr, NULL, menubar_accel_group);
- if (current_child) gtk_widget_destroy (GTK_WIDGET (current_child));
- gtk_menu_bar_insert (GTK_MENU_BAR (menubar), widget, menu_position);
+ if (current_child)
+ gtk_widget_destroy (GTK_WIDGET (current_child));
+ gtk_menu_bar_insert (GTK_MENU_BAR (menubar), widget,
+ menu_position);
}
if (widget)
{
- if (right_justify) gtk_menu_item_right_justify (GTK_MENU_ITEM (widget));
+ if (right_justify)
+ gtk_menu_item_right_justify (GTK_MENU_ITEM (widget));
}
else
{
@@ -1171,7 +1194,8 @@
{
GList *l = NULL;
- while ((l = g_list_nth (GTK_MENU_SHELL (menubar)->children, menu_position)))
+ while ((l = g_list_nth (GTK_MENU_SHELL (menubar)->children,
+ menu_position)))
{
gpointer data = l->data;
g_list_remove_link (GTK_MENU_SHELL (menubar)->children, l);
1.21.4.1 +1 -1 XEmacs/xemacs/src/minibuf.c
Index: minibuf.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/minibuf.c,v
retrieving revision 1.21
retrieving revision 1.21.4.1
diff -u -r1.21 -r1.21.4.1
--- minibuf.c 2004/11/04 23:06:42 1.21
+++ minibuf.c 2005/02/15 01:20:46 1.21.4.1
@@ -1,7 +1,7 @@
/* Minibuffer input and completion.
Copyright (C) 1985, 1986, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
1.41.2.1 +6 -5 XEmacs/xemacs/src/mule-charset.c
Index: mule-charset.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-charset.c,v
retrieving revision 1.41
retrieving revision 1.41.2.1
diff -u -r1.41 -r1.41.2.1
--- mule-charset.c 2005/02/03 16:14:07 1.41
+++ mule-charset.c 2005/02/15 01:20:47 1.41.2.1
@@ -1,7 +1,7 @@
/* Functions to handle multilingual characters.
Copyright (C) 1992, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 2001, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -869,9 +869,9 @@
struct charset_stats
{
- int from_unicode;
- int to_unicode;
- int other;
+ Bytecount from_unicode;
+ Bytecount to_unicode;
+ Bytecount other;
};
static void
@@ -916,7 +916,8 @@
val = acons (Qto_unicode, make_int (stats.to_unicode), val);
val = Fcons (Qnil, val);
val = acons (Qactually_requested, make_int (ovstats.was_requested), val);
- val = acons (Qmalloc_overhead, make_int (ovstats.malloc_overhead), val);
+ val = acons (Qmalloc_overhead,
+ make_int ((Bytecount) ovstats.malloc_overhead), val);
val = acons (Qgap_overhead, make_int (ovstats.gap_overhead), val);
val = acons (Qdynarr_overhead, make_int (ovstats.dynarr_overhead), val);
1.34.2.1 +1 -1 XEmacs/xemacs/src/mule-coding.c
Index: mule-coding.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/mule-coding.c,v
retrieving revision 1.34
retrieving revision 1.34.2.1
diff -u -r1.34 -r1.34.2.1
--- mule-coding.c 2005/02/03 16:14:07 1.34
+++ mule-coding.c 2005/02/15 01:20:48 1.34.2.1
@@ -1,7 +1,7 @@
/* Conversion functions for I18N encodings, but not Unicode (in separate file).
Copyright (C) 1991, 1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2000, 2001, 2002 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
1.5.2.1 +13 -9 XEmacs/xemacs/src/native-gtk-toolbar.c
Index: native-gtk-toolbar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/native-gtk-toolbar.c,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- native-gtk-toolbar.c 2005/01/24 23:34:04 1.5
+++ native-gtk-toolbar.c 2005/02/15 01:20:48 1.5.2.1
@@ -1,5 +1,6 @@
/* toolbar implementation -- GTK interface.
Copyright (C) 2000 Aaron Lehmann
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -157,29 +158,31 @@
else
instance = Qnil;
- if (IMAGE_INSTANCEP(instance))
+ if (IMAGE_INSTANCEP (instance))
{
GtkWidget *pixmapwid;
GdkPixmap *pixmap;
GdkBitmap *mask;
- char *tooltip = NULL;
+ Ibyte *tooltip = NULL;
if (STRINGP (tb->help_string))
tooltip = XSTRING_DATA (tb->help_string);
- pixmap = XIMAGE_INSTANCE_GTK_PIXMAP(instance);
- mask = XIMAGE_INSTANCE_GTK_MASK(instance);
+ pixmap = XIMAGE_INSTANCE_GTK_PIXMAP (instance);
+ mask = XIMAGE_INSTANCE_GTK_MASK (instance);
pixmapwid = gtk_pixmap_new (pixmap, mask);
gtk_widget_set_usize (pixmapwid, tb->width, tb->height);
- gtk_toolbar_append_item (GTK_TOOLBAR(toolbar), NULL, tooltip, NULL,
- pixmapwid, gtk_toolbar_callback, (gpointer) tb);
+ gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL,
+ C_STRING_TO_GTK_TEXT (tooltip),
+ NULL, pixmapwid, gtk_toolbar_callback,
+ (gpointer) tb);
}
}
cur_x += vert ? 0 : tb->width;
cur_y += vert ? tb->height : 0;
- /* Who's idea was it to use a linked list for toolbar buttons? */
+ /* Whose idea was it to use a linked list for toolbar buttons? */
button = tb->next;
}
@@ -188,7 +191,8 @@
x -= vert ? 3 : 2;
y -= vert ? 2 : 3;
- gtk_fixed_put (GTK_FIXED (FRAME_GTK_TEXT_WIDGET (f)), FRAME_GTK_TOOLBAR_WIDGET
(f)[pos],x, y);
+ gtk_fixed_put (GTK_FIXED (FRAME_GTK_TEXT_WIDGET (f)),
+ FRAME_GTK_TOOLBAR_WIDGET (f)[pos],x, y);
gtk_widget_show_all (FRAME_GTK_TOOLBAR_WIDGET (f)[pos]);
}
@@ -197,7 +201,7 @@
{
FRAME_GTK_TOOLBAR_CHECKSUM (f, pos) = 0;
SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 0);
- if (FRAME_GTK_TOOLBAR_WIDGET(f)[pos])
+ if (FRAME_GTK_TOOLBAR_WIDGET (f)[pos])
gtk_widget_destroy (FRAME_GTK_TOOLBAR_WIDGET(f)[pos]);
}
1.46.2.1 +2 -3 XEmacs/xemacs/src/nt.c
Index: nt.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/nt.c,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -u -r1.46 -r1.46.2.1
--- nt.c 2005/01/28 02:36:25 1.46
+++ nt.c 2005/02/15 01:20:49 1.46.2.1
@@ -1,6 +1,6 @@
/* Utility and Unix shadow routines under MS Windows (WIN32_NATIVE defined).
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2000, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -1114,8 +1114,7 @@
WCHAR wbuffer[_MAX_PATH]; /* extra space for link name */
} data;
- TO_EXTERNAL_FORMAT (C_STRING, new,
- ALLOCA, (newuni, wlen), Qmswindows_unicode);
+ C_STRING_TO_SIZED_EXTERNAL (new, newuni, wlen, Qmswindows_unicode);
if (wlen / sizeof (WCHAR) < _MAX_PATH)
{
LPVOID context = NULL;
1.16.2.1 +38 -453 XEmacs/xemacs/src/objects-gtk.c
Index: objects-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-gtk.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- objects-gtk.c 2005/01/28 02:58:51 1.16
+++ objects-gtk.c 2005/02/15 01:20:49 1.16.2.1
@@ -1,8 +1,8 @@
-/* X-specific Lisp objects.
+/* GTK-specific colors and fonts.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
This file is part of XEmacs.
@@ -46,20 +46,18 @@
/************************************************************************/
/* Replacement for XAllocColor() that tries to return the nearest
- available color if the colormap is full. Original was from FSFmacs,
- but rewritten by Jareth Hein <jareth(a)camelot-soft.com> 97/11/25
- Modified by Lee Kindness <lkindness(a)csl.co.uk> 31/08/99 to handle previous
- total failure which was due to a read/write colorcell being the nearest
- match - tries the next nearest...
+ available color if the colormap is full.
Gdk takes care of all this behind the scenes, so we don't need to
worry about it.
Return value is 1 for normal success, 2 for nearest color success,
- 3 for Non-deallocable sucess. */
+ 3 for Non-deallocable sucess.
+
+ Because this is non-static, it must have x_ prefixed to it. */
int
-allocate_nearest_color (GdkColormap *colormap, GdkVisual *UNUSED (visual),
- GdkColor *color_def)
+gtk_allocate_nearest_color (GdkColormap *colormap, GdkVisual *UNUSED (visual),
+ GdkColor *color_def)
{
int rc;
@@ -70,293 +68,9 @@
return (0);
}
-
-int
-gtk_parse_nearest_color (struct device *d, GdkColor *color, Ibyte *name,
- Bytecount len, Error_Behavior errb)
-{
- GdkColormap *cmap;
- GdkVisual *visual;
- int result;
-
- cmap = DEVICE_GTK_COLORMAP(d);
- visual = DEVICE_GTK_VISUAL (d);
-
- xzero (*color);
- {
- const Extbyte *extname;
- Bytecount extnamelen;
-
- TO_EXTERNAL_FORMAT (DATA, (name, len), ALLOCA, (extname, extnamelen), Qbinary);
-
- result = gdk_color_parse (extname, color);
- }
-
- if (result == FALSE)
- {
- maybe_invalid_argument ("unrecognized color", make_string (name, len),
- Qcolor, errb);
- return 0;
- }
- result = allocate_nearest_color (cmap, visual, color);
- if (!result)
- {
- maybe_signal_error (Qgui_error, "couldn't allocate color",
- make_string (name, len), Qcolor, errb);
- return 0;
- }
-
- return result;
-}
-
-static int
-gtk_initialize_color_instance (struct Lisp_Color_Instance *c, Lisp_Object name,
- Lisp_Object device, Error_Behavior errb)
-{
- GdkColor color;
- int result;
-
- result = gtk_parse_nearest_color (XDEVICE (device), &color,
- XSTRING_DATA (name),
- XSTRING_LENGTH (name),
- errb);
-
- if (!result)
- return 0;
-
- /* Don't allocate the data until we're sure that we will succeed,
- or the finalize method may get fucked. */
- c->data = xnew (struct gtk_color_instance_data);
- if (result == 3)
- COLOR_INSTANCE_GTK_DEALLOC (c) = 0;
- else
- COLOR_INSTANCE_GTK_DEALLOC (c) = 1;
- COLOR_INSTANCE_GTK_COLOR (c) = gdk_color_copy (&color);
- return 1;
-}
-
-static void
-gtk_print_color_instance (struct Lisp_Color_Instance *c,
- Lisp_Object printcharfun,
- int UNUSED (escapeflag))
-{
- GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c);
- write_fmt_string (printcharfun, " %ld=(%X,%X,%X)",
- color->pixel, color->red, color->green, color->blue);
-}
-
-static void
-gtk_finalize_color_instance (struct Lisp_Color_Instance *c)
-{
- if (c->data)
- {
- if (DEVICE_LIVE_P (XDEVICE (c->device)))
- {
- if (COLOR_INSTANCE_GTK_DEALLOC (c))
- {
- gdk_colormap_free_colors (DEVICE_GTK_COLORMAP (XDEVICE (c->device)),
- COLOR_INSTANCE_GTK_COLOR (c), 1);
- }
- gdk_color_free (COLOR_INSTANCE_GTK_COLOR (c));
- }
- xfree (c->data, void *);
- c->data = 0;
- }
-}
-
-/* Color instances are equal if they resolve to the same color on the
- screen (have the same RGB values). I imagine that
- "same RGB values" == "same cell in the colormap." Arguably we
should
- be comparing their names or pixel values instead. */
-
-static int
-gtk_color_instance_equal (struct Lisp_Color_Instance *c1,
- struct Lisp_Color_Instance *c2,
- int UNUSED (depth))
-{
- return (gdk_color_equal (COLOR_INSTANCE_GTK_COLOR (c1),
- COLOR_INSTANCE_GTK_COLOR (c2)));
-}
-
-static Hashcode
-gtk_color_instance_hash (struct Lisp_Color_Instance *c, int UNUSED (depth))
-{
- return (gdk_color_hash (COLOR_INSTANCE_GTK_COLOR (c), NULL));
-}
-
-static Lisp_Object
-gtk_color_instance_rgb_components (struct Lisp_Color_Instance *c)
-{
- GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c);
- return (list3 (make_int (color->red),
- make_int (color->green),
- make_int (color->blue)));
-}
-
-static int
-gtk_valid_color_name_p (struct device *UNUSED (d), Lisp_Object color)
-{
- GdkColor c;
- const char *extname;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, color, C_STRING_ALLOCA, extname, Qctext);
-
- if (gdk_color_parse (extname, &c) != TRUE)
- return(0);
- return (1);
-}
-
-static Lisp_Object
-gtk_color_list (void)
-{
- /* #### BILL!!!
- Is this correct? */
- return call0 (intern ("x-color-list-internal"));
-}
-
-
-/************************************************************************/
-/* font instances */
-/************************************************************************/
-
-static int
-gtk_initialize_font_instance (struct Lisp_Font_Instance *f,
- Lisp_Object UNUSED (name),
- Lisp_Object UNUSED (device), Error_Behavior errb)
-{
- GdkFont *gf;
- XFontStruct *xf;
- const char *extname;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, extname, Qctext);
-
- gf = gdk_font_load (extname);
-
- if (!gf)
- {
- maybe_signal_error (Qgui_error, "couldn't load font", f->name,
- Qfont, errb);
- return 0;
- }
-
- xf = (XFontStruct*) GDK_FONT_XFONT (gf);
-
- /* Don't allocate the data until we're sure that we will succeed,
- or the finalize method may get fucked. */
- f->data = xnew (struct gtk_font_instance_data);
- FONT_INSTANCE_GTK_FONT (f) = gf;
- f->ascent = gf->ascent;
- f->descent = gf->descent;
- f->height = gf->ascent + gf->descent;
-
- /* Now lets figure out the width of the font */
- {
- /* following change suggested by Ted Phelps <phelps(a)dstc.edu.au> */
- unsigned int def_char = 'n'; /*xf->default_char;*/
- unsigned int byte1, byte2;
-
- once_more:
- byte1 = def_char >> 8;
- byte2 = def_char & 0xFF;
-
- if (xf->per_char)
- {
- /* Old versions of the R5 font server have garbage (>63k) as
- def_char. 'n' might not be a valid character. */
- if (byte1 < xf->min_byte1 ||
- byte1 > xf->max_byte1 ||
- byte2 < xf->min_char_or_byte2 ||
- byte2 > xf->max_char_or_byte2)
- f->width = 0;
- else
- f->width = xf->per_char[(byte1 - xf->min_byte1) *
- (xf->max_char_or_byte2 -
- xf->min_char_or_byte2 + 1) +
- (byte2 - xf->min_char_or_byte2)].width;
- }
- else
- f->width = xf->max_bounds.width;
-
- /* Some fonts have a default char whose width is 0. This is no good.
- If that's the case, first try 'n' as the default char, and if n has
- 0 width too (unlikely) then just use the max width. */
- if (f->width == 0)
- {
- if (def_char == xf->default_char)
- f->width = xf->max_bounds.width;
- else
- {
- def_char = xf->default_char;
- goto once_more;
- }
- }
- }
-
- /* If all characters don't exist then there could potentially be
- 0-width characters lurking out there. Not setting this flag
- trips an optimization that would make them appear to have width
- to redisplay. This is bad. So we set it if not all characters
- have the same width or if not all characters are defined.
- */
- /* #### This sucks. There is a measurable performance increase
- when using proportional width fonts if this flag is not set.
- Unfortunately so many of the fucking X fonts are not fully
- defined that we could almost just get rid of this damn flag and
- make it an assertion. */
- f->proportional_p = (xf->min_bounds.width != xf->max_bounds.width ||
- (/* x_handle_non_fully_specified_fonts */ 0 &&
- !xf->all_chars_exist));
-#if 0
- f->width = gdk_char_width (gf, 'n');
- f->proportional_p = (gdk_char_width (gf, '|') != gdk_char_width (gf,
'W')) ? 1 : 0;
-#endif
- return 1;
-}
-static void
-gtk_print_font_instance (struct Lisp_Font_Instance *f,
- Lisp_Object printcharfun,
- int UNUSED (escapeflag))
-{
- write_fmt_string (printcharfun, " 0x%lx",
- (unsigned long) gdk_font_id (FONT_INSTANCE_GTK_FONT (f)));
-}
-
-static void
-gtk_finalize_font_instance (struct Lisp_Font_Instance *f)
-{
- if (f->data)
- {
- if (DEVICE_LIVE_P (XDEVICE (f->device)))
- {
- gdk_font_unref (FONT_INSTANCE_GTK_FONT (f));
- }
- xfree (f->data, void *);
- f->data = 0;
- }
-}
-
-/* Forward declarations for X specific functions at the end of the file */
-Lisp_Object __get_gtk_font_truename (GdkFont *gdk_font, int expandp);
-static Lisp_Object __gtk_font_list_internal (const char *pattern);
-
-static Lisp_Object
-gtk_font_instance_truename (struct Lisp_Font_Instance *f,
- Error_Behavior UNUSED (errb))
-{
- if (NILP (FONT_INSTANCE_TRUENAME (f)))
- {
- FONT_INSTANCE_TRUENAME (f) = __get_gtk_font_truename (FONT_INSTANCE_GTK_FONT (f),
1);
-
- if (NILP (FONT_INSTANCE_TRUENAME (f)))
- {
- /* Ok, just this once, return the font name as the truename.
- (This is only used by Fequal() right now.) */
- return f->name;
- }
- }
- return (FONT_INSTANCE_TRUENAME (f));
-}
+#define THIS_IS_GTK
+#include "objects-xlike-inc.c"
static Lisp_Object
gtk_font_instance_properties (struct Lisp_Font_Instance *UNUSED (f))
@@ -368,78 +82,15 @@
return result;
}
+static Lisp_Object __gtk_font_list_internal (Lisp_Object pattern);
+
static Lisp_Object
gtk_font_list (Lisp_Object pattern, Lisp_Object UNUSED (device),
Lisp_Object UNUSED (maxnumber))
{
- const char *patternext;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, pattern, C_STRING_ALLOCA, patternext, Qbinary);
-
- return (__gtk_font_list_internal (patternext));
-}
-
-#ifdef MULE
-
-static int
-gtk_font_spec_matches_charset (struct device *UNUSED (d), Lisp_Object charset,
- const Ibyte *nonreloc, Lisp_Object reloc,
- Bytecount offset, Bytecount length,
- int stage)
-{
- if (stage)
- return 0;
-
- if (UNBOUNDP (charset))
- return 1;
- /* Hack! Short font names don't have the registry in them,
- so we just assume the user knows what they're doing in the
- case of ASCII. For other charsets, you gotta give the
- long form; sorry buster.
- */
- if (EQ (charset, Vcharset_ascii))
- {
- const Ibyte *the_nonreloc = nonreloc;
- int i;
- Bytecount the_length = length;
-
- if (!the_nonreloc)
- the_nonreloc = XSTRING_DATA (reloc);
- fixup_internal_substring (nonreloc, reloc, offset, &the_length);
- the_nonreloc += offset;
- if (!memchr (the_nonreloc, '*', the_length))
- {
- for (i = 0;; i++)
- {
- const Ibyte *new_nonreloc = (const Ibyte *)
- memchr (the_nonreloc, '-', the_length);
- if (!new_nonreloc)
- break;
- new_nonreloc++;
- the_length -= new_nonreloc - the_nonreloc;
- the_nonreloc = new_nonreloc;
- }
-
- /* If it has less than 5 dashes, it's a short font.
- Of course, long fonts always have 14 dashes or so, but short
- fonts never have more than 1 or 2 dashes, so this is some
- sort of reasonable heuristic. */
- if (i < 5)
- return 1;
- }
- }
-
- return (fast_string_match (XCHARSET_REGISTRY (charset),
- nonreloc, reloc, offset, length, 1,
- ERROR_ME, 0) >= 0);
+ return (__gtk_font_list_internal (pattern));
}
-/* find a font spec that matches font spec FONT and also matches
- (the registry of) CHARSET. */
-static Lisp_Object gtk_find_charset_font (Lisp_Object device, Lisp_Object font,
Lisp_Object charset, int stage);
-
-#endif /* MULE */
-
/************************************************************************/
/* initialization */
@@ -451,32 +102,6 @@
}
void
-console_type_create_objects_gtk (void)
-{
- /* object methods */
-
- CONSOLE_HAS_METHOD (gtk, initialize_color_instance);
- CONSOLE_HAS_METHOD (gtk, print_color_instance);
- CONSOLE_HAS_METHOD (gtk, finalize_color_instance);
- CONSOLE_HAS_METHOD (gtk, color_instance_equal);
- CONSOLE_HAS_METHOD (gtk, color_instance_hash);
- CONSOLE_HAS_METHOD (gtk, color_instance_rgb_components);
- CONSOLE_HAS_METHOD (gtk, valid_color_name_p);
- CONSOLE_HAS_METHOD (gtk, color_list);
-
- CONSOLE_HAS_METHOD (gtk, initialize_font_instance);
- CONSOLE_HAS_METHOD (gtk, print_font_instance);
- CONSOLE_HAS_METHOD (gtk, finalize_font_instance);
- CONSOLE_HAS_METHOD (gtk, font_instance_truename);
- CONSOLE_HAS_METHOD (gtk, font_instance_properties);
- CONSOLE_HAS_METHOD (gtk, font_list);
-#ifdef MULE
- CONSOLE_HAS_METHOD (gtk, find_charset_font);
- CONSOLE_HAS_METHOD (gtk, font_spec_matches_charset);
-#endif
-}
-
-void
vars_of_objects_gtk (void)
{
}
@@ -488,70 +113,20 @@
/* Unbounded, for sufficiently small values of infinity... */
#define MAX_FONT_COUNT 5000
-#ifdef MULE
-/* find a font spec that matches font spec FONT and also matches
- (the registry of) CHARSET. */
-static Lisp_Object
-gtk_find_charset_font (Lisp_Object device, Lisp_Object font,
- Lisp_Object charset, int stage)
-{
- char **names;
- int count = 0;
- Lisp_Object result = Qnil;
- const char *patternext;
- int i;
-
- if (stage)
- return Qnil;
-
- TO_EXTERNAL_FORMAT (LISP_STRING, font, C_STRING_ALLOCA, patternext, Qbinary);
-
- names = XListFonts (GDK_DISPLAY (),
- patternext, MAX_FONT_COUNT, &count);
- /* #### This code seems awfully bogus -- mrb */
- for (i = 0; i < count; i ++)
- {
- const Ibyte *intname;
- Bytecount intlen;
-
- TO_INTERNAL_FORMAT (C_STRING, names[i], ALLOCA, (intname, intlen),
- Qctext);
- if (gtk_font_spec_matches_charset (XDEVICE (device), charset,
- intname, Qnil, 0, -1, 0))
- {
- result = make_string (intname, intlen);
- break;
- }
- }
-
- if (names)
- XFreeFontNames (names);
-
- /* Check for a short font name. */
- if (NILP (result)
- && gtk_font_spec_matches_charset (XDEVICE (device), charset, 0,
- font, 0, -1, 0))
- return font;
-
- return result;
-}
-#endif /* MULE */
-
-/* Unbounded, for sufficiently small values of infinity... */
-#define MAX_FONT_COUNT 5000
-
static int
-valid_font_name_p (Display *dpy, char *name)
+valid_font_name_p (Display *dpy, Ibyte *name)
{
/* Maybe this should be implemented by callign XLoadFont and trapping
the error. That would be a lot of work, and wasteful as hell, but
might be more correct.
*/
int nnames = 0;
- char **names = 0;
- if (! name)
+ Extbyte **names = 0;
+ if (!name)
return 0;
- names = XListFonts (dpy, name, 1, &nnames);
+ names = XListFonts (dpy,
+ NEW_C_STRING_TO_EXTERNAL (name, Qx_font_name_encoding),
+ 1, &nnames);
if (names)
XFreeFontNames (names);
return (nnames != 0);
@@ -568,23 +143,28 @@
{
if (names->data)
{
- if (valid_font_name_p (dpy, (char*) names->data))
+ Ibyte *name = GTK_TEXT_TO_C_STRING (names->data);
+ if (valid_font_name_p (dpy, name))
{
if (!expandp)
{
/* They want the wildcarded version */
- font_name = build_string ((char*) names->data);
+ font_name = build_intstring (name);
}
else
{
/* Need to expand out */
int nnames = 0;
- char **x_font_names = 0;
+ Extbyte **x_font_names = 0;
- x_font_names = XListFonts (dpy, (char*) names->data, 1, &nnames);
+ x_font_names = XListFonts (dpy,
+ NEW_C_STRING_TO_EXTERNAL
+ (name, Qx_font_name_encoding),
+ 1, &nnames);
if (x_font_names)
{
- font_name = build_string (x_font_names[0]);
+ font_name = build_ext_string (x_font_names[0],
+ Qx_font_name_encoding);
XFreeFontNames (x_font_names);
}
}
@@ -596,15 +176,20 @@
return (font_name);
}
-static Lisp_Object __gtk_font_list_internal (const char *pattern)
+static Lisp_Object
+__gtk_font_list_internal (Lisp_Object pattern)
{
- char **names;
+ Extbyte **names;
int count = 0;
Lisp_Object result = Qnil;
- names = XListFonts (GDK_DISPLAY (), pattern, MAX_FONT_COUNT, &count);
+ names =
+ XListFonts (GDK_DISPLAY (),
+ NEW_LISP_STRING_TO_EXTERNAL (pattern, Qx_font_name_encoding),
+ MAX_FONT_COUNT, &count);
while (count--)
- result = Fcons (build_ext_string (names [count], Qbinary), result);
+ result = Fcons (build_ext_string (names[count], Qx_font_name_encoding),
+ result);
if (names)
XFreeFontNames (names);
1.6.8.1 +4 -5 XEmacs/xemacs/src/objects-gtk.h
Index: objects-gtk.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-gtk.h,v
retrieving revision 1.6
retrieving revision 1.6.8.1
diff -u -r1.6 -r1.6.8.1
--- objects-gtk.h 2002/06/20 21:18:39 1.6
+++ objects-gtk.h 2005/02/15 01:20:50 1.6.8.1
@@ -1,7 +1,7 @@
/* Gtk-specific Lisp objects.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996 Ben Wing.
+ Copyright (C) 1995, 1996, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -34,10 +34,9 @@
Color-Instance
****************************************************************************/
-int allocate_nearest_color (GdkColormap *screen_colormap, GdkVisual *visual,
- GdkColor *color_def);
-int gtk_parse_nearest_color (struct device *d, GdkColor *color, Ibyte *name,
- Bytecount len, Error_Behavior errb);
+int gtk_allocate_nearest_color (GdkColormap *screen_colormap,
+ GdkVisual *visual,
+ GdkColor *color_def);
/*****************************************************************************
Font-Instance
1.47.2.1 +7 -7 XEmacs/xemacs/src/objects-msw.c
Index: objects-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-msw.c,v
retrieving revision 1.47
retrieving revision 1.47.2.1
diff -u -r1.47 -r1.47.2.1
--- objects-msw.c 2005/01/28 02:58:51 1.47
+++ objects-msw.c 2005/02/15 01:20:51 1.47.2.1
@@ -1,8 +1,8 @@
-/* mswindows-specific Lisp objects.
+/* mswindows-specific colors and fonts.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems.
- Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1997 Jonathan Harris.
@@ -1765,7 +1765,7 @@
qxesprintf (truename, "%s:%s:10:%s:%s",
fontname, weight, effects, charset);
- LIST_LOOP (fonttail, device_font_list)
+ OLD_LIST_LOOP (fonttail, device_font_list)
{
if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))),
truename, truername))
@@ -1778,7 +1778,7 @@
qxesprintf (truename, "%s:%s:%s:%s:%s",
fontname, weight, points, effects, charset);
- LIST_LOOP (fonttail, device_font_list)
+ OLD_LIST_LOOP (fonttail, device_font_list)
{
if (match_font (XSTRING_DATA (XCAR (XCAR (fonttail))),
truename, truername))
@@ -1939,7 +1939,7 @@
else
ABORT ();
- LIST_LOOP (fonttail, font_list)
+ OLD_LIST_LOOP (fonttail, font_list)
{
Ibyte fontname[MSW_FONTSIZE];
@@ -2192,7 +2192,7 @@
if (!stage)
{
- LIST_LOOP (fonttail, fontlist)
+ OLD_LIST_LOOP (fonttail, fontlist)
{
if (mswindows_font_spec_matches_charset_stage_1
(XDEVICE (device), charset, 0, XCAR (fonttail), 0, -1))
@@ -2201,7 +2201,7 @@
}
else
{
- LIST_LOOP (fonttail, fontlist)
+ OLD_LIST_LOOP (fonttail, fontlist)
{
if (mswindows_font_spec_matches_charset_stage_2
(XDEVICE (device), charset, 0, XCAR (fonttail), 0, -1))
1.16.2.1 +3 -3 XEmacs/xemacs/src/objects-tty.c
Index: objects-tty.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-tty.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- objects-tty.c 2005/01/28 02:58:51 1.16
+++ objects-tty.c 2005/02/15 01:20:51 1.16.2.1
@@ -1,6 +1,6 @@
-/* TTY-specific Lisp objects.
+/* TTY-specific colors and fonts.
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2001, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -112,7 +112,7 @@
Lisp_Object result = Qnil;
Lisp_Object rest;
- LIST_LOOP (rest, Vtty_color_alist)
+ OLD_LIST_LOOP (rest, Vtty_color_alist)
{
result = Fcons (Fsymbol_name (XCAR (XCAR (rest))), result);
}
1.28.2.1 +46 -458 XEmacs/xemacs/src/objects-x.c
Index: objects-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-x.c,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -r1.28 -r1.28.2.1
--- objects-x.c 2005/01/28 02:58:52 1.28
+++ objects-x.c 2005/02/15 01:20:52 1.28.2.1
@@ -1,8 +1,8 @@
-/* X-specific Lisp objects.
+/* X-specific colors and fonts.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems.
- Copyright (C) 1995, 1996, 2000, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
This file is part of XEmacs.
@@ -53,10 +53,12 @@
match - tries the next nearest...
Return value is 1 for normal success, 2 for nearest color success,
- 3 for Non-deallocable success. */
+ 3 for Non-deallocable success.
+
+ Because this is non-static, it must have x_ prefixed to it. */
int
-allocate_nearest_color (Display *display, Colormap colormap, Visual *visual,
- XColor *color_def)
+x_allocate_nearest_color (Display *display, Colormap colormap, Visual *visual,
+ XColor *color_def)
{
int status;
@@ -79,37 +81,43 @@
unsigned long rshift,gshift,bshift,rbits,gbits,bbits,junk;
junk = visual->red_mask;
rshift = 0;
- while ((junk & 0x1) == 0) {
- junk = junk >> 1;
- rshift ++;
- }
+ while ((junk & 0x1) == 0)
+ {
+ junk = junk >> 1;
+ rshift ++;
+ }
rbits = 0;
- while (junk != 0) {
- junk = junk >> 1;
- rbits++;
- }
+ while (junk != 0)
+ {
+ junk = junk >> 1;
+ rbits++;
+ }
junk = visual->green_mask;
gshift = 0;
- while ((junk & 0x1) == 0) {
- junk = junk >> 1;
- gshift ++;
- }
+ while ((junk & 0x1) == 0)
+ {
+ junk = junk >> 1;
+ gshift ++;
+ }
gbits = 0;
- while (junk != 0) {
- junk = junk >> 1;
- gbits++;
- }
+ while (junk != 0)
+ {
+ junk = junk >> 1;
+ gbits++;
+ }
junk = visual->blue_mask;
bshift = 0;
- while ((junk & 0x1) == 0) {
- junk = junk >> 1;
- bshift ++;
- }
+ while ((junk & 0x1) == 0)
+ {
+ junk = junk >> 1;
+ bshift ++;
+ }
bbits = 0;
- while (junk != 0) {
- junk = junk >> 1;
- bbits++;
- }
+ while (junk != 0)
+ {
+ junk = junk >> 1;
+ bbits++;
+ }
color_def->red = color_def->red >> (16 - rbits);
color_def->green = color_def->green >> (16 - gbits);
@@ -223,267 +231,8 @@
}
return status;
}
-
-static int
-x_parse_nearest_color (struct device *d, XColor *color, Lisp_Object name,
- Error_Behavior errb)
-{
- Display *dpy = DEVICE_X_DISPLAY (d);
- Colormap cmap = DEVICE_X_COLORMAP (d);
- Visual *visual = DEVICE_X_VISUAL (d);
- int result;
-
- xzero (*color);
- {
- const Extbyte *extname;
-
- LISP_STRING_TO_EXTERNAL (name, extname, Qx_color_name_encoding);
- result = XParseColor (dpy, cmap, extname, color);
- }
- if (!result)
- {
- maybe_signal_error (Qgui_error, "Unrecognized color",
- name, Qcolor, errb);
- return 0;
- }
- result = allocate_nearest_color (dpy, cmap, visual, color);
- if (!result)
- {
- maybe_signal_error (Qgui_error, "Couldn't allocate color",
- name, Qcolor, errb);
- return 0;
- }
-
- return result;
-}
-
-static int
-x_initialize_color_instance (Lisp_Color_Instance *c, Lisp_Object name,
- Lisp_Object device, Error_Behavior errb)
-{
- XColor color;
- int result;
-
- result = x_parse_nearest_color (XDEVICE (device), &color, name, errb);
-
- if (!result)
- return 0;
-
- /* Don't allocate the data until we're sure that we will succeed,
- or the finalize method may get fucked. */
- c->data = xnew (struct x_color_instance_data);
- if (result == 3)
- COLOR_INSTANCE_X_DEALLOC (c) = 0;
- else
- COLOR_INSTANCE_X_DEALLOC (c) = 1;
- COLOR_INSTANCE_X_COLOR (c) = color;
- return 1;
-}
-
-static void
-x_print_color_instance (Lisp_Color_Instance *c,
- Lisp_Object printcharfun,
- int UNUSED (escapeflag))
-{
- XColor color = COLOR_INSTANCE_X_COLOR (c);
- write_fmt_string (printcharfun, " %ld=(%X,%X,%X)",
- color.pixel, color.red, color.green, color.blue);
-}
-
-static void
-x_finalize_color_instance (Lisp_Color_Instance *c)
-{
- if (c->data)
- {
- if (DEVICE_LIVE_P (XDEVICE (c->device)))
- {
- if (COLOR_INSTANCE_X_DEALLOC (c))
- {
- XFreeColors (DEVICE_X_DISPLAY (XDEVICE (c->device)),
- DEVICE_X_COLORMAP (XDEVICE (c->device)),
- &COLOR_INSTANCE_X_COLOR (c).pixel, 1, 0);
- }
- }
- xfree (c->data, void *);
- c->data = 0;
- }
-}
-
-/* Color instances are equal if they resolve to the same color on the
- screen (have the same RGB values). I imagine that
- "same RGB values" == "same cell in the colormap." Arguably we
should
- be comparing their names or pixel values instead. */
-
-static int
-x_color_instance_equal (Lisp_Color_Instance *c1,
- Lisp_Color_Instance *c2,
- int UNUSED (depth))
-{
- XColor color1 = COLOR_INSTANCE_X_COLOR (c1);
- XColor color2 = COLOR_INSTANCE_X_COLOR (c2);
- return ((color1.red == color2.red) &&
- (color1.green == color2.green) &&
- (color1.blue == color2.blue));
-}
-
-static Hashcode
-x_color_instance_hash (Lisp_Color_Instance *c, int UNUSED (depth))
-{
- XColor color = COLOR_INSTANCE_X_COLOR (c);
- return HASH3 (color.red, color.green, color.blue);
-}
-
-static Lisp_Object
-x_color_instance_rgb_components (Lisp_Color_Instance *c)
-{
- XColor color = COLOR_INSTANCE_X_COLOR (c);
- return (list3 (make_int (color.red),
- make_int (color.green),
- make_int (color.blue)));
-}
-
-static int
-x_valid_color_name_p (struct device *d, Lisp_Object color)
-{
- XColor c;
- Display *dpy = DEVICE_X_DISPLAY (d);
- Colormap cmap = DEVICE_X_COLORMAP (d);
- const Extbyte *extname;
-
- LISP_STRING_TO_EXTERNAL (color, extname, Qx_color_name_encoding);
-
- return XParseColor (dpy, cmap, extname, &c);
-}
-
-static Lisp_Object
-x_color_list (void)
-{
- return call0 (intern ("x-color-list-internal"));
-}
-
-
-/************************************************************************/
-/* font instances */
-/************************************************************************/
-
-static int
-x_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object UNUSED (name),
- Lisp_Object device, Error_Behavior errb)
-{
- Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
- XFontStruct *xf;
- const Extbyte *extname;
-
- LISP_STRING_TO_EXTERNAL (f->name, extname, Qx_font_name_encoding);
- xf = XLoadQueryFont (dpy, extname);
-
- if (!xf)
- {
- maybe_signal_error (Qgui_error, "Couldn't load font", f->name,
Qfont,
- errb);
- return 0;
- }
-
- if (!xf->max_bounds.width)
- {
- /* yes, this has been known to happen. */
- XFreeFont (dpy, xf);
- maybe_signal_error (Qgui_error, "X font is too small", f->name,
Qfont,
- errb);
- return 0;
- }
-
- /* Don't allocate the data until we're sure that we will succeed,
- or the finalize method may get fucked. */
- f->data = xnew (struct x_font_instance_data);
- FONT_INSTANCE_X_FONT (f) = xf;
- f->ascent = xf->ascent;
- f->descent = xf->descent;
- f->height = xf->ascent + xf->descent;
- {
- /* following change suggested by Ted Phelps <phelps(a)dstc.edu.au> */
- int def_char = 'n'; /*xf->default_char;*/
- int byte1, byte2;
-
- once_more:
- byte1 = def_char >> 8;
- byte2 = def_char & 0xFF;
-
- if (xf->per_char)
- {
- /* Old versions of the R5 font server have garbage (>63k) as
- def_char. 'n' might not be a valid character. */
- if (byte1 < (int) xf->min_byte1 ||
- byte1 > (int) xf->max_byte1 ||
- byte2 < (int) xf->min_char_or_byte2 ||
- byte2 > (int) xf->max_char_or_byte2)
- f->width = 0;
- else
- f->width = xf->per_char[(byte1 - xf->min_byte1) *
- (xf->max_char_or_byte2 -
- xf->min_char_or_byte2 + 1) +
- (byte2 - xf->min_char_or_byte2)].width;
- }
- else
- f->width = xf->max_bounds.width;
-
- /* Some fonts have a default char whose width is 0. This is no good.
- If that's the case, first try 'n' as the default char, and if n has
- 0 width too (unlikely) then just use the max width. */
- if (f->width == 0)
- {
- if (def_char == (int) xf->default_char)
- f->width = xf->max_bounds.width;
- else
- {
- def_char = xf->default_char;
- goto once_more;
- }
- }
- }
- /* If all characters don't exist then there could potentially be
- 0-width characters lurking out there. Not setting this flag
- trips an optimization that would make them appear to have width
- to redisplay. This is bad. So we set it if not all characters
- have the same width or if not all characters are defined.
- */
- /* #### This sucks. There is a measurable performance increase
- when using proportional width fonts if this flag is not set.
- Unfortunately so many of the fucking X fonts are not fully
- defined that we could almost just get rid of this damn flag and
- make it an assertion. */
- f->proportional_p = (xf->min_bounds.width != xf->max_bounds.width ||
- (x_handle_non_fully_specified_fonts &&
- !xf->all_chars_exist));
-
- return 1;
-}
-static void
-x_print_font_instance (Lisp_Font_Instance *f,
- Lisp_Object printcharfun,
- int UNUSED (escapeflag))
-{
- write_fmt_string (printcharfun, " 0x%lx",
- (unsigned long) FONT_INSTANCE_X_FONT (f)->fid);
-}
-
-static void
-x_finalize_font_instance (Lisp_Font_Instance *f)
-{
-
- if (f->data)
- {
- if (DEVICE_LIVE_P (XDEVICE (f->device)))
- {
- Display *dpy = DEVICE_X_DISPLAY (XDEVICE (f->device));
-
- XFreeFont (dpy, FONT_INSTANCE_X_FONT (f));
- }
- xfree (f->data, void *);
- f->data = 0;
- }
-}
+#include "objects-xlike-inc.c"
/* Determining the truename of a font is hard. (Big surprise.)
@@ -770,36 +519,6 @@
}
static Lisp_Object
-x_font_instance_truename (Lisp_Font_Instance *f, Error_Behavior errb)
-{
- struct device *d = XDEVICE (f->device);
-
- if (NILP (FONT_INSTANCE_TRUENAME (f)))
- {
- Display *dpy = DEVICE_X_DISPLAY (d);
- {
- Extbyte *nameext;
-
- LISP_STRING_TO_EXTERNAL (f->name, nameext, Qx_font_name_encoding);
- FONT_INSTANCE_TRUENAME (f) =
- x_font_truename (dpy, nameext, FONT_INSTANCE_X_FONT (f));
- }
- if (NILP (FONT_INSTANCE_TRUENAME (f)))
- {
- Lisp_Object font_instance = wrap_font_instance (f);
-
-
- maybe_signal_error (Qgui_error, "Couldn't determine font truename",
- font_instance, Qfont, errb);
- /* Ok, just this once, return the font name as the truename.
- (This is only used by Fequal() right now.) */
- return f->name;
- }
- }
- return FONT_INSTANCE_TRUENAME (f);
-}
-
-static Lisp_Object
x_font_instance_properties (Lisp_Font_Instance *f)
{
struct device *d = XDEVICE (f->device);
@@ -817,9 +536,8 @@
Extbyte *namestrext = XGetAtomName (dpy, atom);
if (namestrext)
- TO_INTERNAL_FORMAT (C_STRING, namestrext,
- ALLOCA, (name_str, name_len),
- Qx_atom_name_encoding);
+ EXTERNAL_TO_SIZED_C_STRING (namestrext, name_str, name_len,
+ Qx_atom_name_encoding);
name = (name_str ? intern_int (name_str) : Qnil);
if (name_str &&
@@ -865,130 +583,25 @@
int count = 0;
int max_number = MAX_FONT_COUNT;
Lisp_Object result = Qnil;
- const Extbyte *patternext;
LISP_STRING_TO_EXTERNAL (pattern, patternext, Qx_font_name_encoding);
- if (!NILP(maxnumber) && INTP(maxnumber))
- {
- max_number = XINT(maxnumber);
- }
+ if (!NILP (maxnumber) && INTP (maxnumber))
+ max_number = XINT (maxnumber);
- names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
- patternext, max_number, &count);
+ names =
+ XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
+ NEW_LISP_STRING_TO_EXTERNAL (pattern, Qx_font_name_encoding),
+ max_number, &count);
while (count--)
result = Fcons (build_ext_string (names[count], Qx_font_name_encoding),
result);
if (names)
XFreeFontNames (names);
- return result;
-}
-
-#ifdef MULE
-
-static int
-x_font_spec_matches_charset (struct device *UNUSED (d), Lisp_Object charset,
- const Ibyte *nonreloc, Lisp_Object reloc,
- Bytecount offset, Bytecount length,
- int stage)
-{
- if (stage)
- return 0;
-
- if (UNBOUNDP (charset))
- return 1;
- /* Hack! Short font names don't have the registry in them,
- so we just assume the user knows what they're doing in the
- case of ASCII. For other charsets, you gotta give the
- long form; sorry buster.
- */
- if (EQ (charset, Vcharset_ascii))
- {
- const Ibyte *the_nonreloc = nonreloc;
- int i;
- Bytecount the_length = length;
-
- if (!the_nonreloc)
- the_nonreloc = XSTRING_DATA (reloc);
- fixup_internal_substring (nonreloc, reloc, offset, &the_length);
- the_nonreloc += offset;
- if (!memchr (the_nonreloc, '*', the_length))
- {
- for (i = 0;; i++)
- {
- const Ibyte *new_nonreloc = (const Ibyte *)
- memchr (the_nonreloc, '-', the_length);
- if (!new_nonreloc)
- break;
- new_nonreloc++;
- the_length -= new_nonreloc - the_nonreloc;
- the_nonreloc = new_nonreloc;
- }
-
- /* If it has less than 5 dashes, it's a short font.
- Of course, long fonts always have 14 dashes or so, but short
- fonts never have more than 1 or 2 dashes, so this is some
- sort of reasonable heuristic. */
- if (i < 5)
- return 1;
- }
- }
-
- return (fast_string_match (XCHARSET_REGISTRY (charset),
- nonreloc, reloc, offset, length, 1,
- ERROR_ME, 0) >= 0);
-}
-
-/* find a font spec that matches font spec FONT and also matches
- (the registry of) CHARSET. */
-static Lisp_Object
-x_find_charset_font (Lisp_Object device, Lisp_Object font, Lisp_Object charset,
- int stage)
-{
- Extbyte **names;
- int count = 0;
- Lisp_Object result = Qnil;
- const Extbyte *patternext;
- int i;
-
- if (stage)
- return Qnil;
-
- LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding);
-
- names = XListFonts (DEVICE_X_DISPLAY (XDEVICE (device)),
- patternext, MAX_FONT_COUNT, &count);
- /* #### This code seems awfully bogus -- mrb */
- for (i = 0; i < count; i ++)
- {
- const Ibyte *intname;
- Bytecount intlen;
-
- TO_INTERNAL_FORMAT (C_STRING, names[i],
- ALLOCA, (intname, intlen),
- Qx_font_name_encoding);
- if (x_font_spec_matches_charset (XDEVICE (device), charset,
- intname, Qnil, 0, -1, 0))
- {
- result = make_string (intname, intlen);
- break;
- }
- }
-
- if (names)
- XFreeFontNames (names);
-
- /* Check for a short font name. */
- if (NILP (result)
- && x_font_spec_matches_charset (XDEVICE (device), charset, 0,
- font, 0, -1, 0))
- return font;
return result;
}
-#endif /* MULE */
-
/************************************************************************/
/* initialization */
@@ -999,31 +612,6 @@
{
}
-void
-console_type_create_objects_x (void)
-{
- /* object methods */
-
- CONSOLE_HAS_METHOD (x, initialize_color_instance);
- CONSOLE_HAS_METHOD (x, print_color_instance);
- CONSOLE_HAS_METHOD (x, finalize_color_instance);
- CONSOLE_HAS_METHOD (x, color_instance_equal);
- CONSOLE_HAS_METHOD (x, color_instance_hash);
- CONSOLE_HAS_METHOD (x, color_instance_rgb_components);
- CONSOLE_HAS_METHOD (x, valid_color_name_p);
- CONSOLE_HAS_METHOD (x, color_list);
-
- CONSOLE_HAS_METHOD (x, initialize_font_instance);
- CONSOLE_HAS_METHOD (x, print_font_instance);
- CONSOLE_HAS_METHOD (x, finalize_font_instance);
- CONSOLE_HAS_METHOD (x, font_instance_truename);
- CONSOLE_HAS_METHOD (x, font_instance_properties);
- CONSOLE_HAS_METHOD (x, font_list);
-#ifdef MULE
- CONSOLE_HAS_METHOD (x, find_charset_font);
- CONSOLE_HAS_METHOD (x, font_spec_matches_charset);
-#endif
-}
void
vars_of_objects_x (void)
1.4.8.1 +3 -3 XEmacs/xemacs/src/objects-x.h
Index: objects-x.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/objects-x.h,v
retrieving revision 1.4
retrieving revision 1.4.8.1
diff -u -r1.4 -r1.4.8.1
--- objects-x.h 2002/06/20 21:18:40 1.4
+++ objects-x.h 2005/02/15 01:20:52 1.4.8.1
@@ -1,7 +1,7 @@
/* X-specific Lisp objects.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2005 Ben Wing.
This file is part of XEmacs.
@@ -31,8 +31,8 @@
#ifdef HAVE_X_WINDOWS
-int allocate_nearest_color (Display *display, Colormap screen_colormap,
- Visual *visual, XColor *color_def);
+int x_allocate_nearest_color (Display *display, Colormap screen_colormap,
+ Visual *visual, XColor *color_def);
#endif /* HAVE_X_WINDOWS */
#endif /* INCLUDED_objects_x_h_ */
1.52.2.1 +24 -52 XEmacs/xemacs/src/print.c
Index: print.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/print.c,v
retrieving revision 1.52
retrieving revision 1.52.2.1
diff -u -r1.52 -r1.52.2.1
--- print.c 2005/01/24 23:34:05 1.52
+++ print.c 2005/02/15 01:20:54 1.52.2.1
@@ -1,6 +1,6 @@
/* Lisp object printing and output streams.
Copyright (C) 1985, 1986, 1988, 1992-1995 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -155,9 +155,8 @@
if (stream || output_is_std_handle)
{
if (initialized && !inhibit_non_essential_conversion_operations)
- TO_EXTERNAL_FORMAT (DATA, (ptr, len),
- ALLOCA, (extptr, extlen),
- Qterminal);
+ SIZED_C_STRING_TO_SIZED_EXTERNAL (ptr, len, extptr, extlen,
+ Qterminal);
else
{
#ifdef NON_ASCII_INTERNAL_FORMAT
@@ -421,31 +420,7 @@
if (LSTREAMP (function))
{
if (STRINGP (reloc))
- {
- /* Protect against Lstream_write() causing a GC and
- relocating the string. For small strings, we do it by
- alloc'ing the string and using a copy; for large strings,
- we inhibit GC. */
- if (len < 65536)
- {
- Ibyte *copied = alloca_ibytes (len);
- memcpy (copied, newnonreloc + offset, len);
- Lstream_write (XLSTREAM (function), copied, len);
- }
- else if (gc_currently_forbidden)
- {
- /* Avoid calling begin_gc_forbidden, which conses. We can reach
- this point from the cons debug code, which will get us into
- an infinite loop if we cons again. */
- Lstream_write (XLSTREAM (function), newnonreloc + offset, len);
- }
- else
- {
- int speccount = begin_gc_forbidden ();
- Lstream_write (XLSTREAM (function), newnonreloc + offset, len);
- unbind_to (speccount);
- }
- }
+ write_string_to_lstream (XLSTREAM (function), reloc, offset, len);
else
Lstream_write (XLSTREAM (function), newnonreloc + offset, len);
@@ -1079,7 +1054,7 @@
* -wsr
*/
void
-float_to_string (char *buf, double data)
+float_to_string (Ibyte *buf, double data)
{
Ibyte *cp, c;
int width;
@@ -1087,7 +1062,7 @@
if (NILP (Vfloat_output_format)
|| !STRINGP (Vfloat_output_format))
lose:
- sprintf (buf, "%.16g", data);
+ qxesprintf (buf, "%.16g", data);
else /* oink oink */
{
/* Check that the spec we have is fully valid.
@@ -1116,8 +1091,7 @@
if (cp[1] != 0)
goto lose;
- sprintf (buf, (char *) XSTRING_DATA (Vfloat_output_format),
- data);
+ qxesprintf (buf, (CIbyte *) XSTRING_DATA (Vfloat_output_format), data);
}
/* added by jwz: don't allow "1.0" to print as "1"; that
destroys
@@ -1127,7 +1101,7 @@
*/
{
Ibyte *s = (Ibyte *) buf; /* don't use signed chars here!
- isdigit() can't hack them! */
+ isdigit() can't hack them! */
if (*s == '-') s++;
for (; *s; s++)
/* if there's a non-digit, then there is a decimal point, or
@@ -1145,7 +1119,7 @@
if (buf [0] == '.' || (buf [0] == '-' && buf [1] ==
'.'))
{
int i;
- for (i = strlen (buf) + 1; i >= 0; i--)
+ for (i = qxestrlen (buf) + 1; i >= 0; i--)
buf [i+1] = buf [i];
buf [(buf [0] == '-' ? 1 : 0)] = '0';
}
@@ -1191,15 +1165,15 @@
and the trailing \0. */
void
-long_to_string (char *buffer, long number)
+long_to_string (Ibyte *buffer, long number)
{
- char *p = buffer;
+ Ibyte *p = buffer;
long n = number;
#if (SIZEOF_LONG != 4) && (SIZEOF_LONG != 8)
/* We are running in a strange or misconfigured environment. Let
sprintf cope with it. */
- sprintf (buffer, "%ld", n);
+ qxesprintf (buffer, "%ld", n);
#else /* (SIZEOF_LONG == 4) || (SIZEOF_LONG == 8) */
if (n < 0)
@@ -1261,7 +1235,7 @@
#undef DIGITS_19
static void
-print_vector_internal (const char *start, const char *end,
+print_vector_internal (const Ascbyte *start, const Ascbyte *end,
Lisp_Object obj,
Lisp_Object printcharfun, int escapeflag)
{
@@ -1498,7 +1472,7 @@
break;
}
- /* Don't abort or signal if called from debug_print() or already
+ /* Don't ABORT or signal if called from debug_print() or already
crashing */
if (!inhibit_non_essential_conversion_operations)
{
@@ -1551,10 +1525,10 @@
for (i = 0; i < print_depth; i++)
if (EQ (obj, being_printed[i]))
{
- char buf[DECIMAL_PRINT_SIZE (long) + 1];
+ Ibyte buf[DECIMAL_PRINT_SIZE (long) + 1];
*buf = '#';
long_to_string (buf + 1, i);
- write_c_string (printcharfun, buf);
+ write_string (printcharfun, buf);
UNGCPRO;
return;
}
@@ -1577,18 +1551,18 @@
case Lisp_Type_Int_Even:
case Lisp_Type_Int_Odd:
{
- char buf[DECIMAL_PRINT_SIZE (EMACS_INT)];
+ Ibyte buf[DECIMAL_PRINT_SIZE (EMACS_INT)];
long_to_string (buf, XINT (obj));
- write_c_string (printcharfun, buf);
+ write_string (printcharfun, buf);
break;
}
case Lisp_Type_Char:
{
/* God intended that this be #\..., you know. */
- char buf[16];
+ Ascbyte buf[16];
Ichar ch = XCHAR (obj);
- char *p = buf;
+ Ascbyte *p = buf;
*p++ = '?';
if (ch < 32)
{
@@ -1753,10 +1727,10 @@
print_float (Lisp_Object obj, Lisp_Object printcharfun,
int UNUSED (escapeflag))
{
- char pigbuf[350]; /* see comments in float_to_string */
+ Ibyte pigbuf[350]; /* see comments in float_to_string */
float_to_string (pigbuf, XFLOAT_DATA (obj));
- write_c_string (printcharfun, pigbuf);
+ write_string (printcharfun, pigbuf);
}
void
@@ -1850,7 +1824,7 @@
/* #### Ugh, this is needlessly complex and slow for what we
need here. It might be a good idea to copy equivalent code
from FSF. --hniksic */
- confusing = isfloat_string ((char *) data);
+ confusing = isfloat_string (data);
if (confusing)
write_c_string (printcharfun, "\\");
}
@@ -1919,9 +1893,7 @@
const Extbyte *extptr;
#if 0 /* We want to see the internal representation, don't we? */
if (initialized && !inhibit_non_essential_conversion_operations)
- TO_EXTERNAL_FORMAT (DATA, (str, len),
- ALLOCA, (extptr, extlen),
- Qterminal);
+ SIZED_C_STRING_TO_SIZED_EXTERNAL (str, len, extptr, extlen, Qterminal);
else
#endif /* 0 */
{
1.57.2.1 +2 -3 XEmacs/xemacs/src/process-unix.c
Index: process-unix.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process-unix.c,v
retrieving revision 1.57
retrieving revision 1.57.2.1
diff -u -r1.57 -r1.57.2.1
--- process-unix.c 2005/02/04 04:06:34 1.57
+++ process-unix.c 2005/02/15 01:20:54 1.57.2.1
@@ -538,8 +538,7 @@
Extbyte *tailportext;
CHECK_STRING (tail_port);
- TO_EXTERNAL_FORMAT (LISP_STRING, tail_port, C_STRING_ALLOCA,
- tailportext, Qnative);
+ LISP_STRING_TO_EXTERNAL (tail_port, tailportext, Qnative);
svc_info = getservbyname (tailportext, proto);
if ((svc_info != 0) && (svc_info->s_port == port))
@@ -1416,7 +1415,7 @@
p = 0;
{
Lisp_Object tail;
- LIST_LOOP (tail, Vprocess_list)
+ OLD_LIST_LOOP (tail, Vprocess_list)
{
Lisp_Object proc = XCAR (tail);
p = XPROCESS (proc);
1.66.2.1 +5 -9 XEmacs/xemacs/src/process.c
Index: process.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/process.c,v
retrieving revision 1.66
retrieving revision 1.66.2.1
diff -u -r1.66 -r1.66.2.1
--- process.c 2005/01/24 23:34:06 1.66
+++ process.c 2005/02/15 01:20:55 1.66.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1985, 1986, 1987, 1988, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1995, 1996, 2001, 2002, 2004 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -184,22 +184,18 @@
}
}
-#ifdef HAVE_WINDOW_SYSTEM
-extern void debug_process_finalization (Lisp_Process *p);
-#endif /* HAVE_WINDOW_SYSTEM */
-
static void
finalize_process (void *header, int for_disksave)
{
- /* #### this probably needs to be tied into the tty event loop */
- /* #### when there is one */
Lisp_Process *p = (Lisp_Process *) header;
-#ifdef HAVE_WINDOW_SYSTEM
+#if 0
+ /* #### Present in event-Xt.c but #if 0'd out for a very long time.
+ Probably we should just delete. */
if (!for_disksave)
{
debug_process_finalization (p);
}
-#endif /* HAVE_WINDOW_SYSTEM */
+#endif
if (p->process_data)
{
1.19.2.1 +1 -1 XEmacs/xemacs/src/ralloc.c
Index: ralloc.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ralloc.c,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -r1.19 -r1.19.2.1
--- ralloc.c 2005/01/24 23:34:06 1.19
+++ ralloc.c 2005/02/15 01:20:56 1.19.2.1
@@ -2050,7 +2050,7 @@
#ifndef MAP_ANONYMOUS
DEV_ZERO_FD = open( "/dev/zero", O_RDWR );
if (DEV_ZERO_FD < 0)
- /* Failed. Perhaps we should abort here? */
+ /* Failed. Perhaps we should ABORT here? */
return; /* used to return 0 */
#endif
1.22.2.1 +1 -1 XEmacs/xemacs/src/rangetab.c
Index: rangetab.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/rangetab.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- rangetab.c 2005/02/03 16:14:08 1.22
+++ rangetab.c 2005/02/15 01:20:57 1.22.2.1
@@ -1,6 +1,6 @@
/* XEmacs routines to deal with range tables.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1995, 2002, 2004 Ben Wing.
+ Copyright (C) 1995, 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
1.17.2.1 +40 -32 XEmacs/xemacs/src/redisplay-gtk.c
Index: redisplay-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-gtk.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- redisplay-gtk.c 2005/01/24 23:34:06 1.17
+++ redisplay-gtk.c 2005/02/15 01:20:57 1.17.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1994 Lucid, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2002, 2003 Ben Wing.
+ Copyright (C) 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -43,7 +43,6 @@
#include "window.h"
#include "console-gtk-impl.h"
-#include "gccache-gtk.h"
#include "glyphs-gtk.h"
#include "objects-gtk-impl.h"
@@ -609,7 +608,8 @@
mask |= GDK_GC_LINE_WIDTH;
}
- return gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, (GdkGCValuesMask) mask);
+ return gtk_gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv,
+ (GdkGCValuesMask) mask);
}
/*****************************************************************************
@@ -864,8 +864,9 @@
if (uthick == 1)
{
- gdk_draw_line (GDK_DRAWABLE (x_win), gc, xpos, dl->ypos + upos,
- xpos + this_width, dl->ypos + upos);
+ gdk_draw_line (GDK_DRAWABLE (x_win), gc, xpos,
+ dl->ypos + upos, xpos + this_width,
+ dl->ypos + upos);
}
else if (uthick > 1)
{
@@ -875,37 +876,38 @@
}
}
- if (cachel->strikethru) {
- gint ascent,descent,upos, uthick;
- GdkFont *gfont = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (font));
-
- /* Cannot get at font properties in Gtk, so we resort to
- guessing */
+ if (cachel->strikethru)
+ {
+ gint ascent, descent, upos, uthick;
+ GdkFont *gfont = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (font));
- ascent = gfont->ascent;
- descent = gfont->descent;
- uthick = 1;
+ /* Cannot get at font properties in Gtk, so we resort to
+ guessing */
- upos = ascent - ((ascent + descent) / 2) + 1;
+ ascent = gfont->ascent;
+ descent = gfont->descent;
+ uthick = 1;
- /* Generally, upos will be positive (above the baseline),so subtract */
- if (dl->ypos - upos < dl->ypos + dl->descent - dl->clip)
- {
- if (dl->ypos - upos + uthick > dl->ypos + dl->descent - dl->clip)
- uthick = dl->descent - dl->clip + upos;
+ upos = ascent - ((ascent + descent) / 2) + 1;
- if (uthick == 1)
- {
+ /* Generally, upos will be positive (above the baseline),so subtract */
+ if (dl->ypos - upos < dl->ypos + dl->descent - dl->clip)
+ {
+ if (dl->ypos - upos + uthick > dl->ypos + dl->descent -
dl->clip)
+ uthick = dl->descent - dl->clip + upos;
+
+ if (uthick == 1)
+ {
gdk_draw_line (GDK_DRAWABLE (x_win), gc, xpos, dl->ypos - upos,
xpos + this_width, dl->ypos - upos);
- }
- else if (uthick > 1)
- {
+ }
+ else if (uthick > 1)
+ {
gdk_draw_rectangle (GDK_DRAWABLE (x_win), gc, TRUE, xpos, dl->ypos + upos,
this_width, uthick);
- }
- }
- }
+ }
+ }
+ }
/* Restore the GC */
if (need_clipping)
@@ -940,6 +942,8 @@
length by 2. So we fake them out my multiplying the
length by the dimension of the text. This will do the
right thing for single-dimension runs as well of course.
+
+ !!####
*/
gdk_draw_text_image (GDK_DRAWABLE (x_win), gdk_font, cgc, xpos,
dl->ypos, (char *) runs[i].ptr,
@@ -1087,7 +1091,8 @@
*/
}
- gc = gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, pixmap_mask);
+ gc = gtk_gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv,
+ (GdkGCValuesMask) pixmap_mask);
}
else
{
@@ -1205,7 +1210,8 @@
gcv.graphics_exposures = FALSE;
mask = GDK_GC_FOREGROUND | GDK_GC_BACKGROUND | GDK_GC_EXPOSURES;
- background_gc = gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, mask);
+ background_gc =
+ gtk_gc_cache_lookup (DEVICE_GTK_GC_CACHE (d), &gcv, (GdkGCValuesMask) mask);
/* Clear the divider area first. This needs to be done when a
window split occurs. */
@@ -1649,8 +1655,10 @@
gcv.foreground.pixel = (tmp_fcolor.pixel ^ tmp_bcolor.pixel);
gcv.function = GDK_XOR;
gcv.graphics_exposures = FALSE;
- gc = gc_cache_lookup (DEVICE_GTK_GC_CACHE (XDEVICE (f->device)), &gcv,
- GDK_GC_FOREGROUND | GDK_GC_FUNCTION | GDK_GC_EXPOSURES);
+ gc = gtk_gc_cache_lookup (DEVICE_GTK_GC_CACHE (XDEVICE (f->device)), &gcv,
+ (GdkGCValuesMask)
+ (GDK_GC_FOREGROUND | GDK_GC_FUNCTION |
+ GDK_GC_EXPOSURES));
gdk_draw_rectangle (GDK_DRAWABLE (GET_GTK_WIDGET_WINDOW (FRAME_GTK_SHELL_WIDGET
(f))),
gc, TRUE, w->pixel_left, w->pixel_top,
1.42.2.1 +3 -3 XEmacs/xemacs/src/redisplay-msw.c
Index: redisplay-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-msw.c,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -r1.42 -r1.42.2.1
--- redisplay-msw.c 2005/01/24 23:34:07 1.42
+++ redisplay-msw.c 2005/02/15 01:20:58 1.42.2.1
@@ -114,9 +114,9 @@
for (j = runbegin; j < i; j++)
int_storage_ptr +=
set_itext_ichar (int_storage + int_storage_ptr, str[j]);
- TO_EXTERNAL_FORMAT (DATA, (int_storage, int_storage_ptr),
- ALLOCA, (alloca_ext_storage, nchars),
- Qmswindows_unicode);
+ SIZED_C_STRING_TO_SIZED_EXTERNAL (int_storage, int_storage_ptr,
+ alloca_ext_storage, nchars,
+ Qmswindows_unicode);
nchars /= sizeof (WCHAR); /* Tricky ... */
DO_REALLOC (ext_storage, ext_storage_size, total_nchars + nchars,
WCHAR);
1.26.2.1 +5 -7 XEmacs/xemacs/src/redisplay-output.c
Index: redisplay-output.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-output.c,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -r1.26 -r1.26.2.1
--- redisplay-output.c 2005/01/24 23:34:07 1.26
+++ redisplay-output.c 2005/02/15 01:20:58 1.26.2.1
@@ -1255,11 +1255,9 @@
redisplay_unmap_subwindows (struct frame* f, int x, int y, int width, int height,
Lisp_Object ignored_window)
{
- Lisp_Object rest;
-
- LIST_LOOP (rest, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
+ LIST_LOOP_2 (elt, XWEAK_LIST_LIST (FRAME_SUBWINDOW_CACHE (f)))
{
- Lisp_Image_Instance *ii = XIMAGE_INSTANCE (XCAR (rest));
+ Lisp_Image_Instance *ii = XIMAGE_INSTANCE (elt);
if (IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii)
&&
IMAGE_INSTANCE_DISPLAY_X (ii)
@@ -1272,9 +1270,9 @@
&&
IMAGE_INSTANCE_DISPLAY_Y (ii) < y + height
&&
- !EQ (XCAR (rest), ignored_window))
+ !EQ (elt, ignored_window))
{
- unmap_subwindow (XCAR (rest));
+ unmap_subwindow (elt);
}
}
}
@@ -1488,7 +1486,7 @@
redisplay_normalize_display_box (db, dga);
/* Flip through the widgets in the layout displaying as necessary */
- LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (p))
+ OLD_LIST_LOOP (rest, IMAGE_INSTANCE_LAYOUT_CHILDREN (p))
{
Lisp_Object child = glyph_image_instance (XCAR (rest), image_instance,
ERROR_ME_DEBUG_WARN, 1);
1.40.2.1 +11 -12 XEmacs/xemacs/src/redisplay-x.c
Index: redisplay-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay-x.c,v
retrieving revision 1.40
retrieving revision 1.40.2.1
diff -u -r1.40 -r1.40.2.1
--- redisplay-x.c 2005/01/24 23:34:07 1.40
+++ redisplay-x.c 2005/02/15 01:20:59 1.40.2.1
@@ -2,7 +2,7 @@
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 1994 Lucid, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2002, 2003 Ben Wing.
+ Copyright (C) 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -48,7 +48,6 @@
#include "console-x-impl.h"
#include "glyphs-x.h"
#include "objects-x-impl.h"
-#include "xgccache.h"
#include "EmacsFrame.h"
#include "EmacsFrameP.h"
@@ -581,7 +580,7 @@
/* this is needed because the GC draws with a pixmap here */
gcv.fill_style = FillOpaqueStippled;
gcv.stipple = DEVICE_X_GRAY_PIXMAP (d);
- top_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv,
+ top_shadow_gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv,
(mask | GCStipple | GCFillStyle));
tmp_pixel = WINDOW_FACE_CACHEL_FOREGROUND (w, findex);
@@ -594,11 +593,11 @@
else
{
gcv.foreground = top_shadow_pixel;
- top_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
+ top_shadow_gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
}
gcv.foreground = bottom_shadow_pixel;
- bottom_shadow_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
+ bottom_shadow_gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
if (use_pixmap && flip_gcs)
{
@@ -608,7 +607,7 @@
}
gcv.foreground = background_pixel;
- background_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
+ background_gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
/* possibly revert the GC's This will give a depressed look to the
divider */
@@ -729,7 +728,7 @@
mask |= GCLineWidth;
}
- return gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
+ return x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
}
/*****************************************************************************
@@ -1202,7 +1201,7 @@
*/
}
- gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, pixmap_mask);
+ gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, pixmap_mask);
}
else
{
@@ -1333,7 +1332,7 @@
gcv.foreground = tmp_color.pixel;
gcv.graphics_exposures = False;
mask = GCForeground | GCBackground | GCGraphicsExposures;
- background_gc = gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
+ background_gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (d), &gcv, mask);
/* Clear the divider area first. This needs to be done when a
window split occurs. */
@@ -1625,7 +1624,7 @@
topc.red = MINL (65535, (unsigned long) topc.red * 6 / 5);
topc.green = MINL (65535, (unsigned long) topc.green * 6 / 5);
topc.blue = MINL (65535, (unsigned long) topc.blue * 6 / 5);
- if (allocate_nearest_color (dpy, cmap, visual, &topc))
+ if (x_allocate_nearest_color (dpy, cmap, visual, &topc))
{
*top_shadow = topc.pixel;
top_frobbed = 1;
@@ -1641,7 +1640,7 @@
botc.red = (unsigned short) ((unsigned long) botc.red * 3 / 5);
botc.green = (unsigned short) ((unsigned long) botc.green * 3 / 5);
botc.blue = (unsigned short) ((unsigned long) botc.blue * 3 / 5);
- if (allocate_nearest_color (dpy, cmap, visual, &botc))
+ if (x_allocate_nearest_color (dpy, cmap, visual, &botc))
{
*bottom_shadow = botc.pixel;
bottom_frobbed = 1;
@@ -1871,7 +1870,7 @@
gcv.foreground = (tmp_fcolor.pixel ^ tmp_bcolor.pixel);
gcv.function = GXxor;
gcv.graphics_exposures = False;
- gc = gc_cache_lookup (DEVICE_X_GC_CACHE (XDEVICE (f->device)), &gcv,
+ gc = x_gc_cache_lookup (DEVICE_X_GC_CACHE (XDEVICE (f->device)), &gcv,
(GCForeground | GCFunction | GCGraphicsExposures));
default_face_height_and_width (frame, &flash_height, 0);
1.96.2.1 +29 -26 XEmacs/xemacs/src/redisplay.c
Index: redisplay.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay.c,v
retrieving revision 1.96
retrieving revision 1.96.2.1
diff -u -r1.96 -r1.96.2.1
--- redisplay.c 2005/02/03 16:30:38 1.96
+++ redisplay.c 2005/02/15 01:21:00 1.96.2.1
@@ -1,7 +1,7 @@
/* Display generation from window structure and buffer text.
Copyright (C) 1994, 1995, 1996 Board of Trustees, University of Illinois.
Copyright (C) 1995 Free Software Foundation, Inc.
- Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003 Ben Wing.
+ Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1996 Chuck Thompson.
@@ -2609,7 +2609,7 @@
/* This had better be a newline but doing it this way
we'll see obvious incorrect results if it isn't. No
- need to abort here. */
+ need to ABORT here. */
data.ch = BYTE_BUF_FETCH_CHAR (b, data.byte_charpos);
goto done;
@@ -3888,7 +3888,7 @@
Fputhash (extent, child, buf->modeline_extent_table);
}
Fset_extent_parent (child, extent);
- set_extent_endpoints
+ set_extent_endpoints_byte
(XEXTENT (child),
Dynarr_at (formatted_string_extent_start_dynarr, elt),
Dynarr_at (formatted_string_extent_end_dynarr, elt),
@@ -3926,7 +3926,7 @@
/* Reset the runes on the modeline. */
Dynarr_reset (db->runes);
- if (!WINDOW_HAS_MODELINE_P (w))
+ if (!WINDOW_MODELINE_VISIBLE_P (w))
{
struct rune rb;
@@ -4496,7 +4496,7 @@
if (MINI_WINDOW_P (w))
need_modeline = 0;
/* windows which haven't had it turned off do */
- else if (WINDOW_HAS_MODELINE_P (w))
+ else if (WINDOW_MODELINE_VISIBLE_P (w))
need_modeline = 1;
/* windows which have it turned off don't have a divider if there is
a horizontal scrollbar */
@@ -5285,6 +5285,7 @@
return ret_charcount;
}
+
/*
Info on Re-entrancy crashes, with backtraces given:
@@ -5299,8 +5300,7 @@
void
generate_displayable_area (struct window *w, Lisp_Object disp_string,
int xpos, int ypos, int width, int height,
- display_line_dynarr* dla,
- Charcount start_pos,
+ display_line_dynarr *dla, Charcount start_pos,
face_index default_face)
{
int yend = ypos + height;
@@ -5486,7 +5486,7 @@
Lisp_Object string;
prop = Dynarr_new (prop_block);
- string = concat2(Vminibuf_preprompt, Vminibuf_prompt);
+ string = concat2 (Vminibuf_preprompt, Vminibuf_prompt);
pb.type = PROP_MINIBUF_PROMPT;
pb.data.p_string.str = XSTRING_DATA(string);
pb.data.p_string.len = XSTRING_LENGTH(string);
@@ -6748,7 +6748,7 @@
internal_bind_int (&in_display_nesting, 1 + in_display_nesting);
#ifdef ERROR_CHECK_TRAPPING_PROBLEMS
/* Force every call to QUIT to check for in_displayness. This will
- verify proper wrapping, as in the previous comment, aborting if not. */
+ verify proper wrapping, as in the previous comment, ABORTing if not. */
something_happened++;
/* Verify that no nonlocal exits blow past us. */
record_unwind_protect (commit_ritual_suicide, Qnil);
@@ -7134,7 +7134,8 @@
/* Note: All places in the C code that call redisplay() are prepared to
handle GCing, which can happen from run_pre_idle_hook(). However, we
- can't currently handle GC inside the guts of redisplay; see
+ can't currently handle GC inside the guts of redisplay (#### someone
+ should fix this), so we need to use INHIBIT_GC when calling Lisp; see
enter_redisplay_critical_section().
(#### What about other external entry points to the redisplay code?
@@ -7181,7 +7182,7 @@
line-number-mode is on. The first line in the buffer is counted as
1. If narrowing is in effect, the lines are counted from the
beginning of the visible portion of the buffer. */
-static char *
+static CIbyte *
window_line_number (struct window *w, int type)
{
struct device *d = XDEVICE (XFRAME (w->frame)->device);
@@ -7203,7 +7204,7 @@
{
static char window_line_number_buf[DECIMAL_PRINT_SIZE (long)];
- long_to_string (window_line_number_buf, line + 1);
+ long_to_string ((Ibyte *) window_line_number_buf, line + 1);
return window_line_number_buf;
}
@@ -7226,7 +7227,7 @@
decode_mode_spec (struct window *w, Ichar spec, int type)
{
Lisp_Object obj = Qnil;
- const char *str = NULL;
+ const Ascbyte *str = NULL;
struct buffer *b = XBUFFER (w->buffer);
Dynarr_reset (mode_spec_ibyte_string);
@@ -7250,9 +7251,9 @@
? BUF_PT (b)
: marker_position (w->pointm[type]);
int col = column_at_point (b, pt, 1) + !!column_number_start_at_one;
- char buf[DECIMAL_PRINT_SIZE (long)];
+ Ascbyte buf[DECIMAL_PRINT_SIZE (long)];
- long_to_string (buf, col);
+ long_to_string ((Ibyte *) buf, col);
Dynarr_add_many (mode_spec_ibyte_string,
(const Ibyte *) buf, strlen (buf));
@@ -7291,7 +7292,7 @@
if (FRAME_TTY_P (f) && f->order_count > 1 && f->order_count
<= 99999999)
{
/* Naughty, naughty */
- char * writable_str = alloca_array (char, 10);
+ Ascbyte * writable_str = alloca_array (Ascbyte, 10);
sprintf (writable_str, "-%d", f->order_count);
str = writable_str;
}
@@ -7373,7 +7374,7 @@
{
/* This hard limit is ok since the string it will hold has a
fixed maximum length of 3. But just to be safe... */
- char buf[10];
+ Ascbyte buf[10];
Charcount chars = pos - BUF_BEGV (b);
Charcount total = BUF_ZV (b) - BUF_BEGV (b);
@@ -7420,7 +7421,7 @@
{
/* This hard limit is ok since the string it will hold has a
fixed maximum length of around 6. But just to be safe... */
- char buf[10];
+ Ascbyte buf[10];
Charcount chars = botpos - BUF_BEGV (b);
Charcount total = BUF_ZV (b) - BUF_BEGV (b);
@@ -7762,7 +7763,7 @@
int win_char_height = window_char_height (w, 1);
/* Occasionally we get here with a 0 height
- window. find_next_newline_no_quit will abort if we pass it a
+ window. find_next_newline_no_quit will ABORT if we pass it a
count of 0 so handle that case. */
if (!win_char_height)
win_char_height = 1;
@@ -9611,17 +9612,18 @@
/* */
/***************************************************************************/
-static int
+static Bytecount
compute_rune_dynarr_usage (rune_dynarr *dyn, struct overhead_stats *ovstats)
{
return dyn ? Dynarr_memory_usage (dyn, ovstats) : 0;
}
-static int
+static Bytecount
compute_display_block_dynarr_usage (display_block_dynarr *dyn,
struct overhead_stats *ovstats)
{
- int total, i;
+ Bytecount total;
+ int i;
if (!dyn)
return 0;
@@ -9633,18 +9635,19 @@
return total;
}
-static int
+static Bytecount
compute_glyph_block_dynarr_usage (glyph_block_dynarr *dyn,
struct overhead_stats *ovstats)
{
return dyn ? Dynarr_memory_usage (dyn, ovstats) : 0;
}
-int
+Bytecount
compute_display_line_dynarr_usage (display_line_dynarr *dyn,
struct overhead_stats *ovstats)
{
- int total, i;
+ Bytecount total;
+ int i;
if (!dyn)
return 0;
@@ -9661,7 +9664,7 @@
return total;
}
-int
+Bytecount
compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn,
struct overhead_stats *ovstats)
{
1.22.2.1 +5 -4 XEmacs/xemacs/src/redisplay.h
Index: redisplay.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/redisplay.h,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- redisplay.h 2005/01/26 10:33:42 1.22
+++ redisplay.h 2005/02/15 01:21:03 1.22.2.1
@@ -771,10 +771,11 @@
Lisp_Object locale);
#ifdef MEMORY_USAGE_STATS
-int compute_display_line_dynarr_usage (display_line_dynarr *dyn,
- struct overhead_stats *ovstats);
-int compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn,
- struct overhead_stats *ovstats);
+Bytecount compute_display_line_dynarr_usage (display_line_dynarr *dyn,
+ struct overhead_stats *ovstats);
+Bytecount compute_line_start_cache_dynarr_usage (line_start_cache_dynarr *dyn,
+ struct overhead_stats *
+ ovstats);
#endif
1.16.2.1 +8 -4 XEmacs/xemacs/src/scrollbar-gtk.c
Index: scrollbar-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar-gtk.c,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- scrollbar-gtk.c 2005/01/24 23:34:09 1.16
+++ scrollbar-gtk.c 2005/02/15 01:21:03 1.16.2.1
@@ -3,6 +3,7 @@
Copyright (C) 1994 Amdhal Corporation.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1995 Darrell Kindred <dkindred+(a)cmu.edu>.
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -395,9 +396,12 @@
{
/* This function can GC */
int vertical = (int) user_data;
- struct frame *f = (struct frame*) gtk_object_get_data (GTK_OBJECT (adj),
GTK_DATA_FRAME_IDENTIFIER);
+ struct frame *f =
+ (struct frame *)
+ gtk_object_get_data (GTK_OBJECT (adj), GTK_DATA_FRAME_IDENTIFIER);
struct scrollbar_instance *instance;
- GUI_ID id = (GUI_ID) gtk_object_get_data (GTK_OBJECT (adj),
GTK_DATA_GUI_IDENTIFIER);
+ GUI_ID id =
+ (GUI_ID) gtk_object_get_data (GTK_OBJECT (adj), GTK_DATA_GUI_IDENTIFIER);
Lisp_Object win, frame;
struct window_mirror *mirror;
Lisp_Object event_type = Qnil;
@@ -472,12 +476,12 @@
}
#ifdef MEMORY_USAGE_STATS
-static int
+static Bytecount
gtk_compute_scrollbar_instance_usage (struct device *UNUSED (d),
struct scrollbar_instance *inst,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
while (inst)
{
1.28.4.1 +3 -3 XEmacs/xemacs/src/scrollbar-msw.c
Index: scrollbar-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar-msw.c,v
retrieving revision 1.28
retrieving revision 1.28.4.1
diff -u -r1.28 -r1.28.4.1
--- scrollbar-msw.c 2004/09/20 19:19:58 1.28
+++ scrollbar-msw.c 2005/02/15 01:21:04 1.28.4.1
@@ -225,7 +225,7 @@
assert (OPAQUE_PTRP (ptr));
ptr = Fgethash (ptr, Vmswindows_scrollbar_instance_table, Qnil);
sb = XSCROLLBAR_INSTANCE (ptr);
- /* #### we're still hitting an abort here with 0 as the second
+ /* #### we're still hitting an ABORT here with 0 as the second
parameter, although only occasionally. It seems that sometimes we
receive events for scrollbars that don't exist anymore. I assume
it must happen like this: The user does something that causes a
@@ -421,12 +421,12 @@
#ifdef MEMORY_USAGE_STATS
-static int
+static Bytecount
mswindows_compute_scrollbar_instance_usage (struct device *UNUSED (d),
struct scrollbar_instance *inst,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
while (inst)
{
1.28.2.1 +2 -2 XEmacs/xemacs/src/scrollbar-x.c
Index: scrollbar-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar-x.c,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -r1.28 -r1.28.2.1
--- scrollbar-x.c 2005/01/24 23:34:09 1.28
+++ scrollbar-x.c 2005/02/15 01:21:04 1.28.2.1
@@ -691,12 +691,12 @@
#ifdef MEMORY_USAGE_STATS
-static int
+static Bytecount
x_compute_scrollbar_instance_usage (struct device *UNUSED (d),
struct scrollbar_instance *inst,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
while (inst)
{
1.33.2.1 +2 -2 XEmacs/xemacs/src/scrollbar.c
Index: scrollbar.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar.c,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -r1.33 -r1.33.2.1
--- scrollbar.c 2005/01/06 03:45:32 1.33
+++ scrollbar.c 2005/02/15 01:21:05 1.33.2.1
@@ -260,12 +260,12 @@
#ifdef MEMORY_USAGE_STATS
-int
+Bytecount
compute_scrollbar_instance_usage (struct device *d,
struct scrollbar_instance *inst,
struct overhead_stats *ovstats)
{
- int total = 0;
+ Bytecount total = 0;
if (HAS_DEVMETH_P(d, compute_scrollbar_instance_usage))
total += DEVMETH (d, compute_scrollbar_instance_usage, (d, inst, ovstats));
1.5.10.1 +3 -3 XEmacs/xemacs/src/scrollbar.h
Index: scrollbar.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/scrollbar.h,v
retrieving revision 1.5
retrieving revision 1.5.10.1
diff -u -r1.5 -r1.5.10.1
--- scrollbar.h 2002/03/29 04:48:32 1.5
+++ scrollbar.h 2005/02/15 01:21:05 1.5.10.1
@@ -65,9 +65,9 @@
struct window_mirror *mirror,
int active, int horiz_only);
#ifdef MEMORY_USAGE_STATS
-int compute_scrollbar_instance_usage (struct device *d,
- struct scrollbar_instance *inst,
- struct overhead_stats *ovstats);
+Bytecount compute_scrollbar_instance_usage (struct device *d,
+ struct scrollbar_instance *inst,
+ struct overhead_stats *ovstats);
#endif
extern Lisp_Object Vscrollbar_width, Vscrollbar_height;
1.46.2.1 +2 -2 XEmacs/xemacs/src/search.c
Index: search.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/search.c,v
retrieving revision 1.46
retrieving revision 1.46.2.1
diff -u -r1.46 -r1.46.2.1
--- search.c 2005/01/24 23:34:09 1.46
+++ search.c 2005/02/15 01:21:05 1.46.2.1
@@ -1,7 +1,7 @@
/* String search routines for XEmacs.
Copyright (C) 1985, 1986, 1987, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -629,7 +629,7 @@
If ALLOW_QUIT is non-zero, call QUIT periodically. */
-static Bytebpos
+Bytebpos
byte_scan_buffer (struct buffer *buf, Ichar target, Bytebpos st, Bytebpos en,
EMACS_INT count, EMACS_INT *shortage, int allow_quit)
{
1.5.4.1 +10 -7 XEmacs/xemacs/src/select-common.h
Index: select-common.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/select-common.h,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- select-common.h 2004/11/04 23:06:52 1.5
+++ select-common.h 2005/02/15 01:21:07 1.5.4.1
@@ -1,5 +1,6 @@
/* Selection processing for XEmacs -- common btwn select-x.c and select-gtk.c
Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
@@ -24,10 +25,13 @@
#define XE_ATOM_TYPE Atom
#define XE_ATOM_TO_SYMBOL x_atom_to_symbol
#define XE_SYMBOL_TO_ATOM symbol_to_x_atom
+#define XE_ENCODING Qctext
#else
#define XE_ATOM_TYPE GdkAtom
#define XE_ATOM_TO_SYMBOL atom_to_symbol
#define XE_SYMBOL_TO_ATOM symbol_to_gtk_atom
+/* !!#### */
+#define XE_ENCODING Vgtk_text_encoding
#endif /* PROCESSING_X_CODE */
/* #### These are going to move into Lisp code(!) with the aid of
@@ -95,7 +99,8 @@
return make_ext_string ((Extbyte *) data, size,
((type == gdk_atom_intern ("TEXT", FALSE)) ||
(type == gdk_atom_intern ("COMPOUND_TEXT", FALSE)))
- ? Qctext : Qbinary);
+ /* !!#### */
+ ? Vgtk_text_encoding : Qbinary);
/* Convert a single atom to a Lisp Symbol.
Convert a set of atoms to a vector of symbols. */
@@ -195,9 +200,8 @@
const Extbyte *extval;
Bytecount extvallen;
- TO_EXTERNAL_FORMAT (LISP_STRING, obj,
- ALLOCA, (extval, extvallen),
- (NILP (type) ? Qctext : Qbinary));
+ LISP_STRING_TO_SIZED_EXTERNAL (obj, extval, extvallen,
+ (NILP (type) ? XE_ENCODING : Qbinary));
*format_ret = 8;
*size_ret = extvallen;
*data_ret = xnew_rawbytes (*size_ret);
@@ -217,9 +221,8 @@
*format_ret = 8;
len = set_itext_ichar (buf, XCHAR (obj));
- TO_EXTERNAL_FORMAT (DATA, (buf, len),
- ALLOCA, (extval, extvallen),
- Qctext);
+ SIZED_C_STRING_TO_SIZED_EXTERNAL (buf, len, extval, extvallen,
+ XE_ENCODING);
*size_ret = extvallen;
*data_ret = xnew_rawbytes (*size_ret);
memcpy (*data_ret, extval, *size_ret);
1.16.4.1 +3 -3 XEmacs/xemacs/src/select-gtk.c
Index: select-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/select-gtk.c,v
retrieving revision 1.16
retrieving revision 1.16.4.1
diff -u -r1.16 -r1.16.4.1
--- select-gtk.c 2004/11/04 23:06:52 1.16
+++ select-gtk.c 2005/02/15 01:21:07 1.16.4.1
@@ -1,6 +1,6 @@
/* GTK selection processing for XEmacs
Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 2001 Ben Wing.
+ Copyright (C) 2001, 2003 Ben Wing.
This file is part of XEmacs.
@@ -59,7 +59,7 @@
{
const Extbyte *nameext;
- LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext, Qctext);
+ LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext, Vgtk_text_encoding);
return gdk_atom_intern (nameext, only_if_exists ? TRUE : FALSE);
}
}
@@ -76,7 +76,7 @@
if (! str) return Qnil;
- EXTERNAL_TO_C_STRING (str, intstr, Qctext);
+ EXTERNAL_TO_C_STRING (str, intstr, Vgtk_text_encoding);
g_free (str);
return intern_int (intstr);
}
1.15.4.1 +2 -3 XEmacs/xemacs/src/select-msw.c
Index: select-msw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/select-msw.c,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -u -r1.15 -r1.15.4.1
--- select-msw.c 2004/09/20 19:19:59 1.15
+++ select-msw.c 2005/02/15 01:21:08 1.15.4.1
@@ -1,6 +1,6 @@
/* mswindows selection processing for XEmacs
Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 2000, 2001, 2002 Ben Wing.
+ Copyright (C) 2000, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -314,8 +314,7 @@
else
/* we do NOT append a zero byte. we don't know whether we're dealing
with regular text, unicode text, binary data, etc. */
- TO_EXTERNAL_FORMAT (LISP_STRING, data, MALLOC, (src, size),
- Qbinary);
+ TO_EXTERNAL_FORMAT (LISP_STRING, data, MALLOC, (src, size), Qbinary);
/* Allocate memory */
hValue = GlobalAlloc (GMEM_DDESHARE | GMEM_MOVEABLE, size);
1.17.2.1 +85 -83 XEmacs/xemacs/src/select-x.c
Index: select-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/select-x.c,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -r1.17 -r1.17.2.1
--- select-x.c 2005/01/24 23:34:09 1.17
+++ select-x.c 2005/02/15 01:21:08 1.17.2.1
@@ -1,6 +1,6 @@
/* X Selection processing for XEmacs
Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003, 2005 Ben Wing.
This file is part of XEmacs.
@@ -139,7 +139,8 @@
{
const Extbyte *nameext;
- LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext, Qctext);
+ LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext,
+ Qx_atom_name_encoding);
return XInternAtom (display, nameext, only_if_exists ? True : False);
}
}
@@ -188,14 +189,68 @@
if (! str) return Qnil;
- TO_INTERNAL_FORMAT (C_STRING, str,
- C_STRING_ALLOCA, intstr,
- Qctext);
+ EXTERNAL_TO_C_STRING (str, intstr, Qx_atom_name_encoding);
XFree (str);
return intern_int (intstr);
}
}
+/* Convert internal data to STRING or COMPOUND_TEXT format.
+ Return value is
+
+ 0: data was ASCII, DST == SRC and DSTLEN == SRCLEN.
+ 1: data was Latin-1 (STRING), DST must be xfree()ed.
+ 2: data was Compound Text (COMPOUND_TEXT), DST must be xfree()ed.
+*/
+
+enum external_x_data
+x_convert_to_external_property_data (const Ibyte *src, Bytecount srclen,
+ Extbyte **dst, Bytecount *dstlen)
+{
+#ifdef MULE
+ enum external_x_data chartypes = X_ASCII;
+ const Ibyte *ptr = src, *end = ptr + srclen;
+ /* Optimize for the common ASCII case */
+ while (ptr <= end)
+ {
+ if (byte_ascii_p (*ptr))
+ {
+ ptr++;
+ continue;
+ }
+
+ if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 ||
+ (*ptr) == LEADING_BYTE_CONTROL_1)
+ {
+ chartypes = X_LATIN_1;
+ ptr += 2;
+ continue;
+ }
+
+ chartypes = X_COMPOUND_TEXT;
+ break;
+ }
+
+ if (chartypes == X_LATIN_1)
+ TO_EXTERNAL_FORMAT (DATA, (src, srclen), MALLOC, (*dst, *dstlen),
+ Qbinary);
+ else if (chartypes == X_COMPOUND_TEXT)
+ TO_EXTERNAL_FORMAT (DATA, (src, srclen), MALLOC, (*dst, *dstlen),
+ Qctext);
+ else
+ {
+ *dst = (Extbyte *) src;
+ *dstlen = srclen;
+ }
+
+ return chartypes;
+#else
+ *dst = (Extbyte *) src;
+ *dstlen = srclen;
+ return X_ASCII;
+#endif
+}
+
#define PROCESSING_X_CODE
#include "select-common.h"
#undef PROCESSING_X_CODE
@@ -259,6 +314,7 @@
static void motif_clipboard_cb ();
# endif
+
static void
hack_motif_clipboard_selection (Atom selection_atom,
Lisp_Object selection_value,
@@ -304,45 +360,13 @@
String encoding = "STRING";
const Ibyte *data = XSTRING_DATA (selection_value);
Bytecount bytes = XSTRING_LENGTH (selection_value);
+ Extbyte *dataext;
+ Bytecount bytesext;
+ enum external_x_data chartypes =
+ x_convert_to_external_property_data (data, bytes, &dataext, &bytesext);
-#ifdef MULE
- {
- enum { ASCII, LATIN_1, WORLD } chartypes = ASCII;
- const Ibyte *ptr = data, *end = ptr + bytes;
- /* Optimize for the common ASCII case */
- while (ptr <= end)
- {
- if (byte_ascii_p (*ptr))
- {
- ptr++;
- continue;
- }
-
- if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 ||
- (*ptr) == LEADING_BYTE_CONTROL_1)
- {
- chartypes = LATIN_1;
- ptr += 2;
- continue;
- }
-
- chartypes = WORLD;
- break;
- }
-
- if (chartypes == LATIN_1)
- TO_EXTERNAL_FORMAT (LISP_STRING, selection_value,
- ALLOCA, (data, bytes),
- Qbinary);
- else if (chartypes == WORLD)
- {
- TO_EXTERNAL_FORMAT (LISP_STRING, selection_value,
- ALLOCA, (data, bytes),
- Qctext);
- encoding = "COMPOUND_TEXT";
- }
- }
-#endif /* MULE */
+ if (chartypes == X_COMPOUND_TEXT)
+ encoding = "COMPOUND_TEXT";
fmh = XmStringCreateLtoR ("Clipboard", XmSTRING_DEFAULT_CHARSET);
while (ClipboardSuccess !=
@@ -360,15 +384,19 @@
#ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK
/* O'Reilly examples say size can be 0,
but this clearly is not the case. */
- 0, bytes, (int) selecting_window, /* private id */
+ 0, bytesext,
+ (int) selecting_window, /* private id */
#else /* !MOTIF_INCREMENTAL_CLIPBOARDS_WORK */
- (XtPointer) data, bytes, 0,
+ (XtPointer) dataext, bytes, 0,
#endif /* !MOTIF_INCREMENTAL_CLIPBOARDS_WORK */
&dataid))
;
while (ClipboardSuccess !=
XmClipboardEndCopy (display, selecting_window, itemid))
;
+
+ if (chartypes != X_ASCII)
+ xfree (dataext, Extbyte *);
}
}
@@ -1310,14 +1338,11 @@
Display *display = DEVICE_X_DISPLAY (d);
Window window = RootWindow (display, 0); /* Cutbuffers are on frame 0 */
Atom cut_buffer_atom;
- const Ibyte *data = XSTRING_DATA (string);
- Bytecount bytes = XSTRING_LENGTH (string);
Bytecount bytes_remaining;
Bytecount max_bytes = SELECTION_QUANTUM (display);
-#ifdef MULE
- const Ibyte *ptr, *end;
- enum { ASCII, LATIN_1, WORLD } chartypes = ASCII;
-#endif
+ Extbyte *data, *data1;
+ Bytecount bytes;
+ enum external_x_data chartypes;
if (max_bytes > MAX_SELECTION_QUANTUM)
max_bytes = MAX_SELECTION_QUANTUM;
@@ -1334,39 +1359,13 @@
The ICCCM requires that this be so, and other clients assume it,
as we do ourselves in initialize_cut_buffers. */
-#ifdef MULE
- /* Optimize for the common ASCII case */
- for (ptr = data, end = ptr + bytes; ptr <= end; )
- {
- if (byte_ascii_p (*ptr))
- {
- ptr++;
- continue;
- }
+ chartypes =
+ x_convert_to_external_property_data (XSTRING_DATA (string),
+ XSTRING_LENGTH (string),
+ &data1, &bytes);
- if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 ||
- (*ptr) == LEADING_BYTE_CONTROL_1)
- {
- chartypes = LATIN_1;
- ptr += 2;
- continue;
- }
-
- chartypes = WORLD;
- break;
- }
-
- if (chartypes == LATIN_1)
- TO_EXTERNAL_FORMAT (LISP_STRING, string,
- ALLOCA, (data, bytes),
- Qbinary);
- else if (chartypes == WORLD)
- TO_EXTERNAL_FORMAT (LISP_STRING, string,
- ALLOCA, (data, bytes),
- Qctext);
-#endif /* MULE */
-
bytes_remaining = bytes;
+ data = data1;
while (bytes_remaining)
{
@@ -1375,10 +1374,13 @@
XChangeProperty (display, window, cut_buffer_atom, XA_STRING, 8,
(bytes_remaining == bytes
? PropModeReplace : PropModeAppend),
- data, chunk);
+ (const unsigned char *) data, chunk);
data += chunk;
bytes_remaining -= chunk;
}
+
+ if (chartypes != X_ASCII)
+ xfree (data1, Extbyte *);
return string;
}
1.23.2.1 +4 -9 XEmacs/xemacs/src/sound.c
Index: sound.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sound.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- sound.c 2005/01/28 02:36:26 1.23
+++ sound.c 2005/02/15 01:21:08 1.23.2.1
@@ -1,7 +1,7 @@
/* Sound functions.
Copyright (C) 1992, 1993, 1994 Lucid Inc.
Copyright (C) 1994, 1995 Free Software Foundation, Inc.
- Copyright (C) 2002, 2004 Ben Wing.
+ Copyright (C) 2002, 2003, 2004 Ben Wing.
This file is part of XEmacs.
@@ -346,9 +346,7 @@
Binbyte *soundext;
Bytecount soundextlen;
- TO_EXTERNAL_FORMAT (LISP_STRING, sound,
- ALLOCA, (soundext, soundextlen),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (sound, soundext, soundextlen, Qbinary);
if (nas_play_sound_data (soundext, soundextlen, vol))
return Qnil;
}
@@ -361,8 +359,7 @@
Bytecount soundextlen;
int succes;
- TO_EXTERNAL_FORMAT (LISP_STRING, sound, ALLOCA, (soundext, soundextlen),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (sound, soundext, soundextlen, Qbinary);
/* #### ESD uses alarm(). But why should we also stop SIGIO? */
stop_interrupts ();
@@ -382,9 +379,7 @@
Bytecount soundextlen;
int succes;
- TO_EXTERNAL_FORMAT (LISP_STRING, sound,
- ALLOCA, (soundext, soundextlen),
- Qbinary);
+ LISP_STRING_TO_SIZED_EXTERNAL (sound, soundext, soundextlen, Qbinary);
/* The sound code doesn't like getting SIGIO interrupts. Unix sucks! */
stop_interrupts ();
succes = play_sound_data (soundext, soundextlen, vol);
1.39.2.1 +220 -201 XEmacs/xemacs/src/specifier.c
Index: specifier.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/specifier.c,v
retrieving revision 1.39
retrieving revision 1.39.2.1
diff -u -r1.39 -r1.39.2.1
--- specifier.c 2005/02/03 16:14:08 1.39
+++ specifier.c 2005/02/15 01:21:09 1.39.2.1
@@ -1,6 +1,6 @@
/* Specifier implementation
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
This file is part of XEmacs.
@@ -861,7 +861,7 @@
canonicalize_tag_set (Lisp_Object tag_set)
{
int len = XINT (Flength (tag_set));
- Lisp_Object *tags, rest;
+ Lisp_Object *tags;
int i, j;
/* We assume in this function that the tag_set has already been
@@ -874,8 +874,12 @@
tags = alloca_array (Lisp_Object, len);
i = 0;
- LIST_LOOP (rest, tag_set)
- tags[i++] = XCAR (rest);
+ {
+ LIST_LOOP_2 (elt, tag_set)
+ {
+ tags[i++] = elt;
+ }
+ }
/* Sort the list of tags. We use a bubble sort here (copied from
extent_fragment_update()) -- reduces the function call overhead,
@@ -923,25 +927,27 @@
static int
device_matches_specifier_tag_set_p (Lisp_Object device, Lisp_Object tag_set)
{
- Lisp_Object devtype, devclass, rest;
+ Lisp_Object devtype, devclass;
struct device *d = XDEVICE (device);
devtype = DEVICE_TYPE (d);
devclass = DEVICE_CLASS (d);
- LIST_LOOP (rest, tag_set)
- {
- Lisp_Object tag = XCAR (rest);
- Lisp_Object assoc;
+ {
+ LIST_LOOP_2 (elt, tag_set)
+ {
+ Lisp_Object tag = elt;
+ Lisp_Object assoc;
- if (EQ (tag, devtype) || EQ (tag, devclass))
- continue;
- assoc = assq_no_quit (tag, DEVICE_USER_DEFINED_TAGS (d));
- /* other built-in tags (device types/classes) are not in
- the user-defined-tags list. */
- if (NILP (assoc) || NILP (XCDR (assoc)))
- return 0;
- }
+ if (EQ (tag, devtype) || EQ (tag, devclass))
+ continue;
+ assoc = assq_no_quit (tag, DEVICE_USER_DEFINED_TAGS (d));
+ /* other built-in tags (device types/classes) are not in
+ the user-defined-tags list. */
+ if (NILP (assoc) || NILP (XCDR (assoc)))
+ return 0;
+ }
+ }
return 1;
}
@@ -1042,8 +1048,12 @@
DEVICE_USER_DEFINED_TAGS (d) = Fcopy_alist (Vuser_defined_tags);
/* Now set up the initial values */
- LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d))
- XCDR (XCAR (rest)) = Qt;
+ {
+ LIST_LOOP_2 (elt, DEVICE_USER_DEFINED_TAGS (d))
+ {
+ XCDR (elt) = Qt;
+ }
+ }
for (rest = Vuser_defined_tags, rest2 = DEVICE_USER_DEFINED_TAGS (d);
!NILP (rest); rest = XCDR (rest), rest2 = XCDR (rest2))
@@ -1066,16 +1076,18 @@
(device))
{
struct device *d = decode_device (device);
- Lisp_Object rest, list = Qnil;
+ Lisp_Object list = Qnil;
struct gcpro gcpro1;
GCPRO1 (list);
- LIST_LOOP (rest, DEVICE_USER_DEFINED_TAGS (d))
- {
- if (!NILP (XCDR (XCAR (rest))))
- list = Fcons (XCAR (XCAR (rest)), list);
- }
+ {
+ LIST_LOOP_2 (elt, DEVICE_USER_DEFINED_TAGS (d))
+ {
+ if (!NILP (XCDR (elt)))
+ list = Fcons (XCAR (elt), list);
+ }
+ }
list = Fnreverse (list);
list = Fcons (DEVICE_CLASS (d), list);
@@ -1090,13 +1102,17 @@
*/
())
{
- Lisp_Object list = Qnil, rest;
+ Lisp_Object list = Qnil;
struct gcpro gcpro1;
GCPRO1 (list);
- LIST_LOOP (rest, Vuser_defined_tags)
- list = Fcons (XCAR (XCAR (rest)), list);
+ {
+ LIST_LOOP_2 (elt, Vuser_defined_tags)
+ {
+ list = Fcons (XCAR (elt), list);
+ }
+ }
list = Fnreverse (list);
list = nconc2 (Fcopy_sequence (Vdevice_class_list), list);
@@ -1241,15 +1257,15 @@
if (!CONSP (inst_pair))
{
maybe_sferror (
- "Invalid instantiator pair", inst_pair,
- Qspecifier, errb);
+ "Invalid instantiator pair", inst_pair,
+ Qspecifier, errb);
return Qnil;
}
if (NILP (Fvalid_specifier_tag_set_p (tag_set = XCAR (inst_pair))))
{
maybe_invalid_argument (
- "Invalid specifier tag", tag_set,
- Qspecifier, errb);
+ "Invalid specifier tag", tag_set,
+ Qspecifier, errb);
return Qnil;
}
@@ -1290,15 +1306,15 @@
if (!CONSP (spec))
{
maybe_sferror (
- "Invalid specification list", spec_list,
- Qspecifier, errb);
+ "Invalid specification list", spec_list,
+ Qspecifier, errb);
return Qnil;
}
if (NILP (Fvalid_specifier_locale_p (locale = XCAR (spec))))
{
maybe_invalid_argument (
- "Invalid specifier locale", locale,
- Qspecifier, errb);
+ "Invalid specifier locale", locale,
+ Qspecifier, errb);
return Qnil;
}
@@ -1428,26 +1444,27 @@
int short_p, int copy_tree_p)
{
Lisp_Object retval = Qnil;
- Lisp_Object rest;
struct gcpro gcpro1;
GCPRO1 (retval);
- LIST_LOOP (rest, inst_list)
- {
- Lisp_Object tagged_inst = XCAR (rest);
- Lisp_Object tagged_inst_tag = XCAR (tagged_inst);
- if (tag_sets_match_p (tag_set, tagged_inst_tag, exact_p))
- {
- if (short_p && NILP (tagged_inst_tag))
- retval = Fcons (copy_tree_p ?
- Fcopy_tree (XCDR (tagged_inst), Qt) :
- XCDR (tagged_inst),
- retval);
- else
- retval = Fcons (copy_tree_p ? Fcopy_tree (tagged_inst, Qt) :
- tagged_inst, retval);
- }
- }
+ {
+ LIST_LOOP_2 (elt, inst_list)
+ {
+ Lisp_Object tagged_inst = elt;
+ Lisp_Object tagged_inst_tag = XCAR (tagged_inst);
+ if (tag_sets_match_p (tag_set, tagged_inst_tag, exact_p))
+ {
+ if (short_p && NILP (tagged_inst_tag))
+ retval = Fcons (copy_tree_p ?
+ Fcopy_tree (XCDR (tagged_inst), Qt) :
+ XCDR (tagged_inst),
+ retval);
+ else
+ retval = Fcons (copy_tree_p ? Fcopy_tree (tagged_inst, Qt) :
+ tagged_inst, retval);
+ }
+ }
+ }
retval = Fnreverse (retval);
UNGCPRO;
/* If there is a single instantiator and the short form is
@@ -1487,7 +1504,6 @@
{
Lisp_Object *spec_list = SPECIFIER_GET_SPEC_LIST (specifier, type);
Lisp_Object retval = Qnil;
- Lisp_Object rest;
struct gcpro gcpro1;
assert (type != LOCALE_GLOBAL);
@@ -1496,14 +1512,16 @@
*spec_list = cleanup_assoc_list (*spec_list);
GCPRO1 (retval);
- LIST_LOOP (rest, *spec_list)
- {
- Lisp_Object spec = XCAR (rest);
- Lisp_Object inst_list =
- specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 1);
- if (!NILP (inst_list))
- retval = Fcons (Fcons (XCAR (spec), inst_list), retval);
- }
+ {
+ LIST_LOOP_2 (elt, *spec_list)
+ {
+ Lisp_Object spec = elt;
+ Lisp_Object inst_list =
+ specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 1);
+ if (!NILP (inst_list))
+ retval = Fcons (Fcons (XCAR (spec), inst_list), retval);
+ }
+ }
RETURN_UNGCPRO (Fnreverse (retval));
}
@@ -1531,7 +1549,7 @@
*was_removed = 0;
- LIST_LOOP (rest, inst_list)
+ OLD_LIST_LOOP (rest, inst_list)
{
if (tag_sets_match_p (tag_set, XCAR (XCAR (rest)), exact_p))
{
@@ -1589,7 +1607,7 @@
Lisp_Object prev = Qnil, rest;
assert (type != LOCALE_GLOBAL);
- LIST_LOOP (rest, *spec_list)
+ OLD_LIST_LOOP (rest, *spec_list)
{
int was_removed;
int remove_spec = 0;
@@ -1646,11 +1664,9 @@
add_meth = SPEC_PREPEND;
remove_tag_set:
{
- Lisp_Object rest;
-
- LIST_LOOP (rest, new_list)
+ LIST_LOOP_2 (elt, new_list)
{
- Lisp_Object canontag = canonicalize_tag_set (XCAR (XCAR (rest)));
+ Lisp_Object canontag = canonicalize_tag_set (XCAR (elt));
struct gcpro gcpro1;
GCPRO1 (canontag);
@@ -1681,46 +1697,49 @@
Lisp_Object inst_list)
{
/* The return value of this function must be GCPRO'd. */
- Lisp_Object rest, list_to_build_up = Qnil;
+ Lisp_Object list_to_build_up = Qnil;
Lisp_Specifier *sp = XSPECIFIER (specifier);
struct gcpro gcpro1;
GCPRO1 (list_to_build_up);
- LIST_LOOP (rest, inst_list)
- {
- Lisp_Object tag_set = XCAR (XCAR (rest));
- Lisp_Object sub_inst_list = Qnil;
- Lisp_Object instantiator;
- struct gcpro ngcpro1, ngcpro2;
-
- if (HAS_SPECMETH_P (sp, copy_instantiator))
- instantiator = SPECMETH (sp, copy_instantiator,
- (XCDR (XCAR (rest))));
- else
- instantiator = Fcopy_tree (XCDR (XCAR (rest)), Qt);
-
- NGCPRO2 (instantiator, sub_inst_list);
- /* call the will-add method; it may GC */
- sub_inst_list = HAS_SPECMETH_P (sp, going_to_add) ?
- SPECMETH (sp, going_to_add,
- (bodily_specifier (specifier), locale,
- tag_set, instantiator)) :
- Qt;
- if (EQ (sub_inst_list, Qt))
- /* no change here. */
- sub_inst_list = list1 (Fcons (canonicalize_tag_set (tag_set),
- instantiator));
- else
- {
- /* now canonicalize all the tag sets in the new objects */
- Lisp_Object rest2;
- LIST_LOOP (rest2, sub_inst_list)
- XCAR (XCAR (rest2)) = canonicalize_tag_set (XCAR (XCAR (rest2)));
- }
+ {
+ LIST_LOOP_2 (elt, inst_list)
+ {
+ Lisp_Object tag_set = XCAR (elt);
+ Lisp_Object sub_inst_list = Qnil;
+ Lisp_Object instantiator;
+ struct gcpro ngcpro1, ngcpro2;
+
+ if (HAS_SPECMETH_P (sp, copy_instantiator))
+ instantiator = SPECMETH (sp, copy_instantiator,
+ (XCDR (elt)));
+ else
+ instantiator = Fcopy_tree (XCDR (elt), Qt);
+
+ NGCPRO2 (instantiator, sub_inst_list);
+ /* call the will-add method; it may GC */
+ sub_inst_list = HAS_SPECMETH_P (sp, going_to_add) ?
+ SPECMETH (sp, going_to_add,
+ (bodily_specifier (specifier), locale,
+ tag_set, instantiator)) :
+ Qt;
+ if (EQ (sub_inst_list, Qt))
+ /* no change here. */
+ sub_inst_list = list1 (Fcons (canonicalize_tag_set (tag_set),
+ instantiator));
+ else
+ {
+ /* now canonicalize all the tag sets in the new objects */
+ LIST_LOOP_2 (elt2, sub_inst_list)
+ {
+ XCAR (elt2) = canonicalize_tag_set (XCAR (elt2));
+ }
+ }
- list_to_build_up = nconc2 (sub_inst_list, list_to_build_up);
- NUNGCPRO;
- }
+ list_to_build_up = nconc2 (sub_inst_list, list_to_build_up);
+ NUNGCPRO;
+ }
+ }
RETURN_UNGCPRO (Fnreverse (list_to_build_up));
}
@@ -1807,23 +1826,24 @@
enum spec_add_meth add_meth)
{
Lisp_Object *src_list = SPECIFIER_GET_SPEC_LIST (specifier, type);
- Lisp_Object rest;
/* This algorithm is O(n^2) in running time.
It's certainly possible to implement an O(n log n) algorithm,
but I doubt there's any need to. */
- LIST_LOOP (rest, *src_list)
- {
- Lisp_Object spec = XCAR (rest);
- /* There may be dead objects floating around */
- /* remember, dead windows can become alive again. */
- if (WINDOWP (XCAR (spec)) || !object_dead_p (XCAR (spec)))
- specifier_add_spec
- (dest, XCAR (spec),
- specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 0),
- add_meth);
- }
+ {
+ LIST_LOOP_2 (elt, *src_list)
+ {
+ Lisp_Object spec = elt;
+ /* There may be dead objects floating around */
+ /* remember, dead windows can become alive again. */
+ if (WINDOWP (XCAR (spec)) || !object_dead_p (XCAR (spec)))
+ specifier_add_spec
+ (dest, XCAR (spec),
+ specifier_process_inst_list (XCDR (spec), tag_set, exact_p, 0, 0),
+ add_meth);
+ }
+ }
}
/* map MAPFUN over the locales in SPECIFIER that are given in LOCALE.
@@ -1855,7 +1875,6 @@
void *closure)
{
int retval = 0;
- Lisp_Object rest;
struct gcpro gcpro1, gcpro2;
GCPRO2 (tag_set, locale);
@@ -1863,50 +1882,52 @@
tag_set = decode_specifier_tag_set (tag_set);
tag_set = canonicalize_tag_set (tag_set);
- LIST_LOOP (rest, locale)
- {
- Lisp_Object theloc = XCAR (rest);
- if (!NILP (Fvalid_specifier_locale_p (theloc)))
- {
- retval = (*mapfun) (specifier, theloc,
- locale_type_from_locale (theloc),
- tag_set, !NILP (exact_p), closure);
- if (retval)
- break;
- }
- else if (!NILP (Fvalid_specifier_locale_type_p (theloc)))
- {
- retval = (*mapfun) (specifier, Qnil,
- decode_locale_type (theloc), tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- }
- else
- {
- assert (EQ (theloc, Qall));
- retval = (*mapfun) (specifier, Qnil, LOCALE_BUFFER, tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- retval = (*mapfun) (specifier, Qnil, LOCALE_WINDOW, tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- retval = (*mapfun) (specifier, Qnil, LOCALE_FRAME, tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- retval = (*mapfun) (specifier, Qnil, LOCALE_DEVICE, tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- retval = (*mapfun) (specifier, Qglobal, LOCALE_GLOBAL, tag_set,
- !NILP (exact_p), closure);
- if (retval)
- break;
- }
- }
+ {
+ LIST_LOOP_2 (elt, locale)
+ {
+ Lisp_Object theloc = elt;
+ if (!NILP (Fvalid_specifier_locale_p (theloc)))
+ {
+ retval = (*mapfun) (specifier, theloc,
+ locale_type_from_locale (theloc),
+ tag_set, !NILP (exact_p), closure);
+ if (retval)
+ break;
+ }
+ else if (!NILP (Fvalid_specifier_locale_type_p (theloc)))
+ {
+ retval = (*mapfun) (specifier, Qnil,
+ decode_locale_type (theloc), tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ }
+ else
+ {
+ assert (EQ (theloc, Qall));
+ retval = (*mapfun) (specifier, Qnil, LOCALE_BUFFER, tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ retval = (*mapfun) (specifier, Qnil, LOCALE_WINDOW, tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ retval = (*mapfun) (specifier, Qnil, LOCALE_FRAME, tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ retval = (*mapfun) (specifier, Qnil, LOCALE_DEVICE, tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ retval = (*mapfun) (specifier, Qglobal, LOCALE_GLOBAL, tag_set,
+ !NILP (exact_p), closure);
+ if (retval)
+ break;
+ }
+ }
+ }
UNGCPRO;
return retval;
@@ -2007,7 +2028,6 @@
(specifier, spec_list, how_to_add))
{
enum spec_add_meth add_meth;
- Lisp_Object rest;
CHECK_SPECIFIER (specifier);
check_modifiable_specifier (specifier);
@@ -2018,15 +2038,17 @@
ERROR_ME);
add_meth = decode_how_to_add_specification (how_to_add);
- LIST_LOOP (rest, spec_list)
- {
- /* Placating the GCC god. */
- Lisp_Object specification = XCAR (rest);
- Lisp_Object locale = XCAR (specification);
- Lisp_Object inst_list = XCDR (specification);
+ {
+ LIST_LOOP_2 (elt, spec_list)
+ {
+ /* Placating the GCC god. */
+ Lisp_Object specification = elt;
+ Lisp_Object locale = XCAR (specification);
+ Lisp_Object inst_list = XCDR (specification);
- specifier_add_spec (specifier, locale, inst_list, add_meth);
- }
+ specifier_add_spec (specifier, locale, inst_list, add_meth);
+ }
+ }
recompute_cached_specifier_everywhere (specifier);
return Qnil;
}
@@ -2469,7 +2491,6 @@
/* This function can GC */
Lisp_Specifier *sp;
Lisp_Object device;
- Lisp_Object rest;
int count = specpdl_depth ();
struct gcpro gcpro1, gcpro2;
@@ -2482,32 +2503,34 @@
/* The instantiate method is allowed to call eval. Since it
is quite common for this function to get called from somewhere in
redisplay we need to make sure that quits are ignored. Otherwise
- Fsignal will abort. */
+ Fsignal will ABORT. */
specbind (Qinhibit_quit, Qt);
-
- LIST_LOOP (rest, inst_list)
- {
- Lisp_Object tagged_inst = XCAR (rest);
- Lisp_Object tag_set = XCAR (tagged_inst);
- if (device_matches_specifier_tag_set_p (device, tag_set))
- {
- Lisp_Object val = XCDR (tagged_inst);
+ {
+ LIST_LOOP_2 (elt, inst_list)
+ {
+ Lisp_Object tagged_inst = elt;
+ Lisp_Object tag_set = XCAR (tagged_inst);
- if (HAS_SPECMETH_P (sp, instantiate))
- val = call_with_suspended_errors
- ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
- Qunbound, Qspecifier, errb, 5, specifier,
- matchspec, domain, val, depth);
+ if (device_matches_specifier_tag_set_p (device, tag_set))
+ {
+ Lisp_Object val = XCDR (tagged_inst);
- if (!UNBOUNDP (val))
- {
- unbind_to (count);
- UNGCPRO;
- return val;
- }
- }
- }
+ if (HAS_SPECMETH_P (sp, instantiate))
+ val = call_with_suspended_errors
+ ((lisp_fn_t) RAW_SPECMETH (sp, instantiate),
+ Qunbound, Qspecifier, errb, 5, specifier,
+ matchspec, domain, val, depth);
+
+ if (!UNBOUNDP (val))
+ {
+ unbind_to (count);
+ UNGCPRO;
+ return val;
+ }
+ }
+ }
+ }
unbind_to (count);
UNGCPRO;
@@ -2578,7 +2601,7 @@
really went wrong. */
device = FRAME_DEVICE (XFRAME (frame));
- /* device had better be determined by now; abort if not. */
+ /* device had better be determined by now; ABORT if not. */
(void) DEVICE_CLASS (XDEVICE (device));
depth = make_int (1 + XINT (depth));
@@ -2950,11 +2973,9 @@
void
recompute_all_cached_specifiers_in_window (struct window *w)
{
- Lisp_Object rest;
-
- LIST_LOOP (rest, Vcached_specifiers)
+ LIST_LOOP_2 (elt, Vcached_specifiers)
{
- Lisp_Object specifier = XCAR (rest);
+ Lisp_Object specifier = elt;
if (XSPECIFIER (specifier)->caching->offset_into_struct_window)
recompute_one_cached_specifier_in_window (specifier, w);
}
@@ -2963,11 +2984,9 @@
void
recompute_all_cached_specifiers_in_frame (struct frame *f)
{
- Lisp_Object rest;
-
- LIST_LOOP (rest, Vcached_specifiers)
+ LIST_LOOP_2 (elt, Vcached_specifiers)
{
- Lisp_Object specifier = XCAR (rest);
+ Lisp_Object specifier = elt;
if (XSPECIFIER (specifier)->caching->offset_into_struct_frame)
recompute_one_cached_specifier_in_frame (specifier, f);
}
1.16.2.1 +1 -1 XEmacs/xemacs/src/specifier.h
Index: specifier.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/specifier.h,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- specifier.h 2005/01/26 10:22:28 1.16
+++ specifier.h 2005/02/15 01:21:10 1.16.2.1
@@ -154,7 +154,7 @@
This method must presume that both INSTANTIATOR and MATCHSPEC are
already validated by the corresponding validate_* methods, and
- may abort if they are invalid.
+ may ABORT if they are invalid.
Return value is an instance, which is returned immediately to the
caller, or Qunbound to continue instantiation lookup chain.
1.48.2.1 +9 -9 XEmacs/xemacs/src/symbols.c
Index: symbols.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/symbols.c,v
retrieving revision 1.48
retrieving revision 1.48.2.1
diff -u -r1.48 -r1.48.2.1
--- symbols.c 2005/01/24 23:34:11 1.48
+++ symbols.c 2005/02/15 01:21:10 1.48.2.1
@@ -1,6 +1,6 @@
/* "intern" and friends -- moved here from lread.c and data.c
Copyright (C) 1985-1989, 1992-1994 Free Software Foundation, Inc.
- Copyright (C) 1995, 2000, 2001, 2002 Ben Wing.
+ Copyright (C) 1995, 2000, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -593,7 +593,7 @@
sym);
if (
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
!(unloading_module && UNBOUNDP(newval)) &&
#endif
(symbol_is_constant (sym, val)
@@ -1774,7 +1774,7 @@
case SYMVAL_DEFAULT_CONSOLE_FORWARD:
if (UNBOUNDP (newval))
{
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
if (unloading_module)
{
sym->value = newval;
@@ -1790,7 +1790,7 @@
case SYMVAL_CONST_OBJECT_FORWARD:
if (UNBOUNDP (newval))
{
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
if (unloading_module)
{
unstaticpro_nodump ((Lisp_Object *)
@@ -3436,7 +3436,7 @@
#define check_sane_subr(subr, sym) /* nothing */
#endif
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/*
* If we are not in a pure undumped Emacs, we need to make a duplicate of
* the subr. This is because the only time this function will be called
@@ -3496,7 +3496,7 @@
subr = newsubr; \
} \
} while (0)
-#else /* ! HAVE_SHLIB */
+#else /* ! HAVE_MODULES */
#define check_module_subr(subr)
#endif
@@ -3512,7 +3512,7 @@
fun = wrap_subr (subr);
XSYMBOL (sym)->function = fun;
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* If it is declared in a module, update the load history */
if (initialized)
LOADHIST_ATTACH (sym);
@@ -3532,7 +3532,7 @@
fun = wrap_subr (subr);
XSYMBOL (sym)->function = Fcons (Qmacro, fun);
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/* If it is declared in a module, update the load history */
if (initialized)
LOADHIST_ATTACH (sym);
@@ -3677,7 +3677,7 @@
{
Lisp_Object sym;
-#ifdef HAVE_SHLIB
+#ifdef HAVE_MODULES
/*
* As with defsubr(), this will only be called in a dumped Emacs when
* we are adding variables from a dynamically loaded module. That means
1.51.2.1 +154 -160 XEmacs/xemacs/src/symsinit.h
Index: symsinit.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/symsinit.h,v
retrieving revision 1.51
retrieving revision 1.51.2.1
diff -u -r1.51 -r1.51.2.1
--- symsinit.h 2005/01/28 02:36:26 1.51
+++ symsinit.h 2005/02/15 01:21:12 1.51.2.1
@@ -1,6 +1,6 @@
/* Various initialization function prototypes.
Copyright (C) 1995 Board of Trustees, University of Illinois.
- Copyright (C) 2001, 2002 Ben Wing.
+ Copyright (C) 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -31,10 +31,10 @@
void init_data_very_early (void);
void init_floatfns_very_early (void);
void init_free_hook (void);
+void init_mswindows_dde_very_early (void);
void init_process_times_very_early (void);
void init_ralloc (void);
void init_signals_very_early (void);
-void init_mswindows_dde_very_early (void);
/* Early Lisp-engine initialization -- dump-time only for init, dump-time
and post-pdump-load-time for reinit. We call the reinit() routine
@@ -44,15 +44,15 @@
stuff, call the reinit() routine, and do some more stuff.) */
void init_alloc_once_early (void);
-void reinit_alloc_early (void);
-void init_symbols_once_early (void);
-void reinit_symbols_early (void);
+void init_eistring_once_early (void);
+void init_elhash_once_early (void);
void init_errors_once_early (void);
-void reinit_opaque_early (void);
void init_opaque_once_early (void);
-void init_elhash_once_early (void);
-void init_eistring_once_early (void);
+void init_symbols_once_early (void);
+void reinit_alloc_early (void);
void reinit_eistring_early (void);
+void reinit_opaque_early (void);
+void reinit_symbols_early (void);
/* Reset the Lisp engine. Called both at dump-time, run-time and
run-temacs-time; at dump-time, it's called early, before any of the
@@ -85,10 +85,12 @@
void syms_of_database (void);
void syms_of_debug (void);
void syms_of_device (void);
+void syms_of_device_gtk (void);
void syms_of_device_mswindows (void);
void syms_of_device_tty (void);
void syms_of_device_x (void);
void syms_of_dialog (void);
+void syms_of_dialog_gtk (void);
void syms_of_dialog_mswindows (void);
void syms_of_dialog_x (void);
void syms_of_dired (void);
@@ -101,8 +103,10 @@
void syms_of_emacs (void);
void syms_of_eval (void);
void syms_of_event_Xt (void);
+void syms_of_event_gtk (void);
void syms_of_event_mswindows (void);
void syms_of_event_stream (void);
+void syms_of_event_xlike (void);
void syms_of_events (void);
void syms_of_extents (void);
void syms_of_faces (void);
@@ -111,10 +115,9 @@
void syms_of_filelock (void);
void syms_of_floatfns (void);
void syms_of_fns (void);
-#ifdef USE_C_FONT_LOCK
void syms_of_font_lock (void);
-#endif /* USE_C_FONT_LOCK */
void syms_of_frame (void);
+void syms_of_frame_gtk (void);
void syms_of_frame_mswindows (void);
void syms_of_frame_tty (void);
void syms_of_frame_x (void);
@@ -122,12 +125,14 @@
void syms_of_general (void);
void syms_of_glyphs (void);
void syms_of_glyphs_eimage (void);
+void syms_of_glyphs_gtk (void);
void syms_of_glyphs_mswindows (void);
void syms_of_glyphs_shared (void);
void syms_of_glyphs_widget (void);
void syms_of_glyphs_x (void);
void syms_of_gpmevent (void);
void syms_of_gui (void);
+void syms_of_gui_gtk (void);
void syms_of_gui_mswindows (void);
void syms_of_gui_x (void);
void syms_of_gutter (void);
@@ -142,6 +147,7 @@
void syms_of_marker (void);
void syms_of_md5 (void);
void syms_of_menubar (void);
+void syms_of_menubar_gtk (void);
void syms_of_menubar_mswindows (void);
void syms_of_menubar_x (void);
void syms_of_minibuf (void);
@@ -154,6 +160,7 @@
void syms_of_nt (void);
void syms_of_number (void);
void syms_of_objects (void);
+void syms_of_objects_gtk (void);
void syms_of_objects_mswindows (void);
void syms_of_objects_tty (void);
void syms_of_objects_x (void);
@@ -169,6 +176,7 @@
void syms_of_scrollbar_mswindows(void);
void syms_of_search (void);
void syms_of_select (void);
+void syms_of_select_gtk (void);
void syms_of_select_mswindows (void);
void syms_of_select_x (void);
void syms_of_signal (void);
@@ -181,9 +189,12 @@
void syms_of_text (void);
void syms_of_toolbar (void);
void syms_of_tooltalk (void);
+void syms_of_ui_byhand (void);
+void syms_of_ui_gtk (void);
void syms_of_undo (void);
void syms_of_unicode (void);
void syms_of_widget (void);
+void syms_of_widget_accessors (void);
void syms_of_win32 (void);
void syms_of_window (void);
@@ -191,89 +202,102 @@
post-pdump-load-time only for reinit_). */
void console_type_create (void);
-void console_type_create_stream (void);
-void reinit_console_type_create_stream (void);
-void console_type_create_tty (void);
-void reinit_console_type_create_tty (void);
+void console_type_create_device_gtk (void);
+void console_type_create_device_mswindows (void);
void console_type_create_device_tty (void);
-void console_type_create_frame_tty (void);
-void console_type_create_objects_tty (void);
-void console_type_create_redisplay_tty (void);
-void console_type_create_x (void);
-void reinit_console_type_create_x (void);
void console_type_create_device_x (void);
-void reinit_console_type_create_device_x (void);
+void console_type_create_dialog_gtk (void);
+void console_type_create_dialog_mswindows (void);
+void console_type_create_dialog_x (void);
+void console_type_create_frame_gtk (void);
+void console_type_create_frame_mswindows (void);
+void console_type_create_frame_tty (void);
void console_type_create_frame_x (void);
+void console_type_create_glyphs_gtk (void);
+void console_type_create_glyphs_mswindows (void);
void console_type_create_glyphs_x (void);
+void console_type_create_gtk (void);
+void console_type_create_menubar_gtk (void);
+void console_type_create_menubar_mswindows (void);
void console_type_create_menubar_x (void);
+void console_type_create_mswindows (void);
+void console_type_create_objects_gtk (void);
+void console_type_create_objects_mswindows (void);
+void console_type_create_objects_tty (void);
void console_type_create_objects_x (void);
+void console_type_create_redisplay_gtk (void);
+void console_type_create_redisplay_mswindows (void);
+void console_type_create_redisplay_tty (void);
void console_type_create_redisplay_x (void);
+void console_type_create_scrollbar_gtk (void);
+void console_type_create_scrollbar_mswindows (void);
void console_type_create_scrollbar_x (void);
+void console_type_create_select_gtk (void);
+void console_type_create_select_mswindows (void);
void console_type_create_select_x (void);
+void console_type_create_stream (void);
+void console_type_create_toolbar_gtk (void);
+void console_type_create_toolbar_mswindows (void);
void console_type_create_toolbar_x (void);
-void console_type_create_dialog_x (void);
-void console_type_create_mswindows (void);
+void console_type_create_tty (void);
+void console_type_create_x (void);
+void reinit_console_type_create_device_x (void);
+void reinit_console_type_create_gtk (void);
void reinit_console_type_create_mswindows (void);
-void console_type_create_device_mswindows (void);
-void console_type_create_frame_mswindows (void);
-void console_type_create_menubar_mswindows (void);
-void console_type_create_objects_mswindows (void);
-void console_type_create_redisplay_mswindows (void);
-void console_type_create_scrollbar_mswindows (void);
-void console_type_create_toolbar_mswindows (void);
-void console_type_create_glyphs_mswindows (void);
-void console_type_create_dialog_mswindows (void);
-void console_type_create_select_mswindows (void);
+void reinit_console_type_create_stream (void);
+void reinit_console_type_create_tty (void);
+void reinit_console_type_create_x (void);
/* Initialize the specifier types (dump-time only for specifier_type_(),
post-pdump-load-time only for reinit_). */
-void specifier_type_create (void);
void reinit_specifier_type_create (void);
-void specifier_type_create_image (void);
+void reinit_specifier_type_create_gutter (void);
void reinit_specifier_type_create_image (void);
+void reinit_specifier_type_create_objects (void);
+void reinit_specifier_type_create_toolbar (void);
+void specifier_type_create (void);
void specifier_type_create_gutter (void);
-void reinit_specifier_type_create_gutter (void);
+void specifier_type_create_image (void);
void specifier_type_create_objects (void);
-void reinit_specifier_type_create_objects (void);
void specifier_type_create_toolbar (void);
-void reinit_specifier_type_create_toolbar (void);
/* Initialize the coding system types (dump-time only for
coding_system_type_(), post-pdump-load-time only for reinit_). */
void coding_system_type_create (void);
-void reinit_coding_system_type_create (void);
-void coding_system_type_create_unicode (void);
-void reinit_coding_system_type_create_unicode (void);
void coding_system_type_create_intl_win32 (void);
-void reinit_coding_system_type_create_intl_win32 (void);
void coding_system_type_create_mule_coding (void);
+void coding_system_type_create_unicode (void);
+void reinit_coding_system_type_create (void);
+void reinit_coding_system_type_create_intl_win32 (void);
void reinit_coding_system_type_create_mule_coding (void);
+void reinit_coding_system_type_create_unicode (void);
/* Initialize the structure types (dump-time only). */
void structure_type_create (void);
void structure_type_create_chartab (void);
void structure_type_create_faces (void);
-void structure_type_create_rangetab (void);
void structure_type_create_hash_table (void);
+void structure_type_create_rangetab (void);
/* Initialize the image instantiator types (dump-time only). */
void image_instantiator_format_create (void);
void image_instantiator_format_create_glyphs_eimage (void);
-void image_instantiator_format_create_glyphs_widget (void);
-void image_instantiator_format_create_glyphs_x (void);
+void image_instantiator_format_create_glyphs_gtk (void);
void image_instantiator_format_create_glyphs_mswindows (void);
void image_instantiator_format_create_glyphs_tty (void);
+void image_instantiator_format_create_glyphs_widget (void);
+void image_instantiator_format_create_glyphs_x (void);
/* Initialize the lstream types (dump-time only). */
void lstream_type_create (void);
void lstream_type_create_file_coding (void);
-void lstream_type_create_print (void);
void lstream_type_create_mswindows_selectable (void);
+void lstream_type_create_print (void);
/* Initialize process types */
@@ -287,120 +311,138 @@
/* Initialize most variables (dump-time for vars_, dump-time and
post-pdump-load-time for reinit_vars). */
+void reinit_vars_of_buffer (void);
+void reinit_vars_of_console (void);
+void reinit_vars_of_debug (void);
+void reinit_vars_of_device (void);
+void reinit_vars_of_device_x (void);
+void reinit_vars_of_eval (void);
+void reinit_vars_of_event_Xt (void);
+void reinit_vars_of_event_gtk (void);
+void reinit_vars_of_event_mswindows (void);
+void reinit_vars_of_event_stream (void);
+void reinit_vars_of_event_tty (void);
+void reinit_vars_of_events (void);
+void reinit_vars_of_extents (void);
+void reinit_vars_of_file_coding (void);
+void reinit_vars_of_fileio (void);
+void reinit_vars_of_font_lock (void);
+void reinit_vars_of_frame_mswindows (void);
+void reinit_vars_of_glyphs (void);
+void reinit_vars_of_glyphs_widget (void);
+void reinit_vars_of_gui (void);
+void reinit_vars_of_gui_x (void);
+void reinit_vars_of_insdel (void);
+void reinit_vars_of_lread (void);
+void reinit_vars_of_lstream (void);
+void reinit_vars_of_menubar_gtk (void);
+void reinit_vars_of_menubar_x (void);
+void reinit_vars_of_minibuf (void);
+void reinit_vars_of_module (void);
+void reinit_vars_of_mule_coding (void);
+void reinit_vars_of_mule_wnn (void);
+void reinit_vars_of_object_mswindows (void);
+void reinit_vars_of_objects (void);
+void reinit_vars_of_print (void);
+void reinit_vars_of_scrollbar_x (void);
+void reinit_vars_of_search (void);
+void reinit_vars_of_select_x (void);
+void reinit_vars_of_text (void);
+void reinit_vars_of_undo (void);
+void reinit_vars_of_window (void);
void vars_of_abbrev (void);
void vars_of_alloc (void);
void vars_of_balloon_x (void);
void vars_of_buffer (void);
-void reinit_vars_of_buffer (void);
void vars_of_bytecode (void);
void vars_of_callint (void);
void vars_of_chartab (void);
void vars_of_cmdloop (void);
void vars_of_cmds (void);
void vars_of_console (void);
-void reinit_vars_of_console (void);
-void vars_of_console_stream (void);
void vars_of_console_mswindows (void);
+void vars_of_console_stream (void);
void vars_of_console_tty (void);
void vars_of_data (void);
void vars_of_database (void);
void vars_of_debug (void);
-void reinit_vars_of_debug (void);
void vars_of_device (void);
-void reinit_vars_of_device (void);
+void vars_of_device_gtk (void);
void vars_of_device_mswindows (void);
void vars_of_device_x (void);
-void reinit_vars_of_device_x (void);
void vars_of_dialog (void);
-void vars_of_dialog_x (void);
+void vars_of_dialog_gtk (void);
void vars_of_dialog_mswindows (void);
+void vars_of_dialog_x (void);
void vars_of_dired (void);
void vars_of_dired_mswindows (void);
void vars_of_doc (void);
void vars_of_dragdrop (void);
void vars_of_editfns (void);
+EXTERN_C void vars_of_eldap (void);
void vars_of_emacs (void);
void vars_of_eval (void);
-void reinit_vars_of_eval (void);
+void vars_of_event_Xt (void);
+void vars_of_event_gtk (void);
+void vars_of_event_mswindows (void);
void vars_of_event_stream (void);
-void reinit_vars_of_event_stream (void);
void vars_of_event_tty (void);
-void reinit_vars_of_event_tty (void);
-void vars_of_event_mswindows (void);
-void reinit_vars_of_event_mswindows (void);
-void vars_of_event_Xt (void);
-void reinit_vars_of_event_Xt (void);
void vars_of_events (void);
-void reinit_vars_of_events (void);
void vars_of_extents (void);
-void reinit_vars_of_extents (void);
void vars_of_faces (void);
void vars_of_file_coding (void);
-void reinit_vars_of_file_coding (void);
void vars_of_fileio (void);
-void reinit_vars_of_fileio (void);
void vars_of_filelock (void);
void vars_of_floatfns (void);
void vars_of_fns (void);
-#ifdef USE_C_FONT_LOCK
void vars_of_font_lock (void);
-void reinit_vars_of_font_lock (void);
-#endif /* USE_C_FONT_LOCK */
-void vars_of_frame_tty (void);
+void vars_of_frame (void);
+void vars_of_frame_gtk (void);
void vars_of_frame_mswindows (void);
-void reinit_vars_of_frame_mswindows (void);
+void vars_of_frame_tty (void);
void vars_of_frame_x (void);
-void vars_of_frame (void);
-void vars_of_glyphs_x (void);
+void vars_of_glyphs (void);
void vars_of_glyphs_eimage (void);
-void vars_of_glyphs_widget (void);
-void reinit_vars_of_glyphs_widget (void);
+void vars_of_glyphs_gtk (void);
void vars_of_glyphs_mswindows (void);
-void vars_of_glyphs (void);
-void reinit_vars_of_glyphs (void);
-void vars_of_gui_x (void);
-void reinit_vars_of_gui_x (void);
+void vars_of_glyphs_widget (void);
+void vars_of_glyphs_x (void);
+void vars_of_gpmevent (void);
void vars_of_gui (void);
+void vars_of_gui_gtk (void);
+void vars_of_gui_x (void);
void vars_of_gutter (void);
+void vars_of_indent (void);
void vars_of_input_method_motif (void);
void vars_of_input_method_xlib (void);
-void vars_of_indent (void);
void vars_of_insdel (void);
-void reinit_vars_of_insdel (void);
void vars_of_intl (void);
void vars_of_intl_win32 (void);
void vars_of_keymap (void);
void vars_of_lread (void);
-void reinit_vars_of_lread (void);
void vars_of_lstream (void);
-void reinit_vars_of_lstream (void);
void vars_of_macros (void);
void vars_of_md5 (void);
-void vars_of_menubar_x (void);
-void reinit_vars_of_menubar_x (void);
void vars_of_menubar (void);
+void vars_of_menubar_gtk (void);
void vars_of_menubar_mswindows (void);
+void vars_of_menubar_x (void);
void vars_of_minibuf (void);
-void reinit_vars_of_minibuf (void);
void vars_of_module (void);
-void reinit_vars_of_module (void);
void vars_of_mule_canna (void);
void vars_of_mule_ccl(void);
void vars_of_mule_charset (void);
void vars_of_mule_coding (void);
-void reinit_vars_of_mule_coding (void);
void vars_of_mule_wnn (void);
-void reinit_vars_of_mule_wnn (void);
void vars_of_nt (void);
void vars_of_number (void);
void vars_of_objects (void);
-void reinit_vars_of_objects (void);
-void vars_of_objects_tty (void);
+void vars_of_objects_gtk (void);
void vars_of_objects_mswindows (void);
-void reinit_vars_of_object_mswindows (void);
+void vars_of_objects_tty (void);
void vars_of_objects_x (void);
+EXTERN_C void vars_of_postgresql (void);
void vars_of_print (void);
-void reinit_vars_of_print (void);
void vars_of_process (void);
void vars_of_process_nt (void);
void vars_of_process_unix (void);
@@ -409,14 +451,15 @@
void vars_of_realpath (void);
void vars_of_redisplay (void);
void vars_of_regex (void);
-void vars_of_scrollbar_x (void);
-void reinit_vars_of_scrollbar_x (void);
void vars_of_scrollbar (void);
+void vars_of_scrollbar_gtk (void);
void vars_of_scrollbar_mswindows (void);
+void vars_of_scrollbar_x (void);
void vars_of_search (void);
-void reinit_vars_of_search (void);
void vars_of_select (void);
+void vars_of_select_gtk (void);
void vars_of_select_mswindows (void);
+void vars_of_select_x (void);
void vars_of_sound (void);
void vars_of_specifier (void);
void vars_of_sunpro (void);
@@ -424,20 +467,13 @@
void vars_of_syntax (void);
void vars_of_tests (void);
void vars_of_text (void);
-void reinit_vars_of_text (void);
void vars_of_toolbar (void);
void vars_of_tooltalk (void);
+void vars_of_ui_gtk (void);
void vars_of_undo (void);
-void reinit_vars_of_undo (void);
void vars_of_unicode (void);
-void vars_of_window (void);
-void reinit_vars_of_window (void);
void vars_of_win32 (void);
-void vars_of_select_x (void);
-void reinit_vars_of_select_x (void);
-EXTERN_C void vars_of_eldap (void);
-EXTERN_C void vars_of_postgresql (void);
-void vars_of_gpmevent (void);
+void vars_of_window (void);
/* Initialize specifier variables (dump-time only). */
@@ -456,28 +492,27 @@
#### The reinit_() functions should be called from emacs.c, not the
corresponding complex_vars_of_(). */
+void complex_vars_of_alloc (void);
+void complex_vars_of_buffer (void);
+void complex_vars_of_casetab (void);
+void complex_vars_of_chartab (void);
+void complex_vars_of_console (void);
+void complex_vars_of_emacs (void);
void complex_vars_of_faces (void);
-void complex_vars_of_mule_charset (void);
void complex_vars_of_file_coding (void);
-void complex_vars_of_intl_win32 (void);
+void complex_vars_of_frame (void);
void complex_vars_of_glyphs (void);
-void complex_vars_of_glyphs_x (void);
-void complex_vars_of_glyphs_mswindows (void);
-void complex_vars_of_alloc (void);
+void complex_vars_of_glyphs_shared (void);
+void complex_vars_of_intl_win32 (void);
+void complex_vars_of_keymap (void);
void complex_vars_of_menubar (void);
+void complex_vars_of_minibuf (void);
+void complex_vars_of_mule_charset (void);
void complex_vars_of_scrollbar (void);
-void complex_vars_of_frame (void);
void complex_vars_of_syntax (void);
-void complex_vars_of_casetab (void);
-void complex_vars_of_chartab (void);
-void complex_vars_of_buffer (void);
void reinit_complex_vars_of_buffer_runtime_only (void);
-void complex_vars_of_console (void);
void reinit_complex_vars_of_console_runtime_only (void);
-void complex_vars_of_emacs (void);
-void complex_vars_of_minibuf (void);
void reinit_complex_vars_of_minibuf (void);
-void complex_vars_of_keymap (void);
/* Late initialization -- stuff pertaining only to interactive usage,
I/O, or Lisp reading. (Dump-time and run-time, but the code itself
@@ -489,6 +524,7 @@
void init_device_tty (void);
void init_editfns (void);
void init_event_Xt_late (void);
+void init_event_gtk_late (void);
void init_event_mswindows_late (void);
void init_event_stream (void);
void init_event_tty_late (void);
@@ -501,56 +537,14 @@
void init_macros (void);
void init_mswindows_environment (void);
void init_nt (void);
+/* Enhanced number initialization: must be done only at runtime due to complex
+ interactions with the supporting libraries. */
+void init_number (void);
void init_postgresql_from_environment (void);
void init_redisplay (void);
void init_select_mswindows (void);
void init_sunpro (void);
void init_win32 (void);
void init_xemacs_process (void);
-
-void syms_of_device_gtk (void);
-void syms_of_dialog_gtk (void);
-void syms_of_event_gtk (void);
-void syms_of_frame_gtk (void);
-void syms_of_glyphs_gtk (void);
-void syms_of_gui_gtk (void);
-void syms_of_menubar_gtk (void);
-void syms_of_objects_gtk (void);
-void syms_of_select_gtk (void);
-void syms_of_ui_gtk (void);
-void syms_of_widget_accessors (void);
-void syms_of_ui_byhand (void);
-void console_type_create_gtk (void);
-void reinit_console_type_create_gtk (void);
-void console_type_create_device_gtk (void);
-void console_type_create_frame_gtk (void);
-void console_type_create_glyphs_gtk (void);
-void console_type_create_menubar_gtk (void);
-void console_type_create_objects_gtk (void);
-void console_type_create_redisplay_gtk (void);
-void console_type_create_scrollbar_gtk (void);
-void console_type_create_toolbar_gtk (void);
-void console_type_create_dialog_gtk (void);
-void image_instantiator_format_create_glyphs_gtk (void);
-void vars_of_device_gtk (void);
-void vars_of_dialog_gtk (void);
-void vars_of_event_gtk (void);
-void reinit_vars_of_event_gtk (void);
-void vars_of_frame_gtk (void);
-void vars_of_glyphs_gtk (void);
-void vars_of_gui_gtk (void);
-void vars_of_menubar_gtk (void);
-void reinit_vars_of_menubar_gtk (void);
-void vars_of_objects_gtk (void);
-void vars_of_scrollbar_gtk (void);
-void vars_of_select_gtk (void);
-void vars_of_ui_gtk (void);
-void complex_vars_of_glyphs_gtk (void);
-void init_event_gtk_late (void);
-void console_type_create_select_gtk (void);
-
-/* Enhanced number initialization: must be done only at runtime due to complex
- interactions with the supporting libraries. */
-void init_number (void);
#endif /* INCLUDED_symsinit_h_ */
1.23.2.1 +9 -7 XEmacs/xemacs/src/syntax.c
Index: syntax.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/syntax.c,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- syntax.c 2005/01/26 05:11:12 1.23
+++ syntax.c 2005/02/15 01:21:12 1.23.2.1
@@ -86,14 +86,16 @@
};
/* These variables are a cache for finding the start of a defun.
- find_start_pos is the place for which the defun start was found.
- find_start_value is the defun start position found for it.
- find_start_buffer is the buffer it was found in.
- find_start_begv is the BEGV value when it was found.
- find_start_modiff is the value of MODIFF when it was found. */
+ find_start_pos is the place for which the defun start was found.
+ find_start_value is the defun start position found for it.
+ find_start_value_byte is the corresponding byte position.
+ find_start_buffer is the buffer it was found in.
+ find_start_begv is the BEGV value when it was found.
+ find_start_modiff is the value of MODIFF when it was found. */
static Charbpos find_start_pos;
static Charbpos find_start_value;
+/* static Bytebpos find_start_value_byte; */
static struct buffer *find_start_buffer;
static Charbpos find_start_begv;
static int find_start_modiff;
@@ -389,8 +391,8 @@
if (BUFFERP (buffer))
{
struct syntax_cache *cache = XBUFFER (buffer)->syntax_cache;
- Bytexpos start = extent_endpoint_byte (extent, 0);
- Bytexpos end = extent_endpoint_byte (extent, 1);
+ Bytexpos start = extent_start_byte (extent);
+ Bytexpos end = extent_end_byte (extent);
Bytexpos start2 = byte_marker_position (cache->start);
Bytexpos end2 = byte_marker_position (cache->end);
/* If the extent is entirely before or entirely after the cache range,
1.80.2.1 +16 -20 XEmacs/xemacs/src/sysdep.c
Index: sysdep.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysdep.c,v
retrieving revision 1.80
retrieving revision 1.80.2.1
diff -u -r1.80 -r1.80.2.1
--- sysdep.c 2005/01/28 02:36:27 1.80
+++ sysdep.c 2005/02/15 01:21:14 1.80.2.1
@@ -3021,9 +3021,9 @@
const Ibyte *internal_name;
Bytecount internal_len;
- TO_INTERNAL_FORMAT (DATA, (external_name, external_len),
- ALLOCA, (internal_name, internal_len),
- Qfile_name);
+ SIZED_EXTERNAL_TO_SIZED_C_STRING (external_name, external_len,
+ internal_name, internal_len,
+ Qfile_name);
/* check for common case of ASCII filename */
if (internal_len == external_len &&
@@ -3238,8 +3238,8 @@
Ibyte *intbuf;
Bytecount tamanho;
- TO_INTERNAL_FORMAT (DATA, (buf, retval),
- ALLOCA, (intbuf, tamanho), Qfile_name);
+ SIZED_EXTERNAL_TO_SIZED_C_STRING (buf, retval, intbuf, tamanho,
+ Qfile_name);
/* the man page says this function does not null-terminate */
if (tamanho >= (Bytecount) bufsiz)
tamanho = bufsiz;
@@ -3412,21 +3412,17 @@
xfree (cached_pwd.pw_shell, char *);
cached_pwd = *pwd;
- if (cached_pwd.pw_name)
- TO_INTERNAL_FORMAT (C_STRING, cached_pwd.pw_name,
- C_STRING_MALLOC, cached_pwd.pw_name, Qnative);
- if (cached_pwd.pw_passwd)
- TO_INTERNAL_FORMAT (C_STRING, cached_pwd.pw_passwd,
- C_STRING_MALLOC, cached_pwd.pw_passwd, Qnative);
- if (cached_pwd.pw_gecos)
- TO_INTERNAL_FORMAT (C_STRING, cached_pwd.pw_gecos,
- C_STRING_MALLOC, cached_pwd.pw_gecos, Qnative);
- if (cached_pwd.pw_dir)
- TO_INTERNAL_FORMAT (C_STRING, cached_pwd.pw_dir,
- C_STRING_MALLOC, cached_pwd.pw_dir, Qfile_name);
- if (cached_pwd.pw_shell)
- TO_INTERNAL_FORMAT (C_STRING, cached_pwd.pw_shell,
- C_STRING_MALLOC, cached_pwd.pw_shell, Qfile_name);
+#define FROB(field, codesys) \
+ if (cached_pwd.field) \
+ EXTERNAL_TO_C_STRING_MALLOC (cached_pwd.field, cached_pwd.field, \
+ Qnative)
+
+ FROB (pw_name, Qnative);
+ FROB (pw_passwd, Qnative);
+ FROB (pw_gecos, Qnative);
+ FROB (pw_dir, Qfile_name);
+ FROB (pw_shell, Qfile_name);
+#undef FROB
return &cached_pwd;
}
1.19.4.1 +93 -64 XEmacs/xemacs/src/sysdll.c
Index: sysdll.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysdll.c,v
retrieving revision 1.19
retrieving revision 1.19.4.1
diff -u -r1.19 -r1.19.4.1
--- sysdll.c 2004/05/14 15:34:40 1.19
+++ sysdll.c 2005/02/15 01:21:15 1.19.4.1
@@ -1,5 +1,6 @@
/* sysdll.c --- system dependent support for dynamic linked libraries
Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2005 Ben Wing.
Author: William Perry <wmperry(a)aventail.com>
This file is part of XEmacs.
@@ -23,7 +24,6 @@
#include <config.h>
#endif
-#include <stdlib.h>
#include "lisp.h"
#include "sysdll.h"
@@ -88,28 +88,33 @@
dll_function (dll_handle h, const CIbyte *n)
{
MAYBE_PREPEND_UNDERSCORE (n);
- return (dll_func) dlsym ((void *) h, n);
+ return
+ (dll_func) dlsym ((void *) h,
+ NEW_C_STRING_TO_EXTERNAL
+ (n, Qdll_function_name_encoding));
}
dll_var
dll_variable (dll_handle h, const CIbyte *n)
{
MAYBE_PREPEND_UNDERSCORE (n);
- return (dll_var)dlsym ((void *)h, n);
+ return (dll_var) dlsym ((void *) h,
+ NEW_C_STRING_TO_EXTERNAL
+ (n, Qdll_function_name_encoding));
}
Lisp_Object
-dll_error ()
+dll_error (void)
{
const Extbyte *msg;
-#if defined(HAVE_DLERROR) || defined(dlerror)
+#if defined (HAVE_DLERROR) || defined (dlerror)
msg = (const Extbyte *) dlerror ();
-#elif defined(HAVE__DLERROR)
+#elif defined (HAVE__DLERROR)
msg = (const Extbyte *) _dlerror();
#else
msg = (const Extbyte *) "Shared library error";
#endif
- return build_ext_string (msg, Qnative);
+ return build_ext_string (msg, Qdll_error_string_encoding);
}
#elif defined(HAVE_SHL_LOAD)
@@ -142,7 +147,9 @@
{
long handle = 0L;
- if (shl_findsym ((shl_t *) &h, n, TYPE_PROCEDURE, &handle))
+ if (shl_findsym ((shl_t *) &h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding),
+ TYPE_PROCEDURE, &handle))
return NULL;
return (dll_func) handle;
@@ -153,18 +160,20 @@
{
long handle = 0L;
- if (shl_findsym ((shl_t *) &h, n, TYPE_DATA, &handle))
+ if (shl_findsym ((shl_t *) &h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding),
+ TYPE_DATA, &handle))
return NULL;
return (dll_var) handle;
}
Lisp_Object
-dll_error ()
+dll_error (void)
{
/* #### WTF?! Shouldn't this at least attempt to get strerror or
something? --hniksic */
- return build_string ("Generic shared library error", Qnative);
+ return build_string ("Generic shared library error");
}
#elif defined (WIN32_NATIVE) || defined (CYGWIN)
@@ -197,13 +206,17 @@
dll_func
dll_function (dll_handle h, const CIbyte *n)
{
- return (dll_func) GetProcAddress ((HINSTANCE) h, n);
+ return (dll_func)
+ GetProcAddress ((HINSTANCE) h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding));
}
dll_func
dll_variable (dll_handle h, const CIbyte *n)
{
- return (dll_func) GetProcAddress ((HINSTANCE) h, n);
+ return (dll_func)
+ GetProcAddress ((HINSTANCE) h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding));
}
Lisp_Object
@@ -237,20 +250,21 @@
LISP_STRING_TO_EXTERNAL (fname, soname, Qdll_filename_encoding);
}
ret = NSCreateObjectFileImageFromFile(soname, &file);
- if (ret != NSObjectFileImageSuccess) {
- return NULL;
- }
- out = NSLinkModule(file, soname,
- NSLINKMODULE_OPTION_BINDNOW |
- NSLINKMODULE_OPTION_PRIVATE |
- NSLINKMODULE_OPTION_RETURN_ON_ERROR);
- return (dll_handle)out;
+ if (ret != NSObjectFileImageSuccess)
+ {
+ return NULL;
+ }
+ out = NSLinkModule (file, soname,
+ NSLINKMODULE_OPTION_BINDNOW |
+ NSLINKMODULE_OPTION_PRIVATE |
+ NSLINKMODULE_OPTION_RETURN_ON_ERROR);
+ return (dll_handle) out;
}
int
dll_close (dll_handle h)
{
- return NSUnLinkModule((NSModule)h, NSUNLINKMODULE_OPTION_NONE);
+ return NSUnLinkModule ((NSModule) h, NSUNLINKMODULE_OPTION_NONE);
}
/* Given an address, return the mach_header for the image containing it
@@ -261,33 +275,35 @@
* (
http://www.opendarwin.org/projects/dlcompat).
*/
-static struct mach_header*
-image_for_address(void *address)
+static struct mach_header *
+image_for_address (void *address)
{
unsigned long i;
- unsigned long count = _dyld_image_count();
+ unsigned long count = _dyld_image_count ();
struct mach_header *mh = 0;
for (i = 0; i < count; i++)
{
- unsigned long addr = (unsigned long)address -
- _dyld_get_image_vmaddr_slide(i);
- mh = _dyld_get_image_header(i);
+ unsigned long addr = (unsigned long) address -
+ _dyld_get_image_vmaddr_slide (i);
+ mh = _dyld_get_image_header (i);
if (mh)
{
struct load_command *lc =
- (struct load_command *)((char *)mh + sizeof(struct mach_header));
+ (struct load_command *)
+ ((Rawbyte *) mh + sizeof (struct mach_header));
unsigned long j;
for (j = 0; j < mh->ncmds;
- j++, lc = (struct load_command *)((char *)lc + lc->cmdsize))
+ j++, lc = (struct load_command *) ((Rawbyte *) lc +
+ lc->cmdsize))
{
if (LC_SEGMENT == lc->cmd &&
- addr >= ((struct segment_command *)lc)->vmaddr &&
+ addr >= ((struct segment_command *) lc)->vmaddr &&
addr <
- ((struct segment_command *)lc)->vmaddr +
- ((struct segment_command *)lc)->vmsize)
+ ((struct segment_command *) lc)->vmaddr +
+ ((struct segment_command *) lc)->vmsize)
{
goto image_found;
}
@@ -301,25 +317,25 @@
return mh;
}
-static const struct mach_header*
-my_find_image(const char *name)
+static const struct mach_header *
+my_find_image (const Ascbyte *name) /* !!#### is Ascbyte correct? */
{
const struct mach_header *mh = (struct mach_header *)
- NSAddImage(name, NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED |
- NSADDIMAGE_OPTION_RETURN_ON_ERROR);
+ NSAddImage (name, NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED |
+ NSADDIMAGE_OPTION_RETURN_ON_ERROR);
if (!mh)
{
- int count = _dyld_image_count();
+ int count = _dyld_image_count ();
int j;
for (j = 0; j < count; j++)
{
- const char *id = _dyld_get_image_name(j);
+ const Ascbyte *id = _dyld_get_image_name (j);
if (!strcmp(id, name))
{
- mh = _dyld_get_image_header(j);
+ mh = _dyld_get_image_header (j);
break;
}
}
@@ -336,32 +352,35 @@
* dependencies, then it probably isn't there.
*/
static NSSymbol
-search_linked_libs(const struct mach_header * mh, const char *symbol)
+search_linked_libs(const struct mach_header * mh, const char *symbol)
{
unsigned long n;
NSSymbol nssym = 0;
struct load_command *lc =
- (struct load_command *)((char *)mh + sizeof(struct mach_header));
+ (struct load_command *) ((Rawbyte *) mh + sizeof (struct mach_header));
for (n = 0; n < mh->ncmds;
- n++, lc = (struct load_command *)((char *)lc + lc->cmdsize))
+ n++, lc = (struct load_command *) ((Rawbyte *) lc + lc->cmdsize))
{
if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd))
{
struct mach_header *wh;
if ((wh = (struct mach_header *)
- my_find_image((char *)(((struct dylib_command *)lc)->dylib.name.offset +
- (char *)lc))))
+ my_find_image ((Rawbyte *)
+ (((struct dylib_command *) lc)->
+ dylib.name.offset +
+ (Rawbyte *) lc))))
{
- if (NSIsSymbolNameDefinedInImage(wh, symbol))
+ if (NSIsSymbolNameDefinedInImage (wh, symbol))
{
nssym =
- NSLookupSymbolInImage(wh,
- symbol,
- NSLOOKUPSYMBOLINIMAGE_OPTION_BIND |
- NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
+ NSLookupSymbolInImage
+ (wh,
+ symbol,
+ NSLOOKUPSYMBOLINIMAGE_OPTION_BIND |
+ NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
break;
}
}
@@ -375,33 +394,37 @@
dll_function (dll_handle h, const CIbyte *n)
{
NSSymbol sym = 0;
+ Extbyte *nout;
MAYBE_PREPEND_UNDERSCORE (n);
+ nout = NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding);
+
/* NULL means the program image and shared libraries, not bundles. */
if (h == NULL)
{
/* NOTE: This assumes that this function is included in the main program
and not in a shared library. */
- const struct mach_header* my_mh = image_for_address((void*) &dll_function);
+ const struct mach_header *my_mh =
+ image_for_address ((void*) &dll_function);
- if (NSIsSymbolNameDefinedInImage(my_mh, n))
+ if (NSIsSymbolNameDefinedInImage (my_mh, nout))
{
sym =
NSLookupSymbolInImage(my_mh,
- n,
+ nout,
NSLOOKUPSYMBOLINIMAGE_OPTION_BIND |
NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR);
}
if (!sym)
{
- sym = search_linked_libs(my_mh, n);
+ sym = search_linked_libs(my_mh, nout);
}
}
else
{
- sym = NSLookupSymbolInModule((NSModule)h, n);
+ sym = NSLookupSymbolInModule((NSModule)h, nout);
}
if (sym == 0) return 0;
@@ -413,9 +436,11 @@
{
NSSymbol sym;
MAYBE_PREPEND_UNDERSCORE (n);
- sym = NSLookupSymbolInModule((NSModule)h, n);
+ sym =
+ NSLookupSymbolInModule
+ ((NSModule) h, NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding));
if (sym == 0) return 0;
- return (dll_var)NSAddressOfSymbol(sym);
+ return (dll_var) NSAddressOfSymbol (sym);
}
Lisp_Object
@@ -424,8 +449,8 @@
NSLinkEditErrors c;
int errorNumber;
const CIbyte *fileNameWithError, *errorString;
- NSLinkEditError(&c, &errorNumber, &fileNameWithError, &errorString);
- return build_ext_string (errorString, Qnative);
+ NSLinkEditError (&c, &errorNumber, &fileNameWithError,
&errorString);
+ return build_ext_string (errorString, Qdll_error_string_encoding);
}
#elif HAVE_LTDL
/* Libtool's libltdl */
@@ -457,20 +482,24 @@
dll_function (dll_handle h, const CIbyte *n)
{
MAYBE_PREPEND_UNDERSCORE (n);
- return (dll_func) lt_dlsym ((lt_dlhandle) h, n);
+ return (dll_func) lt_dlsym
+ ((lt_dlhandle) h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding));
}
dll_var
dll_variable (dll_handle h, const CIbyte *n)
{
MAYBE_PREPEND_UNDERSCORE (n);
- return (dll_var) lt_dlsym ((lt_dlhandle) h, n);
+ return (dll_var) lt_dlsym
+ ((lt_dlhandle) h,
+ NEW_C_STRING_TO_EXTERNAL (n, Qdll_function_name_encoding));
}
Lisp_Object
-dll_error ()
+dll_error (void)
{
- return build_ext_string (lt_dlerror (), Qnative);
+ return build_ext_string (lt_dlerror (), Qdll_error_string_encoding);
}
#else
/* Catchall if we don't know about this system's method of dynamic loading */
@@ -499,7 +528,7 @@
}
Lisp_Object
-dll_error ()
+dll_error (void)
{
return build_string ("Shared libraries not implemented on this system");
}
1.7.4.1 +2 -0 XEmacs/xemacs/src/sysdll.h
Index: sysdll.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/sysdll.h,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -r1.7 -r1.7.4.1
--- sysdll.h 2004/05/14 15:34:40 1.7
+++ sysdll.h 2005/02/15 01:21:15 1.7.4.1
@@ -1,5 +1,6 @@
/* sysdll.h --- system dependent support for dynamic linked libraries
Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 2003 Ben Wing.
Author: William Perry <wmperry(a)aventail.com>
This file is part of XEmacs.
@@ -38,6 +39,7 @@
#define Qdll_filename_encoding Qfile_name
#define Qdll_function_name_encoding Qnative
+#define Qdll_error_string_encoding Qnative
END_C_DECLS
1.26.2.1 +1 -1 XEmacs/xemacs/src/syswindows.h
Index: syswindows.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/syswindows.h,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -r1.26 -r1.26.2.1
--- syswindows.h 2005/01/28 02:36:27 1.26
+++ syswindows.h 2005/02/15 01:21:16 1.26.2.1
@@ -882,7 +882,7 @@
/* NOTE: If you make two invocations of the following functions in the same
subexpression and use the exact same expression for the source in both
- cases, you will lose. In this unlikely case, you may get an abort, and
+ cases, you will lose. In this unlikely case, you may get an ABORT, and
need to rewrite the code.
We need to use ALLOCA_FUNCALL_OK here, see NEW_DFC in text.h.
1.24.2.1 +1 -1 XEmacs/xemacs/src/text.c
Index: text.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/text.c,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -r1.24 -r1.24.2.1
--- text.c 2005/01/24 23:34:12 1.24
+++ text.c 2005/02/15 01:21:16 1.24.2.1
@@ -151,7 +151,7 @@
text has not mistakenly filtered in. This should be fairly easy as
ASCII text will generally be entirely spaces and letters whereas every
second byte of Unicode text will generally be a null byte. Either we
- abort if the second bytes are entirely letters and numbers, or,
+ ABORT if the second bytes are entirely letters and numbers, or,
perhaps better, do the equivalent of a non-MULE build, where we should
be dealing entirely with 8-bit characters, and assert that the high
bytes of each pair are null.
1.28.2.1 +2 -2 XEmacs/xemacs/src/text.h
Index: text.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/text.h,v
retrieving revision 1.28
retrieving revision 1.28.2.1
diff -u -r1.28 -r1.28.2.1
--- text.h 2005/01/28 02:36:27 1.28
+++ text.h 2005/02/15 01:21:17 1.28.2.1
@@ -2874,7 +2874,7 @@
#define DFC_LISP_BUFFER_USE_CONVERTED_DATA(sink) \
Lstream_delete (XLSTREAM (dfc_sink.lisp_object))
-/* #define TEST_NEW_DFC */
+#define TEST_NEW_DFC
/* Convenience macros for extremely common invocations */
#ifdef TEST_NEW_DFC
@@ -2992,7 +2992,7 @@
/* NOTE: If you make two invocations of the dfc functions below in the same
subexpression and use the exact same expression for the source in both
- cases, you will lose. In this unlikely case, you will get an abort, and
+ cases, you will lose. In this unlikely case, you will get an ABORT, and
need to rewrite the code.
*/
1.11.2.1 +71 -28 XEmacs/xemacs/src/toolbar-common.c
Index: toolbar-common.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/toolbar-common.c,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -r1.11 -r1.11.2.1
--- toolbar-common.c 2005/01/24 23:34:12 1.11
+++ toolbar-common.c 2005/02/15 01:21:19 1.11.2.1
@@ -1,7 +1,7 @@
/* toolbar implementation -- "Generic" (X or GTK) redisplay interface.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Sun Microsystems, Inc.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1996 Chuck Thompson.
This file is part of XEmacs.
@@ -38,40 +38,82 @@
/* Only a very few things need to differ based on the toolkit used.
**
-** Some of the routines used assert(FRAME_yyy_P(f)) checks, this is
-** now abstracted into __INTERNAL_APPROPRIATENESS_CHECK(). When we
-** add new window systems that use this code, we should either add a
-** new case here, or just remove the checks completely.
+** Some of the routines used assert (FRAME_yyy_P (f)) checks, this is
+** now abstracted into internal_appropriateness_check().
**
** At least for X & GTK redraw_frame_toolbars() might end up getting
** called before we are completely initialized. To avoid this, we use
-** the __INTERNAL_MAPPED_P(f) macro, that should return 0 if we should
-** not draw the toolbars yet. When we add new window systems that use
-** this code, we should add a new case here, if they need it.
+** the internal_mapped_p(f) macro, that should return 0 if we should
+** not draw the toolbars yet.
**
** When clearing the toolbar, it is nice to flush the drawing queue.
-** Use __INTERNAL_FLUSH to do this. It is passed a device.
+** Use internal_flush() to do this. It is passed a device.
*/
-#if defined(HAVE_GTK)
+#ifdef HAVE_GTK
#include "console-gtk-impl.h"
-#define __INTERNAL_MAPPED_P(f) GTK_WIDGET_REALIZED (FRAME_GTK_TEXT_WIDGET (f))
-#define __INTERNAL_FLUSH(d) gdk_flush()
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_GTK_P (f))
-#elif defined(HAVE_X_WINDOWS)
+#endif
+#ifdef HAVE_X_WINDOWS
#include "console-x-impl.h"
-#define __INTERNAL_MAPPED_P(f) XtIsRealized (FRAME_X_SHELL_WIDGET (f))
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) assert(FRAME_X_P (f))
-#define __INTERNAL_FLUSH(d) XFlush (DEVICE_X_DISPLAY (d))
-#else
-#define __INTERNAL_MAPPED_P(f) ABORT()
-#define __INTERNAL_APPROPRIATENESS_CHECK(f) ABORT()
-#define __INTERNAL_FLUSH(f) ABORT()
#endif
#include "toolbar-common.h"
extern Lisp_Object Vtoolbar_shadow_thickness;
+static int
+internal_mapped_p (struct frame *f)
+{
+ if (0)
+ ;
+#ifdef HAVE_GTK
+ else if (FRAME_GTK_P (f))
+ return GTK_WIDGET_REALIZED (FRAME_GTK_TEXT_WIDGET (f));
+#endif
+#ifdef HAVE_X_WINDOWS
+ else if (FRAME_X_P (f))
+ return XtIsRealized (FRAME_X_SHELL_WIDGET (f));
+#endif
+ else
+ {
+ ABORT ();
+ return 0;
+ }
+}
+
+static void
+internal_appropriateness_check (struct frame *f)
+{
+ if (0)
+ ;
+#ifdef HAVE_GTK
+ else if (FRAME_GTK_P (f))
+ ;
+#endif
+#ifdef HAVE_X_WINDOWS
+ else if (FRAME_X_P (f))
+ ;
+#endif
+ else
+ ABORT ();
+}
+
+static void
+internal_flush (struct device *d)
+{
+ if (0)
+ ;
+#ifdef HAVE_GTK
+ else if (DEVICE_GTK_P (d))
+ gdk_flush ();
+#endif
+#ifdef HAVE_X_WINDOWS
+ else if (DEVICE_X_P (d))
+ XFlush (DEVICE_X_DISPLAY (d));
+#endif
+ else
+ ABORT ();
+}
+
static void __prepare_button_area (struct frame *f,
struct toolbar_button *tb)
{
@@ -85,7 +127,8 @@
Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
struct window *w = XWINDOW (window);
int shadow_thickness;
- int def_shadow_thickness = XINT (Fspecifier_instance(Vtoolbar_shadow_thickness,
window, Qnil, Qnil));
+ int def_shadow_thickness =
+ XINT (Fspecifier_instance (Vtoolbar_shadow_thickness, window, Qnil, Qnil));
face_index toolbar_findex;
if (tb->vertical)
@@ -570,7 +613,7 @@
}
SET_TOOLBAR_WAS_VISIBLE_FLAG (f, pos, 1);
- __INTERNAL_FLUSH (XDEVICE (f->device));
+ internal_flush (XDEVICE (f->device));
}
static void
@@ -602,13 +645,13 @@
redisplay_clear_region (frame, DEFAULT_INDEX, x, y, width, height);
- __INTERNAL_FLUSH (XDEVICE (f->device));
+ internal_flush (XDEVICE (f->device));
}
void
common_output_frame_toolbars (struct frame *f)
{
- __INTERNAL_APPROPRIATENESS_CHECK(f);
+ internal_appropriateness_check (f);
if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
common_output_toolbar (f, TOP_TOOLBAR);
@@ -626,7 +669,7 @@
void
common_clear_frame_toolbars (struct frame *f)
{
- __INTERNAL_APPROPRIATENESS_CHECK(f);
+ internal_appropriateness_check (f);
if (f->top_toolbar_was_visible
&& !FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
@@ -693,7 +736,7 @@
common_redraw_exposed_toolbars (struct frame *f, int x, int y, int width,
int height)
{
- __INTERNAL_APPROPRIATENESS_CHECK(f);
+ internal_appropriateness_check (f);
if (FRAME_REAL_TOP_TOOLBAR_VISIBLE (f))
common_redraw_exposed_toolbar (f, TOP_TOOLBAR, x, y, width, height);
@@ -716,7 +759,7 @@
particular before we have actually mapped it. That routine can
call this one. So, we need to make sure that the frame is
actually ready before we try and draw all over it. */
- if (__INTERNAL_MAPPED_P(f))
+ if (internal_mapped_p (f))
common_redraw_exposed_toolbars (f, 0, 0, FRAME_PIXWIDTH (f),
FRAME_PIXHEIGHT (f));
}
1.7.4.1 +2 -0 XEmacs/xemacs/src/toolbar-gtk.c
Index: toolbar-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/toolbar-gtk.c,v
retrieving revision 1.7
retrieving revision 1.7.4.1
diff -u -r1.7 -r1.7.4.1
--- toolbar-gtk.c 2004/09/20 19:20:03 1.7
+++ toolbar-gtk.c 2005/02/15 01:21:19 1.7.4.1
@@ -35,6 +35,8 @@
/* We should really create a 'common' console type and fill it with
** all the shared code. We would then just use
** CONSOLE_INHERITS_METHOD(x,common,blah)
+ #### Unfortunately the code isn't actually completely common. It's
+ just almost completely duplicated.
*/
#define gtk_output_frame_toolbars common_output_frame_toolbars
#define gtk_output_toolbar_button common_output_toolbar_button
1.18.4.1 +2 -0 XEmacs/xemacs/src/toolbar-x.c
Index: toolbar-x.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/toolbar-x.c,v
retrieving revision 1.18
retrieving revision 1.18.4.1
diff -u -r1.18 -r1.18.4.1
--- toolbar-x.c 2004/09/20 19:20:03 1.18
+++ toolbar-x.c 2005/02/15 01:21:20 1.18.4.1
@@ -45,6 +45,8 @@
/* We should really create a 'common' console type and fill it with
** all the shared code. We would then just use
** CONSOLE_INHERITS_METHOD(x,common,blah)
+ #### Unfortunately the code isn't actually completely common. It's
+ just almost completely duplicated.
*/
#define x_output_frame_toolbars common_output_frame_toolbars
#define x_output_toolbar_button common_output_toolbar_button
1.32.4.1 +3 -4 XEmacs/xemacs/src/tooltalk.c
Index: tooltalk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/tooltalk.c,v
retrieving revision 1.32
retrieving revision 1.32.4.1
diff -u -r1.32 -r1.32.4.1
--- tooltalk.c 2004/09/20 19:20:04 1.32
+++ tooltalk.c 2005/02/15 01:21:20 1.32.4.1
@@ -1,7 +1,7 @@
/* Tooltalk support for Emacs.
Copyright (C) 1993, 1994 Sun Microsystems, Inc.
Copyright (C) 1995 Free Software Foundation, Inc.
- Copyright (C) 2002 Ben Wing.
+ Copyright (C) 2002, 2003 Ben Wing.
This file is part of XEmacs.
@@ -775,9 +775,8 @@
Extbyte *value_ext;
Bytecount value_ext_len;
CHECK_STRING (value);
- TO_EXTERNAL_FORMAT (LISP_STRING, value,
- ALLOCA, (value_ext, value_ext_len),
- Qnative);
+ LISP_STRING_TO_SIZED_EXTERNAL (value, value_ext, value_ext_len,
+ Qnative);
tt_message_arg_bval_set (m, n, (unsigned char *) value_ext, value_ext_len);
}
else if (EQ (attribute, Qtt_arg_ival))
1.8.4.1 +31 -29 XEmacs/xemacs/src/ui-byhand.c
Index: ui-byhand.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ui-byhand.c,v
retrieving revision 1.8
retrieving revision 1.8.4.1
diff -u -r1.8 -r1.8.4.1
--- ui-byhand.c 2004/11/04 23:06:56 1.8
+++ ui-byhand.c 2005/02/15 01:21:20 1.8.4.1
@@ -162,15 +162,14 @@
CHECK_INT (column);
if (!GTK_IS_CLIST (XGTK_OBJECT (obj)->object))
- {
- wtaerror ("Object is not a GtkCList", obj);
- }
+ wtaerror ("Object is not a GtkCList", obj);
- gtk_clist_get_text (GTK_CLIST (XGTK_OBJECT (obj)->object), XINT (row), XINT
(column), &text);
+ gtk_clist_get_text (GTK_CLIST (XGTK_OBJECT (obj)->object), XINT (row),
+ XINT (column), &text);
if (text)
{
- rval = build_string (text);
+ rval = build_ext_string (text, Vgtk_text_encoding);
/* NOTE: This is NOT a memory leak. GtkCList returns a pointer
to internally used memory, not a copy of it.
g_free (text);
@@ -247,9 +246,7 @@
CHECK_INT (column);
if (!GTK_IS_CLIST (XGTK_OBJECT (clist)->object))
- {
- wtaerror ("Object is not a GtkCList", clist);
- }
+ wtaerror ("Object is not a GtkCList", clist);
gtk_clist_get_pixtext (GTK_CLIST (XGTK_OBJECT (clist)->object),
XINT (row), XINT (column), &text, &spacing,
@@ -257,7 +254,8 @@
return (list3 (pixmap ? build_gtk_boxed (pixmap, GTK_TYPE_GDK_WINDOW) : Qnil,
mask ? build_gtk_boxed (mask, GTK_TYPE_GDK_WINDOW) : Qnil,
- (text && text[0]) ? build_string (text) : Qnil));
+ (text && text[0]) ?
+ build_ext_string (text, Vgtk_text_encoding) : Qnil));
}
/* void gtk_color_selection_get_color(GtkColorSelection *colorsel, gdouble *color); */
@@ -285,7 +283,7 @@
/* (gtk-import-function nil "gtk_editable_insert_text" 'GtkEditable
'GtkString 'gint 'pointer-to-gint) */
DEFUN ("gtk-editable-insert-text", Fgtk_editable_insert_text, 3, 3, 0, /*
-Insert text STRINT at POS in GtkEditable widget OBJ.
+Insert text STRING at POS in GtkEditable widget OBJ.
Returns the new position of the cursor in the widget.
*/
(obj, string, pos))
@@ -299,14 +297,17 @@
the_pos = XINT (pos);
if (!GTK_IS_EDITABLE (XGTK_OBJECT (obj)->object))
- {
- wtaerror ("Object is not a GtkEditable", obj);
- }
+ wtaerror ("Object is not a GtkEditable", obj);
- gtk_editable_insert_text (GTK_EDITABLE (XGTK_OBJECT (obj)->object),
- (char *) XSTRING_DATA (string),
- XSTRING_LENGTH (string),
- &the_pos);
+ {
+ Extbyte *strext;
+ Bytecount strextlen;
+
+ LISP_STRING_TO_SIZED_EXTERNAL (string, strext, strextlen,
+ Vgtk_text_encoding);
+ gtk_editable_insert_text (GTK_EDITABLE (XGTK_OBJECT (obj)->object),
+ strext, strextlen, &the_pos);
+ }
return (make_int (the_pos));
}
@@ -402,13 +403,11 @@
CHECK_GTK_OBJECT (label);
if (!GTK_IS_LABEL (XGTK_OBJECT (label)->object))
- {
- wtaerror ("Object is not a GtkLabel", label);
- }
+ wtaerror ("Object is not a GtkLabel", label);
gtk_label_get (GTK_LABEL (XGTK_OBJECT (label)->object), &string);
- return (build_string (string));
+ return (build_ext_string (string, Vgtk_text_encoding));
}
DEFUN ("gtk-notebook-query-tab-label-packing",
Fgtk_notebook_query_tab_label_packing, 2, 2, 0, /*
@@ -525,11 +524,12 @@
if (NILP (position))
{
- w = (NILP (prepend_p) ? gtk_toolbar_append_item : gtk_toolbar_prepend_item)
+ w = (NILP (prepend_p) ? gtk_toolbar_append_item :
+ gtk_toolbar_prepend_item)
(GTK_TOOLBAR (XGTK_OBJECT (toolbar)->object),
- (char*) XSTRING_DATA (text),
- (char*) XSTRING_DATA (tooltip_text),
- (char*) XSTRING_DATA (tooltip_private_text),
+ LISP_STRING_TO_GTK_TEXT (text),
+ LISP_STRING_TO_GTK_TEXT (tooltip_text),
+ LISP_STRING_TO_GTK_TEXT (tooltip_private_text),
GTK_WIDGET (XGTK_OBJECT (icon)->object),
GTK_SIGNAL_FUNC (__generic_toolbar_callback),
LISP_TO_VOID (callback));
@@ -537,11 +537,13 @@
else
{
w = gtk_toolbar_insert_item (GTK_TOOLBAR (XGTK_OBJECT (toolbar)->object),
- (char*) XSTRING_DATA (text),
- (char*) XSTRING_DATA (tooltip_text),
- (char*) XSTRING_DATA (tooltip_private_text),
+ LISP_STRING_TO_GTK_TEXT (text),
+ LISP_STRING_TO_GTK_TEXT (tooltip_text),
+ LISP_STRING_TO_GTK_TEXT
+ (tooltip_private_text),
GTK_WIDGET (XGTK_OBJECT (icon)->object),
- GTK_SIGNAL_FUNC (__generic_toolbar_callback),
+ GTK_SIGNAL_FUNC
+ (__generic_toolbar_callback),
LISP_TO_VOID (callback),
XINT (position));
}
1.22.2.1 +182 -654 XEmacs/xemacs/src/ui-gtk.c
Index: ui-gtk.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/ui-gtk.c,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- ui-gtk.c 2005/01/26 10:22:25 1.22
+++ ui-gtk.c 2005/02/15 01:21:21 1.22.2.1
@@ -4,6 +4,7 @@
**
** Created by: William M. Perry <wmperry(a)gnu.org>
** Copyright (c) 2000 William M. Perry <wmperry(a)gnu.org>
+ Copyright (c) 2003 Ben Wing.
**
*/
@@ -27,16 +28,15 @@
/* XEmacs specific GTK types */
#include "gtk-glue.c"
-/* Is the fundamental type of 't' the xemacs defined fundamental type
'type'? */
-#define IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t,type) (((GtkType) GTK_FUNDAMENTAL_TYPE(t)) ==
(type))
-
Lisp_Object Qemacs_ffip;
Lisp_Object Qemacs_gtk_objectp;
Lisp_Object Qemacs_gtk_boxedp;
Lisp_Object Qvoid;
Lisp_Object Venumeration_info;
+#ifdef HAVE_SHLIB
static GHashTable *dll_cache;
+#endif
Lisp_Object gtk_type_to_lisp (GtkArg *arg);
int lisp_to_gtk_type (Lisp_Object obj, GtkArg *arg);
@@ -50,6 +50,10 @@
static Lisp_Object enum_to_symbol (guint value, GtkType t);
#define NIL_OR_VOID_P(x) (NILP (x) || EQ (x, Qvoid))
+#define GTK_FUNDAMENTAL_TYPE_EQ(t1, t2) \
+ (((GtkType) GTK_FUNDAMENTAL_TYPE (t1)) == (t2))
+
+#ifdef HAVE_SHLIB
static void
initialize_dll_cache (void)
@@ -71,6 +75,7 @@
(dll))
{
dll_handle h;
+ gchar *dllext;
CHECK_STRING (dll);
@@ -82,7 +87,8 @@
dll = Fexpand_file_name (dll, Qnil);
/* Check if we have already opened it first */
- h = g_hash_table_lookup (dll_cache, XSTRING_DATA (dll));
+ dllext = LISP_STRING_TO_GTK_TEXT (dll);
+ h = g_hash_table_lookup (dll_cache, dllext);
if (!h)
{
@@ -90,15 +96,16 @@
if (h)
{
- g_hash_table_insert (dll_cache, qxestrdup (XSTRING_DATA (dll)), h);
+ g_hash_table_insert (dll_cache, g_strdup (dllext), h);
}
else
{
- signal_error (Qfile_error, "dll_open error", dll_error());
+ signal_error (Qfile_error, "dll_open error", dll_error ());
}
}
return (h ? Qt : Qnil);
}
+#endif /* HAVE_SHLIB */
/* Gtk object importing */
@@ -140,7 +147,7 @@
return (0);
}
- if (gethash ((void *)t, internal_type_hash, (const void **)&retval))
+ if (gethash ((void *) t, internal_type_hash, (const void **) &retval))
{
return (1);
}
@@ -196,19 +203,20 @@
mark_type_as_imported (the_type);
}
- args = gtk_object_query_args(the_type,&flags,&n_args);
+ args = gtk_object_query_args (the_type,&flags,&n_args);
/* First get the arguments the object can accept */
for (i = 0; i < n_args; i++)
{
- if ((args[i].type != original_type) && !type_already_imported_p
(args[i].type))
+ if ((args[i].type != original_type) &&
+ !type_already_imported_p (args[i].type))
{
import_gtk_type (args[i].type);
}
}
- g_free(args);
- g_free(flags);
+ g_free (args);
+ g_free (flags);
#if 0
/* Now lets publish the signals */
@@ -224,7 +232,7 @@
}
#endif
- the_type = gtk_type_parent(the_type);
+ the_type = gtk_type_parent (the_type);
} while (the_type != GTK_TYPE_INVALID);
}
@@ -235,14 +243,15 @@
Lisp_Object assoc = Qnil;
if (NILP (Venumeration_info))
- {
- Venumeration_info = call2 (intern ("make-hashtable"), make_int (100),
Qequal);
- }
+ Venumeration_info = make_lisp_hash_table (100, HASH_TABLE_NON_WEAK,
+ HASH_TABLE_EQUAL);
while (vals && vals->value_name)
{
- assoc = Fcons (Fcons (intern (vals->value_nick), make_int (vals->value)),
assoc);
- assoc = Fcons (Fcons (intern (vals->value_name), make_int (vals->value)),
assoc);
+ assoc = Fcons (Fcons (intern (vals->value_nick),
+ make_int (vals->value)), assoc);
+ assoc = Fcons (Fcons (intern (vals->value_name),
+ make_int (vals->value)), assoc);
vals++;
}
@@ -280,7 +289,8 @@
static emacs_ffi_data *
allocate_ffi_data (void)
{
- emacs_ffi_data *data = alloc_lcrecord_type (emacs_ffi_data, &lrecord_emacs_ffi);
+ emacs_ffi_data *data = alloc_lcrecord_type (emacs_ffi_data,
+ &lrecord_emacs_ffi);
data->return_type = GTK_TYPE_NONE;
data->n_args = 0;
@@ -369,10 +379,11 @@
GTK_VALUE_POINTER (a) = * (void **) v; \
break; \
} \
- if (freep) xfree(v, void *); \
+ if (freep) xfree (v, void *); \
} while (0)
-static gpointer __allocate_object_storage (GtkType t)
+static gpointer
+__allocate_object_storage (GtkType t)
{
size_t s = 0;
void *rval = NULL;
@@ -425,7 +436,7 @@
break;
default:
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_LISTOF))
+ if (GTK_FUNDAMENTAL_TYPE_EQ (t, GTK_TYPE_LISTOF))
{
s = (sizeof (void *));
}
@@ -442,7 +453,10 @@
return (rval);
}
-static Lisp_Object type_to_marshaller_type (GtkType t)
+#ifdef HAVE_SHLIB
+
+static Lisp_Object
+type_to_marshaller_type (GtkType t)
{
switch (GTK_FUNDAMENTAL_TYPE (t))
{
@@ -479,30 +493,34 @@
new fundamental type that is not fixed at compile time.
*sigh*
*/
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_ARRAY))
+ if (GTK_FUNDAMENTAL_TYPE_EQ (t, GTK_TYPE_ARRAY))
return (build_string ("ARRAY"));
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(t, GTK_TYPE_LISTOF))
+ if (GTK_FUNDAMENTAL_TYPE_EQ (t, GTK_TYPE_LISTOF))
return (build_string ("LIST"));
return (Qnil);
}
}
-struct __dll_mapper_closure {
+struct __dll_mapper_closure
+{
void * (*func) (dll_handle, const CIbyte *);
- Ibyte *obj_name;
+ Lisp_Object obj_name;
void **storage;
};
static void __dll_mapper (gpointer UNUSED (key), gpointer value,
gpointer user_data)
{
- struct __dll_mapper_closure *closure = (struct __dll_mapper_closure *) user_data;
+ struct __dll_mapper_closure *closure =
+ (struct __dll_mapper_closure *) user_data;
if (*(closure->storage) == NULL)
{
/* Need to see if it is in this one */
- *(closure->storage) = closure->func ((dll_handle) value, (CIbyte*)
closure->obj_name);
+ *(closure->storage) =
+ closure->func ((dll_handle) value,
+ (CIbyte *) XSTRING_DATA (closure->obj_name));
}
}
@@ -522,7 +540,7 @@
initialize_dll_cache ();
xemacs_init_gtk_classes ();
- arg.type = gtk_type_from_name ((char *) XSTRING_DATA (type));
+ arg.type = gtk_type_from_name (LISP_STRING_TO_GTK_TEXT (type));
if (arg.type == GTK_TYPE_INVALID)
{
@@ -534,7 +552,7 @@
struct __dll_mapper_closure closure;
closure.func = dll_variable;
- closure.obj_name = XSTRING_DATA (name);
+ closure.obj_name = name;
closure.storage = &var;
g_hash_table_foreach (dll_cache, __dll_mapper, &closure);
@@ -545,7 +563,7 @@
gui_error ("Could not locate variable", name);
}
- GTK_VALUE_POINTER(arg) = var;
+ GTK_VALUE_POINTER (arg) = var;
CONVERT_RETVAL (arg, 0);
return (gtk_type_to_lisp (&arg));
}
@@ -577,7 +595,7 @@
struct __dll_mapper_closure closure;
closure.func = dll_function;
- closure.obj_name = XSTRING_DATA (name);
+ closure.obj_name = name;
closure.storage = (void **) &name_func;
g_hash_table_foreach (dll_cache, __dll_mapper, &closure);
@@ -609,7 +627,7 @@
type = Fsymbol_name (elt);
- the_type = gtk_type_from_name ((char *) XSTRING_DATA (type));
+ the_type = gtk_type_from_name (LISP_STRING_TO_GTK_TEXT (type));
if (the_type == GTK_TYPE_INVALID)
{
@@ -627,17 +645,19 @@
{
invalid_argument ("Do not know how to marshal", type);
}
- marshaller = concat3 (marshaller, build_string ("_"), marshaller_type);
+ marshaller = concat3 (marshaller, build_string ("_"),
+ marshaller_type);
n_args++;
}
}
else
{
- marshaller = concat3 (marshaller, build_string ("_"),
type_to_marshaller_type (GTK_TYPE_NONE));
+ marshaller = concat3 (marshaller, build_string ("_"),
+ type_to_marshaller_type (GTK_TYPE_NONE));
}
rettype = Fsymbol_name (rettype);
- data->return_type = gtk_type_from_name ((char *) XSTRING_DATA (rettype));
+ data->return_type = gtk_type_from_name (LISP_STRING_TO_GTK_TEXT (rettype));
if (data->return_type == GTK_TYPE_INVALID)
{
@@ -646,10 +666,12 @@
import_gtk_type (data->return_type);
- marshaller = concat3 (type_to_marshaller_type (data->return_type), build_string
("_"), marshaller);
+ marshaller = concat3 (type_to_marshaller_type (data->return_type),
+ build_string ("_"), marshaller);
marshaller = concat2 (build_string ("emacs_gtk_marshal_"), marshaller);
- marshaller_func = (ffi_marshalling_function) find_marshaller ((char *) XSTRING_DATA
(marshaller));
+ marshaller_func =
+ (ffi_marshalling_function) find_marshaller (XSTRING_DATA (marshaller));
if (!marshaller_func)
{
@@ -664,6 +686,14 @@
rval = wrap_emacs_ffi (data);
return (rval);
}
+#endif /* HAVE_SHLIB */
+
+static void
+free_string_mapper (gpointer data, gpointer user_data)
+{
+ if (data)
+ xfree (data, gpointer);
+}
DEFUN ("gtk-call-function", Fgtk_call_function, 1, 2, 0, /*
Call an external function.
@@ -685,12 +715,12 @@
** #### slip by, and not be very easy to find.
** #### Bill Perry July 9, 2000
*/
- if (n_args != XFFI(func)->n_args)
+ if (n_args != XFFI (func)->n_args)
{
Lisp_Object for_append[3];
/* Signal an error if they pass in too many arguments */
- if (n_args > XFFI(func)->n_args)
+ if (n_args > XFFI (func)->n_args)
{
return Fsignal (Qwrong_number_of_arguments,
list2 (func, make_int (n_args)));
@@ -700,12 +730,13 @@
** they wanted `nil' in there.
*/
for_append[0] = args;
- for_append[1] = Fmake_list (make_int (XFFI(func)->n_args - n_args), Qnil);
+ for_append[1] = Fmake_list (make_int (XFFI (func)->n_args - n_args),
+ Qnil);
args = Fappend (2, for_append);
}
#else
- if (n_args != XFFI(func)->n_args)
+ if (n_args != XFFI (func)->n_args)
{
/* Signal an error if they do not pass in the correct # of arguments */
return Fsignal (Qwrong_number_of_arguments,
@@ -741,11 +772,13 @@
if (XFFI (func)->return_type != GTK_TYPE_NONE)
{
the_args[n_args].type = XFFI (func)->return_type;
- GTK_VALUE_POINTER (the_args[n_args]) = __allocate_object_storage
(the_args[n_args].type);
+ GTK_VALUE_POINTER (the_args[n_args]) =
+ __allocate_object_storage (the_args[n_args].type);
n_args++;
}
- XFFI (func)->marshal ((ffi_actual_function) (XFFI (func)->function_ptr),
the_args);
+ XFFI (func)->marshal ((ffi_actual_function) (XFFI (func)->function_ptr),
+ the_args);
if (XFFI (func)->return_type != GTK_TYPE_NONE)
{
@@ -753,18 +786,39 @@
retval = gtk_type_to_lisp (&the_args[n_args - 1]);
}
- /* Need to free any array or list pointers */
+ /* Need to free any array or list pointers or strings. We allocated the
+ strings ourselves so need to free with xfree(). */
{
int i;
for (i = 0; i < n_args; i++)
{
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(the_args[i].type, GTK_TYPE_ARRAY))
+ /* no SWITCH; GTK_TYPE_ARRAY, GTK_TYPE_LISTOF not constants */
+ if (GTK_FUNDAMENTAL_TYPE_EQ (the_args[i].type, GTK_TYPE_STRING))
{
- g_free (GTK_VALUE_POINTER (the_args[i]));
+ if (GTK_VALUE_STRING (the_args[i]))
+ xfree (GTK_VALUE_STRING (the_args[i]), gchar *);
+ }
+ else if (GTK_FUNDAMENTAL_TYPE_EQ (the_args[i].type, GTK_TYPE_ARRAY))
+ {
+ if (the_args[i].type == GTK_TYPE_STRING_ARRAY)
+ {
+ gchar **ptr;
+
+ for (ptr = (gchar **) GTK_VALUE_POINTER (the_args[i]);
+ *ptr; ptr++)
+ xfree (*ptr, gchar *);
+ }
+
+ xfree (GTK_VALUE_POINTER (the_args[i]), void *);
}
- else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(the_args[i].type, GTK_TYPE_LISTOF))
+ else if (GTK_FUNDAMENTAL_TYPE_EQ (the_args[i].type, GTK_TYPE_LISTOF))
{
- /* g_list_free (GTK_VALUE_POINTER (the_args[i])); */
+ if (the_args[i].type == GTK_TYPE_STRING_LIST)
+ {
+ g_list_foreach ((GList *) GTK_VALUE_POINTER (the_args[i]),
+ free_string_mapper, NULL);
+ }
+ g_list_free ((GList *) GTK_VALUE_POINTER (the_args[i]));
}
}
}
@@ -784,7 +838,10 @@
write_c_string (printcharfun, "#<GtkObject (");
if (XGTK_OBJECT (obj)->alive_p)
- write_c_string (printcharfun, gtk_type_name (GTK_OBJECT_TYPE (XGTK_OBJECT
(obj)->object)));
+ write_string (printcharfun,
+ GTK_TEXT_TO_C_STRING
+ (gtk_type_name
+ (GTK_OBJECT_TYPE (XGTK_OBJECT (obj)->object))));
else
write_c_string (printcharfun, "dead");
write_fmt_string (printcharfun, ") %p>", (void *) XGTK_OBJECT
(obj)->object);
@@ -803,7 +860,7 @@
prop_name = Fsymbol_name (prop);
- args[0].name = (char *) XSTRING_DATA (prop_name);
+ args[0].name = LISP_STRING_TO_GTK_TEXT (prop_name);
err = gtk_object_arg_get_info (GTK_OBJECT_TYPE (XGTK_OBJECT (obj)->object),
args[0].name,
@@ -864,7 +921,7 @@
prop_name = Fsymbol_name (prop);
- args[0].name = (char *) XSTRING_DATA (prop_name);
+ args[0].name = LISP_STRING_TO_GTK_TEXT (prop_name);
err = gtk_object_arg_get_info (GTK_OBJECT_TYPE (XGTK_OBJECT (obj)->object),
args[0].name,
@@ -875,7 +932,8 @@
/* Not a magic symbol, fall back to just storing in our real plist */
g_free (err);
- XGTK_OBJECT (obj)->plist = Fplist_put (XGTK_OBJECT (obj)->plist, prop,
value);
+ XGTK_OBJECT (obj)->plist = Fplist_put (XGTK_OBJECT (obj)->plist, prop,
+ value);
return (1);
}
@@ -1007,7 +1065,8 @@
}
static void
-__internal_callback_marshal (GtkObject *obj, gpointer data, guint n_args, GtkArg
*args)
+__internal_callback_marshal (GtkObject *obj, gpointer data, guint n_args,
+ GtkArg *args)
{
Lisp_Object arg_list = Qnil;
Lisp_Object callback_fn = Qnil;
@@ -1082,9 +1141,12 @@
gcpro_popup_callbacks (id, func);
- gtk_signal_connect_full (XGTK_OBJECT (obj)->object, (char *) XSTRING_DATA (name),
- NULL, __internal_callback_marshal, LISP_TO_VOID (func),
- __internal_callback_destroy, c_object_signal, c_after);
+ gtk_signal_connect_full (XGTK_OBJECT (obj)->object,
+ LISP_STRING_TO_GTK_TEXT (name),
+ NULL, __internal_callback_marshal,
+ LISP_TO_VOID (func),
+ __internal_callback_destroy, c_object_signal,
+ c_after);
return (Qt);
}
@@ -1102,7 +1164,9 @@
printing_unreadable_object ("#<GtkBoxed %p>", XGTK_BOXED
(obj)->object);
write_c_string (printcharfun, "#<GtkBoxed (");
- write_c_string (printcharfun, gtk_type_name (XGTK_BOXED (obj)->object_type));
+ write_string (printcharfun,
+ GTK_TEXT_TO_C_STRING
+ (gtk_type_name (XGTK_BOXED (obj)->object_type)));
write_fmt_string (printcharfun, ") %p>", (void *) XGTK_BOXED
(obj)->object);
}
@@ -1162,13 +1226,14 @@
return (data);
}
-Lisp_Object build_gtk_boxed (void *obj, GtkType t)
+Lisp_Object
+build_gtk_boxed (void *obj, GtkType t)
{
Lisp_Object retval = Qnil;
emacs_gtk_boxed_data *data = NULL;
- if (GTK_FUNDAMENTAL_TYPE (t) != GTK_TYPE_BOXED)
- ABORT();
+ if (!GTK_FUNDAMENTAL_TYPE_EQ (t, GTK_TYPE_BOXED))
+ ABORT ();
data = allocate_emacs_gtk_boxed_data ();
data->object = obj;
@@ -1204,12 +1269,11 @@
CHECK_STRING (type);
- t = gtk_type_from_name ((char *) XSTRING_DATA (type));
+ t = gtk_type_from_name (LISP_STRING_TO_GTK_TEXT (type));
if (t == GTK_TYPE_INVALID)
- {
- invalid_argument ("Not a GTK type", type);
- }
+ invalid_argument ("Not a GTK type", type);
+
return (make_int (GTK_FUNDAMENTAL_TYPE (t)));
}
@@ -1235,13 +1299,11 @@
props = signals = rval = Qnil;
if (SYMBOLP (type))
- {
- type = Fsymbol_name (type);
- }
+ type = Fsymbol_name (type);
if (STRINGP (type))
{
- t = gtk_type_from_name ((gchar*) XSTRING_DATA (type));
+ t = gtk_type_from_name (LISP_STRING_TO_GTK_TEXT (type));
if (t == GTK_TYPE_INVALID)
{
invalid_argument ("Not a GTK type", type);
@@ -1253,7 +1315,7 @@
t = XINT (type);
}
- if (GTK_FUNDAMENTAL_TYPE (t) != GTK_TYPE_OBJECT)
+ if (!GTK_FUNDAMENTAL_TYPE_EQ (t, GTK_TYPE_OBJECT))
{
invalid_argument ("Not a GtkObject", type);
}
@@ -1265,7 +1327,7 @@
GtkArg args[3];
GtkObject *obj = gtk_object_newv (t, 0, args);
- gtk_object_destroy(obj);
+ gtk_object_destroy (obj);
}
do
@@ -1278,13 +1340,14 @@
guint32 *flags;
guint n_args;
- args = gtk_object_query_args(t,&flags,&n_args);
+ args = gtk_object_query_args (t, &flags, &n_args);
for (i = 0; i < n_args; i++)
- {
- props = Fcons (Fcons (intern (gtk_type_name(args[i].type)),
- intern (args[i].name)), props);
- }
+ props =
+ Fcons (Fcons
+ (INTERN_GTK_TEXT (gtk_type_name (args[i].type)),
+ INTERN_GTK_TEXT (args[i].name)),
+ props);
g_free (args);
g_free (flags);
@@ -1315,12 +1378,12 @@
for (j = query->nparams - 1; j >= 0; j--)
{
- params = Fcons (intern (gtk_type_name (query->params[j])), params);
+ params = Fcons (INTERN_GTK_TEXT (gtk_type_name (query->params[j])), params);
}
}
- signals = Fcons (Fcons (intern (gtk_type_name (query->return_val)),
- Fcons (intern (query->signal_name),
+ signals = Fcons (Fcons (INTERN_GTK_TEXT (gtk_type_name (query->return_val)),
+ Fcons (INTERN_GTK_TEXT (query->signal_name),
params)),
signals);
@@ -1347,9 +1410,11 @@
DEFSYMBOL_MULTIWORD_PREDICATE (Qemacs_gtk_objectp);
DEFSYMBOL_MULTIWORD_PREDICATE (Qemacs_gtk_boxedp);
DEFSYMBOL (Qvoid);
+#ifdef HAVE_SHLIB
DEFSUBR (Fdll_load);
DEFSUBR (Fgtk_import_function_internal);
DEFSUBR (Fgtk_import_variable_internal);
+#endif /* HAVE_SHLIB */
DEFSUBR (Fgtk_signal_connect);
DEFSUBR (Fgtk_call_function);
DEFSUBR (Fgtk_fundamental_type);
@@ -1384,13 +1449,13 @@
{
/* flag types */
case GTK_TYPE_CHAR:
- stderr_out ("char: %c\n", GTK_VALUE_CHAR (a));
+ stderr_out ("char: %d\n", GTK_VALUE_CHAR (a));
break;
case GTK_TYPE_UCHAR:
- stderr_out ("uchar: %c\n", GTK_VALUE_CHAR (a));
+ stderr_out ("uchar: %d\n", GTK_VALUE_CHAR (a));
break;
case GTK_TYPE_BOOL:
- stderr_out ("uchar: %s\n", GTK_VALUE_BOOL (a) ? "true" :
"false");
+ stderr_out ("bool: %s\n", GTK_VALUE_BOOL (a) ? "true" :
"false");
break;
case GTK_TYPE_INT:
stderr_out ("int: %d\n", GTK_VALUE_INT (a));
@@ -1411,7 +1476,7 @@
stderr_out ("double: %f\n", GTK_VALUE_DOUBLE (a));
break;
case GTK_TYPE_STRING:
- stderr_out ("string: %s\n", GTK_VALUE_STRING (a));
+ stderr_out ("string: %s\n", GTK_TEXT_TO_C_STRING (GTK_VALUE_STRING
(a)));
break;
case GTK_TYPE_ENUM:
case GTK_TYPE_FLAGS:
@@ -1419,9 +1484,13 @@
{
GtkEnumValue *vals = gtk_type_enum_get_values (a.type);
- while (vals && vals->value_name && (vals->value !=
GTK_VALUE_ENUM(a))) vals++;
-
- stderr_out ("%s\n", vals ? vals->value_name : "!!! UNKNOWN ENUM
VALUE !!!");
+ while (vals && vals->value_name &&
+ (vals->value != GTK_VALUE_ENUM (a)))
+ vals++;
+
+ stderr_out ("%s\n",
+ vals ? GTK_TEXT_TO_C_STRING (vals->value_name) :
+ "!!! UNKNOWN ENUM VALUE !!!");
}
break;
case GTK_TYPE_BOXED:
@@ -1445,7 +1514,9 @@
/* base type of the object system */
case GTK_TYPE_OBJECT:
if (GTK_VALUE_OBJECT (a))
- stderr_out ("object: %s\n", gtk_type_name (GTK_OBJECT_TYPE (GTK_VALUE_OBJECT
(a))));
+ stderr_out ("object: %s\n",
+ GTK_TEXT_TO_C_STRING
+ (gtk_type_name (GTK_OBJECT_TYPE (GTK_VALUE_OBJECT (a)))));
else
stderr_out ("object: NULL\n");
break;
@@ -1456,16 +1527,17 @@
}
#endif
-Lisp_Object gtk_type_to_lisp (GtkArg *arg)
+Lisp_Object
+gtk_type_to_lisp (GtkArg *arg)
{
switch (GTK_FUNDAMENTAL_TYPE (arg->type))
{
case GTK_TYPE_NONE:
return (Qnil);
case GTK_TYPE_CHAR:
- return (make_char (GTK_VALUE_CHAR (*arg)));
+ return (make_char (unicode_to_ichar (GTK_VALUE_CHAR (*arg), 0)));
case GTK_TYPE_UCHAR:
- return (make_char (GTK_VALUE_UCHAR (*arg)));
+ return (make_char (unicode_to_ichar (GTK_VALUE_UCHAR (*arg), 0)));
case GTK_TYPE_BOOL:
return (GTK_VALUE_BOOL (*arg) ? Qt : Qnil);
case GTK_TYPE_INT:
@@ -1481,16 +1553,14 @@
case GTK_TYPE_DOUBLE:
return (make_float (GTK_VALUE_DOUBLE (*arg)));
case GTK_TYPE_STRING:
- return (build_string (GTK_VALUE_STRING (*arg)));
+ return (build_ext_string (GTK_VALUE_STRING (*arg), Vgtk_text_encoding));
case GTK_TYPE_FLAGS:
return (flags_to_list (GTK_VALUE_FLAGS (*arg), arg->type));
case GTK_TYPE_ENUM:
return (enum_to_symbol (GTK_VALUE_ENUM (*arg), arg->type));
case GTK_TYPE_BOXED:
if (arg->type == GTK_TYPE_GDK_EVENT)
- {
- return (gdk_event_to_emacs_event((GdkEvent *) GTK_VALUE_BOXED (*arg)));
- }
+ return gdk_event_to_emacs_event ((GdkEvent *) GTK_VALUE_BOXED (*arg));
if (GTK_VALUE_BOXED (*arg))
return (build_gtk_boxed (GTK_VALUE_BOXED (*arg), arg->type));
@@ -1513,584 +1583,37 @@
return (Qnil);
case GTK_TYPE_CALLBACK:
- {
- Lisp_Object rval;
-
- rval = VOID_TO_LISP (GTK_VALUE_CALLBACK (*arg).data);
-
- return (rval);
- }
+ return VOID_TO_LISP (GTK_VALUE_CALLBACK (*arg).data);
default:
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF))
+ if (GTK_FUNDAMENTAL_TYPE_EQ (arg->type, GTK_TYPE_LISTOF))
{
if (!GTK_VALUE_POINTER (*arg))
return (Qnil);
else
- {
- return (xemacs_gtklist_to_list (arg));
- }
+ return (xemacs_gtklist_to_list (arg));
}
- stderr_out ("Do not know how to convert `%s' to lisp!\n",
gtk_type_name (arg->type));
+
+ stderr_out ("Do not know how to convert `%s' to lisp!\n",
+ GTK_TEXT_TO_C_STRING (gtk_type_name (arg->type)));
ABORT ();
}
/* This is chuck reminding GCC to... SHUT UP! */
return (Qnil);
}
-
-int lisp_to_gtk_type (Lisp_Object obj, GtkArg *arg)
-{
- switch (GTK_FUNDAMENTAL_TYPE (arg->type))
- {
- /* flag types */
- case GTK_TYPE_NONE:
- return (0);
- case GTK_TYPE_CHAR:
- {
- Ichar c;
-
- CHECK_CHAR_COERCE_INT (obj);
- c = XCHAR (obj);
- GTK_VALUE_CHAR (*arg) = c;
- }
- break;
- case GTK_TYPE_UCHAR:
- {
- Ichar c;
-
- CHECK_CHAR_COERCE_INT (obj);
- c = XCHAR (obj);
- GTK_VALUE_CHAR (*arg) = c;
- }
- break;
- case GTK_TYPE_BOOL:
- GTK_VALUE_BOOL (*arg) = NILP (obj) ? FALSE : TRUE;
- break;
- case GTK_TYPE_INT:
- case GTK_TYPE_UINT:
- if (NILP (obj) || EQ (Qt, obj))
- {
- /* For we are a kind mistress and allow sending t/nil for
- 1/0 to stupid GTK functions that say they take guint or
- gint in the header files, but actually treat it like a
- bool. *sigh*
- */
- GTK_VALUE_INT(*arg) = NILP (obj) ? 0 : 1;
- }
- else
- {
- CHECK_INT (obj);
- GTK_VALUE_INT(*arg) = XINT (obj);
- }
- break;
- case GTK_TYPE_LONG:
- case GTK_TYPE_ULONG:
- ABORT();
- case GTK_TYPE_FLOAT:
- CHECK_INT_OR_FLOAT (obj);
- GTK_VALUE_FLOAT(*arg) = extract_float (obj);
- break;
- case GTK_TYPE_DOUBLE:
- CHECK_INT_OR_FLOAT (obj);
- GTK_VALUE_DOUBLE(*arg) = extract_float (obj);
- break;
- case GTK_TYPE_STRING:
- if (NILP (obj))
- GTK_VALUE_STRING (*arg) = NULL;
- else
- {
- CHECK_STRING (obj);
- GTK_VALUE_STRING (*arg) = (char *) XSTRING_DATA (obj);
- }
- break;
- case GTK_TYPE_ENUM:
- case GTK_TYPE_FLAGS:
- /* Convert a lisp symbol to a GTK enum */
- GTK_VALUE_ENUM(*arg) = lisp_to_flag (obj, arg->type);
- break;
- case GTK_TYPE_BOXED:
- if (NILP (obj))
- {
- GTK_VALUE_BOXED(*arg) = NULL;
- }
- else if (GTK_BOXEDP (obj))
- {
- GTK_VALUE_BOXED(*arg) = XGTK_BOXED (obj)->object;
- }
- else if (arg->type == GTK_TYPE_STYLE)
- {
- obj = Ffind_face (obj);
- CHECK_FACE (obj);
- GTK_VALUE_BOXED(*arg) = face_to_style (obj);
- }
- else if (arg->type == GTK_TYPE_GDK_GC)
- {
- obj = Ffind_face (obj);
- CHECK_FACE (obj);
- GTK_VALUE_BOXED(*arg) = face_to_gc (obj);
- }
- else if (arg->type == GTK_TYPE_GDK_WINDOW)
- {
- if (GLYPHP (obj))
- {
- Lisp_Object window = Fselected_window (Qnil);
- Lisp_Object instance =
- glyph_image_instance (obj, window, ERROR_ME_DEBUG_WARN, 1);
- struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (instance);
-
- switch (XIMAGE_INSTANCE_TYPE (instance))
- {
- case IMAGE_TEXT:
- case IMAGE_POINTER:
- case IMAGE_SUBWINDOW:
- case IMAGE_NOTHING:
- GTK_VALUE_BOXED(*arg) = NULL;
- break;
-
- case IMAGE_MONO_PIXMAP:
- case IMAGE_COLOR_PIXMAP:
- GTK_VALUE_BOXED(*arg) = IMAGE_INSTANCE_GTK_PIXMAP (p);
- break;
- }
- }
- else if (GTK_OBJECTP (obj) && GTK_IS_WIDGET (XGTK_OBJECT (obj)->object))
- {
- GTK_VALUE_BOXED(*arg) = GTK_WIDGET (XGTK_OBJECT (obj))->window;
- }
- else
- {
- invalid_argument ("Don't know how to convert object to
GDK_WINDOW", obj);
- }
- break;
- }
- else if (arg->type == GTK_TYPE_GDK_COLOR)
- {
- if (COLOR_SPECIFIERP (obj))
- {
- /* If it is a specifier, we just convert it to an
- instance, and let the ifs below handle it.
- */
- obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
- }
-
- if (COLOR_INSTANCEP (obj))
- {
- /* Easiest one */
- GTK_VALUE_BOXED(*arg) = COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (obj));
- }
- else if (STRINGP (obj))
- {
- invalid_argument ("Please use a color specifier or instance, not a
string", obj);
- }
- else
- {
- invalid_argument ("Don't know how to convert to GdkColor", obj);
- }
- }
- else if (arg->type == GTK_TYPE_GDK_FONT)
- {
- if (SYMBOLP (obj))
- {
- /* If it is a symbol, we treat that as a face name */
- obj = Ffind_face (obj);
- }
-
- if (FACEP (obj))
- {
- /* If it is a face, we just grab the font specifier, and
- cascade down until we finally reach a FONT_INSTANCE
- */
- obj = Fget (obj, Qfont, Qnil);
- }
-
- if (FONT_SPECIFIERP (obj))
- {
- /* If it is a specifier, we just convert it to an
- instance, and let the ifs below handle it
- */
- obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
- }
-
- if (FONT_INSTANCEP (obj))
- {
- /* Easiest one */
- GTK_VALUE_BOXED(*arg) = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (obj));
- }
- else if (STRINGP (obj))
- {
- invalid_argument ("Please use a font specifier or instance, not a
string", obj);
- }
- else
- {
- invalid_argument ("Don't know how to convert to GdkColor", obj);
- }
- }
- else
- {
- /* Unknown type to convert to boxed */
- stderr_out ("Don't know how to convert to boxed!\n");
- GTK_VALUE_BOXED(*arg) = NULL;
- }
- break;
-
- case GTK_TYPE_POINTER:
- if (NILP (obj))
- GTK_VALUE_POINTER(*arg) = NULL;
- else
- GTK_VALUE_POINTER(*arg) = LISP_TO_VOID (obj);
- break;
-
- /* structured types */
- case GTK_TYPE_SIGNAL:
- case GTK_TYPE_ARGS: /* This we can do as a list of values */
- case GTK_TYPE_C_CALLBACK:
- case GTK_TYPE_FOREIGN:
- stderr_out ("Do not know how to convert `%s' from lisp!\n",
gtk_type_name (arg->type));
- return (-1);
-
-#if 0
- /* #### BILL! */
- /* This is not used, and does not work with union type */
- case GTK_TYPE_CALLBACK:
- {
- GUI_ID id;
-
- id = new_gui_id ();
- obj = Fcons (Qnil, obj); /* Empty data */
- obj = Fcons (make_int (id), obj);
-
- gcpro_popup_callbacks (id, obj);
-
- GTK_VALUE_CALLBACK(*arg).marshal = __internal_callback_marshal;
- GTK_VALUE_CALLBACK(*arg).data = (gpointer) obj;
- GTK_VALUE_CALLBACK(*arg).notify = __internal_callback_destroy;
- }
- break;
-#endif
- /* base type of the object system */
- case GTK_TYPE_OBJECT:
- if (NILP (obj))
- GTK_VALUE_OBJECT (*arg) = NULL;
- else
- {
- CHECK_GTK_OBJECT (obj);
- if (XGTK_OBJECT (obj)->alive_p)
- GTK_VALUE_OBJECT (*arg) = XGTK_OBJECT (obj)->object;
- else
- invalid_argument ("Attempting to pass dead object to GTK function",
obj);
- }
- break;
+#define GTK_CONVERT_NORMAL
+#include "ui-gtk-inc.c"
- default:
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_ARRAY))
- {
- if (NILP (obj))
- GTK_VALUE_POINTER(*arg) = NULL;
- else
- {
- xemacs_list_to_array (obj, arg);
- }
- }
- else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF))
- {
- if (NILP (obj))
- GTK_VALUE_POINTER(*arg) = NULL;
- else
- {
- xemacs_list_to_gtklist (obj, arg);
- }
- }
- else
- {
- stderr_out ("Do not know how to convert `%s' from lisp!\n",
gtk_type_name (arg->type));
- ABORT();
- }
- break;
- }
-
- return (0);
-}
-
/* Convert lisp types to GTK return types. This is identical to
lisp_to_gtk_type() except that the macro used to set the value is
different.
### There should be some way of combining these two functions.
*/
-int lisp_to_gtk_ret_type (Lisp_Object obj, GtkArg *arg)
-{
- switch (GTK_FUNDAMENTAL_TYPE (arg->type))
- {
- /* flag types */
- case GTK_TYPE_NONE:
- return (0);
- case GTK_TYPE_CHAR:
- {
- Ichar c;
-
- CHECK_CHAR_COERCE_INT (obj);
- c = XCHAR (obj);
- *(GTK_RETLOC_CHAR (*arg)) = c;
- }
- break;
- case GTK_TYPE_UCHAR:
- {
- Ichar c;
- CHECK_CHAR_COERCE_INT (obj);
- c = XCHAR (obj);
- *(GTK_RETLOC_CHAR (*arg)) = c;
- }
- break;
- case GTK_TYPE_BOOL:
- *(GTK_RETLOC_BOOL (*arg)) = NILP (obj) ? FALSE : TRUE;
- break;
- case GTK_TYPE_INT:
- case GTK_TYPE_UINT:
- if (NILP (obj) || EQ (Qt, obj))
- {
- /* For we are a kind mistress and allow sending t/nil for
- 1/0 to stupid GTK functions that say they take guint or
- gint in the header files, but actually treat it like a
- bool. *sigh*
- */
- *(GTK_RETLOC_INT(*arg)) = NILP (obj) ? 0 : 1;
- }
- else
- {
- CHECK_INT (obj);
- *(GTK_RETLOC_INT(*arg)) = XINT (obj);
- }
- break;
- case GTK_TYPE_LONG:
- case GTK_TYPE_ULONG:
- ABORT();
- case GTK_TYPE_FLOAT:
- CHECK_INT_OR_FLOAT (obj);
- *(GTK_RETLOC_FLOAT(*arg)) = extract_float (obj);
- break;
- case GTK_TYPE_DOUBLE:
- CHECK_INT_OR_FLOAT (obj);
- *(GTK_RETLOC_DOUBLE(*arg)) = extract_float (obj);
- break;
- case GTK_TYPE_STRING:
- if (NILP (obj))
- *(GTK_RETLOC_STRING (*arg)) = NULL;
- else
- {
- CHECK_STRING (obj);
- *(GTK_RETLOC_STRING (*arg)) = (char *) XSTRING_DATA (obj);
- }
- break;
- case GTK_TYPE_ENUM:
- case GTK_TYPE_FLAGS:
- /* Convert a lisp symbol to a GTK enum */
- *(GTK_RETLOC_ENUM(*arg)) = lisp_to_flag (obj, arg->type);
- break;
- case GTK_TYPE_BOXED:
- if (NILP (obj))
- {
- *(GTK_RETLOC_BOXED(*arg)) = NULL;
- }
- else if (GTK_BOXEDP (obj))
- {
- *(GTK_RETLOC_BOXED(*arg)) = XGTK_BOXED (obj)->object;
- }
- else if (arg->type == GTK_TYPE_STYLE)
- {
- obj = Ffind_face (obj);
- CHECK_FACE (obj);
- *(GTK_RETLOC_BOXED(*arg)) = face_to_style (obj);
- }
- else if (arg->type == GTK_TYPE_GDK_GC)
- {
- obj = Ffind_face (obj);
- CHECK_FACE (obj);
- *(GTK_RETLOC_BOXED(*arg)) = face_to_gc (obj);
- }
- else if (arg->type == GTK_TYPE_GDK_WINDOW)
- {
- if (GLYPHP (obj))
- {
- Lisp_Object window = Fselected_window (Qnil);
- Lisp_Object instance =
- glyph_image_instance (obj, window, ERROR_ME_DEBUG_WARN, 1);
- struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (instance);
-
- switch (XIMAGE_INSTANCE_TYPE (instance))
- {
- case IMAGE_TEXT:
- case IMAGE_POINTER:
- case IMAGE_SUBWINDOW:
- case IMAGE_NOTHING:
- *(GTK_RETLOC_BOXED(*arg)) = NULL;
- break;
-
- case IMAGE_MONO_PIXMAP:
- case IMAGE_COLOR_PIXMAP:
- *(GTK_RETLOC_BOXED(*arg)) = IMAGE_INSTANCE_GTK_PIXMAP (p);
- break;
- }
- }
- else if (GTK_OBJECTP (obj) && GTK_IS_WIDGET (XGTK_OBJECT (obj)->object))
- {
- *(GTK_RETLOC_BOXED(*arg)) = GTK_WIDGET (XGTK_OBJECT (obj))->window;
- }
- else
- {
- invalid_argument ("Don't know how to convert object to
GDK_WINDOW", obj);
- }
- break;
- }
- else if (arg->type == GTK_TYPE_GDK_COLOR)
- {
- if (COLOR_SPECIFIERP (obj))
- {
- /* If it is a specifier, we just convert it to an
- instance, and let the ifs below handle it.
- */
- obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
- }
-
- if (COLOR_INSTANCEP (obj))
- {
- /* Easiest one */
- *(GTK_RETLOC_BOXED(*arg)) = COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (obj));
- }
- else if (STRINGP (obj))
- {
- invalid_argument ("Please use a color specifier or instance, not a
string", obj);
- }
- else
- {
- invalid_argument ("Don't know how to convert to GdkColor", obj);
- }
- }
- else if (arg->type == GTK_TYPE_GDK_FONT)
- {
- if (SYMBOLP (obj))
- {
- /* If it is a symbol, we treat that as a face name */
- obj = Ffind_face (obj);
- }
-
- if (FACEP (obj))
- {
- /* If it is a face, we just grab the font specifier, and
- cascade down until we finally reach a FONT_INSTANCE
- */
- obj = Fget (obj, Qfont, Qnil);
- }
-
- if (FONT_SPECIFIERP (obj))
- {
- /* If it is a specifier, we just convert it to an
- instance, and let the ifs below handle it
- */
- obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
- }
-
- if (FONT_INSTANCEP (obj))
- {
- /* Easiest one */
- *(GTK_RETLOC_BOXED(*arg)) = FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (obj));
- }
- else if (STRINGP (obj))
- {
- invalid_argument ("Please use a font specifier or instance, not a
string", obj);
- }
- else
- {
- invalid_argument ("Don't know how to convert to GdkColor", obj);
- }
- }
- else
- {
- /* Unknown type to convert to boxed */
- stderr_out ("Don't know how to convert to boxed!\n");
- *(GTK_RETLOC_BOXED(*arg)) = NULL;
- }
- break;
-
- case GTK_TYPE_POINTER:
- if (NILP (obj))
- *(GTK_RETLOC_POINTER(*arg)) = NULL;
- else
- *(GTK_RETLOC_POINTER(*arg)) = LISP_TO_VOID (obj);
- break;
-
- /* structured types */
- case GTK_TYPE_SIGNAL:
- case GTK_TYPE_ARGS: /* This we can do as a list of values */
- case GTK_TYPE_C_CALLBACK:
- case GTK_TYPE_FOREIGN:
- stderr_out ("Do not know how to convert `%s' from lisp!\n",
gtk_type_name (arg->type));
- return (-1);
-
-#if 0
- /* #### BILL! */
- /* This is not used, and does not work with union type */
- case GTK_TYPE_CALLBACK:
- {
- GUI_ID id;
-
- id = new_gui_id ();
- obj = Fcons (Qnil, obj); /* Empty data */
- obj = Fcons (make_int (id), obj);
-
- gcpro_popup_callbacks (id, obj);
-
- *(GTK_RETLOC_CALLBACK(*arg)).marshal = __internal_callback_marshal;
- *(GTK_RETLOC_CALLBACK(*arg)).data = (gpointer) obj;
- *(GTK_RETLOC_CALLBACK(*arg)).notify = __internal_callback_destroy;
- }
- break;
-#endif
-
- /* base type of the object system */
- case GTK_TYPE_OBJECT:
- if (NILP (obj))
- *(GTK_RETLOC_OBJECT (*arg)) = NULL;
- else
- {
- CHECK_GTK_OBJECT (obj);
- if (XGTK_OBJECT (obj)->alive_p)
- *(GTK_RETLOC_OBJECT (*arg)) = XGTK_OBJECT (obj)->object;
- else
- invalid_argument ("Attempting to pass dead object to GTK function",
obj);
- }
- break;
-
- default:
- if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_ARRAY))
- {
- if (NILP (obj))
- *(GTK_RETLOC_POINTER(*arg)) = NULL;
- else
- {
- xemacs_list_to_array (obj, arg);
- }
- }
- else if (IS_XEMACS_GTK_FUNDAMENTAL_TYPE(arg->type, GTK_TYPE_LISTOF))
- {
- if (NILP (obj))
- *(GTK_RETLOC_POINTER(*arg)) = NULL;
- else
- {
- xemacs_list_to_gtklist (obj, arg);
- }
- }
- else
- {
- stderr_out ("Do not know how to convert `%s' from lisp!\n",
gtk_type_name (arg->type));
- ABORT();
- }
- break;
- }
-
- return (0);
-}
+#undef GTK_CONVERT_NORMAL
+#include "ui-gtk-inc.c"
/* This is used in glyphs-gtk.c as well */
static Lisp_Object
@@ -2100,7 +1623,8 @@
if (NILP (Venumeration_info))
{
- Venumeration_info = call2 (intern ("make-hashtable"), make_int (100),
Qequal);
+ Venumeration_info = make_lisp_hash_table (100, HASH_TABLE_NON_WEAK,
+ HASH_TABLE_EQUAL);
}
alist = Fgethash (make_int (t), Venumeration_info, Qnil);
@@ -2121,7 +1645,9 @@
if (NILP (alist))
{
- invalid_argument ("Unknown enumeration", build_string (gtk_type_name
(t)));
+ invalid_argument ("Unknown enumeration",
+ build_ext_string (gtk_type_name (t),
+ Vgtk_text_encoding));
}
value = Fassq (obj, alist);
@@ -2190,7 +1716,9 @@
if (NILP (alist))
{
- invalid_argument ("Unknown enumeration", build_string (gtk_type_name
(t)));
+ invalid_argument ("Unknown enumeration",
+ build_ext_string (gtk_type_name (t),
+ Vgtk_text_encoding));
}
cell = Frassq (make_int (value), alist);
1.14.4.1 +1 -0 XEmacs/xemacs/src/undo.c
Index: undo.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/undo.c,v
retrieving revision 1.14
retrieving revision 1.14.4.1
diff -u -r1.14 -r1.14.4.1
--- undo.c 2004/11/04 23:06:57 1.14
+++ undo.c 2005/02/15 01:21:21 1.14.4.1
@@ -178,6 +178,7 @@
void
record_change (struct buffer *b, Charbpos beg, Charcount length)
{
+ /* This function can GC */
record_delete (b, beg, length);
record_insert (b, beg, length);
}
1.25.2.1 +6 -2 XEmacs/xemacs/src/unicode.c
Index: unicode.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/unicode.c,v
retrieving revision 1.25
retrieving revision 1.25.2.1
diff -u -r1.25 -r1.25.2.1
--- unicode.c 2005/02/03 16:14:08 1.25
+++ unicode.c 2005/02/15 01:21:21 1.25.2.1
@@ -998,13 +998,17 @@
return ((int **) XCHARSET_TO_UNICODE_TABLE (charset))[c1 - 32][c2 - 32];
}
-static Ichar
+Ichar
unicode_to_ichar (int code, Lisp_Object_dynarr *charsets)
{
int u1, u2, u3, u4;
int code_levels;
int i;
- int n = Dynarr_length (charsets);
+ int n;
+
+ if (!charsets)
+ charsets = unicode_precedence_dynarr;
+ n = Dynarr_length (charsets);
type_checking_assert (code >= 0);
/* This shortcut depends on the representation of an Ichar, see text.c.
1.1.8.1 +3 -3 XEmacs/xemacs/src/window-impl.h
Index: window-impl.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window-impl.h,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -r1.1 -r1.1.8.1
--- window-impl.h 2002/06/20 21:18:49 1.1
+++ window-impl.h 2005/02/15 01:21:22 1.1.8.1
@@ -2,7 +2,7 @@
Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995
Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1996 Chuck Thompson.
This file is part of XEmacs.
@@ -268,10 +268,10 @@
#define WINDOW_WIDTH(w) ((w)->pixel_width)
#define WINDOW_TEXT_WIDTH(w) (WINDOW_TEXT_RIGHT (w) - WINDOW_TEXT_LEFT (w))
-#define WINDOW_HAS_MODELINE_P(w) (!NILP (w->has_modeline_p))
+#define WINDOW_MODELINE_VISIBLE_P(w) (!NILP (w->modeline_visible_p))
#define MODELINE_OFF_SHADOW_THICKNESS_ADJUSTED(win) \
- abs ((!WINDOW_HAS_MODELINE_P (win) \
+ abs ((!WINDOW_MODELINE_VISIBLE_P (win) \
? ((XINT (win->modeline_shadow_thickness) > 1) \
? XINT (win->modeline_shadow_thickness) - 1 \
: ((XINT (win->modeline_shadow_thickness) < -1) \
1.83.2.1 +35 -35 XEmacs/xemacs/src/window.c
Index: window.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/window.c,v
retrieving revision 1.83
retrieving revision 1.83.2.1
diff -u -r1.83 -r1.83.2.1
--- window.c 2005/02/03 16:14:08 1.83
+++ window.c 2005/02/15 01:21:22 1.83.2.1
@@ -1,7 +1,7 @@
/* Window creation, deletion and examination for XEmacs.
Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2002, 2003 Ben Wing.
Copyright (C) 1996 Chuck Thompson.
This file is part of XEmacs.
@@ -87,7 +87,7 @@
Lisp_Object Vvertical_divider_always_visible_p;
/* Whether a modeline should be displayed. */
-Lisp_Object Vhas_modeline_p;
+Lisp_Object Vmodeline_visible_p;
/* Thickness of shadow border around vertical dividers. */
Lisp_Object Vvertical_divider_shadow_thickness;
@@ -1033,7 +1033,7 @@
{
modeline_height = 0;
}
- else if (!WINDOW_HAS_MODELINE_P (w))
+ else if (!WINDOW_MODELINE_VISIBLE_P (w))
{
if (window_scrollbar_height (w))
modeline_height = 0;
@@ -1075,7 +1075,7 @@
modeline_height = (Dynarr_atp (dla, 0)->ascent +
Dynarr_atp (dla, 0)->descent);
else
- /* This should be an abort except I'm not yet 100%
+ /* This should be an ABORT except I'm not yet 100%
confident that it won't ever get hit (though I
haven't been able to trigger it). It is extremely
unlikely to cause any noticeable problem and even if
@@ -1693,7 +1693,7 @@
{
struct window *w = decode_window (window);
- return (WINDOW_HAS_MODELINE_P (w)) ? make_int ((int) w->modeline_hscroll) :
+ return (WINDOW_MODELINE_VISIBLE_P (w)) ? make_int ((int) w->modeline_hscroll) :
Qnil;
}
@@ -1707,7 +1707,7 @@
{
struct window *w = decode_window (window);
- if (WINDOW_HAS_MODELINE_P (w))
+ if (WINDOW_MODELINE_VISIBLE_P (w))
{
Charcount ncols;
@@ -1892,7 +1892,7 @@
&& EQ (w->buffer, Fcurrent_buffer ()))
Fgoto_char (pos, Qnil);
else
- set_marker_restricted (w->pointm[CURRENT_DISP], pos, w->buffer);
+ set_marker_restricted (w->pointm[CURRENT_DISP], XINT (pos), w->buffer);
MARK_POINT_CHANGED;
return pos;
@@ -1908,7 +1908,7 @@
struct window *w = decode_window (window);
CHECK_INT_COERCE_MARKER (pos);
- set_marker_restricted (w->start[CURRENT_DISP], pos, w->buffer);
+ set_marker_restricted (w->start[CURRENT_DISP], XINT (pos), w->buffer);
/* this is not right, but much easier than doing what is right. */
/* w->start_at_line_beg = 0; */
/* WTF is the above supposed to mean? GE */
@@ -2836,7 +2836,7 @@
/* Call to ABORT() added by Darryl Okahata (16 Nov. 2001),
at Ben's request, to catch any remaining bugs.
- If you find that XEmacs is aborting here, and you
+ If you find that XEmacs is ABORTing here, and you
need to be up and running ASAP, it should be safe to
comment out the following ABORT(), as long as you
leave the "break;" alone. */
@@ -3300,7 +3300,7 @@
device = XCAR (devcons);
frame_list = DEVICE_FRAME_LIST (XDEVICE (device));
- LIST_LOOP (tail, frame_list)
+ OLD_LIST_LOOP (tail, frame_list)
{
if ((NILP (frame_spec)
&& !EQ (XCAR (tail), DEVICE_SELECTED_FRAME (XDEVICE (device))))
@@ -3360,7 +3360,7 @@
CHECK_BUFFER (buffer);
GCPRO2 (window_list, buffer);
- LIST_LOOP (tail, window_list)
+ OLD_LIST_LOOP (tail, window_list)
{
Lisp_Object window = XCAR (tail);
if (!MINI_WINDOW_P (XWINDOW (window))
@@ -3636,7 +3636,7 @@
make_int (BUF_PT (XBUFFER (buffer))),
buffer);
set_marker_restricted (w->start[CURRENT_DISP],
- make_int (XBUFFER (buffer)->last_window_start),
+ XBUFFER (buffer)->last_window_start,
buffer);
#else
{
@@ -3650,15 +3650,15 @@
not a travesty since it always occurred when the window was
selected, meaning its value of point was ignored in favor of the
buffer's; but it tripped an assert() in unshow_buffer(). */
- set_marker_restricted (w->pointm[CURRENT_DISP], newpoint, buffer);
+ set_marker_restricted (w->pointm[CURRENT_DISP], XINT (newpoint), buffer);
if (EQ (wrap_window (w), Fselected_window (Qnil)))
Fgoto_char (newpoint, buffer); /* this will automatically clip to
accessible */
marker = Fgethash (buffer, w->saved_last_window_start_cache, Qnil);
set_marker_restricted (w->start[CURRENT_DISP],
!NILP (marker) ?
- make_int (marker_position (marker)) :
- make_int (XBUFFER (buffer)->last_window_start),
+ marker_position (marker) :
+ XBUFFER (buffer)->last_window_start,
buffer);
}
#endif
@@ -3791,9 +3791,9 @@
w = XWINDOW (window);
w->hscroll = 0;
w->modeline_hscroll = 0;
- set_marker_restricted (w->start[CURRENT_DISP], make_int (1), buf);
- set_marker_restricted (w->pointm[CURRENT_DISP], make_int (1), buf);
- set_marker_restricted (w->sb_point, make_int (1), buf);
+ set_marker_restricted (w->start[CURRENT_DISP], 1, buf);
+ set_marker_restricted (w->pointm[CURRENT_DISP], 1, buf);
+ set_marker_restricted (w->sb_point, 1, buf);
}
}
@@ -3980,7 +3980,7 @@
/* do this last (after the window is completely initialized and
the mirror-dirty flag is set) so that specifier recomputation
- caused as a result of this will work properly and not abort. */
+ caused as a result of this will work properly and not ABORT. */
Fset_window_buffer (new, o->buffer, Qt);
return new;
}
@@ -4571,7 +4571,7 @@
}
else
{
- set_marker_restricted (w->start[CURRENT_DISP], make_int (startp),
+ set_marker_restricted (w->start[CURRENT_DISP], startp,
w->buffer);
w->force_start = 1;
w->start_at_line_beg = beginning_of_line_p (b, startp);
@@ -4621,7 +4621,7 @@
}
else
{
- set_marker_restricted (w->start[CURRENT_DISP], make_int (startp),
+ set_marker_restricted (w->start[CURRENT_DISP], startp,
w->buffer);
w->force_start = 1;
w->start_at_line_beg = beginning_of_line_p (b, startp);
@@ -4684,8 +4684,7 @@
if (startp >= old_startp)
startp = vmotion (w, old_startp, -1, NULL);
- set_marker_restricted (w->start[CURRENT_DISP], make_int (startp),
- w->buffer);
+ set_marker_restricted (w->start[CURRENT_DISP], startp, w->buffer);
w->force_start = 1;
w->start_at_line_beg = beginning_of_line_p (b, startp);
MARK_WINDOWS_CHANGED (w);
@@ -5079,14 +5078,14 @@
struct window_stats
{
- int face;
- int glyph;
+ Bytecount face;
+ Bytecount glyph;
#ifdef HAVE_SCROLLBARS
- int scrollbar;
+ Bytecount scrollbar;
#endif
- int line_start;
- int other_redisplay;
- int other;
+ Bytecount line_start;
+ Bytecount other_redisplay;
+ Bytecount other;
};
static void
@@ -5168,7 +5167,8 @@
val = acons (Qother, make_int (stats.other), val);
val = Fcons (Qnil, val);
val = acons (Qactually_requested, make_int (ovstats.was_requested), val);
- val = acons (Qmalloc_overhead, make_int (ovstats.malloc_overhead), val);
+ val = acons (Qmalloc_overhead,
+ make_int ((Bytecount) ovstats.malloc_overhead), val);
val = acons (Qdynarr_overhead, make_int (ovstats.dynarr_overhead), val);
return Fnreverse (val);
@@ -5558,15 +5558,15 @@
modeline_shadow_thickness_changed,
0, 0, 0);
- DEFVAR_SPECIFIER ("has-modeline-p", &Vhas_modeline_p /*
+ DEFVAR_SPECIFIER ("modeline-visible-p", &Vmodeline_visible_p /*
*Whether the modeline should be displayed.
This is a specifier; use `set-specifier' to change it.
*/ );
- Vhas_modeline_p = Fmake_specifier (Qboolean);
- set_specifier_fallback (Vhas_modeline_p,
+ Vmodeline_visible_p = Fmake_specifier (Qboolean);
+ set_specifier_fallback (Vmodeline_visible_p,
list1 (Fcons (Qnil, Qt)));
- set_specifier_caching (Vhas_modeline_p,
- offsetof (struct window, has_modeline_p),
+ set_specifier_caching (Vmodeline_visible_p,
+ offsetof (struct window, modeline_visible_p),
/* #### It's strange that we need a special
flag to indicate that the shadow-thickness
has changed, but not one to indicate that
1.11.4.1 +2 -2 XEmacs/xemacs/src/winslots.h
Index: winslots.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/winslots.h,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -u -r1.11 -r1.11.4.1
--- winslots.h 2003/02/09 09:33:48 1.11
+++ winslots.h 2005/02/15 01:21:23 1.11.4.1
@@ -1,7 +1,7 @@
/* Definitions of marked slots in windows and window configs
Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
- Copyright (C) 1995, 1996, 2001, 2002 Ben Wing.
+ Copyright (C) 1995, 1996, 2001, 2002, 2003 Ben Wing.
Copyright (C) 1996 Chuck Thompson.
This file is part of XEmacs.
@@ -177,7 +177,7 @@
as recessed. */
WINDOW_SAVED_SLOT (modeline_shadow_thickness, EQ)
/* Non-nil means to display a modeline for the buffer. */
- WINDOW_SAVED_SLOT (has_modeline_p, EQ)
+ WINDOW_SAVED_SLOT (modeline_visible_p, EQ)
/* Thickness of vertical divider shadow, in pixels. If negative, draw as
recessed. */
WINDOW_SAVED_SLOT (vertical_divider_shadow_thickness, EQ)
1.1 XEmacs/xemacs/src/console-xlike.h
Index: console-xlike.h
===================================================================
/* Shared event code between X and GTK.
Copyright (C) 2003, 2005 Ben Wing.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
#ifndef INCLUDED_console_xlike_h_
#define INCLUDED_console_xlike_h_
#include <X11/Xlib.h>
struct xlike_event_key_data
{
int MetaMask, HyperMask, SuperMask, AltMask, ModeMask;
KeySym lock_interpretation;
XModifierKeymap *x_modifier_keymap;
KeySym *x_keysym_map;
int x_keysym_map_min_code;
int x_keysym_map_max_code;
int x_keysym_map_keysyms_per_code;
Lisp_Object x_keysym_map_hash_table;
};
void xlike_init_modifier_mapping (struct device *d,
struct xlike_event_key_data *xd);
void xlike_reset_key_mapping (struct device *d,
struct xlike_event_key_data *xd);
void xlike_reset_modifier_mapping (struct device *d,
struct xlike_event_key_data *xd);
void free_xlike_event_key_data (struct xlike_event_key_data *xd);
Lisp_Object xlike_keysym_to_emacs_keysym (long keysym, int simple_p);
#endif /* INCLUDED_console_xlike_h_ */
1.1 XEmacs/xemacs/src/event-xlike.c
Index: event-xlike.c
===================================================================
/* Shared event code between X and GTK.
Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
Copyright (C) 1995 Sun Microsystems, Inc.
Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
#include <config.h>
#include "lisp.h"
#include "charset.h"
#include "elhash.h"
#include "events.h"
#ifdef HAVE_GTK
#include "console-gtk-impl.h"
#include <gdk/gdkx.h>
#endif
/* Unfortunately GTK currently needs to use some X-specific stuff so we
can't conditionalize the following on HAVE_X_WINDOWS, like we should.
#### BILL!!! Fix this please! */
#include "console-x-impl.h"
#include "device-impl.h"
#include "toolbar-common.h"
Lisp_Object Qkey_mapping;
Lisp_Object Qsans_modifiers;
/************************************************************************/
/* keymap handling */
/************************************************************************/
/* X bogusly doesn't define the interpretations of any bits besides
ModControl, ModShift, and ModLock; so the Interclient Communication
Conventions Manual says that we have to bend over backwards to figure
out what the other modifier bits mean. According to ICCCM:
- Any keycode which is assigned ModControl is a "control" key.
- Any modifier bit which is assigned to a keycode which generates Meta_L
or Meta_R is the modifier bit meaning "meta". Likewise for Super,
Hyper,
etc.
- Any keypress event which contains ModControl in its state should be
interpreted as a "control" character.
- Any keypress event which contains a modifier bit in its state which is
generated by a keycode whose corresponding keysym is Meta_L or Meta_R
should be interpreted as a "meta" character. Likewise for Super, Hyper,
etc.
- It is illegal for a keysym to be associated with more than one modifier
bit.
This means that the only thing that emacs can reasonably interpret as a
"meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
one of the modifier bits Mod1-Mod5.
Unfortunately, many keyboards don't have Meta keys in their default
configuration. So, if there are no Meta keys, but there are "Alt" keys,
emacs will interpret Alt as Meta. If there are both Meta and Alt keys,
then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it
used to
mean "Symbol," but that just confused the hell out of way too many
people).
This works with the default configurations of the 19 keyboard-types I've
checked.
Emacs detects keyboard configurations which violate the above rules, and
prints an error message on the standard-error-output. (Perhaps it should
use a pop-up-window instead.)
*/
static Display *
xlike_device_to_display (struct device *d)
{
#ifdef HAVE_GTK
if (DEVICE_GTK_P (d))
return GDK_DISPLAY ();
#endif /* HAVE_GTK */
#ifdef HAVE_X_WINDOWS
if (DEVICE_GTK_P (d))
return DEVICE_X_DISPLAY (d);
#endif /* HAVE_X_WINDOWS */
ABORT ();
return NULL;
}
/* For every key on the keyboard that has a known character correspondence,
we define the ascii-character property of the keysym, and make the
default binding for the key be self-insert-command.
The following magic is basically intimate knowledge of X11/keysymdef.h.
The keysym mappings defined by X11 are based on the iso8859 standards,
except for Cyrillic and Greek.
In a non-Mule world, a user can still have a multi-lingual editor, by doing
(set-face-font "...-iso8859-2" (current-buffer))
for all their Latin-2 buffers, etc. */
static Lisp_Object
x_keysym_to_character (KeySym keysym)
{
#ifdef MULE
Lisp_Object charset = Qzero;
#define USE_CHARSET(var,cs) \
((var) = charset_by_leading_byte (LEADING_BYTE_##cs))
#else
#define USE_CHARSET(var,lb)
#endif /* MULE */
int code = 0;
if ((keysym & 0xff) < 0xa0)
return Qnil;
switch (keysym >> 8)
{
case 0: /* ASCII + Latin1 */
USE_CHARSET (charset, LATIN_ISO8859_1);
code = keysym & 0x7f;
break;
case 1: /* Latin2 */
USE_CHARSET (charset, LATIN_ISO8859_2);
code = keysym & 0x7f;
break;
case 2: /* Latin3 */
USE_CHARSET (charset, LATIN_ISO8859_3);
code = keysym & 0x7f;
break;
case 3: /* Latin4 */
USE_CHARSET (charset, LATIN_ISO8859_4);
code = keysym & 0x7f;
break;
case 4: /* Katakana */
USE_CHARSET (charset, KATAKANA_JISX0201);
if ((keysym & 0xff) > 0xa0)
code = keysym & 0x7f;
break;
case 5: /* Arabic */
USE_CHARSET (charset, ARABIC_ISO8859_6);
code = keysym & 0x7f;
break;
case 6: /* Cyrillic */
{
static unsigned char const cyrillic[] = /* 0x20 - 0x7f */
{0x00, 0x72, 0x73, 0x71, 0x74, 0x75, 0x76, 0x77,
0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x00, 0x7e, 0x7f,
0x70, 0x22, 0x23, 0x21, 0x24, 0x25, 0x26, 0x27,
0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x00, 0x2e, 0x2f,
0x6e, 0x50, 0x51, 0x66, 0x54, 0x55, 0x64, 0x53,
0x65, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e,
0x5f, 0x6f, 0x60, 0x61, 0x62, 0x63, 0x56, 0x52,
0x6c, 0x6b, 0x57, 0x68, 0x6d, 0x69, 0x67, 0x6a,
0x4e, 0x30, 0x31, 0x46, 0x34, 0x35, 0x44, 0x33,
0x45, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e,
0x3f, 0x4f, 0x40, 0x41, 0x42, 0x43, 0x36, 0x32,
0x4c, 0x4b, 0x37, 0x48, 0x4d, 0x49, 0x47, 0x4a};
USE_CHARSET (charset, CYRILLIC_ISO8859_5);
code = cyrillic[(keysym & 0x7f) - 0x20];
break;
}
case 7: /* Greek */
{
static unsigned char const greek[] = /* 0x20 - 0x7f */
{0x00, 0x36, 0x38, 0x39, 0x3a, 0x5a, 0x00, 0x3c,
0x3e, 0x5b, 0x00, 0x3f, 0x00, 0x00, 0x35, 0x2f,
0x00, 0x5c, 0x5d, 0x5e, 0x5f, 0x7a, 0x40, 0x7c,
0x7d, 0x7b, 0x60, 0x7e, 0x00, 0x00, 0x00, 0x00,
0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
0x50, 0x51, 0x53, 0x00, 0x54, 0x55, 0x56, 0x57,
0x58, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67,
0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
0x70, 0x71, 0x73, 0x72, 0x74, 0x75, 0x76, 0x77,
0x78, 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
USE_CHARSET (charset, GREEK_ISO8859_7);
code = greek[(keysym & 0x7f) - 0x20];
break;
}
case 8: /* Technical */
break;
case 9: /* Special */
break;
case 10: /* Publishing */
break;
case 11: /* APL */
break;
case 12: /* Hebrew */
USE_CHARSET (charset, HEBREW_ISO8859_8);
code = keysym & 0x7f;
break;
case 13: /* Thai */
/* #### This needs to deal with character composition. */
USE_CHARSET (charset, THAI_TIS620);
code = keysym & 0x7f;
break;
case 14: /* Korean Hangul */
break;
case 19: /* Latin 9 - ISO8859-15 - unsupported charset. */
break;
case 32: /* Currency */
break;
default:
break;
}
if (code == 0)
return Qnil;
#ifdef MULE
return make_char (make_ichar (charset, code, 0));
#else
return make_char (code + 0x80);
#endif
}
/* See comment near character_to_event().
*/
static void
maybe_define_x_key_as_self_inserting_character (KeySym keysym,
Lisp_Object symbol)
{
Lisp_Object character = x_keysym_to_character (keysym);
if (CHARP (character))
{
extern Lisp_Object Vcurrent_global_map;
extern Lisp_Object Qascii_character;
if (NILP (Flookup_key (Vcurrent_global_map, symbol, Qnil)))
{
Fput (symbol, Qascii_character, character);
Fdefine_key (Vcurrent_global_map, symbol, Qself_insert_command);
}
}
}
/* Currently, GDK keysyms are exactly like X keysyms. If this ever
changes, we should rewrite this, but currently there's no point. */
Lisp_Object
xlike_keysym_to_emacs_keysym (long keysym, int simple_p)
{
Ibyte *name;
if (keysym >= XK_exclam && keysym <= XK_asciitilde)
/* We must assume that the X keysym numbers for the ASCII graphic
characters are the same as their ASCII codes. */
return make_char (keysym);
switch (keysym)
{
/* These would be handled correctly by the default case, but by
special-casing them here we don't garbage a string or call
intern(). */
case XK_BackSpace: return QKbackspace;
case XK_Tab: return QKtab;
case XK_Linefeed: return QKlinefeed;
case XK_Return: return QKreturn;
case XK_Escape: return QKescape;
case XK_space: return QKspace;
case XK_Delete: return QKdelete;
case 0: return Qnil;
default:
if (simple_p) return Qnil;
name = NEW_EXTERNAL_TO_C_STRING (XKeysymToString (keysym),
Qx_keysym_encoding);
if (!name || !name[0])
/* This happens if there is a mismatch between the Xlib of
XEmacs and the Xlib of the X server...
Let's hard-code in some knowledge of common keysyms introduced
in recent X11 releases. Snarfed from X11/keysymdef.h
Probably we should add some stuff here for X11R6. */
switch (keysym)
{
case 0xFF95: return KEYSYM ("kp-home");
case 0xFF96: return KEYSYM ("kp-left");
case 0xFF97: return KEYSYM ("kp-up");
case 0xFF98: return KEYSYM ("kp-right");
case 0xFF99: return KEYSYM ("kp-down");
case 0xFF9A: return KEYSYM ("kp-prior");
case 0xFF9B: return KEYSYM ("kp-next");
case 0xFF9C: return KEYSYM ("kp-end");
case 0xFF9D: return KEYSYM ("kp-begin");
case 0xFF9E: return KEYSYM ("kp-insert");
case 0xFF9F: return KEYSYM ("kp-delete");
case 0x1005FF10: return KEYSYM ("SunF36"); /* labeled F11 */
case 0x1005FF11: return KEYSYM ("SunF37"); /* labeled F12 */
default:
{
Ascbyte buf[64];
sprintf (buf, "unknown-keysym-0x%X", (int) keysym);
return KEYSYM (buf);
}
}
/* If it's got a one-character name, that's good enough. */
if (!* (name + itext_ichar_len (name)))
return make_char (itext_ichar (name));
/* If it's in the "Keyboard" character set, downcase it.
The case of those keysyms is too totally random for us to
force anyone to remember them.
The case of the other character sets is significant, however.
*/
if ((((unsigned int) keysym) & (~0x1FF)) == ((unsigned int) 0xFE00))
{
Ibyte *buf, *s1;
IBYTE_STRING_TO_ALLOCA (name, buf);
for (s1 = buf; *s1; s1++)
if (*s1 == '_')
*s1 = '-';
return LISP_STRING_TO_KEYSYM (Fdowncase (build_intstring (buf),
Qnil));
}
return KEYSYM ((CIbyte *) name);
}
}
static void
xlike_has_keysym (KeySym keysym, Lisp_Object hash_table, int with_modifiers)
{
KeySym upper_lower[2];
int j;
if (keysym < 0x80) /* Optimize for ASCII keysyms */
return;
/* If you execute:
xmodmap -e 'keysym NN = scaron'
and then press (Shift scaron), X11 will return the different
keysym `Scaron', but `xmodmap -pke' might not even mention `Scaron'.
So we "register" both `scaron' and `Scaron'. */
#ifdef HAVE_XCONVERTCASE
XConvertCase (keysym, &upper_lower[0], &upper_lower[1]);
#else
upper_lower[0] = upper_lower[1] = keysym;
#endif
for (j = 0; j < (upper_lower[0] == upper_lower[1] ? 1 : 2); j++)
{
Extbyte *name = XKeysymToString (keysym);
keysym = upper_lower[j];
if (name)
{
/* X guarantees NAME to be in the Host Portable Character Encoding */
Lisp_Object sym = xlike_keysym_to_emacs_keysym (keysym, 0);
Lisp_Object new_value = with_modifiers ? Qt : Qsans_modifiers;
Lisp_Object old_value = Fgethash (sym, hash_table, Qnil);
if (! EQ (old_value, new_value)
&& ! (EQ (old_value, Qsans_modifiers) &&
EQ (new_value, Qt)))
{
maybe_define_x_key_as_self_inserting_character (keysym, sym);
Fputhash (build_ext_string (name, Qx_keysym_encoding), new_value,
hash_table);
Fputhash (sym, new_value, hash_table);
}
}
}
}
void
xlike_reset_key_mapping (struct device *d, struct xlike_event_key_data *xd)
{
KeySym *keysym, *keysym_end;
Lisp_Object hash_table;
int key_code_count, keysyms_per_code;
Display *display = xlike_device_to_display (d);
if (xd->x_keysym_map)
XFree ((char *) xd->x_keysym_map);
XDisplayKeycodes (display,
&xd->x_keysym_map_min_code,
&xd->x_keysym_map_max_code);
key_code_count = xd->x_keysym_map_max_code - xd->x_keysym_map_min_code + 1;
xd->x_keysym_map =
(KeySym *)
XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count,
&xd->x_keysym_map_keysyms_per_code);
hash_table = xd->x_keysym_map_hash_table;
if (HASH_TABLEP (hash_table))
Fclrhash (hash_table);
else
xd->x_keysym_map_hash_table = hash_table =
make_lisp_hash_table (128, HASH_TABLE_NON_WEAK, HASH_TABLE_EQUAL);
for (keysym = xd->x_keysym_map,
keysyms_per_code = xd->x_keysym_map_keysyms_per_code,
keysym_end = keysym + (key_code_count * keysyms_per_code);
keysym < keysym_end;
keysym += keysyms_per_code)
{
int j;
if (keysym[0] == NoSymbol)
continue;
xlike_has_keysym (keysym[0], hash_table, 0);
for (j = 1; j < keysyms_per_code; j++)
{
if (keysym[j] != keysym[0] &&
keysym[j] != NoSymbol)
xlike_has_keysym (keysym[j], hash_table, 1);
}
}
}
static const char *
index_to_name (int indice)
{
switch (indice)
{
case ShiftMapIndex: return "ModShift";
case LockMapIndex: return "ModLock";
case ControlMapIndex: return "ModControl";
case Mod1MapIndex: return "Mod1";
case Mod2MapIndex: return "Mod2";
case Mod3MapIndex: return "Mod3";
case Mod4MapIndex: return "Mod4";
case Mod5MapIndex: return "Mod5";
default: return "???";
}
}
/* Boy, I really wish C had local functions... */
struct c_doesnt_have_closures /* #### not yet used */
{
int warned_about_overlapping_modifiers;
int warned_about_predefined_modifiers;
int warned_about_duplicate_modifiers;
int meta_bit;
int hyper_bit;
int super_bit;
int alt_bit;
int mode_bit;
};
void
xlike_reset_modifier_mapping (struct device *d,
struct xlike_event_key_data *xd)
{
int modifier_index, modifier_key, column, mkpm;
int warned_about_overlapping_modifiers = 0;
int warned_about_predefined_modifiers = 0;
int warned_about_duplicate_modifiers = 0;
int meta_bit = 0;
int hyper_bit = 0;
int super_bit = 0;
int alt_bit = 0;
int mode_bit = 0;
Display *display = xlike_device_to_display (d);
xd->lock_interpretation = 0;
if (xd->x_modifier_keymap)
XFreeModifiermap (xd->x_modifier_keymap);
xlike_reset_key_mapping (d, xd);
xd->x_modifier_keymap = (XModifierKeymap *) XGetModifierMapping (display);
/* Boy, I really wish C had local functions...
*/
/* The call to warn_when_safe must be on the same line as the string or
make-msgfile won't pick it up properly (the newline doesn't confuse
it, but the backslash does). */
#define modwarn(name,old,other) \
warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s, which
is generated by %s.", \
name, code, index_to_name (old), other), \
warned_about_overlapping_modifiers = 1
#define modbarf(name,other) \
warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s, which
is nonsensical.", \
name, code, other), \
warned_about_predefined_modifiers = 1
#define check_modifier(name,mask) \
if ((1<<modifier_index) != mask) \
warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates %s, which
is nonsensical.", \
name, code, index_to_name (modifier_index)), \
warned_about_predefined_modifiers = 1
#define store_modifier(name,old) \
if (old && old != modifier_index) \
warn_when_safe (Qkey_mapping, Qwarning, "XEmacs: %s (0x%x) generates both %s
and %s, which is nonsensical.",\
name, code, index_to_name (old), \
index_to_name (modifier_index)), \
warned_about_duplicate_modifiers = 1; \
if (modifier_index == ShiftMapIndex) modbarf (name,"ModShift"); \
else if (modifier_index == LockMapIndex) modbarf (name,"ModLock"); \
else if (modifier_index == ControlMapIndex) modbarf (name,"ModControl"); \
else if (sym == XK_Mode_switch) \
mode_bit = modifier_index; /* Mode_switch is special, see below... */ \
else if (modifier_index == meta_bit && old != meta_bit) \
modwarn (name, meta_bit, "Meta"); \
else if (modifier_index == super_bit && old != super_bit) \
modwarn (name, super_bit, "Super"); \
else if (modifier_index == hyper_bit && old != hyper_bit) \
modwarn (name, hyper_bit, "Hyper"); \
else if (modifier_index == alt_bit && old != alt_bit) \
modwarn (name, alt_bit, "Alt"); \
else \
old = modifier_index;
mkpm = (xd->x_modifier_keymap)->max_keypermod;
for (modifier_index = 0; modifier_index < 8; modifier_index++)
for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
KeySym last_sym = 0;
for (column = 0; column < 4; column += 2) {
KeyCode code =
(xd->x_modifier_keymap)
->modifiermap[modifier_index * mkpm + modifier_key];
KeySym sym = (code ? XKeycodeToKeysym (display, code, column) : 0);
if (sym == last_sym) continue;
last_sym = sym;
switch (sym) {
case XK_Mode_switch:store_modifier ("Mode_switch", mode_bit); break;
case XK_Meta_L: store_modifier ("Meta_L", meta_bit); break;
case XK_Meta_R: store_modifier ("Meta_R", meta_bit); break;
case XK_Super_L: store_modifier ("Super_L", super_bit); break;
case XK_Super_R: store_modifier ("Super_R", super_bit); break;
case XK_Hyper_L: store_modifier ("Hyper_L", hyper_bit); break;
case XK_Hyper_R: store_modifier ("Hyper_R", hyper_bit); break;
case XK_Alt_L: store_modifier ("Alt_L", alt_bit); break;
case XK_Alt_R: store_modifier ("Alt_R", alt_bit); break;
case XK_Control_L: check_modifier ("Control_L", ControlMask); break;
case XK_Control_R: check_modifier ("Control_R", ControlMask); break;
case XK_Shift_L: check_modifier ("Shift_L", ShiftMask); break;
case XK_Shift_R: check_modifier ("Shift_R", ShiftMask); break;
case XK_Shift_Lock: check_modifier ("Shift_Lock", LockMask);
xd->lock_interpretation = XK_Shift_Lock; break;
case XK_Caps_Lock: check_modifier ("Caps_Lock", LockMask);
xd->lock_interpretation = XK_Caps_Lock; break;
/* It probably doesn't make any sense for a modifier bit to be
assigned to a key that is not one of the above, but OpenWindows
assigns modifier bits to a couple of random function keys for
no reason that I can discern, so printing a warning here would
be annoying. */
}
}
}
#undef store_modifier
#undef check_modifier
#undef modwarn
#undef modbarf
/* If there was no Meta key, then try using the Alt key instead.
If there is both a Meta key and an Alt key, then the Alt key
is not disturbed and remains an Alt key. */
if (! meta_bit && alt_bit)
meta_bit = alt_bit, alt_bit = 0;
/* mode_bit overrides everything, since it's processed down inside of
XLookupString() instead of by us. If Meta and Mode_switch both
generate the same modifier bit (which is an error), then we don't
interpret that bit as Meta, because we can't make XLookupString()
not interpret it as Mode_switch; and interpreting it as both would
be totally wrong. */
if (mode_bit)
{
const char *warn = 0;
if (mode_bit == meta_bit) warn = "Meta", meta_bit = 0;
else if (mode_bit == hyper_bit) warn = "Hyper", hyper_bit = 0;
else if (mode_bit == super_bit) warn = "Super", super_bit = 0;
else if (mode_bit == alt_bit) warn = "Alt", alt_bit = 0;
if (warn)
{
warn_when_safe
(Qkey_mapping, Qwarning,
"XEmacs: %s is being used for both Mode_switch and %s.",
index_to_name (mode_bit), warn),
warned_about_overlapping_modifiers = 1;
}
}
#undef index_to_name
xd->MetaMask = (meta_bit ? (1 << meta_bit) : 0);
xd->HyperMask = (hyper_bit ? (1 << hyper_bit) : 0);
xd->SuperMask = (super_bit ? (1 << super_bit) : 0);
xd->AltMask = (alt_bit ? (1 << alt_bit) : 0);
xd->ModeMask = (mode_bit ? (1 << mode_bit) : 0); /* unused */
if (warned_about_overlapping_modifiers)
warn_when_safe (Qkey_mapping, Qwarning, "\n"
" Two distinct modifier keys (such as Meta and Hyper) cannot generate\n"
" the same modifier bit, because Emacs won't be able to tell which\n"
" modifier was actually held down when some other key is pressed. It\n"
" won't be able to tell Meta-x and Hyper-x apart, for example. Change\n"
" one of these keys to use some other modifier bit. If you intend for\n"
" these keys to have the same behavior, then change them to have the\n"
" same keysym as well as the same modifier bit.");
if (warned_about_predefined_modifiers)
warn_when_safe (Qkey_mapping, Qwarning, "\n"
" The semantics of the modifier bits ModShift, ModLock, and ModControl\n"
" are predefined. It does not make sense to assign ModControl to any\n"
" keysym other than Control_L or Control_R, or to assign any modifier\n"
" bits to the \"control\" keysyms other than ModControl. You
can't\n"
" turn a \"control\" key into a \"meta\" key (or vice versa) by
simply\n"
" assigning the key a different modifier bit. You must also make that\n"
" key generate an appropriate keysym (Control_L, Meta_L, etc).");
/* No need to say anything more for warned_about_duplicate_modifiers. */
if (warned_about_overlapping_modifiers || warned_about_predefined_modifiers)
warn_when_safe (Qkey_mapping, Qwarning, "\n"
" The meanings of the modifier bits Mod1 through Mod5 are determined\n"
" by the keysyms used to control those bits. Mod1 does NOT always\n"
" mean Meta, although some non-ICCCM-compliant programs assume that.");
}
void
xlike_init_modifier_mapping (struct device *d, struct xlike_event_key_data *xd)
{
xd->x_keysym_map_hash_table = Qnil;
xd->x_keysym_map = NULL;
xd->x_modifier_keymap = NULL;
xlike_reset_modifier_mapping (d, xd);
}
void
free_xlike_event_key_data (struct xlike_event_key_data *xd)
{
if (xd->x_modifier_keymap)
XFreeModifiermap (xd->x_modifier_keymap);
if (xd->x_keysym_map)
XFree ((char *) xd->x_keysym_map);
}
void
syms_of_event_xlike (void)
{
DEFSYMBOL (Qkey_mapping);
DEFSYMBOL (Qsans_modifiers);
}
1.1 XEmacs/xemacs/src/gccache-x.c
Index: gccache-x.c
===================================================================
/* Efficient caching of GCs (graphics contexts) -- shared code, X and GTK.
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
#define THIS_IS_X
#include "gccache-xlike-inc.c"
1.1 XEmacs/xemacs/src/gccache-xlike-inc.c
Index: gccache-xlike-inc.c
===================================================================
/* Efficient caching of GCs (graphics contexts) -- shared code, X and GTK.
Copyright (C) 1993 Free Software Foundation, Inc.
Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
Copyright (C) 2003, 2005 Ben Wing.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
/* Emacs uses a lot of different display attributes; for example, assume
that only four fonts are in use (normal, bold, italic, and bold-italic).
Then assume that one stipple or background is used for text selections,
and another is used for highlighting mousable regions. That makes 16
GCs already. Add in the fact that another GC may be needed to display
the text cursor in any of those regions, and you've got 32. Add in
more fonts, and it keeps increasing exponentially.
We used to keep these GCs in a cache of merged (fully qualified) faces.
However, a lot of other code in xterm.c used XChangeGC of existing GCs,
which is kind of slow and kind of random. Also, managing the face cache
was tricky because it was hard to know when a face was no longer visible
on the frame -- we had to mark all frames as garbaged whenever a face
was changed, which caused an unpleasant amount of flicker (since faces are
created/destroyed (= changed) whenever a frame is created/destroyed.
So this code maintains a cache at the GC level instead of at the face
level. There is an upper limit on the size of the cache, after which we
will stop creating GCs and start reusing them (reusing the least-recently-
used ones first). So if faces get changed, their GCs will eventually be
recycled. Also more sharing of GCs is possible.
This code uses hash tables. It could be that, if the cache size is small
enough, a linear search might be faster; but I doubt it, since we need
`equal' comparisons, not `eq', and I expect that the optimal cache size
will be ~100.
Written by jwz, 14 jun 93
Hacked by William Perry, apr 2000 for GTK and introduced code
duplication (a no-no)
Undid code duplication, Ben Wing, Jan 28, 2003.
*/
#include <config.h>
#include "lisp.h"
#include "hash.h"
#ifndef THIS_IS_GTK
#include <X11/Xlib.h>
#else /* THIS_IS_GTK */
#include <gtk/gtk.h>
#endif /* THIS_IS_GTK */
#define GC_CACHE_SIZE 100
#define GCCACHE_HASH
#ifndef THIS_IS_GTK
#define ZZGCVALUES XGCValues
#define ZZGC GC
#define ZZ(z) x_##z
#else
#define ZZGCVALUES GdkGCValues
#define ZZGC GdkGC *
#define ZZ(z) gtk_##z
#endif
struct gcv_and_mask {
ZZGCVALUES gcv;
unsigned long mask;
};
struct gc_cache_cell {
ZZGC gc;
struct gcv_and_mask gcvm;
struct gc_cache_cell *prev, *next;
};
struct gc_cache {
#ifndef THIS_IS_GTK
Display *dpy; /* used only as arg to XCreateGC/XFreeGC */
Window window; /* used only as arg to XCreateGC */
#else /* THIS_IS_GTK */
GdkWindow *window; /* used only as arg to XCreateGC */
#endif /* THIS_IS_GTK */
int size;
struct gc_cache_cell *head;
struct gc_cache_cell *tail;
#ifdef GCCACHE_HASH
struct hash_table *table;
#endif
int create_count;
int delete_count;
};
#ifdef GCCACHE_HASH
static Hashcode
gc_cache_hash (const void *arg)
{
const struct gcv_and_mask *gcvm = (const struct gcv_and_mask *) arg;
unsigned long *longs = (unsigned long *) &gcvm->gcv;
Hashcode hash = gcvm->mask;
int i;
/* This could look at the mask and only use the used slots in the
hash code. That would win in that we wouldn't have to initialize
every slot of the gcv when calling gc_cache_lookup. But we need
the hash function to be as fast as possible; some timings should
be done. */
for (i = 0; i < (int) (sizeof (ZZGCVALUES) /
sizeof (unsigned long)); i++)
hash = (hash << 1) ^ *longs++;
return hash;
}
#endif /* GCCACHE_HASH */
static int
gc_cache_eql (const void *arg1, const void *arg2)
{
/* See comment in gc_cache_hash */
#ifndef THIS_IS_GTK
return !memcmp (arg1, arg2, sizeof (struct gcv_and_mask));
#else /* THIS_IS_GTK */
const struct gcv_and_mask *gcvm1 = (const struct gcv_and_mask *) arg1;
const struct gcv_and_mask *gcvm2 = (const struct gcv_and_mask *) arg2;
return !memcmp (&gcvm1->gcv, &gcvm2->gcv, sizeof (gcvm1->gcv))
&& gcvm1->mask == gcvm2->mask;
#endif /* THIS_IS_GTK */
}
struct gc_cache *
#ifndef THIS_IS_GTK
ZZ (make_gc_cache) (Display *dpy, Window window)
#else /* THIS_IS_GTK */
ZZ (make_gc_cache) (GtkWidget *widget)
#endif /* THIS_IS_GTK */
{
struct gc_cache *cache = xnew (struct gc_cache);
#ifndef THIS_IS_GTK
cache->dpy = dpy;
cache->window = window;
#else /* THIS_IS_GTK */
cache->window = widget->window;
#endif /* THIS_IS_GTK */
cache->size = 0;
cache->head = cache->tail = 0;
cache->create_count = cache->delete_count = 0;
#ifdef GCCACHE_HASH
cache->table =
make_general_hash_table (GC_CACHE_SIZE, gc_cache_hash, gc_cache_eql);
#endif
return cache;
}
void
ZZ (free_gc_cache) (struct gc_cache *cache)
{
struct gc_cache_cell *rest, *next;
rest = cache->head;
while (rest)
{
#ifndef THIS_IS_GTK
XFreeGC (cache->dpy, rest->gc);
#else /* THIS_IS_GTK */
gdk_gc_destroy (rest->gc);
#endif /* THIS_IS_GTK */
next = rest->next;
xfree (rest, struct gc_cache_cell *);
rest = next;
}
#ifdef GCCACHE_HASH
free_hash_table (cache->table);
#endif
xfree (cache, struct gc_cache *);
}
ZZGC
ZZ (gc_cache_lookup) (struct gc_cache *cache, ZZGCVALUES *gcv, unsigned long mask)
{
struct gc_cache_cell *cell, *next, *prev;
struct gcv_and_mask gcvm;
if ((!!cache->head) != (!!cache->tail)) ABORT ();
if (cache->head && (cache->head->prev || cache->tail->next))
ABORT ();
#ifdef THIS_IS_GTK
/* Gdk does not have the equivalent of 'None' for the clip_mask, so
we need to check it carefully, or gdk_gc_new_with_values will
coredump */
if ((mask & GDK_GC_CLIP_MASK) && !gcv->clip_mask)
mask = (GdkGCValuesMask) (mask & ~GDK_GC_CLIP_MASK);
#endif /* THIS_IS_GTK */
gcvm.mask = mask;
gcvm.gcv = *gcv; /* this copies... */
#ifdef GCCACHE_HASH
if (gethash (&gcvm, cache->table, (const void **) &cell))
#else /* !GCCACHE_HASH */
cell = cache->tail; /* start at the end (most recently used) */
while (cell)
{
if (gc_cache_eql (&gcvm, &cell->gcvm))
break;
else
cell = cell->prev;
}
/* #### This whole file needs some serious overhauling. */
#ifndef THIS_IS_GTK
if (!(mask | GCTile) && cell->gc->values.tile)
#else /* THIS_IS_GTK */
if (!(mask | GDK_GC_TILE) && cell->gcvm.gcv.tile)
#endif /* THIS_IS_GTK */
cell = 0;
#ifndef THIS_IS_GTK
else if (!(mask | GCStipple) && cell->gc->values.stipple)
#else /* THIS_IS_GTK */
else if (!(mask | GDK_GC_STIPPLE) && cell->gcvm.gcv.stipple)
#endif /* THIS_IS_GTK */
cell = 0;
if (cell)
#endif /* !GCCACHE_HASH */
{
/* Found a cell. Move this cell to the end of the list, so that it
will be less likely to be collected than a cell that was accessed
less recently.
*/
if (cell == cache->tail)
return cell->gc;
next = cell->next;
prev = cell->prev;
if (prev) prev->next = next;
if (next) next->prev = prev;
if (cache->head == cell) cache->head = next;
cell->next = 0;
cell->prev = cache->tail;
cache->tail->next = cell;
cache->tail = cell;
if (cache->head == cell) ABORT ();
if (cell->next) ABORT ();
if (cache->head->prev) ABORT ();
if (cache->tail->next) ABORT ();
return cell->gc;
}
/* else, cache miss. */
if (cache->size == GC_CACHE_SIZE)
/* Reuse the first cell on the list (least-recently-used).
Remove it from the list, and unhash it from the table.
*/
{
cell = cache->head;
cache->head = cell->next;
cache->head->prev = 0;
if (cache->tail == cell) cache->tail = 0; /* only one */
#ifndef THIS_IS_GTK
XFreeGC (cache->dpy, cell->gc);
#else /* THIS_IS_GTK */
gdk_gc_destroy (cell->gc);
#endif /* THIS_IS_GTK */
cache->delete_count++;
#ifdef GCCACHE_HASH
remhash (&cell->gcvm, cache->table);
#endif
}
else if (cache->size > GC_CACHE_SIZE)
ABORT ();
else
{
/* Allocate a new cell (don't put it in the list or table yet). */
cell = xnew (struct gc_cache_cell);
cache->size++;
}
/* Now we've got a cell (new or reused). Fill it in. */
memcpy (&cell->gcvm.gcv, gcv, sizeof (ZZGCVALUES));
cell->gcvm.mask = mask;
/* Put the cell on the end of the list. */
cell->next = 0;
cell->prev = cache->tail;
if (cache->tail) cache->tail->next = cell;
cache->tail = cell;
if (! cache->head) cache->head = cell;
cache->create_count++;
#ifdef GCCACHE_HASH
/* Hash it in the table */
puthash (&cell->gcvm, cell, cache->table);
#endif
/* Now make and return the GC. */
#ifndef THIS_IS_GTK
cell->gc = XCreateGC (cache->dpy, cache->window, mask, gcv);
#else /* THIS_IS_GTK */
cell->gc = gdk_gc_new_with_values (cache->window, gcv, (GdkGCValuesMask) mask);
#endif /* THIS_IS_GTK */
/* debug */
assert (cell->gc == ZZ (gc_cache_lookup) (cache, gcv, mask));
return cell->gc;
}
#ifndef THIS_IS_GTK
#ifdef DEBUG_XEMACS
void x_describe_gc_cache (struct gc_cache *cache);
void
x_describe_gc_cache (struct gc_cache *cache)
{
int count = 0;
struct gc_cache_cell *cell = cache->head;
stderr_out ("\nsize: %d", cache->size);
stderr_out ("\ncreated: %d", cache->create_count);
stderr_out ("\ndeleted: %d", cache->delete_count);
while (cell)
{
struct gc_cache_cell *cell2;
int i = 0;
stderr_out ("\n%d:\t0x%lx GC: 0x%08lx hash: 0x%08lx\n",
count, (long) cell, (long) cell->gc, gc_cache_hash (&cell->gcvm));
for (cell2 = cache->head; cell2; cell2 = cell2->next, i++)
if (count != i &&
gc_cache_hash (&cell->gcvm) == gc_cache_hash (&cell2->gcvm))
stderr_out ("\tHASH COLLISION with cell %d\n", i);
stderr_out ("\tmask: %8lx\n", cell->gcvm.mask);
#define FROB(field) do { \
if ((int)cell->gcvm.gcv.field != (~0)) \
stderr_out ("\t%-12s%8x\n", #field ":",
(int)cell->gcvm.gcv.field); \
} while (0)
FROB (function);
FROB (plane_mask);
FROB (foreground);
FROB (background);
FROB (line_width);
FROB (line_style);
FROB (cap_style);
FROB (join_style);
FROB (fill_style);
FROB (fill_rule);
FROB (arc_mode);
FROB (tile);
FROB (stipple);
FROB (ts_x_origin);
FROB (ts_y_origin);
FROB (font);
FROB (subwindow_mode);
FROB (graphics_exposures);
FROB (clip_x_origin);
FROB (clip_y_origin);
FROB (clip_mask);
FROB (dash_offset);
#undef FROB
count++;
if (cell->next && cell == cache->tail)
stderr_out ("\nERROR! tail is here!\n\n");
else if (!cell->next && cell != cache->tail)
stderr_out ("\nERROR! tail is not at the end\n\n");
cell = cell->next;
}
if (count != cache->size)
stderr_out ("\nERROR! count should be %d\n\n", cache->size);
}
#endif /* DEBUG_XEMACS */
#endif /* ! THIS_IS_GTK */
1.1 XEmacs/xemacs/src/intl-gtk.c
Index: intl-gtk.c
===================================================================
/* GTK internationalization functions.
Copyright (C) 2003 Ben Wing.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
/* Authorship:
Current primary author: Ben Wing <ben(a)xemacs.org>
*/
#include <config.h>
#include "lisp.h"
#include "console-gtk.h"
/* As best as I can determine from reading the source code, all GTK strings
(gchar *) are UTF-8 in GTK V2, but locale-encoded in GTK V1.2. #### As
usual, the documentation on this is completely nonexistent. There may
well be different encodings for particular kinds of data, e.g. selection
data, drag-n-drop data, etc. --ben */
Lisp_Object Vgtk_text_encoding;
void
vars_of_intl_gtk (void)
{
staticpro (&Vgtk_text_encoding);
}
void
init_intl_gtk (void)
{
if (gtk_major_version >= 2)
Vgtk_text_encoding = Qutf_8;
else
Vgtk_text_encoding = Qnative;
}
1.1 XEmacs/xemacs/src/objects-xlike-inc.c
Index: objects-xlike-inc.c
===================================================================
/* Include file for common code, X and GTK colors and fonts.
Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Copyright (C) 1995 Board of Trustees, University of Illinois.
Copyright (C) 1995 Tinker Systems.
Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing.
Copyright (C) 1995 Sun Microsystems, Inc.
This file is part of XEmacs.
XEmacs is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any
later version.
XEmacs is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with XEmacs; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/* Synched up with: Not in FSF. */
/* Authors: Jamie Zawinski, Chuck Thompson, Ben Wing */
/* Extracted from objects-x.c, objects-gtk.c 2-13-05.
NOTE: There is an advantage to having the code coalesced this way
even when there is a fair amount of difference between the two versions,
provided that they are still parallel -- having them side by side ensures
that logic changes in one are propagated to the other, preventing bit-rot
--ben
*/
#ifndef THIS_IS_GTK
#define ZZCOLOR_TYPE XColor
#define ZZCOLOR_INSTANCE(name) COLOR_INSTANCE_X_##name
#define ZZ(z) x_##z
#define ZZEND(z) z##_x
#define ZZCONSOLE_HAS_METHOD(name) CONSOLE_HAS_METHOD (x, name)
#define UNUSED_IF_GTK(arg) arg
#else
#define ZZCOLOR_TYPE GdkColor
#define ZZCOLOR_INSTANCE(name) COLOR_INSTANCE_GTK_##name
#define ZZ(z) gtk_##z
#define ZZEND(z) z##_gtk
#define ZZCONSOLE_HAS_METHOD(name) CONSOLE_HAS_METHOD (gtk, name)
#define UNUSED_IF_GTK(arg) UNUSED (arg)
#endif
/************************************************************************/
/* color instances */
/************************************************************************/
static int
ZZ (parse_nearest_color) (struct device *d, ZZCOLOR_TYPE *color,
Lisp_Object name, Error_Behavior errb)
{
#ifndef THIS_IS_GTK
Display *dpy = DEVICE_X_DISPLAY (d);
Colormap cmap = DEVICE_X_COLORMAP (d);
Visual *visual = DEVICE_X_VISUAL (d);
#else /* THIS_IS_GTK */
GdkColormap *cmap = DEVICE_GTK_COLORMAP (d);
GdkVisual *visual = DEVICE_GTK_VISUAL (d);
#endif /* THIS_IS_GTK */
int result;
xzero (*color);
#ifndef THIS_IS_GTK
result =
XParseColor (dpy, cmap,
NEW_LISP_STRING_TO_EXTERNAL (name, Qx_color_name_encoding),
color);
#else /* THIS_IS_GTK */
result = gdk_color_parse (LISP_STRING_TO_GTK_TEXT (name), color);
#endif /* THIS_IS_GTK */
if (!result)
{
maybe_signal_error (Qgui_error, "Unrecognized color",
name, Qcolor, errb);
return 0;
}
#ifndef THIS_IS_GTK
result = ZZ (allocate_nearest_color) (dpy, cmap, visual, color);
#else /* THIS_IS_GTK */
result = ZZ (allocate_nearest_color) (cmap, visual, color);
#endif /* THIS_IS_GTK */
if (!result)
{
maybe_signal_error (Qgui_error, "Couldn't allocate color",
name, Qcolor, errb);
return 0;
}
return result;
}
static int
ZZ (initialize_color_instance) (Lisp_Color_Instance *c, Lisp_Object name,
Lisp_Object device, Error_Behavior errb)
{
ZZCOLOR_TYPE color;
int result;
result = ZZ (parse_nearest_color) (XDEVICE (device), &color, name, errb);
if (!result)
return 0;
/* Don't allocate the data until we're sure that we will succeed,
or the finalize method may get fucked. */
c->data = xnew (struct ZZ (color_instance_data));
if (result == 3)
ZZCOLOR_INSTANCE (DEALLOC) (c) = 0;
else
ZZCOLOR_INSTANCE (DEALLOC) (c) = 1;
#ifndef THIS_IS_GTK
ZZCOLOR_INSTANCE (COLOR) (c) = color;
#else /* THIS_IS_GTK */
ZZCOLOR_INSTANCE (COLOR) (c) = gdk_color_copy (&color);
#endif /* THIS_IS_GTK */
return 1;
}
static void
ZZ (print_color_instance) (Lisp_Color_Instance *c,
Lisp_Object printcharfun,
int UNUSED (escapeflag))
{
#ifndef THIS_IS_GTK
XColor color = COLOR_INSTANCE_X_COLOR (c);
write_fmt_string (printcharfun, " %ld=(%X,%X,%X)",
color.pixel, color.red, color.green, color.blue);
#else /* THIS_IS_GTK */
GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c);
write_fmt_string (printcharfun, " %ld=(%X,%X,%X)",
color->pixel, color->red, color->green, color->blue);
#endif /* THIS_IS_GTK */
}
static void
ZZ (finalize_color_instance) (Lisp_Color_Instance *c)
{
if (c->data)
{
if (DEVICE_LIVE_P (XDEVICE (c->device)))
{
if (ZZCOLOR_INSTANCE (DEALLOC) (c))
{
#ifndef THIS_IS_GTK
XFreeColors (DEVICE_X_DISPLAY (XDEVICE (c->device)),
DEVICE_X_COLORMAP (XDEVICE (c->device)),
&COLOR_INSTANCE_X_COLOR (c).pixel, 1, 0);
#else /* THIS_IS_GTK */
gdk_colormap_free_colors (DEVICE_GTK_COLORMAP
(XDEVICE (c->device)),
COLOR_INSTANCE_GTK_COLOR (c), 1);
#endif /* THIS_IS_GTK */
}
#ifdef THIS_IS_GTK
gdk_color_free (COLOR_INSTANCE_GTK_COLOR (c));
#endif /* THIS_IS_GTK */
}
xfree (c->data, void *);
c->data = 0;
}
}
/* Color instances are equal if they resolve to the same color on the
screen (have the same RGB values). I imagine that
"same RGB values" == "same cell in the colormap." Arguably we
should
be comparing their names or pixel values instead. */
static int
ZZ (color_instance_equal) (Lisp_Color_Instance *c1,
Lisp_Color_Instance *c2,
int UNUSED (depth))
{
#ifndef THIS_IS_GTK
XColor color1 = COLOR_INSTANCE_X_COLOR (c1);
XColor color2 = COLOR_INSTANCE_X_COLOR (c2);
return ((color1.red == color2.red) &&
(color1.green == color2.green) &&
(color1.blue == color2.blue));
#else /* THIS_IS_GTK */
return (gdk_color_equal (COLOR_INSTANCE_GTK_COLOR (c1),
COLOR_INSTANCE_GTK_COLOR (c2)));
#endif /* THIS_IS_GTK */
}
static Hashcode
ZZ (color_instance_hash) (Lisp_Color_Instance *c, int UNUSED (depth))
{
#ifndef THIS_IS_GTK
XColor color = COLOR_INSTANCE_X_COLOR (c);
return HASH3 (color.red, color.green, color.blue);
#else /* THIS_IS_GTK */
return (gdk_color_hash (COLOR_INSTANCE_GTK_COLOR (c), NULL));
#endif /* THIS_IS_GTK */
}
static Lisp_Object
ZZ (color_instance_rgb_components) (Lisp_Color_Instance *c)
{
#ifndef THIS_IS_GTK
XColor color = COLOR_INSTANCE_X_COLOR (c);
return (list3 (make_int (color.red),
make_int (color.green),
make_int (color.blue)));
#else /* THIS_IS_GTK */
GdkColor *color = COLOR_INSTANCE_GTK_COLOR (c);
return (list3 (make_int (color->red),
make_int (color->green),
make_int (color->blue)));
#endif /* THIS_IS_GTK */
}
static int
ZZ (valid_color_name_p) (struct device *UNUSED_IF_GTK (d), Lisp_Object color)
{
#ifndef THIS_IS_GTK
XColor c;
Display *dpy = DEVICE_X_DISPLAY (d);
Colormap cmap = DEVICE_X_COLORMAP (d);
const Extbyte *extname;
LISP_STRING_TO_EXTERNAL (color, extname, Qx_color_name_encoding);
return XParseColor (dpy, cmap, extname, &c);
#else /* THIS_IS_GTK */
GdkColor c;
const Extbyte *extname;
LISP_STRING_TO_EXTERNAL (color, extname, Vgtk_text_encoding);
if (gdk_color_parse (extname, &c) != TRUE)
return 0;
return 1;
#endif /* THIS_IS_GTK */
}
static Lisp_Object
ZZ (color_list) (void)
{
#ifdef THIS_IS_GTK
/* #### BILL!!!
Is this correct? */
#endif /* THIS_IS_GTK */
return call0 (intern ("x-color-list-internal"));
}
/************************************************************************/
/* font instances */
/************************************************************************/
static int
ZZ (initialize_font_instance) (Lisp_Font_Instance *f,
Lisp_Object UNUSED (name),
Lisp_Object UNUSED_IF_GTK (device),
Error_Behavior errb)
{
XFontStruct *xf;
const Extbyte *extname;
#ifndef THIS_IS_GTK
Display *dpy = DEVICE_X_DISPLAY (XDEVICE (device));
LISP_STRING_TO_EXTERNAL (f->name, extname, Qx_font_name_encoding);
xf = XLoadQueryFont (dpy, extname);
if (!xf)
{
maybe_signal_error (Qgui_error, "Couldn't load font", f->name,
Qfont, errb);
return 0;
}
if (!xf->max_bounds.width)
{
/* yes, this has been known to happen. */
XFreeFont (dpy, xf);
maybe_signal_error (Qgui_error, "X font is too small", f->name,
Qfont,
errb);
return 0;
}
#else /* THIS_IS_GTK */
GdkFont *gf;
LISP_STRING_TO_EXTERNAL (f->name, extname, Vgtk_text_encoding);
gf = gdk_font_load (extname);
if (!gf)
{
maybe_signal_error (Qgui_error, "Couldn't load font", f->name,
Qfont, errb);
return 0;
}
xf = (XFontStruct *) GDK_FONT_XFONT (gf);
#endif /* THIS_IS_GTK */
/* Don't allocate the data until we're sure that we will succeed,
or the finalize method may get fucked. */
#ifndef THIS_IS_GTK
f->data = xnew (struct x_font_instance_data);
FONT_INSTANCE_X_FONT (f) = xf;
f->ascent = xf->ascent;
f->descent = xf->descent;
f->height = xf->ascent + xf->descent;
#else /* THIS_IS_GTK */
f->data = xnew (struct gtk_font_instance_data);
FONT_INSTANCE_GTK_FONT (f) = gf;
f->ascent = gf->ascent;
f->descent = gf->descent;
f->height = gf->ascent + gf->descent;
#endif /* THIS_IS_GTK */
/* Now let's figure out the width of the font */
{
/* following change suggested by Ted Phelps <phelps(a)dstc.edu.au> */
int def_char = 'n'; /*xf->default_char;*/
int byte1, byte2;
once_more:
byte1 = def_char >> 8;
byte2 = def_char & 0xFF;
if (xf->per_char)
{
/* Old versions of the R5 font server have garbage (>63k) as
def_char. 'n' might not be a valid character. */
if (byte1 < (int) xf->min_byte1 ||
byte1 > (int) xf->max_byte1 ||
byte2 < (int) xf->min_char_or_byte2 ||
byte2 > (int) xf->max_char_or_byte2)
f->width = 0;
else
f->width = xf->per_char[(byte1 - xf->min_byte1) *
(xf->max_char_or_byte2 -
xf->min_char_or_byte2 + 1) +
(byte2 - xf->min_char_or_byte2)].width;
}
else
f->width = xf->max_bounds.width;
/* Some fonts have a default char whose width is 0. This is no good.
If that's the case, first try 'n' as the default char, and if n has
0 width too (unlikely) then just use the max width. */
if (f->width == 0)
{
if (def_char == (int) xf->default_char)
f->width = xf->max_bounds.width;
else
{
def_char = xf->default_char;
goto once_more;
}
}
}
/* If all characters don't exist then there could potentially be
0-width characters lurking out there. Not setting this flag
trips an optimization that would make them appear to have width
to redisplay. This is bad. So we set it if not all characters
have the same width or if not all characters are defined.
*/
/* #### This sucks. There is a measurable performance increase
when using proportional width fonts if this flag is not set.
Unfortunately so many of the fucking X fonts are not fully
defined that we could almost just get rid of this damn flag and
make it an assertion. */
f->proportional_p = (xf->min_bounds.width != xf->max_bounds.width ||
(
#ifndef THIS_IS_GTK
x_handle_non_fully_specified_fonts &&
#else /* THIS_IS_GTK */
/* x_handle_non_fully_specified_fonts */ 0 &&
#endif /* THIS_IS_GTK */
!xf->all_chars_exist));
#if 0 /* THIS_IS_GTK */
f->width = gdk_char_width (gf, 'n');
f->proportional_p = (gdk_char_width (gf, '|') != gdk_char_width (gf,
'W'));
#endif
return 1;
}
static void
ZZ (print_font_instance) (Lisp_Font_Instance *f,
Lisp_Object printcharfun,
int UNUSED (escapeflag))
{
write_fmt_string (printcharfun, " 0x%lx",
#ifndef THIS_IS_GTK
(unsigned long) FONT_INSTANCE_X_FONT (f)->fid);
#else /* THIS_IS_GTK */
(unsigned long) gdk_font_id (FONT_INSTANCE_GTK_FONT (f)));
#endif /* THIS_IS_GTK */
}
static void
ZZ (finalize_font_instance) (Lisp_Font_Instance *f)
{
if (f->data)
{
if (DEVICE_LIVE_P (XDEVICE (f->device)))
{
#ifndef THIS_IS_GTK
XFreeFont (DEVICE_X_DISPLAY (XDEVICE (f->device)),
FONT_INSTANCE_X_FONT (f));
#else /* THIS_IS_GTK */
gdk_font_unref (FONT_INSTANCE_GTK_FONT (f));
#endif /* THIS_IS_GTK */
}
xfree (f->data, void *);
f->data = 0;
}
}
/* Unbounded, for sufficiently small values of infinity... */
#define MAX_FONT_COUNT 5000
#ifndef THIS_IS_GTK
static Lisp_Object x_font_truename (Display *dpy, Extbyte *name,
XFontStruct *font);
#else
Lisp_Object __get_gtk_font_truename (GdkFont *gdk_font, int expandp);
#endif
static Lisp_Object
ZZ (font_instance_truename) (Lisp_Font_Instance *f, Error_Behavior errb)
{
if (NILP (FONT_INSTANCE_TRUENAME (f)))
{
#ifndef THIS_IS_GTK
FONT_INSTANCE_TRUENAME (f) =
x_font_truename (DEVICE_X_DISPLAY (XDEVICE (f->device)),
NEW_LISP_STRING_TO_EXTERNAL
(f->name, Qx_font_name_encoding),
FONT_INSTANCE_X_FONT (f));
#else
FONT_INSTANCE_TRUENAME (f) =
__get_gtk_font_truename (FONT_INSTANCE_GTK_FONT (f), 1);
#endif /* THIS_IS_GTK */
if (NILP (FONT_INSTANCE_TRUENAME (f)))
{
Lisp_Object font_instance = wrap_font_instance (f);
maybe_signal_error (Qgui_error, "Couldn't determine font truename",
font_instance, Qfont, errb);
/* Ok, just this once, return the font name as the truename.
(This is only used by Fequal() right now.) */
return f->name;
}
}
return FONT_INSTANCE_TRUENAME (f);
}
#ifdef MULE
static int
ZZ (font_spec_matches_charset) (struct device *UNUSED (d), Lisp_Object charset,
const Ibyte *nonreloc, Lisp_Object reloc,
Bytecount offset, Bytecount length,
int stage)
{
if (stage)
return 0;
if (UNBOUNDP (charset))
return 1;
/* Hack! Short font names don't have the registry in them,
so we just assume the user knows what they're doing in the
case of ASCII. For other charsets, you gotta give the
long form; sorry buster.
*/
if (EQ (charset, Vcharset_ascii))
{
const Ibyte *the_nonreloc = nonreloc;
int i;
Bytecount the_length = length;
if (!the_nonreloc)
the_nonreloc = XSTRING_DATA (reloc);
fixup_internal_substring (nonreloc, reloc, offset, &the_length);
the_nonreloc += offset;
if (!memchr (the_nonreloc, '*', the_length))
{
for (i = 0;; i++)
{
const Ibyte *new_nonreloc = (const Ibyte *)
memchr (the_nonreloc, '-', the_length);
if (!new_nonreloc)
break;
new_nonreloc++;
the_length -= new_nonreloc - the_nonreloc;
the_nonreloc = new_nonreloc;
}
/* If it has less than 5 dashes, it's a short font.
Of course, long fonts always have 14 dashes or so, but short
fonts never have more than 1 or 2 dashes, so this is some
sort of reasonable heuristic. */
if (i < 5)
return 1;
}
}
return (fast_string_match (XCHARSET_REGISTRY (charset),
nonreloc, reloc, offset, length, 1,
ERROR_ME, 0) >= 0);
}
/* find a font spec that matches font spec FONT and also matches
(the registry of) CHARSET. */
static Lisp_Object
ZZ (find_charset_font) (Lisp_Object device, Lisp_Object font,
Lisp_Object charset, int stage)
{
#ifdef THIS_IS_GTK
/* #### copied from x_find_charset_font */
/* #### BILL!!! Try to make this go away eventually */
#endif /* THIS_IS_GTK */
Extbyte **names;
int count = 0;
Lisp_Object result = Qnil;
const Extbyte *patternext;
int i;
if (stage)
return Qnil;
LISP_STRING_TO_EXTERNAL (font, patternext, Qx_font_name_encoding);
names = XListFonts (
#ifndef THIS_IS_GTK
DEVICE_X_DISPLAY (XDEVICE (device)),
#else
GDK_DISPLAY (),
#endif
patternext, MAX_FONT_COUNT, &count);
/* #### This code seems awfully bogus -- mrb */
for (i = 0; i < count; i ++)
{
const Ibyte *intname;
Bytecount intlen;
EXTERNAL_TO_SIZED_C_STRING (names[i], intname, intlen,
Qx_font_name_encoding);
if (ZZ (font_spec_matches_charset) (XDEVICE (device), charset,
intname, Qnil, 0, -1, stage))
{
result = make_string (intname, intlen);
break;
}
}
if (names)
XFreeFontNames (names);
/* Check for a short font name. */
if (NILP (result)
&& ZZ (font_spec_matches_charset) (XDEVICE (device), charset, 0,
font, 0, -1, stage))
return font;
return result;
}
#endif /* MULE */
/************************************************************************/
/* initialization */
/************************************************************************/
void
ZZEND (console_type_create_objects) (void)
{
/* object methods */
ZZCONSOLE_HAS_METHOD (initialize_color_instance);
ZZCONSOLE_HAS_METHOD (print_color_instance);
ZZCONSOLE_HAS_METHOD (finalize_color_instance);
ZZCONSOLE_HAS_METHOD (color_instance_equal);
ZZCONSOLE_HAS_METHOD (color_instance_hash);
ZZCONSOLE_HAS_METHOD (color_instance_rgb_components);
ZZCONSOLE_HAS_METHOD (valid_color_name_p);
ZZCONSOLE_HAS_METHOD (color_list);
ZZCONSOLE_HAS_METHOD (initialize_font_instance);
ZZCONSOLE_HAS_METHOD (print_font_instance);
ZZCONSOLE_HAS_METHOD (finalize_font_instance);
ZZCONSOLE_HAS_METHOD (font_instance_truename);
ZZCONSOLE_HAS_METHOD (font_instance_properties);
ZZCONSOLE_HAS_METHOD (font_list);
#ifdef MULE
ZZCONSOLE_HAS_METHOD (find_charset_font);
ZZCONSOLE_HAS_METHOD (font_spec_matches_charset);
#endif
}
1.1 XEmacs/xemacs/src/ui-gtk-inc.c
Index: ui-gtk-inc.c
===================================================================
/* ui-gtk-inc.c
**
** Description: Include file for duplicated code in ui-gtk.c
**
** Created by: William M. Perry <wmperry(a)gnu.org>
** Copyright (c) 2000 William M. Perry <wmperry(a)gnu.org>
Copyright (c) 2003 Ben Wing.
**
*/
#undef GTK_LVALUE
#ifdef GTK_CONVERT_NORMAL
#define GTK_LVALUE(type) GTK_VALUE_##type (*arg)
#else
#define GTK_LVALUE(type) *(GTK_RETLOC_##type (*arg))
#endif
int
#ifdef GTK_CONVERT_NORMAL
lisp_to_gtk_type (Lisp_Object obj, GtkArg *arg)
#else
lisp_to_gtk_ret_type (Lisp_Object obj, GtkArg *arg)
#endif
{
switch (GTK_FUNDAMENTAL_TYPE (arg->type))
{
/* flag types */
case GTK_TYPE_NONE:
return (0);
case GTK_TYPE_CHAR:
case GTK_TYPE_UCHAR:
CHECK_CHAR_COERCE_INT (obj);
GTK_LVALUE (CHAR) = ichar_to_unicode (XCHAR (obj));
break;
case GTK_TYPE_BOOL:
GTK_LVALUE (BOOL) = NILP (obj) ? FALSE : TRUE;
break;
case GTK_TYPE_INT:
case GTK_TYPE_UINT:
if (NILP (obj) || EQ (Qt, obj))
{
/* For we are a kind mistress and allow sending t/nil for
1/0 to stupid GTK functions that say they take guint or
gint in the header files, but actually treat it like a
bool. *sigh*
*/
GTK_LVALUE (INT) = NILP (obj) ? 0 : 1;
}
else
{
CHECK_INT (obj);
GTK_LVALUE (INT) = XINT (obj);
}
break;
case GTK_TYPE_LONG:
case GTK_TYPE_ULONG:
ABORT ();
case GTK_TYPE_FLOAT:
CHECK_INT_OR_FLOAT (obj);
GTK_LVALUE (FLOAT) = extract_float (obj);
break;
case GTK_TYPE_DOUBLE:
CHECK_INT_OR_FLOAT (obj);
GTK_LVALUE (DOUBLE) = extract_float (obj);
break;
case GTK_TYPE_STRING:
if (NILP (obj))
GTK_LVALUE (STRING) = NULL;
else
{
CHECK_STRING (obj);
#ifdef GTK_CONVERT_NORMAL
LISP_STRING_TO_EXTERNAL_MALLOC (obj, GTK_LVALUE (STRING),
Vgtk_text_encoding);
#else
/* #### BILL!! Is this correct? It followed the old logic */
LISP_STRING_TO_EXTERNAL (obj, GTK_LVALUE (STRING),
Vgtk_text_encoding);
#endif
}
break;
case GTK_TYPE_ENUM:
case GTK_TYPE_FLAGS:
/* Convert a lisp symbol to a GTK enum */
GTK_LVALUE (ENUM) = lisp_to_flag (obj, arg->type);
break;
case GTK_TYPE_BOXED:
if (NILP (obj))
{
GTK_LVALUE (BOXED) = NULL;
}
else if (GTK_BOXEDP (obj))
{
GTK_LVALUE (BOXED) = XGTK_BOXED (obj)->object;
}
else if (arg->type == GTK_TYPE_STYLE)
{
obj = Ffind_face (obj);
CHECK_FACE (obj);
GTK_LVALUE (BOXED) = face_to_style (obj);
}
else if (arg->type == GTK_TYPE_GDK_GC)
{
obj = Ffind_face (obj);
CHECK_FACE (obj);
GTK_LVALUE (BOXED) = face_to_gc (obj);
}
else if (arg->type == GTK_TYPE_GDK_WINDOW)
{
if (GLYPHP (obj))
{
Lisp_Object window = Fselected_window (Qnil);
Lisp_Object instance =
glyph_image_instance (obj, window, ERROR_ME_DEBUG_WARN, 1);
struct Lisp_Image_Instance *p = XIMAGE_INSTANCE (instance);
switch (XIMAGE_INSTANCE_TYPE (instance))
{
case IMAGE_TEXT:
case IMAGE_POINTER:
case IMAGE_SUBWINDOW:
case IMAGE_NOTHING:
GTK_LVALUE (BOXED) = NULL;
break;
case IMAGE_MONO_PIXMAP:
case IMAGE_COLOR_PIXMAP:
GTK_LVALUE (BOXED) = IMAGE_INSTANCE_GTK_PIXMAP (p);
break;
}
}
else if (GTK_OBJECTP (obj) &&
GTK_IS_WIDGET (XGTK_OBJECT (obj)->object))
{
GTK_LVALUE (BOXED) = GTK_WIDGET (XGTK_OBJECT (obj))->window;
}
else
{
invalid_argument
("Don't know how to convert object to GDK_WINDOW", obj);
}
break;
}
else if (arg->type == GTK_TYPE_GDK_COLOR)
{
if (COLOR_SPECIFIERP (obj))
{
/* If it is a specifier, we just convert it to an
instance, and let the ifs below handle it.
*/
obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
}
if (COLOR_INSTANCEP (obj))
{
/* Easiest one */
GTK_LVALUE (BOXED) =
COLOR_INSTANCE_GTK_COLOR (XCOLOR_INSTANCE (obj));
}
else if (STRINGP (obj))
{
invalid_argument
("Please use a color specifier or instance, not a string",
obj);
}
else
{
invalid_argument ("Don't know how to convert to GdkColor", obj);
}
}
else if (arg->type == GTK_TYPE_GDK_FONT)
{
if (SYMBOLP (obj))
{
/* If it is a symbol, we treat that as a face name */
obj = Ffind_face (obj);
}
if (FACEP (obj))
{
/* If it is a face, we just grab the font specifier, and
cascade down until we finally reach a FONT_INSTANCE
*/
obj = Fget (obj, Qfont, Qnil);
}
if (FONT_SPECIFIERP (obj))
{
/* If it is a specifier, we just convert it to an
instance, and let the ifs below handle it
*/
obj = Fspecifier_instance (obj, Qnil, Qnil, Qnil);
}
if (FONT_INSTANCEP (obj))
{
/* Easiest one */
GTK_LVALUE (BOXED) =
FONT_INSTANCE_GTK_FONT (XFONT_INSTANCE (obj));
}
else if (STRINGP (obj))
{
invalid_argument
("Please use a font specifier or instance, not a string", obj);
}
else
{
invalid_argument ("Don't know how to convert to GdkColor", obj);
}
}
else
{
/* Unknown type to convert to boxed */
stderr_out ("Don't know how to convert to boxed!\n");
GTK_LVALUE (BOXED) = NULL;
}
break;
case GTK_TYPE_POINTER:
if (NILP (obj))
GTK_LVALUE (POINTER) = NULL;
else
GTK_LVALUE (POINTER) = LISP_TO_VOID (obj);
break;
/* structured types */
case GTK_TYPE_SIGNAL:
case GTK_TYPE_ARGS: /* This we can do as a list of values */
case GTK_TYPE_C_CALLBACK:
case GTK_TYPE_FOREIGN:
stderr_out ("Do not know how to convert `%s' from lisp!\n",
GTK_TEXT_TO_C_STRING (gtk_type_name (arg->type)));
return (-1);
#if 0
/* #### BILL! */
/* #### This is not used, and GTK_RETLOC_CALLBACK does not exist */
case GTK_TYPE_CALLBACK:
{
GUI_ID id;
id = new_gui_id ();
obj = Fcons (Qnil, obj); /* Empty data */
obj = Fcons (make_int (id), obj);
gcpro_popup_callbacks (id, obj);
GTK_LVALUE (CALLBACK).marshal = __internal_callback_marshal;
GTK_LVALUE (CALLBACK).data = LISP_TO_VOID (obj);
GTK_LVALUE (CALLBACK).notify = __internal_callback_destroy;
}
break;
#endif
/* base type of the object system */
case GTK_TYPE_OBJECT:
if (NILP (obj))
GTK_LVALUE (OBJECT) = NULL;
else
{
CHECK_GTK_OBJECT (obj);
if (XGTK_OBJECT (obj)->alive_p)
GTK_LVALUE (OBJECT) = XGTK_OBJECT (obj)->object;
else
invalid_argument
("Attempting to pass dead object to GTK function", obj);
}
break;
default:
/* GTK_TYPE_ARRAY, GTK_TYPE_LISTOF not constants */
if (GTK_FUNDAMENTAL_TYPE_EQ (arg->type, GTK_TYPE_ARRAY))
{
if (NILP (obj))
GTK_LVALUE (POINTER) = NULL;
else
xemacs_list_to_array (obj, arg);
}
else if (GTK_FUNDAMENTAL_TYPE_EQ (arg->type, GTK_TYPE_LISTOF))
{
if (NILP (obj))
GTK_LVALUE (POINTER) = NULL;
else
xemacs_list_to_gtklist (obj, arg);
}
else
{
stderr_out ("Do not know how to convert `%s' from lisp!\n",
GTK_TEXT_TO_C_STRING (gtk_type_name (arg->type)));
ABORT ();
}
break;
}
return (0);
}