Release 961117
Sun Nov 17 15:01:45 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [graphics/bitblt.c] [graphics/x11drv/bitblt.c]
Moved BitBlt operations to the new graphics driver
interface. Implemented PatBlt32, BitBlt32 and StretchBlt32.
* [memory/global.c]
Unified MemManInfo() and GlobalMemoryStatus().
* [objects/text.c]
Fixed ExtTextOut() to always use physical coords for clip rect.
* [windows/dialog.c]
Implemented DlgDirSelectEx() and Win32 version of DlgDirSelect*.
* [windows/event.c]
Avoid busy-looping in EVENT_WaitXEvent when no timer is pending
(thanks to Thomas Koenig).
* [windows/painting.c]
Moved update region clipping for CS_PARENTDC windows to BeginPaint().
* [windows/scroll.c]
Implemented Win32 version of ScrollWindow() and ScrollDC().
Tue Nov 12 09:52:17 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/*.c] [win32/file.c]
Some win32 filetime conversion functions added.
Fixed behaviour with DOS drives pointing to UNIX /
SetCurrentDirectory() may also get X:\xxx paths.
Fixed FILE_Open when called from CreateFile().
Added GetFileSize(), MapViewOfFile(), SetFileTime(), GetFileTime().
* [misc/crtdll.c] [if1632/crtdll.spec]
Added some new functions.
* [if1632/user32.spec]
Some thunks into win16 code added.
* [win32/init.c]
Added GetSystemInfo(), removed GetModuleFileName() stub.
* [win32/code_page.c] [if1632/thunk.c]
Added EnumSystemCodePages* (untested).
* [objects/font.c] [if1632/thunk.c]
Added EnumFontFamilies32*.
Mon Nov 11 14:50:24 1996 Huw D. M. Davies <h.davies1@physics.oxford.ac.uk>
* [controls/menu.c] [windows/mdi.c]
Don't delete the MDI `windows' menu if it's already been deleted.
* [misc/exec.c]
Notepad always calls WinHelp(.., HELP_QUIT, ...) at termination
and complains if it returns FALSE.
* [windows/winpos.c]
Get maximized MDI child's nonclient area redrawn after resize.
Thu Nov 7 13:32:34 1996 Lee Jaekil <juria@seodu.co.kr>
* [memory/global.c]
Use /proc filesystem for GlobalMemoryStatus() on Linux.
Mon Nov 4 18:30:00 1996 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [windows/event.c]
Added OffiX-style file drop handling. File paths must be
DOS-mappable by Wine (via wine.conf).
* [controls/combo.c]
Added WM_GETTEXT handler.
* [objects/palette.c]
Added ResizePalette() (untested).
* [objects/cursoricon.c]
Implemented icon to cursor conversion.
* [objects/color.c]
Fixed crash on startup when no colorcells are writeable.
Mon Nov 4 00:49:41 1996 Ulrich Schmid <uschmid@mail.hh.provi.de>
* [rc/winerc.c]
Added support for win32 output.
* [library/libres.c] [include/libres.h] [loader/resource.c]
Renamed LIBRES_FindResource to LIBRES_FindResource16.
Added LIBRES_FindResource32.
Sun Nov 3 21:21:45 1996 Robert Pouliot <krynos@clic.net>
* [loader/builtin.c] [if1632/Makefile.in] [if1632/wing.spec]
Added the spec file for WinG, it's only stub for now, but it
should be easy to do by someone with Windows programming
knowledge. See: ftp.microsoft.com/SoftLib/MSLFILES/wing10.exe.
* [if1632/crtdll.spec]
Added some string and memory functions to make sfxed95.exe (of
Warcraft 2) almost work.
diff --git a/files/dos_fs.c b/files/dos_fs.c
index 3e3c8dc..77aa5ed 100644
--- a/files/dos_fs.c
+++ b/files/dos_fs.c
@@ -306,6 +306,25 @@
+ tm->tm_mday;
}
+/***********************************************************************
+ * DOSFS_DosDateTimeToUnixTime
+ *
+ * Convert from the DOS (FAT) date/time format into Unix time
+ * (borrowed from files/file.c)
+ */
+time_t DOSFS_DosDateTimeToUnixTime( WORD date, WORD time )
+{
+ struct tm newtm;
+
+ newtm.tm_sec = (time & 0x1f) * 2;
+ newtm.tm_min = (time >> 5) & 0x3f;
+ newtm.tm_hour = (time >> 11);
+ newtm.tm_mday = (date & 0x1f);
+ newtm.tm_mon = ((date >> 5) & 0x0f) - 1;
+ newtm.tm_year = (date >> 9) + 80;
+ return mktime( &newtm );
+}
+
/***********************************************************************
* DOSFS_UnixTimeToFileTime
@@ -760,7 +779,8 @@
path, skip, buffer, cur_pos );
cur_pos = skip;
if (dir) closedir(dir);
- if (!(dir = opendir( path ))) return 0;
+ if (!*path) path = "/";
+ if (!(dir = opendir(path))) return 0;
drive_path = path;
drive_root = 0;
if (DRIVE_FindDriveRoot( &drive_path ) != -1)
@@ -876,3 +896,94 @@
*lastpart=strrchr(buf,'\\');
return strlen(fn);
}
+
+
+/***********************************************************************
+ * DosDateTimeToFileTime (KERNEL32.76)
+ */
+BOOL32 DosDateTimeToFileTime( WORD fatdate, WORD fattime, LPFILETIME ft )
+{
+ time_t unixtime = DOSFS_DosDateTimeToUnixTime(fatdate,fattime);
+ DOSFS_UnixTimeToFileTime(unixtime,ft);
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * FileTimeToDosDateTime (KERNEL32.111)
+ */
+BOOL32 FileTimeToDosDateTime( LPFILETIME ft, LPWORD fatdate, LPWORD fattime)
+{
+ time_t unixtime = DOSFS_FileTimeToUnixTime(ft);
+ DOSFS_ToDosDateTime(unixtime,fatdate,fattime);
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * LocalFileTimeToFileTime (KERNEL32.373)
+ */
+BOOL32 LocalFileTimeToFileTime( LPFILETIME localft, LPFILETIME utcft )
+{
+ struct tm *xtm;
+
+ /* convert from local to UTC. Perhaps not correct. FIXME */
+ xtm = gmtime((time_t*)&(localft->dwLowDateTime));
+ utcft->dwLowDateTime = mktime(xtm);
+ utcft->dwHighDateTime = 0;
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * FileTimeToLocalFileTime (KERNEL32.112)
+ */
+BOOL32 FileTimeToLocalFileTime( LPFILETIME utcft, LPFILETIME localft )
+{
+ struct tm *xtm;
+
+ /* convert from UTC to local. Perhaps not correct. FIXME */
+ xtm = localtime((time_t*)&(utcft->dwLowDateTime));
+ localft->dwLowDateTime = mktime(xtm);
+ localft->dwHighDateTime = 0;
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * FileTimeToSystemTime (KERNEL32.113)
+ */
+BOOL32 FileTimeToSystemTime( LPFILETIME ft, LPSYSTEMTIME syst )
+{
+ struct tm *xtm;
+ time_t xtime = DOSFS_FileTimeToUnixTime(ft);
+ xtm = gmtime(&xtime);
+ syst->wYear = xtm->tm_year;
+ syst->wMonth = xtm->tm_mon;
+ syst->wDayOfWeek = xtm->tm_wday;
+ syst->wDay = xtm->tm_mday;
+ syst->wHour = xtm->tm_hour;
+ syst->wMinute = xtm->tm_min;
+ syst->wSecond = xtm->tm_sec;
+ syst->wMilliseconds = 0; /* FIXME */
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * SystemTimeToFileTime (KERNEL32.526)
+ */
+BOOL32 SystemTimeToFileTime( LPSYSTEMTIME syst, LPFILETIME ft )
+{
+ struct tm xtm;
+
+ xtm.tm_year = syst->wYear;
+ xtm.tm_mon = syst->wMonth;
+ xtm.tm_wday = syst->wDayOfWeek;
+ xtm.tm_mday = syst->wDay;
+ xtm.tm_hour = syst->wHour;
+ xtm.tm_min = syst->wMinute;
+ xtm.tm_sec = syst->wSecond;
+ DOSFS_UnixTimeToFileTime(mktime(&xtm),ft);
+ return TRUE;
+}