+/* Return non-zero if BITNO in SRC is the only set bit. */
+int
+bitset_only_set_p (src, bitno)
+ bitset src;
+ bitset_bindex bitno;
+{
+ bitset_bindex val[2];
+ bitset_bindex next = 0;
+
+ if (bitset_list (src, val, 2, &next) != 1)
+ return 0;
+ return val[0] == bitno;
+}
+
+
+/* Toggle bit BITNO in bitset BSET and return non-zero if now set. */
+int
+bitset_toggle (bset, bitno)
+ bitset bset;
+ bitset_bindex bitno;
+{
+ /* This routine is for completeness. It could be optimized if
+ required. */
+ if (bitset_test (bset, bitno))
+ {
+ bitset_reset (bset, bitno);
+ return 0;
+ }
+ else
+ {
+ bitset_set (bset, bitno);
+ return 1;
+ }
+}
+
+