int21 move a2

György 'Nog' Jeney nog at sdf.lonestar.org
Sat Nov 9 07:11:28 CST 2002


ChangeLog:
 * dlls/winedos/int21.c
 * dlls/winedos/dosconf.c
 * dlls/winedos/winedos.spec
 * msdos/dpmi.c
 * msdos/int21.c
 * include/callback.h
 * dlls/kernel/kernel32.spec
   Move all of the simple functions of int 21 to winedos.

nog.

-------------- next part --------------
--- include/callback.h.a1	2002-11-09 06:28:59.000000000 +0200
+++ include/callback.h	2002-11-09 06:29:09.000000000 +0200
@@ -23,7 +23,6 @@
 
 #include "windef.h"
 #include "winnt.h"
-#include "msdos.h"
 
 typedef struct {
     void (WINAPI *LoadDosExe)( LPCSTR filename, HANDLE hFile );
@@ -42,7 +41,6 @@
     BOOL (WINAPI *inport)( int port, int size, DWORD *res );
     BOOL (WINAPI *outport)( int port, int size, DWORD val );
     void (WINAPI *ASPIHandler)( CONTEXT86 *context );
-    DOSCONF *(WINAPI *GetConfig)( void );
 } DOSVM_TABLE;
 
 extern DOSVM_TABLE Dosvm;
--- msdos/int21.c.a1	2002-11-09 06:01:38.000000000 +0200
+++ msdos/int21.c	2002-11-09 07:27:03.000000000 +0200
@@ -461,23 +461,6 @@
     SET_SI( context, context->Esi + (int)s - (int)filename );
 }
 
-static void INT21_GetSystemDate( CONTEXT86 *context )
-{
-    SYSTEMTIME systime;
-    GetLocalTime( &systime );
-    SET_CX( context, systime.wYear );
-    SET_DX( context, (systime.wMonth << 8) | systime.wDay );
-    SET_AX( context, systime.wDayOfWeek );
-}
-
-static void INT21_GetSystemTime( CONTEXT86 *context )
-{
-    SYSTEMTIME systime;
-    GetLocalTime( &systime );
-    SET_CX( context, (systime.wHour << 8) | systime.wMinute );
-    SET_DX( context, (systime.wSecond << 8) | (systime.wMilliseconds / 10) );
-}
-
 /* Many calls translate a drive argument like this:
    drive number (00h = default, 01h = A:, etc)
    */
@@ -1205,28 +1188,10 @@
 	break;
       }
 
-    case 0x2e: /* SET VERIFY FLAG */
-        TRACE("SET VERIFY FLAG ignored\n");
-    	/* we cannot change the behaviour anyway, so just ignore it */
-    	break;
-
-    case 0x18: /* NULL FUNCTIONS FOR CP/M COMPATIBILITY */
-    case 0x1d:
-    case 0x1e:
-    case 0x20:
-    case 0x6b: /* NULL FUNCTION */
-        SET_AL( context, 0 );
-        break;
-
     case 0x5c: /* "FLOCK" - RECORD LOCKING */
         fLock(context);
         break;
 
-    case 0x0d: /* DISK BUFFER FLUSH */
-	TRACE("DISK BUFFER FLUSH ignored\n");
-        RESET_CFLAG(context); /* dos 6+ only */
-        break;
-
     case 0x0e: /* SELECT DEFAULT DRIVE */
 	TRACE("SELECT DEFAULT DRIVE %d\n", DL_reg(context));
         DRIVE_SetCurrentDrive( DL_reg(context) );
@@ -1288,27 +1253,6 @@
         INT21_ParseFileNameIntoFCB(context);
         break;
 
-    case 0x2a: /* GET SYSTEM DATE */
-        INT21_GetSystemDate(context);
-        break;
-
-    case 0x2b: /* SET SYSTEM DATE */
-        FIXME("SetSystemDate(%02d/%02d/%04d): not allowed\n",
-	      DL_reg(context), DH_reg(context), CX_reg(context) );
-        SET_AL( context, 0 );  /* Let's pretend we succeeded */
-        break;
-
-    case 0x2c: /* GET SYSTEM TIME */
-        INT21_GetSystemTime(context);
-        break;
-
-    case 0x2d: /* SET SYSTEM TIME */
-        FIXME("SetSystemTime(%02d:%02d:%02d.%02d): not allowed\n",
-	      CH_reg(context), CL_reg(context),
-	      DH_reg(context), DL_reg(context) );
-        SET_AL( context, 0 );  /* Let's pretend we succeeded */
-        break;
-
     case 0x2f: /* GET DISK TRANSFER AREA ADDRESS */
         TRACE("GET DISK TRANSFER AREA ADDRESS\n");
         {
@@ -1331,68 +1275,12 @@
         SET_CX( context, 0x0000 );
         break;
 
-    case 0x31: /* TERMINATE AND STAY RESIDENT */
-        FIXME("TERMINATE AND STAY RESIDENT stub\n");
-        break;
-
     case 0x32: /* GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE */
         TRACE("GET DOS DRIVE PARAMETER BLOCK FOR DRIVE %s\n",
 	      INT21_DriveName( DL_reg(context)));
         GetDrivePB(context, DOS_GET_DRIVE( DL_reg(context) ) );
         break;
 
-    case 0x33: /* MULTIPLEXED */
-        switch (AL_reg(context))
-        {
-	      case 0x00: /* GET CURRENT EXTENDED BREAK STATE */
-		TRACE("GET CURRENT EXTENDED BREAK STATE\n");
-		if(!DPMI_LoadDosSystem())
-		    break;
-                SET_DL( context, Dosvm.GetConfig()->brk_flag );
-		break;
-
-	      case 0x01: /* SET EXTENDED BREAK STATE */
-		TRACE("SET CURRENT EXTENDED BREAK STATE\n");
-		if(!DPMI_LoadDosSystem())
-		    break;
-		Dosvm.GetConfig()->brk_flag = (DL_reg(context) > 0);
-		break;
-
-	      case 0x02: /* GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE*/
-		TRACE("GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE\n");
-		if(!DPMI_LoadDosSystem())
-		    break;
-		/* ugly coding in order to stay reentrant */
-		if (DL_reg(context))
-		{
-		    SET_DL( context, Dosvm.GetConfig()->brk_flag );
-		    Dosvm.GetConfig()->brk_flag = 1;
-		}
-		else
-		{
-		    SET_DL( context, Dosvm.GetConfig()->brk_flag );
-		    Dosvm.GetConfig()->brk_flag = 0;
-		}
-		break;
-
-	      case 0x05: /* GET BOOT DRIVE */
-		TRACE("GET BOOT DRIVE\n");
-		SET_DL( context, 3 );
-		/* c: is Wine's bootdrive (a: is 1)*/
-		break;
-
-	      case 0x06: /* GET TRUE VERSION NUMBER */
-		TRACE("GET TRUE VERSION NUMBER\n");
-		SET_BX( context, (HIWORD(GetVersion16() >> 8)) | (HIWORD(GetVersion16() << 8)) );
-		SET_DX( context, 0x00 );
-		break;
-
-	      default:
-                INT_BARF( context, 0x21 );
-		break;
-        }
-        break;
-
     case 0x34: /* GET ADDRESS OF INDOS FLAG */
         TRACE("GET ADDRESS OF INDOS FLAG\n");
         if (!heap) INT21_CreateHeap();
@@ -1553,32 +1441,6 @@
         }
         break;
 
-    case 0x43: /* FILE ATTRIBUTES */
-        switch (AL_reg(context))
-        {
-        case 0x00:
-            TRACE("GET FILE ATTRIBUTES for %s\n",
-		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
-            SET_AX( context, GetFileAttributesA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,
-                                                                    context->Edx)));
-            if (AX_reg(context) == 0xffff) bSetDOSExtendedError = TRUE;
-            else SET_CX( context, AX_reg(context) );
-            break;
-
-        case 0x01:
-            TRACE("SET FILE ATTRIBUTES 0x%02x for %s\n", CX_reg(context),
-		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
-            bSetDOSExtendedError =
-		(!SetFileAttributesA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,
-							   context->Edx),
-                                       			   CX_reg(context) ));
-            break;
-        case 0x02:
-            FIXME("GET COMPRESSED FILE SIZE for %s stub\n",
-		  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs, context->Edx));
-        }
-        break;
-
     case 0x44: /* IOCTL */
         switch (AL_reg(context))
         {
@@ -1701,20 +1563,6 @@
         }
         break;
 
-    case 0x45: /* "DUP" - DUPLICATE FILE HANDLE */
-        {
-            HANDLE handle;
-            TRACE("DUP - DUPLICATE FILE HANDLE %d\n",BX_reg(context));
-            if ((bSetDOSExtendedError = !DuplicateHandle( GetCurrentProcess(),
-                                                          DosFileHandleToWin32Handle(BX_reg(context)),
-                                                          GetCurrentProcess(), &handle,
-                                                          0, TRUE, DUPLICATE_SAME_ACCESS )))
-                SET_AX( context, HFILE_ERROR16 );
-            else
-                SET_AX( context, Win32HandleToDosFileHandle(handle) );
-            break;
-        }
-
     case 0x46: /* "DUP2", "FORCEDUP" - FORCE DUPLICATE FILE HANDLE */
         TRACE("FORCEDUP - FORCE DUPLICATE FILE HANDLE %d to %d\n",
 	      BX_reg(context),CX_reg(context));
@@ -1843,73 +1691,6 @@
         SET_BX( context, 0 );
         break;
 
-    case 0x54: /* Get Verify Flag */
-	TRACE("Get Verify Flag - Not Supported\n");
-	SET_AL( context, 0x00 );  /* pretend we can tell. 00h = off 01h = on */
-	break;
-
-    case 0x56: /* "RENAME" - RENAME FILE */
-        TRACE("RENAME %s to %s\n",
-	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
-	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi));
-        bSetDOSExtendedError =
-		(!MoveFileA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Edx),
-			       CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi)));
-        break;
-
-    case 0x57: /* FILE DATE AND TIME */
-        switch (AL_reg(context))
-        {
-        case 0x00:  /* Get */
-            {
-                FILETIME filetime;
-                TRACE("GET FILE DATE AND TIME for handle %d\n",
-		      BX_reg(context));
-                if (!GetFileTime( DosFileHandleToWin32Handle(BX_reg(context)), NULL, NULL, &filetime ))
-		     bSetDOSExtendedError = TRUE;
-                else
-                {
-                    WORD date, time;
-                    FileTimeToDosDateTime( &filetime, &date, &time );
-                    SET_DX( context, date );
-                    SET_CX( context, time );
-                }
-            }
-            break;
-
-        case 0x01:  /* Set */
-            {
-                FILETIME filetime;
-                TRACE("SET FILE DATE AND TIME for handle %d\n",
-		      BX_reg(context));
-                DosDateTimeToFileTime( DX_reg(context), CX_reg(context),
-                                       &filetime );
-                bSetDOSExtendedError =
-			(!SetFileTime( DosFileHandleToWin32Handle(BX_reg(context)),
-                                      NULL, NULL, &filetime ));
-            }
-            break;
-        }
-        break;
-
-    case 0x58: /* GET OR SET MEMORY/UMB ALLOCATION STRATEGY */
-	TRACE("GET OR SET MEMORY/UMB ALLOCATION STRATEGY subfunction %d\n",
-	      AL_reg(context));
-        switch (AL_reg(context))
-        {
-        case 0x00:
-            SET_AX( context, 1 );
-            break;
-        case 0x02:
-            SET_AX( context, 0 );
-            break;
-        case 0x01:
-        case 0x03:
-            break;
-        }
-        RESET_CFLAG(context);
-        break;
-
     case 0x5a: /* CREATE TEMPORARY FILE */
         TRACE("CREATE TEMPORARY FILE\n");
         bSetDOSExtendedError = !INT21_CreateTempFile(context);
@@ -1923,13 +1704,6 @@
                                CX_reg(context) ))) == (WORD)HFILE_ERROR16);
         break;
 
-    case 0x5d: /* NETWORK */
-        FIXME("Function 0x%04x not implemented.\n", AX_reg (context));
-	/* Fix the following while you're at it.  */
-        SetLastError( ER_NoNetwork );
-	bSetDOSExtendedError = TRUE;
-        break;
-
     case 0x5e:
 	bSetDOSExtendedError = INT21_networkfunc (context);
         break;
@@ -1964,19 +1738,6 @@
         }
         break;
 
-    case 0x60: /* "TRUENAME" - CANONICALIZE FILENAME OR PATH */
-        TRACE("TRUENAME %s\n",
-	      (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Esi));
-        {
-            if (!GetFullPathNameA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,
-                                                        context->Esi), 128,
-                                     CTX_SEG_OFF_TO_LIN(context, context->SegEs,
-                                                        context->Edi),NULL))
-		bSetDOSExtendedError = TRUE;
-            else SET_AX( context, 0 );
-        }
-        break;
-
     case 0x61: /* UNUSED */
     case 0x63: /* misc. language support */
         switch (AL_reg(context)) {
@@ -1985,10 +1746,6 @@
             break;
         }
         break;
-    case 0x64: /* OS/2 DOS BOX */
-        INT_BARF( context, 0x21 );
-        SET_CFLAG(context);
-    	break;
 
     case 0x65:{/* GET EXTENDED COUNTRY INFORMATION */
 	BYTE    *dataptr=CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi);
@@ -2057,12 +1814,6 @@
         if (GetLastError()) bSetDOSExtendedError = TRUE;
         break;
 
-    case 0x68: /* "FFLUSH" - COMMIT FILE */
-    case 0x6a: /* COMMIT FILE */
-        TRACE("FFLUSH/COMMIT handle %d\n",BX_reg(context));
-        bSetDOSExtendedError = (!FlushFileBuffers( DosFileHandleToWin32Handle(BX_reg(context)) ));
-        break;
-
     case 0x69: /* DISK SERIAL NUMBER */
         switch (AL_reg(context))
         {
@@ -2370,11 +2121,6 @@
 
 		break;
 
-
-    case 0xdc: /* CONNECTION SERVICES - GET CONNECTION NUMBER */
-    case 0xea: /* NOVELL NETWARE - RETURN SHELL VERSION */
-        break;
-
     default:
         INT_BARF( context, 0x21 );
         break;
--- dlls/winedos/dosconf.c.a1	2002-11-09 06:36:21.000000000 +0200
+++ dlls/winedos/dosconf.c	2002-11-09 06:36:55.000000000 +0200
@@ -117,14 +117,6 @@
 static int menu_in_listing = 0;		/* we are in the [menu] section */
 static int menu_skip = 0;				/* the current menu gets skipped */
 
-DOSCONF *DOSCONF_GetConfig()
-{
-    static int done = 0;
-    if(!done)
-        DOSCONF_ReadConfig();
-    return &DOSCONF_config;
-}
-
 static void DOSCONF_skip(char **pconfline)
 {
     char *p;
--- dlls/winedos/int21.c.a1	2002-11-09 05:51:14.000000000 +0200
+++ dlls/winedos/int21.c	2002-11-09 07:28:42.000000000 +0200
@@ -77,6 +77,7 @@
 void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
 {
     BYTE ascii;
+    BOOL bSetDOSExtendedError = FALSE;
 
     RESET_CFLAG(context);  /* Not sure if this is a good idea */
 
@@ -172,6 +173,24 @@
         }
         break;
 
+    case 0x0d: /* DISK BUFFER FLUSH */
+        TRACE("DISK BUFFER FLUSH ignored\n");
+        RESET_CFLAG(context); /* dos 6+ only */
+        break;
+
+    case 0x18: /* NULL FUNCTION FOR CP/M COMPATIBILITY */
+        SET_AL( context, 0 );
+        break;
+
+    case 0x1d: /* NULL FUNCTIONS FOR CP/M COMPATIBILITY */
+    case 0x1e:
+        SET_AL( context, 0 );
+        break;
+
+    case 0x20: /* NULL FUNCTION FOR CP/M COMPATIBILITY */
+        SET_AL( context, 0 );
+        break;
+
     case 0x25: /* SET INTERRUPT VECTOR */
         if(DOSVM_IsWin16()) DOS3Call(context);
         else
@@ -180,6 +199,95 @@
                                                      DX_reg(context)));
         break;
 
+    case 0x2a: /* GET SYSTEM DATE */
+        {
+            SYSTEMTIME systime;
+            GetLocalTime( &systime );
+            SET_CX( context, systime.wYear );
+            SET_DX( context, (systime.wMonth << 8) | systime.wDay );
+            SET_AX( context, systime.wDayOfWeek );
+        }
+        break;
+
+    case 0x2b: /* SET SYSTEM DATE */
+        FIXME("SetSystemDate(%02d/%02d/%04d): not allowed\n",
+              DL_reg(context), DH_reg(context), CX_reg(context) );
+        SET_AL( context, 0 );  /* Let's pretend we succeeded */
+        break;
+
+    case 0x2c: /* GET SYSTEM TIME */
+        {
+            SYSTEMTIME systime;
+            GetLocalTime( &systime );
+            SET_CX( context, (systime.wHour << 8) | systime.wMinute );
+            SET_DX( context, (systime.wSecond << 8) |
+                             (systime.wMilliseconds / 10) );
+        }
+        break;
+
+    case 0x2d: /* SET SYSTEM TIME */
+        FIXME("SetSystemTime(%02d:%02d:%02d.%02d): not allowed\n",
+              CH_reg(context), CL_reg(context),
+              DH_reg(context), DL_reg(context) );
+        SET_AL( context, 0 );  /* Let's pretend we succeeded */
+        break;
+
+    case 0x2e: /* SET VERIFY FLAG */
+        TRACE("SET VERIFY FLAG ignored\n");
+        /* we cannot change the behaviour anyway, so just ignore it */
+        break;
+
+    case 0x31: /* TERMINATE AND STAY RESIDENT */
+        FIXME("TERMINATE AND STAY RESIDENT stub\n");
+        break;
+
+    case 0x33: /* MULTIPLEXED */
+        switch (AL_reg(context))
+        {
+              case 0x00: /* GET CURRENT EXTENDED BREAK STATE */
+                TRACE("GET CURRENT EXTENDED BREAK STATE\n");
+                SET_DL( context, DOSCONF_config.brk_flag );
+                break;
+
+              case 0x01: /* SET EXTENDED BREAK STATE */
+                TRACE("SET CURRENT EXTENDED BREAK STATE\n");
+                DOSCONF_config.brk_flag = (DL_reg(context) > 0);
+                break;
+
+              case 0x02: /* GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE */
+                TRACE("GET AND SET EXTENDED CONTROL-BREAK CHECKING STATE\n");
+                /* ugly coding in order to stay reentrant */
+                if (DL_reg(context))
+                {
+                    SET_DL( context, DOSCONF_config.brk_flag );
+                    DOSCONF_config.brk_flag = 1;
+                }
+                else
+                {
+                    SET_DL( context, DOSCONF_config.brk_flag );
+                    DOSCONF_config.brk_flag = 0;
+                }
+                break;
+
+              case 0x05: /* GET BOOT DRIVE */
+                TRACE("GET BOOT DRIVE\n");
+                SET_DL( context, 3 );
+                /* c: is Wine's bootdrive (a: is 1)*/
+                break;
+
+              case 0x06: /* GET TRUE VERSION NUMBER */
+                TRACE("GET TRUE VERSION NUMBER\n");
+                SET_BX( context, (HIWORD(GetVersion16() >> 8)) |
+                                 (HIWORD(GetVersion16() << 8)) );
+                SET_DX( context, 0x00 );
+                break;
+
+              default:
+                INT_BARF( context, 0x21 );
+                break;
+        }
+        break;
+
     case 0x35: /* GET INTERRUPT VECTOR */
         TRACE("GET INTERRUPT VECTOR 0x%02x\n",AL_reg(context));
         if(DOSVM_IsWin16()) DOS3Call(context);
@@ -190,6 +298,13 @@
         }
         break;
 
+    case 0x38: /* GET COUNTRY-SPECIFIC INFORMATION */
+        TRACE("GET COUNTRY-SPECIFIC INFORMATION for country 0x%02x\n",
+              AL_reg(context));
+        SET_AX( context, 0x02 ); /* no country support available */
+        SET_CFLAG(context);
+        break;
+
     case 0x40: /* WRITE TO FILE OR DEVICE */
         /* Writes to stdout are handled here. */
         if (BX_reg(context) == 1) {
@@ -204,10 +319,54 @@
           DOS3Call( context );
         break;
 
+    case 0x43: /* FILE ATTRIBUTES */
+        switch (AL_reg(context))
+        {
+        case 0x00:
+            TRACE("GET FILE ATTRIBUTES for %s\n",
+                  (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs, 
+                                             context->Edx));
+            SET_AX(context, GetFileAttributesA(CTX_SEG_OFF_TO_LIN(context,
+                              context->SegDs, context->Edx)));
+            if (AX_reg(context) == 0xffff) bSetDOSExtendedError = TRUE;
+            else SET_CX( context, AX_reg(context) );
+            break;
+
+        case 0x01:
+            TRACE("SET FILE ATTRIBUTES 0x%02x for %s\n", CX_reg(context),
+                  (LPCSTR)CTX_SEG_OFF_TO_LIN(context,  context->SegDs,
+                                             context->Edx));
+            bSetDOSExtendedError =
+                (!SetFileAttributesA(CTX_SEG_OFF_TO_LIN(context, context->SegDs,
+                                                           context->Edx),
+                                                           CX_reg(context) ));
+            break;
+        case 0x02:
+            FIXME("GET COMPRESSED FILE SIZE for %s stub\n",
+                  (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,
+                                             context->Edx));
+        }
+        break;
+
     case 0x44: /* IOCTL */
         DOSVM_Int21Handler_Ioctl( context );
         break;
 
+    case 0x45: /* "DUP" - DUPLICATE FILE HANDLE */
+        {
+            HANDLE handle;
+            TRACE("DUP - DUPLICATE FILE HANDLE %d\n", BX_reg(context));
+            if((bSetDOSExtendedError =
+                !DuplicateHandle(GetCurrentProcess(),
+                                 DosFileHandleToWin32Handle(BX_reg(context)),
+                                 GetCurrentProcess(), &handle, 0, TRUE,
+                                 DUPLICATE_SAME_ACCESS)))
+                SET_AX(context, HFILE_ERROR16);
+            else
+                SET_AX(context, Win32HandleToDosFileHandle(handle));
+            break;
+        }
+
     case 0x4b: /* "EXEC" - LOAD AND/OR EXECUTE PROGRAM */
         TRACE("EXEC %s\n", (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx ));
         if(DOSVM_IsWin16()) DOS3Call(context);
@@ -257,6 +416,95 @@
         }
         break;
 
+    case 0x54: /* Get Verify Flag */
+        TRACE("Get Verify Flag - Not Supported\n");
+        SET_AL( context, 0x00 );  /* pretend we can tell. 00h = off 01h = on */
+        break;
+
+    case 0x56: /* "RENAME" - RENAME FILE */
+        TRACE("RENAME %s to %s\n",
+              (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs, context->Edx),
+              (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegEs,context->Edi));
+        bSetDOSExtendedError =
+                (!MoveFileA(CTX_SEG_OFF_TO_LIN(context, context->SegDs,
+                                               context->Edx),
+                            CTX_SEG_OFF_TO_LIN(context, context->SegEs,
+                                               context->Edi)));
+        break;
+
+    case 0x57: /* FILE DATE AND TIME */
+        switch (AL_reg(context))
+        {
+        case 0x00:  /* Get */
+            {
+                FILETIME filetime;
+                TRACE("GET FILE DATE AND TIME for handle %d\n",
+                      BX_reg(context));
+                if(!GetFileTime(DosFileHandleToWin32Handle(BX_reg(context)),
+                                                           NULL, NULL,
+                                                           &filetime ))
+                     bSetDOSExtendedError = TRUE;
+                else
+                {
+                    WORD date, time;
+                    FileTimeToDosDateTime(&filetime, &date, &time);
+                    SET_DX(context, date);
+                    SET_CX(context, time);
+                }
+            }
+            break;
+
+        case 0x01:  /* Set */
+            {
+                FILETIME filetime;
+                TRACE("SET FILE DATE AND TIME for handle %d\n",
+                      BX_reg(context));
+                DosDateTimeToFileTime( DX_reg(context), CX_reg(context),
+                                       &filetime );
+                bSetDOSExtendedError =
+                      (!SetFileTime(DosFileHandleToWin32Handle(BX_reg(context)),
+                                    NULL, NULL, &filetime ));
+            }
+            break;
+        }
+        break;
+
+    case 0x58: /* GET OR SET MEMORY/UMB ALLOCATION STRATEGY */
+        TRACE("GET OR SET MEMORY/UMB ALLOCATION STRATEGY subfunction %d\n",
+              AL_reg(context));
+        switch (AL_reg(context))
+        {
+        case 0x00:
+            SET_AX( context, 1 );
+            break;
+        case 0x02:
+            SET_AX( context, 0 );
+            break;
+        case 0x01:
+        case 0x03:
+            break;
+        }
+        RESET_CFLAG(context);
+        break;
+
+    case 0x5d: /* NETWORK */
+        FIXME("Function 0x%04x not implemented.\n", AX_reg (context));
+        /* Fix the following while you're at it.  */
+        SetLastError(ER_NoNetwork);
+        bSetDOSExtendedError = TRUE;
+        break;
+
+    case 0x60: /* "TRUENAME" - CANONICALIZE FILENAME OR PATH */
+        TRACE("TRUENAME %s\n",
+              (LPCSTR)CTX_SEG_OFF_TO_LIN(context, context->SegDs,context->Esi));        {
+            if (!GetFullPathNameA( CTX_SEG_OFF_TO_LIN(context, context->SegDs,
+                                                        context->Esi), 128,
+                                     CTX_SEG_OFF_TO_LIN(context, context->SegEs,                                                        context->Edi),NULL))
+                bSetDOSExtendedError = TRUE;
+            else SET_AX( context, 0 );
+        }
+        break;
+
     case 0x62: /* GET PSP ADDRESS */
         TRACE("GET CURRENT PSP ADDRESS\n");
         /* FIXME: should we return the original DOS PSP upon */
@@ -265,6 +513,31 @@
         else SET_BX( context, DOSVM_psp );
         break;
 
+    case 0x64: /* OS/2 DOS BOX */
+        INT_BARF( context, 0x21 );
+        SET_CFLAG(context);
+        break;
+
+    case 0x68: /* "FFLUSH" - COMMIT FILE */
+    case 0x6a: /* COMMIT FILE */
+        TRACE("FFLUSH/COMMIT handle %d\n",BX_reg(context));
+        bSetDOSExtendedError = (!FlushFileBuffers(DosFileHandleToWin32Handle(
+                                                             BX_reg(context))));
+        break;
+
+    case 0x6b: /* NULL FUNCTION FOR CP/M COMPATIBILITY */
+        SET_AL( context, 0 );
+        break;
+
+    case 0x70: /* MS-DOS 7 (Windows95) - ??? (country-specific?)*/
+    case 0x72: /* MS-DOS 7 (Windows95) - ??? */
+        TRACE("windows95 function AX %04x\n",
+                    AX_reg(context));
+        WARN("        returning unimplemented\n");
+        SET_CFLAG(context);
+        SET_AL( context, 0 );
+        break;
+
     default:
         DOS3Call( context );
     }
Index: dlls/kernel/kernel32.spec
===================================================================
RCS file: /home/wine/wine/dlls/kernel/kernel32.spec,v
retrieving revision 1.68
diff -u -r1.68 kernel32.spec
--- dlls/kernel/kernel32.spec	6 Nov 2002 20:03:00 -0000	1.68
+++ dlls/kernel/kernel32.spec	9 Nov 2002 11:33:16 -0000
@@ -994,6 +994,7 @@
 @ stdcall GetModuleUsage16(long) GetModuleUsage16
 @ stdcall GetSelectorLimit16(long) GetSelectorLimit16
 @ stdcall GetThreadQueue16(long) GetThreadQueue16
+@ stdcall GetVersion16() GetVersion16
 @ stdcall GlobalDOSAlloc16(long) GlobalDOSAlloc16
 @ stdcall GlobalFlags16(long) GlobalFlags16
 @ stdcall GlobalReAlloc16(long long long) GlobalReAlloc16
--- msdos/dpmi.c.a1	2002-11-09 07:33:37.000000000 +0200
+++ msdos/dpmi.c	2002-11-09 07:33:47.000000000 +0200
@@ -75,7 +75,6 @@
     GET_ADDR(outport);
     GET_ADDR(ASPIHandler);
     GET_ADDR(EmulateInterruptPM);
-    GET_ADDR(GetConfig);
 #undef GET_ADDR
     return TRUE;
 }
--- dlls/winedos/winedos.spec.a1	2002-11-09 08:03:15.000000000 +0200
+++ dlls/winedos/winedos.spec	2002-11-09 08:03:29.000000000 +0200
@@ -14,5 +14,3 @@
 @ stdcall inport(long long ptr) DOSVM_inport
 @ stdcall outport(long long long) DOSVM_outport
 @ stdcall ASPIHandler(ptr) DOSVM_ASPIHandler
-
-@ stdcall GetConfig() DOSCONF_GetConfig



More information about the wine-patches mailing list