From 2aed15ed3fd65130ae260d4ecd020a4f870f6442 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 28 Sep 2016 13:32:43 -0500 Subject: [PATCH] ====XMS MOSTLY translated but crashes EXMMTEST.EXE ==== --- src/exmmtest.c | 6 +++--- src/lib/16_mm.c | 4 ++-- src/lib/16_mm.h | 2 +- src/lib/16_pm.c | 2 +- src/lib/16_pm.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/exmmtest.c b/src/exmmtest.c index aaf10f56..58b3e333 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -87,7 +87,7 @@ main(int argc, char *argv[]) //file name // gvar.mm.mmstarted=0; - debugpm=1; //debug pm + dbg_debugpm=1; //debug pm //PRINTBB if(argv[1]){ bakapee1 = argv[1]; @@ -101,7 +101,7 @@ main(int argc, char *argv[]) MM_Startup(&gvar); //printf("ok\n"); #ifdef __WATCOMC__ - if(debugpm>0) + if(dbg_debugpm>0) { PM_Startup(&gvar); //printf("pmstarted ok\n"); @@ -157,7 +157,7 @@ for(w=0;w<2;w++) //printf("bakapee2=%s\n", bakapee2); MM_FreePtr(&bigbuffer, &gvar); #ifdef __WATCOMC__ - if(debugpm>0) + if(dbg_debugpm>0) PM_Shutdown(&gvar); #endif CA_Shutdown(&gvar); diff --git a/src/lib/16_mm.c b/src/lib/16_mm.c index 16b65aa6..c2a966b8 100755 --- a/src/lib/16_mm.c +++ b/src/lib/16_mm.c @@ -837,7 +837,7 @@ void MM_Startup(global_game_variables_t *gvar) gvar->mmi.mainmem = gvar->mmi.nearheap + gvar->mmi.farheap; #ifndef __16_PM__ - if(!debugpm) { + if(!dbg_debugpm) { // // detect EMS and allocate up to 64K at page frame // @@ -939,7 +939,7 @@ void MM_Shutdown(global_game_variables_t *gvar) free(gvar->mm.nearheap);// printf(" near freed\n"); #endif #ifdef __DEBUG__ - if(!debugpm) { + if(!dbg_debugpm) { #endif if(MML_CheckForEMS()){ MML_ShutdownEMS(gvar); }//printf(" EMS freed\n"); } if(MML_CheckForXMS(gvar)){ MML_ShutdownXMS(gvar); }//printf(" XMS freed\n"); } diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 7c681255..e816d885 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -30,7 +30,7 @@ #ifdef __DEBUG__ // 1 == Debug/Dev ; 0 == Production/final #define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%lu bytes\n" -extern boolean debugpm; +extern boolean dbg_debugpm; #else #define OUT_OF_MEM_MSG "\npee\n" #endif diff --git a/src/lib/16_pm.c b/src/lib/16_pm.c index 10ee7b6d..bb08180d 100755 --- a/src/lib/16_pm.c +++ b/src/lib/16_pm.c @@ -30,7 +30,7 @@ #pragma hdrstop #ifdef __DEBUG__ -boolean debugpm=0; +boolean dbg_debugpm=0; #endif // Main Mem specific variables diff --git a/src/lib/16_pm.h b/src/lib/16_pm.h index cc565424..4c015e98 100755 --- a/src/lib/16_pm.h +++ b/src/lib/16_pm.h @@ -35,7 +35,7 @@ #include #ifdef __DEBUG__ -extern boolean debugpm; +extern boolean dbg_debugpm; #endif /*// NOTE! PMPageSize must be an even divisor of EMSPageSize, and >= 1024 -- 2.39.5