Release 960623
Wed Jun 19 14:49:27 1996 Marcus Meissner <msmeissn@faui45.informatik.uni-erlangen.de>
* [files/drive.c]
GetFreeDiskSpace*, GetVolumeInformation* added.
* [files/file.c]
FlushFileBuffers, CreateDirectory* added.
* [include/winbase.h] [include/windows.h]
Prototypes, defines added and fixes.
* [if1632/kernel32.spec] [include/resource32.h]
[win32/cursoricon32.c] [win32/resource.c] [windows/dialog.c]
Fixes to resource handling.
* [if1632/kernel.spec] [if1632/kernel32.spec] [if1632/user32.spec]
Specs for implemented functions added
Some thunks to functions which are same as win16 equivalents.
* [loader/task.c]
GetAppCompatFlags() added.
* [misc/registry.c]
One missing else added, small hack to RegQueryValue16().
* [win32/file.c]
GetFileAttributesA() fixed (was using DOS path as UNIX path).
Tue Jun 18 21:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [loader/ne_resource.c]
Fixed FreeResource() return value.
* [objects/text.c]
Fixed a bug in ExtTextOut() that was causing overlapped characters
in WinWord.
* [windows/winpos.c]
SWP_FRAMECHANGED for top-level windows now invalidates client
area as clock.exe wants.
Tue Jun 18 11:30:22 1996 Albrecht Kleine <kleine@ak.sax.de>
* [controls/listbox.c]
Mini bugfix: 'revival' of missing scrollbar in listboxes.
Mon Jun 17 20:27:41 1996 Robert Pouliot <krynos@clic.net>
* [resources/sysres_Fr.rc] [resources/TODO]
Made changes for Choose_Font dialog.
diff --git a/files/file.c b/files/file.c
index 9662636..390b6de 100644
--- a/files/file.c
+++ b/files/file.c
@@ -26,6 +26,7 @@
#include "options.h"
#include "ldt.h"
#include "task.h"
+#include "string32.h"
#include "stddebug.h"
#include "debug.h"
#include "xmalloc.h"
@@ -484,45 +485,6 @@
/***********************************************************************
- * FILE_Sync
- */
-int FILE_Sync( HFILE hFile )
-{
- DOS_FILE *file;
-
- if (!(file = FILE_GetFile( hFile ))) return 0;
- if (fsync( file->unix_handle ) != -1) return 1;
- FILE_SetDosError();
- return 0;
-}
-
-
-/***********************************************************************
- * FILE_MakeDir
- */
-int FILE_MakeDir( LPCSTR path )
-{
- const char *unixName;
-
- dprintf_file(stddeb, "FILE_MakeDir: '%s'\n", path );
-
- if ((unixName = DOSFS_IsDevice( path )) != NULL)
- {
- dprintf_file(stddeb, "FILE_MakeDir: device '%s'!\n", unixName);
- DOS_ERROR( ER_AccessDenied, EC_AccessDenied, SA_Abort, EL_Disk );
- return 0;
- }
- if (!(unixName = DOSFS_GetUnixFileName( path, FALSE ))) return 0;
- if ((mkdir( unixName, 0777 ) == -1) && (errno != EEXIST))
- {
- FILE_SetDosError();
- return 0;
- }
- return 1;
-}
-
-
-/***********************************************************************
* FILE_RemoveDir
*/
int FILE_RemoveDir( LPCSTR path )
@@ -1100,3 +1062,64 @@
}
return pdb->nbFiles;
}
+
+
+/***********************************************************************
+ * FlushFileBuffers (KERNEL32.133)
+ */
+BOOL32 FlushFileBuffers( HFILE hFile )
+{
+ DOS_FILE *file;
+
+ dprintf_file( stddeb, "FlushFileBuffers(%d)\n", hFile );
+ if (!(file = FILE_GetFile( hFile ))) return FALSE;
+ if (fsync( file->unix_handle ) != -1) return TRUE;
+ FILE_SetDosError();
+ return FALSE;
+}
+
+
+/***********************************************************************
+ * CreateDirectory16 (KERNEL.144)
+ */
+BOOL16 CreateDirectory16( LPCSTR path, LPVOID dummy )
+{
+ dprintf_file( stddeb,"CreateDirectory16(%s,%p)\n", path, dummy );
+ return (BOOL16)CreateDirectory32A( path, NULL );
+}
+
+
+/***********************************************************************
+ * CreateDirectory32A (KERNEL32.39)
+ */
+BOOL32 CreateDirectory32A( LPCSTR path, LPSECURITY_ATTRIBUTES lpsecattribs )
+{
+ const char *unixName;
+
+ dprintf_file( stddeb, "CreateDirectory32A(%s,%p)\n", path, lpsecattribs );
+ if ((unixName = DOSFS_IsDevice( path )) != NULL)
+ {
+ dprintf_file(stddeb, "CreateDirectory: device '%s'!\n", unixName);
+ DOS_ERROR( ER_AccessDenied, EC_AccessDenied, SA_Abort, EL_Disk );
+ return FALSE;
+ }
+ if (!(unixName = DOSFS_GetUnixFileName( path, FALSE ))) return 0;
+ if ((mkdir( unixName, 0777 ) == -1) && (errno != EEXIST))
+ {
+ FILE_SetDosError();
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
+/***********************************************************************
+ * CreateDirectory32W (KERNEL32.42)
+ */
+BOOL32 CreateDirectory32W( LPCWSTR path, LPSECURITY_ATTRIBUTES lpsecattribs )
+{
+ LPSTR xpath = STRING32_DupUniToAnsi(path);
+ BOOL32 ret = CreateDirectory32A(xpath,lpsecattribs);
+ free(xpath);
+ return ret;
+}