]> 4ch.mooo.com Git - 16.git/commitdiff
the original file combo on the exmmtest.exe seems to crash the XT. it never crashes...
authorsparky4 <sparky4@cock.li>
Fri, 18 Aug 2017 03:43:32 +0000 (22:43 -0500)
committersparky4 <sparky4@cock.li>
Fri, 18 Aug 2017 03:43:32 +0000 (22:43 -0500)
src/exmmtest.c

index 62fdd32e4a8e75082a599f6d1cb78755641fd4b8..276c1721ee07b4ad9f956cbdf68567256eed2335 100755 (executable)
@@ -87,7 +87,7 @@ void segatesuto()
 #define FILENAME_1     "data/spri/chikyuu.vrs"\r
 #define FILENAME_2     "data/test.map"\r
 #else\r
-#define FILENAME_1     "data/koishi~.pcx"\r
+#define FILENAME_1     "data/spri/chikyuu.sht"\r
 #define FILENAME_2     "data/test.map"\r
 #endif\r
 \r
@@ -105,7 +105,6 @@ main(int argc, char *argv[])
                                                                #ifdef INITBBUF\r
        INITBBUF\r
                                                                #endif\r
-       //0000mmblocktype far *scan;\r
 \r
        char bakapee1[64] = FILENAME_1;\r
        char bakapee2[64] = FILENAME_2;\r
@@ -178,18 +177,29 @@ PRINTBB; KEYP
                        printf("====================================load end===================================\n");\r
                }\r
                                                                #ifdef BUFFDUMP\r
-               printf("contents of the buffer\n[\n%.*s\n]\n", strlen(BBUFSTRING), BBUFSTRING);\r
+               {\r
+                       size_t file_s;\r
+                       FILE *fh;\r
+\r
+                       if(!w)  fh = fopen(bakapee1, "r");\r
+                       else    fh = fopen(bakapee2, "r");\r
+                       file_s = filesize(fh);\r
+                       fclose(fh);\r
+               printf("contents of the buffer\n[\n%.*s\n]\n", file_s, BBUFSTRING);\r
 #if 0\r
 //0000\r
-               scan = gvar.mm.mmhead;\r
-               while (scan->useptr != &BBUFNAME && scan)\r
-               {\r
-                       scan = scan->next;\r
-               }\r
-               printf("\n      %Fp     %Fp\n", scan->useptr, &BBUFNAME);\r
-               printf("\nstrlen of buffer = %zu\n", strlen(BBUFSTRING));\r
-               printf("length of buffer = %lu\n", scan->scan->length);\r
+//                     mmblocktype far *scan;\r
+//                     scan = gvar.mm.mmhead;\r
+//                     while (scan->useptr != &BBUFNAME && scan)\r
+//                     {\r
+//                             scan = scan->next;\r
+//                     }\r
+//                     printf("\n      %Fp     %Fp\n", scan->useptr, &BBUFNAME);\r
+                       printf("\nstrlen of buffer = %zu\n", strlen(BBUFSTRING));\r
+                       printf("length of buffer = %zu\n", file_s);\r
+//                     printf("length of buffer = %lu\n", scan->length);\r
 #endif\r
+               }\r
                                                                #endif\r
                                                                #ifdef PRINTBBDUMP\r
                PRINTBB;\r