diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 07:29:14 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2006-08-26 07:29:14 +0000 |
commit | 061dfc6edd70967c15cf25e2472936b60b45d16d (patch) | |
tree | 869621886d1a8d65f12c71b68b2fc87a2e2818aa /converter | |
parent | 483856a78f157e17bbc2405519be1d9a00b38adc (diff) | |
download | netpbm-mirror-061dfc6edd70967c15cf25e2472936b60b45d16d.tar.gz netpbm-mirror-061dfc6edd70967c15cf25e2472936b60b45d16d.tar.xz netpbm-mirror-061dfc6edd70967c15cf25e2472936b60b45d16d.zip |
Eliminate pm_perror() in favor of informative error messages
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@20 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-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..64fb0762 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"); } |