On Wed, Jun 23, 2010 at 11:34:05PM +0200, Julia Lawall wrote:
> On Wed, 23 Jun 2010, Josh Triplett wrote:
>
> > When I applied a semantic patch, and then checked the result with "git
> > diff", git pointed out some trailing whitespace left behind by spatch:
> >
> > @@ -54,7 +54,7 @@ XTimeCoord *XGetMotionEvents(
> > }
> >
> > if (rep.nEvents) {
> > - if (! (tc = (XTimeCoord *)
> > + if (! (tc =
> > Xmalloc( (unsigned)
> > (nbytes = (long) rep.nEvents *
> > sizeof(XTimeCoord))))) {
> > _XEatData (dpy, (unsigned long) nbytes);
> >
> > spatch correctly deleted the cast, but left a trailing space, resulting
> > in "tc = " rather than "tc =".
> >
> > When deleting the last token on a line, spatch should delete the
> > whitespace leading up to the newline as well.
> >
> > (Some projects want all trailing whitespace deleted on a line when that
> > line gets modified, but that seems somewhat less within the scope of
> > spatch.)
>
> OK, thanks. This should ne possible.
Excellent, thanks!
- Josh Triplett
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)