Index: configure
===================================================================
RCS file: /home/wine/wine/configure,v
retrieving revision 1.644
diff -u -p -r1.644 configure
--- configure	27 Apr 2005 09:46:25 -0000	1.644
+++ configure	1 May 2005 21:00:14 -0000
@@ -20121,7 +20121,7 @@ MAKE_LIB_RULES=libs/Makelib.rules
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules libs/Makelib.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/advpack/Makefile dlls/advpack/tests/Makefile dlls/amstream/Makefile dlls/atl/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/capi2032/Makefile dlls/cards/Makefile dlls/cfgmgr32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/comctl32/tests/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/cryptdll/Makefile dlls/ctl3d/Makefile dlls/d3d8/Makefile dlls/d3d9/Makefile dlls/d3dim/Makefile dlls/d3drm/Makefile dlls/d3dx8/Makefile dlls/d3dxof/Makefile dlls/dbghelp/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/ddraw/tests/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dmband/Makefile dlls/dmcompos/Makefile dlls/dmime/Makefile dlls/dmloader/Makefile dlls/dmscript/Makefile dlls/dmstyle/Makefile dlls/dmsynth/Makefile dlls/dmusic/Makefile dlls/dmusic32/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dpnet/Makefile dlls/dpnhpast/Makefile dlls/dsound/Makefile dlls/dsound/tests/Makefile dlls/dswave/Makefile dlls/dxdiagn/Makefile dlls/dxerr8/Makefile dlls/dxerr9/Makefile dlls/dxguid/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/glut32/Makefile dlls/hhctrl.ocx/Makefile dlls/iccvid/Makefile dlls/icmp/Makefile dlls/ifsmgr.vxd/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/iphlpapi/Makefile dlls/iphlpapi/tests/Makefile dlls/itss/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/lzexpand/tests/Makefile dlls/mapi32/Makefile dlls/mapi32/tests/Makefile dlls/mlang/Makefile dlls/mlang/tests/Makefile dlls/mmdevldr.vxd/Makefile dlls/monodebg.vxd/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msacm/tests/Makefile dlls/mscms/Makefile dlls/mscms/tests/Makefile dlls/msdmo/Makefile dlls/mshtml/Makefile dlls/msi/Makefile dlls/msi/tests/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msrle32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvcrt40/Makefile dlls/msvcrtd/Makefile dlls/msvcrtd/tests/Makefile dlls/msvidc32/Makefile dlls/msvideo/Makefile dlls/mswsock/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/newdev/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/ole32/tests/Makefile dlls/oleacc/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/powrprof/Makefile dlls/psapi/Makefile dlls/psapi/tests/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/quartz/tests/Makefile dlls/rasapi32/Makefile dlls/riched20/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/rsabase/Makefile dlls/rsabase/tests/Makefile dlls/rsaenh/Makefile dlls/rsaenh/tests/Makefile dlls/secur32/Makefile dlls/sensapi/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/stdole32.tlb/Makefile dlls/sti/Makefile dlls/strmiids/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/unicows/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/uuid/Makefile dlls/uxtheme/Makefile dlls/vdhcp.vxd/Makefile dlls/vdmdbg/Makefile dlls/version/Makefile dlls/version/tests/Makefile dlls/vmm.vxd/Makefile dlls/vnbt.vxd/Makefile dlls/vnetbios.vxd/Makefile dlls/vtdapi.vxd/Makefile dlls/vwin32.vxd/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/wined3d/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winejack/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/winspool/tests/Makefile dlls/wintab32/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/wtsapi32/Makefile dlls/x11drv/Makefile documentation/Makefile fonts/Makefile include/Makefile libs/Makefile libs/port/Makefile libs/unicode/Makefile libs/wine/Makefile libs/wpp/Makefile loader/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/getsffile/Makefile programs/msiexec/Makefile programs/notepad/Makefile programs/progman/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/rpcss/Makefile programs/rundll32/Makefile programs/start/Makefile programs/taskmgr/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineboot/Makefile programs/winebrowser/Makefile programs/winecfg/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemenubuilder/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winetest/Makefile programs/winevdm/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/winegcc/Makefile tools/wmc/Makefile tools/wrc/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -20875,6 +20875,7 @@ do
   "programs/cmdlgtst/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/cmdlgtst/Makefile" ;;
   "programs/control/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/control/Makefile" ;;
   "programs/expand/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/expand/Makefile" ;;
+  "programs/getsffile/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/getsffile/Makefile" ;;
   "programs/msiexec/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/msiexec/Makefile" ;;
   "programs/notepad/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/notepad/Makefile" ;;
   "programs/progman/Makefile" ) CONFIG_FILES="$CONFIG_FILES programs/progman/Makefile" ;;
Index: configure.ac
===================================================================
RCS file: /home/wine/wine/configure.ac,v
retrieving revision 1.348
diff -u -p -r1.348 configure.ac
--- configure.ac	27 Apr 2005 09:46:25 -0000	1.348
+++ configure.ac	1 May 2005 21:00:14 -0000
@@ -1737,6 +1737,7 @@ programs/clock/Makefile
 programs/cmdlgtst/Makefile
 programs/control/Makefile
 programs/expand/Makefile
+programs/getsffile/Makefile
 programs/msiexec/Makefile
 programs/notepad/Makefile
 programs/progman/Makefile
Index: programs/Makefile.in
===================================================================
RCS file: /home/wine/wine/programs/Makefile.in,v
retrieving revision 1.46
diff -u -p -r1.46 Makefile.in
--- programs/Makefile.in	11 Aug 2004 20:59:09 -0000	1.46
+++ programs/Makefile.in	1 May 2005 21:00:14 -0000
@@ -11,6 +11,7 @@ SUBDIRS = \
 	cmdlgtst \
 	control \
 	expand \
+	getsffile \
 	msiexec \
 	notepad \
 	progman \
@@ -43,6 +44,7 @@ INSTALLSUBDIRS = \
 	clock \
 	control \
 	expand \
+	getsffile \
 	msiexec \
 	notepad \
 	progman \
@@ -70,6 +72,7 @@ INSTALLSUBDIRS = \
 
 # Programs to install in bin directory
 INSTALLPROGS = \
+	getsffile \
 	notepad \
 	progman \
 	regedit \
@@ -94,6 +97,7 @@ SYMLINKS = \
 	cmdlgtst.exe$(DLLEXT) \
 	control.exe$(DLLEXT) \
 	expand.exe$(DLLEXT) \
+	getsffile.exe$(DLLEXT) \
 	icinfo.exe$(DLLEXT) \
 	msiexec.exe$(DLLEXT) \
 	notepad.exe$(DLLEXT) \
@@ -182,6 +186,9 @@ control.exe$(DLLEXT): control/control.ex
 expand.exe$(DLLEXT): expand/expand.exe$(DLLEXT)
 	$(RM) $@ && $(LN_S) expand/expand.exe$(DLLEXT) $@
 
+getsffile.exe$(DLLEXT): getsffile/getsffile.exe$(DLLEXT)
+	$(RM) $@ && $(LN_S) getsffile/getsffile.exe$(DLLEXT) $@
+
 icinfo.exe$(DLLEXT): avitools/icinfo.exe$(DLLEXT)
 	$(RM) $@ && $(LN_S) avitools/icinfo.exe$(DLLEXT) $@
 
@@ -266,6 +273,7 @@ clock/clock.exe$(DLLEXT): clock
 cmdlgtst/cmdlgtst.exe$(DLLEXT): cmdlgtst
 control/control.exe$(DLLEXT): control
 expand/expand.exe$(DLLEXT): expand
+getsffile/getsffile.exe$(DLLEXT): getsffile
 avitools/icinfo.exe$(DLLEXT): avitools
 msiexec/msiexec.exe$(DLLEXT): msiexec
 notepad/notepad.exe$(DLLEXT): notepad
diff -uN /dev/null programs/getsffile/.cvsignore
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/.cvsignore	2005-04-30 20:26:04.000000000 -0400
@@ -0,0 +1,3 @@
+Makefile
+getsffile.exe.dbg.c
+getsffile.res
diff -uN /dev/null programs/getsffile/De.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/De.rc	2005-05-01 15:04:28.000000000 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 Henning Gerhardt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Abbrechen", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_TITLE  "Lade"
+END
diff -uN /dev/null programs/getsffile/En.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/En.rc	2005-05-01 14:46:26.000000000 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004 Mike McCormack for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Cancel", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_USAGE  "Usage:\n" \
+               "    getsffile sf_project filename [local]\n" \
+               "\n" \
+               "Copyright 2005 Vincent Béron\n"
+ STRING_TITLE  "Downloading"
+END
diff -uN /dev/null programs/getsffile/Es.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/Es.rc	2005-05-01 14:49:18.000000000 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 José Manuel Ferrer Ortiz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Cancelar", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_TITLE  "Descargando"
+END
diff -uN /dev/null programs/getsffile/Fr.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/Fr.rc	2005-05-01 14:50:06.000000000 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2004 Jonathan Ernst
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Annuler", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_USAGE  "Usage:\n" \
+               "    getsffile projet_sf fichier [local]\n" \
+               "\n" \
+               "Copyright 2005 Vincent Béron\n"
+ STRING_TITLE  "Téléchargement de"
+END
diff -uN /dev/null programs/getsffile/Makefile.in
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/Makefile.in	2005-05-01 15:08:55.000000000 -0400
@@ -0,0 +1,20 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = getsffile.exe
+APPMODE   = -mwindows
+IMPORTS   = advapi32 kernel32 urlmon user32
+EXTRADEFS = -DNO_LIBWINE_PORT
+EXTRALIBS = -luuid
+
+C_SRCS = \
+	dl.c \
+	getsffile_main.c \
+	sf.c
+
+RC_SRCS = getsffile.rc
+
+@MAKE_PROG_RULES@
+
+### Dependencies:
diff -uN /dev/null programs/getsffile/Nl.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/Nl.rc	2005-05-01 14:50:33.000000000 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 Hans Leidekker
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Annuleren", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_TITLE  "Gedownload"
+END
diff -uN /dev/null programs/getsffile/Pt.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/Pt.rc	2005-05-01 14:50:52.000000000 -0400
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2005 Marcelo Duarte
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+LANGUAGE LANG_PORTUGUESE, SUBLANG_DEFAULT
+
+IDDIALOG DIALOG LOADONCALL MOVEABLE DISCARDABLE  0, 0, 220, 62
+STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION ""
+FONT 8, "MS Shell Dlg"
+{
+ CONTROL "Progress1",IDPROGRESS,"msctls_progress32",WS_BORDER|PBS_SMOOTH,10,10,200,12
+ LTEXT "", IDFILENAME, 10, 30, 200, 10, SS_CENTER
+ PUSHBUTTON "Cancelar", IDCANCEL, 85, 44, 50, 15, WS_GROUP | WS_TABSTOP
+}
+
+STRINGTABLE
+BEGIN
+ STRING_TITLE  "Baixando"
+END
diff -uN /dev/null programs/getsffile/dl.c
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/dl.c	2005-05-01 14:48:03.000000000 -0400
@@ -0,0 +1,230 @@
+/*
+ * Dialog interface for the download progress
+ *
+ * Copyright 2005 Vincent Béron
+ * Copyright 2004 Mike McCormack (for Codeweavers)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define COBJMACROS
+
+#include <windows.h>
+#include <commctrl.h>
+#include <urlmon.h>
+
+#include "getsffile.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(getsffile);
+
+typedef struct _IBindStatusCallbackImpl {
+    IBindStatusCallbackVtbl *vtbl;
+    DWORD ref;
+    HWND hDialog;
+    BOOL *pbCancelled;
+} IBindStatusCallbackImpl;
+
+static HRESULT WINAPI
+dlQueryInterface( IBindStatusCallback* This, REFIID riid, void** ppvObject )
+{
+    if (ppvObject == NULL) return E_POINTER;
+    
+    if( IsEqualIID(riid, &IID_IUnknown) ||
+        IsEqualIID(riid, &IID_IBindStatusCallback))
+    {
+        IBindStatusCallback_AddRef( This );
+        *ppvObject = This;
+        return S_OK;
+    }
+    return E_NOINTERFACE;
+}
+
+static ULONG WINAPI dlAddRef( IBindStatusCallback* iface )
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+
+    return InterlockedIncrement( &This->ref );
+}
+
+static ULONG WINAPI dlRelease( IBindStatusCallback* iface )
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+    DWORD ref = InterlockedDecrement( &This->ref );
+    
+    if( !ref )
+    {
+        DestroyWindow( This->hDialog );
+        HeapFree( GetProcessHeap(), 0, This );
+    }
+
+    return ref;
+}
+
+static HRESULT WINAPI
+dlOnStartBinding( IBindStatusCallback* iface, DWORD dwReserved, IBinding* pib)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlGetPriority( IBindStatusCallback* iface, LONG* pnPriority)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnLowResource( IBindStatusCallback* iface, DWORD reserved)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnProgress( IBindStatusCallback* iface, ULONG ulProgress,
+              ULONG ulProgressMax, ULONG ulStatusCode, LPCWSTR szStatusText)
+{
+    IBindStatusCallbackImpl *This = (IBindStatusCallbackImpl *) iface;
+    HWND hItem;
+    LONG r;
+
+    hItem = GetDlgItem( This->hDialog, IDPROGRESS );
+    if( hItem && ulProgressMax )
+        SendMessageW(hItem,PBM_SETPOS,(ulProgress*100)/ulProgressMax,0);
+
+    hItem = GetDlgItem(This->hDialog, IDFILENAME);
+    if( hItem )
+        SendMessageW(hItem,WM_SETTEXT, 0, (LPARAM) szStatusText);
+
+    SetLastError(0);
+    r = GetWindowLongPtrW( This->hDialog, GWLP_USERDATA );
+    if( r || GetLastError() )
+    {
+        *This->pbCancelled = TRUE;
+        WINE_ERR("Cancelled\n");
+        return E_ABORT;
+    }
+
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnStopBinding( IBindStatusCallback* iface, HRESULT hresult, LPCWSTR szError)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlGetBindInfo( IBindStatusCallback* iface, DWORD* grfBINDF, BINDINFO* pbindinfo)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnDataAvailable( IBindStatusCallback* iface, DWORD grfBSCF,
+                   DWORD dwSize, FORMATETC* pformatetc, STGMEDIUM* pstgmed)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+static HRESULT WINAPI
+dlOnObjectAvailable( IBindStatusCallback* iface, REFIID riid, IUnknown* punk)
+{
+    WINE_ERR("\n");
+    return S_OK;
+}
+
+struct IBindStatusCallbackVtbl dlVtbl =
+{
+    dlQueryInterface,
+    dlAddRef,
+    dlRelease,
+    dlOnStartBinding,
+    dlGetPriority,
+    dlOnLowResource,
+    dlOnProgress,
+    dlOnStopBinding,
+    dlGetBindInfo,
+    dlOnDataAvailable,
+    dlOnObjectAvailable
+};
+
+IBindStatusCallback* create_dl(HWND dlg, BOOL *pbCancelled)
+{
+    IBindStatusCallbackImpl *This;
+
+    This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
+    This->vtbl = &dlVtbl;
+    This->ref = 1;
+    This->hDialog = dlg;
+    This->pbCancelled = pbCancelled;
+
+    return (IBindStatusCallback*) This;
+}
+
+static DWORD WINAPI ThreadFunc( LPVOID info )
+{
+    HWND hDlg = info;
+
+    get_sf_file(project, filename, local, hDlg);
+
+    EndDialog( hDlg, 0 );
+    return 0;
+}
+
+static const WCHAR space[] = {
+    ' ',0
+};
+
+INT_PTR CALLBACK
+dlProc ( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+    HANDLE hThread;
+    DWORD ThreadId;
+    HWND hItem;
+    WCHAR szCaption[MAX_PATH];
+
+    switch (uMsg)
+    {
+    case WM_INITDIALOG:
+        LoadStringW(GetModuleHandle(NULL), STRING_TITLE, szCaption, sizeof(szCaption)/sizeof(WCHAR));
+        lstrcatW(szCaption, space);
+        lstrcatW(szCaption, filename);
+        SetWindowTextW( hwndDlg, szCaption );
+        SetWindowLongPtrW( hwndDlg, GWLP_USERDATA, 0 );
+        hItem = GetDlgItem(hwndDlg, IDPROGRESS);
+        if( hItem )
+        {
+            SendMessageW(hItem,PBM_SETRANGE,0,MAKELPARAM(0,100));
+            SendMessageW(hItem,PBM_SETPOS,0,0);
+        }
+        hThread = CreateThread(NULL,0,ThreadFunc,hwndDlg,0,&ThreadId);
+        if (!hThread)
+            return FALSE;
+        return TRUE;
+    case WM_COMMAND:
+        if( wParam == IDCANCEL )
+            SetWindowLongPtrW( hwndDlg, GWLP_USERDATA, 1 );
+        return FALSE;
+    default:
+        return FALSE;
+    }
+}
diff -uN /dev/null programs/getsffile/getsffile.h
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/getsffile.h	2005-05-01 14:42:36.000000000 -0400
@@ -0,0 +1,33 @@
+/*
+ * Wine Sourceforge File Getter (getsffile.exe)
+ * Extern data and functions
+ *
+ * Copyright 2005 Vincent Béron
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _GETSFFILE_H
+#define _GETSFFILE_H
+
+#include "getsffile_res.h"
+
+extern LPCWSTR project, filename, local;
+
+extern IBindStatusCallback* create_dl(HWND dlg, BOOL *pbCancelled);
+extern INT_PTR CALLBACK dlProc( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
+extern BOOL get_sf_file(LPCWSTR project, LPCWSTR filename, LPCWSTR local, HWND hdlg);
+
+#endif /* _GETSFFILE_H */
diff -uN /dev/null programs/getsffile/getsffile.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/getsffile.rc	2005-05-01 15:06:34.000000000 -0400
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2005 Vincent Béron
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <windef.h>
+#include <winuser.h>
+#include <commctrl.h>
+
+#include "getsffile_res.h"
+
+#include "version.rc"
+
+#include "De.rc"
+#include "En.rc"
+#include "Es.rc"
+#include "Fr.rc"
+#include "Nl.rc"
+#include "Pt.rc"
diff -uN /dev/null programs/getsffile/getsffile_main.c
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/getsffile_main.c	2005-05-01 15:01:35.000000000 -0400
@@ -0,0 +1,60 @@
+/*
+ * Wine Sourceforge File Getter (getsffile.exe)
+ *
+ * Copyright 2005 Vincent Béron
+ * Copyright 2004 Mike McCormack (for Codeweavers)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <windows.h>
+#include <ctype.h>
+#include <stdio.h>
+#include <urlmon.h>
+
+#include "getsffile.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(getsffile);
+
+static void show_usage(int exit_code) {
+    WCHAR usage_str[4096];
+    DWORD count;
+
+    LoadStringW(GetModuleHandle(NULL), STRING_USAGE, usage_str, sizeof(usage_str)/sizeof(WCHAR));
+    WriteFile(GetStdHandle(STD_OUTPUT_HANDLE), usage_str, lstrlenW(usage_str), &count, NULL);
+    ExitProcess(exit_code);
+}
+
+LPCWSTR project, filename, local;
+
+int wmain(int argc, WCHAR **argv) {
+
+    if(argc != 3 && argc != 4)
+        show_usage(1);
+
+    project = argv[1];
+    filename = argv[2];
+    if(argc == 4)
+        local = argv[3];
+    else
+        local = argv[2];
+
+    DialogBoxW(GetModuleHandle(NULL), MAKEINTRESOURCEW(IDDIALOG), 0, dlProc);
+
+    ExitProcess(0);
+    return 0;
+}
diff -uN /dev/null programs/getsffile/getsffile_res.h
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/getsffile_res.h	2005-05-01 14:46:44.000000000 -0400
@@ -0,0 +1,33 @@
+/*
+ * Wine Sourceforge File Getter (getsffile.exe)
+ * Resources definitions
+ *
+ * Copyright 2005 Vincent Béron
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef _GETSFFILE_RES_H
+#define _GETSFFILE_RES_H
+
+#define IDDIALOG 100
+
+#define IDPROGRESS 101
+#define IDFILENAME 102
+
+#define STRING_USAGE 1001
+#define STRING_TITLE 1002
+
+#endif /* _GETSFFILE_RES_H */
diff -uN /dev/null programs/getsffile/sf.c
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/sf.c	2005-05-01 16:45:10.000000000 -0400
@@ -0,0 +1,491 @@
+/*
+ * Support for sourceforge page format
+ *   Unfortunenately, it's very probable that it'll be broken in the future.
+ *
+ * Copyright 2005 Vincent Béron
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define COBJMACROS
+
+#include <windows.h>
+#include <urlmon.h>
+
+#include "getsffile.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(getsffile);
+
+static const WCHAR getsffile_key[] = {
+    'S','o','f','t','w','a','r','e','\\','W','i','n','e','\\',
+    'g','e','t','s','f','f','i','l','e',0
+};
+static const WCHAR sf_preferred_mirror_value[] = {
+    'S','F','P','r','e','f','e','r','r','e','d','M','i','r','r','o','r',0
+};
+
+static const WCHAR sf_download_domain[] = {
+    'h','t','t','p',':','/','/',
+    'p','r','d','o','w','n','l','o','a','d','s','.',
+    's','o','u','r','c','e','f','o','r','g','e','.',
+    'n','e','t','/',0
+};
+static const WCHAR sf_download_postfix[] = {
+    '?','d','o','w','n','l','o','a','d',0
+};
+static const WCHAR sf_download_use_mirror[] = {
+    '?','u','s','e','_','m','i','r','r','o','r','=',0
+};
+static const WCHAR slash[] = {
+    '/',0
+};
+
+static const WCHAR get_direct_url[] = {
+    '.','g','e','t','_','d','i','r','e','c','t','_','u','r','l',0
+};
+static const WCHAR get_mirror_url[] = {
+    '.','g','e','t','_','m','i','r','r','o','r','_','u','r','l',0
+};
+
+static UINT get_sf_preferred_mirror(LPWSTR mirror, UINT count) {
+    WCHAR preferred_mirror[4096];
+    UINT len;
+    DWORD r, sz, type;
+    HKEY hkey;
+
+    WINE_TRACE("%p,%u\n", mirror, count);
+
+    r = RegOpenKeyW(HKEY_LOCAL_MACHINE, getsffile_key, &hkey);
+    if(r == ERROR_SUCCESS) {
+        sz = sizeof(preferred_mirror);
+        r = RegQueryValueExW(hkey, sf_preferred_mirror_value, NULL, &type,
+                             (LPBYTE)preferred_mirror, &sz);
+        RegCloseKey(hkey);
+    }
+    if(r != ERROR_SUCCESS)
+        preferred_mirror[0] = 0;
+
+    len = lstrlenW(preferred_mirror);
+
+    WINE_TRACE("mirror=%s,len=%u\n", wine_dbgstr_w(preferred_mirror), len);
+
+    if(mirror && count > len)
+        lstrcpyW(mirror, preferred_mirror);
+
+    return len;
+}
+
+static const WCHAR meta[] = {
+    'm','e','t','a',0
+};
+static const WCHAR http_equiv[] = {
+    'h','t','t','p','-','e','q','u','i','v',0
+};
+static const WCHAR refresh[] = {
+    'r','e','f','r','e','s','h',0
+};
+static const WCHAR content[] = {
+    'c','o','n','t','e','n','t',0
+};
+static const WCHAR url[] = {
+    'u','r','l',0
+};
+static const WCHAR input[] = {
+    'i','n','p','u','t',0
+};
+static const WCHAR value[] = {
+    'v','a','l','u','e',0
+};
+static const WCHAR type[] = {
+    't','y','p','e',0
+};
+static const WCHAR radio[] = {
+    'r','a','d','i','o',0
+};
+
+static BOOL get_attribute_value(HANDLE hfile, LPCWSTR tag_name,
+        LPCWSTR attribute_name, LPCWSTR optional_attribute_name,
+        LPCWSTR optional_value, LPWSTR value_buffer, UINT count) {
+    BYTE data[4096];
+    DWORD bytes_read = 0;
+    BOOL attribute = FALSE;
+    BOOL comment = FALSE;
+    BOOL quote = FALSE;
+    BOOL tag = FALSE;
+    BOOL tag_just_opened = FALSE;
+    BOOL value = FALSE;
+    BOOL got_optional_attribute_value = FALSE;
+    BOOL got_attribute_value = FALSE;
+    WCHAR current_tag[4096];
+    WCHAR current_attribute[4096];
+    WCHAR current_value[4096];
+    WCHAR content_value[4096];
+    int i, j, k, l;
+    UINT len;
+
+    WINE_TRACE("%p,%s,%s,%s,%s,%p,%u\n", hfile, wine_dbgstr_w(tag_name),
+               wine_dbgstr_w(attribute_name),
+	       wine_dbgstr_w(optional_attribute_name),
+	       wine_dbgstr_w(optional_value), value_buffer, count);
+
+    memset(current_tag, 0, sizeof(current_tag));
+    j = 0;
+    memset(current_attribute, 0, sizeof(current_attribute));
+    k = 0;
+    memset(current_value, 0, sizeof(current_value));
+    l = 0;
+    while(ReadFile(hfile, data, sizeof(data), &bytes_read, NULL) && bytes_read != 0) {
+        for(i = 0; i < bytes_read; i++) {
+            if(data[i] == '!' && tag_just_opened) {
+                comment = TRUE;
+                tag = FALSE;
+                memset(current_tag, 0, sizeof(current_tag));
+                j = 0;
+            } else if(data[i] == '>' && comment)
+                comment = FALSE;
+            else if(data[i] == '>') {
+                if(value) {
+                    if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, optional_attribute_name) && !lstrcmpiW(current_value, optional_value))
+                        got_optional_attribute_value = TRUE;
+                    if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, attribute_name)) {
+                        got_attribute_value = TRUE;
+                        lstrcpyW(content_value, current_value);
+                    }
+                    if(got_optional_attribute_value && got_attribute_value)
+                        break;
+                }
+                got_optional_attribute_value = FALSE;
+                got_attribute_value = FALSE;
+                tag = FALSE;
+                memset(current_tag, 0, sizeof(current_tag));
+                j = 0;
+                attribute = FALSE;
+                memset(current_attribute, 0, sizeof(current_attribute));
+                k = 0;
+                value = FALSE;
+                memset(current_value, 0, sizeof(current_value));
+                l = 0;
+            } else if(data[i] == '"' && !quote)
+                quote = TRUE;
+            else if(data[i] == '"' && quote) {
+                quote = FALSE;
+                if(value) {
+                    if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, optional_attribute_name) && !lstrcmpiW(current_value, optional_value))
+                        got_optional_attribute_value = TRUE;
+                    if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, attribute_name)) {
+                        got_attribute_value = TRUE;
+                        lstrcpyW(content_value, current_value);
+                    }
+                    if(got_optional_attribute_value && got_attribute_value)
+                        break;
+                    attribute = FALSE;
+                    memset(current_attribute, 0, sizeof(current_attribute));
+                    k = 0;
+                    value = FALSE;
+                    memset(current_value, 0, sizeof(current_value));
+                    l = 0;
+                }
+            } else if(data[i] == '<') {
+                tag = TRUE;
+                tag_just_opened = TRUE;
+            } else {
+                tag_just_opened = FALSE;
+                if(tag && !attribute) {
+                    if(!isspace(data[i])) {
+                        current_tag[j++] = data[i];
+                        if(j >= sizeof(current_tag)/sizeof(WCHAR))
+                            return 0;
+                    } else
+                        attribute = TRUE;
+                } else if(attribute && !value) {
+                    if(!isspace(data[i])) {
+                        if(data[i] == '=')
+                            value = TRUE;
+                        else {
+                            current_attribute[k++] = data[i];
+                            if(k >= sizeof(current_attribute)/sizeof(WCHAR))
+                                return 0;
+                        }
+                    }
+                } else if(value) {
+                    if(!isspace(data[i]) || quote) {
+                        current_value[l++] = data[i];
+                        if(l >= sizeof(current_value)/sizeof(WCHAR))
+                            return 0;
+                    } else {
+                        if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, optional_attribute_name) && !lstrcmpiW(current_value, optional_value))
+                            got_optional_attribute_value = TRUE;
+                        if(!lstrcmpiW(current_tag, tag_name) && !lstrcmpiW(current_attribute, attribute_name)) {
+                            got_attribute_value = TRUE;
+                            lstrcpyW(content_value, current_value);
+                        }
+                        if(got_optional_attribute_value && got_attribute_value)
+                            break;
+                        memset(current_attribute, 0, sizeof(current_attribute));
+                        k = 0;
+                        value = FALSE;
+                        memset(current_value, 0, sizeof(current_value));
+                        l = 0;
+                    }
+                }
+            }
+        }
+        if(got_optional_attribute_value && got_attribute_value)
+            break;
+    }
+    if(!got_optional_attribute_value || !got_attribute_value)
+        return 0;
+
+    len = lstrlenW(content_value);
+
+    WINE_TRACE("content_value=%s,len=%u\n", wine_dbgstr_w(content_value), len);
+
+    if(value_buffer && count > len)
+        lstrcpyW(value_buffer, content_value);
+
+    return len;
+}
+
+static UINT get_sf_direct_url(LPCWSTR filename, LPWSTR direct_url, UINT count) {
+    WCHAR refresh_url[4096];
+    UINT len;
+    HANDLE hfile;
+    BOOL attribute = FALSE;
+    BOOL attribute_interrupted = FALSE;
+    BOOL value = FALSE;
+    WCHAR current_attribute[4096];
+    WCHAR current_value[4096];
+    WCHAR content_value[4096];
+    int i, j, k;
+    BOOL found_direct_url = FALSE;
+
+    WINE_TRACE("%s,%p,%u\n", wine_dbgstr_w(filename), direct_url, count);
+
+    memset(refresh_url, 0, sizeof(refresh_url));
+    memset(content_value, 0, sizeof(content_value));
+    hfile = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+                        FILE_ATTRIBUTE_NORMAL, NULL);
+    if(hfile != INVALID_HANDLE_VALUE) {
+        get_attribute_value(hfile, meta, content, http_equiv, refresh,
+                            content_value, sizeof(content_value)/sizeof(WCHAR));
+        CloseHandle(hfile);
+        attribute = FALSE;
+        memset(current_attribute, 0, sizeof(current_attribute));
+        j = 0;
+        value = FALSE;
+        memset(current_value, 0, sizeof(current_value));
+        k = 0;
+        len = lstrlenW(content_value);
+        for(i = 0; i < len; i++) {
+            if(!isspace(content_value[i]) && !attribute) {
+                attribute = TRUE;
+                current_attribute[j++] = content_value[i];
+            } else if(attribute && !value) {
+                if(!isspace(content_value[i])) {
+                    if(content_value[i] == '=')
+                        value = TRUE;
+                    else {
+                        if(attribute_interrupted) {
+                            attribute_interrupted = FALSE;
+                            memset(current_attribute, 0, sizeof(current_attribute));
+                            j = 0;
+                        }
+                        current_attribute[j++] = content_value[i];
+                    }
+                } else
+                    attribute_interrupted = TRUE;
+            } else if(value) {
+                if(!isspace(content_value[i]))
+                    current_value[k++] = content_value[i];
+                else {
+                    if(!lstrcmpiW(current_attribute, url)) {
+                        found_direct_url = TRUE;
+                        lstrcpyW(refresh_url, current_value);
+                        break;
+                    } else {
+                        memset(current_attribute, 0, sizeof(current_attribute));
+                        j = 0;
+                        attribute = FALSE;
+                        memset(current_value, 0, sizeof(current_value));
+                        k = 0;
+                        value = FALSE;
+                    }
+                }
+            }
+        }
+        if(!found_direct_url) {
+            if(!lstrcmpiW(current_attribute, url)) {
+                found_direct_url = TRUE;
+                lstrcpyW(refresh_url, current_value);
+            } else
+                return 0;
+        }
+    } else
+        return 0;
+
+    len = lstrlenW(refresh_url);
+
+    WINE_TRACE("refresh_url=%s,len=%u\n", wine_dbgstr_w(refresh_url), len);
+
+    if(direct_url && count > len)
+        lstrcpyW(direct_url, refresh_url);
+
+    return len;
+}
+
+static UINT get_sf_mirror(LPCWSTR filename, LPWSTR mirror, UINT count) {
+    WCHAR mirror_name[4096];
+    UINT len;
+    HANDLE hfile;
+
+    WINE_TRACE("%s,%p,%u\n", wine_dbgstr_w(filename), mirror, count);
+
+    memset(mirror_name, 0, sizeof(mirror_name));
+    hfile = CreateFileW(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING,
+                        FILE_ATTRIBUTE_NORMAL, NULL);
+    if(hfile != INVALID_HANDLE_VALUE) {
+        get_attribute_value(hfile, input, value, type, radio,
+	                    mirror_name, sizeof(mirror_name)/sizeof(WCHAR));
+        CloseHandle(hfile);
+    } else
+        return 0;
+
+    len = lstrlenW(mirror_name);
+
+    WINE_TRACE("mirror_name=%s,len=%u\n", wine_dbgstr_w(mirror_name), len);
+
+    if(mirror && count > len)
+        lstrcpyW(mirror, mirror_name);
+
+    return len;
+}
+
+BOOL get_sf_file(LPCWSTR project, LPCWSTR filename, LPCWSTR local, HWND hdlg) {
+    int tries_left = 3;
+    UINT len;
+    WCHAR temp_file_path[4096];
+    LPWSTR mirror = NULL;
+    LPWSTR sf_url = NULL;
+    LPWSTR direct_url = NULL;
+    HRESULT r;
+    BOOL bCancelled = FALSE;
+    IBindStatusCallback *dl;
+
+    WINE_TRACE("%s,%s,%s\n", wine_dbgstr_w(project), wine_dbgstr_w(filename),
+               wine_dbgstr_w(local));
+
+    /* First, try with the preferred mirror */
+    len = get_sf_preferred_mirror(NULL, 0);
+    if(!(mirror = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+        return FALSE;
+    get_sf_preferred_mirror(mirror, len);
+
+    while(1) {
+        len = lstrlenW(sf_download_domain) + lstrlenW(project) +
+               lstrlenW(slash) + lstrlenW(filename) +
+               lstrlenW(sf_download_use_mirror) + lstrlenW(mirror) + 1;
+        if(!(sf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+            goto end;
+        lstrcpyW(sf_url, sf_download_domain);
+        lstrcatW(sf_url, project);
+        lstrcatW(sf_url, slash);
+        lstrcatW(sf_url, filename);
+        lstrcatW(sf_url, sf_download_use_mirror);
+        lstrcatW(sf_url, mirror);
+        HeapFree(GetProcessHeap(), 0, mirror);
+        mirror = NULL;
+
+        if(!GetTempPathW(4096, temp_file_path))
+            goto end;
+        lstrcatW(temp_file_path, local);
+        lstrcatW(temp_file_path, get_direct_url);
+
+        r = URLDownloadToFileW(NULL, sf_url, temp_file_path, 0, NULL);
+        if(FAILED(r))
+            goto end;
+        HeapFree(GetProcessHeap(), 0, sf_url);
+        sf_url = NULL;
+
+        len = get_sf_direct_url(temp_file_path, NULL, 0);
+        if(len++) {
+            if(!(direct_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+                goto end;
+            get_sf_direct_url(temp_file_path, direct_url, len);
+            DeleteFileW(temp_file_path);
+            dl = create_dl(hdlg, &bCancelled);
+            r = URLDownloadToFileW(NULL, direct_url, local, 0, dl);
+            if(dl)
+                IBindStatusCallback_Release(dl);
+            if(FAILED(r))
+                goto end;
+            HeapFree(GetProcessHeap(), 0, direct_url);
+            direct_url = NULL;
+            len = get_sf_mirror(local, NULL, 0);
+            if(!len++)
+                break;
+            if(!(mirror = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+                goto end;
+            get_sf_mirror(local, mirror, len);
+            DeleteFileW(local);
+            continue;
+        } else {
+            DeleteFileW(temp_file_path);
+        }
+        if(!tries_left) {
+            WINE_ERR("Unable to download %s!\n", wine_dbgstr_w(filename));
+            goto end;
+        }
+
+        /* Then try to find another mirror to download from */
+        len = lstrlenW(sf_download_domain) + lstrlenW(project) +
+               lstrlenW(slash) + lstrlenW(filename) +
+               lstrlenW(sf_download_postfix) + 1;
+        if(!(sf_url = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+            goto end;
+        lstrcpyW(sf_url, sf_download_domain);
+        lstrcatW(sf_url, project);
+        lstrcatW(sf_url, slash);
+        lstrcatW(sf_url, filename);
+        lstrcatW(sf_url, sf_download_postfix);
+
+        if(!GetTempPathW(4096, temp_file_path))
+            goto end;
+        lstrcatW(temp_file_path, local);
+        lstrcatW(temp_file_path, get_mirror_url);
+
+        r = URLDownloadToFileW(NULL, sf_url, temp_file_path, 0, NULL);
+        if(FAILED(r))
+            goto end;
+        HeapFree(GetProcessHeap(), 0, sf_url);
+        sf_url = NULL;
+
+        len = get_sf_mirror(temp_file_path, NULL, 0);
+	if(!len++)
+            goto end;
+        if(!(mirror = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR))))
+            goto end;
+        get_sf_mirror(temp_file_path, mirror, len);
+        DeleteFileW(temp_file_path);
+
+        tries_left--;
+    }
+
+    return TRUE;
+
+end:
+    return FALSE;
+}
diff -uN /dev/null programs/getsffile/version.rc
--- /dev/null	2002-08-30 19:31:37.000000000 -0400
+++ programs/getsffile/version.rc	2005-04-30 20:24:58.000000000 -0400
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2005 Vincent Béron
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#define WINE_FILEDESCRIPTION_STR "Wine Sourceforge File Getter"
+#define WINE_FILENAME_STR "getsffile.exe"
+#define WINE_FILEVERSION 1,0,0,0
+#define WINE_FILEVERSION_STR "1.0.0.0"
+#define WINE_PRODUCTVERSION 1,0,0,0
+#define WINE_PRODUCTVERSION_STR "1.0.0.0"
+#define WINE_PRODUCTNAME_STR "Wine Sourceforge File Getter"
+
+#include "wine/wine_common_ver.rc"
