From 94db04e182dc78df6fa75f8e9c97b81c59c15b4b Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 26 Apr 2016 14:33:45 +1200 Subject: isspace(3) is correct to use for PGM --- pgm-interlace.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pgm-interlace.c b/pgm-interlace.c index 0060723..9c8e417 100644 --- a/pgm-interlace.c +++ b/pgm-interlace.c @@ -71,18 +71,13 @@ int check_sanity(long width, long height, long white, unsigned int clust_total) return 0; } -int is_pgm_whitespace(char c) -{ - return strchr(" \t\n\r", c) != NULL; -} - void read_whitespace(FILE *fd) { char c = '\0'; do { c = fgetc(fd); - } while (is_pgm_whitespace(c)); + } while (isspace(c)); ungetc(c, fd); } -- cgit v1.1