Commit Graph

29 Commits

Author SHA1 Message Date
Julien Fischer
8c7beeccdc Update programming style in extras/complex_numbers.
extras/complex_numbers/*/*.m:
    As above.
2022-01-18 16:23:55 +11:00
Julien Fischer
d218e1b573 Various fixes for the extras.
extras/complex_numbers/*.m:
    Rename files containing submodules so that we can (correctly) build
    this library without first building a source file mapping.

extras/complex_numbers/samples/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
    Tell the C compiler where the header files for libcomplex_numbers
    are.

extras/curs/samples/Mmakefile:
    Pass the -I option to the C compiler via the CFLAGS variable, not
    the MGNUCFLAGS variable; the latter just causes the mgnuc script
    to halt option processing and construct an invalid command line
    for the C compiler.

extras/curses/*.m:
    Rename files containing submodules so that we can (correctly) build
    this library without first building a source file mapping.

extras/curses/mcurses.m:
    Style and formatting fixes.

extras/curses/sample/Mmakefile:
     Pass the -I option to the C compiler via the CFLAGS variable.
2022-01-17 22:46:06 +11:00
Mark Brown
d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00
Paul Bone
fc4b3ff196 Remove .cvsignore files
Remove old .cvsignore files, moving their contents to .gitignore files.
There are now no .cvsignore files in the repository.

I've also sorted some .gitignore files and avoided repeating a pattern in a
subdirectory's .gitignore file when it is already mentioned in the parent
.gitignore file.
2017-04-04 12:05:56 +10:00
Julien Fischer
1e9847eed3 Formatting fixes for extras/complex_numbers.
extras/complex_numbers/*.m:
    Delete trailing whitespace.

    Fix header comments.
2015-12-17 09:43:25 +11:00
Zoltan Somogyi
d33273d033 Tell vim not to expand tabs in Makefiles.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.

*/Makefile:
*/Mmakefile:
    As above.

tests/hard_coded/.gitignore:
    Don't ignore the purity subdir. This ignore must have been left over
    from when purity.m was a test in hard_coded, not hard_coded/purity,
    and it ignored an executable, not a directory.
2015-01-08 22:07:29 +11:00
Sebastian Godelet
f9899940b7 Add .gitignore files to the extras/ directory
extras/.gitignore:
    Mercury ignores the --use-{grade}-subdir dir
    Mercury/** for git 1.8+ this recursively ignores all build files
    ignoring *.mh and *.init files
    *.err output files
    lib*.{dll|so|a|dylib} ignores target compiler library output
    *.jar ignores the Java grade output
    *.exe for Windows executables

extras/dynamic_linking/.gitignore:
    ignoring the copy of dl.m, name_mangle.m
    ignoring hello lib and dl_test* executables

extras/moose/samples/.gitignore:
    ignoring cgram.m small.m alpha.m expr.m which are
    generated from the .moo grammar files

extras/graphics/mercury_cairo/samples/.gitignore:
    ignoring *.png output and all executables

extras/**/.gitignore:
    In each sample/test/example folder the linux executable/test
    output is ignored
2014-02-27 16:58:43 +11:00
Julien Fischer
df345f7258 Ignore generated files in the extras.
Branches: main, 11.07

extras/*/.cvsignore:
	Ignore generated files in the extras.
2011-11-18 03:03:26 +00:00
Julien Fischer
1bac7f91fe Cleanups for the complex numbers library.
Estimated hours taken: 1
Branches: main, release

Cleanups for the complex numbers library.

extras/complex_numbers/*.m:
extras/complex_numbers/samples/fft.m:
extras/complex_numbers/tests/complex_test.m:
	Convert these modules to four-space indentation.

	Conform to our current coding standard.
2006-04-10 06:33:27 +00:00
Ralph Becket
99a227a3bc Use Re + Im*i' instead of complex(Re, Im)'.
Estimated hours taken: 0.25
Branches: main

extras/complex_numbers/samples/fft.m:
	Use `Re + Im*i' instead of `complex(Re, Im)'.
2005-09-12 04:34:45 +00:00
Ian MacLarty
492eeb30ab Get the complex numbers sample to compile.
Estimated hours taken: 0.2
Branches: main

Get the complex numbers sample to compile.

extras/complex_numbers/samples/fft.m:
	Add a main predicate so this sample compiles.
2005-09-08 07:44:02 +00:00
Julien Fischer
ae4b976adc Standardize the module qualifier used in this modules
Estimated hours taken: 0.1
Branches: main, release

extras/complex_numbers/*.m:
extras/complex_numbers/samples/fft.m:
extras/complex_numbers/tests/complex_test.m:
	Standardize the module qualifier used in this modules
	to `.'.
2005-02-09 12:50:24 +00:00
Julien Fischer
0a25274404 Fix up some minor things in the extras distribution.
Estimated hours taken: 0.5
Branches: main

Fix up some minor things in the extras distribution.

extras/cgi/Mmakefile:
	Don't warn about mercury_www not exporting anything.

extras/complex_numbers/*.m:
	Replace `:' as the module qualifier.

	Use float.float/1 instead of the now obsolete
	int.to_float/2.

extras/concurrency/midimon.m:
	Replace `:' as the module qualifier.

extras/trailed_update/Mmakefile:
	Don't warn about trailed_update not exporting anything.

extras/xml/*.m:
	Replace `:' as the module qualifier.
	Remove some unnecessary imports.
	Put an underscore in front of an unused variable.
2004-07-30 07:04:45 +00:00
Fergus Henderson
dced016cc1 Fix a problem where different packages in the `extras' distribution
Estimated hours taken: 3
Branches: main, release

Fix a problem where different packages in the `extras' distribution
were being installed in different directories when you specified
INSTALL_PREFIX in the Mmake.params file.  Some honoured the INSTALL_PREFIX
setting, some appended "/extras", and some ignored it completely.

Also, add `clean' and `realclean' targets for the extras directory hierarchy,
and fix a few other minor bugs.

extras/lazy_evaluation/Mmakefile:
	Include Mmake.params, which previously wasn't included at all
	in this file.

extras/logged_output/Mmakefile:
extras/odbc/Mmakefile:
extras/quickcheck/Mmakefile:
	Append "/extras" to INSTALL_PREFIX, which previously wasn't done
	at all in these directories.

extras/cgi/Mmakefile:
extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/curs/Mmakefile:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/moose/Mmakefile:
extras/posix/Mmakefile:
	Move the line `INSTALL_PREFIX := $(INSTALL_PREFIX/extras)'
	to before the include of Mmake.params, so as not to override
	the user's setting (only override the default setting).

extras/Mmakefile:
extras/concurrency/Mmakefile:
	Add `clean' and `realclean' targets.

extras/posix/Mmakefile:
	Add MGNUCFLAGS = --no-ansi, since this is needed on some systems.

extras/quickcheck/Mmakefile:
	Add "depend", "all", and "install" targets.
	Ensure that the "check" target runs the test program.

extras/quickcheck/qcheck.m:
	Set the exit status to non-zero if a test fails.

extras/references/Mmakefile:
	Adjust the setting of LIBGRADES to account for the fact that
	$(GRADE) is no longer implicitly included in $(LIBGRADES).
2003-01-16 10:44:26 +00:00
Fergus Henderson
d62c697231 Add appropriate infrastructure to support doing `mmake depend && mmake
Estimated hours taken: 2
Branches: main

Add appropriate infrastructure to support doing `mmake depend && mmake
&& mmake install' in the `extras' directory, and having it automatically
install and build as much as possible.

extras/Mmakefile:
	New file.

extras/cgi/Mmakefile:
	Delete bogus reference to `ALL_LIBGRADES' and `mercury-config'.

extras/complex_numbers/Mmakefile:
extras/concurrency/Mmakefile:
extras/concurrency/concurrency.m:
extras/curses/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/lazy_evaluation/Mmakefile:
extras/lex/Mmakefile:
extras/moose/Mmakefile:
extras/xml/Mmakefile:
	Add rules for `mmake install'.

extras/references/scoped_update.m:
	Add macro guard around typedef in `c_header_code'.

extras/curs/Mmakefile:
extras/curses/Mmakefile:
	Define MERCURY_BOOTSTRAP_H, to avoid name clash on `bool'
	that is caused by our bootstrap code in runtime/Merucry.h.

extras/curs/curs.m:
	Add `promise_pure' declarations for all pure procedures.
	XXX Should this be needed?  These predicates all take
	io__state arguments.
2002-03-06 10:10:31 +00:00
Simon Taylor
34d45ca185 Fix the copyright notice dates from my last change.
Estimated hours taken: 0.1
Branches: main, release

extras/complex_numbers/*.m:
	Fix the copyright notice dates from my last change.
2001-09-23 06:35:24 +00:00
Simon Taylor
f3d7a66039 Remove reverse modes of arithmetic functions (as with the
Estimated hours taken: 0.5
Branches: main, release

extras/complex_numbers/*.m:
	Remove reverse modes of arithmetic functions (as with the
	reverse modes of the functions in float.m, these functions
	aren't actually reversible because of rounding errors).

extras/complex_numbers/complex_numbers.m:
	Add missing `:- include module' declarations for complex_float.m
	and float_complex.m.

extras/complex_numbers/complex_float.m:
extras/complex_numbers/float_complex.m:
	Fix some compile errors.

NEWS:
	Document the changes.
2001-09-22 12:10:28 +00:00
Zoltan Somogyi
a1cd1a1633 Optionally test the extras directory during bootchecks.
Estimated hours taken: 4

Optionally test the extras directory during bootchecks.

tools/bootcheck
	Add an option, -e, for testing the extras directory. Rename the
	-T/--test-only option as -n/--no-bootcheck, since it does not prevent
	the testing of the extras.

	Bootcheck only test the subdirectories in extras which have an
	Mmakefile and which can be tested in all grades and in all setups.

extras/*/Mmakefile:
	Updates to include extras/Mmake.params if it exists (to get the
	parameters, including grades, of the bootcheck) and to add a check
	target, which in most cases does not do anything yet (which means
	that the only testing we do is checking that the program compiles
	all right). Making "mmake check" do something meaningful will be
	up to the authors of the various subdirectories involved.

	In many cases, add .PHONY annotations on the relevant targets,
	and copyright notices.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of the aditi subdirectory from
	bootcheck, since this can be done only on a machine with Aditi
	installed.

extras/aditi/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with Aditi installed.

extras/dynamic_linking/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with the dl library already
	installed.

extras/logged_out/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in grades with the right kind of stream
	support.

extras/odbc/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only on a machine with ODBC installed.

extras/references/NOBOOTTEST:
extras/trailed_update/NOBOOTTEST:
	Prevent the automatic testing of this subdirectory from bootcheck,
	since this can be done only in trailing grades.

extras/*/.nocopyright:
	Mention the NOBOOTTEST files in the relevant .nocopyright files.
2000-11-21 23:52:54 +00:00
Zoltan Somogyi
76943f86ff New files.
Estimated hours taken: 0.1

extras/*/.nocopyright:
	New files.
2000-11-21 23:48:36 +00:00
Warwick Harvey
174ea0ff5b Split the automatically generated .dep' file into two files. The new .dv'
Estimated hours taken: 15

Split the automatically generated `.dep' file into two files.  The new `.dv'
file contains all the variable definitions which used to be in the `.dep'
file, which now contains just the rules.  With mmake including the `.dv'
files before the user's Mmakefile and the `.dep' files after, this allows
user-defined Mmakefiles to refer to the automatically-generated variables
and automatically-generated rules to refer to variables defined in the
user's Mmakefile.  This was possible before to a limited extent, but in
particular dependency lists for automatically-generated rules could not
refer to user-defined variables.

Also introduced `C2INITARGS' as part of an illustration of how this change
is useful (though probably this should be a separate change).  `C2INITARGS'
should be used to specify extra files to be passed to `c2init', rather than
the currently-used `C2INITFLAGS' (which should only be used for option
flags).  The `_init.c' target should depend on these extra arguments, but it
was not possible to do this automatically prior to this change (at least,
not if one wanted to support per-program specification of `C2INITARGS').

compiler/modules.m:
	Generate the new `.dv' files and revised `.dep' files.
	Update the `change_clean' and `real_clean' targets to delete the
	`.dv' files.
	Update the `_init.c' rule to refer to `$(ALL_C2INITARGS)' as well as
	`$(ALL_C2INITFLAGS)', and add a dependency on `$(ALL_C2INITARGS)'.

scripts/Mmake.rules:
	Add appropriate rules and dependencies for `.dv' files.

scripts/Mmake.vars.in:
	Add definitions for implementing `C2INITARGS'.

scripts/mmake.in:
	Add code for using `.dv' files (while maintaining backward
	compatibility for when they don't exist).

doc/user_guide.texi:
	Document the new `.dv' files.
	Document the new `C2INITARGS' variables and the dependencies they
	imply.

../clpr/Mmakefile:
../clpr/samples/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/graphics/mercury_opengl/Mmakefile:
extras/references/samples/Mmakefile:
extras/references/tests/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/Mmakefile:
	Update to use `C2INITARGS' instead of `C2INITFLAGS', where
	appropriate, and remove any now-obsolete `%_init.c' dependencies
	(which wouldn't have worked anyway since GNU Make ignores pattern
	dependencies with no commands).
1999-07-20 03:39:24 +00:00
Fergus Henderson
0a70f11335 Fix a compilation error: need to import the
Estimated hours taken: 0.25

extras/complex_numbers/samples/fft.m:
	Fix a compilation error: need to import the
	parent module `complex_numbers' before importing
	the child module `complex_numbers:complex'.
1998-11-18 16:29:40 +00:00
Fergus Henderson
ae9150f1a1 Use sub-modules to package up the modules in extras/complex_numbers
Estimated hours taken: 0.25

Use sub-modules to package up the modules in extras/complex_numbers
into a single module.

extras/complex_numbers/complex_numbers.m:
	I forgot to `cvs add' this file before committing my last change.

extras/complex_numbers/samples/fft.m:
	I forgot to change the `import_module' declaration here
	to import `complex_numbers:complex' instead of `complex'.
1998-05-30 12:10:19 +00:00
Fergus Henderson
d23f11ac33 Use sub-modules to package up the modules in extras/complex_numbers
Estimated hours taken: 0.75

Use sub-modules to package up the modules in extras/complex_numbers
into a single module.

extras/complex_numbers/complex_lib.m:
extras/complex_numbers/complex_numbers.m:
	Rename complex_lib.m as complex_numbers.m,
	and modify it to use sub-modules.

extras/complex_numbers/*.m:
extras/complex_numbers/tests/complex_test.m:
extras/complex_numbers/samples/fft.m:
	Add `complex_numbers:' to all of the `:- module'
	and `:- import_module' declarations.

extras/complex_numbers/Mmakefile:
extras/complex_numbers/tests/Mmakefile:
extras/complex_numbers/samples/Mmakefile:
	Modify to reflect the renaming from `complex_lib' to
	`complex_numbers'.
1998-05-29 09:08:43 +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
a9cc396fd3 Add a simple `Mmakefile' file to build the complex number library.
Estimated hours taken: 0.25

extras/complex_numbers/Mmakefile:
	Add a simple `Mmakefile' file to build the complex number library.
1997-08-14 12:36:43 +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
c0e6ab9bbf Add an Mmakefile to build the complex number library, using the
extras/complex_numbers/*:
	Add an Mmakefile to build the complex number library, using the
	new support for user-defined libraries.
	Move the test cases into a new subdirectory `tests'.
	Add a new subdirectory `samples', containing an example
	module `fft.m' that uses the library.
	Add a README file.

extras/complex_numbers/complex.m:
	Add new functions `complex/1' (converts float to complex),
	`cis' (cos + i * sin), and `conj'.
	Rename `norm' as `abs2' (square of absolute value).
1997-07-16 07:54:37 +00:00
Fergus Henderson
95ba2a021c Add an Mmakefile to build the complex number library, using the
Estimated hours taken: 3

extras/complex_numbers/*:
	Add an Mmakefile to build the complex number library, using the
	new support for user-defined libraries.
	Move the test cases into a new subdirectory `tests'.
	Add a new subdirectory `samples', containing an example
	module `fft.m' that uses the library.
	Add a README file.

extras/complex_numbers/complex.m:
	Add new functions `complex/1' (converts float to complex),
	`cis' (cos + i * sin), and `conj'.
	Rename `norm' as `abs2' (square of absolute value).
1997-07-16 07:54:22 +00:00
Fergus Henderson
4971aa96ba New modules to support complex numbers.
Estimated hours taken: 8

extras/complex_numbers/complex.m:
extras/complex_numbers/complex_float.m:
extras/complex_numbers/float_complex.m:
	New modules to support complex numbers.

extras/complex_numbers/imag.m:
extras/complex_numbers/imag_complex.m:
extras/complex_numbers/complex_imag.m:
extras/complex_numbers/imag_float.m:
extras/complex_numbers/float_imag.m:
	New modules to support imaginary numbers.

extras/complex_numbers/complex_test.m:
extras/complex_numbers/complex_test.exp:
	Tests cases for the above-mentioned new modules.
1997-07-10 09:08:49 +00:00