Commit Graph

31 Commits

Author SHA1 Message Date
Zoltan Somogyi
9b6390b17e Bring the programming style of extras up to date.
extras/curs/curs.m:
extras/curs/curs.panel.m:
    Make panel a separate submodule of curs, not a nested submodule.

extras/base64/base64.m:
extras/curses/mcurses.basics.m:
extras/curses/mcurses.m:
extras/curses/mcurses.misc.m:
extras/curses/mcurses.user.m:
extras/gator/evolve.m:
extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/gator/tausworthe3.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/moose/grammar.m:
extras/moose/moose.m:
extras/mopenssl/mopenssl.m:
extras/net/echo.m:
extras/net/errno.m:
extras/net/getaddrinfo.m:
extras/net/net.m:
extras/net/netdb.m:
extras/net/sockets.m:
extras/net/streams.m:
extras/net/tcp.m:
extras/net/test_lookups.m:
extras/net/types.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/references/README:
extras/references/reference.m:
extras/references/scoped_update.m:
extras/solver_types/library/any.m:
extras/solver_types/library/any_array.m:
extras/solver_types/library/any_assoc_list.m:
extras/solver_types/library/any_list.m:
extras/solver_types/library/any_map.m:
extras/solver_types/library/any_tree234.m:
extras/solver_types/library/any_util.m:
extras/trail/trail.m:
extras/trailed_update/samples/interpreter.m:
extras/trailed_update/samples/vqueens.m:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tr_array.m:
extras/trailed_update/tr_store.m:
extras/trailed_update/trailed_update.m:
extras/trailed_update/unsafe.m:
extras/trailed_update/var.m:
    Bring programming style up to date.
2023-03-30 21:48:10 +11:00
Julien Fischer
a526959884 Fix spelling.
extras/curses/mcurses.m:
    As above.
2022-01-23 22:04:05 +11:00
Julien Fischer
b84e4853f0 Improvements for building extras/curses.
Separate out the configuration for linking against ncurses as has just be done
for extras/curs.

Update programming style.

extras/curses/Ncurses.options:
extras/curses/Mmakefile:
extras/curses/sample/Mmakefile:
     Shift the flags for linking against ncurses to Ncurses.options.

     Document how to use the ncursesN-config and pkg-config tools to find
     the appropriate flags for a system.

extras/curses/mcurses.basics.m:
extras/curses/mcurses.user.m:
     Update syntax and programming style.

     Replace tabs with spaces and delete trailing whitespace.
2022-01-23 22:03:19 +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
Julien Fischer
a908799acb Fix issues in extras caused by recent changes.
extras/*/*.m:
     Avoid ambiguous pragmas.

     Replace an use of is.

     Fix module imports.
2021-06-19 21:11:35 +10:00
Julien Fischer
ba94becf10 Avoid C compiler warnings in curses binding.
extras/curses/basics.m:
    Avoid some warnings about discarded const qualifiers.
2019-09-29 03:41:42 +10: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
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
Julien Fischer
2a8be7bbf6 Replace '__' as module qualifier in rest of the extras.
extras/*/*.m:
	Replace the use of '__' as a module qualifier in the rest of
	the extras.

	s/io\.state/io/ in the extras.

	Use '=' instead of is/2 in a spot.
2014-12-29 16:48:17 +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
12251d9845 Conform to recent changes to the array module.
extras/curses/user.m:
	Conform to recent changes to the array module.
2011-05-19 16:32:54 +00:00
Julien Fischer
8ae6bf9bd4 Remove uses of the old C interface from the extras distribution.
Branches: main

Remove uses of the old C interface from the extras distribution.

extras/lazy_evaluation/lazy_list.m:
extras/quickcheck/qcheck.m:
extras/references/samples/max_of.m:
	Use the new foreign language interface instead of the old C
	interface.

extras/curses/basics.m:
	As above, and conform to our current coding standards.
2010-07-27 22:33:46 +00:00
Julien Fischer
36ac2b4c77 Merge late changes from the 0.13 branch onto the main branch.
Estimated hours taken: 0.5
Branches: main

Merge late changes from the 0.13 branch onto the main branch.

BUGS:
	Merge in additions from the 0.12(!) branch.

HISTORY:
	Fix typos and be more consistent about the formatting of dates.

NEWS:
	Move the news about checking inst declarations for consistency
	with visible type constructors to the post-0.13 news where it belongs.

	Merge changes to the 0.13 branch.

README.Solaris:
	Merge changes from the 0.13 branch.

compiler/notes/todo.html:
	Merge changes from the 0.13 branch.

doc/user_guide.texi:
	Merge changes from 0.13 branch related to trace counts
	documentation.

extras/curses/sample/smalltest.m:
extras/gator/genotype.m:
extras/references/tests/ref_test.m:
samples/rot13/rot13_ralph.m:
tests/mmc_make/complex_test.m:
tests/mmc_make/lib/complex.m:
	Merge minor fixes from the 0.13 branch.
2006-09-15 09:11:24 +00:00
Julien Fischer
21664352da Avoid purity mismatches in this module.
Estimated hours taken: 0.1
Branches: main

extras/curses/user.m:
	Avoid purity mismatches in this module.

	Use the new foreign language interface throughout.
2006-07-28 06:15:50 +00:00
Julien Fischer
f4589b4ab3 Fix some minor compilation problems in the extras distribution.
Estimated hours taken: 0.5
Branches: main, release

Fix some minor compilation problems in the extras distribution.

extras/curses/user.m:
extras/graphics/easyx/samples/bounce.m:
extras/graphics/easyx/samples/scribble.m:
	Conform to recent changes in the standard library.

extras/moose/samples/try_alpha.m:
extras/moose/samples/try_expr.m:
	Replace use of ':' as a module qualifier.
2006-05-31 06:29:11 +00:00
Julien Fischer
9fb4f15dfc Fix compilation problems in the extras distribution caused by recent
Estimated hours taken: 0.5
Branches: main

Fix compilation problems in the extras distribution caused by recent
changes.

extras/stream/stream.m:
	Provide a definition for the type stream/1.

extras/*/*.m:
	Conform to the recent changes to the standard library.
2006-03-30 01:21:20 +00:00
Julien Fischer
3255eab66c Fix compilation of extras/curses.
Estimated hours taken: 0.1
Branches: main, release

Fix compilation of extras/curses.

extras/curses/user.m:
	Replace instances of ':' as a module qualifier.  ':' now
	gets a warning from the release branch compiler.

	s/mutvar/store_mutvar/ since the former was deleted from
	the library a few months ago.
2005-05-02 02:29:37 +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
c66cea0665 Add MR_ prefixes to uses of configuration macros.
Estimated hours taken: 2.5
Branches: main

Add MR_ prefixes to uses of configuration macros.
Bootcheck now succeeds with MR_NO_CONF_BACKWARDS_COMPAT.

Mmake.common.in:
	Define MR_NO_CONF_BACKWARDS_COMPAT when checking
	for namespace cleanliness.

RESERVED_MACRO_NAMES:
	Remove the configuration macros.

runtime/mercury_conf_bootstrap.h:
	Remove a duplicate definition of BOXED_FLOAT.

configure.in:
*/*.c:
*/*.h:
*/*.m:
	Add MR_ prefixes.
2002-02-13 09:56:49 +00:00
Fergus Henderson
a10a41c25c Various minor fixes to the Mmakefiles in extras/curs*.
Estimated hours taken: 0.25
Branches: main

Various minor fixes to the Mmakefiles in extras/curs*.

extras/curs/Mmakefile:
	Include ../Mmake.params.
	Add a comment.

extras/curses/Mmakefile:
	Include -lncurses in MLLIBS.
	Add a comment.

extras/curses/samples/Mmakefile:
	Include -I$(MCURSES_DIR) in MGNUCFLAGS.
2001-12-29 06:45:36 +00:00
Simon Taylor
da2e0433c6 Use C2INITARGS or MLFLAGS instead of C2INITFLAGS.
Estimated hours taken: 0.25
Branches: main

bytecode/Mmakefile:
compiler/Mmakefile:
extras/aditi/Mmakefile:
extras/curses/sample/Mmakefile:
extras/graphics/samples/calc/Mmakefile:
extras/graphics/samples/maze/Mmakefile:
extras/graphics/samples/pent/Mmakefile:
extras/morphine/non-regression-tests/Mmakefile:
samples/c_interface/simpler_c_calls_mercury/Mmakefile:
samples/c_interface/simpler_cplusplus_calls_mercury/Mmakefile:
tests/benchmarks/Mmakefile:
tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
tests/hard_coded/Mmakefile:
	Use C2INITARGS or MLFLAGS instead of C2INITFLAGS.
2001-12-19 15:08:30 +00:00
Zoltan Somogyi
bdb4a83570 Add necessary MR_ prefixes.
Estimated hours taken: 0.5

extras/*/*.m:
	Add necessary MR_ prefixes.
2000-12-05 02:07:23 +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
Fergus Henderson
ca1b387fc0 Fix a bug that I seem to have introduced in my last change:
Estimated hours taken: 0.1

extras/curses/user.m:
	Fix a bug that I seem to have introduced in my last change:
	the `win' type should be defined as `mutvar(window, curse_store_type)'
	rather than `mutvar(window, curse_store)'.
2000-10-11 07:38:58 +00:00
Fergus Henderson
733f94a539 Change library/store.m to make use of existential types.
Estimated hours taken: 2

Change library/store.m to make use of existential types.

library/store.m:
	Add a new existentially predicate store__new/1, which is like the old
	store__init/1 but existentially typed.  This ensures safety,
	by preventing you from using a key from one store as an index
	into a different store.

	The unsafe store__init predicate is now declared `pragma obsolete'.
	The store__some_store_type type is now also documented as obsolete
	(unfortunately there is currently no equivalent to a `pragma obsolete'
	declaration for types).

browser/declarative_execution.m:
extras/trailed_update/samples/interpreter.m:
	Use store__new rather than the obsolete store__init.

tests/general/intermod_type2.m:
	Avoid using the obsolete type store__some_store_type.

extras/curses/user.m:
	Add a new predicate init_curse_store, and use that
	instead of the obsolete store__init.
	Also rename set_curse and get_curse as set_curse_store
	and get_curse_store respectively.

NEWS:
	Mention this change.
2000-04-13 10:05:42 +00:00
Fergus Henderson
a9e86b0fbe Fix a cut-and-paste error: in a couple of places,
Estimated hours taken: 0.25

extras/curses/user.m:
	Fix a cut-and-paste error: in a couple of places,
	change "pragma c_header_code" to "pragma c_code".
2000-04-10 08:11:02 +00:00
Robert Jeschofnik
da44efaa4c Address Fergus' review.
Estimated hours taken: 0.2

Address Fergus' review.

README:
	Add a (brief) description of what curses actually is

curses/basics.m:
curses/misc.m:
curses/user.m:
	Fix the :- module statements to use "__" instead of ":"
	Fix spelling errors
	Fix up a few comments
2000-01-31 03:12:54 +00:00
Robert Jeschofnik
0e1d5ad5a2 Add a new directory to the extras, containing a (partial) binding to
Estimated hours taken: 8 (including getting to know curses a bit)

Add a new directory to the extras, containing a (partial) binding to
curses.


README:
  Add the brief description for the curses binding to the list of what
  is contained in the extras package.

curses/Mmakefile:
curses/basics.m:
curses/mcurses.m:
curses/misc.m:
curses/user.m:
  New files implementing the mercury binding to curses.

curses/sample/Mmakefile:
curses/sample/smalltest.m:
  A sample program using the mercury binding to curses.
2000-01-14 07:21:35 +00:00
Robert Jeschofnik
3f1dcd0bf7 <overview or general description of changes>
Estimated hours taken: _____

<overview or general description of changes>

<directory>/<file>:
	<detailed description of changes>
2000-01-14 01:48:25 +00:00