summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <curtis.mcenroe@adgear.com>2016-09-12 16:02:41 -0400
committerJune McEnroe <curtis.mcenroe@adgear.com>2016-09-12 16:02:41 -0400
commitb18a8fc4ee6e9158014212bdd399bbbcad65a5a9 (patch)
tree82c7bf9faeecc49a116d1ae8d99ac041c72b3a26
parentAdd -s flag to xx (diff)
downloadsrc-b18a8fc4ee6e9158014212bdd399bbbcad65a5a9.tar.gz
src-b18a8fc4ee6e9158014212bdd399bbbcad65a5a9.zip
Fix ascii alignment in xx
Diffstat (limited to '')
-rwxr-xr-x.bin/xx.c3
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] : '.');