Dll separation - Winedos from kernel32
Steven Edwards
steven_ed4153 at yahoo.com
Tue Feb 17 17:25:21 CST 2004
Hello,
This was from a totaly foolish attempt at building winedos on Mingw. I
was hoping we could create a ntvdm for ReactOS. I guess we are not
planning on totaly rewritting winedos to deal with Erics new filesystem
stuff right? So we could just move this call here.
Changelog:
Dll separation - move DOSFS_GetDeviceByHandle out of kernel32 and make
it internal winedos function.
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-------------- next part --------------
Index: files/dos_fs.c
===================================================================
RCS file: /home/wine/wine/files/dos_fs.c,v
retrieving revision 1.148
diff -u -r1.148 dos_fs.c
--- files/dos_fs.c 23 Jan 2004 01:51:33 -0000 1.148
+++ files/dos_fs.c 17 Feb 2004 22:54:38 -0000
@@ -830,28 +830,6 @@
return NULL;
}
-
-/***********************************************************************
- * DOSFS_GetDeviceByHandle
- */
-const DOS_DEVICE *DOSFS_GetDeviceByHandle( HANDLE hFile )
-{
- const DOS_DEVICE *ret = NULL;
- SERVER_START_REQ( get_device_id )
- {
- req->handle = hFile;
- if (!wine_server_call( req ))
- {
- if ((reply->id >= 0) &&
- (reply->id < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0])))
- ret = &DOSFS_Devices[reply->id];
- }
- }
- SERVER_END_REQ;
- return ret;
-}
-
-
/**************************************************************************
* DOSFS_CreateCommPort
*/
Index: dlls/kernel/kernel32.spec
===================================================================
RCS file: /home/wine/wine/dlls/kernel/kernel32.spec,v
retrieving revision 1.124
diff -u -r1.124 kernel32.spec
--- dlls/kernel/kernel32.spec 30 Jan 2004 22:57:21 -0000 1.124
+++ dlls/kernel/kernel32.spec 17 Feb 2004 22:55:02 -0000
@@ -1152,7 +1152,6 @@
################################################################
# Wine dll separation hacks, these will go away, don't use them
#
-@ cdecl DOSFS_GetDeviceByHandle(long)
@ cdecl DOSMEM_AllocSelector(long)
@ cdecl DOSMEM_Available()
@ cdecl DOSMEM_FreeBlock(ptr)
--- /dev/null Tue Feb 17 17:51:28 2004
+++ dlls/winedos/dos_fs.c Tue Feb 17 00:06:40 2004
@@ -0,0 +1,106 @@
+/*
+ * DOS file system functions
+ *
+ * Copyright 1993 Erik Bos
+ * Copyright 1996 Alexandre Julliard
+ *
+ * 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 "config.h"
+#include "wine/port.h"
+
+#include <sys/types.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#ifdef HAVE_SYS_ERRNO_H
+#include <sys/errno.h>
+#endif
+#include <fcntl.h>
+#include <stdarg.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#include <time.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+#include "ntstatus.h"
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "wingdi.h"
+
+#include "wine/unicode.h"
+#include "wine/winbase16.h"
+#include "drive.h"
+#include "file.h"
+#include "winternl.h"
+#include "wine/server.h"
+#include "wine/exception.h"
+#include "excpt.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(dosfs);
+WINE_DECLARE_DEBUG_CHANNEL(file);
+WINE_DECLARE_DEBUG_CHANNEL(winedos);
+
+static const DOS_DEVICE DOSFS_Devices[] =
+/* name, device flags (see Int 21/AX=0x4400) */
+{
+ { {'C','O','N',0}, 0xc0d3 },
+ { {'P','R','N',0}, 0xa0c0 },
+ { {'N','U','L',0}, 0x80c4 },
+ { {'A','U','X',0}, 0x80c0 },
+ { {'L','P','T','1',0}, 0xa0c0 },
+ { {'L','P','T','2',0}, 0xa0c0 },
+ { {'L','P','T','3',0}, 0xa0c0 },
+ { {'L','P','T','4',0}, 0xc0d3 },
+ { {'C','O','M','1',0}, 0x80c0 },
+ { {'C','O','M','2',0}, 0x80c0 },
+ { {'C','O','M','3',0}, 0x80c0 },
+ { {'C','O','M','4',0}, 0x80c0 },
+ { {'S','C','S','I','M','G','R','$',0}, 0xc0c0 },
+ { {'H','P','S','C','A','N',0}, 0xc0c0 },
+ { {'E','M','M','X','X','X','X','0',0}, 0x0000 }
+};
+
+/***********************************************************************
+ * DOSFS_GetDeviceByHandle
+ */
+const DOS_DEVICE *DOSFS_GetDeviceByHandle( HANDLE hFile )
+{
+ const DOS_DEVICE *ret = NULL;
+ SERVER_START_REQ( get_device_id )
+ {
+ req->handle = hFile;
+ if (!wine_server_call( req ))
+ {
+ if ((reply->id >= 0) &&
+ (reply->id < sizeof(DOSFS_Devices)/sizeof(DOSFS_Devices[0])))
+ ret = &DOSFS_Devices[reply->id];
+ }
+ }
+ SERVER_END_REQ;
+ return ret;
+}
More information about the wine-patches
mailing list