(Bcc: [EMAIL PROTECTED])
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
>>
On Jul 20 2007 11:07, Matthew Wilcox wrote:
>sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
>
>Any regexp ninjas want to have a go at something better?
You want \w+.
[ perl -i -pe 's/^\t* {6}(\w+:)/ $1/' "$@"
Whether that is "better" depends on the user who uses it :) ]
Jan
--
-
To
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.0 -0400
+++ test2.c 2007-07-21
On 7/21/07, Simon Arlott <[EMAIL PROTECTED]> wrote:
Changing the code to fix a utility bug is madness. I think it's been
fixed too...
Now I also think it's the utility's bug, that hardly do nothing on
indent the source.
--
Denis Cheng
Linux Application Developer
"One of my most productive
On 20/07/07 19:00, Matthew Wilcox wrote:
> On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
>> Mass
>> replacing any labels run through Lindent with space prefixes would seem
>> like a bad idea :/
>
> We don't tend to mass-run code through Lindent. This may or may not be
> a bad
On 20/07/07 19:00, Matthew Wilcox wrote:
> On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
>> On 20/07/07 18:07, Matthew Wilcox wrote:
>> > sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
>> >
>> > which will replace the leading tabs and spaces with one space.
>>
>> ... isn't the space
On 20/07/07 19:00, Matthew Wilcox wrote:
On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
On 20/07/07 18:07, Matthew Wilcox wrote:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the leading tabs and spaces with one space.
... isn't the space thing a workaround
On 20/07/07 19:00, Matthew Wilcox wrote:
On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
Mass
replacing any labels run through Lindent with space prefixes would seem
like a bad idea :/
We don't tend to mass-run code through Lindent. This may or may not be
a bad thing, but
On 7/21/07, Simon Arlott [EMAIL PROTECTED] wrote:
Changing the code to fix a utility bug is madness. I think it's been
fixed too...
Now I also think it's the utility's bug, that hardly do nothing on
indent the source.
--
Denis Cheng
Linux Application Developer
One of my most productive days
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.0 -0400
+++ test2.c 2007-07-21 09:49:12.0
On Jul 20 2007 11:07, Matthew Wilcox wrote:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
Any regexp ninjas want to have a go at something better?
You want \w+.
[ perl -i -pe 's/^\t* {6}(\w+:)/ $1/' $@
Whether that is better depends on the user who uses it :) ]
Jan
--
-
To unsubscribe
(Bcc: [EMAIL PROTECTED])
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
[]
> > > sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
> > >
> > > which will replace the leading tabs and spaces with one space.
> > > It should leave case labels unmolested, as they should be indented with
> > > tabs, not 6 spaces.
> > >
> > > Any regexp ninjas want to have a go at something
On Fri, Jul 20, 2007 at 10:50:42PM +0200, Oleg Verych wrote:
> > Of course, we can't add this flag to Lindent until it's widely
> > circulating amongst the distributions. Perhaps we can add this to
> > Lindent in the meantime:
> >
> > sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
> >
> > which will
* Date: Fri, 20 Jul 2007 11:07:43 -0600
> Of course, we can't add this flag to Lindent until it's widely
> circulating amongst the distributions. Perhaps we can add this to
> Lindent in the meantime:
>
> sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
>
> which will replace the leading tabs and
On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
> On 20/07/07 18:07, Matthew Wilcox wrote:
> > sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
> >
> > which will replace the leading tabs and spaces with one space.
>
> ... isn't the space thing a workaround for a "diff -p" bug?
Yes. I
On 20/07/07 18:07, Matthew Wilcox wrote:
> Of course, we can't add this flag to Lindent until it's widely
> circulating amongst the distributions. Perhaps we can add this to
> Lindent in the meantime:
>
> sed -i -e 's/^\t* \(\w*:\)/ \1/' "$@"
>
> which will replace the leading tabs and
On Sun, Jul 15, 2007 at 10:53:45AM +0100, Simon Arlott wrote:
> > - } else if (base_addr > 0x100) { /* Check a single specified location. */
> > + } else if (base_addr > 0x100) { /* Check a single specified location. */
>
> What is Lit doing here?! It's changed "{/*" to "{/*"...
>
> > - }
On Sun, Jul 15, 2007 at 10:53:45AM +0100, Simon Arlott wrote:
> Do people ever check what Lindent does?
[...]
> > -out1:
> > + out1:
>
> NAK: A perfectly valid non-indented label is now indented by 6 spaces.
I tracked down why indent does this. It's actually hard-coded to indent
by 2 fewer
On Sun, Jul 15, 2007 at 10:53:45AM +0100, Simon Arlott wrote:
Do people ever check what Lindent does?
[...]
-out1:
+ out1:
NAK: A perfectly valid non-indented label is now indented by 6 spaces.
I tracked down why indent does this. It's actually hard-coded to indent
by 2 fewer
On Sun, Jul 15, 2007 at 10:53:45AM +0100, Simon Arlott wrote:
- } else if (base_addr 0x100) { /* Check a single specified location. */
+ } else if (base_addr 0x100) { /* Check a single specified location. */
What is Lit doing here?! It's changed {space/* to {tab/*...
- } else {
On 20/07/07 18:07, Matthew Wilcox wrote:
Of course, we can't add this flag to Lindent until it's widely
circulating amongst the distributions. Perhaps we can add this to
Lindent in the meantime:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the leading tabs and spaces with
On Fri, Jul 20, 2007 at 06:36:02PM +0100, Simon Arlott wrote:
On 20/07/07 18:07, Matthew Wilcox wrote:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the leading tabs and spaces with one space.
... isn't the space thing a workaround for a diff -p bug?
Yes. I like not
* Date: Fri, 20 Jul 2007 11:07:43 -0600
Of course, we can't add this flag to Lindent until it's widely
circulating amongst the distributions. Perhaps we can add this to
Lindent in the meantime:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the leading tabs and spaces with
On Fri, Jul 20, 2007 at 10:50:42PM +0200, Oleg Verych wrote:
Of course, we can't add this flag to Lindent until it's widely
circulating amongst the distributions. Perhaps we can add this to
Lindent in the meantime:
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the
[]
sed -i -e 's/^\t* \(\w*:\)/ \1/' $@
which will replace the leading tabs and spaces with one space.
It should leave case labels unmolested, as they should be indented with
tabs, not 6 spaces.
Any regexp ninjas want to have a go at something better?
I'm the one.
On 15/07/07 09:52, Denis Cheng wrote:
> Signed-off-by: Denis Cheng <[EMAIL PROTECTED]>
> ---
> drivers/net/wireless/wavelan.c | 806
> ++--
> 1 files changed, 369 insertions(+), 437 deletions(-)
Do people ever check what Lindent does?
> - } else if
On Sun, Jul 15, 2007 at 04:52:50PM +0800, Denis Cheng wrote:
> - return ((char *) NULL);
> + return ((char *)NULL);
casting NULL to another pointer type is dumb to start with. Please replace
this line with
return NULL;
-
To unsubscribe from this list: send the line "unsubscribe
On Sun, Jul 15, 2007 at 04:52:50PM +0800, Denis Cheng wrote:
- return ((char *) NULL);
+ return ((char *)NULL);
casting NULL to another pointer type is dumb to start with. Please replace
this line with
return NULL;
-
To unsubscribe from this list: send the line unsubscribe
On 15/07/07 09:52, Denis Cheng wrote:
Signed-off-by: Denis Cheng [EMAIL PROTECTED]
---
drivers/net/wireless/wavelan.c | 806
++--
1 files changed, 369 insertions(+), 437 deletions(-)
Do people ever check what Lindent does?
- } else if (base_addr
30 matches
Mail list logo