bore

Unnamed repository
Log | Files | Refs | README

commit 0435306d3ec6cb4175f0e4a3c657e5339e370800
parent d75a03956e596040815f317c30e9f95a9993c319
Author: phoebos <ben@bvnf.space>
Date:   Wed, 22 Sep 2021 22:25:46 +0100

wc: use isspace()

Diffstat:
Mwc.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wc.c b/wc.c @@ -51,7 +51,7 @@ wc(struct count *ct, FILE *f) { while ((c = fgetc(f)) != EOF) { if (c == '\n') ++ct->l; - if (c == ' ' || c == '\t' || c == '\n') + if (isspace(c)) in_word=0; else if (in_word == 0) { in_word = 1;