Pulled from git://git.code.sf.net/p/kdiff3/code