Commit Graph

11 Commits

Author SHA1 Message Date
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
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
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
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