comparison include/SDL_rwops.h @ 1354:22f39393668a

Fixed build problem with SDL_string.c Officially deprecated SDL_byteorder.h, SDL_getenv.h and SDL_types.h Moved endian-related SDL_rwops code into SDL_rwops.c
author Sam Lantinga <slouken@libsdl.org>
date Thu, 09 Feb 2006 09:38:05 +0000
parents 450721ad5436
children 67114343400d
comparison
equal deleted inserted replaced
1353:7ba544e2888d 1354:22f39393668a
25 */ 25 */
26 26
27 #ifndef _SDL_RWops_h 27 #ifndef _SDL_RWops_h
28 #define _SDL_RWops_h 28 #define _SDL_RWops_h
29 29
30 #include "SDL_config.h" 30 #include "SDL_stdinc.h"
31 31
32 #ifdef HAVE_STDIO_H 32 #ifndef DISABLE_FILE
33 #include <stdio.h>
34 #endif
35
36 #include "SDL_types.h"
37
38 #include "begin_code.h" 33 #include "begin_code.h"
39 /* Set up for C function definitions, even when using C++ */ 34 /* Set up for C function definitions, even when using C++ */
40 #ifdef __cplusplus 35 #ifdef __cplusplus
41 extern "C" { 36 extern "C" {
42 #endif 37 #endif
110 #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n) 105 #define SDL_RWread(ctx, ptr, size, n) (ctx)->read(ctx, ptr, size, n)
111 #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) 106 #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
112 #define SDL_RWclose(ctx) (ctx)->close(ctx) 107 #define SDL_RWclose(ctx) (ctx)->close(ctx)
113 108
114 109
110 /* Read an item of the specified endianness and return in native format */
111 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);
112 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);
113 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);
114 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);
115 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);
116 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);
117
118 /* Write an item of native format to the specified endianness */
119 extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);
120 extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);
121 extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);
122 extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);
123 extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);
124 extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);
125
126
115 /* Ends C function definitions when using C++ */ 127 /* Ends C function definitions when using C++ */
116 #ifdef __cplusplus 128 #ifdef __cplusplus
117 } 129 }
118 #endif 130 #endif
119 #include "close_code.h" 131 #include "close_code.h"
132 #endif /* !DISABLE_FILE */
120 133
121 #endif /* _SDL_RWops_h */ 134 #endif /* _SDL_RWops_h */