decreased whitespace between files, modified error message text

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7273 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Matthew Wilber
2004-04-21 00:35:57 +00:00
parent e2ed67d283
commit 85eea08ac9
+5 -3
View File
@@ -83,7 +83,7 @@ pngcb_flush_data(png_structp ppng)
void void
PrintPNGInfo(const char *path) PrintPNGInfo(const char *path)
{ {
printf("\n\n--- %s ---\n", path); printf("\n--- %s ---\n", path);
BFile *pfile; BFile *pfile;
pfile = new BFile(path, B_READ_ONLY); pfile = new BFile(path, B_READ_ONLY);
@@ -101,7 +101,7 @@ PrintPNGInfo(const char *path)
} }
if (!png_check_sig(buf, kSigSize)) { if (!png_check_sig(buf, kSigSize)) {
// if first 8 bytes of stream don't match PNG signature bail // if first 8 bytes of stream don't match PNG signature bail
printf("File doesn't begin with PNG signature\n"); printf("Error: file doesn't begin with PNG signature\n");
return; return;
} }
@@ -118,11 +118,13 @@ PrintPNGInfo(const char *path)
if (!pinfo) if (!pinfo)
break; break;
// set error handling // set error handling
if (setjmp(png_jmpbuf(ppng))) if (setjmp(png_jmpbuf(ppng))) {
// When an error occurs in libpng, it uses // When an error occurs in libpng, it uses
// the longjmp function to continue execution // the longjmp function to continue execution
// from this point // from this point
printf("Error: error in libpng function\n");
break; break;
}
// set read callback function // set read callback function
png_set_read_fn(ppng, static_cast<void *>(pio), pngcb_read_data); png_set_read_fn(ppng, static_cast<void *>(pio), pngcb_read_data);