From: sparky4 Date: Fri, 9 Sep 2016 18:16:37 +0000 (-0500) Subject: exmmtest is not tested w X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=8fc86da2131adb94c210e5e50e2743bcc2c3eb69;p=16.git exmmtest is not tested w --- diff --git a/src/exmmtest.c b/src/exmmtest.c index 3766a696..78fa104f 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -33,7 +33,7 @@ #pragma warn -use //file load or read definition -//#define FILEREAD +#define FILEREAD //#define EXMMVERBOSE #define PRINTBB { printf("&main()= %Fp\n", argv[0]);printf("bigbuffer= %Fp\n", bigbuffer);printf("&bigbuffer= %Fp\n", &bigbuffer);printf("bigbuffer= %04x\n", bigbuffer);printf("&bigbuffer= %04x\n", &bigbuffer); } @@ -64,6 +64,7 @@ void segatesuto() void main(int argc, char *argv[]) { + byte w; global_game_variables_t gvar; #ifdef __WATCOMC__ __segment sega; @@ -95,20 +96,20 @@ main(int argc, char *argv[]) PRINTBB; // printf("press any key to continue!\n"); // getch(); - +#ifdef FILEREAD +for(w=0;w<2;w++) +{ // bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD); // printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer)); // if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&gvar.mm)) -#ifdef FILEREAD - printf(" read\n"); - if(CA_ReadFile(bakapee, &bigbuffer, &gvar)) -#else - printf(" load\n"); - if(CA_LoadFile(bakapee, &bigbuffer, &gvar)) + if(w>0) + { + printf(" read\n"); + if(CA_ReadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0; + } #endif - baka=1; - else - baka=0; + printf(" load\n"); + if(CA_LoadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0; // close(bakapeehandle); //hmm functions in cache system use the buffered stuff #ifdef __WATCOMC__ @@ -126,6 +127,9 @@ main(int argc, char *argv[]) MM_Report(&gvar); printf("press any key to continue!\n"); getch(); +#ifdef FILEREAD +} +#endif MM_FreePtr(&bigbuffer, &gvar.mm); //PM_Shutdown(); CA_Shutdown(&gvar);