Commit Graph

11 Commits

Author SHA1 Message Date
Julien Fischer
5d0acda798 Delete obsolete predicates from builtin module.
library/builtin:
    Delete the promise_only_solution/1 and promise_only_solution_io/4. Both
    have have been marked as obsolete since 2015.

    Also delete the non-public impure versions of those, get_one_solution/1
    and get_one_solution_io/4. Implementing the pure versions was the only
    use of these.

compiler/hlds_goal.m:
    Delete a reference to promise_only_solution in a comment.

tests/declarative_debugger/trust.exp:
tests/declarative_debugger/trust.inp:
tests/declarative_debugger/trust_1.m:
     Replace a call to promise_only_solution/1; this does simplify this test
     a little, but does not affect what the trust_1 module was testing, namely
     the user-defined comparison on the type exported by that module.

tests/declarative_debugger/exceptions.m:
tests/hard_coded/myset.m:
tests/hard_coded/user_compare.m:
tests/valid_seq/intermod_nested_module_bug2.m:
extras/curs/samples/nibbles.m:
     Replace calls to the now deleted predicates.
2022-04-13 15:09:21 +10:00
Julien Fischer
bc79412af2 Delete the old random number generator.
It has been deprecated since Mercury 20.01.

library/random.m:
    Delete the old generator.

library/array.m:
    Delete the predicate random_permutation/4.

NEWS:
    Announce the above.

tests/hard_coded/string_hash.m:
    Update this test to use the new RNG framework.

tests/hard_coded/Mmakefile:
tests/hard_coded/random_permutation.{m,exp}:
tests/hard_coded/random_simple.{m,exp}:
    Delete these tests, they were specific to the old RNG.

extras/curs/samples/nibbles.m:
extras/solver_types/library/any_array.m:
    Replace use of the old RNG.
2022-03-15 16:08:48 +11:00
Julien Fischer
82daa3fdd1 Improvements for building extras/curs.
Separate out the details of how to link against ncurses and the panel library
into a separate file. Include this new file in both the top-level and samples
Mmakefiles and use the variables it defines to link against ncurses.

Document how to to use the ncursesN-config and pkg-config tools to find
the correct set of flags to link against ncurses. Using ncursesN-config
was suggested by Fabrice Nicol in a change he recently posted.

General cleanups.

extras/curs/Ncurses.options:
   New file defining variables that control how to link against ncurses
   and the panel library.

   Document some ways of finding the correct set of flags.

   Document how to override the contents of this file on the command line.

extras/curs/Mmakefile:
    Include the Ncurses.options file.

    Refer users to that file for controlling how to link against
    ncurses.

extras/curs/samples/Mmakefile:
    Import Ncurses.options instead of hardcoding the library flags here.

extras/curs/curs.m:
    Shift vim modeline into our usual place.

    Update copyright notice.

    Point users to Ncurses.options.

extras/curs/samples/*.m:
    Replace tabs with spaces.

    Delete trailing whitespace.

    Minor cleanups.
2022-01-23 19:20:45 +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
Peter Wang
9d23694a25 Thread I/O state through time routines that depend on the time zone.
library/time.m:
	Deprecate non-pure functions `localtime/1' and `mktime/1'.
	They depend on the current time zone, which depends on the
	environment that the program is running in, and may also be
	changed at run time (e.g. by setting the environment variable
	"TZ").

	Add replacement predicates `localtime/4' and `mktime/4' that
	thread the I/O state.

	Deprecate the non-pure function `ctime/1'.  It does not seem
	necessary to add a pure replacement for it, being a minor
	convenience at best.

	Try to clarify some documentation.

library/calendar.m:
	Conform to above changes.

tests/hard_coded/dst_test.m:
tests/hard_coded/time_test.m
	Conform to above changes.

	Update code style.

extras/curs/samples/nibbles.m:
extras/graphics/easyx/samples/bounce.m:
extras/graphics/easyx/samples/mclock.m:
extras/log4m/log4m.m:
	Conform to above changes.

NEWS:
	Announce changes.
2016-06-06 23:14:29 +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
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
452dd420ad Fix compilation errors in extras.
extras/curs/samples/demo.m:
extras/curs/samples/frogger.m:
extras/posix/hello.m:
	Update library calls where necessary.
2014-02-06 03:08:14 +11:00
Julien Fischer
2c41d3bba1 Cleanups for extras/curs.
Estimated hours taken: 1
Branches: main, release

Cleanups for extras/curs.

extras/curs/samples/Mmakefile:
	Build all the demos in this directory.

extras/curs/curs.m:
	Define the type `panel' as a foreign type.  Remove casts from the C
	code that are now redundant because of this.

	Convert to four-space indentation.

extras/curs/curs.m:
extras/curs/samples/*.m:
	Fix overlong lines.

	s/io__state/io/

	Use state variables for passing around the I/O state.

	Format foreign_procs as per our coding standard.
2006-04-21 03:37:11 +00:00
Peter Wang
0e7009b047 Add two curses games I wrote in December 2004.
Estimated hours taken: 10
Branches: main

extras/curs/samples/frogger.m:
extras/curs/samples/nibbles.m:
extras/curs/samples/sleep.m:
	Add two curses games I wrote in December 2004.
2006-02-22 05:09:14 +00:00
Ralph Becket
3d6d6709b8 Added a more comprehensive and more faithful ncurses and panel
Estimated hours taken: 10

Added a more comprehensive and more faithful ncurses and panel
binding.

curs/Mmakefile:
curs/curs.m:
curs/samples:
curs/samples/Mmakefile:
curs/samples/demo.m:
	Added.
2001-02-21 16:55:16 +00:00