Commit Graph

13 Commits

Author SHA1 Message Date
Julien Fischer
e0f5ac47db Make it easier for vi to jump past the initial comments
Estimated hours taken: 0.1
Branches: main

library/*.m:
	Make it easier for vi to jump past the initial comments
	at the head of a module.
2006-04-19 05:18:00 +00:00
Julien Fischer
5e92224eec Improve the library reference manual by formatting the beginning of
Estimated hours taken: 0.2
Branches: main, release

library/*.m:
	Improve the library reference manual by formatting the beginning of
	library modules consistently.

library/integer.m:
	Fix some bad indentation.
2006-04-13 06:08:05 +00:00
Zoltan Somogyi
b293bd999d Replace __ with . as the module qualifier everywhere.
Estimated hours taken: 1
Branches: main

library/*.m:
	Replace __ with . as the module qualifier everywhere.

tests/hard_coded/test_injection.exp:
	Replace __ with . as the module qualifier in expected exceptions.
2006-03-07 22:23:58 +00:00
Zoltan Somogyi
88c7539230 Import only one module per line, as we already do in the compiler
Estimated hours taken: 0.3
Branches: main

library/*.m:
	Import only one module per line, as we already do in the compiler
	directory.
2005-06-16 04:08:07 +00:00
Ralph Becket
d0bd460b8f Minor reformatting; added some renamed preds and funcs to improve
Estimated hours taken: 3
Branches: main, version-0_12-branch

library/array.m:
library/array2d.m:
library/assoc_list.m:
library/bag.m:
library/benchmarking.m:
library/bimap.m:
library/bintree_set.m:
library/bitmap.m:
library/bool.m:
library/builtin.m:
library/cord.m:
library/float.m:
library/graph.m:
library/group.m:
library/hash_table.m:
library/int.m:
library/lexer.m:
library/list.m:
library/map.m:
library/math.m:
library/multi_map.m:
library/ops.m:
library/parser.m:
library/rbtree.m:
library/set.m:
library/stack.m:
library/store.m:
library/string.m:
library/time.m:
	Minor reformatting; added some renamed preds and funcs to improve
	consistency of naming in the library; removed some preds and types that
	have been marked obsolete since 0.11.
2005-02-02 04:28:50 +00:00
Zoltan Somogyi
6909674f14 Bring these modules up to date with our current style guidelines.
Estimated hours taken: 8
Branches: main

library/*.m:
	Bring these modules up to date with our current style guidelines.
	Use predmode declarations where appropriate. Use state variable syntax
	where appropriate. Reorder arguments where this makes it possible to
	to use state variable syntax. Standardize format of predicate
	description comments. Standardize indentation.
2004-03-15 23:49:36 +00:00
Fergus Henderson
a1ef1bf468 Fix a problem where the licensing on some of the files in the Mercury
Estimated hours taken: 0.5
Branches: main

Fix a problem where the licensing on some of the files in the Mercury
standard library was not explicitly stated.

library/bitmap.m:
library/hash_table.m:
library/pprint.m:
	Update the comments about the copyright and license for these files:
	mark them as copyright by the University of Melbourne, since they
	have been donated to the Mercury project, and license them under the
	LGPL.

	Also update the layout of the %-------...-------% lines to match
	our usual coding convention, so that they get formatted nicely
	in the Mercury library reference manual.

	Also delete "ff=unix" from the vim line for bitmap.m.

	Add "stability:" comments for bitmap.m and hash_table.m
	("low" since they make use of unique modes in a way that will
	change when we implement ui modes and nested unique modes properly).
2002-10-29 16:51:27 +00:00
Simon Taylor
2aff0ec3d3 Fix a mode error -- the input to `complement' should have
Estimated hours taken: 0.25
Branches: main, release

library/bitmap.m:
	Fix a mode error -- the input to `complement' should have
	mode `bitmap_di', not `bitmap_ui'.
2002-06-04 06:07:46 +00:00
Simon Taylor
29ab9fdf3f For consistency with the other library modules,
Estimated hours taken: 0.1

library/bitmap.m:
library/hash_table.m:
	For consistency with the other library modules,
	throw `require__software_error' exceptions rather
	than just raw strings.
2001-10-24 07:27:40 +00:00
Ralph Becket
f57e4e2da1 Fixed a bug in the clear/2 function: it was clearing everything
Estimated hours taken: 0.2

library/bitmap.m:
	Fixed a bug in the clear/2 function: it was clearing everything
	*but* the required bit in the word holding the bit in question.
2001-05-09 15:21:59 +00:00
Fergus Henderson
483494a7cf Move the definition of int_rem_bits_per_int from bitmap.m to
Estimated hours taken: 0.5

library/bitmap.m:
library/int.m:
	Move the definition of int_rem_bits_per_int from bitmap.m to
	int.m.  Also change the way it is defined to
	(a) match the definition of int__quot_bits_per_int and
	(b) to avoid assuming that bits_per_int is a power of 2.
2001-02-12 06:23:26 +00:00
Ralph Becket
6f3991bf05 Index: bitmap.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/bitmap.m,v
retrieving revision 1.1
diff -u -r1.1 bitmap.m
--- bitmap.m	2001/02/07 17:31:03	1.1
+++ bitmap.m	2001/02/08 17:15:29
@@ -98,7 +98,15 @@
     %
 :- func get(bitmap, int) = bool.
 :- mode get(bitmap_ui, in) = out is det.
+:- mode get(in, in) = out is det.
 
+    % Unsafe versions of the above: if the index is out of range
+    % then behaviour is undefined and bad things are likely to happen.
+    %
+:- func unsafe_get(bitmap, int) = bool.
+:- mode unsafe_get(bitmap_ui, in) = out is det.
+:- mode unsafe_get(in, in) = out is det.
+
     % Create a new copy of a bitmap.
     %
 :- func copy(bitmap) = bitmap.
@@ -269,6 +277,10 @@
 % ---------------------------------------------------------------------------- %
 
 get(BM, I) = ( if is_clear(BM, I) then no else yes ).
+
+%------------------------------------------------------------------------------%
+
+unsafe_get(BM, I) = ( if unsafe_is_clear(BM, I) then no else yes ).
 
 % ---------------------------------------------------------------------------- %
2001-02-08 17:24:37 +00:00
Ralph Becket
95b430aa5b An efficient, resizable bitmap implementation.
Estimated hours taken: 4

An efficient, resizable bitmap implementation.

library/bitmap.m:
	Added.

library/library.m:
	Added bitmap to import list.

compiler/modules.m:
	Added mercury_std_library_module/1 entry for bitmap.

NEWS:
	Recorded bitmap.m as a new library module.
2001-02-07 17:31:27 +00:00