Commit Graph

77 Commits

Author SHA1 Message Date
Fergus Henderson
dc919accb8 Add an example of interfacing to Fortran code from Mercury.
samples/c_interface/mercury_calls_fortran/*:
	Add an example of interfacing to Fortran code from Mercury.
1998-05-19 10:13:59 +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
086d75a334 New file. An example of the use of tr_store.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.
1997-09-29 15:25:58 +00:00
Andrew Bromage
e72e23910e No longer GPL, now public domain.
samples/e.m:
samples/eliza.m:
	No longer GPL, now public domain.
1997-09-12 02:17:13 +00:00
Thomas Conway
8d79000cf8 Place various bits of sample code in the public domain.
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.
1997-09-11 22:08:56 +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
Fergus Henderson
7d46fde7f3 Update to use the new mercury_init() and mercury_terminate()
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.
1997-09-06 13:04:32 +00:00
Fergus Henderson
f5af5c9b20 Update to use the new mercury_init() and mercury_terminate()
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.
1997-09-06 13:03:58 +00:00
Andrew Bromage
2eee071261 Added a new sample program, e.m, and fixed some out-of-date
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.
1997-07-28 21:52:35 +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
cb3e03212c Add new directory with new files README, c_main.c, Mmakefile,
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.
1997-07-25 03:55:51 +00:00
Fergus Henderson
9aaa21696f Add new directory with new files README, c_main.c, Mmakefile,
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.
1997-07-25 03:55:18 +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
ddb73722b9 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:38:45 +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
53aa3ff948 The #include of "mercury_lib.h" should be the first #include,
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.
1997-02-01 13:54:05 +00:00
Fergus Henderson
d988e8c82e Add an example of Mercury calling C++ code.
Estimated hours taken: 0.25

samples/c_interface/mercury_calls_cplusplus/*:
	Add an example of Mercury calling C++ code.
1997-01-31 19:04:47 +00:00
Fergus Henderson
0b1322d17c Add an example of C++ code caling Mercury code.
Estimated hours taken: 0.5

samples/cplusplus_calls_mercury/*:
	Add an example of C++ code caling Mercury code.
1997-01-31 18:57:02 +00:00
Fergus Henderson
4d4fb31484 Add a .cvsignore file.
Estimated hours taken: 0.1

samples/c_interface/mercury_calls_c:
	Add a .cvsignore file.
1997-01-17 07:58:16 +00:00
Fergus Henderson
b060c3897f Add a .cvsignore file to get CVS to ignore automatically-generated
Estimated hours taken: 0.1

samples/c_interface/c_calls_mercury:
	Add a .cvsignore file to get CVS to ignore automatically-generated
	files.
1997-01-17 07:55:45 +00:00
Fergus Henderson
fedf4f472d Update now that exporting semidet procedures works.
Estimated hours taken: 0.5

samples/c_interface/c_calls_mercury:
	Update now that exporting semidet procedures works.
	Add some examples of exporting functions.
1996-12-20 17:50:20 +00:00
Fergus Henderson
aadb280399 Remove the line "MCFLAGS=--no-optimize-dead-procs # XXX work-around
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.
1996-12-14 20:35:42 +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
7100cacc35 Add new file expand_terms to the list of programs.
Estimated hours taken: 0.1

samples/Mmake:
	Add new file expand_terms to the list of programs.
1996-07-25 17:17:47 +00:00
Fergus Henderson
8275d8af9b Mention the new file expand_terms.m.
Estimated hours taken: 0.1

samples/README:
	Mention the new file expand_terms.m.
1996-07-25 17:14:21 +00:00
Fergus Henderson
c50b78c6b2 A new example, showing how to emulate Prolog's expand_term.
Estimated hours taken: 1

samples/expand_terms:
	A new example, showing how to emulate Prolog's expand_term.
1996-07-25 17:09:47 +00:00
Fergus Henderson
f83f6fe53e Update the documentation to reflect the new semantics
Estimated hours taken: 0.25

samples/committed_choice.m:
	Update the documentation to reflect the new semantics
	(commutative v.s. strict sequential).
1996-07-25 15:49:19 +00:00
Fergus Henderson
2d69792a1b Remove an obsolete comment.
Estimated hours taken: 0.25

samples/all_solutions.m:
	Remove an obsolete comment.
1996-07-15 14:14:21 +00:00
Fergus Henderson
5fb6b8421f Add a file describing the contents of the samples directory.
Estimated hours taken: 0.25

samples/README:
	Add a file describing the contents of the samples directory.
1996-06-11 04:50:57 +00:00
Fergus Henderson
78896d77ca Add another example of the use of the C interface.
Estimated hours taken: 0.25

samples/c_interface/short_example.m:
	Add another example of the use of the C interface.
1996-06-11 04:37:09 +00:00
Fergus Henderson
fb0c3822aa Add a new directory containing an example of the use of the
Estimated hours taken: 0.5

samples/c_interface/c_calls_mercury/*:
	Add a new directory containing an example of the use of the
	C interface.
1996-06-11 04:35:25 +00:00
Fergus Henderson
4c540ddb7b Add missing #include to suppress compiler warning.
Estimated hours taken: 0.1

samples/C_Interface/mercury_calls_c/c_main.c:
	Add missing #include to suppress compiler warning.
1996-06-11 03:55:16 +00:00
Fergus Henderson
553a278171 Add an example of using the Mercury->C interface.
Estimated hours taken: 0.5

samples/C_interface/c_calls_mercury/*:
	Add an example of using the Mercury->C interface.
1996-05-25 07:18:14 +00:00
Zoltan Somogyi
dd9619d20b s/varset__lookup/varset__search/
Estimated hours taken: 0.1

interpreter:
	s/varset__lookup/varset__search/
1996-03-17 04:22:44 +00:00
Fergus Henderson
3cea9507db Add `interpreter.m' to the samples directory.
Estimated hours taken: 0.1

Add `interpreter.m' to the samples directory.
1996-03-03 22:56:52 +00:00
Fergus Henderson
b67c6e6ee1 Due to popular demand, I have finally succumbed and written a
Estimated hours taken: 0.5

samples/calculator.m:
	Due to popular demand, I have finally succumbed and written a
	"nicer" version of this.
1996-03-01 13:25:56 +00:00
Fergus Henderson
fc6843e0c9 Import `bool'.
Estimated hours taken: 0.1

samples/eliza.m:
	Import `bool'.
1996-02-08 18:34:36 +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
Fergus Henderson
786b2a6db3 Add a .cvsignore file to the samples directory to keep `cvs update' quiet.
Estimated hours taken: 0.05

Add a .cvsignore file to the samples directory to keep `cvs update' quiet.
1996-01-23 09:31:06 +00:00
Fergus Henderson
2aad165033 Declare main as cc_multi', not multi'.
Estimated hours taken: 0.1

samples/committed_choice.m:
	Declare main as `cc_multi', not `multi'.
1996-01-23 09:21:18 +00:00
Fergus Henderson
2c0e0c3d31 Remove the stuff about stripping the executables, since `ml'
Estimated hours taken: 0.25

scripts/Mmake:
	Remove the stuff about stripping the executables, since `ml'
	does that by default now.
1996-01-23 09:04:55 +00:00
Fergus Henderson
df41b9b715 Declare main/2 as cc_multi, not multi.
Estimated hours taken: 0.25

samples/calculator.m:
	Declare main/2 as cc_multi, not multi.
	Add a comment about the "1 - 2 - 3" bug.
1996-01-22 13:46:48 +00:00
Fergus Henderson
b8990c9970 Add `:- import_module assoc_list', since assoc_list is no longer
Estimated hours taken: 0.1

samples/eliza.m:
	Add `:- import_module assoc_list', since assoc_list is no longer
	part of std_util.
1995-12-28 04:59:56 +00:00
Andrew Bromage
512833bb45 Undoing the unique modes stuff. 1995-10-09 03:38:45 +00:00
Andrew Bromage
2cb9744d1e Added some unique modes to eliza. 1995-10-09 02:10:32 +00:00
Zoltan Somogyi
f1dbcc38f6 Add sort to the list of programs to be compiled.
Mmake:
	Add sort to the list of programs to be compiled.
1995-10-08 11:27:54 +00:00
Zoltan Somogyi
a2611254a3 A simple program for use in 247.
sort:
	A simple program for use in 247.

ultra_sub:
	Fix a spelling error.
1995-10-08 11:26:50 +00:00