comparison include/SDL_rwops.h @ 1668:4da1ee79c9af SDL-1.3

more tweaking indent options
author Sam Lantinga <slouken@libsdl.org>
date Mon, 29 May 2006 04:04:35 +0000
parents 782fd950bd46
children
comparison
equal deleted inserted replaced
1667:1fddae038bc8 1668:4da1ee79c9af
100 } SDL_RWops; 100 } SDL_RWops;
101 101
102 102
103 /* Functions to create SDL_RWops structures from various data sources */ 103 /* Functions to create SDL_RWops structures from various data sources */
104 104
105 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile (const char *file, 105 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file,
106 const char *mode); 106 const char *mode);
107 107
108 #ifdef HAVE_STDIO_H 108 #ifdef HAVE_STDIO_H
109 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (FILE * fp, int autoclose); 109 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, int autoclose);
110 #endif 110 #endif
111 111
112 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem (void *mem, int size); 112 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size);
113 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem (const void *mem, 113 extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromConstMem(const void *mem,
114 int size); 114 int size);
115 115
116 extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW (void); 116 extern DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW(void);
117 extern DECLSPEC void SDLCALL SDL_FreeRW (SDL_RWops * area); 117 extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area);
118 118
119 #define RW_SEEK_SET 0 /* Seek from the beginning of data */ 119 #define RW_SEEK_SET 0 /* Seek from the beginning of data */
120 #define RW_SEEK_CUR 1 /* Seek relative to current read point */ 120 #define RW_SEEK_CUR 1 /* Seek relative to current read point */
121 #define RW_SEEK_END 2 /* Seek relative to the end of data */ 121 #define RW_SEEK_END 2 /* Seek relative to the end of data */
122 122
127 #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n) 127 #define SDL_RWwrite(ctx, ptr, size, n) (ctx)->write(ctx, ptr, size, n)
128 #define SDL_RWclose(ctx) (ctx)->close(ctx) 128 #define SDL_RWclose(ctx) (ctx)->close(ctx)
129 129
130 130
131 /* Read an item of the specified endianness and return in native format */ 131 /* Read an item of the specified endianness and return in native format */
132 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16 (SDL_RWops * src); 132 extern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops * src);
133 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16 (SDL_RWops * src); 133 extern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops * src);
134 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32 (SDL_RWops * src); 134 extern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops * src);
135 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32 (SDL_RWops * src); 135 extern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops * src);
136 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64 (SDL_RWops * src); 136 extern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops * src);
137 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64 (SDL_RWops * src); 137 extern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops * src);
138 138
139 /* Write an item of native format to the specified endianness */ 139 /* Write an item of native format to the specified endianness */
140 extern DECLSPEC int SDLCALL SDL_WriteLE16 (SDL_RWops * dst, Uint16 value); 140 extern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
141 extern DECLSPEC int SDLCALL SDL_WriteBE16 (SDL_RWops * dst, Uint16 value); 141 extern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
142 extern DECLSPEC int SDLCALL SDL_WriteLE32 (SDL_RWops * dst, Uint32 value); 142 extern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
143 extern DECLSPEC int SDLCALL SDL_WriteBE32 (SDL_RWops * dst, Uint32 value); 143 extern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
144 extern DECLSPEC int SDLCALL SDL_WriteLE64 (SDL_RWops * dst, Uint64 value); 144 extern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
145 extern DECLSPEC int SDLCALL SDL_WriteBE64 (SDL_RWops * dst, Uint64 value); 145 extern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
146 146
147 147
148 /* Ends C function definitions when using C++ */ 148 /* Ends C function definitions when using C++ */
149 #ifdef __cplusplus 149 #ifdef __cplusplus
150 /* *INDENT-OFF* */ 150 /* *INDENT-OFF* */