From: Simon Arlott <simon@fire.lp0.eu>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Denis Cheng <crquan@gmail.com>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: diffutils: C labels misdetected as functions (Was: [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle)
Date: Sat, 21 Jul 2007 20:17:52 +0100 [thread overview]
Message-ID: <46A25BE0.7000104@simon.arlott.org.uk> (raw)
In-Reply-To: <20070721135200.GQ14791@parisc-linux.org>
(Bcc: bug-gnu-utils@gnu.org)
The patch below stops diffutils treating C labels starting in column 1 as function names.
On 21/07/07 14:52, Matthew Wilcox wrote:
> On Sat, Jul 21, 2007 at 07:11:01AM +0100, Simon Arlott wrote:
>> Changing the code to fix a utility bug is madness. I think it's been
>> fixed too...
>
> I just downloaded the source from CVS and it hasn't:
>
> --- test1.c 2007-07-21 09:49:02.000000000 -0400
> +++ test2.c 2007-07-21 09:49:12.000000000 -0400
> @@ -8,5 +8,4 @@ flibble:
> zero
> one
> - two
> three
> }
>
> Tell you what, why don't you fix it? Here's how to get the source:
> cvs -d:pserver:anonymous@cvs.sv.gnu.org:/sources/diffutils co diffutils
>
> I'm sure you'll figure it out from there.
>
---
Index: diff.c
===================================================================
RCS file: /sources/diffutils/diffutils/src/diff.c,v
retrieving revision 1.45
diff -U 4 -r1.45 diff.c
--- diff.c 19 Jul 2007 17:45:29 -0000 1.45
+++ diff.c 21 Jul 2007 19:13:23 -0000
@@ -430,9 +430,9 @@
break;
case 'p':
show_c_function = true;
- add_regexp (&function_regexp_list, "^[[:alpha:]$_]");
+ add_regexp (&function_regexp_list, "^[[:alpha:]$_](|.*[^:])$");
break;
case 'P':
unidirectional_new_file = true;
--
Simon Arlott
next prev parent reply other threads:[~2007-07-21 19:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-15 8:52 [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Denis Cheng
2007-07-15 8:52 ` [PATCH 2/2] add static delaration and init_module fixes Denis Cheng
2007-07-15 9:20 ` [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Christoph Hellwig
2007-07-15 9:53 ` Simon Arlott
2007-07-20 17:07 ` Matthew Wilcox
2007-07-20 17:36 ` Simon Arlott
2007-07-20 18:00 ` Matthew Wilcox
2007-07-21 6:11 ` Simon Arlott
2007-07-21 13:47 ` rae l
2007-07-21 13:52 ` Matthew Wilcox
2007-07-21 19:17 ` Simon Arlott [this message]
2007-07-22 18:38 ` diffutils: C labels misdetected as functions Paul Eggert
2007-07-22 19:16 ` Simon Arlott
2007-07-22 21:30 ` Junio C Hamano
2007-07-21 6:12 ` [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Simon Arlott
2007-07-20 20:50 ` Oleg Verych
2007-07-20 20:54 ` Matthew Wilcox
2007-07-21 4:32 ` Fixing lables after GNU indent (Re: [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle) Oleg Verych
2007-07-21 16:17 ` [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Jan Engelhardt
2007-07-20 17:33 ` Matthew Wilcox
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=46A25BE0.7000104@simon.arlott.org.uk \
--to=simon@fire.lp0.eu \
--cc=crquan@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox