diff options
Diffstat (limited to 'converter/ppm/xvminitoppm.c')
-rw-r--r-- | converter/ppm/xvminitoppm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/converter/ppm/xvminitoppm.c b/converter/ppm/xvminitoppm.c index dfc76fcf..8cea1f9d 100644 --- a/converter/ppm/xvminitoppm.c +++ b/converter/ppm/xvminitoppm.c @@ -12,6 +12,7 @@ #include <assert.h> #include <string.h> +#include <errno.h> #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"); } |