/* read file */
nb = fread (bufin, 1, BUFFERSIZE, fin);
- VERBOSE (DEBUG, fprintf (stdout, "buffer: %d\n", nb));
+ VERBOSE (DEBUG, fprintf (stdout, "buffer in: %d\n", nb));
if (errno != 0) {
- VERBOSE (ERROR, fprintf (stderr, "can't read file\n"));
+ VERBOSE (ERROR, fprintf (stderr, "can't read file (%d)\n", errno));
exit (1);
}
ptout = '\0';
/* write file */
+ VERBOSE (DEBUG, fprintf (stdout, "buffer out: %d\n", strlen (bufout)));
ptout = bufout;
while ((nb = fread (ptout, 1, strlen (ptout), fout)) != strlen (ptout)) {
if (errno != 0) {
- VERBOSE (ERROR, fprintf (stderr, "can't write file\n"));
+ VERBOSE (ERROR, fprintf (stderr, "can't write file (%d)\n", errno));
exit (1);
}
ptout += nb;