From 973d849362608e917c65f7110e69dab19533e718 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Mon, 25 Jun 2007 14:24:01 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@322 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- lib/fileio.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'lib/fileio.c') diff --git a/lib/fileio.c b/lib/fileio.c index 01243f9d..d891b05a 100644 --- a/lib/fileio.c +++ b/lib/fileio.c @@ -17,23 +17,23 @@ #include "fileio.h" char -pm_getc(FILE * const file) { +pm_getc(FILE * const fileP) { int ich; char ch; - ich = getc(file); + ich = getc(fileP); if (ich == EOF) pm_error("EOF / read error reading a byte"); ch = (char) ich; if (ch == '#') { do { - ich = getc(file); - if (ich == EOF) - pm_error("EOF / read error reading a byte"); - ch = (char) ich; - } while (ch != '\n' && ch != '\r'); - } + ich = getc(fileP); + if (ich == EOF) + pm_error("EOF / read error reading a byte"); + ch = (char) ich; + } while (ch != '\n' && ch != '\r'); + } return ch; } @@ -76,7 +76,7 @@ pm_getuint(FILE * const ifP) { do { ch = pm_getc(ifP); - } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); if (ch < '0' || ch > '9') pm_error("junk in file where an unsigned integer should be"); @@ -165,6 +165,3 @@ pm_putraw(FILE * const file, pm_error("Error writing %d byte sample to file.", bytes); } } - - - -- cgit 1.4.1