home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!utgpu!attcan!sobeco!philmtl!altitude!matrox!IRO.UMontreal.CA!pinard
- From: pinard@IRO.UMontreal.CA (Francois Pinard)
- Newsgroups: alt.sources
- Subject: wdiff - Patch 4, Part (1/3) - brings 0.03 to 0.04
- Message-ID: <PINARD.92Dec24003117@kovic.IRO.UMontreal.CA>
- Date: 24 Dec 92 05:31:17 GMT
- Sender: news@IRO.UMontreal.CA
- Distribution: alt
- Organization: Universite' de Montre'al
- Lines: 1444
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # This is a shell archive (produced by shar 3.49)
- # To extract the files from this archive, save it to a file, remove
- # everything above the "!/bin/sh" line above, and type "sh file_name".
- #
- # made 12/24/1992 05:24 UTC by pinard@kovic.IRO.UMontreal.CA
- # Source directory /home/kovic/pinard/pub
- #
- # existing files will NOT be overwritten unless -c is specified
- #
- # This is part 1 of a multipart archive
- # do not concatenate these parts, unpack them in order with /bin/sh
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 137819 -rw-r----- Patch4
- #
- if test -r _shar_seq_.tmp; then
- echo 'Must unpack archives in sequence!'
- echo Please unpack part `cat _shar_seq_.tmp` next
- exit 1
- fi
- # ============= Patch4 ==============
- if test -f 'Patch4' -a X"$1" != X"-c"; then
- echo 'x - skipping Patch4 (File already exists)'
- rm -f _shar_wnt_.tmp
- else
- > _shar_wnt_.tmp
- echo 'x - extracting Patch4 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'Patch4' &&
- X--- wdiff-0.03/ChangeLog Tue Aug 18 06:34:23 1992
- X+++ wdiff-0.04/ChangeLog Wed Dec 23 21:05:19 1992
- X@@ -1,3 +1,203 @@
- X+Wed Dec 23 11:10:32 1992 Francois Pinard (pinard at icule)
- X+
- X+ From Thorsten Ohl <ohl@physics.harvard.edu>:
- X+ * wdiff.c (split_file_into_words): Call tmpnam just before opening
- X+ the file. On the Next, successive calls to tmpnam will return
- X+ different values only if the file is opened in between.
- X+ (main): Allocate temp_name statically, and initialize it to "".
- X+ On certain systems, tmpnam(NULL) causes a segmentation violation.
- X+ Length will be L_tmpman or else, PATH_MAX+1 from pathmax.h. Check
- X+ temp_name before unlinking, in case of an intervening signal.
- X+ * pathmax.h: New, from elsewhere.
- X+ * Makefile.in: Distribute pathmax.h, adjust dependencies.
- X+ * xstrdup.c, xmalloc.c: Deleted, not needed anymore.
- X+
- X+ * Makefile.in: Some cleanup before the release.
- X+ * (dvi, wdiff.dvi): New goals.
- X+ * (_wdiff.o): Use -I$(srcdir).
- X+
- X+ From Thorsten Ohl <ohl@physics.harvard.edu>:
- X+ * wdiff.c: Added two missing `break;'.
- X+
- X+ * check_it: New script, using test data from a bug report by
- X+ Robert J. Chassell <bob@gnu.ai.mit.edu>.
- X+ * testinput1, testinput2, testoutput: Deleted.
- X+ * Makefile.in: Adjusted.
- X+
- X+Tue Dec 22 00:02:41 1992 Francois Pinard (pinard at icule)
- X+
- X+ * Makefile.in: Remove $(CPPDEFS) from the implicit rules.
- X+
- X+Mon Dec 21 23:24:39 1992 Francois Pinard (pinard at icule)
- X+
- X+ * Makefile.in: Distribute the THANKS file.
- X+
- X+ From Colin Brough <cmb@epcc.ed.ac.uk>:
- X+ * wdiff.1: New for 0.04, replaces the previous copy.
- X+ * Makefile.in: Install the man page.
- X+
- X+ Makefile.in: Do not distribute collate.el, which lacks the
- X+ required Copyright assignment to the FSF.
- X+
- X+Wed Dec 9 08:43:47 1992 Francois Pinard (pinard at icule)
- X+
- X+ * From David D `zoo' Zuhn <zoo@cygnus.com>:
- X+ configure.in, wdiff.c: Replace USG by HAVE_STRING_H.
- X+
- X+ * From David D `zoo' Zuhn <zoo@cygnus.com>:
- X+ Makefile.in (configure): Go to $(srcdir) before autoconf.
- X+
- X+Sat Dec 5 15:45:25 1992 Francois Pinard (pinard at icule)
- X+
- X+ * wdiff.c: Initialize the version[] string.
- X+ * version.c: Deleted.
- X+ * Makefile.in: Adjusted.
- X+
- X+ * From Paul Eggert <eggert@twinsun.com>:
- X+ readpipe.c: Beware that file descriptor 1 might not be opened.
- X+ writepipe.c: Beware that file descriptor 0 might not be opened.
- X+
- X+ * From David D `zoo' Zuhn <zoo@cygnus.com>:
- X+ Makefile.in: Define MAKEINFO as makeinfo, use it.
- X+
- X+ * From Karl Berry <karl@cs.umb.edu>:
- X+ Makefile.in (realclean): Remove wdiff.info.
- X+
- X+ Makefile.in (realclean): Remove configure.
- X+
- X+ * From Karl Berry <karl@cs.umb.edu>:
- X+ configure.in: Use AC_ISC_POSIX for defining -posix if necessary.
- X+
- X+Sat Nov 28 12:13:04 1992 Francois Pinard (pinard at icule)
- X+
- X+ * From Pierre Gaumond <gaumondp@ere.umontreal.ca>:
- X+ Makefile.in (clean, distclean): Remove clutter for ansi2knr.
- X+
- X+ * Makefile.in (texclean): New.
- X+
- X+ * Makefile.in (check): Add a `Check successful' message.
- X+
- X+ From Colin M. Brough <cmb@epcc.ed.ac.uk>:
- X+ * wdiff.1: New. This man page reflects wdiff at 0.03 level.
- X+ * Makefile.in: Distribute it.
- X+
- X+Mon Nov 23 08:48:41 1992 Francois Pinard (pinard at icule)
- X+
- X+ * Makefile.in (dist): Get .fname from the current directory name,
- X+ instead of from version.c. I need updating many files manually,
- X+ when the version changes, version.c is just one of them.
- X+
- X+ * cbars.sh: New. By default, cbars is not part of PROGS.
- X+ * Makefile.in: Prepare, install, and distribute it.
- X+
- X+Sun Nov 22 08:54:43 1992 Francois Pinard (pinard at icule)
- X+
- X+ From Per Cederqvist <ceder@lysator.liu.se>:
- X+ * wdiff.c (usage_and_exit): Use OLD_FILE and NEW_FILE in usage
- X+ message, instead of FILE_1 and FILE_2.
- X+
- X+ From Richard Stallman <rms@prep.ai.mit.edu>:
- X+ * Never launch pager by default. So, I'm adding option -a.
- X+
- X+ * wdiff.c: New -a option and autopager variable.
- X+ (main): Initialize and decode it.
- X+ (usage_and_exit): Announce it.
- X+ (launch_output_program): Implement it.
- X+
- X+ * wdiff.c: New -l option.
- X+ Rename pager_is_less to overstrike_for_less.
- X+ (main): Initialized and decode it.
- X+ (usage_and_exit): Announce it.
- X+ * wdiff.c: Rename is_printer to overstrike.
- X+ * wdiff.c: Rename is_display to find_termcap.
- X+ (main): Delay its initialization, so -l can force it to 0.
- X+
- X+ From Joe Wells <jbw@cs.bu.edu>:
- X+ * wdiff.c: New -n option and no_wrapping variable.
- X+ (main): Initialize and decode it.
- X+ (usage_and_exit): Announce it.
- X+ (copy_whitespace): Implement it.
- X+
- X+Sat Nov 21 16:35:15 1992 Francois Pinard (pinard at icule)
- X+
- X+ * configure.in: Use AC_CONST.
- X+ * wdiff.c: Never define const as empty, let configure do it. Also
- X+ remove volatile declaration as empty, it is unused.
- X+ * wdiff.c, version.c: Add a few const's.
- X+
- X+ From Roland McGrath <roland@gnu.ai.mit.edu>:
- X+ * wdiff.c: Remove `const' to `char *strstr();' declaration.
- X+
- X+ From Jim Meyering <meyering@cs.utexas.edu>:
- X+ * configure.in: Avoid gdiff for X as found on SGI systems. The
- X+ test presumes gdiff returns non-zero status if DISPLAY is defined
- X+ to be empty.
- X+
- X+Thu Nov 19 10:29:20 CST 1992 Jim Meyering (meyering@idefix.comco.com)
- X+
- X+ * configure.in: Add AC_UNISTD_H. Fix test for ANSI-ness.
- X+
- X+ * readpipe.c writepipe.c: Include unistd.h.
- X+ Parenthesize assignment used in boolean context.
- X+
- X+ * version.c: Remove copyright and print_copyright.
- X+
- X+ * wdiff.c: Add declaration of error.
- X+ (print_copyright): Moved copyright stuff here and declared static.
- X+ (reformat_diff_output): Add a do-nothing case for COPY_NORMAL
- X+ and a default that aborts to avoid warnings form gcc -Wall.
- X+ (complete_output_program): Add a default clause that aborts
- X+ to avoid warnings form gcc -Wall.
- X+
- X+Wed Nov 18 09:28:12 1992 Jim Meyering (meyering@idefix.comco.com)
- X+
- X+ * Makefile.in: Add another layer of double quotes so PAGER
- X+ and DIFF may contain spaces. Before, with PAGER='less -i'
- X+ compilation failed with unterminated string.
- X+
- X+Tue Nov 17 18:47:23 1992 Francois Pinard (pinard at icule)
- X+
- X+ From Larry W. Virden <lvirden@cas.org>:
- X+ * Makefefile.in (check): Warn that `exit status 1' is expected.
- X+
- X+Fri Nov 13 00:01:25 1992 Francois Pinard (pinard at icule)
- X+
- X+ * Makefile.in (dist): chmod a+r before making the tar file.
- X+
- X+ * aclocal.m4: Update FP_STDC_CHECK, replacing by FP_PROTOTYPES.
- X+ * configure.in: Adjust accordingly.
- X+
- X+Tue Oct 6 12:55:10 1992 Francois Pinard (pinard at icule)
- X+
- X+ * Makefile.in: Use exec_prefix. Add `uninstall'.
- X+
- X+Sun Aug 23 08:30:30 1992 Francois Pinard (pinard at icule)
- X+
- X+ * configure.in: Split FP_STDC_CHECK out into aclocal.m4.
- X+ * aclocal.m4: New.
- X+ * Makefile.in: Distribute aclocal.m4.
- X+
- X+Thu Aug 20 08:13:12 1992 Francois Pinard (pinard at icule)
- X+
- X+ * wdiff.c: With STDC_HEADERS, use <string.h>, not <strings.h>.
- X+
- X+Wed Aug 19 11:45:52 1992 Francois Pinard (pinard at icule)
- X+
- X+ From James Ganong <jeg@ced.berkeley.edu>:
- X+ * collatew.el: New, generalizes Emacs LISP `compage-windows'.
- X+ * Makefile.in: Distribute collatew.el.
- X+
- X+ * configure.in: To define DIFF, also try gnudiff and diffgnu, not
- X+ only gdiff and diff.
- X+
- X+ * ansi2knr.c: New, from Ghostscript distribution.
- X+ * unproto.l: Deleted.
- X+ * Makefile.in: Use ansi2knr instead of unproto.
- X+ * configure.in: Do not check anymore for `lex' or bad `const's.
- X+ * wdiff.c: Undefine `const' and `volatile' if not __STDC__.
- X+
- X+ * wdiff.c: Do not declare tgetstr without HAVE_TPUTS.
- X+
- X Tue Aug 18 03:57:06 1992 Francois Pinard (pinard at icule)
- X
- X * Version 0.03 released to alt.sources and ftp.uu.net:/tmp.
- X@@ -29,7 +229,7 @@
- X Sun Aug 16 09:28:50 1992 Francois Pinard (pinard at icule)
- X
- X * wdiff.c (usage_and_exit): Added -s description.
- X-
- X+
- X Sat Aug 15 09:27:31 1992 Francois Pinard (pinard at icule)
- X
- X * Version 0.02 released to alt.sources and ftp.uu.net:/tmp.
- X@@ -64,7 +264,7 @@
- X * wdiff.c: Declare tgetstr if <termcap.h> not included.
- X
- X * Makefile.in: Have check goal works, now that -d is gone.
- X-
- X+
- X Wed Aug 12 01:01:37 1992 Francois Pinard (pinard at icule)
- X
- X * Version 0.01 released to alt.sources and ftp.uu.net:/tmp.
- X@@ -80,7 +280,7 @@
- X * writepipe.c: New, provided by David Mackenzie.
- X * configure.in: Try defining PAGER to less or more. Also use our
- X strstr if necessary.
- X- * Makefile.in: Transmit PAGER to program. Also Handle strstr.c.
- X+ * Makefile.in: Transmit PAGER to program. Also handle strstr.c.
- X
- X * configure.in: Try defining DIFF to gdiff or diff.
- X * Makefile.in: Transmit DIFF to wdiff.c, which handles it already.
- X@@ -95,7 +295,7 @@
- X
- X * COPYING.LIB: New.
- X * Makefile.in: Distributing COPYING.LIB.
- X-
- X+
- X Tue Aug 11 15:10:37 1992 Francois Pinard (pinard at icule)
- X
- X * Version 0.0 released to alt.sources.
- X--- wdiff-0.03/INSTALL Fri Jun 19 15:07:44 1992
- X+++ wdiff-0.04/INSTALL Wed Oct 14 14:28:51 1992
- X@@ -15,32 +15,37 @@
- X directory). In some packages it creates a C header file containing
- X system-dependent definitions. It also creates a file `config.status'
- X that you can run in the future to recreate the current configuration.
- X-Running `configure' takes a minute or two.
- X
- X+Running `configure' takes a minute or two. While it is running, it
- X+prints some messages that tell what it is doing. If you don't want to
- X+see the messages, run `configure' with its standard output redirected
- X+to `/dev/null'; for example, `./configure >/dev/null'.
- X+
- X To compile the package in a different directory from the one
- X containing the source code, you must use a version of make that
- X supports the VPATH variable, such as GNU make. `cd' to the directory
- X where you want the object files and executables to go and run
- X-`configure' with the option `--srcdir=DIR', where DIR is the directory
- X-that contains the source code. Using this option is actually
- X-unnecessary if the source code is in the parent directory of the one
- X-in which you are compiling; `configure' automatically checks for the
- X-source code in `..' if it does not find it in the current directory.
- X+`configure'. `configure' automatically checks for the source code in
- X+the directory that `configure' is in and in `..'. If for some reason
- X+`configure' is not in the source code directory that you are
- X+configuring, then it will report that it can't find the source code.
- X+In that case, run `configure' with the option `--srcdir=DIR', where
- X+DIR is the directory that contains the source code.
- X
- X By default, `make install' will install the package's files in
- X /usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify
- X an installation prefix other than /usr/local by giving `configure' the
- X-option `--prefix=PATH'. Alternately, you can do so by changing the
- X-`prefix' variable in the Makefile that `configure' creates (the
- X-Makefile in the top-level directory, if the package contains
- X-subdirectories).
- X+option `--prefix=PATH'. Alternately, you can do so by giving a value
- X+for the `prefix' variable when you run `make', e.g.,
- X+ make prefix=/usr/gnu
- X
- X You can specify separate installation prefixes for
- X architecture-specific files and architecture-independent files. If
- X-you give `configure' the option `--exec_prefix=PATH', the package will
- X-use PATH as the prefix for installing programs and libraries. Data
- X-files and documentation will still use the regular prefix. Normally,
- X-all files are installed using the regular prefix.
- X+you give `configure' the option `--exec_prefix=PATH' or set the
- X+`make' variable `exec_prefix' to PATH, the package will use PATH as
- X+the prefix for installing programs and libraries. Data files and
- X+documentation will still use the regular prefix. Normally, all files
- X+are installed using the regular prefix.
- X
- X You can tell `configure' to figure out the configuration for your
- X system, and record it in `config.status', without actually configuring
- X@@ -47,8 +52,10 @@
- X the package (creating `Makefile's and perhaps a configuration header
- X file). To do this, give `configure' the `--no-create' option. Later,
- X you can run `./config.status' to actually configure the package. This
- X-option is useful mainly in `Makefile' rules for updating
- X-`config.status' and `Makefile'.
- X+option is useful mainly in `Makefile' rules for updating `config.status'
- X+and `Makefile'. You can also give `config.status' the `--recheck'
- X+option, which makes it re-run `configure' with the same arguments you
- X+used before. This is useful if you change `configure'.
- X
- X `configure' ignores any other arguments that you give it.
- X
- X@@ -75,9 +82,9 @@
- X LIBS Libraries to link with, in the form `-lfoo -lbar ...'
- X
- X If you need to do unusual things to compile the package, we encourage
- X-you to teach `configure' how to do them and mail the diffs to the
- X-address given in the README so we can include them in the next
- X-release.
- X+you to figure out how `configure' could check whether to do them, and
- X+mail diffs or instructions to the address given in the README so we
- X+can include them in the next release.
- X
- X 2. Type `make' to compile the package. If you want, you can override
- X the `make' variables CFLAGS and LDFLAGS like this:
- X@@ -84,10 +91,16 @@
- X
- X make CFLAGS=-O2 LDFLAGS=-s
- X
- X-3. Type `make install' to install programs, data files, and
- X+3. If the package comes with self-tests and you want to run them,
- X+type `make check'. If you're not sure whether there are any, try it;
- X+if `make' responds with something like
- X+ make: *** No way to make target `check'. Stop.
- X+then the package does not come with self-tests.
- X+
- X+4. Type `make install' to install programs, data files, and
- X documentation.
- X
- X-4. You can remove the program binaries and object files from the
- X+5. You can remove the program binaries and object files from the
- X source directory by typing `make clean'. To also remove the
- X Makefile(s), the header file containing system-dependent definitions
- X (if the package uses one), and `config.status' (all the files that
- X--- wdiff-0.03/Makefile.in Tue Aug 18 06:38:00 1992
- X+++ wdiff-0.04/Makefile.in Wed Dec 23 20:54:10 1992
- X@@ -15,118 +15,138 @@
- X # along with this program; if not, write to the Free Software
- X # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- X
- X+SHELL = /bin/sh
- X+
- X #### Start of system configuration section. ####
- X
- X srcdir = @srcdir@
- X VPATH = @srcdir@
- X+U = @U@
- X
- X CC = @CC@
- X DIFF = @DIFF@
- X-LEX = @LEX@
- X PAGER = @PAGER@
- X-
- X INSTALL = @INSTALL@
- X INSTALL_PROGRAM = @INSTALL_PROGRAM@
- X INSTALL_DATA = @INSTALL_DATA@
- X+MAKEINFO = makeinfo
- X+TEXI2DVI = texi2dvi
- X
- X-U = @U@
- X DEFS = @DEFS@
- X-PROGDEFS = -DDIFF_PROGRAM=\"$(DIFF)\" -DPAGER_PROGRAM=\"$(PAGER)\"
- X+PROGDEFS = -DDIFF_PROGRAM="\"$(DIFF)\"" -DPAGER_PROGRAM="\"$(PAGER)\""
- X+CFLAGS = -g
- X+LDFLAGS = -g
- X LIBS = @LIBS@
- X LIBOBJS = @LIBOBJS@
- X
- X-CFLAGS = -g -I$(srcdir)
- X-LDFLAGS = -g
- X-
- X prefix = /usr/local
- X exec_prefix = $(prefix)
- X-
- X bindir = $(exec_prefix)/bin
- X infodir = $(prefix)/info
- X+mandir = $(prefix)/man/man1
- X+manext = .1
- X
- X-#### End of system configuration section. ####
- X+# You might add cbars to PROGS if you feel like it.
- X+PROGS = wdiff
- X
- X-SHELL = /bin/sh
- X+#### End of system configuration section. ####
- X
- X-SRCS = wdiff.c version.c readpipe.c writepipe.c \
- X-error.c getopt.c getopt1.c xmalloc.c xstrdup.c alloca.c strstr.c
- X-OBJS = $Uwdiff.o $Uversion.o readpipe.o writepipe.o \
- X-error.o getopt.o getopt1.o xmalloc.o xstrdup.o $(ALLOCA) $(LIBOBJS)
- X-HDRS = getopt.h
- X-DISTFILES = README COPYING COPYING.LIB INSTALL ChangeLog Makefile.in \
- X-$(SRCS) $(HDRS) configure configure.in testinput1 testinput2 testoutput \
- X-wdiff.texi gpl.texinfo texinfo.tex wdiff.info c-boxes.el unproto.l
- X+.c.o:
- X+ $(CC) -c -I$(srcdir) $(CFLAGS) $(DEFS) $<
- X
- X+HEADERS = getopt.h pathmax.h
- X+SOURCES = wdiff.c readpipe.c writepipe.c \
- X+error.c getopt.c getopt1.c alloca.c strstr.c
- X+OBJECTS = $Uwdiff.o readpipe.o writepipe.o \
- X+error.o getopt.o getopt1.o $(ALLOCA) $(LIBOBJS)
- X+DISTFILES = README NEWS TODO THANKS COPYING INSTALL ChangeLog \
- X+configure.in aclocal.m4 Makefile.in ansi2knr.c \
- X+$(HEADERS) $(SOURCES) cbars.sh c-boxes.el check_it \
- X+wdiff.texi gpl.texinfo texinfo.tex wdiff.1 \
- X+configure wdiff.info
- X
- X-all: wdiff wdiff.info
- X+all: $(PROGS)
- X
- X-.c.o:
- X- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $<
- X+wdiff: $(OBJECTS)
- X+ $(CC) $(LDFLAGS) -o wdiff $(OBJECTS) $(LIBS)
- X
- X $Uwdiff.o: $Uwdiff.c
- X- $(CC) -c $(CFLAGS) $(CPPFLAGS) $(DEFS) $(PROGDEFS) $<
- X-
- X-install: all
- X- $(INSTALL_PROGRAM) wdiff $(bindir)/wdiff
- X- -$(INSTALL_DATA) $(srcdir)/wdiff.info $(infodir)/wdiff.info
- X-
- X-wdiff: $(OBJS)
- X- $(CC) $(LDFLAGS) -o wdiff $(OBJS) $(LIBS)
- X+ $(CC) -c -I$(srcdir) $(CFLAGS) $(DEFS) $(PROGDEFS) $<
- X
- X-wdiff.o getopt.o getopt1.o: getopt.h
- X+$Uwdiff.o: getopt.h pathmax.h
- X+getopt.o getopt1.o: getopt.h
- X
- X-_wdiff.c: wdiff.c unproto
- X- ./unproto < $(srcdir)/wdiff.c > _wdiff.c
- X+ansi2knr: ansi2knr.c
- X+ $(CC) $(CFLAGS) $(DEFS) -o ansi2knr $(srcdir)/ansi2knr.c
- X+_wdiff.c: wdiff.c ansi2knr
- X+ ./ansi2knr $(srcdir)/wdiff.c > _wdiff.c
- X
- X-_version.c: version.c unproto
- X- ./unproto < $(srcdir)/version.c > _version.c
- X+cbars: cbars.sh
- X+ sed -e 's|<bindir>|$(bindir)|' cbars.sh > cbars
- X
- X-unproto: unproto.l
- X- $(LEX) $(srcdir)/unproto.l
- X- $(CC) $(CFLAGS) -o unproto lex.yy.c
- X- rm -f yy.lex.c
- X+info: wdiff.info
- X
- X wdiff.info: wdiff.texi
- X- makeinfo -o wdiff.info $(srcdir)/wdiff.texi
- X+ $(MAKEINFO) -o wdiff.info $(srcdir)/wdiff.texi
- X
- X-check: wdiff
- X- -./wdiff $(srcdir)/testinput1 $(srcdir)/testinput2 > test.out
- X- @echo
- X- @echo Expect no output from following diff:
- X- @echo
- X- diff $(srcdir)/testoutput test.out
- X- rm -f test.out
- X+dvi: wdiff.dvi
- X
- X-Makefile: Makefile.in config.status
- X- ./config.status
- X+wdiff.dvi: wdiff.texi
- X+ $(TEXI2DVI) $(srcdir)/wdiff.texi
- X
- X-config.status: configure
- X- $(srcdir)/configure --no-create
- X+check: wdiff
- X+ $(srcdir)/check_it
- X
- X-configure: configure.in
- X- autoconf
- X+install: wdiff wdiff.info
- X+ for file in $(PROGS); do \
- X+ $(INSTALL_PROGRAM) $$file $(bindir)/$$file; \
- X+ done
- X+ $(INSTALL_DATA) $(srcdir)/wdiff.info $(infodir)/wdiff.info
- X+ -$(INSTALL_DATA) $(srcdir)/wdiff.1 $(mandir)/wdiff$(manext)
- X+
- X+uninstall:
- X+ for file in $(PROGS); do \
- X+ rm -f $(bindir)/$$file; \
- X+ done
- X+ rm -f $(infodir)/wdiff.info $(mandir)/wdiff$(manext)
- X+
- X+tags: TAGS
- X+
- X+TAGS: $(HEADERS) $(SOURCES)
- X+ etags $(HEADERS) $(SOURCES)
- X
- X-TAGS: $(SRCS)
- X- etags $(SRCS)
- X+texclean:
- X+ rm -f *.aux *.cp *.dvi *.fn *.ky *.log *.pg *.toc *.tp *.vr
- X
- X-clean:
- X- rm -f wdiff *.o core test.out
- X+mostlyclean: texclean
- X+ rm -f *.o *.elc core test.out *~
- X
- X-mostlyclean: clean
- X+clean: mostlyclean
- X+ rm -f $(PROGS) _*.c
- X
- X distclean: clean
- X- rm -f Makefile config.status
- X+ rm -f Makefile config.status ansi2knr TAGS
- X
- X realclean: distclean
- X- rm -f TAGS
- X+ rm -f wdiff.info
- X
- X dist: $(DISTFILES)
- X- echo wdiff-`sed -e '/version/!d' -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
- X+ echo `pwd` | sed 's|.*/||' > .fname
- X rm -rf `cat .fname`
- X mkdir `cat .fname`
- X ln $(DISTFILES) `cat .fname`
- X+ chmod -R a+r `cat .fname`
- X tar chZf `cat .fname`.tar.Z `cat .fname`
- X rm -rf `cat .fname` .fname
- X+
- X+Makefile: Makefile.in config.status
- X+ ./config.status
- X+
- X+config.status: configure
- X+ $(srcdir)/configure --no-create
- X+
- X+configure: configure.in aclocal.m4
- X+ cd $(srcdir); autoconf
- X
- X # Prevent GNU make v3 from overflowing arg limit on SysV.
- X .NOEXPORT:
- X--- wdiff-0.03/NEWS
- X+++ wdiff-0.04/NEWS Mon Dec 21 23:49:05 1992
- X@@ -0,0 +1,37 @@
- X+GNU wdiff NEWS - User visible changes.
- X+Copyright (C) 1992 Free Software Foundation, Inc.
- X+Francois Pinard <pinard@iro.umontreal.ca>, 1992.
- X+
- X+Version 0.04 - 21 December 1992, by Franc,ois Pinard
- X+
- X+* Add -a for automatic pager call, disallow this by default.
- X+* Add -l for less-like overstriking.
- X+* Add -n to forbid wrapping of differences.
- X+* New cbars script for producing change bars.
- X+* man page for wdiff 0.04. Contributed and supported by contributor.
- X+
- X+
- X+Version 0.03 - 18 August 1992, by Franc,ois Pinard
- X+
- X+* Provide more useful exit codes.
- X+* Increase portability.
- X+
- X+
- X+Version 0.02 - 15 August 1992, by Franc,ois Pinard
- X+
- X+* Avoid calling pager if PAGER is in environment, but empty.
- X+* Correct disposition problems, and avoid useless overstrikes.
- X+* Add -s for statistics.
- X+
- X+
- X+Version 0.01 - 12 August 1992, by Franc,ois Pinard
- X+
- X+* Rename old -1234 into -wxyz for selecting strings.
- X+* Add new -123 resembling comm, delete -d.
- X+* Automatically pipe through `more' or `less' when writing to terminal.
- X+
- X+
- X+Version 0.00 - 11 August 1992, by Franc,ois Pinard
- X+
- X+* Initial release.
- X+
- X--- wdiff-0.03/README Tue Aug 18 06:19:57 1992
- X+++ wdiff-0.04/README Wed Dec 23 21:05:55 1992
- X@@ -1,67 +1,152 @@
- X-README file for wdiff, last updated August 18, 1992.
- X+README file for GNU wdiff, last updated December 21, 1992.
- X Copyright (C) 1992 Free Software Foundation, Inc.
- X+Written by Francois Pinard <pinard@iro.umontreal.ca>.
- X
- X-Subject: wdiff 0.0 - Patch 3 (brings 0.02 to 0.03)
- X+Subject: Release of GNU wdiff, version 0.04
- X+Subject: GNU wdiff 0.0 - Patch 4, brings 0.03 to 0.04
- X
- X-Here is the version 0.03 test release of `wdiff'. All reported bugs
- X-in previous test releases have been fixed. Some bugs surely remain.
- X-Your feedback will help me to make `wdiff' better and more portable.
- X-Thanks to all those who contributed comments or suggestions.
- X-
- X-The program `wdiff' is a front end to `diff' for comparing files on a
- X-word per word basis. A word is anything between whitespace. This
- X-program is particularily useful for comparing two texts in which a few
- X-words have been changed and for which paragraphs have been refilled.
- X-`wdiff' is free software. See files COPYING and COPYING.LIB for
- X-copying conditions.
- X-
- X-This program does not require `termcap', but takes advantage of it.
- X-If your system does not have termcap, you might feel like getting and
- X-installing GNU termcap first. Grab termcap-1.0.tar.Z in /pub/gnu from
- X-prep.ai.mit.edu. *If* you do not have an ANSI-C compiler, you might
- X-still install `wdiff', BUT YOU NEED TO INSTALL FLEX FIRST. Get a copy
- X-of flex-2.3.7.tar.Z in /pub/gnu from prep.ai.mit.edu.
- X-
- X-This version improves the previous one in the following areas:
- X-
- X-* Exit code values like diff's: 0=identical, 1=differs, 2=others.
- X-* Provide alloca.c for those lacking it.
- X-* Provide unproto.l, which can help compiling with non-ANSI compilers.
- X-* Other portability glitches, thanks to all those who wrote.
- X-
- X-If a patch follows later in this file, apply it to wdiff-0.02 to get
- X-wdiff-0.03. It is a unified diff, you can apply it using a recent
- X-version of the `patch' program, like patch-2.0.12u7.tar.Z in /pub/gnu
- X+The program wdiff, version 0.04, is now available on prep.ai.mit.edu,
- X+in directory pub/gnu, as file wdiff-0.04.tar.Z. All reported bugs
- X+have been fixed. Some bugs surely remain. Your feedback will help me
- X+to make wdiff better and more portable. Please report any wdiff
- X+problems to me or to bug-gnu-utils@prep.ai.mit.edu. Thanks to all
- X+those who contributed comments or suggestions.
- X+
- X+Read the file NEWS for an inventory of user visible changes, and file
- X+ChangeLog for a detailed list of all changes. You will find below a
- X+description of wdiff, how to get its documentation, how to apply the
- X+current patch, a few installation notes you should read and, finally,
- X+the answer to some frequently asked questions.
- X+
- X+Installation has been simplified. Flex is not anymore required for
- X+non ANSI-C compilers. wdiff uses the first found of gnudiff, diffgnu,
- X+gdiff or diff. Some other portability problems have been alleviated.
- X+
- X+James Ganong <jeg@ced.berkeley.edu> wrote collatew.el, generalizing
- X+the Emacs LISP compare-windows function in the spirit of wdiff;
- X+however, his package is not part of the wdiff distribution. Email to
- X+James or me for a copy.
- X+
- X+Colin Brough <cmb@epcc.ed.ac.uk> contributed a man page, describing
- X+wdiff at level 0.04. The man page will be distributed and installed
- X+along with wdiff as long as Colin will want to maintain it.
- X+
- X+.------------------.
- X+| What is wdiff? |
- X+`------------------'
- X+
- X+The program wdiff is a front end to diff for comparing files on a word
- X+per word basis. A word is anything between whitespace. This program
- X+is particularily useful for comparing two texts in which a few words
- X+have been changed and for which paragraphs have been refilled. wdiff
- X+is free software. See files COPYING and COPYING.LIB for copying
- X+conditions.
- X+
- X+This program does not require termcap, but takes advantage of it. If
- X+your system does not have termcap, you might feel like getting and
- X+installing GNU termcap first. Grab termcap-1.1.tar.Z in /pub/gnu from
- X+prep.ai.mit.edu.
- X+
- X+.-----------------.
- X+| Documentation |
- X+`-----------------'
- X+
- X+Calling just wdiff, without arguments, will summarize its usage. The
- X+true documentation is in Texinfo format. You can look at the file
- X+wdiff.info using any ASCII editor, or even print the file as is. You
- X+may browse it from inside GNU Emacs by typing:
- X+
- X+ C-u M-x info RET wdiff.info RET
- X+
- X+or, using the standalone Info reader, through the command:
- X+
- X+ info -f wdiff.info
- X+
- X+If you have TeX, execute the command:
- X+
- X+ tex wdiff.texi
- X+
- X+then process and print wdiff.dvi the usual way. You can find makeinfo
- X+and the standalone info reader in file texinfo-2.15.tar.Z in /pub/gnu
- X+from prep.ai.mit.edu: just unpack it and look into the C subdirectory.
- X+
- X+.----------------------.
- X+| Applying the Patch |
- X+`----------------------'
- X+
- X+This section is for you only if you received this as an introduction
- X+to a patch in diff format. Apply this patch to wdiff-0.03 to get
- X+wdiff-0.04. It is a unified diff, you can apply it using a recent
- X+version of the patch program, like patch-2.0.12g8.tar.Z in /pub/gnu
- X from prep.ai.mit.edu. Given you have it, first save this article in
- X file THIS_ARTICLE, then execute the following commands:
- X
- X- cd wdiff-0.02
- X+ cd wdiff-0.03
- X patch < THIS_ARTICLE
- X
- X-If you just patched `wdiff', or if you received it in shar format,
- X-beware the time stamps might be improper. You might somewhat
- X-alleviate the problem with the two following commands:
- X+If you just patched wdiff, or if you received it whole in shar format,
- X+the time stamps might be improper. You might somewhat alleviate the
- X+problem with the two following commands:
- X
- X touch configure <- if you forget this, you need autoconf!
- X touch wdiff.info <- if you forget this, you need makeinfo!
- X
- X-You can also get a fully patched version, for at least a few days, as
- X-wdiff-0.03.tar.Z in /tmp from ftp.uu.net. In any case, see the file
- X-INSTALL for building and installation instructions. Please send all
- X-bug reports by electronic mail to: <pinard@iro.umontreal.ca>.
- X-
- X-Let me add a few words about the documentation. Calling just `wdiff',
- X-without arguments, will summarize its usage. The true documentation
- X-is in Texinfo format. You can look at the file wdiff.info using any
- X-ASCII editor, or even print the file as is. You may browse it using
- X-GNU Emacs Info mode: `C-u M-x info RET wdiff.info RET' or, using the
- X-standalone Info reader, through: `info -f wdiff.info'. If you have
- X-TeX, first insure `.' is in TEXINPUTS, execute `tex wdiff.texi', then
- X-process and print wdiff.dvi the usual way. You can find makeinfo and
- X-the standalone info reader in file texinfo-2.15.tar.Z in /pub/gnu from
- X-prep.ai.mit.edu: just unpack it and look into the C subdirectory.
- X-
- X---
- X-Franc,ois Pinard ``Vivement GNU!'' pinard@iro.umontreal.ca
- X-(514) 588-4656 ...!uunet!iros1!pinard
- X-Consider joining the League for Programming Freedom. Email for details!
- X+.----------------------.
- X+| Installation notes |
- X+`----------------------'
- X+
- X+See the file INSTALL for building and installation instructions.
- X+However, beware of these peculiarities:
- X+
- X+* There is a simple minded change bars producer in wdiff, which is not
- X+installed by default, nor documented. If you nevertheles want it, one
- X+way to get it is requesting, at the final installation step:
- X+
- X+ make install PROGS='wdiff cbars'
- X+
- X+* If you have both more and less, you prefer more to less, your PAGER
- X+environment variable does not tell about more, then prefix the call to
- X+configure with your pager selection, as in:
- X+
- X+ PAGER=more sh configure
- X+
- X+* If you have termcap emulation routines in libcurses.a and you do not
- X+have libtermcap.a, and until I find a way to do better, please use:
- X+
- X+ LIBS=-lcurses sh configure
- X+
- X+.------------------------------.
- X+| Frequently Asked Questions |
- X+`------------------------------'
- X+
- X+Q: How is wdiff different from diff -w?
- X+
- X+wdiff finds word differences, ignoring spaces, tabs and newlines,
- X+while diff -w finds *line* differences, ignoring spaces and tabs.
- X+Also, each program uses its own output format.
- X+
- X+Q: How about spiff by Dan Nachbar <nachbar@bellcore.com>?
- X+
- X+spiff is far more general than wdiff. On the other end, wdiff is a
- X+lot faster, needs almost no memory, and can afford handling big files
- X+in reasonnable time. Despite its lack of generality, wdiff does one
- X+of the most usual jobs, so it is quite useful after all. I might try
- X+retrofitting some of spiff features into wdiff, but not on short term.
- X+
- X+Q: How much memory wdiff exactly needs?
- X+
- X+wdiff uses a fixed amount of memory. Long lines or long files are no
- X+handicap. All the true work is done by diff under the scene, and diff
- X+needs memory itself. GNU diff swallows both files in memory first.
- X+
- X+Q: Why not simply apply diff to files split one word per line?
- X+
- X+You like the way wdiff formats its output. And it's speedier too.
- X+
- X+Q: Why calling an external diff? Could not diff be built in wdiff?
- X+
- X+It's not fruitful to rewrite another diff. I'd rather see wdiff
- X+integrated in GNU diff than the other way around. This might come.
- X+When wdiff will have matured enough, it *might* be integrated into GNU
- X+diff distribution, or in GNU diff itself.
- X+
- X--- wdiff-0.03/THANKS
- X+++ wdiff-0.04/THANKS Tue Dec 22 00:26:57 1992
- X@@ -0,0 +1,28 @@
- X+GNU wdiff THANKS file - last updated on 21 December 1992.
- X+Copyright (C) 1992 Free Software Foundation, Inc.
- X+Francois Pinard <pinard@iro.umontreal.ca>, 1992.
- X+
- X+GNU wdiff has originally been written by Franc,ois Pinard. Many
- X+people further contributed to GNU wdiff by reporting problems,
- X+suggesting various improvements or submitting actual code. Here is a
- X+list of these people. Help me keeping it complete and exempt of
- X+errors.
- X+
- X+Andy Norman <ange@hplb.hpl.hp.com>
- X+Colin Brough <cmb@epcc.ed.ac.uk>
- X+David Zuhn <zoo@cygnus.com>
- X+Francois Pinard <pinard@iro.umontreal.ca>
- X+James Ganong <jeg@ced.berkeley.edu>
- X+Jim Meyering <meyering@cs.utexas.edu>
- X+Joe Wells <jbw@cs.bu.edu>
- X+Karl Berry <karl@cs.umb.edu>
- X+Larry Virden <lvirden@cas.org>
- X+Paul Eggert <eggert@twinsun.com>
- X+Paul Fox <pgf@cayman.com>
- X+Per Cederqvist <ceder@lysator.liu.se>
- X+Pierre Gaumond <gaumondp@ere.umontreal.ca>
- X+Richard Stallman <rms@prep.ai.mit.edu>
- X+Robert Chassell <bob@gnu.ai.mit.edu>
- X+Roland McGrath <roland@gnu.ai.mit.edu>
- X+Steve Fisk <fisk@polar.bowdoin.edu>
- X+Zhuo Zang <zzang@stat.ufl.edu>
- X--- wdiff-0.03/TODO
- X+++ wdiff-0.04/TODO Wed Dec 23 16:48:00 1992
- X@@ -0,0 +1,22 @@
- X+TODO file for GNU wdiff - last revised 21 December 1992.
- X+Copyright (C) 1992 Free Software Foundation, Inc.
- X+Francois Pinard <pinard@iro.umontreal.ca>, 1992.
- X+
- X+These are more or less in decreasing order of priority.
- X+
- X+* Check how wdiff.dvi prints.
- X+
- X+* Implement a clever combination of these two ideas: (1) have a wpatch
- X+program (Zhuo Zang <zzang@stat.ufl.edu>, 1992-08-13); (2) use unified
- X+diff format (Per Cederqvist <ceder@lysator.liu.se>, 1992-11-22).
- X+
- X+* Detect and configure termcap better.
- X+
- X+* Support systems with terminfo and without termcap.
- X+
- X+* Select by options exactly what is whitespace.
- X+
- X+* Merge some spiff features into wdiff.
- X+
- X+* Merge all of wdiff into GNU diff.
- X+
- X--- wdiff-0.03/aclocal.m4
- X+++ wdiff-0.04/aclocal.m4 Sun Nov 22 11:16:32 1992
- X@@ -0,0 +1,18 @@
- X+dnl Local additions to Autoconf macros.
- X+dnl Copyright (C) 1992 Free Software Foundation, Inc.
- X+dnl Francois Pinard <pinard@iro.umontreal.ca>, 1992.
- X+dnl
- X+define(FP_PROTOTYPES,
- X+[echo checking for ANSI prototypes
- X+AC_PROGRAM_EGREP(yes,
- X+[#ifdef __STDC__
- X+ yes
- X+#endif
- X+], , U=_)
- X+AC_SUBST(U)])dnl
- X+dnl
- X+define(FP_VARLENGTH_ARRAYS,
- X+[echo checking for variable length arrays
- X+AC_TEST_PROGRAM([f(n)int n;{int array[n];}main(){f(7);exit(0);}
- X+], AC_DEFINE(HAVE_VARLENGTH_ARRAYS))
- X+])dnl
- X--- wdiff-0.03/alloca.c Mon Mar 30 18:01:49 1992
- X+++ wdiff-0.04/alloca.c Tue Dec 1 13:25:53 1992
- X@@ -30,8 +30,11 @@
- X static char SCCSid[] = "@(#)alloca.c 1.1"; /* for the "what" utility */
- X #endif
- X
- X-#ifdef emacs
- X+#ifdef HAVE_CONFIG_H
- X #include "config.h"
- X+#endif
- X+
- X+#ifdef emacs
- X #ifdef static
- X /* actually, only want this if static is defined as ""
- X -- this is for usg, in which emacs must undefine static
- X--- wdiff-0.03/ansi2knr.c
- X+++ wdiff-0.04/ansi2knr.c Sat Dec 19 18:09:17 1992
- X@@ -0,0 +1,302 @@
- X+/* Copyright (C) 1989, 1991 Aladdin Enterprises. All rights reserved.
- X+ Distributed by Free Software Foundation, Inc.
- X+
- X+This file is part of Ghostscript.
- X+
- X+Ghostscript is distributed in the hope that it will be useful, but
- X+WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
- X+to anyone for the consequences of using it or for whether it serves any
- X+particular purpose or works at all, unless he says so in writing. Refer
- X+to the Ghostscript General Public License for full details.
- X+
- X+Everyone is granted permission to copy, modify and redistribute
- X+Ghostscript, but only under the conditions described in the Ghostscript
- X+General Public License. A copy of this license is supposed to have been
- X+given to you along with Ghostscript so you can know your rights and
- X+responsibilities. It should be in a file named COPYING. Among other
- X+things, the copyright notice and this notice must be preserved on all
- X+copies. */
- X+
- X+/* ansi2knr.c */
- X+/* Convert ANSI function declarations to K&R syntax */
- X+#include <stdio.h>
- X+#include <ctype.h>
- X+extern char *xmalloc ();
- X+#ifndef HAVE_STRING_H
- X+#ifndef STDC_HEADERS
- X+#define strchr index
- X+#endif
- X+#endif
- X+extern char *strchr ();
- X+
- X+/* Usage:
- X+ ansi2knr input_file output_file
- X+ * If no output_file is supplied, output goes to stdout.
- X+ * There are no error messages.
- X+ *
- X+ * ansi2knr recognizes functions by seeing a non-keyword identifier
- X+ * at the left margin, followed by a left parenthesis,
- X+ * with a right parenthesis as the last character on the line.
- X+ * It will recognize a multi-line header if the last character
- X+ * on each line but the last is a left parenthesis or comma.
- X+ * These algorithms ignore whitespace and comments, except that
- X+ * the function name must be the first thing on the line.
- X+ * The following constructs will confuse it:
- X+ - Any other construct that starts at the left margin and
- X+ follows the above syntax (such as a macro or function call).
- X+ - Macros that tinker with the syntax of the function header.
- X+ */
- X+
- X+/* Scanning macros */
- X+#define isidchar(ch) (isalnum(ch) || (ch) == '_')
- X+#define isidfirstchar(ch) (isalpha(ch) || (ch) == '_')
- X+
- X+main(argc, argv)
- X+ int argc;
- X+ char *argv[];
- X+{ FILE *in, *out;
- X+#define bufsize 500 /* arbitrary size */
- X+ char buf[bufsize];
- X+ char *line;
- X+ switch ( argc )
- X+ {
- X+ default:
- X+ printf("Usage: ansi2knr input_file [output_file]\n");
- X+ exit(0);
- X+ case 2:
- X+ out = stdout; break;
- X+ case 3:
- X+ out = fopen(argv[2], "w");
- X+ if ( out == NULL )
- X+ { fprintf(stderr, "Cannot open %s\n", argv[2]);
- X+ exit(1);
- X+ }
- X+ }
- X+ in = fopen(argv[1], "r");
- X+ if ( in == NULL )
- X+ { fprintf(stderr, "Cannot open %s\n", argv[1]);
- X+ exit(1);
- X+ }
- X+ fprintf(out, "#line 1 \"%s\"\n", argv[1]);
- X+ line = buf;
- X+ while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL )
- X+ { switch ( test1(buf) )
- X+ {
- X+ case 1: /* a function */
- X+ convert1(buf, out);
- X+ break;
- X+ case -1: /* maybe the start of a function */
- X+ line = buf + strlen(buf);
- X+ continue;
- X+ default: /* not a function */
- X+ fputs(buf, out);
- X+ break;
- X+ }
- X+ line = buf;
- X+ }
- X+ if ( line != buf ) fputs(buf, out);
- X+ fclose(out);
- X+ fclose(in);
- X+ return 0;
- X+}
- X+
- X+/* Skip over space and comments, in either direction. */
- X+char *
- X+skipspace(p, dir)
- X+ register char *p;
- X+ register int dir; /* 1 for forward, -1 for backward */
- X+{ for ( ; ; )
- X+ { while ( isspace(*p) ) p += dir;
- X+ if ( !(*p == '/' && p[dir] == '*') ) break;
- X+ p += dir; p += dir;
- X+ while ( !(*p == '*' && p[dir] == '/') )
- X+ { if ( *p == 0 ) return p; /* multi-line comment?? */
- X+ p += dir;
- X+ }
- X+ p += dir; p += dir;
- X+ }
- X+ return p;
- X+}
- X+
- X+/*
- X+ * Write blanks over part of a string.
- X+ */
- X+void
- X+writeblanks(start, end)
- X+ char *start;
- X+ char *end;
- X+{ char *p;
- X+ for ( p = start; p < end; p++ ) *p = ' ';
- X+}
- X+
- X+/*
- X+ * Test whether the string in buf is a function definition.
- X+ * The string may contain and/or end with a newline.
- X+ * Return as follows:
- X+ * 0 - definitely not a function definition;
- X+ * 1 - definitely a function definition;
- X+ * -1 - may be the beginning of a function definition,
- X+ * append another line and look again.
- X+ */
- X+test1(buf)
- X+ char *buf;
- X+{ register char *p = buf;
- X+ char *bend;
- X+ char *endfn;
- X+ int contin;
- X+ if ( !isidfirstchar(*p) )
- X+ return 0; /* no name at left margin */
- X+ bend = skipspace(buf + strlen(buf) - 1, -1);
- X+ switch ( *bend )
- X+ {
- X+ case ')': contin = 1; break;
- X+ case '(':
- X+ case ',': contin = -1; break;
- X+ default: return 0; /* not a function */
- X+ }
- X+ while ( isidchar(*p) ) p++;
- X+ endfn = p;
- X+ p = skipspace(p, 1);
- X+ if ( *p++ != '(' )
- X+ return 0; /* not a function */
- X+ p = skipspace(p, 1);
- X+ if ( *p == ')' )
- X+ return 0; /* no parameters */
- X+ /* Check that the apparent function name isn't a keyword. */
- X+ /* We only need to check for keywords that could be followed */
- X+ /* by a left parenthesis (which, unfortunately, is most of them). */
- X+ { static char *words[] =
- X+ { "asm", "auto", "case", "char", "const", "double",
- X+ "extern", "float", "for", "if", "int", "long",
- X+ "register", "return", "short", "signed", "sizeof",
- X+ "static", "switch", "typedef", "unsigned",
- X+ "void", "volatile", "while", 0
- X+ };
- X+ char **key = words;
- X+ char *kp;
- X+ int len = endfn - buf;
- X+ while ( (kp = *key) != 0 )
- X+ { if ( strlen(kp) == len && !strncmp(kp, buf, len) )
- X+ return 0; /* name is a keyword */
- X+ key++;
- X+ }
- X+ }
- X+ return contin;
- X+}
- X+
- X+convert1(buf, out)
- X+ char *buf;
- X+ FILE *out;
- X+{ char *endfn = strchr(buf, '(') + 1;
- X+ register char *p;
- X+ char **breaks;
- X+ unsigned num_breaks = 2; /* for testing */
- X+ char **btop;
- X+ char **bp;
- X+ char **ap;
- X+top: p = endfn;
- X+ breaks = (char **)malloc(sizeof(char *) * num_breaks * 2);
- X+ if ( breaks == 0 )
- X+ { /* Couldn't allocate break table, give up */
- X+ fprintf(stderr, "Unable to allocate break table!\n");
- X+ fputs(buf, out);
- X+ return -1;
- X+ }
- X+ btop = breaks + num_breaks * 2 - 2;
- X+ bp = breaks;
- X+ /* Parse the argument list */
- X+ do
- X+ { int level = 0;
- X+ char *end = NULL;
- X+ if ( bp >= btop )
- X+ { /* Filled up break table. */
- X+ /* Allocate a bigger one and start over. */
- X+ free((char *)breaks);
- X+ num_breaks <<= 1;
- X+ goto top;
- X+ }
- X+ *bp++ = p;
- X+ /* Find the end of the argument */
- X+ for ( ; end == NULL; p++ )
- X+ { switch(*p)
- X+ {
- X+ case ',': if ( !level ) end = p; break;
- X+ case '(': level++; break;
- X+ case ')': if ( --level < 0 ) end = p; break;
- X+ case '/': p = skipspace(p, 1) - 1; break;
- X+ default: ;
- X+ }
- X+ }
- X+ p--; /* back up over terminator */
- X+ /* Find the name being declared. */
- X+ /* This is complicated because of procedure and */
- X+ /* array modifiers. */
- X+ for ( ; ; )
- X+ { p = skipspace(p - 1, -1);
- X+ switch ( *p )
- X+ {
- X+ case ']': /* skip array dimension(s) */
- X+ case ')': /* skip procedure args OR name */
- X+ { int level = 1;
- X+ while ( level )
- X+ switch ( *--p )
- X+ {
- X+ case ']': case ')': level++; break;
- X+ case '[': case '(': level--; break;
- X+ case '/': p = skipspace(p, -1) + 1; break;
- X+ default: ;
- X+ }
- X+ }
- X+ if ( *p == '(' && *skipspace(p + 1, 1) == '*' )
- X+ { /* We found the name being declared */
- X+ while ( !isidfirstchar(*p) )
- X+ p = skipspace(p, 1) + 1;
- X+ goto found;
- X+ }
- X+ break;
- X+ default: goto found;
- X+ }
- X+ }
- X+found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' )
- X+ { p++;
- X+ if ( bp == breaks + 1 ) /* sole argument */
- X+ writeblanks(breaks[0], p);
- X+ else
- X+ writeblanks(bp[-1] - 1, p);
- X+ bp--;
- X+ }
- X+ else
- X+ { while ( isidchar(*p) ) p--;
- X+ *bp++ = p+1;
- X+ }
- X+ p = end;
- X+ }
- X+ while ( *p++ == ',' );
- X+ *bp = p;
- X+ /* Make a special check for 'void' arglist */
- X+ if ( bp == breaks+2 )
- X+ { p = skipspace(breaks[0], 1);
- X+ if ( !strncmp(p, "void", 4) )
- X+ { p = skipspace(p+4, 1);
- X+ if ( p == breaks[2] - 1 )
- X+ { bp = breaks; /* yup, pretend arglist is empty */
- X+ writeblanks(breaks[0], p + 1);
- X+ }
- X+ }
- X+ }
- X+ /* Put out the function name */
- X+ p = buf;
- X+ while ( p != endfn ) putc(*p, out), p++;
- X+ /* Put out the declaration */
- X+ for ( ap = breaks+1; ap < bp; ap += 2 )
- X+ { p = *ap;
- X+ while ( isidchar(*p) ) putc(*p, out), p++;
- X+ if ( ap < bp - 1 ) fputs(", ", out);
- X+ }
- X+ fputs(") ", out);
- X+ /* Put out the argument declarations */
- X+ for ( ap = breaks+2; ap <= bp; ap += 2 ) (*ap)[-1] = ';';
- X+ fputs(breaks[0], out);
- X+ free((char *)breaks);
- X+ return 0;
- X+}
- X--- wdiff-0.03/cbars.sh
- X+++ wdiff-0.04/cbars.sh Mon Nov 23 09:11:18 1992
- X@@ -0,0 +1,13 @@
- X+#!/bin/sh
- X+# Produce change bars from two revisions of a document.
- X+# Copyright (C) 1992 Free Software Foundation, Inc.
- X+# Francois Pinard <pinard@iro.umontreal.ca>, 1992.
- X+
- X+usage="$0 OLD_FILE NEW_FILE"
- X+
- X+if [ $# -ne 2 ]; then
- X+ echo "$usage"; exit
- X+fi
- X+
- X+<bindir>/wdiff -1n $1 $2 |
- X+ sed -e 's/^/ /;/{+/s/^ /|/;s/{+//g;s/+}//g'
- X--- wdiff-0.03/check_it
- X+++ wdiff-0.04/check_it Wed Dec 23 12:11:25 1992
- X@@ -0,0 +1,157 @@
- X+#!/bin/sh
- X+# Check wdiff against some simple test cases.
- X+# Copyright (C) 1992 Free Software Foundation, Inc.
- X+
- X+wdiff=./wdiff
- X+input1=/tmp/wd.$$a
- X+input2=/tmp/wd.$$b
- X+expect=/tmp/wd.$$c
- X+output=/tmp/wd.$$d
- X+
- X+fail="echo; echo Check FAILED; rm -f $input1 $input2 $expect $output; exit 1"
- X+trap "$fail" 1 2 3 14 15
- X+
- X+cat > $input1 <<END_OF_FILE
- X+This is input1
- X+The quick brown fox jumps over the lazy dog.
- X+The hurried orange fox jumps over the lazy dog.
- X+A slow green panda walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+
- X+cat > $input2 <<END_OF_FILE
- X+This is input2
- X+The quick brown fox jumps over the lazy dog.
- X+The slow red fox jumps over the lazy dog.
- X+A slow, short green giraffe walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+
- X+echo "Checking wdiff"
- X+cat > $expect <<END_OF_FILE
- X+This is [-input1-] {+input2+}
- X+The quick brown fox jumps over the lazy dog.
- X+The [-hurried orange-] {+slow red+} fox jumps over the lazy dog.
- X+A [-slow-] {+slow, short+} green [-panda-] {+giraffe+} walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+$wdiff $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -1"
- X+cat > $expect <<END_OF_FILE
- X+This is {+input2+}
- X+The quick brown fox jumps over the lazy dog.
- X+The {+slow red+} fox jumps over the lazy dog.
- X+A {+slow, short+} green {+giraffe+} walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+$wdiff -1 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -2"
- X+cat > $expect <<END_OF_FILE
- X+This is [-input1-]
- X+The quick brown fox jumps over the lazy dog.
- X+The [-hurried orange-] fox jumps over the lazy dog.
- X+A [-slow-] green [-panda-] walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+$wdiff -2 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -3"
- X+cat > $expect <<END_OF_FILE
- X+
- X+======================================================================
- X+ [-input1-] {+input2+}
- X+======================================================================
- X+ [-hurried orange-] {+slow red+}
- X+======================================================================
- X+ [-slow-] {+slow, short+}
- X+======================================================================
- X+ [-panda-] {+giraffe+}
- X+======================================================================
- X+END_OF_FILE
- X+$wdiff -3 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -12"
- X+cat > $expect <<END_OF_FILE
- X+This is
- X+======================================================================
- X+
- X+The quick brown fox jumps over the lazy dog.
- X+The
- X+======================================================================
- X+ fox jumps over the lazy dog.
- X+A
- X+======================================================================
- X+ green
- X+======================================================================
- X+ walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+$wdiff -12 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -13"
- X+cat > $expect <<END_OF_FILE
- X+
- X+======================================================================
- X+ input2
- X+======================================================================
- X+ slow red
- X+======================================================================
- X+ slow, short
- X+======================================================================
- X+ giraffe
- X+======================================================================
- X+END_OF_FILE
- X+$wdiff -13 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -23"
- X+cat > $expect <<END_OF_FILE
- X+
- X+======================================================================
- X+ input1
- X+======================================================================
- X+ hurried orange
- X+======================================================================
- X+ slow
- X+======================================================================
- X+ panda
- X+======================================================================
- X+END_OF_FILE
- X+$wdiff -23 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -123"
- X+cat > $expect <<END_OF_FILE
- X+END_OF_FILE
- X+$wdiff -123 $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -123s"
- X+cat > $expect <<END_OF_FILE
- X+$input1: 39 words 34 87% common 0 0% deleted 5 12% changed
- X+$input2: 40 words 34 85% common 0 0% inserted 6 15% changed
- X+END_OF_FILE
- X+$wdiff -123s $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+echo "Checking wdiff -wxyz"
- X+cat > $expect <<END_OF_FILE
- X+This is (input1) <<input2>>
- X+The quick brown fox jumps over the lazy dog.
- X+The (hurried orange) <<slow red>> fox jumps over the lazy dog.
- X+A (slow) <<slow, short>> green (panda) <<giraffe>> walks around a sleeping cat.
- X+The middling red fox jumps over the lazy dog.
- X+END_OF_FILE
- X+$wdiff -w\( -x\) -y\<\< -z\>\> $input1 $input2 > $output
- X+diff $expect $output || eval "$fail"
- X+
- X+rm -f $input1 $input2 $expect $output
- X+echo
- X+echo All checks successful
- X--- wdiff-0.03/configure Tue Aug 18 04:56:44 1992
- X+++ wdiff-0.04/configure Wed Dec 23 20:54:00 1992
- X@@ -1,4 +1,3 @@
- X-
- X #!/bin/sh
- X # Guess values for system-dependent variables and create Makefiles.
- X # Generated automatically using autoconf.
- X@@ -78,12 +77,19 @@
- X
- X # Find the source files, if location was not specified.
- X if test -z "$srcdir"; then
- X- srcdirdefaulted=yes; srcdir=.
- X- if test ! -r $unique_file; then srcdir=..; fi
- X+ srcdirdefaulted=yes
- X+ # Try the directory containing this script, then `..'.
- X+ prog=$0
- X+ confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
- X+ test "X$confdir" = "X$prog" && confdir=.
- X+ srcdir=$confdir
- X+ if test ! -r $srcdir/$unique_file; then
- X+ srcdir=..
- X+ fi
- X fi
- X if test ! -r $srcdir/$unique_file; then
- X if test x$srcdirdefaulted = xyes; then
- X- echo "configure: Can not find sources in \`.' or \`..'." 1>&2
- X+ echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
- X else
- X echo "configure: Can not find sources in \`${srcdir}'." 1>&2
- X fi
- X@@ -123,37 +129,9 @@
- X fi
- X rm -f conftest*
- X
- X-if test -z "$LEX"; then
- X- echo checking for flex
- SHAR_EOF
- true || echo 'restore of Patch4 failed'
- fi
- echo 'End of part 1'
- echo 'File Patch4 is continued in part 2'
- echo 2 > _shar_seq_.tmp
- exit 0
- --
- Franc,ois Pinard ``Happy GNU Year!'' pinard@iro.umontreal.ca
- (514) 588-4656 ...!uunet!iros1!pinard
- About the League for Programming Freedom? Email me or lpf@uunet.uu.net
-