]> 4ch.mooo.com Git - 16.git/commitdiff
exmmtest is not tested w
authorsparky4 <sparky4@cock.li>
Fri, 9 Sep 2016 18:16:37 +0000 (13:16 -0500)
committersparky4 <sparky4@cock.li>
Fri, 9 Sep 2016 18:16:37 +0000 (13:16 -0500)
src/exmmtest.c

index 3766a69665e0364b627ef67aff4d89dd55ff89df..78fa104fdb4dd8257c93b6a9dcf3bcf8d6d1cc5f 100755 (executable)
@@ -33,7 +33,7 @@
 #pragma warn -use\r
 \r
 //file load or read definition\r
-//#define FILEREAD\r
+#define FILEREAD\r
 //#define EXMMVERBOSE\r
 \r
 #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); }\r
@@ -64,6 +64,7 @@ void segatesuto()
 void\r
 main(int argc, char *argv[])\r
 {\r
+       byte w;\r
        global_game_variables_t gvar;\r
 #ifdef __WATCOMC__\r
        __segment sega;\r
@@ -95,20 +96,20 @@ main(int argc, char *argv[])
        PRINTBB;\r
 //     printf("press any key to continue!\n");\r
 //     getch();\r
-\r
+#ifdef FILEREAD\r
+for(w=0;w<2;w++)\r
+{\r
 //     bakapeehandle = open(bakapee,O_RDONLY | O_BINARY, S_IREAD);\r
 //     printf("size of big buffer~=%u\n", _bmsize(segu, bigbuffer));\r
 //     if(CA_FarRead(bakapeehandle,(void far *)&bigbuffer,sizeof(bigbuffer),&gvar.mm))\r
-#ifdef FILEREAD\r
-       printf("                read\n");\r
-       if(CA_ReadFile(bakapee, &bigbuffer, &gvar))\r
-#else\r
-       printf("                load\n");\r
-       if(CA_LoadFile(bakapee, &bigbuffer, &gvar))\r
+       if(w>0)\r
+       {\r
+               printf("                read\n");\r
+               if(CA_ReadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0;\r
+       }\r
 #endif\r
-               baka=1;\r
-       else\r
-               baka=0;\r
+       printf("                load\n");\r
+       if(CA_LoadFile(bakapee, &bigbuffer, &gvar)) baka=1; else baka=0;\r
 //     close(bakapeehandle);\r
        //hmm functions in cache system use the buffered stuff\r
 #ifdef __WATCOMC__\r
@@ -126,6 +127,9 @@ main(int argc, char *argv[])
        MM_Report(&gvar);\r
        printf("press any key to continue!\n");\r
        getch();\r
+#ifdef FILEREAD\r
+}\r
+#endif\r
        MM_FreePtr(&bigbuffer, &gvar.mm);\r
        //PM_Shutdown();\r
        CA_Shutdown(&gvar);\r