svn commit: r254327 - head/usr.bin/dtc

David Chisnall theraven at FreeBSD.org
Wed Aug 14 14:34:03 UTC 2013


Author: theraven
Date: Wed Aug 14 14:34:02 2013
New Revision: 254327
URL: http://svnweb.freebsd.org/changeset/base/254327

Log:
  Make carets line up in dtc diagnostics if the line starts with a tab.

Modified:
  head/usr.bin/dtc/input_buffer.cc

Modified: head/usr.bin/dtc/input_buffer.cc
==============================================================================
--- head/usr.bin/dtc/input_buffer.cc	Wed Aug 14 14:22:46 2013	(r254326)
+++ head/usr.bin/dtc/input_buffer.cc	Wed Aug 14 14:34:02 2013	(r254327)
@@ -216,7 +216,8 @@ input_buffer::parse_error(const char *ms
 	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);


More information about the svn-src-all mailing list