Commit Graph

169 Commits

Author SHA1 Message Date
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
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
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
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
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
Julien Fischer
c9d76c57a6 Change the license for the Mercury-Cario binding.
Change the license the Mercury-Cairo binding to a 2-clause BSD license.
This change has been agreed to by both Peter and myself; we are the
only authors of the affected code.

extras/graphics/mercury_cairo/COPYING.LIB:
    Add the new license.

extras/graphics/mercury_cairo/README:
    Add a link to the license file.

    Fix a typo.
2018-07-02 09:32:35 -04: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
Julien Fischer
769c6de2c2 Style and formatting fixes for the GLUT binding.
extras/graphics/mercury_glut/*.m:
     As above.
2017-05-07 22:48:33 +10:00
Julien Fischer
ff3d166ab7 Minor updates for the OpenGL binding.
extras/graphics/mercury_opengl/mogl.m:
     Fix a foreign_enum pragma that referred to a non-existent type
     constructor.

extras/graphics/mercury_opengl/*.m:
      Delete trailing whitespace.

      Avoid referring to the I/O state directly in foreign_proc bodies.
2017-05-07 22:39:33 +10:00
Peter Wang
3524766a21 mercury_cairo: Pass pointers to doubles instead of MR_Float where required.
extras/graphics/mercury_cairo/cairo.m:
extras/graphics/mercury_cairo/cairo.path.m:
extras/graphics/mercury_cairo/cairo.surface.m:
    As above.
2017-05-04 15:07:47 +10:00
Peter Wang
149fe4d2d3 mercury_cairo: Add set_device_scale, get_device_scale.
extras/graphics/mercury_cairo/cairo.surface.m:
    Add set_device_scale, get_device_scale.
2017-05-04 15:07:47 +10:00
Peter Wang
fc426fc35f mercury_cairo: Delete hard to maintain insts.
extras/graphics/mercury_cairo/cairo.m:
    Delete surface_status, pattern_status and region_status insts as
    there is no guarantee that they cover the range of values returned
    by cairo_surface_status, cairo_pattern_status and
    cairo_region_status (in past and future versions of cairo).

extras/graphics/mercury_cairo/cairo.png.m:
    Delete png_write_result for same reason.
2017-04-28 18:07:12 +10:00
Peter Wang
d92e5f07f3 mercury_cairo: Use if-then-else syntax.
extras/graphics/mercury_cairo/cairo.image.m:
extras/graphics/mercury_cairo/cairo.pdf.m:
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.recording.m:
extras/graphics/mercury_cairo/cairo.svg.m:
    Use if-then-else syntax.
2017-04-28 17:17:17 +10:00
Peter Wang
b9dad460bd mercury_cairo: Update enumerations.
extras/graphics/mercury_cairo/cairo.m:
    Add newer cairo status values.

    Add newer cairo operator values.

    Update surface_status and pattern_status insts to reflect current
    cairo documentation.

extras/graphics/mercury_cairo/cairo.font_options.m:
    Add subpixel_order_rgb.

extras/graphics/mercury_cairo/cairo.pattern.m:
    Add newer pattern_type values.

    Do not switch on the result of pattern_status in case the inst does
    not cover all possible return values.

extras/graphics/mercury_cairo/cairo.png.m:
    Do not switch on the result of surface_status in case the inst does
    not cover all possible return values.
2017-04-28 17:17:04 +10:00
Peter Wang
2c1281be5b mercury_cairo: Use double instead of MR_Float where appropriate.
extras/graphics/mercury_cairo/cairo.transformations.m:
    As above.
2017-04-24 14:53:28 +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
Peter Wang
220c1af46b Fix whitespace in mercury_cairo modules.
extras/graphics/mercury_cairo/cairo.font_options.m:
extras/graphics/mercury_cairo/cairo.image.m:
extras/graphics/mercury_cairo/cairo.m:
extras/graphics/mercury_cairo/cairo.matrix.m:
extras/graphics/mercury_cairo/cairo.path.m:
extras/graphics/mercury_cairo/cairo.pattern.m:
extras/graphics/mercury_cairo/cairo.pdf.m:
extras/graphics/mercury_cairo/cairo.png.m:
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.recording.m:
extras/graphics/mercury_cairo/cairo.region.m:
extras/graphics/mercury_cairo/cairo.surface.m:
extras/graphics/mercury_cairo/cairo.svg.m:
extras/graphics/mercury_cairo/cairo.text.m:
extras/graphics/mercury_cairo/cairo.transformations.m:
	Expand tabs to spaces.

	Delete trailing whitespace.

	Correct fix indentation to 4 spaces in some places.
2016-08-30 14:35:24 +10: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
Julien Fischer
17446e64d6 Delete trailing whitespace in GLFW binding.
extras/graphics/mercury_glfw/glfw.m:
     As above.

     Delete unnecessary module qualifications.
2016-05-04 10:06:11 +10:00
Julien Fischer
e7010327d9 Delete references to picreg.
browser/interactive_query.m:
extras/dynamic_linking/Mmakefile:
extras/graphics/mercury_glut/Mmakefile:
extras/graphics/mercury_glut/Mmakefile.MacOSX:
extras/graphics/samples/calc/Makefile:
extras/graphics/samples/gears/Mmakefile:
extras/graphics/samples/maze/Mmakefile:
extras/graphics/samples/pent/Mmakefile:
extras/morphine/non-regression-tests/Mmakefile:
extras/morphine/source/collect.op:
    As above.
2016-04-26 14:03:04 +10:00
Julien Fischer
8a786c9a92 Documentation fixes for cairo binding.
extras/graphics/mercury_cairo/*.m:
    Minor documentation fixes for cairo binding.
2015-12-05 17:48:01 +11:00
Peter Wang
803c5f1699 mercury_cairo: Do not enumerate possible return statuses.
Do not try to exhaustively enumerate possible status values after
creating cairo objects.  It is error prone and unnecessary.

extras/graphics/mercury_cairo/cairo.image.m:
extras/graphics/mercury_cairo/cairo.pdf.m:
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.recording.m:
extras/graphics/mercury_cairo/cairo.svg.m:
	As above.  After creating a cairo object, return the status
	to the user whether successful or not.
2015-12-04 16:54:57 +11:00
Julien Fischer
169e72879b Fix compilation fo the Tcl/Tk binding.
extras/graphics/mercury_tcltk/mercury_tcltk.m:
    Add a missing ':- interface' declaration.
2015-11-16 10:58:53 +11:00
Julien Fischer
87d96305ae Fix compilation of the OpenGL binding.
extras/graphics/mercury_opengl/mercury_opengl.m:
    Add a missing ':- interface' declaration.

extras/graphics/mercury_opengl/Mmakefile:
extras/graphics/mercury_opengl/Mmakefile.MacOSX:
    Don't warn about unused interface imports in the above module.
2015-11-16 10:51:48 +11:00
Julien Fischer
f506c437f2 Fix compilation of the Allegro binding.
extras/graphics/mercury_allegro/mercury_allegro.m:
    Add a missing ':- interface' declaration.
2015-11-16 10:46:25 +11:00
Peter Wang
82f8be162f mercury_cairo: Fix build in absence of ps/svg support.
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.svg.m:
	Let these modules build when support for their respective
	surfaces is disabled in the cairo installation.
2015-09-04 11:24:39 +10:00
Peter Wang
44eacd93fa mercury_cairo: Add recording surfaces.
Add support for cairo recording surfaces.

extras/graphics/mercury_cairo/cairo.m:
	Add type `rectangle_f', the float analogue of `rectangle'.

extras/graphics/mercury_cairo/cairo.recording.m:
	New module.

extras/graphics/mercury_cairo/README:
	Mention recording surfaces.
2015-09-04 10:13:21 +10:00
Peter Wang
59eda3c625 mercury_cairo: Add matrix.unpack.
extras/graphics/mercury_cairo/cairo.matrix.m:
	Add `matrix.unpack' to return the components of a matrix.
2015-09-04 10:13:21 +10:00
Peter Wang
2ceab923a2 mercury_cairo: Add matrix.invert that does not throw exception.
extras/graphics/mercury_cairo/cairo.matrix.m:
	Add `matrix.invert/4' which returns a success indicator instead
	of throwing an exception if the matrix is uninvertible.

	Delete unused import.
2015-09-04 10:13:21 +10:00
Peter Wang
710b6cf8e9 mercury_cairo: Add set_default_font_face.
extras/graphics/mercury_cairo/cairo.m:
extras/graphics/mercury_cairo/cairo.text.m:
	Add `set_default_font_face'.
2015-09-04 10:13:21 +10:00
Peter Wang
1d3aa62b59 mercury_cairo: Add show_glyphs and glyph_path.
Export the functionality of `cairo_show_glyphs' and `cairo_glyph_path'.

extras/graphics/mercury_cairo/cairo.m:
	Add internal predicates for working with arrays of `cairo_glyph_t'.

extras/graphics/mercury_cairo/cairo.text.m:
	Add `glyph' type that corresponds to `cairo_glyph_t' in the C API.

	Add `show_glyphs' predicate.

extras/graphics/mercury_cairo/cairo.path.m:
	Add `glyph_path' predicate.
2015-09-04 10:13:21 +10:00
Peter Wang
220e8c4beb mercury_cairo: Increment reference count in get_group_target.
extras/graphics/mercury_cairo/cairo.m:
	`get_group_target' was missing a reference count increment
	analogous to that in `get_target'.
2015-09-04 10:13:21 +10:00
Peter Wang
ee0bad3add mercury_cairo: Fix type of set_source_surface.
extras/graphics/mercury_cairo/cairo.m:
	Fix the type of `set_source_surface'.  The surface from which
	the source pattern is created does not need to be the same type
	as the context surface.
2015-09-04 10:13:21 +10:00
Peter Wang
cbd31d8d8f mercury_cairo: Fix swapped width, height arguments on create_surface.
extras/graphics/mercury_cairo/cairo.image.m:
extras/graphics/mercury_cairo/cairo.pdf.m:
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.region.m:
extras/graphics/mercury_cairo/cairo.svg.m:
	Fix swapped width, height arguments on create_surface
	predicates.
2015-09-04 10:13:21 +10:00
Peter Wang
743ba11d93 mercury_cairo: Fix create_surface predicates to not call back into Mercury.
The create_surface_2 foreign procs for each surface type were declared
`will_not_call_mercury' but actually called exported Mercury predicates
to build trivial data structures.

extras/graphics/mercury_cairo/cairo.image.m:
extras/graphics/mercury_cairo/cairo.pdf.m:
extras/graphics/mercury_cairo/cairo.ps.m:
extras/graphics/mercury_cairo/cairo.svg.m:
	Write create_surface_2 predicates without calling Mercury
	predicates.
2015-09-04 10:13:21 +10:00
Peter Wang
3beb77f67f mercury_cairo: Fix spelling.
extras/graphics/mercury_cairo/cairo.m:
extras/graphics/mercury_cairo/cairo.pattern.m:
	Fix spelling.
2015-09-04 10:13:21 +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
fcee76f671 Update .gitignore files.
Update .gitignore files to ignore Unix executables and intermediate files.

extras/.gitignore:
    ignore *.beams

extras/cgi/.gitignore:
extras/gator/.gitignore:
extras/graphics/mercury_cairo/tutorial/.gitignore:
extras/logged_output/.gitignore:
extras/monte/.gitignore:
extras/odbc/.gitignore:
extras/posix/samples/.gitignore:
extras/quickcheck/.gitignore:
extras/quickcheck/tutes/.gitignore:
extras/references/samples/.gitignore:
    ignore executable(s)

extras/references/tests/.gitignore:
extras/trailed_update/tests/.gitignore:
    ignore test *.res and *.out files,
    ignore executable

extras/windows_installer_generator/sample/.gitignore:
samples/concurrency/dining_philosophers/.gitignore:
samples/concurrency/midimon/.gitignore:
    ignore executables

tests/hard_coded/.gitignore:
    ignore *.o and *.obj object files
2014-11-06 22:33:48 +11:00
Julien Fischer
3075dc975b Delete the workaround for bug #354 in the cairo binding.
extras/graphics/mercury_cairo/Mercury.options:
	As above.
2014-09-01 16:54:55 +10:00
Julien Fischer
79ea51024a Workaround bug #354 in the cairo binding.
extras/graphics/mercury_cairo/Mercury.options:
	Add a workaround for bug #354.

	Don't attempt to install his library in the csharp grade.
2014-08-25 03:52:56 +10:00
Sebastian Godelet
a302f20eae fix extras/graphics/ examples
Replace all occurances of index0_det with det_index0 to make these examples
compatible with recent versions of Mercury.

extras/graphics/easyx/samples/bounce.m:
extras/graphics/mercury_allegro/examples/exspline.m:
extras/graphics/mercury_allegro/samples/demo/aster.m:
extras/graphics/mercury_allegro/samples/speed/view.m:
    As above.
2014-02-27 16:58:43 +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
aff3343c68 Fix more compilation errors in extras.
extras/trailed_update/tr_store.m:
	Conform to runtime changes.

extras/gator/genotype.m:
extras/gator/phenotype.m:
extras/graphics/samples/maze/maze.m:
extras/trailed_update/samples/interpreter.m:
	Conform to standard library changes.
2014-02-06 03:31:59 +11:00
sebgod
e9851e9ff2 Fix compilation errors in the tcltk binding.
Add the MR_ prefix to list_empty and list_tail calls.

extras/graphics/mercury_tcltk/mtcltk.m:
    In line 157, the MR_ prefix was missing from the list_empty and
    list_tail calls.
2014-02-05 12:25:53 +11:00
Julien Fischer
b07e7df74a Extend the Mercury GLUT binding to make some of the freeglut extensions
available if the GLUT implementation being used is freeglut.
Using these extensions in the absence of freeglut will cause an exception to
be thrown.

extras/graphics/mercury_glut/glut.m:
	Add a predicate have_freeglut/0 for testing whether freeglut
	is being used.

	Fix the description of glut.quit/2 - it shuts things down
	gracefully rather than simply aborting.

	Provide bindings to the following freeglut extensions:

		* glutMainLoopEvent
		* glutLeaveMainLoop
		* glutGet with GLUT_FULL_SCREEN

extras/graphics/mercury_glut/glut.model.m:
	Provide bindings to the following freeglut extensions:

		* glutWireRhombicDodecahedron
		* glutSolidRhombicDodecahedron

extras/graphics/mercury_glut/glut.window.m:
	Provide bindings to the following freeglut extennsions:

		* glutFullScreenToggle
		* glutLeaveFullScreeen

	(The latter doesn't appear to be available in the versions
	of freeglut that are on the Linux machines I tested this on,
	I've commented it out for the time being.)

extras/graphics/mercury_glut/*.m:
	Use don't-care variables for handling the I/O state in
	foreign_procs.  This avoids warnings from MSVC.

extras/graphics/mercury_glut/README:
	Mention that some of the freeglut extensions are now optionally
	supported.
2012-03-27 06:02:40 +00:00