packages icon
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.


`wdiff' is a front-end to GNU `diff'.  It compares two files, finding
which words have been deleted or added to the first in order to create
the second.  It has many output formats and interacts well with
terminals and pagers (notably with `less').  `wdiff' is particularly
useful when two texts differ only by a few words and paragraphs have
been refilled.

GNU `wdiff' has been written by Franc,ois Pinard.  It is an evolving
product, and specifications might change in future releases.

Below, you will find various installation hints on special systems.
Look further down for a mini-FAQ (frequently asked questions).

See file `ABOUT-NLS' for how to customise this program to your language.
See file `COPYING' for copying conditions.
See file `INSTALL' for generic compilation and installation instructions.
See file `NEWS' for a list of major changes in the current release.
See files `AUTHORS' and `THANKS' for a list of contributors.

The canonical distribution point for wdiff is:

  ftp://ftp.gnu.org/gnu/wdiff/

The main web site for wdiff is at:

  http://www.gnu.org/software/wdiff/

.-------------------.
| Configure options |
`-------------------'

Besides those configure options documented in files `INSTALL' and
`ABOUT-NLS', one extra option may be accepted after `./configure':

 - `--enable-experimental[=list]'

     to build some or all of the experimental applications that are
     part of a wdiff source code release. See the following section
     for details.

 - `--with-default-pager=PATH'

     to use PATH as the default pager for --auto-pager mode for users
     that have not set the PAGER environment variable. The environment
     variable takes precedence over this setting. If no pager is set,
     either through this setting or the environment, then output will
     go directly to standard output even in --auto-pager mode.

 - `--with-termcap[=LIB]'

     to configure termcap for visual formatting of differences.
     Termcap support enables the -t command line switch, which will
     use underline and standout mode to mark up insertions and
     deletions. By default, termcap support is automatically detected,
     so --with-termcap without arguments is without effect. use
     --without-termcap to disable termcap, or --with-termcap=foo in
     case libfoo provides termcap functionality (most notably tputs)
     on your system.

.--------------------.
| Experimental tools |
`--------------------'

Additional utilities are included in the source release and can be
enabled by passing `--enable-experimental' to the configure script. It
is possible to select only some of these tools by passing an argument,
e.g. `--enable-experimental="mdiff wdiff2"'.

All of these tools are considered experimental: you are free to use
them, and the maintainers certainly welcome any input as to what does
or does not work with them. On the other hand you shouldn't rely on
them too much, and maintainers might in some cases refuse to address
bugs unless you can contribute to a solution, e.g. by writing a patch.

* `mdiff' studies one or many input files altogether, and discovers
blocks of lines which repeat at more than one place.  This program is
still very experimental.  Even if much development is needed, it is
quite useful as it stands.

* `wdiff2' is intended as a replacement for `wdiff' that uses `mdiff'
to perform its work.  At a certain point in time it closely mirrored
the syntax of `wdiff', but both programs have evloved since then, and
probably have diverged.

* The `unify' program converts between context diffs to unified diffs,
and vice-versa.  Some people just prefer one format and despise the
other, it is a religious issue.  This program brings peace back on
earth.  It has been contributed by Wayne Davison, from Borland.

.---------------------------------.
| Mailing lists and collaboration |
`---------------------------------'

* Your feedback will help us to make a better and more portable package.
Consider documentation errors as bugs, and report them as such.  If you
develop anything pertaining to `wdiff' or have suggestions, let us know
and share your findings by writing at `wdiff-bugs@gnu.org'.  To subscribe
to the list, see http://lists.gnu.org/mailman/listinfo/wdiff-bugs.

* Please follow these tips when submitting a bug report: A bug report is
an adequate description of the problem: your input, what you expected,
what you got, and why this is wrong.  Diffs are welcome, but they only
describe a solution, from which the problem might be uneasy to infer.
If needed, submit actual data files with your report.  Small data
files are preferred.  Big files may sometimes be necessary, but do
not send them on the mailing list; rather take special arrangement
with the maintainer.

.-------.
| Hints |
`-------'

Here are a few hints which might help installing `wdiff' on some
systems.  Most may be applied by temporary presetting environment
variables while calling `./configure'.  File `INSTALL' explains this.

* This program does not require termcap, but takes advantage of it
when it is available.  You may want to get and install GNU termcap
first from /@prep.ai.mit.edu:pub/gnu/termcap-1.2.tar.gz, or better.

* If you have termcap emulation routines in libcurses.a and you do not
have libtermcap.a, and until I find a way to do better, please use:

	./configure LIBS=-lcurses

* If you have both more and less and you prefer more over less, then
prefix the call to configure with your pager selection, as in:

	./configure PAGER=more

.-----.
| FAQ |
`-----'

Finally, here is a kind of FAQ for `wdiff', made up of replies I
wrote many times for questions received over email.

Q: How is `wdiff' different from `diff -w'?

   `wdiff' finds word differences, ignoring spaces, tabs and
   newlines, while `diff -w' finds *line* differences, ignoring
   spaces and tabs.  Also, each program uses its own output format.

Q: Why not simply apply `diff' to files split one word per line?

   You like the way `wdiff' formats its output.  And it's speedier too.

Q: Why calling an external `diff'?  Could not diff be built in `wdiff'?

   It's not fruitful to rewrite another `diff'.  I'd rather see
   `wdiff' integrated in GNU `diff' than the other way around.
   When `wdiff' will have matured enough, it *might* be integrated
   into GNU `diff' distribution, or in GNU `diff' itself.

   Many user requests for additions to `wdiff' have been postponed
   until `wdiff' is integrated in `diff'.  However, for the time
   being, the integration project has been put on the back burner.

Q: How about `spiff' by Dan Nachbar <nachbar@bellcore.com>?

   `spiff' is far more general than `wdiff'.  On the other end,
   `wdiff' is a lot faster, needs almost no memory, and can afford
   handling big files in reasonnable time.  Despite its lack of
   generality, `wdiff' does one of the most usual jobs, so it
   is quite useful after all.  I might try retrofitting some of
   `spiff' features into `wdiff', but not on short term.

Q: How do I get to `wdiff' documentation?

   There are many ways:

   1) Calling just `wdiff', without arguments, will summarize
   its usage.

   2) You can look at the file `wdiff.info' using any ASCII editor,
   or even print the file as is.

   3) If properly installed, you may browse `wdiff.info' from
   inside GNU Emacs by typing the command:

	C-u M-x info RET wdiff.info RET   .

   4) With the standalone Info reader, use `info -f wdiff.info'.
   You can find the standalone info reader in file texinfo-3.?.tar.gz
   in /pub/gnu from prep.ai.mit.edu: just unpack it and look into
   the C subdirectory.

   5) If you have TeX, execute the command `make dvi' then
   process and print `wdiff.dvi' the usual way.

   6) Colin Brough <cmb@epcc.ed.ac.uk> contributed a man page,
   describing `wdiff' at level 0.04.  The man page will be
   distributed and installed along with `wdiff' as long as Colin
   will want to maintain it.

Q: Can we use `wdiff' from within GNU Emacs?

   Of course.  You might be loosing some output features.  James
   Ganong <jeg@ced.berkeley.edu> wrote `collatew.el', generalizing
   the Emacs LISP compare-windows function in the spirit of `wdiff'.

Q: How much memory `wdiff' exactly needs?

   `wdiff' uses a fixed amount of memory.  Long lines or long files
   are no handicap.  All the true work is done by `diff' under the
   scene, and `diff' needs memory itself.  GNU `diff' swallows both
   files in memory first.