Date: Wed, 14 Aug 2013 14:34:02 +0000 (UTC) From: David Chisnall <theraven@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254327 - head/usr.bin/dtc Message-ID: <201308141434.r7EEY2PH088063@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308141434.r7EEY2PH088063>