summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulia Lawall <julia.lawall@lip6.fr>2018-01-22 09:08:45 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2018-01-23 17:05:00 +1100
commit37dea76e9700fa4799b4cb1abfd74b121f6e3dd8 (patch)
tree5dcb58724db3b751942712db828812d83ec67948
parent65893da4aee04882affc30f3ff3265fa483bdb8e (diff)
downloaddevice-tree-compiler-37dea76e9700fa4799b4cb1abfd74b121f6e3dd8.tar.gz
srcpos: drop special handling of tab
Align column number with those reported by gcc. Thus, do not make a tab count as 8 spaces. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--srcpos.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/srcpos.c b/srcpos.c
index 9d38459..cb6ed0e 100644
--- a/srcpos.c
+++ b/srcpos.c
@@ -209,8 +209,6 @@ struct srcpos srcpos_empty = {
.file = NULL,
};
-#define TAB_SIZE 8
-
void srcpos_update(struct srcpos *pos, const char *text, int len)
{
int i;
@@ -224,9 +222,6 @@ void srcpos_update(struct srcpos *pos, const char *text, int len)
if (text[i] == '\n') {
current_srcfile->lineno++;
current_srcfile->colno = 1;
- } else if (text[i] == '\t') {
- current_srcfile->colno =
- ALIGN(current_srcfile->colno, TAB_SIZE);
} else {
current_srcfile->colno++;
}