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.
Estimated hours taken: 0.1
extras/trailed_update/samples/interpreter.m:
New file. An example of the use of tr_store.m.
samples/interpreter.m:
Add pointer to extras/trailed_update/samples/interpreter.m.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/interpreter.inp:
extras/trailed_update/samples/interpreter.exp:
extras/trailed_update/samples/vqueens.exp:
New files. Some testing infrastructure.
Estimated hours taken: 0.1
Place various bits of sample code in the public domain.
extras/complex_numbers/samples/fft.m:
extras/graphics/samples/calc/calc.m:
extras/graphics/samples/maze/maze.m:
samples/ultra_sub.m:
place the source in the public domain.
samples/c_interface/simpler_c_calls_mercury/README:
samples/c_interface/simpler_c_calls_mercury/c_main.c:
samples/c_interface/simpler_c_calls_mercury/mercury_lib.m:
samples/c_interface/simpler_cplusplus_calls_mercury/README:
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.cc:
samples/c_interface/simpler_cplusplus_calls_mercury/mercury_lib.m:
Update to use the new mercury_init() and mercury_terminate()
functions.
Estimated hours taken: 1
samples/c_interface/simpler_c_calls_mercury/README:
samples/c_interface/simpler_c_calls_mercury/c_main.c:
samples/c_interface/simpler_c_calls_mercury/mercury_lib.m:
samples/c_interface/simpler_cplusplus_calls_mercury/README:
samples/c_interface/simpler_cplusplus_calls_mercury/cpp_main.cc:
samples/c_interface/simpler_cplusplus_calls_mercury/mercury_lib.m:
Update to use the new mercury_init() and mercury_terminate()
functions.
Estimated hours taken: 3
Added a new sample program, e.m, and fixed some out-of-date
documentation.
samples/Mmakefile:
samples/e.m:
Sample program 'e' which calculates the base of natural
logarithms to lots of digits (if you're prepared to wait).
samples/README:
Added documentation for e.m, updated documentation for
samples/diff/* to reflect recent changes.
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.
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.
samples/c_interface/simpler_c_calls_mercury:
Add new directory with new files README, c_main.c, Mmakefile,
and mercury_lib.m. These files demonstrate how to interface
to C using a C main() top-level rather than with a Mercury
main/2 top-level.
samples/c_interface/simpler_cplusplus_calls_mercury:
Same as above, but using C++ rather than C.
Estimated hours taken: 3
samples/c_interface/simpler_c_calls_mercury:
Add new directory with new files README, c_main.c, Mmakefile,
and mercury_lib.m. These files demonstrate how to interface
to C using a C main() top-level rather than with a Mercury
main/2 top-level.
samples/c_interface/simpler_cplusplus_calls_mercury:
Same as above, but using C++ rather than C.
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.
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.
Estimated hours taken: 0.25
samples/c_calls_mercury/c_main.c:
The #include of "mercury_lib.h" should be the first #include,
because that includes "imp.h" which may define global
register variables that need to be declared before any
inline functions in other header files.
Estimated hours taken: 0.5
samples/c_interface/c_calls_mercury:
Update now that exporting semidet procedures works.
Add some examples of exporting functions.
Estimated hours taken: 0.25
samples/c_interface/c_calls_mercury/Mmake:
Remove the line "MCFLAGS=--no-optimize-dead-procs # XXX work-around
for compiler bug", since the bug it refers to has been fixed.
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