It can do everything except kill empty lines at the end of the file; a
patch simply doesn't contain enough information to know if blank lines
are inserted at the end of a file as opposed in the middle of the file.
It can, of course, be done if the unpatched material is available,
probably by applying the patch and seeing what happens.
Let me know if you still want it; I'll whip it up.
-hpa
-