diff options
author | June McEnroe <june@causal.agency> | 2016-09-12 16:02:41 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2016-09-12 16:02:41 -0400 |
commit | 3ed4f682adecde06710ae0bdad522c44faf751e6 (patch) | |
tree | 965ea605fdb676d10640dc952d56ccd19344f2d0 | |
parent | Add -s flag to xx (diff) | |
download | src-3ed4f682adecde06710ae0bdad522c44faf751e6.tar.gz src-3ed4f682adecde06710ae0bdad522c44faf751e6.zip |
Fix ascii alignment in xx
-rwxr-xr-x | .bin/xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/.bin/xx.c b/.bin/xx.c index 30bf1708..b81f0d79 100755 --- a/.bin/xx.c +++ b/.bin/xx.c @@ -74,9 +74,8 @@ int main(int argc, char **argv) } if (flags & ASCII) { - // TODO: Fix alignment with group. for (i = n; i < cols; ++i) - printf(" "); + printf((group && !(i % group)) ? " " : " "); printf(" "); for (i = 0; i < n; ++i) printf("%c", isprint(buf[i]) ? buf[i] : '.'); |