From 367c9cb514c9da766488b9bdb218a18e31cb7624 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 27 Mar 2016 01:38:28 +0000 Subject: Promote Stable (10.47) to Super Stable git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@2691 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/xvminitoppm.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'converter/ppm/xvminitoppm.c') diff --git a/converter/ppm/xvminitoppm.c b/converter/ppm/xvminitoppm.c index 935ab177..d76bea87 100644 --- a/converter/ppm/xvminitoppm.c +++ b/converter/ppm/xvminitoppm.c @@ -12,6 +12,7 @@ #include #include +#include #include "pm_c_util.h" #include "nstring.h" @@ -61,7 +62,8 @@ getLine(FILE * const ifP, rc = fgets(buf, size, ifP); if (rc == NULL) { if (ferror(ifP)) - pm_perror("read error"); + pm_error("read error. fgets() failed, errno=%d (%s)", + errno, strerror(errno)); else pm_error("unexpected EOF"); } @@ -107,16 +109,16 @@ readXvHeader(FILE * const ifP, getLine(ifP, buf, sizeof(buf)); - if (!STRNEQ(buf, "P7 332", 6)) + if (!strneq(buf, "P7 332", 6)) pm_error("Input is not a XV thumbnail picture. It does not " "begin with the characters 'P7 332'."); endOfComments = FALSE; while (!endOfComments) { getLine(ifP, buf, sizeof(buf)); - if (STRNEQ(buf, "#END_OF_COMMENTS", 16)) + if (strneq(buf, "#END_OF_COMMENTS", 16)) endOfComments = TRUE; - else if (STRNEQ(buf, "#BUILTIN", 8)) + else if (strneq(buf, "#BUILTIN", 8)) pm_error("This program does not know how to " "convert builtin XV thumbnail pictures"); } -- cgit 1.4.1