diff options
author | David Phillips <dbphillipsnz@gmail.com> | 2016-04-26 14:33:45 +1200 |
---|---|---|
committer | David Phillips <dbphillipsnz@gmail.com> | 2016-04-26 14:33:45 +1200 |
commit | 94db04e182dc78df6fa75f8e9c97b81c59c15b4b (patch) | |
tree | 91801a4c84fafa735773002aa751552becaefc4e | |
parent | 38fab4827eab92bccaf4194881a29e0b5c1187ba (diff) | |
download | pgm-interlace-94db04e182dc78df6fa75f8e9c97b81c59c15b4b.tar.xz |
isspace(3) is correct to use for PGM
-rw-r--r-- | pgm-interlace.c | 7 |
1 files changed, 1 insertions, 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); } |