src/file/SDL_rwops.c
branchSDL-1.3
changeset 1659 14717b52abc0
parent 1465 8dfa9a6d69a5
child 1662 782fd950bd46
child 1895 c121d94672cb
child 3975 e85e65aec22f
     1.1 --- a/src/file/SDL_rwops.c	Mon May 01 06:58:33 2006 +0000
     1.2 +++ b/src/file/SDL_rwops.c	Wed May 17 08:18:28 2006 +0000
     1.3 @@ -43,7 +43,7 @@
     1.4  #define INVALID_SET_FILE_POINTER 0xFFFFFFFF
     1.5  #endif
     1.6  
     1.7 -static int win32_file_open(SDL_RWops *context, const char *filename, const char *mode)
     1.8 +static int SDLCALL win32_file_open(SDL_RWops *context, const char *filename, const char *mode)
     1.9  {
    1.10  #ifndef _WIN32_WCE
    1.11  	UINT	old_error_mode;
    1.12 @@ -108,7 +108,7 @@
    1.13  	
    1.14  	return 0; /* ok */
    1.15  }
    1.16 -static int win32_file_seek(SDL_RWops *context, int offset, int whence)
    1.17 +static int SDLCALL win32_file_seek(SDL_RWops *context, int offset, int whence)
    1.18  {
    1.19  	DWORD win32whence;
    1.20  	int   file_pos;
    1.21 @@ -138,7 +138,7 @@
    1.22  	SDL_Error(SDL_EFSEEK);
    1.23  	return -1; /* error */
    1.24  }
    1.25 -static int win32_file_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.26 +static int SDLCALL win32_file_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.27  {
    1.28  	
    1.29  	int		total_bytes; 
    1.30 @@ -156,7 +156,7 @@
    1.31  	nread = byte_read/size;
    1.32  	return nread;
    1.33  }
    1.34 -static int win32_file_write(SDL_RWops *context, const void *ptr, int size, int num)
    1.35 +static int SDLCALL win32_file_write(SDL_RWops *context, const void *ptr, int size, int num)
    1.36  {
    1.37  	
    1.38  	int		total_bytes; 
    1.39 @@ -183,7 +183,7 @@
    1.40  	nwritten = byte_written/size;
    1.41  	return nwritten;
    1.42  }
    1.43 -static int win32_file_close(SDL_RWops *context)
    1.44 +static int SDLCALL win32_file_close(SDL_RWops *context)
    1.45  {
    1.46  	
    1.47  	if ( context ) {								
    1.48 @@ -201,7 +201,7 @@
    1.49  
    1.50  /* Functions to read/write stdio file pointers */
    1.51  
    1.52 -static int stdio_seek(SDL_RWops *context, int offset, int whence)
    1.53 +static int SDLCALL stdio_seek(SDL_RWops *context, int offset, int whence)
    1.54  {
    1.55  	if ( fseek(context->hidden.stdio.fp, offset, whence) == 0 ) {
    1.56  		return(ftell(context->hidden.stdio.fp));
    1.57 @@ -210,7 +210,7 @@
    1.58  		return(-1);
    1.59  	}
    1.60  }
    1.61 -static int stdio_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.62 +static int SDLCALL stdio_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.63  {
    1.64  	size_t nread;
    1.65  
    1.66 @@ -220,7 +220,7 @@
    1.67  	}
    1.68  	return(nread);
    1.69  }
    1.70 -static int stdio_write(SDL_RWops *context, const void *ptr, int size, int num)
    1.71 +static int SDLCALL stdio_write(SDL_RWops *context, const void *ptr, int size, int num)
    1.72  {
    1.73  	size_t nwrote;
    1.74  
    1.75 @@ -230,7 +230,7 @@
    1.76  	}
    1.77  	return(nwrote);
    1.78  }
    1.79 -static int stdio_close(SDL_RWops *context)
    1.80 +static int SDLCALL stdio_close(SDL_RWops *context)
    1.81  {
    1.82  	if ( context ) {
    1.83  		if ( context->hidden.stdio.autoclose ) {
    1.84 @@ -245,7 +245,7 @@
    1.85  
    1.86  /* Functions to read/write memory pointers */
    1.87  
    1.88 -static int mem_seek(SDL_RWops *context, int offset, int whence)
    1.89 +static int SDLCALL mem_seek(SDL_RWops *context, int offset, int whence)
    1.90  {
    1.91  	Uint8 *newpos;
    1.92  
    1.93 @@ -272,7 +272,7 @@
    1.94  	context->hidden.mem.here = newpos;
    1.95  	return(context->hidden.mem.here-context->hidden.mem.base);
    1.96  }
    1.97 -static int mem_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.98 +static int SDLCALL mem_read(SDL_RWops *context, void *ptr, int size, int maxnum)
    1.99  {
   1.100  	size_t total_bytes;
   1.101  	size_t mem_available;
   1.102 @@ -292,7 +292,7 @@
   1.103  
   1.104  	return (total_bytes / size);
   1.105  }
   1.106 -static int mem_write(SDL_RWops *context, const void *ptr, int size, int num)
   1.107 +static int SDLCALL mem_write(SDL_RWops *context, const void *ptr, int size, int num)
   1.108  {
   1.109  	if ( (context->hidden.mem.here + (num*size)) > context->hidden.mem.stop ) {
   1.110  		num = (context->hidden.mem.stop-context->hidden.mem.here)/size;
   1.111 @@ -301,12 +301,12 @@
   1.112  	context->hidden.mem.here += num*size;
   1.113  	return(num);
   1.114  }
   1.115 -static int mem_writeconst(SDL_RWops *context, const void *ptr, int size, int num)
   1.116 +static int SDLCALL mem_writeconst(SDL_RWops *context, const void *ptr, int size, int num)
   1.117  {
   1.118  	SDL_SetError("Can't write to read-only memory");
   1.119  	return(-1);
   1.120  }
   1.121 -static int mem_close(SDL_RWops *context)
   1.122 +static int SDLCALL mem_close(SDL_RWops *context)
   1.123  {
   1.124  	if ( context ) {
   1.125  		SDL_FreeRW(context);