Commit 013f8946 authored by Jukka Heinonen's avatar Jukka Heinonen Committed by Alexandre Julliard

Moved dosconf.c to winedos.

parent b830439b
...@@ -45,7 +45,6 @@ C_SRCS = \ ...@@ -45,7 +45,6 @@ C_SRCS = \
$(TOPOBJDIR)/misc/registry.c \ $(TOPOBJDIR)/misc/registry.c \
$(TOPOBJDIR)/misc/system.c \ $(TOPOBJDIR)/misc/system.c \
$(TOPOBJDIR)/misc/version.c \ $(TOPOBJDIR)/misc/version.c \
$(TOPOBJDIR)/msdos/dosconf.c \
$(TOPOBJDIR)/msdos/dosmem.c \ $(TOPOBJDIR)/msdos/dosmem.c \
$(TOPOBJDIR)/msdos/dpmi.c \ $(TOPOBJDIR)/msdos/dpmi.c \
$(TOPOBJDIR)/msdos/int21.c \ $(TOPOBJDIR)/msdos/int21.c \
...@@ -74,8 +73,8 @@ C_SRCS = \ ...@@ -74,8 +73,8 @@ C_SRCS = \
cdrom.c \ cdrom.c \
critsection.c \ critsection.c \
debugtools.c \ debugtools.c \
exception.c \
error.c \ error.c \
exception.c \
file.c \ file.c \
heap.c \ heap.c \
large_int.c \ large_int.c \
...@@ -86,17 +85,17 @@ C_SRCS = \ ...@@ -86,17 +85,17 @@ C_SRCS = \
path.c \ path.c \
reg.c \ reg.c \
rtl.c \ rtl.c \
rtlstr.c \
rtlbitmap.c \ rtlbitmap.c \
string.c \ rtlstr.c \
sec.c \ sec.c \
signal_i386.c \ signal_i386.c \
signal_powerpc.c \ signal_powerpc.c \
signal_sparc.c \ signal_sparc.c \
string.c \
sync.c \ sync.c \
thread.c \ thread.c \
virtual.c \
time.c \ time.c \
virtual.c \
wcstring.c wcstring.c
ASM_SRCS = \ ASM_SRCS = \
......
...@@ -13,6 +13,7 @@ C_SRCS = \ ...@@ -13,6 +13,7 @@ C_SRCS = \
devices.c \ devices.c \
dma.c \ dma.c \
dosaspi.c \ dosaspi.c \
dosconf.c \
dosvm.c \ dosvm.c \
fpu.c \ fpu.c \
himem.c \ himem.c \
......
...@@ -52,6 +52,25 @@ typedef struct { ...@@ -52,6 +52,25 @@ typedef struct {
DWORD offset; DWORD offset;
} SEGPTR48, FARPROC48; } SEGPTR48, FARPROC48;
#define DOSCONF_MEM_HIGH 0x0001
#define DOSCONF_MEM_UMB 0x0002
#define DOSCONF_NUMLOCK 0x0004
#define DOSCONF_KEYB_CONV 0x0008
typedef struct {
char lastdrive;
int brk_flag;
int files;
int stacks_nr;
int stacks_sz;
int buf;
int buf2;
int fcbs;
int flags;
char *shell;
char *country;
} DOSCONF;
typedef void (*DOSRELAY)(CONTEXT86*,void*); typedef void (*DOSRELAY)(CONTEXT86*,void*);
typedef void (WINAPI *RMCBPROC)(CONTEXT86*); typedef void (WINAPI *RMCBPROC)(CONTEXT86*);
typedef void (WINAPI *INTPROC)(CONTEXT86*); typedef void (WINAPI *INTPROC)(CONTEXT86*);
...@@ -113,6 +132,9 @@ extern BYTE DMA_ioport_in( WORD port ); ...@@ -113,6 +132,9 @@ extern BYTE DMA_ioport_in( WORD port );
/* dosaspi.c */ /* dosaspi.c */
void WINAPI DOSVM_ASPIHandler(CONTEXT86*); void WINAPI DOSVM_ASPIHandler(CONTEXT86*);
/* dosconf.c */
DOSCONF *DOSCONF_GetConfig( void );
/* fpu.c */ /* fpu.c */
extern void WINAPI DOSVM_Int34Handler(CONTEXT86*); extern void WINAPI DOSVM_Int34Handler(CONTEXT86*);
extern void WINAPI DOSVM_Int35Handler(CONTEXT86*); extern void WINAPI DOSVM_Int35Handler(CONTEXT86*);
......
...@@ -1602,10 +1602,57 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context ) ...@@ -1602,10 +1602,57 @@ void WINAPI DOSVM_Int21Handler( CONTEXT86 *context )
break; break;
case 0x32: /* GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE */ case 0x32: /* GET DOS DRIVE PARAMETER BLOCK FOR SPECIFIC DRIVE */
case 0x33: /* MULTIPLEXED */
INT_Int21Handler( context ); INT_Int21Handler( context );
break; 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_GetConfig()->brk_flag );
break;
case 0x01: /* SET EXTENDED BREAK STATE */
TRACE("SET CURRENT EXTENDED BREAK STATE\n");
DOSCONF_GetConfig()->brk_flag = (DL_reg(context) > 0) ? 1 : 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_GetConfig()->brk_flag );
DOSCONF_GetConfig()->brk_flag = 1;
}
else
{
SET_DL( context, DOSCONF_GetConfig()->brk_flag );
DOSCONF_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_BL( context, HIBYTE(HIWORD(GetVersion16())) ); /* major */
SET_BH( context, LOBYTE(HIWORD(GetVersion16())) ); /* minor */
SET_DL( context, 0x00 ); /* revision */
SET_DH( context, 0x08 ); /* DOS is in ROM */
break;
default:
INT_BARF( context, 0x21 );
break;
}
break;
case 0x34: /* GET ADDRESS OF INDOS FLAG */ case 0x34: /* GET ADDRESS OF INDOS FLAG */
TRACE( "GET ADDRESS OF INDOS FLAG\n" ); TRACE( "GET ADDRESS OF INDOS FLAG\n" );
context->SegEs = INT21_GetHeapSelector( context ); context->SegEs = INT21_GetHeapSelector( context );
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include "selectors.h" #include "selectors.h"
#include "wine/windef16.h" #include "wine/windef16.h"
/* msdos/dosconf.c */
extern int DOSCONF_ReadConfig(void);
/* msdos/dosmem.c */ /* msdos/dosmem.c */
#include "pshpack1.h" #include "pshpack1.h"
......
...@@ -211,25 +211,4 @@ typedef struct _DOS_LISTOFLISTS ...@@ -211,25 +211,4 @@ typedef struct _DOS_LISTOFLISTS
#define EL_Serial 0x04 #define EL_Serial 0x04
#define EL_Memory 0x05 #define EL_Memory 0x05
#define DOSCONF_MEM_HIGH 0x0001
#define DOSCONF_MEM_UMB 0x0002
#define DOSCONF_NUMLOCK 0x0004
#define DOSCONF_KEYB_CONV 0x0008
typedef struct {
char lastdrive;
int brk_flag;
int files;
int stacks_nr;
int stacks_sz;
int buf;
int buf2;
int fcbs;
int flags;
char *shell;
char *country;
} DOSCONF;
extern DOSCONF DOSCONF_config;
#endif /* __WINE_MSDOS_H */ #endif /* __WINE_MSDOS_H */
...@@ -133,13 +133,6 @@ static WORD DosHeapHandle; ...@@ -133,13 +133,6 @@ static WORD DosHeapHandle;
extern char TempDirectory[]; extern char TempDirectory[];
static void INT21_ReadConfigSys(void)
{
static int done;
if (!done) DOSCONF_ReadConfig();
done = 1;
}
static BOOL INT21_CreateHeap(void) static BOOL INT21_CreateHeap(void)
{ {
if (!(DosHeapHandle = GlobalAlloc16(GMEM_FIXED,sizeof(struct DosHeap)))) if (!(DosHeapHandle = GlobalAlloc16(GMEM_FIXED,sizeof(struct DosHeap))))
...@@ -965,55 +958,6 @@ void WINAPI INT_Int21Handler( CONTEXT86 *context ) ...@@ -965,55 +958,6 @@ void WINAPI INT_Int21Handler( CONTEXT86 *context )
GetDrivePB(context, DOS_GET_DRIVE( DL_reg(context) ) ); GetDrivePB(context, DOS_GET_DRIVE( DL_reg(context) ) );
break; break;
case 0x33: /* MULTIPLEXED */
switch (AL_reg(context))
{
case 0x00: /* GET CURRENT EXTENDED BREAK STATE */
TRACE("GET CURRENT EXTENDED BREAK STATE\n");
INT21_ReadConfigSys();
SET_DL( context, DOSCONF_config.brk_flag );
break;
case 0x01: /* SET EXTENDED BREAK STATE */
TRACE("SET CURRENT EXTENDED BREAK STATE\n");
INT21_ReadConfigSys();
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");
INT21_ReadConfigSys();
/* 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 0x36: /* GET FREE DISK SPACE */ case 0x36: /* GET FREE DISK SPACE */
TRACE("GET FREE DISK SPACE FOR DRIVE %s\n", TRACE("GET FREE DISK SPACE FOR DRIVE %s\n",
INT21_DriveName( DL_reg(context))); INT21_DriveName( DL_reg(context)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment