Beware, it's full of shit and dirty hacks as I was never even dreaming about making either the source or binary public.
But this has to be sufficient as I don't see the point in wasting my time rewriting a tool that noone needs in a clean way.
svn-id: r19075