From ca5e0110d3a45da5996720ce6983b440e2f791f3 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Fri, 4 Jan 2019 01:17:13 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3483 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- analyzer/pamfile.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'analyzer') diff --git a/analyzer/pamfile.c b/analyzer/pamfile.c index 3166e467..7b61f6fd 100644 --- a/analyzer/pamfile.c +++ b/analyzer/pamfile.c @@ -229,7 +229,7 @@ readToNextImage(const struct pam * const pamP, static void doOneImage(const char * const name, - unsigned int const imageDoneCount, + unsigned int const imageDoneCt, FILE * const fileP, enum ReportFormat const reportFormat, bool const allimages, @@ -256,7 +256,7 @@ doOneImage(const char * const name, break; case RF_HUMAN: if (allimages) - printf("%s:\tImage %d:\t", name, imageDoneCount); + printf("%s:\tImage %d:\t", name, imageDoneCt); else printf("%s:\t", name); @@ -294,21 +294,20 @@ describeOneFile(const char * const name, 'wantComments' means to show the comments from the image header. Meaningful only when 'reportFormat' is RF_HUMAN. -----------------------------------------------------------------------------*/ - unsigned int imageDoneCount; + unsigned int imageDoneCt; /* Number of images we've processed so far */ bool eof; - eof = false; - imageDoneCount = 0; - - while (!eof && (imageDoneCount < 1 || allimages)) { - doOneImage(name, imageDoneCount, fileP, + for (eof = false, imageDoneCt = 0; + !eof && (imageDoneCt < 1 || allimages); + ++imageDoneCt + ) { + doOneImage(name, imageDoneCt, fileP, reportFormat, allimages, wantComments, &eof); - ++imageDoneCount; } if (reportFormat == RF_COUNT) - printf("%s:\t%u images\n", name, imageDoneCount); + printf("%s:\t%u images\n", name, imageDoneCt); } -- cgit 1.4.1