From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>
Cc: Frank Rowand
<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] srcpos: drop special handling of tab
Date: Tue, 23 Jan 2018 17:06:48 +1100 [thread overview]
Message-ID: <20180123060648.GE11419@umbus> (raw)
In-Reply-To: <alpine.DEB.2.20.1801220904060.4623@hadrien>
[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]
On Mon, Jan 22, 2018 at 09:08:45AM +0100, Julia Lawall wrote:
> 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-L2FTfq7BK8M@public.gmane.org>
> ---
>
> This replaces the patch about correcting column numbers. That one should
> be dropped. This one, with the starting column as column 1 and no
> expansion of tabs, follows the strategy of gcc.
Applied, thanks.
>
> julia
>
> srcpos.c | 5 -----
> 1 file changed, 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++;
> }
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-01-23 6:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 8:08 [PATCH] srcpos: drop special handling of tab Julia Lawall
2018-01-23 6:06 ` David Gibson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180123060648.GE11419@umbus \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.