| 63 | } |
| 64 | |
| 65 | static s64 readVarPtr(MFILE *f) { |
| 66 | s64 offset = 0, shift = 1; |
| 67 | for (;;) { |
| 68 | int c = memfgetc(f); |
| 69 | if (c == MEOF) |
| 70 | return 0; |
| 71 | offset += (c & 0x7F) * shift; |
| 72 | if (c & 0x80) |
| 73 | break; |
| 74 | shift <<= 7; |
| 75 | offset += shift; |
| 76 | } |
| 77 | return offset; |
| 78 | } |
| 79 | |
| 80 | #ifndef MIN |
| 81 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
no test coverage detected