[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hard coded tab length of 8 in update_port_lf() ?
From: |
Marco Heisig |
Subject: |
hard coded tab length of 8 in update_port_lf() ? |
Date: |
Tue, 16 Dec 2014 16:03:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
Hi,
I use Guile to program a small compiler. I track the source location of
my individual tokens using port-line and port-column. However my column
numbers are slightly off depending on the number of tabs in that line.
It seems the Guile ports count each tab as up to 8 characters.
This is the relevant code in ports.h
#define SCM_TABCOL(port) do {SCM_COL (port) += 8 - SCM_COL (port) %
8;} while (0)
I think it would be more intuitive to count one tab as one character
(afaik gcc does it this way). Is there a good reason for the current
behavior?
Sincerely,
Marco
PS: Writing a compiler in Guile is great fun! Thanks to all the Guile
developers for this awesome piece of software.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hard coded tab length of 8 in update_port_lf() ?,
Marco Heisig <=