diff --git a/src/xpdev/csv_file.dsp b/src/xpdev/csv_file.dsp
index 9e65dc435fe24cd87ba7d2556ecc7aef1332e0ca..c1b1da62039d1ea6d90df4fe3fc2ee9850501444 100644
--- a/src/xpdev/csv_file.dsp
+++ b/src/xpdev/csv_file.dsp
@@ -1,96 +1,96 @@
-# Microsoft Developer Studio Project File - Name="csv_file" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=csv_file - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "csv_file.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "csv_file.mak" CFG="csv_file - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "csv_file - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "csv_file - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "csv_file - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-
-!ELSEIF  "$(CFG)" == "csv_file - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "csv_file___Win32_Debug"
-# PROP BASE Intermediate_Dir "csv_file___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF 
-
-# Begin Target
-
-# Name "csv_file - Win32 Release"
-# Name "csv_file - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\csv_file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\genwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\str_list.c
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="csv_file" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=csv_file - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "csv_file.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "csv_file.mak" CFG="csv_file - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "csv_file - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "csv_file - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "csv_file - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF  "$(CFG)" == "csv_file - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "csv_file___Win32_Debug"
+# PROP BASE Intermediate_Dir "csv_file___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF 
+
+# Begin Target
+
+# Name "csv_file - Win32 Release"
+# Name "csv_file - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\csv_file.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\genwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\str_list.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/xpdev/xpdev.dsp b/src/xpdev/xpdev.dsp
index cf6ea4812e77d588db8fa36c8082d446a4693c2c..4754a3411bdd40e868f634b7c7e730d91fcf98ae 100644
--- a/src/xpdev/xpdev.dsp
+++ b/src/xpdev/xpdev.dsp
@@ -1,124 +1,124 @@
-# Microsoft Developer Studio Project File - Name="xpdev" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=xpdev - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "xpdev.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "xpdev.mak" CFG="xpdev - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "xpdev - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "xpdev - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "xpdev - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "msvc.win32.release"
-# PROP Intermediate_Dir "msvc.win32.release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "../../include/microsoft/psdk" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "xpdev - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "xpdev___Win32_Debug"
-# PROP BASE Intermediate_Dir "xpdev___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "msvc.win32.debug"
-# PROP Intermediate_Dir "msvc.win32.debug"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../include/microsoft/psdk" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "xpdev - Win32 Release"
-# Name "xpdev - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\dat_file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\datewrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\dirwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filewrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\genwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ini_file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\link_list.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\netwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\sockwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\str_list.c
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="xpdev" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=xpdev - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "xpdev.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "xpdev.mak" CFG="xpdev - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "xpdev - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "xpdev - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "xpdev - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "msvc.win32.release"
+# PROP Intermediate_Dir "msvc.win32.release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "../../include/microsoft/psdk" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF  "$(CFG)" == "xpdev - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "xpdev___Win32_Debug"
+# PROP BASE Intermediate_Dir "xpdev___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "msvc.win32.debug"
+# PROP Intermediate_Dir "msvc.win32.debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "../../include/microsoft/psdk" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "xpdev - Win32 Release"
+# Name "xpdev - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\dat_file.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\datewrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dirwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\filewrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\genwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ini_file.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\link_list.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\netwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sockwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\str_list.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/xpdev/xpdev_mt.dsp b/src/xpdev/xpdev_mt.dsp
index 28f559a1644470f25cb7f131d8b7f2dde4b905a8..990f9b6acd18f675d583d4770ec2411ef41b3f8b 100644
--- a/src/xpdev/xpdev_mt.dsp
+++ b/src/xpdev/xpdev_mt.dsp
@@ -1,132 +1,132 @@
-# Microsoft Developer Studio Project File - Name="xpdev_mt" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=xpdev_mt - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "xpdev_mt.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "xpdev_mt.mak" CFG="xpdev_mt - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "xpdev_mt - Win32 Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "xpdev_mt - Win32 Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "xpdev_mt - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "msvc.win32.release_mt"
-# PROP Intermediate_Dir "msvc.win32.release_mt"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include/microsoft/psdk" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LINK_LIST_THREADSAFE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF  "$(CFG)" == "xpdev_mt - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "xpdev_mt___Win32_Debug"
-# PROP BASE Intermediate_Dir "xpdev_mt___Win32_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "msvc.win32.debug_mt"
-# PROP Intermediate_Dir "msvc.win32.debug_mt"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include/microsoft/psdk" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LINK_LIST_THREADSAFE" /YX /FD /GZ /c
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "xpdev_mt - Win32 Release"
-# Name "xpdev_mt - Win32 Debug"
-# Begin Source File
-
-SOURCE=.\datewrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\dirwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filewrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\genwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\ini_file.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\link_list.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\msg_queue.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\netwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\semwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\sockwrap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\str_list.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\threadwrap.c
-# End Source File
-# End Target
-# End Project
+# Microsoft Developer Studio Project File - Name="xpdev_mt" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=xpdev_mt - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "xpdev_mt.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "xpdev_mt.mak" CFG="xpdev_mt - Win32 Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "xpdev_mt - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "xpdev_mt - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "xpdev_mt - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "msvc.win32.release_mt"
+# PROP Intermediate_Dir "msvc.win32.release_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "../../include/microsoft/psdk" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LINK_LIST_THREADSAFE" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ELSEIF  "$(CFG)" == "xpdev_mt - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "xpdev_mt___Win32_Debug"
+# PROP BASE Intermediate_Dir "xpdev_mt___Win32_Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "msvc.win32.debug_mt"
+# PROP Intermediate_Dir "msvc.win32.debug_mt"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../include/microsoft/psdk" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "LINK_LIST_THREADSAFE" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo
+
+!ENDIF 
+
+# Begin Target
+
+# Name "xpdev_mt - Win32 Release"
+# Name "xpdev_mt - Win32 Debug"
+# Begin Source File
+
+SOURCE=.\datewrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\dirwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\filewrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\genwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\ini_file.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\link_list.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\msg_queue.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\netwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\semwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\sockwrap.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\str_list.c
+# End Source File
+# Begin Source File
+
+SOURCE=.\threadwrap.c
+# End Source File
+# End Target
+# End Project
diff --git a/src/xpdev/xpprintf.c b/src/xpdev/xpprintf.c
index 2685d223293972febfa3ea73ecfa9e8cd74b39d4..2a7db4133c2c341fbea70caccb482769f9115762 100644
--- a/src/xpdev/xpprintf.c
+++ b/src/xpdev/xpprintf.c
@@ -55,6 +55,11 @@ char *xp_asprintf_next(char *format, int type, ...)
 	int				correct_type=0;
 	char			num_str[128];		/* More than enough room for a 256-bit int */
 
+	/*
+	 * Check if we're already done...
+	 */
+	if(!*(size_t *) format)
+		return(format);
 	/*
 	 * Find the next non %% format, leaving %% as it is
 	 */
@@ -66,8 +71,10 @@ char *xp_asprintf_next(char *format, int type, ...)
 				break;
 		}
 	}
-	if(!*p)
+	if(!*p) {
+		*(size_t *)format=0;
 		return(format);
+	}
 	offset=p-format;
 	format_len=strlen(format+sizeof(size_t))+sizeof(size_t);
 	this_format[0]=0;
@@ -876,7 +883,23 @@ char *xp_asprintf_next(char *format, int type, ...)
 	memmove(format+offset+j, format+offset+this_format_len, offset+format_len-this_format_len+1);
 	memcpy(format+offset, entry_buf, j);
 	p=format+offset+j;
-	*(size_t *)format=p-format;
+	/*
+	 * Search for next non-%% separateor and set offset
+	 * to zero if none found for wrappers to know when
+	 * they're done.
+	 */
+	for(; *p; p++) {
+		if(*p=='%') {
+			if(*(p+1) == '%')
+				p++;
+			else
+				break;
+		}
+	}
+	if(!*p)
+		*(size_t *)format=0;
+	else
+		*(size_t *)format=p-format;
 	return(format);
 }