aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <dbphillipsnz@gmail.com>2016-04-26 14:33:45 +1200
committerDavid Phillips <dbphillipsnz@gmail.com>2016-04-26 14:33:45 +1200
commit94db04e182dc78df6fa75f8e9c97b81c59c15b4b (patch)
tree91801a4c84fafa735773002aa751552becaefc4e
parent38fab4827eab92bccaf4194881a29e0b5c1187ba (diff)
downloadpgm-interlace-94db04e182dc78df6fa75f8e9c97b81c59c15b4b.tar.xz
isspace(3) is correct to use for PGM
-rw-r--r--pgm-interlace.c7
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);
}