Commits

cvs  committed 9ee227a

Import from CVS: tag r19-15b90

  • Participants
  • Parent commits 13c6d0a
  • Tags r19-15b90

Comments (0)

Files changed (190)

File CHANGES-beta

 							-*- indented-text -*-
+to 19.15 beta90
+-- ediff-2.64
+-- viper-2.92
+-- bench.el-1.2
+-- Degenerate extent insertion speedup courtesy of David Moore
+-- decipher.el (from Emacs 19.34)
+-- w3-3.0.43
+-- Miscellaneous bug fixes
+
 to 19.15 beta7
 -- backup-dir 2.0 courtesy of Greg Klanderman
 -- lazy-lock-1.15
 ### Eric Raymond says we should accept strings like "sysvr4" to mean
 ### "System V Release 4"; he writes, "The old convention encouraged
 ### confusion between `system' and `release' levels'."
+###
+### We rely on cpp to generate makefiles from Makefile.in.in templates.
+### There is at least one drawback to that. Since cpp generally has
+### built-in macro definitions like `#define unix' or `#define i386',
+### we must be careful to prevent it from substituting these occurences
+### in certain places in the makefiles. Pathnames for architecture-
+### specific files come to mind.
+### This is where CPPFLAGS_MAKEFILEGEN comes in. We try to selectively
+### disable (potentially) predefined macros that we find to be part of
+### the configuration string. 
+### This is but a poor method to help us fight off cpp, but it covers
+### those cases that used to bite me. <mdiers@logware.de>
+
+CPPFLAGS_MAKEFILEGEN=""  # we normally do not need any extra flags
 
 machine='' opsys='' unported=no need_dynodump=no
 case "${canonical}" in
     machine=hp800 opsys=hpux NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux8*shr* )
-    machine=hp800 opsys=hpux8-shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
+    machine=hp800 opsys=hpux8*shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux8* )
     machine=hp800 opsys=hpux8 NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux9*shr* )
-    machine=hp800 opsys=hpux9-shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
+    machine=hp800 opsys=hpux9*shr NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ;;
   hppa*-hp-hpux9* )
     machine=hp800 opsys=hpux9 NON_GNU_CPP="cc -Aa -E" NON_GNU_CC="cc -Aa"
   ## Intel 386 machines where we don't care about the manufacturer
   i[3-9]86-*-* )
     machine=intel386
+    CPPFLAGS_MAKEFILEGEN="${CPPFLAGS_MAKEFILEGEN} -Ui386"
     case "${canonical}" in
       *-isc1.* | *-isc2.[01]* )	opsys=386-ix ;;
       *-isc2.2* )		opsys=isc2-2 ;;
 		else
 			NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
 		fi ;;
-      *-386bsd* )	        opsys=386bsd ;;
-      *-freebsd* )		opsys=freebsd ;;
+      *-386bsd* )               opsys=386bsd ;;
+      *-freebsd* )              opsys=freebsd ;;
       *-nextstep* )		opsys=nextstep ;;
       ## Otherwise, we'll fall through to the generic opsys code at the bottom.
     esac
 #### Some systems specify a CPP to use unless we are using GCC.
 #### Now that we know whether we are using GCC, we can decide whether
 #### to use that one.
-if [ "x$NON_GNU_CPP" = x ] || [ x$GCC = x1 ]
-then true
+
+if [ "x$GCC" = x1 ] || [ "x$NON_GNU_CPP" = x ] ; then
+  true
 else
   if [ "x$CPP" = x ]; then
     if [ "${with_lcc}" = "yes" ] && [ "${NON_GNU_CPP}" = "yes" ] ; then
   if test -d /usr/X386/include; then
     HAVE_XFREE386=yes
     test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
-  elif test -d /usr/X11R6/include; then
+  elif test -f /etc/XF86Config -o \
+	    -f /etc/X11/XF86Config -o \
+	    -f /usr/X11R6/lib/X11/XF86Config; then
     HAVE_XFREE386=yes
     test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X11R6/include"
   else
 ( cd ./src;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
 ( cd ./lwlib;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
 ( cd ./lib-src;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
 ( cd ./dynodump;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\
 ( cd ./lwlib/energize;
   rm -f junk.c;
   sed -e '\''s/^# Generated.*//'\'' -e '\''s%/\*\*/#.*%%'\'' < Makefile.in > junk.c;
-  eval `echo ${CPP} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
+  eval `echo ${CPP} ${CPPFLAGS_MAKEFILEGEN} -I. -I${topsrcdir}/src ${CPPFLAGS} junk.c \>junk.cpp`;
   < junk.cpp							'\
 '    sed -e '\''s/^#.*//'\''					'\
 '	-e '\''s/^[ \f\t][ \f\t]*$//'\''			'\

File configure.in

   if test -d /usr/X386/include; then
     HAVE_XFREE386=yes
     test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X386/include"
-  elif test -d /usr/X11R6/include; then
+  elif test -f /etc/XF86Config -o \
+	    -f /etc/X11/XF86Config -o \
+	    -f /usr/X11R6/lib/X11/XF86Config; then
     HAVE_XFREE386=yes
     test -z "${C_SWITCH_X_SITE}" && C_SWITCH_X_SITE="-I/usr/X11R6/include"
   else

File dynodump/Makefile.in.in

 #endif
 
 dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
-	PATH=/usr/ccs/bin:/bin:$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
+	PATH=/usr/ccs/bin:/bin:$$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
 
 _relocate.o: ${srcdir}/$(ARCH)/_relocate.c
 	$(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c

File etc/sample.emacs

 (resize-minibuffer-mode)
 (setq resize-minibuffer-window-exactly nil)
 
-;; Create a single detached minibuffer used by all frames.
-;; Uncomment to try this out.
-;(when running-xemacs
-;  (setq initial-frame-plist '(minibuffer nil))
-;  (setq default-frame-plist '(minibuffer nil))
-;  (setq default-minibuffer-frame
-;	(make-frame
-;	 '(minibuffer only
-;		      width 86
-;		      height 1
-;		      menubar-visible-p nil
-;		      default-toolbar-visible-p nil
-;		      name "minibuffer"
-;		      top -2
-;		      left -2
-;		      has-modeline-p nil)))
-;  (frame-notice-user-settings))
-
 ;;; ********************
 ;;; W3 is a browser for the World Wide Web, and takes advantage of the very
 ;;; latest redisplay features in XEmacs.  You can access it simply by typing 

File etc/viperCard.tex

 are preserved on all copies.
 
 For copies of the GNU Emacs manual, write to the Free Software
-Foundation, Inc., 1000 Massachusetts Ave, Cambridge MA 02138.
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 \endgroup}
 

File lib-src/Makefile.in.in

 
 /* Note: FSF Makefile.in.in does something weird so that the comments
    above a certain point in this file are in shell format instead of
-   in C format.  I don't know how the hell this is supposed to work. */
+   in C format.  I do not know how the hell this is supposed to work. */
 
-/* Avoid trouble on systems where the `SHELL' variable might be
+/* Avoid trouble on systems where the $SHELL variable might be
    inherited from the environment. */
 SHELL = /bin/sh
 
-/* Some people use these in paths they define.  We don't want their paths
+/* Some people use these in paths they define.  We do not want their paths
    getting changed on them. */
 #undef sparc
 #undef sun
 #undef NeXT
 #undef mips
 
-/* ==================== Things `configure' will edit ==================== */
+/* ==================== Things "configure" will edit ==================== */
 
 CC=@CC@
 CFLAGS=@CFLAGS@
    subdirectories of this directory.  The default values for many of
    the variables below are expressed in terms of this one, so you may
    not need to change them.  This is set with the --prefix option to
-   `../configure'. */
+   "../configure". */
 prefix=@prefix@
 
-/* Like `prefix', but used for architecture-specific files.  This is
-   set with the --exec-prefix option to `../configure'. */
+/* Like "prefix", but used for architecture-specific files.  This is
+   set with the --exec-prefix option to "../configure". */
 exec_prefix=@exec_prefix@
 
 /* Where to install Emacs and other binaries that people will want to
    run directly (like etags).  This is set with the --bindir option
-   to `../configure'. */
+   to "../configure". */
 bindir=@bindir@
 
 /* Where to install and expect executable files to be run by Emacs
    rather than directly by users, and other architecture-dependent
    data.  ${archlibdir} is usually below this.  This is set with the
-   --libdir option to `../configure'. */
+   --libdir option to "../configure". */
 libdir=@libdir@
 
 /* Where to find the source code.  This is set by the configure
-   script's `--srcdir' option.  However, the value of ${srcdir} in
+   "--srcdir" option.  However, the value of ${srcdir} in
    this makefile is not identical to what was specified with --srcdir,
-   since the variable here has `/lib-src' added at the end. */
+   since the variable here has "/lib-src" added at the end. */
 srcdir=@srcdir@
 
 /* ==================== Emacs-specific directories ==================== */
    This path usually includes the Emacs version and configuration name,
    so that multiple configurations for multiple versions of Emacs may
    be installed at once.  This can be set with the --archlibdir option
-   to `../configure'. */
+   to "../configure". */
 archlibdir=@archlibdir@
 
 /* ==================== Utility Programs for the Build ================= */
    which should not be installed in bindir. */
 UTILITIES= make-path wakeup profile make-docfile digest-doc \
 	sorted-doc movemail cvtmail fakemail yow emacsserver hexl \
-	gnuserv
+	gnuserv mmencode
 
-/* Like UTILITIES, but they're not system-dependent, and should not be
+/* Like UTILITIES, but they are not system-dependent, and should not be
    deleted by the distclean target. */
-SCRIPTS= rcs2log vcdiff
+TM_SCRIPTS=tm-au tm-file tm-html tm-image tm-mpeg tm-plain tm-ps tmdecode
+SCRIPTS= rcs2log vcdiff $(TM_SCRIPTS)
 
 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
 
    in-place location, it will not get recompiled in the not-in-place
    location.
 
-   The GNU Make `vpath' directive continues this tradition, but at
+   The GNU Make "vpath" directive continues this tradition, but at
    least lets you restrict the classes of files that it applies to.
    This allows us to kludge around the problem. */
 #ifdef USE_GNU_MAKE
 vpath %.c @srcdir@
 vpath %.h @srcdir@
 /* now list files that should NOT be searched in the srcdir.
-   This includes any .c or .h that's built from something else
+   This includes any .c or .h that is built from something else
    (e.g. a .in file). */
 /* none here */
 #else
 VPATH=@srcdir@
 #endif
 
-/* We won't really call alloca;
-   don't let the file name alloca.c get messed up.  */
+/* We will not really call alloca;
+   do not let the file name alloca.c get messed up.  */
 #ifdef alloca
 #undef alloca
 #endif
    -I. -I../src -I${srcdir} -I${srcdir}/../src ${LDFLAGS} ${CFLAGS}
 CPP_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
-/* Formerly -Demacs was missing, but it's needed to suppress the
-   defining of malloc to xmalloc.  [Yes it's fucked up.  Blame FSF
+/* Formerly -Demacs was missing, but it is needed to suppress the
+   defining of malloc to xmalloc.  [Yes it is fucked up.  Blame FSF
    for this.] */
 ALLOCA_CFLAGS = C_SWITCH_SYSTEM C_SWITCH_MACHINE -Demacs -DHAVE_CONFIG_H \
    -I. -I../src -I${srcdir} -I${srcdir}/../src ${CPPFLAGS} ${CFLAGS}
 
 maybe-blessmail: BLESSMAIL
 #ifdef MOVEMAIL_NEEDS_BLESSING
-/* Don't charge ahead and do it!  Let the installer decide.
+/* Do not charge ahead and do it!  Let the installer decide.
 	  ./blessmail ${archlibdir}/movemail  */
 	@if [ `wc -l <blessmail` != 2 ] ; then \
 	  dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
 etags: ${srcdir}/etags.c $(GETOPTDEPS) $(REGEXDEPS) ../src/config.h
 	$(CC) ${ALL_CFLAGS} -DVERSION="\"${version}\"" -DETAGS_REGEXPS ${srcdir}/etags.c $(GETOPTOBJS) $(REGEXOBJ) $(LOADLIBES) -o etags
 
-/* We depend on etags to assure that parallel makes don't write two
+/* We depend on etags to assure that parallel makes do not write two
    etags.o files on top of each other.  */
 ctags: ${srcdir}/etags.c $(GETOPTDEPS) etags
 	$(CC) ${ALL_CFLAGS} -DCTAGS -DVERSION="\"${version}\"" ${srcdir}/etags.c $(GETOPTOBJS) $(LOADLIBES) -o ctags
 hexl: ${srcdir}/hexl.c
 	$(CC) ${ALL_CFLAGS} ${srcdir}/hexl.c $(LOADLIBES) -o hexl
 
-/* Why oh why doesn't HP include half of the standard X distribution? */
+/* Why oh why does HP not include half of the standard X distribution? */
 
 #if defined (HAVE_XAUTH)
 gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
 	$(CC) ${ALL_CFLAGS} -o gnuserv ${srcdir}/gnuserv.c gnuslib.o $(LOADLIBES)
 #endif /* !HAVE_XAUTH */
 
+/* mmencode binary is used by tm - but is really part of the metamail package */
+/* mmencode.c was merged copy of mmencode.c and codes.c of metamail */
+mmencode : ${srcdir}/mmencode.c
+	$(CC) ${ALL_CFLAGS} ${srcdir}/mmencode.c -o mmencode
+
 /* The timer utility (timer.c, getdate.y) is not used in XEmacs
    because XEmacs provides built-in timer facilities. */
 

File lib-src/mmencode.c

+/*
+Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+
+Permission to use, copy, modify, and distribute this material 
+for any purpose and without fee is hereby granted, provided 
+that the above copyright notice and this permission notice 
+appear in all copies, and that the name of Bellcore not be 
+used in advertising or publicity pertaining to this 
+material without the specific, prior written permission 
+of an authorized representative of Bellcore.  BELLCORE 
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
+OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+*/
+
+#define NEWLINE_CHAR '\n'
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+static void
+output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
+
+static char basis_64[] =
+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static char index_64[128] = {
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
+    52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
+    -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
+    15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
+    -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+    41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
+};
+
+#define char64(c)  (((c) < 0 || (c) > 127) ? -1 : index_64[(c)])
+
+/*
+char64(c)
+char c;
+{
+    char *s = (char *) strchr(basis_64, c);
+    if (s) return(s-basis_64);
+    return(-1);
+}
+*/
+
+/* the following gets a character, but fakes it properly into two chars if there's a newline character */
+static int InNewline=0;
+
+static int
+nextcharin(infile, PortableNewlines)
+FILE *infile;
+int PortableNewlines;
+{
+    int c;
+
+#ifndef NEWLINE_CHAR
+    return(getc(infile));
+#else
+    if (!PortableNewlines) return(getc(infile));
+    if (InNewline) {
+        InNewline = 0;
+        return(10); /* LF */
+    }
+    c = getc(infile);
+    if (c == NEWLINE_CHAR) {
+        InNewline = 1;
+        return(13); /* CR */
+    }
+    return(c);
+#endif
+}
+
+static void
+to64(FILE *infile, FILE *outfile, int PortableNewlines) 
+{
+    int c1, c2, c3, ct=0;
+    InNewline = 0; /* always reset it */
+    while ((c1 = nextcharin(infile, PortableNewlines)) != EOF) {
+        c2 = nextcharin(infile, PortableNewlines);
+        if (c2 == EOF) {
+            output64chunk(c1, 0, 0, 2, outfile);
+        } else {
+            c3 = nextcharin(infile, PortableNewlines);
+            if (c3 == EOF) {
+                output64chunk(c1, c2, 0, 1, outfile);
+            } else {
+                output64chunk(c1, c2, c3, 0, outfile);
+            }
+        }
+        ct += 4;
+        if (ct > 71) {
+            putc('\n', outfile);
+            ct = 0;
+        }
+    }
+    if (ct) putc('\n', outfile);
+    fflush(outfile);
+}
+
+static void
+output64chunk(int c1, int c2, int c3, int pads, FILE *outfile)
+{
+    putc(basis_64[c1>>2], outfile);
+    putc(basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)], outfile);
+    if (pads == 2) {
+        putc('=', outfile);
+        putc('=', outfile);
+    } else if (pads) {
+        putc(basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)], outfile);
+        putc('=', outfile);
+    } else {
+        putc(basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)], outfile);
+        putc(basis_64[c3 & 0x3F], outfile);
+    }
+}
+
+static int
+PendingBoundary(char *s, char **Boundaries, int *BoundaryCt)
+{
+    int i, len;
+
+    if (s[0] != '-' || s[1] != '-') return(0);
+
+
+    for (i=0; i < *BoundaryCt; ++i) {
+	len = strlen(Boundaries[i]);
+        if (!strncmp(s, Boundaries[i], len)) {
+            if (s[len] == '-' && s[len+1] == '-') *BoundaryCt = i;
+            return(1);
+        }
+    }
+    return(0);
+}
+
+/* If we're in portable newline mode, we have to convert CRLF to the 
+    local newline convention on output */
+
+static int CRpending = 0;
+
+#ifdef NEWLINE_CHAR
+static void
+almostputc(int c, FILE *outfile, int PortableNewlines)
+{
+    if (CRpending) {
+        if (c == 10) {
+            putc(NEWLINE_CHAR, outfile);
+            CRpending = 0;
+        } else {
+            putc(13, outfile);
+	    if (c != 13) {
+            	putc(c, outfile);
+		CRpending = 0;
+	    }
+        }
+    } else {
+        if (PortableNewlines && c == 13) {
+            CRpending = 1;
+        } else {
+            putc(c, outfile);
+        }
+    }
+}
+#else
+static void
+almostputc(int c, FILE *outfile, int PortableNewlines)
+{
+    putc(c, outfile);
+}
+#endif
+
+static void
+from64(FILE *infile, FILE *outfile,
+       char **boundaries, int *boundaryct, int PortableNewlines) 
+{
+    int c1, c2, c3, c4;
+    int newline = 1, DataDone = 0;
+
+    /* always reinitialize */
+    CRpending = 0;
+    while ((c1 = getc(infile)) != EOF) {
+        if (isspace(c1)) {
+            if (c1 == '\n') {
+                newline = 1;
+            } else {
+                newline = 0;
+            }
+            continue;
+        }
+        if (newline && boundaries && c1 == '-') {
+            char Buf[200];
+            /* a dash is NOT base 64, so all bets are off if NOT a boundary */
+            ungetc(c1, infile);
+            fgets(Buf, sizeof(Buf), infile);
+            if (boundaries
+                 && (Buf[0] == '-')
+                 && (Buf[1] == '-')
+                 && PendingBoundary(Buf, boundaries, boundaryct)) {
+                return;
+            }
+            fprintf(stderr, "Ignoring unrecognized boundary line: %s\n", Buf);
+            continue;
+        }
+        if (DataDone) continue;
+        newline = 0;
+        do {
+            c2 = getc(infile);
+        } while (c2 != EOF && isspace(c2));
+        do {
+            c3 = getc(infile);
+        } while (c3 != EOF && isspace(c3));
+        do {
+            c4 = getc(infile);
+        } while (c4 != EOF && isspace(c4));
+        if (c2 == EOF || c3 == EOF || c4 == EOF) {
+            fprintf(stderr, "Warning: base64 decoder saw premature EOF!\n");
+            return;
+        }
+        if (c1 == '=' || c2 == '=') {
+            DataDone=1;
+            continue;
+        }
+        c1 = char64(c1);
+        c2 = char64(c2);
+        almostputc(((c1<<2) | ((c2&0x30)>>4)), outfile, PortableNewlines);
+        if (c3 == '=') {
+            DataDone = 1;
+        } else {
+            c3 = char64(c3);
+            almostputc((((c2&0XF) << 4) | ((c3&0x3C) >> 2)), outfile, PortableNewlines);
+            if (c4 == '=') {
+                DataDone = 1;
+            } else {
+                c4 = char64(c4);
+                almostputc((((c3&0x03) <<6) | c4), outfile, PortableNewlines);
+            }
+        }
+    }
+    if (CRpending) putc(13, outfile); /* Don't drop a lone trailing char 13 */
+}
+
+static char basis_hex[] = "0123456789ABCDEF";
+static char index_hex[128] = {
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+     0, 1, 2, 3,  4, 5, 6, 7,  8, 9,-1,-1, -1,-1,-1,-1,
+    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1
+};
+
+/* The following version generated complaints on Solaris. */
+/* #define hexchar(c)  (((c) < 0 || (c) > 127) ? -1 : index_hex[(c)])  */
+/*  Since we're no longer ever calling it with anything signed, this should work: */
+#define hexchar(c)  (((c) > 127) ? -1 : index_hex[(c)])
+
+/*
+hexchar(c)
+char c;
+{
+    char *s;
+    if (islower(c)) c = toupper(c);
+    s = (char *) strchr(basis_hex, c);
+    if (s) return(s-basis_hex);
+    return(-1);
+}
+*/
+
+static void
+toqp(FILE *infile, FILE *outfile) 
+{
+    int c, ct=0, prevc=255;
+    while ((c = getc(infile)) != EOF) {
+        if ((c < 32 && (c != '\n' && c != '\t'))
+             || (c == '=')
+             || (c >= 127)
+             /* Following line is to avoid single periods alone on lines,
+               which messes up some dumb smtp implementations, sigh... */
+             || (ct == 0 && c == '.')) {
+            putc('=', outfile);
+            putc(basis_hex[c>>4], outfile);
+            putc(basis_hex[c&0xF], outfile);
+            ct += 3;
+            prevc = 'A'; /* close enough */
+        } else if (c == '\n') {
+            if (prevc == ' ' || prevc == '\t') {
+                putc('=', outfile); /* soft & hard lines */
+                putc(c, outfile);
+            }
+            putc(c, outfile);
+            ct = 0;
+            prevc = c;
+        } else {
+            if (c == 'F' && prevc == '\n') {
+                /* HORRIBLE but clever hack suggested by MTR for sendmail-avoidance */
+                c = getc(infile);
+                if (c == 'r') {
+                    c = getc(infile);
+                    if (c == 'o') {
+                        c = getc(infile);
+                        if (c == 'm') {
+                            c = getc(infile);
+                            if (c == ' ') {
+                                /* This is the case we are looking for */
+                                fputs("=46rom", outfile);
+                                ct += 6;
+                            } else {
+                                fputs("From", outfile);
+                                ct += 4;
+                            }
+                        } else {
+                            fputs("Fro", outfile);
+                            ct += 3;
+                        }
+                    } else {
+                        fputs("Fr", outfile);
+                        ct += 2;
+                    }
+                } else {
+                    putc('F', outfile);
+                    ++ct;
+                }
+                ungetc(c, infile);
+                prevc = 'x'; /* close enough -- printable */
+            } else { /* END horrible hack */
+                putc(c, outfile);
+                ++ct;
+                prevc = c;
+            }
+        }
+        if (ct > 72) {
+            putc('=', outfile);
+            putc('\n', outfile);
+            ct = 0;
+            prevc = '\n';
+        }
+    }
+    if (ct) {
+        putc('=', outfile);
+        putc('\n', outfile);
+    }
+}
+
+static void
+fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) 
+{
+    unsigned int c1, c2;
+    int sawnewline = 1, neednewline = 0;
+    /* The neednewline hack is necessary because the newline leading into 
+      a multipart boundary is part of the boundary, not the data */
+
+    while ((c1 = getc(infile)) != EOF) {
+        if (sawnewline && boundaries && (c1 == '-')) {
+            char Buf[200];
+            unsigned char *s;
+
+            ungetc(c1, infile);
+            fgets(Buf, sizeof(Buf), infile);
+            if (boundaries
+                 && (Buf[0] == '-')
+                 && (Buf[1] == '-')
+                 && PendingBoundary(Buf, boundaries, boundaryct)) {
+                return;
+            }
+            /* Not a boundary, now we must treat THIS line as q-p, sigh */
+            if (neednewline) {
+                putc('\n', outfile);
+                neednewline = 0;
+            }
+            for (s=(unsigned char *) Buf; *s; ++s) {
+                if (*s == '=') {
+                    if (!*++s) break;
+                    if (*s == '\n') {
+                        /* ignore it */
+                        sawnewline = 1;
+                    } else {
+                        c1 = hexchar(*s);
+                        if (!*++s) break;
+                        c2 = hexchar(*s);
+                        putc(c1<<4 | c2, outfile);
+                    }
+                } else {
+#ifdef MSDOS
+                    if (*s == '\n')
+                        putc('\r', outfile);	/* insert CR for binary-mode write */
+#endif
+                    putc(*s, outfile);
+                }
+            }
+        } else {
+            if (neednewline) {
+                putc('\n', outfile);
+                neednewline = 0;
+            }
+            if (c1 == '=') {
+                sawnewline = 0;
+                c1 = getc(infile);
+                if (c1 == '\n') {
+                    /* ignore it */
+                    sawnewline = 1;
+                } else {
+                    c2 = getc(infile);
+                    c1 = hexchar(c1);
+                    c2 = hexchar(c2);
+                    putc(c1<<4 | c2, outfile);
+                    if (c2 == '\n') sawnewline = 1;
+                }
+            } else {
+                if (c1 == '\n') {
+                    sawnewline = 1;
+                    neednewline = 1;
+                } else {
+                    sawnewline = 0;
+                    putc(c1, outfile);
+                }
+            }
+        }
+    }
+    if (neednewline) {
+        putc('\n', outfile);
+        neednewline = 0;
+    }    
+}
+
+
+/*
+Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+
+Permission to use, copy, modify, and distribute this material 
+for any purpose and without fee is hereby granted, provided 
+that the above copyright notice and this permission notice 
+appear in all copies, and that the name of Bellcore not be 
+used in advertising or publicity pertaining to this 
+material without the specific, prior written permission 
+of an authorized representative of Bellcore.  BELLCORE 
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
+OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+*/
+#ifdef MSDOS
+#include <fcntl.h>
+#endif
+
+#define BASE64 1
+#define QP 2 /* quoted-printable */
+
+int main(int argc, char *argv[])
+{
+    int encode = 1, which = BASE64, i, portablenewlines = 0;
+    FILE *fp = stdin;
+    FILE *fpo = stdout;
+
+    for (i=1; i<argc; ++i) {
+        if (argv[i][0] == '-') {
+	    switch (argv[i][1]) {
+		case 'o':
+		    if (++i >= argc) {
+			fprintf(stderr, "mimencode: -o requires a file name.\n");
+			exit(-1);
+		    }
+		    fpo = fopen(argv[i], "w");
+		    if (!fpo) {
+			perror(argv[i]);
+			exit(-1);
+		    }
+		    break;
+                case 'u':
+                    encode = 0;
+                    break;
+                case 'q':
+                    which = QP;
+                    break;
+                case 'p':
+                    portablenewlines = 1;
+                    break;
+                case 'b':
+                    which = BASE64;
+                    break;
+		default:
+                    fprintf(stderr,
+                       "Usage: mmencode [-u] [-q] [-b] [-p] [-o outputfile] [file name]\n");
+                    exit(-1);
+            }
+        } else {
+#ifdef MSDOS
+            if (encode)
+                fp = fopen(argv[i], "rb");
+            else
+            {
+                fp = fopen(argv[i], "rt");
+                setmode(fileno(fpo), O_BINARY);
+            } /* else */
+#else
+            fp = fopen(argv[i], "r");
+#endif /* MSDOS */
+            if (!fp) {
+                perror(argv[i]);
+                exit(-1);
+            }
+        }
+    }
+#ifdef MSDOS
+    if (fp == stdin) setmode(fileno(fp), O_BINARY);
+#endif /* MSDOS */
+    if (which == BASE64) {
+        if (encode) {
+            to64(fp, fpo, portablenewlines);
+        } else {
+            from64(fp,fpo, (char **) NULL, (int *) 0, portablenewlines);
+        }
+    } else {
+        if (encode) toqp(fp, fpo); else fromqp(fp, fpo, NULL, 0);
+    }
+    return(0);
+}
+

File lib-src/tm-au

 #!/bin/sh -
 #
-# $Id: tm-au,v 1.2 1996/12/29 00:14:55 steve Exp $
+# $Id: tm-au,v 1.3 1997/01/11 22:09:59 steve Exp $
 #
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 if [ "$TM_TMP_DIR" = "" ]; then
 	TM_TMP_DIR=/tmp
 	export TM_TMP_DIR

File lib-src/tm-file

 #!/bin/sh -
 #
-# $Id: tm-file,v 1.2 1996/12/29 00:14:55 steve Exp $
+# $Id: tm-file,v 1.3 1997/01/11 22:09:59 steve Exp $
 #
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 if [ "$TM_TMP_DIR" = "" ]; then
 	TM_TMP_DIR=/tmp
 	export TM_TMP_DIR

File lib-src/tm-html

 #!/bin/sh
 #
-# $Id: tm-html,v 1.2 1996/12/29 00:14:55 steve Exp $
+# $Id: tm-html,v 1.3 1997/01/11 22:09:59 steve Exp $
 #
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 if [ "$TM_TMP_DIR" = "" ]; then
     TM_TMP_DIR=/tmp
     export TM_TMP_DIR

File lib-src/tm-mpeg

 #!/bin/sh -
 #
-# $Id: tm-mpeg,v 1.2 1996/12/29 00:14:55 steve Exp $
+# $Id: tm-mpeg,v 1.3 1997/01/11 22:09:59 steve Exp $
 #
 # Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
 
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 if [ "$TM_TMP_DIR" = "" ]; then
 	TM_TMP_DIR=/tmp
 	export TM_TMP_DIR

File lib-src/tm-ps

 #!/bin/sh -
 #
-# $Id: tm-ps,v 1.2 1996/12/29 00:14:56 steve Exp $
+# $Id: tm-ps,v 1.3 1997/01/11 22:10:00 steve Exp $
 #
 # Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
 
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 if [ "$TM_TMP_DIR" = "" ]; then
 	TM_TMP_DIR=/tmp
 	export TM_TMP_DIR

File lib-src/tmdecode

 #!/bin/sh -
 #
-# $Id: tmdecode,v 1.2 1996/12/29 00:14:56 steve Exp $
+# $Id: tmdecode,v 1.3 1997/01/11 22:10:00 steve Exp $
 #
 # Copyright 1994, 1995, 1996 Free Software Foundation, Inc.
 
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
+
 trap 'rm -f $2' 0 1 2 3 13 15
 
 case "$3" in

File lib-src/update-elc.sh

 
 
 REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
-BYTECOMP="$REAL -batch -q -no-site-file -l bytecomp"
+BYTECOMP="$REAL -batch -q -no-site-file "
 echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`"
 echo "          with $REAL..."
 
 \!/tm/!d
 \!/tl/!d
 \!/mel/!d
-\!/url/!d
 \!/viper/!d
 \!/vm/!d
 \!/w3/!d
 ( cd lisp/gnus ; make EMACS=$REAL some )
 echo Gnus done.
 
-# This is really part of w3.
-echo Compiling URL...
-( cd lisp/url ; make EMACS=$REAL )
-echo URL done.
-
 # and gee w3 has its own makefile as well
 # (no especial need to use it, though)
 echo Compiling W3...

File lisp/comint/telnet.el

 (defvar telnet-program "telnet"
   "Program to run to open a telnet connection.")
 
-(defvar telnet-initial-count -50
+(defvar telnet-initial-count -75
   "Initial value of `telnet-count'.  Should be set to the negative of the
 number of terminal writes telnet will make setting up the host connection.")
 
   (setq comint-prompt-regexp telnet-prompt-pattern))
 
 (defun telnet-initial-filter (proc string)
-  ;For reading up to and including password; also will get machine type.
-  (cond ((string-match "No such host" string)
-	 (kill-buffer (process-buffer proc))
-	 (error "No such host."))
-	((string-match "passw" string)
-	 (telnet-filter proc string)
-	 (let ((password (comint-read-noecho "Password: " t)))
-	   (setq telnet-count 0)
-	   (process-send-string proc (concat password telnet-new-line))))
-	(t (telnet-check-software-type-initialize string)
+  (let ((case-fold-search t))
+    ;For reading up to and including password; also will get machine type.
+    (cond ((string-match "No such host" string)
+	   (kill-buffer (process-buffer proc))
+	   (error "No such host."))
+	  ((string-match "passw" string)
 	   (telnet-filter proc string)
-	   (cond ((> telnet-count telnet-maximum-count)
-		  ;; (set-process-filter proc 'telnet-filter)
-		  ;; Kludge for shell-fonts -- this is the only mode that
-		  ;; actually changes what its process filter is at run time,
-		  ;; which confuses shell-font.  So we special-case that here.
-		  ;; #### Danger, knows an internal shell-font variable name.
-		  (let ((old-filter (process-filter proc)))
-		    (if (eq old-filter 'shell-font-process-filter)
-			(set (make-local-variable 'shell-font-process-filter)
-			     'telnet-filter)
-		      (set-process-filter proc 'telnet-filter))))
-		 (t (setq telnet-count (1+ telnet-count)))))))
+	   (let ((password (comint-read-noecho "Password: " t)))
+	     (setq telnet-count 0)
+	     (process-send-string proc (concat password telnet-new-line))))
+	  (t (telnet-check-software-type-initialize string)
+	     (telnet-filter proc string)
+	     (cond ((> telnet-count telnet-maximum-count)
+		    ;; (set-process-filter proc 'telnet-filter) Kludge
+		    ;; for shell-fonts -- this is the only mode that
+		    ;; actually changes what its process filter is at
+		    ;; run time, which confuses shell-font.  So we
+		    ;; special-case that here.
+		    ;; #### Danger, knows an internal shell-font variable name.
+		    (let ((old-filter (process-filter proc)))
+		      (if (eq old-filter 'shell-font-process-filter)
+			  (set (make-local-variable 'shell-font-process-filter)
+			       'telnet-filter)
+			(set-process-filter proc 'telnet-filter))))
+		   (t (setq telnet-count (1+ telnet-count))))))))
 
 ;; Identical to comint-simple-send, except that it sends telnet-new-line
 ;; instead of "\n".

File lisp/ediff/Makefile

            ediff-ptch.elc ediff.elc ediff-hook.elc
 # ediff-tbar.elc
 
-PRELOADS = -l ./ediff-init.el -l ./ediff-help.el -l ./ediff-diff.el \
-           -l ./ediff-wind.el -l ./ediff-merg.el -l ./ediff-mult.el \
-           -l ./ediff-util.el -l ./ediff.el
-# -l ./ediff-tbar.el
 
 all: hello elc goodbye dvi info
 
 
 ediff-tbar.elc: ediff-tbar.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-tbar.el
+	$(EMACS) -batch -f batch-byte-compile ediff-tbar.el
 
 ediff-diff.elc: ediff-init.el ediff-diff.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-diff.el
+	$(EMACS) -batch -f batch-byte-compile ediff-diff.el
 
 ediff-merg.elc: ediff-init.el ediff-merg.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-merg.el
+	$(EMACS) -batch -f batch-byte-compile ediff-merg.el
 
 ediff-mult.elc: ediff-init.el ediff-mult.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-mult.el
+	$(EMACS) -batch -f batch-byte-compile ediff-mult.el
 
 ediff-vers.elc: ediff-init.el ediff-vers.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-vers.el
+	$(EMACS) -batch -f batch-byte-compile ediff-vers.el
 
 ediff-ptch.elc: ediff-init.el ediff-ptch.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-ptch.el
+	$(EMACS) -batch -f batch-byte-compile ediff-ptch.el
 
 ediff.elc: ediff-init.el ediff.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff.el
+	$(EMACS) -batch -f batch-byte-compile ediff.el
 
 ediff-util.elc: ediff-init.el ediff-util.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-util.el
+	$(EMACS) -batch -f batch-byte-compile ediff-util.el
 
 ediff-wind.elc: ediff-init.el ediff-wind.el
 	@echo ""
-	$(EMACS) -batch $(PRELOADS) -f batch-byte-compile ediff-wind.el
+	$(EMACS) -batch -f batch-byte-compile ediff-wind.el
 
 ediff.dvi: ediff.texi
 	@echo ""
 	rm -f ediff*.elc *~ core
 
 distclean: clean
-
+ 
 realclean: clean
 	rm -f *.dvi ediff.info*
 	rm -f ediff.aux ediff.cp ediff.cps ediff.fn ediff.fns ediff.ky \

File lisp/ediff/README

 
 ediff.el    	-- Ediff Emacs Lisp code
 ediff-init.el	-- Ediff Emacs Lisp code
+ediff-help.el	-- Ediff Emacs Lisp code
 ediff-wind.el	-- Ediff Emacs Lisp code
 ediff-util.el	-- Ediff Emacs Lisp code
 ediff-diff.el	-- Ediff Emacs Lisp code

File lisp/ediff/ediff-diff.el

 
 ;;; Code:
 
+(provide 'ediff-diff)
+
+;; compiler pacifier
+(defvar ediff-default-variant)
+
+(eval-when-compile
+  (let ((load-path (cons "." load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-util)
+	(load "ediff-util.el" nil nil 'nosuffix))
+    ))
+;; end pacifier
+
 (require 'ediff-init)
 
 
 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
 ;;; End:
 
-(provide 'ediff-diff)
-
 
 ;; ediff-diff.el ends here

File lisp/ediff/ediff-help.el

 ;; Boston, MA 02111-1307, USA.
 
 ;;; Code:
-
-(require 'ediff-init)
+	 
+(provide 'ediff-help)
 
 ;; Compiler pacifier start
 (defvar ediff-multiframe)
-(and noninteractive
-     (eval-when-compile
-       (let ((load-path (cons (expand-file-name ".") load-path)))
-	 (load-file "ediff-init.el"))))
+
+(eval-when-compile
+  (let ((load-path (cons "." load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    ))
 ;; end pacifier
 
+(require 'ediff-init)
+
 ;; Help messages
 
 (defconst ediff-long-help-message-head
   "Explain Ediff commands in more detail."
   (interactive)
   (ediff-barf-if-not-control-buffer)
-  (let ((ctl-buf (current-buffer))
-	(pos (ediff-event-point last-command-event))
+  (let ((pos (ediff-event-point last-command-event))
 	overl cmd)
 
     (if ediff-xemacs-p
 			     ediff-brief-help-message))
   (run-hooks 'ediff-display-help-hook))
 
-(provide 'ediff-help)
 
 ;;; ediff-help.el ends here

File lisp/ediff/ediff-hook.el

 (defvar epatch-menu)
 ;; end pacifier
 
+;; allow menus to be set up without ediff-wind.el being loaded
+(defvar ediff-window-setup-function)
+
 
 (defun ediff-xemacs-init-menus ()
+  (setq ediff-window-setup-function
+	(if (console-on-window-system-p)
+	    'ediff-setup-windows-multiframe
+	  'ediff-setup-windows-plain))
   (if (featurep 'menubar)
       (progn
-;;	(add-menu-button
-;;	 '("Tools")
-;;	 ["Use separate frame for Ediff control buffer"
-;;	  ediff-toggle-multiframe
-;;	  :style toggle
-;;	  :selected (eq ediff-window-setup-function 'ediff-setup-windows-multiframe)]
-;;	 "00-Browser...")
-;;	(add-menu-button
-;;	 '("Tools")
-;;	 ["Use a toolbar with Ediff control buffer"
-;;	  ediff-menu-toggle-use-toolbar
-;;	  :style toggle
-;;	  :selected (ediff-use-toolbar-p)]
-;;	 "00-Browser...")
+	(add-menu-button
+	 '("Tools")
+	 ["Use separate frame for Ediff control buffer"
+	  ediff-toggle-multiframe
+	  :style toggle
+	  :selected (eq ediff-window-setup-function 'ediff-setup-windows-multiframe)]
+	 "00-Browser...")
+	;;(add-menu-button
+	;; '("Tools")
+	;; ["Use a toolbar with Ediff control buffer"
+	;;  ediff-toggle-use-toolbar
+	;;  :style toggle
+	;;  :selected (ediff-use-toolbar-p)]
+	;; "00-Browser...")
 	(add-submenu
 	 '("Tools") ediff-menu "OO-Browser...")
 	(add-submenu
        (define-key menu-bar-ediff-menu [ediff-doc]
 	 '("Ediff Manual..." . ediff-documentation))
        (define-key menu-bar-ediff-menu [emultiframe]
-	 '("Toggle separate control buffer frame..."
-	   . ediff-toggle-multiframe))
+	'("Toggle separate control buffer frame..."
+	  . ediff-toggle-multiframe))
        (define-key menu-bar-ediff-menu [eregistry]
 	'("List Ediff Sessions..." . ediff-show-registry))
        (define-key menu-bar-ediff-menu [separator-ediff-manual] '("--"))
        (define-key menu-bar-ediff-merge-menu [ediff-doc2]
 	 '("Ediff Manual..." . ediff-documentation))
        (define-key menu-bar-ediff-merge-menu [emultiframe2]
-	 '("Toggle separate control buffer frame..."
-	   . ediff-toggle-multiframe))
+	'("Toggle separate control buffer frame..."
+	  . ediff-toggle-multiframe))
        (define-key menu-bar-ediff-merge-menu [eregistry2]
 	'("List Ediff Sessions..." . ediff-show-registry))
        (define-key
        (define-key menu-bar-epatch-menu [ediff-doc3]
 	 '("Ediff Manual..." . ediff-documentation))
        (define-key menu-bar-epatch-menu [emultiframe3]
-	 '("Toggle separate control buffer frame..."
-	   . ediff-toggle-multiframe))
+	'("Toggle separate control buffer frame..."
+	  . ediff-toggle-multiframe))
        (define-key menu-bar-epatch-menu [eregistry3]
-	 '("List Ediff Sessions..." . ediff-show-registry))
+	'("List Ediff Sessions..." . ediff-show-registry))
        (define-key menu-bar-epatch-menu [separator-epatch] '("--"))
        (define-key menu-bar-epatch-menu [ediff-patch-buffer]
 	 '("To a Buffer..." . ediff-patch-buffer))
     "ediff-util"
     "Toggle the use of separate frame for Ediff control buffer."
     t)
-;;(if (string-match "XEmacs" emacs-version)
-;;    (autoload 'ediff-toggle-use-toolbar
-;;	"ediff-tbar"
-;;	"Toggle the use of Ediff toolbar."
-;;	t))
+  (condition-case nil
+      (if (string-match "XEmacs" emacs-version)
+	  (autoload 'ediff-toggle-use-toolbar
+	    "ediff-tbar"
+	    "Toggle the use of Ediff toolbar."
+	    t))
+    (error))
   ) ; if purify-flag
 
 

File lisp/ediff/ediff-init.el

 	(ediff-emacs-p (memq (ediff-device-type) '(pc)))
 	(ediff-xemacs-p (memq (ediff-device-type) '(tty pc)))))
 
-
+  
 ;; Defines SYMBOL as an advertised local variable.  
 ;; Performs a defvar, then executes `make-variable-buffer-local' on
 ;; the variable.  Also sets the `permanent-local' property,
 ;; Buffer-local variables to be saved then restored during Ediff sessions
 ;; Buffer-local variables to be saved then restored during Ediff sessions
 (defconst ediff-protected-variables '(
-				      ;;buffer-read-only
+				      ;;buffer-read-only 
 				      mode-line-format))
 
 ;; Vector of differences between the variants.  Each difference is
   (car (if ediff-xemacs-p
 	   (ange-ftp-ftp-path file-name)
 	 (ange-ftp-ftp-name file-name))))
+
     
 (defsubst ediff-frame-unsplittable-p (frame)
   (cdr (assq 'unsplittable (frame-parameters frame))))
   (if (ediff-buffer-live-p buf)
       (kill-buffer (get-buffer buf))))
 
+(defsubst ediff-background-face (buf-type dif-num)
+  ;; The value of dif-num is always 1- the one that user sees.
+  ;; This is why even face is used when dif-num is odd.
+  (intern (format (if (ediff-odd-p dif-num)
+		      "ediff-even-diff-face-%S"
+		    "ediff-odd-diff-face-%S")
+		  buf-type)))
+
 
 ;; activate faces on diff regions in buffer
 (defun ediff-paint-background-regions-in-one-buffer (buf-type unhighlight)
 	     (lambda (rec)
 	       (setq overl (ediff-get-diff-overlay-from-diff-record rec)
 		     diff-num (ediff-overlay-get overl 'ediff-diff-num))
-	       (ediff-set-overlay-face
-		overl
-		(if (not unhighlight)
-		    (ediff-background-face buf-type diff-num))
-		)))
+	       (if (ediff-overlay-buffer overl)
+		   ;; only if overlay is alive
+		   (ediff-set-overlay-face
+		    overl
+		    (if (not unhighlight)
+			(ediff-background-face buf-type diff-num))))
+	       ))
 	    diff-vector)))
 
 
 	    )
     
 	(ediff-move-overlay current-diff-overlay 1 1)
-
+	
 	;; rehighlight the overlay in the background of the
 	;; current difference region
 	(ediff-set-overlay-face
 	    (ediff-delete-overlay current-diff-overlay))
 	(set current-diff-overlay-var nil)
 	)))
+      
 
 (defsubst ediff-highlight-diff (n)
   "Put face on diff N.  Invoked for X displays only."
   (ediff-unhighlight-diffs-totally-in-one-buffer 'Ancestor)
   )
 
-(defsubst ediff-background-face (buf-type dif-num)
-  ;; The value of dif-num is always 1- the one that user sees.
-  ;; This is why even face is used when dif-num is odd.
-  (intern (format (if (ediff-odd-p dif-num)
-		      "ediff-even-diff-face-%S"
-		    "ediff-odd-diff-face-%S")
-		  buf-type)))
-    
       
 ;; arg is a record for a given diff in a difference vector
 ;; this record is itself a vector
     
 ;; Some overlay functions
 
+(defsubst ediff-overlay-start (overl)
+  (if (ediff-overlayp overl)
+      (if ediff-emacs-p
+	  (overlay-start overl)
+	(extent-start-position overl))))
+	
+(defsubst ediff-overlay-end  (overl)
+  (if (ediff-overlayp overl)
+      (if ediff-emacs-p
+	  (overlay-end overl)
+	(extent-end-position overl))))
+
 (defsubst ediff-empty-overlay-p (overl)
   (= (ediff-overlay-start overl) (ediff-overlay-end overl)))
 
 
 
 (defun ediff-convert-standard-filename (fname)
-  (if ediff-emacs-p
+  (if (fboundp 'convert-standard-filename)
       (convert-standard-filename fname)
-    ;; hopefully, XEmacs adds this functionality
     fname))
 
+
 ;;; Local Variables:
 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1)
 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
 ;;; End:
-
+     
 (provide 'ediff-init)
 
 

File lisp/ediff/ediff-merg.el

 
 ;;; Code:
 
+(provide 'ediff-merg)
+
+;; compiler pacifier
+(defvar ediff-window-A)
+(defvar ediff-window-B)
+(defvar ediff-window-C)
+(defvar ediff-merge-window-share)
+(defvar ediff-window-config-saved)
+
+(eval-when-compile
+  (let ((load-path (cons "." load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-util)
+	(load "ediff-util.el" nil nil 'nosuffix))
+    ))
+;; end pacifier
+
 (require 'ediff-init)
 
 
 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
 ;;; End:
 
-(provide 'ediff-merg)
-
 ;; ediff-merg.el ends here

File lisp/ediff/ediff-mult.el

 ;; Users are encouraged to add functionality to this file.
 ;; The present file contains all the infrastructure needed for that.
 ;;
-;; Generally, to implement a new multisession capability within Ediff,
+;; Generally, to to implement a new multisession capability within Ediff,
 ;; you need to tell it 
 ;;
 ;;	1. How to display the session group buffer.
 
 ;;; Code:
 
+(provide 'ediff-mult)
+
+;; compiler pacifier
+(eval-when-compile
+  (let ((load-path (cons (expand-file-name ".") load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-util)
+	(load "ediff-util.el" nil nil 'nosuffix))
+    ))
+;; end pacifier
+
 (require 'ediff-init)
+(require 'ediff-util)
 
 ;; meta-buffer
 (ediff-defvar-local ediff-meta-buffer nil "")
 				  (ediff-add-slash-if-directory auxdir1 elt)))
 			 lis1)
 	  auxdir2	(file-name-as-directory dir2)
-	  lis2		(mapcar
+	  lis2		(mapcar 
 			 (function
 			  (lambda (elt)
 				  (ediff-add-slash-if-directory auxdir2 elt)))
 
     (if (stringp dir3)
 	(setq auxdir3	(file-name-as-directory dir3)
-	      lis3	(mapcar
+	      lis3	(mapcar 
 			 (function
 			  (lambda (elt)
 				  (ediff-add-slash-if-directory auxdir3 elt)))
 	(feq (ediff-get-file-eqstatus fileinfo))
 	file-modtime file-size)
 
-    (cond ((not (stringp fname)) (setq file-size -2)) ; file doesn't exist
+    (cond ((not (stringp fname)) (setq file-size -2)) ; file doesn't exits
 	  ((not (ediff-file-remote-p fname))
 	   (if (file-exists-p fname)
 	       ;; set real size and modtime
 	 (meta-buf (ediff-event-buffer last-command-event))
 	 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid
 	 (info (ediff-get-meta-info meta-buf pos))
-	 merge-autostore-dir
 	 (session-buf (ediff-get-session-buffer info)))
 
     (if (eq (ediff-get-session-status info) ?H)
 	 (meta-buf (ediff-event-buffer last-command-event))
 	 ;; ediff-get-meta-info gives error if meta-buf or pos are invalid
 	 (info (ediff-get-meta-info meta-buf pos))
+	 merge-autostore-dir
 	 session-buf file1 file2 file3 regexp)
 
     (setq session-buf (ediff-get-session-buffer info)
 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
 ;;; End:
 
-(provide 'ediff-mult)
-(require 'ediff-util)
-
 ;;; ediff-mult.el ends here

File lisp/ediff/ediff-ptch.el

 
 
 ;;; Code:
+	 
+(provide 'ediff-ptch)
+
+;; compiler pacifier
+(defvar ediff-window-A)
+(defvar ediff-window-B)
+(defvar ediff-window-C)
+(defvar ediff-use-last-dir)
+(defvar ediff-shell)
+
+(eval-when-compile
+  (let ((load-path (cons "." load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    (or (featurep 'ediff)
+	(load "ediff.el" nil nil 'nosuffix))
+    (or (featurep 'ange-ftp)
+	(load "ange-ftp" 'noerror))
+    ))
+;; end pacifier
 
 (require 'ediff-init)
 
 		(select-window aux-wind)
 		(bury-buffer)))
 	  (error "Patch appears to have failed")))
-
+    
     ;; If black magic is involved, apply patch to a temp copy of the
     ;; file. Otherwise, apply patch to the orig copy.  If patch is applied
     ;; to temp copy, we name the result old-name_patched for local files
       ;; arrange that the temp copy of orig will be deleted
       (rename-file (concat true-source-filename ediff-backup-extension)
 		   true-source-filename t))
-
+    
     ;; make orig buffer read-only
     (setq startup-hooks
 	  (cons 'ediff-set-read-only-in-buf-A startup-hooks))
-
+    
     ;; set up a buf for the patched file
     (setq target-buf (find-file-noselect target-filename))
     
 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
 ;;; End:
 
-(provide 'ediff-ptch)
-
 ;;; ediff-ptch.el ends here

File lisp/ediff/ediff-util.el

 ;; Boston, MA 02111-1307, USA.
 
 ;;; Code:
+	 
+(provide 'ediff-util)
 
-;; Pacify compiler and avoid the need in checking for boundp
-(defvar ediff-patch-diagnostics nil)
-(defvar ediff-patchbufer nil)
-(and noninteractive
-     (eval-when-compile
-       (let ((load-path (cons (expand-file-name ".") load-path)))
-	 (load-file "ediff-init.el")
-	 (load-file "ediff-help.el"))))
+;; Compiler pacifier
+(defvar ediff-patch-diagnostics)
+(defvar ediff-patchbufer)
+(defvar ediff-toolbar)
+(defvar mark-active)
+
+(eval-when-compile
+  (let ((load-path (cons "." load-path)))
+    (or (featurep 'ediff-init)
+	(load "ediff-init.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-help)
+	(load "ediff-help.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-mult)
+	(load "ediff-mult.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-wind)
+	(load "ediff-wind.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-diff)
+	(load "ediff-diff.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-merg)
+	(load "ediff-merg.el" nil nil 'nosuffix))
+    (or (featurep 'ediff)
+	(load "ediff.el" nil nil 'nosuffix))
+    (or (featurep 'ediff-tbar)
+	(load "ediff-tbar.el" 'noerror nil 'nosuffix))
+    ))
 ;; end pacifier
 
 (require 'ediff-init)
 (require 'ediff-help)
 (require 'ediff-mult)
+(require 'ediff-wind)
+(require 'ediff-diff)
+(require 'ediff-merg)
 
-;;(if ediff-xemacs-p
-;;    (require 'ediff-tbar)
-;;  (defun ediff-use-toolbar-p () nil))
-;;
-;; for the time being
-(defun ediff-use-toolbar-p () nil)
+
+;; be careful with ediff-tbar
+(if ediff-xemacs-p
+    (condition-case nil
+	(require 'ediff-tbar)
+      (error
+       (defun ediff-use-toolbar-p () nil)))
+  (defun ediff-use-toolbar-p () nil))
 
 
 ;;; Functions
   (run-hooks 'ediff-mode-hook))
 
     
-(require 'ediff-diff)
-(require 'ediff-merg)
-  
 
 ;;; Build keymaps
 
 
 ;;; Setup functions
 
-(require 'ediff-wind)
-
 ;; No longer needed: XEmacs has surrogate minibuffers now.
 ;;(or (boundp 'synchronize-minibuffers)
 ;;    (defvar synchronize-minibuffers nil))
     (goto-char (point-min))
     (skip-chars-forward ediff-whitespace)))
     
-
+    
 
 
 ;;; Commands for working with Ediff
       (ediff-eval-in-buffer ctl-buf
 	(setq ediff-window-B nil) ; force update of window config
 	(ediff-recenter 'no-rehighlight)))))
-
+	
 ;;;###autoload
 (defun ediff-toggle-multiframe ()
   "Switch from the multiframe display to single-frame display and back.
 For a permanent change, set the variable `ediff-window-setup-function',
 which see."
   (interactive)
-  (let (set-func)
-  (or (ediff-window-display-p)
-      (error "%sEmacs is not running as a window application"
-	     (if ediff-emacs-p "" "X")))
+  (let (set-func window-setup-func)
+    (or (ediff-window-display-p)
+	(error "%sEmacs is not running as a window application"
+	       (if ediff-emacs-p "" "X")))
 
-  (setq set-func (if (ediff-in-control-buffer-p) 'setq 'setq-default))
+  ;;(setq set-func (if (ediff-in-control-buffer-p) 'setq 'setq-default))
 
   (cond ((eq ediff-window-setup-function 'ediff-setup-windows-multiframe)
-	 (eval
-	  (list
-	   set-func
-	   'ediff-window-setup-function ''ediff-setup-windows-plain)))
+	 ;; (eval
+	 ;;  (list
+	 ;;   set-func
+	 ;;   'ediff-window-setup-function ''ediff-setup-windows-plain))
+	 (setq window-setup-func 'ediff-setup-windows-plain)
+	 )
 	((eq ediff-window-setup-function 'ediff-setup-windows-plain)
 	 (if (ediff-in-control-buffer-p)
 	     (ediff-kill-bottom-toolbar))
-	 (eval
-	  (list
-	   set-func
-	   'ediff-window-setup-function ''ediff-setup-windows-multiframe))))
+	 ;;(eval
+	 ;; (list
+	 ;;  set-func
+	 ;;  'ediff-window-setup-function 'ediff-setup-windows-multiframe))
+	 (setq window-setup-func 'ediff-setup-windows-multiframe)
+	 ))
+
+  ;; change default
+  (setq-default ediff-window-setup-function window-setup-func)
+  ;; change in all active ediff sessions
+  (mapcar (function (lambda(buf)
+		      (ediff-eval-in-buffer buf
+			(setq ediff-window-setup-function window-setup-func
+			      ediff-window-B nil))))
+	  ediff-session-registry)
   (if (ediff-in-control-buffer-p)
-      (progn
-	(setq ediff-window-B nil)
-	(ediff-recenter 'no-rehighlight)))))
+      (ediff-recenter 'no-rehighlight))))
 
 ;; if was using toolbar, kill it
 (defun ediff-kill-bottom-toolbar ()
 	(narrow-to-region
 	 (ediff-overlay-start overl-B) (ediff-overlay-end overl-B)))
       
-      (if ediff-3way-comparison-job
+      (if ediff-3way-job
 	  (ediff-eval-in-buffer ediff-buffer-C
 	    (narrow-to-region
 	     (ediff-overlay-start overl-C) (ediff-overlay-end overl-C))))
 		    (+ ediff-current-difference arg)))
 	    regexp-skip)
 	    
+	(ediff-visible-region)
 	(or (>= n ediff-number-of-differences)
 	    (setq regexp-skip (funcall ediff-skip-diff-region-function n))
 	    (ediff-install-fine-diff-if-necessary n))
       (let ((n (max -1 (- ediff-current-difference arg)))
 	    regexp-skip)
 	    
+	(ediff-visible-region)
 	(or (< n 0)
 	    (setq regexp-skip (funcall ediff-skip-diff-region-function n))
 	    (ediff-install-fine-diff-if-necessary n))
     (ediff-kill-buffer-carefully ediff-fine-diff-buffer)
     (ediff-kill-buffer-carefully ediff-tmp-buffer)
     (ediff-kill-buffer-carefully ediff-error-buffer)
-    (ediff-kill-buffer-carefully ediff-patch-diagnostics)
     (ediff-kill-buffer-carefully ediff-msg-buffer)
     (ediff-kill-buffer-carefully ediff-debug-buffer)
+    (if (boundp 'ediff-patch-diagnostics)
+	(ediff-kill-buffer-carefully ediff-patch-diagnostics))
 
     (if (and (ediff-window-display-p) (frame-live-p ctl-frame))
 	(delete-frame ctl-frame))
 	 (buf-A-wind (ediff-get-visible-buffer-window buf-A))
 	 (buf-B-wind (ediff-get-visible-buffer-window buf-B))
 	 (buf-C-wind (ediff-get-visible-buffer-window buf-C))
-	 (buf-patch  ediff-patchbufer)
-	 (buf-patch-diag ediff-patch-diagnostics)
+	 (buf-patch  (if (boundp 'ediff-patchbufer) ediff-patchbufer nil))
+	 (buf-patch-diag (if (boundp 'ediff-patch-diagnostics)
+			     ediff-patch-diagnostics nil))
 	 (buf-err  ediff-error-buffer)
 	 (buf-diff ediff-diff-buffer)
 	 (buf-custom-diff ediff-custom-diff-buffer)
 	  (select-window buf-A-wind)
 	  (delete-other-windows)