From 73c2b00a10c5786ddeeacc915e233fd4df1c9321 Mon Sep 17 00:00:00 2001 From: Martial Simon Date: Sat, 11 Oct 2025 22:19:00 +0200 Subject: fix: evalexpr & tinyprintf contenaient toute la piscine --- rushs/tinyprintf/traffic_lights/traffic_lights.c | 38 ------------------------ 1 file changed, 38 deletions(-) delete mode 100644 rushs/tinyprintf/traffic_lights/traffic_lights.c (limited to 'rushs/tinyprintf/traffic_lights/traffic_lights.c') diff --git a/rushs/tinyprintf/traffic_lights/traffic_lights.c b/rushs/tinyprintf/traffic_lights/traffic_lights.c deleted file mode 100644 index 76ea94f..0000000 --- a/rushs/tinyprintf/traffic_lights/traffic_lights.c +++ /dev/null @@ -1,38 +0,0 @@ -#include "traffic_lights.h" - -void init(unsigned char *lights) -{ - *lights <<= 4; -} - -void turn_on(unsigned char *lights, unsigned char light_num) -{ - *lights |= 1 << (light_num - 1); -} - -void turn_off(unsigned char *lights, unsigned char light_num) -{ - *lights &= ~(1 << (light_num - 1)); -} - -void next_step(unsigned char *lights) -{ - *lights <<= 1; - *lights += *lights >> 4; -} - -void reverse(unsigned char *lights) -{ - *lights = ~*lights; -} - -void swap(unsigned char *lights_1, unsigned char *lights_2) -{ - if (lights_1 == lights_2) - { - return; - } - *lights_1 = *lights_2 ^ *lights_1; - *lights_2 = *lights_1 ^ *lights_2; - *lights_1 = *lights_2 ^ *lights_1; -} -- cgit v1.2.3