Fake seek function
| 22 | |
| 23 | //! Fake seek function |
| 24 | ILint ILAPIENTRY iSizeSeek(ILint Offset, ILuint Mode) |
| 25 | { |
| 26 | switch (Mode) |
| 27 | { |
| 28 | case IL_SEEK_SET: |
| 29 | CurPos = Offset; |
| 30 | if (CurPos > MaxPos) |
| 31 | MaxPos = CurPos; |
| 32 | break; |
| 33 | |
| 34 | case IL_SEEK_CUR: |
| 35 | CurPos = CurPos + Offset; |
| 36 | break; |
| 37 | |
| 38 | case IL_SEEK_END: |
| 39 | CurPos = MaxPos + Offset; // Offset should be negative in this case. |
| 40 | break; |
| 41 | |
| 42 | default: |
| 43 | ilSetError(IL_INTERNAL_ERROR); // Should never happen! |
| 44 | return -1; // Error code |
| 45 | } |
| 46 | |
| 47 | if (CurPos > MaxPos) |
| 48 | MaxPos = CurPos; |
| 49 | |
| 50 | return 0; // Code for success |
| 51 | } |
| 52 | |
| 53 | ILuint ILAPIENTRY iSizeTell(void) |
| 54 | { |
nothing calls this directly
no test coverage detected