Write more sensible error message when failing to open PNM file.

DEVEL_2_0_BRANCH-1
Petter Reinholdtsen 2001-02-22 09:45:29 +00:00
rodzic 7e318fb164
commit ec5eef8f35
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -419,7 +419,10 @@ getparmfromfile (void)
parms.bytes_per_line = parms.pixels_per_line = parms.lines = 0;
if ((fn = fopen (filename, "rb")) == NULL)
return -1;
{
DBG(1, "getparmfromfile: unable to open file \"%s\"\n", filename);
return -1;
}
/* Skip comments. */
do
@ -518,7 +521,10 @@ sane_start (SANE_Handle handle)
return SANE_STATUS_INVAL;
if ((infile = fopen (filename, "rb")) == NULL)
return SANE_STATUS_INVAL;
{
DBG(1, "sane_start: unable to open file \"%s\"\n", filename);
return SANE_STATUS_INVAL;
}
/* Skip the header (only two lines for a bitmap). */
nlines = (ppm_type == ppm_bitmap) ? 1 : 0;