X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=indent.c;fp=indent.c;h=145661ba7950afed98f7a0c292e6e9f04ee87ffc;hb=943fa96eea0aac7767c54c217f587c07f4ae8181;hp=874eead8efc566ed3b6e046357367d1c0094f484;hpb=222cc7151f4d4463a118db271469b3233079f350;p=indent.git diff --git a/indent.c b/indent.c index 874eead..145661b 100644 --- a/indent.c +++ b/indent.c @@ -59,9 +59,9 @@ int indent (FILE *fin, FILE *fout, cmode_t cmode) { /* 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); } @@ -89,10 +89,11 @@ int indent (FILE *fin, FILE *fout, cmode_t cmode) { 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;