From c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Mon, 15 Sep 2025 01:08:27 +0200 Subject: add: graphs et rushs --- rushs/evalexpr/bit_rotation/rol.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 rushs/evalexpr/bit_rotation/rol.c (limited to 'rushs/evalexpr/bit_rotation/rol.c') diff --git a/rushs/evalexpr/bit_rotation/rol.c b/rushs/evalexpr/bit_rotation/rol.c new file mode 100644 index 0000000..151ebb5 --- /dev/null +++ b/rushs/evalexpr/bit_rotation/rol.c @@ -0,0 +1,5 @@ +unsigned char rol(unsigned char value, unsigned char roll) +{ + roll %= sizeof(unsigned char) * 8; + return (value << roll) | (value >> (8 * sizeof(unsigned char) - roll)); +} -- cgit v1.2.3