From 9a3d216a65f7bdbf37e2ed40f0276abae167279d Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Wed, 8 Sep 2021 16:51:29 +0200 Subject: [PATCH] bulk changes, forgot what ;-) --- c/resistor-color-duo/src/resistor_color_duo.c | 5 ++--- c/resistor-color-duo/src/resistor_color_duo.h | 2 +- c/two-bucket/main.c | 2 +- c/two-bucket/two_bucket.c | 1 - c/two-bucket/two_bucket.h | 4 ++-- c/word-count/src/word_count.c | 4 ++-- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/c/resistor-color-duo/src/resistor_color_duo.c b/c/resistor-color-duo/src/resistor_color_duo.c index 7bed2be..73314ea 100644 --- a/c/resistor-color-duo/src/resistor_color_duo.c +++ b/c/resistor-color-duo/src/resistor_color_duo.c @@ -4,10 +4,9 @@ #include #endif -resistor_band_t color_code(resistor_band_t *colors) +resistor_band_t color_code(resistor_band_t colors[static 2]) { resistor_band_t c1=*colors, c2=*(colors+1); - return c1>=BLACK && c1<=WHITE && c2>=BLACK && c2<=WHITE? c1*10+c2: ERROR; } @@ -19,7 +18,7 @@ int main(int ac, char **av) for (; arg #include /* We will choose to use a board of (X,Y) squares, with the sizes of the 2 diff --git a/c/two-bucket/two_bucket.h b/c/two-bucket/two_bucket.h index fca0cfd..8d31866 100644 --- a/c/two-bucket/two_bucket.h +++ b/c/two-bucket/two_bucket.h @@ -22,6 +22,6 @@ bucket_result_t measure(bucket_liters_t bucket_1_size, bucket_liters_t goal_volume, bucket_id_t start_bucket); -#include "br-common.h" - #endif /* TWO_BUCKETS_H */ + +#include "br-common.h" diff --git a/c/word-count/src/word_count.c b/c/word-count/src/word_count.c index f30e99b..45c9cb5 100644 --- a/c/word-count/src/word_count.c +++ b/c/word-count/src/word_count.c @@ -18,10 +18,10 @@ * The following will return INVALID_WORD: * P2P * 0xFF - * A'2 + * A''B * The following will return 2 numbers/words: * 1'2 - * A''B + * A'2 */ /* get next word in string