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/io_count_words/count_words.c | 33 --------------------------- 1 file changed, 33 deletions(-) delete mode 100644 rushs/tinyprintf/io_count_words/count_words.c (limited to 'rushs/tinyprintf/io_count_words') diff --git a/rushs/tinyprintf/io_count_words/count_words.c b/rushs/tinyprintf/io_count_words/count_words.c deleted file mode 100644 index 8b8c9a5..0000000 --- a/rushs/tinyprintf/io_count_words/count_words.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -int count_words(const char *file_in) -{ - if (file_in == NULL) - { - return -1; - } - - FILE *f = fopen(file_in, "r"); - if (f == NULL) - { - return -1; - } - - int word = 0; - int count = 0; - int c; - while ((c = fgetc(f)) != EOF) - { - if ((c == ' ' || c == '\n' || c == '\t') && word == 1) - { - word = 0; - } - if (c != ' ' && c != '\n' && c != '\t' && word == 0) - { - word = 1; - count++; - } - } - - return count; -} -- cgit v1.2.3