summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authortheraven <theraven@FreeBSD.org>2013-08-14 14:34:02 +0000
committertheraven <theraven@FreeBSD.org>2013-08-14 14:34:02 +0000
commit70c59fcff4a1693ccbb9b659a2979eecb249c225 (patch)
tree67f07212515beba56ca35f3133e4a190c2ab8e17 /usr.bin
parent8255307210ba488bbf6e9072a645e975c808f8b2 (diff)
downloadFreeBSD-src-70c59fcff4a1693ccbb9b659a2979eecb249c225.zip
FreeBSD-src-70c59fcff4a1693ccbb9b659a2979eecb249c225.tar.gz
Make carets line up in dtc diagnostics if the line starts with a tab.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/dtc/input_buffer.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/dtc/input_buffer.cc b/usr.bin/dtc/input_buffer.cc
index 10b3a00..8f055fe 100644
--- a/usr.bin/dtc/input_buffer.cc
+++ b/usr.bin/dtc/input_buffer.cc
@@ -216,7 +216,8 @@ input_buffer::parse_error(const char *msg)
putc('\n', stderr);
for (int i=0 ; i<(cursor-line_start) ; ++i)
{
- putc(' ', stderr);
+ char c = (buffer[i+line_start] == '\t') ? '\t' : ' ';
+ putc(c, stderr);
}
putc('^', stderr);
putc('\n', stderr);
OpenPOWER on IntegriCloud