aboutsummaryrefslogtreecommitdiffstats
path: root/libj2_j2u_lrot.3
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-18 12:46:09 +0100
committerMattias Andrée <m@maandree.se>2026-01-18 12:46:09 +0100
commit22db7c7726365f534e33036bff03d9363407f3e0 (patch)
treed5cec19a71fc8a5af9f3f279ac5f536e4883d1fb /libj2_j2u_lrot.3
parentAdd rsh man pages (diff)
downloadlibj2-22db7c7726365f534e33036bff03d9363407f3e0.tar.gz
libj2-22db7c7726365f534e33036bff03d9363407f3e0.tar.bz2
libj2-22db7c7726365f534e33036bff03d9363407f3e0.tar.xz
Add lrot and rrot man pages
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libj2_j2u_lrot.3')
-rw-r--r--libj2_j2u_lrot.376
1 files changed, 76 insertions, 0 deletions
diff --git a/libj2_j2u_lrot.3 b/libj2_j2u_lrot.3
new file mode 100644
index 0000000..8c089e2
--- /dev/null
+++ b/libj2_j2u_lrot.3
@@ -0,0 +1,76 @@
+.TH LIBJ2_J2U_LROT 3 LIBJ2
+.SH NAME
+libj2_j2u_lrot \- Left-rotate bits
+
+.SH SYNOPSIS
+.nf
+#include <libj2.h>
+
+void \fBlibj2_j2u_lrot\fP(struct libj2_j2u *\fIa\fP, unsigned \fIb\fP);
+void \fBlibj2_j2u_lrot_to_j2u\fP(const struct libj2_j2u *\fIa\fP, unsigned \fIb\fP, struct libj2_j2u *\fIr\fP);
+void \fBlibj2_ju_lrot_to_j2u\fP(uintmax_t \fIa\fP, unsigned \fIb\fP, struct libj2_j2u *\fIr\fP);
+.fi
+.PP
+Link with
+.IR -lj2 .
+
+.SH DESCRIPTION
+The
+.BR libj2_j2u_lrot ()
+function shifts each bit in
+.I a
+to
+.I b
+more significant positions; the
+.I b
+most significant bits are moved
+to the
+.I b
+least significant positions with
+preserved significance relative to
+each other. The result is written
+back to
+.IR a .
+.PP
+The
+.BR libj2_j2u_lrot_to_j2u ()
+function modifies
+.I a
+likewise, but writes the result to
+.I r
+rather than
+.IR a .
+.PP
+The
+.BR libj2_ju_lrot_to_j2u ()
+function is equivalent to the
+.BR libj2_j2u_lrot_to_j2u ()
+function, except
+.I a
+is converted to a
+.B struct libj2_j2u *
+before the modification takes place.
+.PP
+The arguments are assumed to be
+.RI non- NULL .
+
+.SH RETURN VALUE
+None.
+
+.SH ERRORS
+The above listed functions cannot fail.
+
+.SH HISTORY
+The
+.BR libj2_j2u_lrot (),
+.BR libj2_j2u_lrot_to_j2u (),
+and
+.BR libj2_ju_lrot_to_j2u ()
+functions were added in version 1.0 of
+.BR libj2 .
+
+.SH SEE ALSO
+.BR libj2 (7),
+.BR libj2_j2u_rrot (3),
+.BR libj2_j2i_lsh (3),
+.BR libj2_j2i_rsh (3)