summaryrefslogtreecommitdiff
path: root/lib/dns/sec/dnssafe/bgclrbit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dns/sec/dnssafe/bgclrbit.c')
-rw-r--r--lib/dns/sec/dnssafe/bgclrbit.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/dns/sec/dnssafe/bgclrbit.c b/lib/dns/sec/dnssafe/bgclrbit.c
new file mode 100644
index 00000000..36565f41
--- /dev/null
+++ b/lib/dns/sec/dnssafe/bgclrbit.c
@@ -0,0 +1,28 @@
+/* Copyright (C) RSA Data Security, Inc. created 1986, 1996. This is an
+ unpublished work protected as such under copyright law. This work
+ contains proprietary, confidential, and trade secret information of
+ RSA Data Security, Inc. Use, disclosure or reproduction without the
+ express written authorization of RSA Data Security, Inc. is
+ prohibited.
+ */
+
+#include "global.h"
+#include "bigmath.h"
+
+/* BigClrbit (a, v) -- clears v-th bit of a, where v is nonnegative.
+ */
+void BigClrbit (a, v)
+UINT2 *a;
+unsigned int v;
+{
+ a[v/16] &= ~ (1 << (v % 16));
+}
+
+/* BigSetbit (a, v) -- sets v-th bit of a, where v is nonnegative.
+ */
+void BigSetbit (a, v)
+UINT2 *a;
+unsigned int v;
+{
+ a[v/16] |= (1 << (v % 16));
+}