diff options
author | David Chisnall <theraven@FreeBSD.org> | 2013-08-14 14:34:02 +0000 |
---|---|---|
committer | David Chisnall <theraven@FreeBSD.org> | 2013-08-14 14:34:02 +0000 |
commit | 8d9c80995077820e5a4c361c739eed618513847f (patch) | |
tree | 67f07212515beba56ca35f3133e4a190c2ab8e17 /usr.bin/dtc | |
parent | 4a62545173e60b96a134674f5be516338255dcd9 (diff) | |
download | src-8d9c80995077820e5a4c361c739eed618513847f.tar.gz src-8d9c80995077820e5a4c361c739eed618513847f.zip |
Make carets line up in dtc diagnostics if the line starts with a tab.
Notes
Notes:
svn path=/head/; revision=254327
Diffstat (limited to 'usr.bin/dtc')
-rw-r--r-- | usr.bin/dtc/input_buffer.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/dtc/input_buffer.cc b/usr.bin/dtc/input_buffer.cc index 10b3a0018be3..8f055fe61d72 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); |