summaryrefslogtreecommitdiffstats
path: root/diff_ext_for_kdiff3
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-10 01:27:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-10 01:27:27 +0000
commit76718abdb2138623102398a10f3228e576dd0ae8 (patch)
treeddb098baac9689b9e661a41c2a28a8a23ef246d4 /diff_ext_for_kdiff3
downloadkdiff3-76718abdb2138623102398a10f3228e576dd0ae8.tar.gz
kdiff3-76718abdb2138623102398a10f3228e576dd0ae8.zip
Added abandoned KDE3 version of kdiff3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1088041 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'diff_ext_for_kdiff3')
-rwxr-xr-xdiff_ext_for_kdiff3/.depend385
-rw-r--r--diff_ext_for_kdiff3/LICENSE25
-rw-r--r--diff_ext_for_kdiff3/Makefile64
-rw-r--r--diff_ext_for_kdiff3/README41
-rw-r--r--diff_ext_for_kdiff3/class_factory.cpp77
-rw-r--r--diff_ext_for_kdiff3/class_factory.h33
-rwxr-xr-xdiff_ext_for_kdiff3/diff_ext.cpp624
-rwxr-xr-xdiff_ext_for_kdiff3/diff_ext.h67
-rw-r--r--diff_ext_for_kdiff3/diff_ext.pot96
-rwxr-xr-xdiff_ext_for_kdiff3/diff_ext_de.po102
-rw-r--r--diff_ext_for_kdiff3/diff_ext_for_kdiff3.def6
-rw-r--r--diff_ext_for_kdiff3/diff_ext_for_kdiff3.expbin0 -> 4571 bytes
-rw-r--r--diff_ext_for_kdiff3/diff_ext_for_kdiff3.rc47
-rw-r--r--diff_ext_for_kdiff3/diff_ext_for_kdiff3.vcproj230
-rw-r--r--diff_ext_for_kdiff3/diff_ext_for_kdiff3_msvc.def6
-rw-r--r--diff_ext_for_kdiff3/diffextstring.h157
-rw-r--r--diff_ext_for_kdiff3/server.cpp452
-rw-r--r--diff_ext_for_kdiff3/server.h81
18 files changed, 2493 insertions, 0 deletions
diff --git a/diff_ext_for_kdiff3/.depend b/diff_ext_for_kdiff3/.depend
new file mode 100755
index 0000000..015c8d7
--- /dev/null
+++ b/diff_ext_for_kdiff3/.depend
@@ -0,0 +1,385 @@
+class_factory.o: class_factory.cpp class_factory.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h \
+ diff_ext.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windowsx.h \
+ server.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc
+diff_ext.o: diff_ext.cpp \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/tchar.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
+ diff_ext.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windowsx.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h \
+ server.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/map \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tree.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/cpp_type_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_map.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_multimap.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/vector \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_vector.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_bvector.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/vector.tcc
+server.o: server.cpp \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdio.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/_mingw.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stddef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/include/stdarg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windows.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/windef.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnt.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winerror.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetsd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack4.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/poppack.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wincon.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wingdi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winuser.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnls.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winver.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winnetwk.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winreg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsvc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cderr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dde.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ddeml.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/dlgs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/imm.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/lzexpand.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/mmsystem.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/nb30.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpc.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdce.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/basetyps.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcdcep.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnterr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shellapi.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/pshpack2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winperf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commdlg.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winspool.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/winsock2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ole2.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objbase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcndr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/rpcnsip.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdlib.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wtypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/unknwn.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/objidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/cguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectlid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleauto.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oaidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/oleidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/tchar.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wchar.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/wctype.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlguid.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/olectl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ocidl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/initguid.h \
+ server.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/list \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/functexcept.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algobase.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++config.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/os_defines.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstring \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstddef \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/climits \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/limits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdlib \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/new \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/exception \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/iosfwd \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/clocale \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/locale.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cstdio \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++io.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/gthr-default.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/errno.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cctype \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/ctype.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stringfwd.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/postypes.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cwchar \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ctime \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/time.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/stdint.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_pair.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/type_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_types.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator_base_funcs.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/concept_check.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_iterator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/debug/debug.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/cassert \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/assert.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/c++allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_construct.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_uninitialized.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_list.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/list.tcc \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/string \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/char_traits.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/memory \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_raw_storage_iter.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_function.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/atomicity.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/mingw32/bits/atomic_word.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/algorithm \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_algo.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_heap.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/stl_tempbuf.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.tcc \
+ class_factory.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/shlobj.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/commctrl.h \
+ c:/MinGW/bin/../lib/gcc/mingw32/3.4.2/../../../../include/prsht.h
diff --git a/diff_ext_for_kdiff3/LICENSE b/diff_ext_for_kdiff3/LICENSE
new file mode 100644
index 0000000..c05a18d
--- /dev/null
+++ b/diff_ext_for_kdiff3/LICENSE
@@ -0,0 +1,25 @@
+Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin
+ All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+ 1. Redistributions of source code must retain the above
+ copyright notice, this list of conditions and the following
+ disclaimer.
+ 2. Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/diff_ext_for_kdiff3/Makefile b/diff_ext_for_kdiff3/Makefile
new file mode 100644
index 0000000..65177aa
--- /dev/null
+++ b/diff_ext_for_kdiff3/Makefile
@@ -0,0 +1,64 @@
+# Project: diff_ext
+# Generates diff_ext_for_kdiff3.dll with gcc.
+# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin)
+#
+PROJ := diff_ext_for_kdiff3
+
+CXX ?= g++.exe
+
+ifdef DEBUG
+ CXXFLAGS ?= -g
+else
+ CXXFLAGS ?= -Os
+ LDFLAGS += -s
+endif
+CXXFLAGS += -ansi -pedantic -Wall -W -D_UNICODE -DUNICODE
+
+LIBS := -luuid -lole32
+DEFFILE = $(PROJ).def
+STATICLIB = $(PROJ).a
+EXPLIB = $(PROJ).exp
+
+SRC-CXX = $(wildcard *.cpp)
+SRC-RC = $(wildcard *.rc)
+
+OBJ := $(SRC-CXX:.cpp=.o)
+RES := $(SRC-RC:.rc=.res)
+OBJ += $(RES)
+DLL := $(PROJ).dll
+
+.PHONY: all clean
+
+.SUFFIXES: .rc .res
+
+all: .depend $(DLL)
+
+debug:
+ $(MAKE) DEBUG=YES UNICODE=YES
+
+release:
+ $(MAKE)
+
+.depend: Makefile $(SRC-RC) $(SRC-CXX)
+ $(CXX) -M $(CXXFLAGS) $(SRC-RC) $(SRC-CXX) > .depend
+
+include .depend
+
+clean: clean-custom
+ ${RM} $(OBJ) $(DLL) ${EXPLIB} $(STATICLIB)
+
+$(DLL): $(OBJ)
+ dllwrap.exe \
+ --mno-cygwin \
+ --def $(DEFFILE) \
+ --output-exp ${EXPLIB} \
+ --driver-name c++ -L/usr/local/lib -L/usr/lib/mingw \
+ --implib $(STATICLIB) \
+ $(OBJ) $(LDFLAGS) $(LIBS) \
+ -o $@
+
+.cpp.o:
+ $(CXX) $(CXXFLAGS) -c $< -o $@
+
+.rc.res:
+ windres.exe $< -J rc -o $@ -O coff -DMING
diff --git a/diff_ext_for_kdiff3/README b/diff_ext_for_kdiff3/README
new file mode 100644
index 0000000..8adde0c
--- /dev/null
+++ b/diff_ext_for_kdiff3/README
@@ -0,0 +1,41 @@
+Diff-Ext for KDiff3 - Readme
+============================
+
+Authors:
+ Sergey Zorin (Author of diff-ext, see http://diff-ext.sourceforge.net)
+ Joachim Eibl (KDiff3-specific extensions and integration, see http://kdiff3.sourceforge.net)
+
+
+Copyright (c):
+Original Diff-Ext: Copyright (c) 2003-2006, Sergey Zorin, All rights reserved.
+Extensions for KDiff3: Copyright (c) 2006, Joachim Eibl
+
+
+License: See file LICENSE in this subdirectory
+
+
+Building:
+Via MinGW-compiler package (http://www.mingw.org/): Compile via gnu-make (Makefile)
+Via MSVC2005: Use vcproj-file.
+
+
+Installation:
+For basic testing you can run "regsvr32 diff_ext_for_kdiff3.dll".
+To use all features the installation that comes with the KDiff3-setup*.exe is recommended.
+See also the nsi-file available on the KDiff3-subversion-repository:
+http://svn.sourceforge.net/viewvc/*checkout*/kdiff3/trunk/kdiff3/windows_installer/kdiff3.nsi
+
+
+Translation:
+If you would like help translating diff-ext-for-kdiff3 please copy the diff_ext.pot to
+diff_ext_xx.po (where xx is the language-shortcut).
+Then edit that file and fill in the msgstr-string for each respective msgid-string.
+Then place the for in the KDiff3-translations subdirectory.
+Use the language selection within KDiff3 to switch the language or set the language shortcut
+in the registry HKEY_CURRENT_USER\Software\KDiff3\diff-ext: Language
+If everything works, please send me the created file.
+
+
+Have fun,
+Joachim
+
diff --git a/diff_ext_for_kdiff3/class_factory.cpp b/diff_ext_for_kdiff3/class_factory.cpp
new file mode 100644
index 0000000..0618862
--- /dev/null
+++ b/diff_ext_for_kdiff3/class_factory.cpp
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2003, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#include "class_factory.h"
+#include "diff_ext.h"
+#include "server.h"
+
+CLASS_FACTORY::CLASS_FACTORY() {
+ _ref_count = 0L;
+
+ SERVER::instance()->lock();
+}
+
+CLASS_FACTORY::~CLASS_FACTORY() {
+ SERVER::instance()->release();
+}
+
+STDMETHODIMP
+CLASS_FACTORY::QueryInterface(REFIID riid, void** ppv) {
+ HRESULT ret = E_NOINTERFACE;
+ *ppv = 0;
+
+ if(IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_IClassFactory)) {
+ *ppv = static_cast<CLASS_FACTORY*>(this);
+
+ AddRef();
+
+ ret = NOERROR;
+ }
+
+ return ret;
+}
+
+STDMETHODIMP_(ULONG)
+CLASS_FACTORY::AddRef() {
+ return InterlockedIncrement((LPLONG)&_ref_count);
+}
+
+STDMETHODIMP_(ULONG)
+CLASS_FACTORY::Release() {
+ ULONG ret = 0L;
+
+ if(InterlockedDecrement((LPLONG)&_ref_count) != 0)
+ ret = _ref_count;
+ else
+ delete this;
+
+ return ret;
+}
+
+STDMETHODIMP
+CLASS_FACTORY::CreateInstance(IUnknown* outer, REFIID refiid, void** obj) {
+ HRESULT ret = CLASS_E_NOAGGREGATION;
+ *obj = 0;
+
+ // Shell extensions typically don't support aggregation (inheritance)
+ if(outer == 0) {
+ DIFF_EXT* ext = new DIFF_EXT();
+
+ if(ext == 0)
+ ret = E_OUTOFMEMORY;
+ else
+ ret = ext->QueryInterface(refiid, obj);
+ }
+
+ return ret;
+}
+
+STDMETHODIMP
+CLASS_FACTORY::LockServer(BOOL) {
+ return NOERROR;
+}
diff --git a/diff_ext_for_kdiff3/class_factory.h b/diff_ext_for_kdiff3/class_factory.h
new file mode 100644
index 0000000..da91979
--- /dev/null
+++ b/diff_ext_for_kdiff3/class_factory.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2003, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#ifndef __class_factory_h__
+#define __class_factory_h__
+
+#include <shlobj.h>
+#include <shlguid.h>
+
+class CLASS_FACTORY : public IClassFactory {
+ public:
+ CLASS_FACTORY();
+ virtual ~CLASS_FACTORY();
+
+ //IUnknown members
+ STDMETHODIMP QueryInterface(REFIID, void**);
+ STDMETHODIMP_(ULONG) AddRef();
+ STDMETHODIMP_(ULONG) Release();
+
+ //ICLASS_FACTORY members
+ STDMETHODIMP CreateInstance(IUnknown*, REFIID, void**);
+ STDMETHODIMP LockServer(BOOL);
+
+ private:
+ ULONG _ref_count;
+};
+
+#endif //__class_factory_h__
diff --git a/diff_ext_for_kdiff3/diff_ext.cpp b/diff_ext_for_kdiff3/diff_ext.cpp
new file mode 100755
index 0000000..f83f068
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext.cpp
@@ -0,0 +1,624 @@
+/*
+ * Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+#define _CRT_SECURE_NO_DEPRECATE
+
+#include <assert.h>
+#include <stdio.h>
+#include <tchar.h>
+
+#include "diff_ext.h"
+#include <map>
+#include <vector>
+
+
+#ifdef UNICODE
+
+static void parseString( const std::wstring& s, size_t& i /*pos*/, std::wstring& r /*result*/ )
+{
+ size_t size = s.size();
+ ++i; // Skip initial '"'
+ for( ; i<size; ++i )
+ {
+ if ( s[i]=='"' )
+ {
+ ++i;
+ break;
+ }
+ else if ( s[i]==L'\\' && i+1<size )
+ {
+ ++i;
+ switch( s[i] ) {
+ case L'n': r+=L'\n'; break;
+ case L'r': r+=L'\r'; break;
+ case L'\\': r+=L'\\'; break;
+ case L'"': r+=L'"'; break;
+ case L't': r+=L'\t'; break;
+ default: r+=L'\\'; r+=s[i]; break;
+ }
+ }
+ else
+ r+=s[i];
+ }
+}
+
+static std::map< std::wstring, std::wstring > s_translationMap;
+static tstring s_translationFileName;
+
+void readTranslationFile()
+{
+ s_translationMap.clear();
+ FILE* pFile = _tfopen( s_translationFileName.c_str(), TEXT("rb") );
+ if ( pFile )
+ {
+ MESSAGELOG( TEXT( "Reading translations: " ) + s_translationFileName );
+ std::vector<char> buffer;
+ try {
+ if ( fseek(pFile, 0, SEEK_END)==0 )
+ {
+ size_t length = ftell(pFile); // Get the file length
+ buffer.resize(length);
+ fseek(pFile, 0, SEEK_SET );
+ fread(&buffer[0], 1, length, pFile );
+ }
+ }
+ catch(...)
+ {
+ }
+ fclose(pFile);
+
+ if (buffer.size()>0)
+ {
+ size_t bufferSize = buffer.size();
+ int offset = 0;
+ if ( buffer[0]=='\xEF' && buffer[1]=='\xBB' && buffer[2]=='\xBF' )
+ {
+ offset += 3;
+ bufferSize -= 3;
+ }
+
+ size_t sLength = MultiByteToWideChar(CP_UTF8,0,&buffer[offset], (int)bufferSize, 0, 0 );
+ std::wstring s( sLength, L' ' );
+ MultiByteToWideChar(CP_UTF8,0,&buffer[offset], (int)bufferSize, &s[0], (int)s.size() );
+
+ // Now analyse the file and extract translation strings
+ std::wstring msgid;
+ std::wstring msgstr;
+ msgid.reserve( 1000 );
+ msgstr.reserve( 1000 );
+ bool bExpectingId = true;
+ for( size_t i=0; i<sLength; ++i )
+ {
+ wchar_t c = s[i];
+ if( c == L'\n' || c == L'\r' || c==L' ' || c==L'\t' )
+ continue;
+ else if ( s[i]==L'#' ) // Comment
+ while( s[i]!='\n' && s[i]!=L'\r' && i<sLength )
+ ++i;
+ else if ( s[i]==L'"' )
+ {
+ if ( bExpectingId ) parseString(s,i,msgid);
+ else parseString(s,i,msgstr);
+ }
+ else if ( sLength-i>5 && wcsncmp( &s[i], L"msgid", 5 )==0 )
+ {
+ if ( !msgid.empty() && !msgstr.empty() )
+ {
+ s_translationMap[msgid] = msgstr;
+ }
+ bExpectingId = true;
+ msgid.clear();
+ i+=4;
+ }
+ else if ( sLength-i>6 && wcsncmp( &s[i], L"msgstr", 6 )==0 )
+ {
+ bExpectingId = false;
+ msgstr.clear();
+ i+=5;
+ }
+ else
+ {
+ // Unexpected ?
+ }
+ }
+ }
+ }
+ else
+ {
+ ERRORLOG( TEXT( "Reading translations failed: " ) + s_translationFileName );
+ }
+}
+
+static tstring getTranslation( const tstring& fallback )
+{
+ std::map< std::wstring, std::wstring >::iterator i = s_translationMap.find( fallback );
+ if (i!=s_translationMap.end())
+ return i->second;
+ return fallback;
+}
+#else
+
+static tstring getTranslation( const tstring& fallback )
+{
+ return fallback;
+}
+
+#endif
+
+
+static void replaceArgs( tstring& s, const tstring& r1, const tstring& r2=TEXT(""), const tstring& r3=TEXT("") )
+{
+ tstring arg1 = TEXT("%1");
+ size_t pos1 = s.find( arg1 );
+ tstring arg2 = TEXT("%2");
+ size_t pos2 = s.find( arg2 );
+ tstring arg3 = TEXT("%3");
+ size_t pos3 = s.find( arg3 );
+ if ( pos1 != size_t(-1) )
+ {
+ s.replace( pos1, arg1.length(), r1 );
+ if ( pos2 != size_t(-1) && pos1<pos2 )
+ pos2 += r1.length() - arg1.length();
+ if ( pos3 != size_t(-1) && pos1<pos3 )
+ pos3 += r1.length() - arg1.length();
+ }
+ if ( pos2 != size_t(-1) )
+ {
+ s.replace( pos2, arg2.length(), r2 );
+ if ( pos3 != size_t(-1) && pos2<pos3 )
+ pos3 += r2.length() - arg2.length();
+ }
+ if ( pos3 != size_t(-1) )
+ {
+ s.replace( pos3, arg3.length(), r3 );
+ }
+}
+
+DIFF_EXT::DIFF_EXT()
+: m_nrOfSelectedFiles(0), _ref_count(0L),
+ m_recentFiles( SERVER::instance()->recent_files() )
+{
+ LOG();
+ _resource = SERVER::instance()->handle();
+
+ SERVER::instance()->lock();
+}
+
+DIFF_EXT::~DIFF_EXT()
+{
+ LOG();
+ if(_resource != SERVER::instance()->handle()) {
+ FreeLibrary(_resource);
+ }
+
+ SERVER::instance()->release();
+}
+
+STDMETHODIMP
+DIFF_EXT::QueryInterface(REFIID refiid, void** ppv)
+{
+ HRESULT ret = E_NOINTERFACE;
+ *ppv = 0;
+
+ if(IsEqualIID(refiid, IID_IShellExtInit) || IsEqualIID(refiid, IID_IUnknown)) {
+ *ppv = static_cast<IShellExtInit*>(this);
+ } else if (IsEqualIID(refiid, IID_IContextMenu)) {
+ *ppv = static_cast<IContextMenu*>(this);
+ }
+
+ if(*ppv != 0) {
+ AddRef();
+
+ ret = NOERROR;
+ }
+
+ return ret;
+}
+
+STDMETHODIMP_(ULONG)
+DIFF_EXT::AddRef()
+{
+ return InterlockedIncrement((LPLONG)&_ref_count);
+}
+
+STDMETHODIMP_(ULONG)
+DIFF_EXT::Release()
+{
+ ULONG ret = 0L;
+
+ if(InterlockedDecrement((LPLONG)&_ref_count) != 0) {
+ ret = _ref_count;
+ } else {
+ delete this;
+ }
+
+ return ret;
+}
+
+
+
+STDMETHODIMP
+DIFF_EXT::Initialize(LPCITEMIDLIST /*folder not used*/, IDataObject* data, HKEY /*key not used*/)
+{
+ LOG();
+
+#ifdef UNICODE
+ tstring installDir = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("InstallDir") );
+ tstring language = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("Language") );
+ tstring translationFileName = installDir + TEXT("\\translations\\diff_ext_") + language + TEXT(".po");
+ if ( s_translationFileName != translationFileName )
+ {
+ s_translationFileName = translationFileName;
+ readTranslationFile();
+ }
+#endif
+
+ FORMATETC format = {CF_HDROP, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL};
+ STGMEDIUM medium;
+ medium.tymed = TYMED_HGLOBAL;
+ HRESULT ret = E_INVALIDARG;
+
+ if(data->GetData(&format, &medium) == S_OK)
+ {
+ HDROP drop = (HDROP)medium.hGlobal;
+ m_nrOfSelectedFiles = DragQueryFile(drop, 0xFFFFFFFF, 0, 0);
+
+ TCHAR tmp[MAX_PATH];
+
+ //initialize_language();
+
+ if (m_nrOfSelectedFiles >= 1 && m_nrOfSelectedFiles <= 3)
+ {
+ DragQueryFile(drop, 0, tmp, MAX_PATH);
+ _file_name1 = tmp;
+
+ if(m_nrOfSelectedFiles >= 2)
+ {
+ DragQueryFile(drop, 1, tmp, MAX_PATH);
+ _file_name2 = tmp;
+ }
+
+ if( m_nrOfSelectedFiles == 3)
+ {
+ DragQueryFile(drop, 2, tmp, MAX_PATH);
+ _file_name3 = tmp;
+ }
+
+ ret = S_OK;
+ }
+ }
+ else
+ {
+ SYSERRORLOG(TEXT("GetData"));
+ }
+
+ return ret;
+}
+
+static int insertMenuItemHelper( HMENU menu, UINT id, UINT position, const tstring& text,
+ UINT fState = MFS_ENABLED, HMENU hSubMenu=0 )
+{
+ MENUITEMINFO item_info;
+ ZeroMemory(&item_info, sizeof(item_info));
+ item_info.cbSize = sizeof(MENUITEMINFO);
+ item_info.wID = id;
+ if (text.empty())
+ { // Separator
+ item_info.fMask = MIIM_TYPE;
+ item_info.fType = MFT_SEPARATOR;
+ item_info.dwTypeData = 0;
+ }
+ else
+ {
+ item_info.fMask = MIIM_ID | MIIM_TYPE | MIIM_STATE | (hSubMenu!=0 ? MIIM_SUBMENU : 0);
+ item_info.fType = MFT_STRING;
+ item_info.fState = fState;
+ item_info.dwTypeData = (LPTSTR)text.c_str();
+ item_info.hSubMenu = hSubMenu;
+ }
+ if ( 0 == InsertMenuItem(menu, position, TRUE, &item_info) )
+ SYSERRORLOG(TEXT("InsertMenuItem"));
+ return id;
+}
+
+
+STDMETHODIMP
+DIFF_EXT::QueryContextMenu(HMENU menu, UINT position, UINT first_cmd, UINT /*last_cmd not used*/, UINT flags)
+{
+ LOG();
+ m_id_Diff = UINT(-1);
+ m_id_DiffWith = UINT(-1);
+ m_id_DiffLater = UINT(-1);
+ m_id_MergeWith = UINT(-1);
+ m_id_Merge3 = UINT(-1);
+ m_id_Diff3 = UINT(-1);
+ m_id_DiffWith_Base = UINT(-1);
+ m_id_ClearList = UINT(-1);
+ m_id_About = UINT(-1);
+
+ HRESULT ret = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, 0);
+
+ if(!(flags & CMF_DEFAULTONLY))
+ {
+ /* Menu structure:
+ KDiff3 -> (1 File selected): Save 'selection' for later comparison (push onto history stack)
+ Compare 'selection' with first file on history stack.
+ Compare 'selection' with -> choice from history stack
+ Merge 'selection' with first file on history stack.
+ Merge 'selection' with last two files on history stack.
+ (2 Files selected): Compare 's1' with 's2'
+ Merge 's1' with 's2'
+ (3 Files selected): Compare 's1', 's2' and 's3'
+ */
+ HMENU subMenu = CreateMenu();
+
+ UINT id = first_cmd;
+ m_id_FirstCmd = first_cmd;
+
+ insertMenuItemHelper( menu, id++, position++, TEXT("") ); // begin separator
+
+ tstring menuString;
+ UINT pos2=0;
+ if(m_nrOfSelectedFiles == 1)
+ {
+ size_t nrOfRecentFiles = m_recentFiles.size();
+ tstring menuStringCompare = i18n("Compare with %1");
+ tstring menuStringMerge = i18n("Merge with %1");
+ tstring firstFileName;
+ if( nrOfRecentFiles>=1 )
+ {
+ tstring firstFileName = TEXT("'") + cut_to_length( m_recentFiles.front() ) + TEXT("'");
+ }
+ replaceArgs( menuStringCompare, firstFileName );
+ replaceArgs( menuStringMerge, firstFileName );
+ m_id_DiffWith = insertMenuItemHelper( subMenu, id++, pos2++, menuStringCompare, nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
+ m_id_MergeWith = insertMenuItemHelper( subMenu, id++, pos2++, menuStringMerge, nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
+
+ //if( nrOfRecentFiles>=2 )
+ //{
+ // tstring firstFileName = cut_to_length( m_recentFiles.front() );
+ // tstring secondFileName = cut_to_length( *(++m_recentFiles.begin()) );
+ //}
+ m_id_Merge3 = insertMenuItemHelper( subMenu, id++, pos2++, i18n("3-way merge with base"),
+ nrOfRecentFiles >=2 ? MFS_ENABLED : MFS_DISABLED );
+
+ menuString = i18n("Save '%1' for later");
+ replaceArgs( menuString, _file_name1 );
+ m_id_DiffLater = insertMenuItemHelper( subMenu, id++, pos2++, menuString );
+
+ HMENU file_list = CreateMenu();
+ std::list<tstring>::iterator i;
+ m_id_DiffWith_Base = id;
+ int n = 0;
+ for( i = m_recentFiles.begin(); i!=m_recentFiles.end(); ++i )
+ {
+ tstring s = cut_to_length( *i );
+ insertMenuItemHelper( file_list, id++, n, s );
+ ++n;
+ }
+
+ insertMenuItemHelper( subMenu, id++, pos2++, i18n("Compare with ..."),
+ nrOfRecentFiles > 0 ? MFS_ENABLED : MFS_DISABLED, file_list );
+
+ m_id_ClearList = insertMenuItemHelper( subMenu, id++, pos2++, i18n("Clear list"), nrOfRecentFiles >=1 ? MFS_ENABLED : MFS_DISABLED );
+ }
+ else if(m_nrOfSelectedFiles == 2)
+ {
+ //= "Diff " + cut_to_length(_file_name1, 20)+" and "+cut_to_length(_file_name2, 20);
+ m_id_Diff = insertMenuItemHelper( subMenu, id++, pos2++, i18n("Compare") );
+ }
+ else if ( m_nrOfSelectedFiles == 3 )
+ {
+ m_id_Diff3 = insertMenuItemHelper( subMenu, id++, pos2++, i18n("3 way comparison") );
+ }
+ else
+ {
+ // More than 3 files selected?
+ }
+ m_id_About = insertMenuItemHelper( subMenu, id++, pos2++, i18n("About Diff-Ext ...") );
+
+ insertMenuItemHelper( menu, id++, position++, TEXT("KDiff3"), MFS_ENABLED, subMenu );
+
+ insertMenuItemHelper( menu, id++, position++, TEXT("") ); // final separator
+
+ ret = MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_NULL, id-first_cmd);
+ }
+
+ return ret;
+}
+
+STDMETHODIMP
+DIFF_EXT::InvokeCommand(LPCMINVOKECOMMANDINFO ici)
+{
+ HRESULT ret = NOERROR;
+
+ _hwnd = ici->hwnd;
+
+ if(HIWORD(ici->lpVerb) == 0)
+ {
+ UINT id = m_id_FirstCmd + LOWORD(ici->lpVerb);
+ if(id == m_id_Diff)
+ {
+ LOG();
+ diff( TEXT("\"") + _file_name1 + TEXT("\" \"") + _file_name2 + TEXT("\"") );
+ }
+ else if(id == m_id_Diff3)
+ {
+ LOG();
+ diff( TEXT("\"") + _file_name1 + TEXT("\" \"") + _file_name2 + TEXT("\" \"") + _file_name3 + TEXT("\"") );
+ }
+ else if(id == m_id_Merge3)
+ {
+ LOG();
+ std::list< tstring >::iterator iFrom = m_recentFiles.begin();
+ std::list< tstring >::iterator iBase = iFrom;
+ ++iBase;
+ diff( TEXT("-m \"") + *iBase + TEXT("\" \"") + *iFrom + TEXT("\" \"") + _file_name1 + TEXT("\"") );
+ }
+ else if(id == m_id_DiffWith)
+ {
+ LOG();
+ diff_with(0, false);
+ }
+ else if(id == m_id_MergeWith)
+ {
+ LOG();
+ diff_with(0, true);
+ }
+ else if(id == m_id_ClearList)
+ {
+ LOG();
+ m_recentFiles.clear();
+ }
+ else if(id == m_id_DiffLater)
+ {
+ MESSAGELOG(TEXT("Diff Later: ")+_file_name1);
+ m_recentFiles.remove( _file_name1 );
+ m_recentFiles.push_front( _file_name1 );
+ }
+ else if(id >= m_id_DiffWith_Base && id < m_id_DiffWith_Base+m_recentFiles.size())
+ {
+ LOG();
+ diff_with(id-m_id_DiffWith_Base, false);
+ }
+ else if(id == m_id_About)
+ {
+ LOG();
+ MessageBox( _hwnd, (i18n("Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n")
+ + i18n("This software is distributable under the BSD license.\n")
+ + i18n("Some extensions for KDiff3 by Joachim Eibl.\n")
+ + i18n("Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n")
+ + i18n("Homepage for KDiff3: http://kdiff3.sourceforge.net")).c_str()
+ , i18n("About Diff-Ext for KDiff3").c_str(), MB_OK );
+ }
+ else
+ {
+ ret = E_INVALIDARG;
+ TCHAR verb[80];
+ _sntprintf(verb, 79, TEXT("Command id: %d"), LOWORD(ici->lpVerb));
+ verb[79]=0;
+ ERRORLOG(verb);
+ }
+ }
+
+ return ret;
+}
+
+STDMETHODIMP
+DIFF_EXT::GetCommandString(UINT idCmd, UINT uFlags, UINT*, LPSTR pszName, UINT cchMax)
+{
+ // LOG(); // Gets called very often
+ HRESULT ret = NOERROR;
+
+ if(uFlags == GCS_HELPTEXT) {
+ tstring helpString;
+ if( idCmd == m_id_Diff )
+ {
+ helpString = i18n("Compare selected files");
+ }
+ else if( idCmd == m_id_DiffWith )
+ {
+ if(!m_recentFiles.empty())
+ {
+ helpString = i18n("Compare '%1' with '%2'");
+ replaceArgs( helpString, _file_name1, m_recentFiles.front() );
+ }
+ }
+ else if(idCmd == m_id_DiffLater)
+ {
+ helpString = i18n("Save '%1' for later operation");
+ replaceArgs( helpString, _file_name1 );
+ }
+ else if((idCmd >= m_id_DiffWith_Base) && (idCmd < m_id_DiffWith_Base+m_recentFiles.size()))
+ {
+ if( !m_recentFiles.empty() )
+ {
+ unsigned int num = idCmd - m_id_DiffWith_Base;
+ std::list<tstring>::iterator i = m_recentFiles.begin();
+ for(unsigned int j = 0; j < num && i != m_recentFiles.end(); j++)
+ i++;
+
+ if ( i!=m_recentFiles.end() )
+ {
+ helpString = i18n("Compare '%1' with '%2'");
+ replaceArgs( helpString, _file_name1, *i );
+ }
+ }
+ }
+ lstrcpyn( (LPTSTR)pszName, helpString.c_str(), cchMax );
+ }
+
+ return ret;
+}
+
+void
+DIFF_EXT::diff( const tstring& arguments )
+{
+ LOG();
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ bool bError = true;
+ tstring command = SERVER::instance()->getRegistryKeyString( TEXT(""), TEXT("diffcommand") );
+ tstring commandLine = TEXT("\"") + command + TEXT("\" ") + arguments;
+ if ( ! command.empty() )
+ {
+ ZeroMemory(&si, sizeof(si));
+ si.cb = sizeof(si);
+ if (CreateProcess(command.c_str(), (LPTSTR)commandLine.c_str(), 0, 0, FALSE, 0, 0, 0, &si, &pi) == 0)
+ {
+ SYSERRORLOG(TEXT("CreateProcess") + command);
+ }
+ else
+ {
+ bError = false;
+ CloseHandle( pi.hProcess );
+ CloseHandle( pi.hThread );
+ }
+ }
+
+ if (bError)
+ {
+ tstring message = i18n("Could not start KDiff3. Please rerun KDiff3 installation.");
+ message += TEXT("\n") + i18n("Command") + TEXT(": ") + command;
+ message += TEXT("\n") + i18n("CommandLine") + TEXT(": ") + commandLine;
+ MessageBox(_hwnd, message.c_str(), i18n("Diff-Ext For KDiff3").c_str(), MB_OK);
+ }
+}
+
+void
+DIFF_EXT::diff_with(unsigned int num, bool bMerge)
+{
+ LOG();
+ std::list<tstring>::iterator i = m_recentFiles.begin();
+ for(unsigned int j = 0; j < num && i!=m_recentFiles.end(); j++) {
+ i++;
+ }
+
+ if ( i!=m_recentFiles.end() )
+ _file_name2 = *i;
+
+ diff( (bMerge ? TEXT("-m \"") : TEXT("\"") ) + _file_name2 + TEXT("\" \"") + _file_name1 + TEXT("\"") );
+}
+
+
+tstring
+DIFF_EXT::cut_to_length(const tstring& in, size_t max_len)
+{
+ tstring ret;
+ if( in.length() > max_len)
+ {
+ ret = in.substr(0, (max_len-3)/2);
+ ret += TEXT("...");
+ ret += in.substr( in.length()-(max_len-3)/2 );
+ }
+ else
+ {
+ ret = in;
+ }
+
+ return ret;
+}
diff --git a/diff_ext_for_kdiff3/diff_ext.h b/diff_ext_for_kdiff3/diff_ext.h
new file mode 100755
index 0000000..2f89d34
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2003-2004, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#ifndef __diff_ext_h__
+#define __diff_ext_h__
+
+#include <windows.h>
+#include <windowsx.h>
+#include <shlobj.h>
+
+#include "server.h"
+
+
+// this is the actual OLE Shell context menu handler
+class DIFF_EXT : public IContextMenu, IShellExtInit {
+ public:
+ DIFF_EXT();
+ virtual ~DIFF_EXT();
+
+ //IUnknown members
+ STDMETHODIMP QueryInterface(REFIID interface_id, void** result);
+ STDMETHODIMP_(ULONG) AddRef();
+ STDMETHODIMP_(ULONG) Release();
+
+ //IShell members
+ STDMETHODIMP QueryContextMenu(HMENU menu, UINT index, UINT cmd_first, UINT cmd_last, UINT flags);
+ STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO info);
+ STDMETHODIMP GetCommandString(UINT cmd, UINT flags, UINT* reserved, LPSTR name, UINT name_length);
+
+ //IShellExtInit methods
+ STDMETHODIMP Initialize(LPCITEMIDLIST folder, IDataObject* subj, HKEY key);
+
+ private:
+ void diff( const tstring& arguments );
+ void diff_with(unsigned int num, bool bMerge);
+ tstring cut_to_length(const tstring&, size_t length = 64);
+ void initialize_language();
+
+ private:
+ UINT m_nrOfSelectedFiles;
+ tstring _file_name1;
+ tstring _file_name2;
+ tstring _file_name3;
+ HINSTANCE _resource;
+ HWND _hwnd;
+
+ ULONG _ref_count;
+
+ std::list< tstring >& m_recentFiles;
+ UINT m_id_FirstCmd;
+ UINT m_id_Diff;
+ UINT m_id_DiffWith;
+ UINT m_id_DiffLater;
+ UINT m_id_MergeWith;
+ UINT m_id_Merge3;
+ UINT m_id_Diff3;
+ UINT m_id_DiffWith_Base;
+ UINT m_id_About;
+ UINT m_id_ClearList;
+};
+
+#endif // __diff_ext_h__
diff --git a/diff_ext_for_kdiff3/diff_ext.pot b/diff_ext_for_kdiff3/diff_ext.pot
new file mode 100644
index 0000000..6cc829c
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext.pot
@@ -0,0 +1,96 @@
+# Diff-ext-for-KDiff3
+# Copyright (C) 2006 Joachim Eibl
+# This file is distributed under the same license as the diff-ext-for-KDiff3 package.
+# PO-Template created by Joachim Eibl <Joachim dot Eibl at gmx dot de>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-10-03 06:05+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: diff_ext.cpp:368 diff_ext.cpp:402
+msgid "Compare with"
+msgstr ""
+
+#: diff_ext.cpp:369
+msgid "Merge with"
+msgstr ""
+
+#: diff_ext.cpp:384
+msgid "3-way merge with base"
+msgstr ""
+
+#: diff_ext.cpp:387
+msgid "Save '%1' for later comparison or merge"
+msgstr ""
+
+#: diff_ext.cpp:408
+msgid "Compare"
+msgstr ""
+
+#: diff_ext.cpp:412
+msgid "3 way comparison"
+msgstr ""
+
+#: diff_ext.cpp:418
+msgid "About Diff-Ext ..."
+msgstr ""
+
+#: diff_ext.cpp:482
+msgid "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n"
+msgstr ""
+
+#: diff_ext.cpp:483
+msgid "This software is distributable under the BSD license.\n"
+msgstr ""
+
+#: diff_ext.cpp:484
+msgid "Some extensions for KDiff3 by Joachim Eibl.\n"
+msgstr ""
+
+#: diff_ext.cpp:485
+msgid "Homepage for Diff-Ext: http://diff-ext.sourceforge.net\n"
+msgstr ""
+
+#: diff_ext.cpp:486
+msgid "Homepage for KDiff3: http://kdiff3.sourceforge.net"
+msgstr ""
+
+#: diff_ext.cpp:487
+msgid "About Diff-Ext for KDiff3"
+msgstr ""
+
+#: diff_ext.cpp:512
+msgid "Compare selected files"
+msgstr ""
+
+#: diff_ext.cpp:518 diff_ext.cpp:538
+msgid "Compare '%1' with '%2'"
+msgstr ""
+
+#: diff_ext.cpp:524
+msgid "Save '%1' for later operation"
+msgstr ""
+
+#: diff_ext.cpp:576
+msgid "Could not start KDiff3. Please rerun KDiff3 installation."
+msgstr ""
+
+#: diff_ext.cpp:577
+msgid "Command"
+msgstr ""
+
+#: diff_ext.cpp:578
+msgid "CommandLine"
+msgstr ""
+
+#: diff_ext.cpp:579
+msgid "Diff-Ext For KDiff3"
+msgstr ""
diff --git a/diff_ext_for_kdiff3/diff_ext_de.po b/diff_ext_for_kdiff3/diff_ext_de.po
new file mode 100755
index 0000000..f50ad71
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_de.po
@@ -0,0 +1,102 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2006-09-04 15:35+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: diff_ext.cpp:363
+msgid "Compare with %1"
+msgstr "Vergleichen mit %1"
+
+#: diff_ext.cpp:364
+msgid "Merge with %1"
+msgstr "Zusammenführen mit %1"
+
+#: diff_ext.cpp:379
+msgid "3-way merge with base"
+msgstr "3-Wege Zusammenführung mit Basis"
+
+#: diff_ext.cpp:382
+msgid "Save '%1' for later"
+msgstr "Speichere '%1' für später"
+
+#: diff_ext.cpp:404
+msgid "Compare with ..."
+msgstr "Vergleichen mit ..."
+
+#: diff_ext.cpp:403
+msgid "Compare"
+msgstr "Vergleichen"
+
+#: diff_ext.cpp:403
+msgid "Clear list"
+msgstr "Liste löschen"
+
+
+#: diff_ext.cpp:407
+msgid "3 way comparison"
+msgstr "Vergleiche 3 Dateien"
+
+#: diff_ext.cpp:413
+msgid "About Diff-Ext ..."
+msgstr "Ãœber Diff-Ext ..."
+
+#: diff_ext.cpp:474
+msgid "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.\n"
+msgstr "Diff-Ext Copyright (c) 2003-2006, Sergey Zorin. Alle Rechte vorbehalten.\n"
+
+#: diff_ext.cpp:475
+msgid "This software is distributable under the BSD license.\n"
+msgstr "Weitergabe dieses Programms unter den Bedingungen der BSD Lizenz.\n"
+
+#: diff_ext.cpp:476
+msgid "Some extensions for KDiff3 by Joachim Eibl.\n"
+msgstr "Einige Erweiterungen für KDiff3 von Joachim Eibl.\n"
+
+#: diff_ext.cpp:477
+msgid "See the homepage http://diff-ext.sourceforge.net"
+msgstr "Siehe die Homepage http://diff-ext.sourceforge.net"
+
+#: diff_ext.cpp:478
+msgid "About Diff-Ext for KDiff3"
+msgstr "Über Diff-Ext für KDiff3"
+
+#: diff_ext.cpp:503
+msgid "Compare selected files"
+msgstr "Vergleiche markierte Dateien"
+
+#: diff_ext.cpp:509 diff_ext.cpp:529
+msgid "Compare '%1' with '%2'"
+msgstr "Vergleiche '%1' mit '%2'"
+
+#: diff_ext.cpp:515
+msgid "Merke '%1' für spätere Aktion"
+msgstr ""
+
+#: diff_ext.cpp:567
+msgid "Could not start KDiff3. Please rerun KDiff3 installation."
+msgstr "Konnte KDiff3 nicht starten. Bitte wiederholen Sie die KDiff3 Installation."
+
+#: diff_ext.cpp:568
+msgid "Command"
+msgstr "Kommando"
+
+#: diff_ext.cpp:569
+msgid "CommandLine"
+msgstr "Kommandozeile"
+
+#: diff_ext.cpp:570
+msgid "Diff-Ext For KDiff3"
+msgstr "Diff-Ext für KDiff3"
diff --git a/diff_ext_for_kdiff3/diff_ext_for_kdiff3.def b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.def
new file mode 100644
index 0000000..51a257a
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.def
@@ -0,0 +1,6 @@
+LIBRARY "diff_ext_for_kdiff3"
+EXPORTS
+ DllCanUnloadNow=DllCanUnloadNow@0
+ DllGetClassObject=DllGetClassObject@12
+ DllRegisterServer=DllRegisterServer@0
+ DllUnregisterServer=DllUnregisterServer@0
diff --git a/diff_ext_for_kdiff3/diff_ext_for_kdiff3.exp b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.exp
new file mode 100644
index 0000000..d40969a
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.exp
Binary files differ
diff --git a/diff_ext_for_kdiff3/diff_ext_for_kdiff3.rc b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.rc
new file mode 100644
index 0000000..12269d9
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.rc
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2003-2006, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#include <windows.h>
+
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,6,1,145
+ PRODUCTVERSION 1,6,1,145
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS VS_FF_DEBUG
+#else
+ FILEFLAGS 0L
+#endif
+ FILEOS VOS_NT_WINDOWS32
+ FILETYPE VFT_DLL
+ FILESUBTYPE VFT_UNKNOWN
+{
+ BLOCK "StringFileInfo"
+ {
+ BLOCK "040904b0"
+ {
+ VALUE "Comments", ""
+ VALUE "CompanyName", ""
+ VALUE "FileDescription", "diff shell extension"
+ VALUE "FileVersion", "Release 1.6.1"
+ VALUE "InternalName", "diff shell extension"
+ VALUE "LegalCopyright", "Copyright © 2003-2005 Sergey Zorin"
+ VALUE "LegalTrademarks", ""
+ VALUE "OriginalFilename", "diff_ext.dll"
+ VALUE "PrivateBuild", ""
+ VALUE "ProductName", "Diff Context Menu Extension"
+ VALUE "ProductVersion", "Release 1.6.1"
+ }
+ }
+ BLOCK "VarFileInfo"
+ {
+ VALUE "Translation", 0x409, 1200
+ }
+}
diff --git a/diff_ext_for_kdiff3/diff_ext_for_kdiff3.vcproj b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.vcproj
new file mode 100644
index 0000000..6ce9ade
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_for_kdiff3.vcproj
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="diff_ext_for_kdiff3"
+ ProjectGUID="{9734C087-C745-4DCE-9076-73BD15145F83}"
+ RootNamespace="diff_ext_for_kdiff3"
+ Keyword="Win32Proj"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;DIFF_EXT_FOR_KDIFF3_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ RegisterOutput="false"
+ LinkIncremental="2"
+ ModuleDefinitionFile="diff_ext_for_kdiff3_msvc.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(ConfigurationName)"
+ IntermediateDirectory="$(ConfigurationName)"
+ ConfigurationType="2"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="1"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;DIFF_EXT_FOR_KDIFF3_EXPORTS"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ RegisterOutput="false"
+ LinkIncremental="1"
+ ModuleDefinitionFile="diff_ext_for_kdiff3_msvc.def"
+ GenerateDebugInformation="true"
+ SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="class_factory.cpp"
+ >
+ </File>
+ <File
+ RelativePath="diff_ext.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\diff_ext_for_kdiff3_msvc.def"
+ >
+ </File>
+ <File
+ RelativePath="server.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="class_factory.h"
+ >
+ </File>
+ <File
+ RelativePath="diff_ext.h"
+ >
+ </File>
+ <File
+ RelativePath=".\diffextstring.h"
+ >
+ </File>
+ <File
+ RelativePath="server.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/diff_ext_for_kdiff3/diff_ext_for_kdiff3_msvc.def b/diff_ext_for_kdiff3/diff_ext_for_kdiff3_msvc.def
new file mode 100644
index 0000000..bc75265
--- /dev/null
+++ b/diff_ext_for_kdiff3/diff_ext_for_kdiff3_msvc.def
@@ -0,0 +1,6 @@
+LIBRARY "diff_ext_for_kdiff3"
+EXPORTS
+ DllCanUnloadNow PRIVATE
+ DllGetClassObject PRIVATE
+ DllRegisterServer PRIVATE
+ DllUnregisterServer PRIVATE
diff --git a/diff_ext_for_kdiff3/diffextstring.h b/diff_ext_for_kdiff3/diffextstring.h
new file mode 100644
index 0000000..132512e
--- /dev/null
+++ b/diff_ext_for_kdiff3/diffextstring.h
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2003, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms of the
+ * BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#ifndef __string_h__
+#define __string_h__
+
+#include <windows.h>
+#include <tchar.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+class STRING;
+inline STRING operator+( const STRING& s1, const STRING& s2);
+
+class STRING {
+ public:
+ static const int begin = 0;
+ static const int end = -1;
+
+ public:
+ STRING(const STRING& s) {
+ _str = new TCHAR[s.length()+1];
+ lstrcpy(_str, s);
+ }
+
+ STRING(const TCHAR* str = TEXT("")) {
+ _str = new TCHAR[lstrlen(str)+1];
+ lstrcpy(_str, str);
+ }
+
+ ~STRING() {
+ delete[] _str;
+ }
+
+ void resize( size_t newLength )
+ {
+ size_t oldLength = length();
+ if ( newLength < oldLength ) {
+ _str[newLength] = 0; // Just truncate the string
+ } else if( newLength>oldLength) {
+ TCHAR* p = new TCHAR[ newLength + 1 ];
+ lstrcpy(p, _str);
+ for( size_t i=oldLength; i<newLength; ++i)
+ p[i]=TEXT(' ');
+ p[newLength]=0;
+ }
+ }
+
+ STRING& operator=(const STRING& s) {
+ delete[] _str;
+ _str = new TCHAR[s.length()+1];
+ lstrcpy(_str, s);
+ return *this;
+ }
+
+ operator TCHAR*() {
+ return _str;
+ }
+
+ operator const TCHAR*() const {
+ return _str;
+ }
+
+ const TCHAR* c_str() const {
+ return _str;
+ }
+
+ size_t length() const {
+ return _tcslen(_str);
+ }
+
+ // Also returns the length. Behaviour like std::basic_string::size.
+ // See also sizeInBytes() below.
+ size_t size() const {
+ return length();
+ }
+
+ // String length in bytes. May differ from length() for Unicode or MBCS
+ size_t sizeInBytes() const {
+ return length()*sizeof(TCHAR);
+ }
+
+ bool empty() const
+ {
+ return length()==0;
+ }
+
+ STRING substr(size_t from, size_t len=size_t(-1)) const {
+ STRING tmp;
+ size_t to = len==size_t(-1) ? length() : from + len;
+
+ if(from < to && (to <= length())) {
+ size_t new_len = to - from + 1;
+ TCHAR* new_str = new TCHAR[new_len+1];
+ lstrcpyn(new_str, &_str[from], int(new_len) );
+ new_str[new_len] = 0;
+
+ tmp = new_str;
+ delete[] new_str;
+ }
+
+ return tmp;
+ }
+
+ STRING& replace( size_t pos, size_t num, const STRING& s )
+ {
+ *this = substr( 0, pos ) + s + substr( pos+num );
+ return *this;
+ }
+
+ bool operator ==(const STRING& s) const {
+ return (lstrcmp(_str, s) == 0);
+ }
+
+ size_t find(const STRING& s) const
+ {
+ const TCHAR* p = _tcsstr( _str, s._str );
+ if (p)
+ return p - _str;
+ else
+ return size_t(-1);
+ }
+
+ STRING& operator +=(const STRING& s) {
+ TCHAR* str = new TCHAR[lstrlen(_str)+s.length()+1];
+
+ lstrcpy(str, _str);
+ lstrcat(str, s);
+
+ delete[] _str;
+
+ _str = str;
+
+ return *this;
+ }
+
+ private:
+ TCHAR* _str;
+};
+
+inline STRING operator+( const STRING& s1, const STRING& s2) {
+ STRING tmp(s1);
+
+ tmp+=s2;
+
+ return tmp;
+}
+
+
+
+#endif // __string_h__
diff --git a/diff_ext_for_kdiff3/server.cpp b/diff_ext_for_kdiff3/server.cpp
new file mode 100644
index 0000000..08df7e9
--- /dev/null
+++ b/diff_ext_for_kdiff3/server.cpp
@@ -0,0 +1,452 @@
+/*
+ * Copyright (c) 2003-2005, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+
+#define _CRT_NON_CONFORMING_SWPRINTFS
+#define _CRT_SECURE_NO_DEPRECATE
+
+#include <stdio.h>
+
+#include <windows.h>
+#include <tchar.h>
+
+#include <shlguid.h>
+#include <olectl.h>
+#include <objidl.h>
+
+#include <objbase.h>
+#include <initguid.h>
+
+//#include <log/log.h>
+//#include <log/log_message.h>
+//#include <log/file_sink.h>
+//#include <debug/trace.h>
+
+#include "server.h"
+#include "class_factory.h"
+
+#define DllExport __declspec( dllexport )
+
+// registry key util struct
+struct REGSTRUCT {
+ LPTSTR subkey;
+ LPTSTR name;
+ LPTSTR value;
+};
+
+SERVER* SERVER::_instance = 0;
+static HINSTANCE server_instance; // Handle to this DLL itself.
+
+//DEFINE_GUID(CLSID_DIFF_EXT, 0xA0482097, 0xC69D, 0x4DEC, 0x8A, 0xB6, 0xD3, 0xA2, 0x59, 0xAC, 0xC1, 0x51);
+// New class id for DIFF_EXT for KDiff3
+DEFINE_GUID( CLSID_DIFF_EXT, 0x9f8528e4, 0xab20, 0x456e, 0x84, 0xe5, 0x3c, 0xe6, 0x9d, 0x87, 0x20, 0xf3 );
+
+
+tstring SERVER::getRegistryKeyString( const tstring& subKey, const tstring& value )
+{
+ tstring keyName = m_registryBaseName;
+ if (!subKey.empty())
+ keyName += TEXT("\\")+subKey;
+
+ HKEY key;
+ HKEY baseKey = HKEY_CURRENT_USER;
+ tstring result;
+ for(;;)
+ {
+ if( RegOpenKeyEx( baseKey, keyName.c_str(), 0, KEY_READ, &key ) == ERROR_SUCCESS )
+ {
+ DWORD neededSizeInBytes = 0;
+ if (RegQueryValueEx(key, value.c_str(), 0, 0, 0, &neededSizeInBytes) == ERROR_SUCCESS)
+ {
+ DWORD length = neededSizeInBytes / sizeof( TCHAR );
+ result.resize( length );
+ if ( RegQueryValueEx( key, value.c_str(), 0, 0, (LPBYTE)&result[0], &neededSizeInBytes ) == ERROR_SUCCESS)
+ {
+ //Everything is ok, but we want to cut off the terminating 0-character
+ result.resize( length - 1 );
+ RegCloseKey(key);
+ return result;
+ }
+ else
+ {
+ result.resize(0);
+ }
+ }
+
+ RegCloseKey(key);
+ }
+ if (baseKey==HKEY_LOCAL_MACHINE)
+ break;
+ baseKey = HKEY_LOCAL_MACHINE;
+ }
+
+ // Error
+ {
+ LPTSTR message;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0,
+ GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &message, 0, 0);
+ ERRORLOG( (tstring(TEXT("RegOpenKeyEx: ")+keyName+TEXT("->")+value) + TEXT(": ")) + message ); \
+ LocalFree(message);
+ }
+ return result;
+}
+
+
+STDAPI
+DllCanUnloadNow(void) {
+ HRESULT ret = S_FALSE;
+
+ if(SERVER::instance()->reference_count() == 0) {
+ ret = S_OK;
+ }
+
+ return ret;
+}
+
+extern "C" int APIENTRY
+DllMain(HINSTANCE instance, DWORD reason, LPVOID /* reserved */) {
+// char str[1024];
+// char* reason_string[] = {"DLL_PROCESS_DETACH", "DLL_PROCESS_ATTACH", "DLL_THREAD_ATTACH", "DLL_THREAD_DETACH"};
+// sprintf(str, "instance: %x; reason: '%s'", instance, reason_string[reason]);
+// MessageBox(0, str, TEXT("Info"), MB_OK);
+ switch (reason) {
+ case DLL_PROCESS_ATTACH:
+ server_instance = instance;
+ SERVER::instance()->save_history();
+ MESSAGELOG(TEXT("DLL_PROCESS_ATTACH"));
+ break;
+
+ case DLL_PROCESS_DETACH:
+ MESSAGELOG(TEXT("DLL_PROCESS_DETACH"));
+ SERVER::instance()->save_history();
+ break;
+ }
+
+ return 1;
+}
+
+STDAPI
+DllGetClassObject(REFCLSID rclsid, REFIID riid, void** class_object) {
+ HRESULT ret = CLASS_E_CLASSNOTAVAILABLE;
+ *class_object = 0;
+
+ if (IsEqualIID(rclsid, CLSID_DIFF_EXT)) {
+ CLASS_FACTORY* pcf = new CLASS_FACTORY();
+
+ ret = pcf->QueryInterface(riid, class_object);
+ }
+
+ return ret;
+}
+
+/*extern "C" HRESULT STDAPICALLTYPE*/ STDAPI
+DllRegisterServer() {
+ return SERVER::instance()->do_register();
+}
+
+STDAPI
+DllUnregisterServer() {
+ return SERVER::instance()->do_unregister();
+}
+
+SERVER* SERVER::instance()
+{
+ if(_instance == 0)
+ {
+ _instance = new SERVER();
+ _instance->initLogging();
+ MESSAGELOG(TEXT("New Server instance"));
+ }
+
+ return _instance;
+}
+
+SERVER::SERVER() : _reference_count(0)
+{
+ m_registryBaseName = TEXT("Software\\KDiff3\\diff-ext");
+ m_pRecentFiles = 0;
+ m_pLogFile = 0;
+}
+
+void SERVER::initLogging()
+{
+ tstring logFileName = getRegistryKeyString( TEXT(""), TEXT("LogFile") );
+ if ( !logFileName.empty() )
+ {
+ m_pLogFile = _tfopen( logFileName.c_str(), TEXT("a+, ccs=UTF-8") );
+ if (m_pLogFile)
+ {
+ _ftprintf( m_pLogFile, TEXT("\nSERVER::SERVER()\n") );
+ }
+ }
+}
+
+SERVER::~SERVER()
+{
+ if ( m_pLogFile )
+ {
+ _ftprintf( m_pLogFile, TEXT("SERVER::~SERVER()\n\n") );
+ fclose( m_pLogFile );
+ }
+
+ delete m_pRecentFiles;
+}
+
+HINSTANCE
+SERVER::handle() const
+{
+ return server_instance;
+}
+
+void
+SERVER::lock() {
+ InterlockedIncrement(&_reference_count);
+}
+
+void
+SERVER::release() {
+ InterlockedDecrement(&_reference_count);
+
+ //if(InterlockedDecrement((LPLONG)&_reference_count) == 0)
+ // delete this;
+}
+
+void SERVER::logMessage( const char* function, const char* file, int line, const tstring& msg )
+{
+ SERVER* pServer = SERVER::instance();
+ if ( pServer && pServer->m_pLogFile )
+ {
+ SYSTEMTIME st;
+ GetSystemTime( &st );
+ _ftprintf( pServer->m_pLogFile, TEXT("%04d/%02d/%02d %02d:%02d:%02d ")
+#ifdef UNICODE
+ TEXT("%S (%S:%d) %s\n"), // integrate char-string into wchar_t string
+#else
+ TEXT("%s (%s:%d) %s\n"),
+#endif
+ st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, function, file, line, msg.c_str() );
+ fflush(pServer->m_pLogFile);
+ }
+}
+
+std::list<tstring>&
+SERVER::recent_files()
+{
+ LOG();
+ if ( m_pRecentFiles==0 )
+ {
+ MESSAGELOG(TEXT("Reading history from registry..."));
+ m_pRecentFiles = new std::list<tstring>;
+ for( int i=0; i<32; ++i ) // Max history size
+ {
+ TCHAR numAsString[10];
+ _sntprintf( numAsString, 10, TEXT("%d"), i );
+ tstring historyItem = getRegistryKeyString( TEXT("history"), numAsString );
+ if ( ! historyItem.empty() )
+ m_pRecentFiles->push_back( historyItem );
+ }
+ }
+ return *m_pRecentFiles;
+}
+
+void
+SERVER::save_history() const
+{
+ if( m_pRecentFiles && !m_pRecentFiles->empty() )
+ {
+ HKEY key;
+ if( RegCreateKeyEx(HKEY_CURRENT_USER, (m_registryBaseName + TEXT("\\history")).c_str(), 0, 0,
+ REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, 0) == ERROR_SUCCESS )
+ {
+ LOG();
+ //DWORD len = MAX_PATH;
+ int n = 0;
+
+ std::list<tstring>::const_iterator i;
+
+ for(i = m_pRecentFiles->begin(); i!=m_pRecentFiles->end(); ++i, ++n )
+ {
+ tstring str = *i;
+ TCHAR numAsString[10];
+ _sntprintf( numAsString, 10, TEXT("%d"), n );
+ if(RegSetValueEx(key, numAsString, 0, REG_SZ, (const BYTE*)str.c_str(), (DWORD)(str.size()+1)*sizeof(TCHAR) ) != ERROR_SUCCESS)
+ {
+ LPTSTR message;
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0,
+ GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
+ (LPTSTR) &message, 0, 0);
+ MessageBox(0, message, TEXT("Save history failed"), MB_OK | MB_ICONINFORMATION);
+ LocalFree(message);
+ }
+ }
+
+ RegCloseKey(key);
+ }
+ else
+ {
+ SYSERRORLOG(TEXT("RegOpenKeyEx"));
+ }
+ }
+}
+
+HRESULT
+SERVER::do_register() {
+ LOG();
+ TCHAR class_id[MAX_PATH];
+ LPWSTR tmp_guid;
+ HRESULT ret = SELFREG_E_CLASS;
+
+ if (StringFromIID(CLSID_DIFF_EXT, &tmp_guid) == S_OK) {
+#ifdef UNICODE
+ _tcsncpy(class_id, tmp_guid, MAX_PATH);
+#else
+ wcstombs(class_id, tmp_guid, MAX_PATH);
+#endif
+ CoTaskMemFree((void*)tmp_guid);
+
+ TCHAR subkey[MAX_PATH];
+ TCHAR server_path[MAX_PATH];
+ HKEY key;
+ LRESULT result = NOERROR;
+ DWORD dwDisp;
+
+ GetModuleFileName(SERVER::instance()->handle(), server_path, MAX_PATH);
+
+ REGSTRUCT entry[] = {
+ {TEXT("Software\\Classes\\CLSID\\%s"), 0, TEXT("diff-ext-for-kdiff3")},
+ {TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), 0, TEXT("%s")},
+ {TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), TEXT("ThreadingModel"), TEXT("Apartment")}
+ };
+
+ for(unsigned int i = 0; (i < sizeof(entry)/sizeof(entry[0])) && (result == NOERROR); i++) {
+ _sntprintf(subkey, MAX_PATH, entry[i].subkey, class_id);
+ result = RegCreateKeyEx(HKEY_CURRENT_USER, subkey, 0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
+
+ if(result == NOERROR) {
+ TCHAR szData[MAX_PATH];
+
+ _sntprintf(szData, MAX_PATH, entry[i].value, server_path);
+ szData[MAX_PATH-1]=0;
+
+ result = RegSetValueEx(key, entry[i].name, 0, REG_SZ, (LPBYTE)szData, DWORD(_tcslen(szData)*sizeof(TCHAR)));
+ }
+
+ RegCloseKey(key);
+ }
+
+ if(result == NOERROR) {
+ result = RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Classes\\*\\shellex\\ContextMenuHandlers\\diff-ext-for-kdiff3"), 0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
+
+ if(result == NOERROR) {
+
+ result = RegSetValueEx(key, 0, 0, REG_SZ, (LPBYTE)class_id, DWORD(_tcslen(class_id)*sizeof(TCHAR)));
+
+ RegCloseKey(key);
+
+ //If running on NT, register the extension as approved.
+ OSVERSIONINFO osvi;
+
+ osvi.dwOSVersionInfoSize = sizeof(osvi);
+ GetVersionEx(&osvi);
+
+ // NT needs to have shell extensions "approved".
+ if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ result = RegCreateKeyEx(HKEY_CURRENT_USER,
+ TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"),
+ 0, 0, REG_OPTION_NON_VOLATILE, KEY_WRITE, 0, &key, &dwDisp);
+
+ if(result == NOERROR) {
+ TCHAR szData[MAX_PATH];
+
+ lstrcpy(szData, TEXT("diff-ext"));
+
+ result = RegSetValueEx(key, class_id, 0, REG_SZ, (LPBYTE)szData, DWORD(_tcslen(szData)*sizeof(TCHAR)));
+
+ RegCloseKey(key);
+
+ ret = S_OK;
+ } else if (result == ERROR_ACCESS_DENIED) {
+ TCHAR msg[] = TEXT("Warning! You have unsufficient rights to write to a specific registry key.\n")
+ TEXT("The application may work anyway, but it is advised to register this module ")
+ TEXT("again while having administrator rights.");
+
+ MessageBox(0, msg, TEXT("Warning"), MB_ICONEXCLAMATION);
+
+ ret = S_OK;
+ }
+ }
+ else {
+ ret = S_OK;
+ }
+ }
+ }
+ }
+
+ return ret;
+}
+
+HRESULT
+SERVER::do_unregister() {
+ LOG();
+ TCHAR class_id[MAX_PATH];
+ LPWSTR tmp_guid;
+ HRESULT ret = SELFREG_E_CLASS;
+
+ if (StringFromIID(CLSID_DIFF_EXT, &tmp_guid) == S_OK) {
+#ifdef UNICODE
+ _tcsncpy(class_id, tmp_guid, MAX_PATH);
+#else
+ wcstombs(class_id, tmp_guid, MAX_PATH);
+#endif
+ CoTaskMemFree((void*)tmp_guid);
+
+ LRESULT result = NOERROR;
+ TCHAR subkey[MAX_PATH];
+
+ REGSTRUCT entry[] = {
+ {TEXT("Software\\Classes\\CLSID\\%s\\InProcServer32"), 0, 0},
+ {TEXT("Software\\Classes\\CLSID\\%s"), 0, 0}
+ };
+
+ for(unsigned int i = 0; (i < sizeof(entry)/sizeof(entry[0])) && (result == NOERROR); i++) {
+ _stprintf(subkey, entry[i].subkey, class_id);
+ result = RegDeleteKey(HKEY_CURRENT_USER, subkey);
+ }
+
+ if(result == NOERROR) {
+ result = RegDeleteKey(HKEY_CURRENT_USER, TEXT("Software\\Classes\\*\\shellex\\ContextMenuHandlers\\diff-ext-for-kdiff3"));
+
+ if(result == NOERROR) {
+ //If running on NT, register the extension as approved.
+ OSVERSIONINFO osvi;
+
+ osvi.dwOSVersionInfoSize = sizeof(osvi);
+ GetVersionEx(&osvi);
+
+ // NT needs to have shell extensions "approved".
+ if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ HKEY key;
+
+ RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Shell Extensions\\Approved"), 0, KEY_ALL_ACCESS, &key);
+
+ result = RegDeleteValue(key, class_id);
+
+ RegCloseKey(key);
+
+ if(result == ERROR_SUCCESS) {
+ ret = S_OK;
+ }
+ }
+ else {
+ ret = S_OK;
+ }
+ }
+ }
+ }
+
+ return ret;
+}
diff --git a/diff_ext_for_kdiff3/server.h b/diff_ext_for_kdiff3/server.h
new file mode 100644
index 0000000..ffaf90b
--- /dev/null
+++ b/diff_ext_for_kdiff3/server.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2003-2005, Sergey Zorin. All rights reserved.
+ *
+ * This software is distributable under the BSD license. See the terms
+ * of the BSD license in the LICENSE file provided with this software.
+ *
+ */
+#ifndef __server_h__
+#define __server_h__
+#include <list> // std::list
+//#include <log/file_sink.h>
+#include <windows.h>
+
+#if 1
+#include <string> // std::wstring
+#ifdef UNICODE
+typedef std::wstring tstring;
+#else
+typedef std::string tstring;
+#endif
+#define i18n(x) getTranslation( TEXT(x) )
+#else
+#include "diffextstring.h"
+typedef STRING tstring;
+#define i18n(x) TEXT(x)
+#endif
+
+#define MESSAGELOG( msg ) SERVER::logMessage( __FUNCTION__, __FILE__, __LINE__, msg )
+#define LOG() MESSAGELOG( TEXT("") )
+#define ERRORLOG( msg ) MESSAGELOG( TEXT("Error: ")+tstring(msg) )
+#define SYSERRORLOG( msg ) \
+ { \
+ LPTSTR message; \
+ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, 0, \
+ GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &message, 0, 0); \
+ ERRORLOG( (tstring(msg) + TEXT(": ")) + message ); \
+ LocalFree(message); \
+ }
+
+
+class SERVER {
+ public:
+ static SERVER* instance();
+ void initLogging();
+
+ public:
+ virtual ~SERVER();
+
+ tstring getRegistryKeyString( const tstring& subKey, const tstring& value );
+
+ HINSTANCE handle() const;
+
+ HRESULT do_register();
+ HRESULT do_unregister();
+
+ void lock();
+ void release();
+
+ ULONG reference_count() const {
+ return _reference_count;
+ }
+
+ std::list< tstring >& recent_files();
+
+ void save_history() const;
+
+ static void logMessage( const char* function, const char* file, int line, const tstring& msg );
+
+ private:
+ SERVER();
+ SERVER(const SERVER&) {}
+
+ private:
+ LONG _reference_count;
+ std::list<tstring>* m_pRecentFiles;
+ static SERVER* _instance;
+ tstring m_registryBaseName;
+ FILE* m_pLogFile;
+};
+
+#endif // __server_h__