|
Size: 2270
Comment: Changed signature to match SDL_main.h.
|
Size: 2272
Comment: Changed return value from long to Sint64 to match the headers (thanks Ludovic!).
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 13: | Line 13: |
| long SDL_RWtell(struct SDL_RWops* context) | Sint64 SDL_RWtell(struct SDL_RWops* context) |
DRAFT |
SDL_RWtell
Use this function to perform a do-nothing seek to get the current offset in an SDL_RWops data stream.
Syntax
Sint64 SDL_RWtell(struct SDL_RWops* context)
Function Parameters
context |
a data stream containing the tell function ??? |
Return Value
*Returns the current offset in the stream.*
Code Examples
*
#include <stdio.h>
#include "SDL_rwops.h"
int main(int argc, char *argv[])
{
SDL_RWops *rw=SDL_RWFromFile("test.bin","r");
if(rw==NULL)
{
fprintf(stderr,"Couldn't open test.bin\n");
return(1);
}
SDL_RWseek(rw,0,RW_SEEK_END);
fprintf(stderr,"Final position in test.bin: %d\n",SDL_RWtell(rw));
SDL_RWclose(rw);
return(0);
}
*
Remarks
*
This is not a built-in function. This is a macro that calls whatever seek function that happens to be pointed to in an SDL_RWops structure.
*
Related Functions
SDL_RWclose (Macro) *
SDL_RWread (Macro) *
SDL_RWseek(Macro) *
SDL_RWwrite (Macro) *
