windos: fix EXTENDED COUNTRY INFORMATION
Markus Amsler
markus.amsler at oribi.org
Tue Sep 7 05:10:23 CDT 2004
Alexandre Julliard writes:
> But I suspect that a real DOS emulator may be a better choice for
your app than Wine.
Yeah, perhaps. But it's more a learning/fun project, so I continue
sending patches.
Btw none of the real DOS emulators I tried (dosemu, dosbox) ran the app
out of the box.
Changelog:
* respect given buffer size in GET EXTENDED COUNTRY INFORMATION
-------------- next part --------------
*** wine/dlls/winedos/int21.c Tue Aug 24 17:45:23 2004
--- wine-20040615/dlls/winedos/int21.c Fri Aug 6 11:57:04 2004
***************
*** 2116,2123 ****
static void INT21_ExtendedCountryInformation( CONTEXT86 *context )
{
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegEs, context->Edi );
! BYTE buffsize = CX_reg (context);
!
TRACE( "GET EXTENDED COUNTRY INFORMATION, subfunction %02x\n",
AL_reg(context) );
--- 1858,1864 ----
static void INT21_ExtendedCountryInformation( CONTEXT86 *context )
{
BYTE *dataptr = CTX_SEG_OFF_TO_LIN( context, context->SegEs, context->Edi );
!
TRACE( "GET EXTENDED COUNTRY INFORMATION, subfunction %02x\n",
AL_reg(context) );
***************
*** 2148,2160 ****
*(WORD*)(dataptr+1) = 38; /* Size of the following info */
*(WORD*)(dataptr+3) = INT21_GetSystemCountryCode(); /* Country ID */
*(WORD*)(dataptr+5) = GetOEMCP(); /* Code page */
! if (buffsize >= 0x29){
! /* FIXME: fill buffer partially up to buffsize bytes*/
! INT21_FillCountryInformation( dataptr + 7 );
! SET_CX( context, 0x29 ); /* Size of returned info */
! }else{
! SET_CX( context, 0x07 ); /* Size of returned info */
! }
break;
case 0x02: /* GET POINTER TO UPPERCASE TABLE */
--- 1889,1896 ----
*(WORD*)(dataptr+1) = 38; /* Size of the following info */
*(WORD*)(dataptr+3) = INT21_GetSystemCountryCode(); /* Country ID */
*(WORD*)(dataptr+5) = GetOEMCP(); /* Code page */
! INT21_FillCountryInformation( dataptr + 7 );
! SET_CX( context, 41 ); /* Size of returned info */
break;
More information about the wine-patches
mailing list