Commit Graph

21 Commits

Author SHA1 Message Date
Andrew Bromage
b3af56e8fa Modified files
Estimated hours taken: 30

Modified files
--------------

samples/diff/Mmakefile:
	Minor documentation update.

samples/diff/README:
samples/diff/TODO:
	Update stuff that's now done, do a couple of minor wording
	changes.

samples/diff/diff.m:
	Fix case of identical filenames (which implicitly assumed
	no_diff_implies_no_output).  Add new match pass, call the
	new diff algorithm.

samples/diff/diff_out.m:
	Add --cvs-merge-conflict output style.  Slight reorganisation
	of top-level predicate.  Lots of small fixes to use better
	syntax (e.g. functional style for integer maths operations).

samples/diff/difftype.m:
	Added first_mentioned_positions/3, last_mentioned_positions/3,
	add_edit/4.

samples/diff/file.m:
	Use io__read_line_as_string.

samples/diff/filter.m:
	Minor syntax/wording changes.

samples/diff/options.m:
	Update all the newly handled options.

New files
---------

samples/diff/myers.m:
	New diff algorithm.

samples/diff/match.m:
	New pass to match common lines in the files to be diffed.

Removed file
------------

samples/diff/lcss.m:
	Functionality replaced by myers.m.
1998-09-15 04:54:41 +00:00
Andrew Bromage
bc0a109801 Modified files
Estimated hours taken: 30

Modified files
--------------

samples/diff/README:
	Info about this new version.  Put the existing READMEs in
	reverse order, so that they'll be in the most sensible order
	for someone reading top-down.

samples/diff/Mmakefile:
	Supply more detail about which bit of this program GCC 2.7.2
	under Digital Unix 3.2 doesn't compile properly.

samples/diff/diff.m:
	Slight reorganisation.  Accept options, remove some high
	coupling betweem diff__do_diff and lcss.m.

samples/diff/file.m:
	Add support for attaching a filename to a file.

samples/diff/lcss.m:
	Add more documentation, one slight performance improvement.
	lcss__to_diff now works on the reversed LCSS, to avoid going
	to the trouble of reversing it.

New files
---------

samples/diff/TODO:
	Meaning should be obvious.

samples/diff/diff_out.m:
	Replacement for diffs.m (which was never a very good name).
	Now contains code to display a diff in lots more output
	styles than previously supported.

samples/diff/difftype.m:
	Replacement for lcsstype.m.  Contains the type of a diff (but
	not of an lcss, which is now local to lcss.m, hence the
	renaming).

samples/diff/filter.m:
	Contains code to filter a diff before being displayed.  This
	is only required if the user specified that they didn't want
	to see part of the diff (e.g. with --ignore-blank-lines).

samples/diff/globals.m:
samples/diff/options.m:
	Support for option handling.

Removed files
-------------

samples/diff/diffs.m:
	Functionality moved to diff_out.m.

samples/diff/lcsstype.m:
	Functionality moved to difftype.m.
1998-01-13 00:52:08 +00:00
Fergus Henderson
2c4bd735b4 Add comment "This source file is hereby placed in the public domain".
Estimated hours taken: 0.25

samples/*:
	Add comment "This source file is hereby placed in the public domain".
1997-09-10 11:01:12 +00:00
Andrew Bromage
34ecf2050a Minor documentation fix.
Estimated hours taken: 0.05

Minor documentation fix.

samples/diff/README:
	It was, of course, not the fix which caused diff to bomb out,
	it was the problem solved by the fix.
1997-07-28 20:02:48 +00:00
Andrew Bromage
fb95516511 Added a clitic which was left out of the previous by mistake.
Estimated hours taken: very little

samples/diff/README:
	Added a clitic which was left out of the previous by mistake.
1997-07-28 06:03:49 +00:00
Andrew Bromage
5d9c15639c General cleanup and bug fix for diff. Features of this diff:
Estimated hours taken: 4

General cleanup and bug fix for diff.  Features of this diff:

	- Changed indenting so it more closely matches the
	  coding standard.

	- Bug fix which was causing it to bomb out if the two
	  files were identical.

	- Update to use unique arrays (array.m).

samples/diff/README:
	Added something which resembles this log message.

samples/diff/Mmakefile:
	Turned C optimisation off to get around a gcc 2.7.2 bug.

samples/diff/diff.m:
samples/diff/diffs.m:
samples/diff/file.m:
samples/diff/lcss.m:
samples/diff/lcsstype.m:
	Changes detailed above.
1997-07-28 06:00:55 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Fergus Henderson
f4a5dce039 Fix a couple of singleton variable warnings by prepending `_'
Estimated hours taken: 0.25

samples/diff/lcss.m:
	Fix a couple of singleton variable warnings by prepending `_'
	to the name of a couple of unused variable.
1997-04-15 05:02:33 +00:00
Fergus Henderson
8235e7af29 Rename all the Mmake' files as Mmakefile'.
Estimated hours taken: 0.5

Rename all the `Mmake' files as `Mmakefile'.  This is necessary to
avoid confusion between `Mmake' and `mmake' on case-insensitive file
systems.
1997-02-13 21:37:32 +00:00
Fergus Henderson
6a7d427f99 Committed the changes sent by Marnix Klooster <marnix@worldonline.nl>.
Estimated hours taken: 0.5

samples/diff:
	Committed the changes sent by Marnix Klooster <marnix@worldonline.nl>.
	His description of the changes:

	The major changes I made were

	* Moved code for manipulating and displaying diffs to a separate
	  module called diffs.m (and changed their calls in diff.m).  The type
	  'lcss,' needed both by the rest of lcss.m and by diffs.m, was moved
	  to a new module lcsstype.m.

	* Made lcss.m independent of files, and allowed it to process any kind
	  of list by adding polymorphism.  (The file processing calls have
	  been moved to diff.m.)

	* Added type synonyms 'pos' and 'segment' in diffs.m to clarify the
	  types.  Renamed 'single_diff' to 'edit'.

	* Added end-of-file match to the generated lcss, thereby allowing the
	  to_diff predicate to be simplified considerably.

	* Numbered lists from 0 internally in the lcss-algorithm.  This made
	  to_diff simpler still, but also forced changes in the diff-printing
	  part.

	* Removed the swapping in find_lcss, because it doesn't seem to help.

	* The array(string) representing a file in file.m was also renumbered
	  to begin with 0.

	* Added and corrected comments.

	Have fun,

	 <><

	Marnix
	--
	Marnix Klooster
	marnix@worldonline.nl
1996-10-29 17:11:56 +00:00
Fergus Henderson
e8f11687cd Add a .cvsignore file to the samples/Diff directory to keep `cvs update' quiet.
Estimated hours taken: 0.05

Add a .cvsignore file to the samples/Diff directory to keep `cvs update' quiet.
1996-01-23 09:31:16 +00:00
Andrew Bromage
e0872a7a4b Some cleanups so that diff works (better) with Prolog. 1995-06-16 06:46:32 +00:00
Andrew Bromage
d6a5cdfb75 General cleanups. 1995-06-02 03:55:39 +00:00
Andrew Bromage
e6c3613121 Final changes to diff, at least until getopt is done. 1995-06-01 06:08:39 +00:00
Andrew Bromage
15f345d18d More documentation added. 1995-05-31 06:07:04 +00:00
Andrew Bromage
37af6ba074 Lcss: the documented version. (Version with references coming soon.) 1995-05-31 05:52:15 +00:00
Fergus Henderson
70ad060033 Add a sample Mmake file.
samples/Diff/Mmake:
	Add a sample Mmake file.
1995-05-30 18:35:54 +00:00
Andrew Bromage
b4c351084f New improved diff! O(n log n) algorithm. 1995-05-25 05:34:41 +00:00
Andrew Bromage
dad6dd3982 Used new algorithm in diff 1995-05-24 04:53:43 +00:00
Andrew Bromage
946f58e744 Removed debug info from lcss 1995-05-23 00:16:41 +00:00
Andrew Bromage
7620375940 Diff sample program 1995-05-23 00:11:21 +00:00