From 3728c12ecbe308092b213f1b664303a48858a2b8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 3 Mar 2016 12:47:39 +0100 Subject: Add zbset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- man/zand.3 | 1 + man/zbset.3 | 39 +++++++++++++++++++++++++++++++++++++++ man/zbtest.3 | 1 + man/zinit.3 | 1 + man/zlsb.3 | 1 + man/zlsh.3 | 1 + man/znot.3 | 1 + man/zor.3 | 1 + man/zrsh.3 | 1 + man/zxor.3 | 1 + 10 files changed, 48 insertions(+) create mode 100644 man/zbset.3 (limited to 'man') diff --git a/man/zand.3 b/man/zand.3 index f7be535..c4875bc 100644 --- a/man/zand.3 +++ b/man/zand.3 @@ -27,5 +27,6 @@ with non-unique parameters. .BR zrsh (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) diff --git a/man/zbset.3 b/man/zbset.3 new file mode 100644 index 0000000..afa006f --- /dev/null +++ b/man/zbset.3 @@ -0,0 +1,39 @@ +.TH ZBSET 3 libzahl +.SH NAME +zbset - Set, clear, or flip a bit in a big integer +.SH SYNOPSIS +.nf +#include + +void zbset(z_t \fIa\fP, z_t \fIb\fP, size_t \fIindex\fP, int \fIset\fP); +.fi +.SH DESCRIPTION +.B zbset +either sets, clears, or flips the bit with the selected +.I index +in +.IR b , +and stores the result in +.IR a . +.P +The bit is set if +.IR "(set>0)" , +clear if +.IR "(set==0)" , +and flipped if +.IR "(set<0)" . +.P +It is safe to call +.B zbset +with non-unique parameters. +.SH SEE ALSO +.BR zbtest (3), +.BR zand (3), +.BR zor (3), +.BR zxor (3), +.BR znot (3), +.BR zlsh (3), +.BR zrsh (3), +.BR zsplit (3), +.BR zlsb (3), +.BR zbits (3) diff --git a/man/zbtest.3 b/man/zbtest.3 index ee3562a..63c2fba 100644 --- a/man/zbtest.3 +++ b/man/zbtest.3 @@ -17,6 +17,7 @@ is set in .B zbtest returns 1 if the bit is set, or 0 otherwise. .SH SEE ALSO +.BR zbset (3), .BR zand (3), .BR zor (3), .BR zxor (3), diff --git a/man/zinit.3 b/man/zinit.3 index bbae9e3..4e1d750 100644 --- a/man/zinit.3 +++ b/man/zinit.3 @@ -37,6 +37,7 @@ typedef struct { .BR zbits (3), .BR zlsb (3), .BR zbtest (3), +.BR zbset (3), .BR zand (3), .BR zor (3), .BR zxor (3), diff --git a/man/zlsb.3 b/man/zlsb.3 index 57586ef..6876c3d 100644 --- a/man/zlsb.3 +++ b/man/zlsb.3 @@ -28,5 +28,6 @@ is zero. .SH SEE ALSO .BR zbits (3), .BR zbtest (3), +.BR zbset (3), .BR znot (3), .BR zrsh (3) diff --git a/man/zlsh.3 b/man/zlsh.3 index a9c993c..e9192ad 100644 --- a/man/zlsh.3 +++ b/man/zlsh.3 @@ -28,5 +28,6 @@ with .BR ztrunc (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) diff --git a/man/znot.3 b/man/znot.3 index 99d7b40..f84de6b 100644 --- a/man/znot.3 +++ b/man/znot.3 @@ -44,5 +44,6 @@ sign-and-magnitude. .BR zrsh (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) diff --git a/man/zor.3 b/man/zor.3 index fe7f27f..301a3ea 100644 --- a/man/zor.3 +++ b/man/zor.3 @@ -27,5 +27,6 @@ with non-unique parameters. .BR zrsh (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) diff --git a/man/zrsh.3 b/man/zrsh.3 index 8e06180..905a262 100644 --- a/man/zrsh.3 +++ b/man/zrsh.3 @@ -28,5 +28,6 @@ with .BR ztrunc (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) diff --git a/man/zxor.3 b/man/zxor.3 index f7cd19c..28c2a4a 100644 --- a/man/zxor.3 +++ b/man/zxor.3 @@ -27,5 +27,6 @@ with non-unique parameters. .BR zrsh (3), .BR zsplit (3), .BR zbtest (3), +.BR zbset (3), .BR zlsb (3), .BR zbits (3) -- cgit v1.2.3-70-g09d2