-#define BITMAP_ERROR ((size_t) -1)
-size_t bitmap_scan (const struct bitmap *, bool);
-size_t bitmap_find_and_set (struct bitmap *);
-size_t bitmap_find_and_clear (struct bitmap *);
-
-size_t bitmap_set_cnt (const struct bitmap *);
-bool bitmap_clear_cnt (const struct bitmap *);
-
-bool bitmap_any (const struct bitmap *);
-bool bitmap_none (const struct bitmap *);
-bool bitmap_all (const struct bitmap *);
-
+/* Setting and testing multiple bits. */
+void bitmap_set_all (struct bitmap *, bool);
+void bitmap_set_multiple (struct bitmap *, size_t start, size_t cnt, bool);
+size_t bitmap_count (const struct bitmap *, size_t start, size_t cnt, bool);
+bool bitmap_contains (const struct bitmap *, size_t start, size_t cnt, bool);
+bool bitmap_any (const struct bitmap *, size_t start, size_t cnt);
+bool bitmap_none (const struct bitmap *, size_t start, size_t cnt);
+bool bitmap_all (const struct bitmap *, size_t start, size_t cnt);
+
+/* Finding set or unset bits. */
+#define BITMAP_ERROR SIZE_MAX
+size_t bitmap_scan (const struct bitmap *, size_t start, size_t cnt, bool);
+size_t bitmap_scan_and_flip (struct bitmap *, size_t start, size_t cnt, bool);
+
+/* File input and output. */