Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix -o -0 -vv formatting bug

  • Loading branch information...
commit 897262d76eaeb37c8976b5c92a4ad5594b6f01a0 1 parent 822904b
@kholtman authored
Showing with 10 additions and 9 deletions.
  1. +3 −0  HISTORY
  2. +7 −9 afio.c
View
3  HISTORY
@@ -992,3 +992,6 @@ Fixed two compiler errors (as reported by recent gcc) due to
discrepancies between function declarations in afio.h and afio.c.
Problem reported by Jari Aalto. Added some more size_t and ssize_t.
+Fixed formatting bug to restore output behavior of afio -o -0 -vv like
+it was in afio 2.5. Based on bug report by Corey Mann. Closes Debian
+bug #420654.
View
16 afio.c
@@ -4684,15 +4684,13 @@ tocentry (name, asb)
else
namedot = 0;
- if (ISCONTROL(asb))
- res = printf("//--%s",name);
+ if (ISCONTROL(asb)) res = printf("//--");
+
+ if ((!useoutmodetoc) && flag0)
+ res = printf ("%s%c", name, 0);
else
- {
- if (flag0)
- res = printf ("%s%c", name, 0);
- else
- res = printf ("%s", name);
- }
+ res = printf ("%s", name);
+
/* to find out about broken pipe as early as possible */
if(res > 0) res = fflush(stdout);
/* check for broken pipe on stdout, this ends the listing */
@@ -4752,7 +4750,7 @@ tocentry (name, asb)
#endif /* S_IFLNK */
}
- if (!flag0)
+ if ((!flag0)||useoutmodetoc)
putchar ('\n');
}
Please sign in to comment.
Something went wrong with that request. Please try again.