Release 960705
Fri Jul 5 16:27:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [controls/desktop.c]
Use Windows file I/O routines to load the desktop bitmap.
* [files/file.c]
Implemented RemoveDirectory* and DeleteFile*.
* [include/wine.h]
Added SIGCONTEXT typedef to replace #define sigcontext_struct.
* [loader/task.c]
Fixed initial breakpoint setting for Win32 tasks.
* [misc/wsprintf.c]
Ignore Unicode formats for wsprintf16().
* [objects/font.c]
Implemented Win32 version of GetTextMetrics.
* [windows/winproc.c] [windows/win.c] [windows/class.c]
[windows/dialog.c]
Modified windows procedures to use thunks, to ensure that the
procedure can be called directly from the Windows program.
* [windows/win.c]
Added function WIN_BuildWinArray() to make it easier to enumerate
windows. Implemented Win32 version of EnumWindows() and friends.
Fri Jul 5 11:56:22 1996 Andreas Kirschbaum <ank@rbg.informatik.th-darmstadt.de>
* [controls/button.c] [windows/win.c]
Operator precedence fixes.
* [controls/edit.c]
Implemented ES_PASSWORD, ES_LOWERCASE and ES_UPPERCASE styles.
Fixed word wrap with long words.
* [debugger/debug.l]
New alias "where" for command "backtrace".
* [if1632/gdi.spec]
Corrected parameter of ExtTextOut.
* [loader/module.c]
Corrected printing of table of modules.
* [misc/spy.c]
Removed superfluous \n in message name.
* [windows/message.c]
Declared MSG_SendMessage as static.
Changed parameter of DirectedYield() from queue handle to task handle.
Removed warning mesages for argument of printf.
* [windows/nonclient.c]
Added the flag DT_NOPREFIX when drawing window titles.
* [windows/win.c]
WIN_WalkWindows now prints the invalid window handle.
Added a warning if Get-/SetWindowWord/-Long gets an invalid offset.
* [windows/winproc.c]
Allows creating dialog windows with NULL as dialog function.
Wed Jul 3 09:26:41 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [windows/event.c]
EVENT_key: Fixes to VK_ code generation for space bar and
punctuation.
* [files/file.c]
GetTempFileName: first character in temporary name is "~".
* [memory/heap.c]
HEAP_MakeInUseBlockFree now frees the whole subheap if possible.
* [objects/text.c]
ExtTextOut16(): handle NULL lpRect and ETO_OPAQUE.
* [misc/driver.c]
Removed some bugs and reformatted. Actually loads drivers now.
* [include/callback.h]
Added CallDriverProc() and CallWindowsExitProc().
* [loader/module.c]
MODULE_CallWEP(): new function.
* [misc/lzexpand.c]
LZSeek(): return new pointer, not old one.
* [misc/ver.c]
find_ne_resource(): fixed dependence on LZSeek() bug.
GetFileResource(): initialize reslen before using it.
* [windows/class.c]
SetClassWord(): add missing else.
* [objects/font.c]
lpFontList is now MAX_FONTS+1. It used to overwrite the array.
InitFontList: allocate one huge array of structures.
FONT_MatchFont: uppercase the face name.
Thu Jun 27 12:41:40 1996 Bruce Milner <bruce@genetics.utah.edu>
* [memory/heap.c]
Fixed a typo in HeapReAlloc().
Tue Jun 25 22:22:03 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/directory.c] [files/drive.c] [if1632/kernel.spec]
[if1632/kernel32.spec] [if1632/shell.spec] [include/windows.h]
GetTempPath* added
GetDriveType* fixed, updated to NewNameStandard.
GetCurrentDirectory* fixed (needs to prepend X:\).
* [controls/listbox.c]
Missing NULL check added.
* [if1632/winmm.spec] [loader/builtin.c]
winmm.dll (32bit mmsystem equivalent) specs added.
* [memory/string.c] [if1632/kernel32.spec] [include/windows.h]
Rtl{Move,Zero,Fill}Memory added.
* [misc/registry.c]
Some NULL ptr dereference bugs fixed.
* [multimedia/mcicda.c][multimedia/mcistring.c][multimedia/mmsystem.c]
Check for NULL ptr.
Fill mciOpenDrv when mixing mciOpen and mciSendString("open ..").
Aliasing should work for all MCI devices.
* [windows/win.c]
Allow passing invalid window handles to CloseWindow().
Tue Jun 25 20:02:15 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
* [files/directory.c] [if1632/kernel32.spec]
GetSystemDirectory32A and GetSystemDirectory32W added.
* [misc/main.c] [if1632/kernel32.spec]
Beep and SetEnvironmentVariable32W added.
diff --git a/files/file.c b/files/file.c
index 390b6de..e324d3f 100644
--- a/files/file.c
+++ b/files/file.c
@@ -385,32 +385,6 @@
/***********************************************************************
- * FILE_Unlink
- */
-int FILE_Unlink( LPCSTR path )
-{
- const char *unixName;
-
- dprintf_file(stddeb, "FILE_Unlink: '%s'\n", path );
-
- if ((unixName = DOSFS_IsDevice( path )) != NULL)
- {
- dprintf_file(stddeb, "FILE_Unlink: removing device '%s'!\n", unixName);
- DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
- return 0;
- }
-
- if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return 0;
- if (unlink( unixName ) == -1)
- {
- FILE_SetDosError();
- return 0;
- }
- return 1;
-}
-
-
-/***********************************************************************
* FILE_Stat
*
* Stat a Unix path name. Return 1 if OK.
@@ -485,31 +459,6 @@
/***********************************************************************
- * FILE_RemoveDir
- */
-int FILE_RemoveDir( LPCSTR path )
-{
- const char *unixName;
-
- dprintf_file(stddeb, "FILE_RemoveDir: '%s'\n", path );
-
- if ((unixName = DOSFS_IsDevice( path )) != NULL)
- {
- dprintf_file(stddeb, "FILE_RemoveDir: device '%s'!\n", unixName);
- DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
- return 0;
- }
- if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return 0;
- if (rmdir( unixName ) == -1)
- {
- FILE_SetDosError();
- return 0;
- }
- return 1;
-}
-
-
-/***********************************************************************
* FILE_Dup
*
* dup() function for DOS handles.
@@ -599,11 +548,12 @@
}
else
{
- DIR_GetTempDosDir( buffer, 132 ); /* buffer must be at least 144 */
+ GetTempPath32A( 132, buffer ); /* buffer must be at least 144 */
strcat( buffer, "\\" );
}
p = buffer + strlen(buffer);
+ *p++ = '~';
for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
sprintf( p, "%04x.tmp", num );
@@ -668,7 +618,7 @@
{
if (!(dosName = DOSFS_GetDosTrueName( name, FALSE ))) goto error;
lstrcpyn32A( ofs->szPathName, dosName, sizeof(ofs->szPathName) );
- ofs->fFixedDisk = (GetDriveType( dosName[0]-'A' ) != DRIVE_REMOVABLE);
+ ofs->fFixedDisk = (GetDriveType16( dosName[0]-'A' ) != DRIVE_REMOVABLE);
dprintf_file( stddeb, "OpenFile(%s): OF_PARSE, res = '%s', %d\n",
name, ofs->szPathName, hFileRet );
/* Return the handle, but close it first */
@@ -723,7 +673,7 @@
/* Try the Windows system directory */
- GetSystemDirectory( ofs->szPathName, len );
+ GetSystemDirectory32A( ofs->szPathName, len );
strcat( ofs->szPathName, "\\" );
strcat( ofs->szPathName, name );
if ((unixName = DOSFS_GetUnixFileName( ofs->szPathName, TRUE )) != NULL)
@@ -1080,6 +1030,53 @@
/***********************************************************************
+ * DeleteFile16 (KERNEL.146)
+ */
+BOOL16 DeleteFile16( LPCSTR path )
+{
+ return DeleteFile32A( path );
+}
+
+
+/***********************************************************************
+ * DeleteFile32A (KERNEL32.71)
+ */
+BOOL32 DeleteFile32A( LPCSTR path )
+{
+ const char *unixName;
+
+ dprintf_file(stddeb, "DeleteFile: '%s'\n", path );
+
+ if ((unixName = DOSFS_IsDevice( path )) != NULL)
+ {
+ dprintf_file(stddeb, "DeleteFile: removing device '%s'!\n", unixName);
+ DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
+ return FALSE;
+ }
+
+ if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return FALSE;
+ if (unlink( unixName ) == -1)
+ {
+ FILE_SetDosError();
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * DeleteFile32W (KERNEL32.72)
+ */
+BOOL32 DeleteFile32W( LPCWSTR path )
+{
+ LPSTR xpath = STRING32_DupUniToAnsi(path);
+ BOOL32 ret = RemoveDirectory32A( xpath );
+ free(xpath);
+ return ret;
+}
+
+
+/***********************************************************************
* CreateDirectory16 (KERNEL.144)
*/
BOOL16 CreateDirectory16( LPCSTR path, LPVOID dummy )
@@ -1123,3 +1120,49 @@
free(xpath);
return ret;
}
+
+
+/***********************************************************************
+ * RemoveDirectory16 (KERNEL)
+ */
+BOOL16 RemoveDirectory16( LPCSTR path )
+{
+ return (BOOL16)RemoveDirectory32A( path );
+}
+
+
+/***********************************************************************
+ * RemoveDirectory32A (KERNEL32.437)
+ */
+BOOL32 RemoveDirectory32A( LPCSTR path )
+{
+ const char *unixName;
+
+ dprintf_file(stddeb, "RemoveDirectory: '%s'\n", path );
+
+ if ((unixName = DOSFS_IsDevice( path )) != NULL)
+ {
+ dprintf_file(stddeb, "RemoveDirectory: device '%s'!\n", unixName);
+ DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
+ return FALSE;
+ }
+ if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return FALSE;
+ if (rmdir( unixName ) == -1)
+ {
+ FILE_SetDosError();
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * RemoveDirectory32W (KERNEL32.438)
+ */
+BOOL32 RemoveDirectory32W( LPCWSTR path )
+{
+ LPSTR xpath = STRING32_DupUniToAnsi(path);
+ BOOL32 ret = RemoveDirectory32A( xpath );
+ free(xpath);
+ return ret;
+}