20 Commits

Author SHA1 Message Date
Julien Fischer
f7837e2f94 Fix copyright notices in some Mmakefiles.
extras/*/Mmakefile:
    As above.
2025-05-05 15:50:03 +10:00
Zoltan Somogyi
af23a48a2b Minor style improvements to extras.
extras/gator/gator:
    Update programming style. Fix indentation. Add a vim modeline.

extras/gator/genotype.m:
extras/gator/phenotype.m:
    Fix indentation.

extras/lex/regex.m:
    Replace if-then-else chain with a switch.

extras/base64/base64.m:
extras/cgi/cgi.m:
extras/cgi/form_test.m:
extras/cgi/html.m:
extras/cgi/mercury_www.m:
extras/complex_numbers/complex_numbers.complex.m:
extras/complex_numbers/complex_numbers.complex_float.m:
extras/complex_numbers/complex_numbers.complex_imag.m:
extras/complex_numbers/complex_numbers.float_complex.m:
extras/complex_numbers/complex_numbers.float_imag.m:
extras/complex_numbers/complex_numbers.imag.m:
extras/complex_numbers/complex_numbers.imag_complex.m:
extras/complex_numbers/complex_numbers.imag_float.m:
extras/complex_numbers/complex_numbers.m:
extras/curs/curs.m:
extras/dynamic_linking/dl_test.m:
extras/dynamic_linking/dl_test2.m:
extras/dynamic_linking/hello.m:
extras/error/error.m:
extras/fixed/fixed.m:
extras/fixed/mercury_fixed.m:
extras/java_extras/make_temp.m:
extras/lex/lex.automata.m:
extras/lex/lex.buf.m:
extras/lex/lex.convert_NFA_to_DFA.m:
extras/lex/lex.lexeme.m:
extras/lex/lex.m:
extras/lex/lex.regexp.m:
extras/logged_output/logged_output.m:
extras/logged_output/main.m:
extras/monte/doit.m:
extras/monte/dots.m:
extras/monte/geom.m:
extras/monte/hg.m:
extras/monte/monte.m:
extras/monte/rnd.m:
extras/mopenssl/mopenssl.m:
extras/odbc/mercury_odbc.m:
extras/odbc/odbc.m:
extras/odbc/odbc_test.m:
extras/posix/posix.chdir.m:
extras/posix/posix.closedir.m:
extras/posix/posix.dup.m:
extras/posix/posix.exec.m:
extras/posix/posix.fork.m:
extras/posix/posix.getpid.m:
extras/posix/posix.kill.m:
extras/posix/posix.lseek.m:
extras/posix/posix.m:
extras/posix/posix.mkdir.m:
extras/posix/posix.open.m:
extras/posix/posix.opendir.m:
extras/posix/posix.pipe.m:
extras/posix/posix.read.m:
extras/posix/posix.readdir.m:
extras/posix/posix.realpath.m:
extras/posix/posix.rmdir.m:
extras/posix/posix.select.m:
extras/posix/posix.sleep.m:
extras/posix/posix.socket.m:
extras/posix/posix.stat.m:
extras/posix/posix.strerror.m:
extras/posix/posix.wait.m:
extras/posix/posix.write.m:
extras/quickcheck/qcheck.m:
extras/quickcheck/rnd.m:
extras/quickcheck/test_qcheck.m:
extras/show_ops/show_ops.m:
extras/split_file/split_file.m:
extras/windows_installer_generator/wix.m:
extras/windows_installer_generator/wix_files.m:
extras/windows_installer_generator/wix_gui.m:
extras/windows_installer_generator/wix_installer.m:
extras/windows_installer_generator/wix_util.m:
    Apply tools/stdlines to all these files.
2025-05-05 08:08:50 +10:00
Zoltan Somogyi
89b3e1dca3 Add "ft=make" to the modelines of Mmakefiles.
Add some missing .PHONY markers, and delete a stray .PHONY marker.

Add some missing copyright years.
2025-05-05 07:58:50 +10:00
Zoltan Somogyi
c148ce54fe Update style in a bunch of Mmakefiles.
Mmake.common.in:
bindist/Mmakefile:
compiler/Mmakefile:
compiler/notes/Mmakefile:
doc/Mmakefile:
extras/align_right/Mmakefile:
extras/base64/Mmakefile:
extras/dynamic_linking/Mmakefile:
extras/error/Mmakefile:
extras/fixed/Mmakefile:
extras/graphics/samples/gears/Mmakefile.MacOSX:
extras/graphics/samples/maze/Mmakefile.MacOSX:
extras/lex/Mmakefile:
extras/monte/Mmakefile:
extras/posix/Mmakefile:
extras/references/Mmakefile:
extras/references/samples/Mmakefile:
extras/split_file/Mmakefile:
library/Mmakefile:
mdbcomp/Mmakefile:
runtime/Mmakefile:
scripts/Mmakefile:
ssdb/Mmakefile:
tests/Mmake.common:
tests/mmc_make/Mmakefile:
trace/Mmakefile:
util/Mmakefile:
    Invoke the sh builtin "test" as "test", not as "[".

    Make some target names more descriptive.

    Fix indentation.
2024-09-17 11:09:18 +02:00
Zoltan Somogyi
0c5fc71ad6 Bring extras/error/error.m up to date. 2022-11-30 18:26:00 +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
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
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
Paul Bone
08f2ade436 Avoid deprecated predicates in extras/error
extras/error/error.m:
    Avoid the deprecated takewhile predicate.
2017-01-19 14:01:56 +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
1d530c7d4e Add more entries to .gitignore files
This is a consecutive patch to my previous patch, it extends the .gitignore
files to work more thoroughly on Windows.

browser/.gitignore:
    ignore .net .dll assemblies

compiler/.gitignore:
    ignore *.obj

extras/.gitignore:
    Ignore the tags directory
    Ignore: *.bat, *.lib,
    Ignore *.dll rather than lib*.dll because the .net assemblies are not
    prefixed.

extras/dynamic_linking/.gitignore:
    Ignore *.out (test output files)

extras/error/.gitignore:
    Ignoring unix binary for the error utility

extras/lex/tests/.gitignore:
    Ignore the test_regex binary

extras/moose/tests/.gitignore:
    Ignore array_based.m because it is generated from array_based.moo
2014-03-05 09:41:51 +11:00
Julien Fischer
12bd473275 Conform to recent stdlib changes.
Branches: main

extras/error/error.m:
	Conform to recent stdlib changes.
2011-05-05 05:52:27 +00:00
Zoltan Somogyi
63867d0bf1 Improve the documentation.
Estimated hours taken: 0.5
Branches: main

Improve the documentation.
2010-05-03 02:32:59 +00:00
Zoltan Somogyi
d45775f9d4 Update this program to conform to our current style guide.
Estimated hours taken: 1
Branches: main

extras/error/error.m:
	Update this program to conform to our current style guide. Convert to
	four-space indentation, replace DCGs with state variables, replace
	io.see and io.tell with io.open_input and io.open_output, simplify
	the code by using library functions when possible, avoid unnecessarily
	wrapping data structures in maybes, use map.det_insert or
	map.det_update instead of map.set where possible, and use better
	names for variables and types.

extras/error/Mmakefile:
	Link the Mercury libraries statically, to allow the libraries error is
	linked again to be deleted (e.g. because they are superseded by newer
	versions at other pathnames) without error ceasing to work.
2008-10-03 07:26:49 +00:00
Julien Fischer
e3c260c6a0 Add and populate a .cvsignore file for this directory.
extras/error/.nocopyright:
extras/error/.cvsignore:
	Add and populate a .cvsignore file for this directory.
2007-08-01 07:48:33 +00:00
Julien Fischer
e99ee372cd Fix compilation of extras/error.
Estimated hours taken: 0.1
Branches: main

Fix compilation of extras/error.

extras/error/error.m:
	Rename the type error.line/0 to error.line_number/0 since the former
	now conflicts with the recently added standard library type
	string.line/0.
2007-05-09 14:11:52 +00:00
Julien Fischer
88c51b4c56 Avoid a purity problems by using the new foreign language interface
Estimated hours taken: 0.1
Branches: main, release

extras/error/error.m:
	Avoid a purity problems by using the new foreign language interface
	here.

	Use MR_{YES,NO} instead of hardcoding 1 and 0.
2006-07-28 05:10:34 +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
Zoltan Somogyi
047e83763d Add Tom and Tyson's error program to the repository.
Estimated hours taken: 0.2
Branches: main

extras/error/error.m:
extras/error/Mmakefile:
extras/error/README:
	Add Tom and Tyson's error program to the repository.
2003-04-12 03:33:41 +00:00