On Fri, 17 Jun 2011, Matthew Dempsky wrote:

> On Fri, Jun 17, 2011 at 10:27:28AM +0200, Nicolas Palix wrote:
> > It works as intented with
> > 
> > @@
> > struct bar1 b;
> > @@
> >         b.x =
> > -        7
> > +       42
> 
> Ah, yes, indeed it does! :)
> 
> Though this seems to result in some weird spacing sometimes.  E.g.,
> applying this patch:
> 
> <<<<<<<<
> @@
> struct bar b;
> @@
>       b.
> -     x
> +     y->z
> >>>>>>>>
> 
> to this C code:
> 
> <<<<<<<<
> void foo(struct bar *bp)
> {
>   bp->x = 7;
> }
> >>>>>>>>
> 
> Yields this diff:
> 
> <<<<<<<<
> @@ -1,4 +1,4 @@
>  void foo(struct bar *bp)
>  {
> -  bp->x = 7;
> +  bp->y -> z = 7;
>  }
> >>>>>>>>
> 
> Why "bp->y -> z" instead of "bp->y->z"?  Is there a way to instead
> generate the latter without resorting to piping it through sed?

What version are you using?  It works correctly for me, but I know that I 
fixed the problem very recently.

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to