diff mbox

[2/2] Make the stat command handle leading blank spaces

Message ID 1308795967-7605-3-git-send-email-tdh@excfb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Haynes June 23, 2011, 2:26 a.m. UTC
Signed-off-by: Tom Haynes <tdh@excfb.com>
---
 general/stat.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/general/stat.c b/general/stat.c
index 2ce604e..b9128ae 100644
--- a/general/stat.c
+++ b/general/stat.c
@@ -52,7 +52,9 @@  getnewch:
 		exit(1);
 	}
 	c = i & 0x7f;
-	if (c == '\n' || c == '\r' || c == 'r')
+	if (c == ' ' || c == '\t')
+		goto getnewch;
+	else if (c == '\n' || c == '\r' || c == 'r')
 		attfmt = 1;
 	else if (isdigit(c))
 		fmt = "%lf %*s %lf %*s %lf %*s";	/* BSD fmt */