Commit Graph

730 Commits

Author SHA1 Message Date
Julien Fischer
71624374c4 Fix compilation of a posix sample.
extras/posix/samples/mdprof_cgid.m:
    Conform to changes in the getopt module.
2021-01-25 20:28:23 +11:00
Julien Fischer
dc9b9621a7 Fix compilation of dynamic linking tests.
extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test2.m:
     Conform to the current interface of the dl module.
2021-01-25 03:41:42 +11:00
Julien Fischer
271a4fe483 Fix compilation of moose samples.
extras/moose/samples/alpha.moo:
extras/moose/samples/expr.moo:
     Replace calls to a now-deleted predicate.
2021-01-25 03:08:45 +11:00
Julien Fischer
77cdaf36d2 Delete references to erlang grade.
extras/base64/Mercury.options:
extras/graphics/mercury_cairo/Mercury.options:
extras/graphics/mercury_glfw/Mercury.options:
extras/posix/Mercury.options:
extras/trail/Mercury.options:
     As above.
2021-01-23 19:46:15 +11:00
Peter Wang
5efb4d3fe3 Delete comments about Erlang from extras/java_extras.
extras/java_extras/make_temp.m:
    As above.
2020-10-30 13:21:49 +11:00
Peter Wang
f0610382eb Delete Erlang foreign_proc from extras/lex.
extras/lex/lex.regexp.m:
    As above.
2020-10-30 13:21:38 +11:00
Peter Wang
8da4853b49 Update programs for getopt changes.
benchmarks/progs/icfp2000_par/main.m:
benchmarks/progs/mandelbrot/mandelbrot.m:
benchmarks/tools/log_to_r/log_to_r.m:
extras/align_right/align_right.m:
extras/error/error.m:
extras/gator/evolve.m:
extras/moose/options.m:
samples/concurrency/midimon/midimon.m:
samples/diff/diff.m:
samples/muz/muz.m:
    Conform to getopt.process_options now returning structured errors
    instead of strings.
2020-10-26 16:24:11 +11:00
Peter Wang
89e59e7cc8 Delete support for browsing terms as XML.
The 'browse --xml' command has not worked with current versions of
xsltproc for quite some time, but we have not received any bug reports,
nor has anyone tried to fix it. We have a method for interactively
exploring a term in 'browse --web' so IMHO there is no need to keep
support for 'browse --xml'.

browser/browse.m:
browser/browser_info.m:
browser/declarative_user.m:
trace/mercury_trace_browse.c:
trace/mercury_trace_browse.h:
trace/mercury_trace_cmd_browsing.c:
trace/mercury_trace_cmd_parameter.c:
trace/mercury_trace_cmd_parameter.h:
trace/mercury_trace_internal.c:
    Delete code.

doc/mdb_categories:
doc/user_guide.texi:
    Delete documentation.

configure.ac:
    Don't search for a XUL browser and xsltproc.

scripts/mdbrc.in:
    Delete 'xml_browser_cmd' and 'xml_tmp_filename' lines.

scripts/xul_tree.xsl:
    Delete now unused file.

scripts/Mmakefile:
    Conform to deletions.

tests/debugger/Mmakefile:
tests/debugger/browser_test.exp:
tests/debugger/browser_test.exp3:
tests/debugger/browser_test.inp:
tests/debugger/mdb_command_test.inp:
tests/debugger/save.exp2:
tests/declarative_debugger/browse_arg.exp:
tests/declarative_debugger/browse_arg.inp:
    Don't test 'browse --xml' any longer.

extras/xml_stylesheets/README:
    Delete reference to 'browse --xml' command.

NEWS:
    Announce change.
2020-10-14 17:41:54 +11:00
Julien Fischer
b55c2ad6a8 Delete trailing whitespace.
extras/graphics/samples/calc/calc.m:
    As above.
2020-10-02 17:29:54 +10:00
Julien Fischer
cc9ec7293a Update programming style in Tk binding.
extras/graphics/mercury_tcltk/mtk.m:
    As above.
2020-10-02 17:13:48 +10:00
Julien Fischer
97bf7cf9a8 Fix Mantis #519.
extras/graphics/mercury_tcltk/mltcltk.m:
    Delete an old workaround that has not been required for versions of Tcl
    from 8.1 (released in 1999) onwards

    Minor syntax and style updates.
2020-10-01 23:07:27 +10:00
Zoltan Somogyi
29f5494ce3 Fix typo. 2020-09-17 07:18:03 +10:00
Julien Fischer
aaf4e57f4f Fix a typo.
extras/odbc/Mmakefile:
    As above.
2020-06-28 16:14:10 +10:00
Zoltan Somogyi
031c7194cd Bring moose's programming style up to date. 2020-05-17 22:59:13 +10:00
Julien Fischer
9b12ff1b3b Fix compilation of extras/mp_int.
extras/mp_int/mp_int.m:
    Switch from math.domain_error -> exception.domain_error.

    Fix spelling.
2020-05-15 16:19:55 +10:00
Julien Fischer
c96c723760 Avoid warnings about redundant module imports in the GLUT binding.
extras/graphics/mercury_glut/*.m:
    As above.
2020-05-15 16:09:52 +10:00
Julien Fischer
84e2536618 Fix minor compilation problems in extras and benchmarks.
These are due to:

- differences between module and file names.
- redundant imports
- the recent change from math.domain_error -> exception.domain_error.

benchmarks/*/*.m:
extras/*/*.m:
    As above.
2020-05-15 16:00:41 +10:00
Julien Fischer
d36d42b4de Add chdir() and sleep() to POSIX binding.
Contributed by Volker Wysk.

extras/posix/posix.chdir.m
extras/posix/posix.sleep.m:
     As above.
2020-03-21 02:10:09 +11:00
Zoltan Somogyi
35062cab31 Add a new utility, split_file, to the extras.
extras/split_file/split_file.m:
    The new utility, which helps users split a file into two or more pieces.

extras/split_file/Mmakefile:
extras/split_file/README:
    Its Mmakefile and README, as is standard for extras directories.
2020-03-10 02:07:37 +11:00
Julien Fischer
ee69c1432c Fix the networking library.
extras/net/Makefile:
    Build a Mercury.modules as some file names do not match
    their module names and the compiler no longer accepts this.

extras/net/errno.m:
    Ensure we can see the definition of MR_STRERROR_BUF_SIZE.
2020-01-13 21:49:25 +11:00
Julien Fischer
d2f72cc75f Minor fixes to the allegro binding.
extras/graphics/mercury_allegro/allegro.m:
   Add missing include_module declaration for the util
   submodule.

extras/graphics/mercury_allegro/Mercury.options:
   Avoid a warning.
2020-01-13 21:35:23 +11:00
Julien Fischer
97f1720c30 Delete a doubled-up word.
extras/graphics/mercury_cairo/README:
   As above.
2020-01-02 13:52:07 +11:00
Peter Wang
33da7c82b4 Fix use of MR_strerror.
extras/posix/posix.strerror.m:
    Fix use of MR_strerror (it may return a pointer to a static string
    instead of modifying the provided buffer).

    Allocate string such that it will be attributed to the predicate
    when profiling memory retention.
2019-10-31 23:47:18 +11:00
Julien Fischer
da5fe0974e Adjust a predicate.
extras/posix/posix.m:
    Always return a valid error number from error_to_cerrno/2.
2019-10-31 21:43:00 +11:00
Julien Fischer
2c0351aea9 Add a binding to sterror().
Contributed by Volker Wysk.

extras/posix/posix.strerror.m:
extras/posix/posix.m:
    As above.
2019-10-31 11:26:03 +11:00
Julien Fischer
16b629d31c Add realpath() to POSIX binding.
Contributed by Volker Wysk.

extras/posix/posix.realpath.m:
extras/posix/posix.m:
    As above.
2019-10-26 01:19:12 +11:00
Julien Fischer
5668e1a614 Fix readdir() in the POSIX binding.
The binding for readdir() was reporting the end of the directory stream as an
unknown error.  This problem was reported by Volker Wysk, to whom the initial
version of the fix is also due.

extras/posix/posix.readdir.m:
    Add a new result type that distinguishes between the end of the directory
    stream and an error.

    Add and export to C an enumeration whose values describe the result of
    a call to readdir().  Use this, rather than small integers, when
    communicating the result of readdir() call back to Mercury.

    Always the string output argument of a foreign_proc to a valid value;
    this avoids problems if the debugger attempts to print them out.
2019-10-17 22:00:04 +11:00
Julien Fischer
e8ebc795a9 Use typed insts in the OpenGL binding.
extras/graphics/mercury_opengl/mogl.m:
    As above.
2019-09-29 14:10:16 +10:00
Zoltan Somogyi
479838f667 Update the programming style of extras/lex. 2019-09-29 13:51:13 +10:00
Julien Fischer
b795306020 Fix compilation of extras/old_term_parser.
extras/old_term_parser/old_lexer.m:
     This was calling a predicate that was recently removed from the standard
     library; add a copy of that predicate here instead.
2019-09-29 04:38:53 +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
Julien Fischer
79c82f118a Replace calls to an obsolete predicate.
extras/lex/lex.convert_NFA_to_DFA.m:
    Call set.is_empty/1 in place of set.empty/1.
2019-09-29 03:34:02 +10:00
Mark Brown
5ef1b0e62c s/gen_uint/generate_uint/g, per review comments 2019-08-28 00:52:17 +10:00
Mark Brown
c8780cdfa7 Address more of Julien's review comments.
library/random.m:
    Move the new code to the existing random module. Update names and
    typeclass methods.

    Add adaptors to attach any ground or shared generator to the I/O
    state.

library/random.sfc{16,32,64}.m:
    Move sfc generators to here. Update for changes to interface.

extras/README:
extras/random/*.m:
    Move unused generators to a new directory under extras.

library/uint32.m:
    Add cast_from_uint/1.

library/MODULES_DOC:
library/library.m:
    Update for the module changes.

tests/hard_coded/*:
    Rename test cases to correspond with the library module name.

    Test the I/O adaptor.
2019-08-28 00:52:17 +10:00
Mark Brown
ed9f3a0e4f extras/gator/tausworthe3.m: use max_uint32 instead of a literal 2019-08-11 14:43:35 +10:00
Mark Brown
3fde825499 Improve comments in extras/gator/tausworthe3.m
The 'evolve' program assumes that next/3 returns a non-negative integer.
2019-08-11 12:55:08 +10:00
Mark Brown
6e68723d12 Convert extras/gator/tausworthe3.m to using uint32
Previously this used int, but this only works on platforms where
integers are 32-bit.
2019-08-11 12:55:08 +10:00
Volker Wysk
0236fbc21c extras/posix: Extend exec module.
extras/posix/posix.exec.m:
    Add execvp, execv, execve predicates.
2019-03-29 14:48:03 +11:00
Julien Fischer
14c234a34a Fix the install target for the posix binding.
extras/posix/Makefile:
    Delete dangling references to posix_workarounds.o.
2019-03-28 05:45:10 +00:00
Peter Wang
f0407d62c6 extras/posix: Fix warnings.
extras/posix/posix.socket.m:
    Fix compiler warnings in accept0.

    Delete unused predicate cons_sockaddr (the code should be improved
    if required).
2019-03-24 14:09:17 +11:00
Peter Wang
676e06b205 extras/posix: Don't abuse Mercury arrays for exec().
extras/posix/posix.exec.m:
    Allocate arrays of the correct type instead of passing Mercury array
    elements as (char **).
2019-03-24 13:58:49 +11:00
Julien Fischer
9751360ca4 Style and formatting fixes for the POSIX binding.
extras/posix/*.m:
    As above.
2019-03-22 10:53:31 +00:00
Julien Fischer
27a7199efb Replace workarounds in the POSIX binding.
Delete the workarounds for FD_{ZERO,SET,ISSET,CLR} in the POSIX binding.  The
stated reason for their existence was that the Linux headers defined them using
inline assembler that conflicted with our use of global register variables.

Since the runtime (now) defines a wrapper for FD_ZERO, use the runtime's
version instead of having the binding define its own.  We've been using
FD_{SET,ISSET} in the runtime without issues for many years.  (On my system,
they and FD_CLR are not defined using inline assembler anyway.)

extras/posix/posix_workarounds.{ch}:
    Delete this files.

extras/posix/posix.select.m:
    Use MR_fd_zero in place of ME_fd_zero.

    Use FD_{SET,ISSET,CLR} directly.

extras/posix/Makefile:
extras/posix/Mercury.options:
extras/posix/Mmakefile:
    Conform to the above changes.
2019-03-22 10:17:15 +00:00
Julien Fischer
0b154978b6 Workaround a problem building the posix library.
extras/posix/Mmakefile:
    As above.
2019-03-22 06:59:52 +00:00
Julien Fischer
0f54690d37 Fix spelling.
extras/base64/Mmakefile:
   As above.
2019-03-21 11:00:14 +00:00
Julien Fischer
dcf7945280 Build the POSIX binding using mmc --make.
Building the POSIX binding using mmc --make by default and just have mmake
forward its work to that.  Using mmc --make means things like library grade
exclusions will work properly.

Exclude non-C grades from the grade set in which to install the POSIX binding.

Shift a POSIX binding sample into the samples subdirectory.

extras/posix/Makefile:
extras/posix/Mercury.options:
    Build the POSIX binding using mmc --make.

extras/posix/Mmakefile:
    Redirect mmake to use the normal Makefile.

extras/posix/hello.m:
    Shift this file into the samples subdirectory.

extras/samples/Makefile:
    Set up things to build the samples against a libposix in the
    parent directory.

extras/samples/Mmakefile:
    Delete this file.
2019-03-21 10:58:08 +00:00
Julien Fischer
4f9a5944c6 Replace calls to obsolete predicates.
extras/cgi/cgi.m:
    As above.
2019-03-16 06:26:16 +00:00
Julien Fischer
c6d97df5ea Fix compilation of extras/posix with _FORTIFY_SOURCE.
extras/posix/posix.open.m:
    Avoid calling the two argument version of open.
2019-03-16 06:16:05 +00:00
Zoltan Somogyi
c4174e712b Fix redundant type declaration. 2019-03-15 04:47:55 +11:00
Zoltan Somogyi
97b11bcf47 Modernise the error program a bit.
extras/error/error.m:
    Use the '% ...' comment style if the new option -p (percent) is given.

    Start using getopt to process options.

    Default to processing standard input in the absence of filename options.

    Improve comments and programming style.
2019-01-28 04:07:31 +11:00