annotate test/automated/rwops/TestSupportRWops_Generic.c @ 5258:9e70b360f423

Fixed creating the window on Mac OS X.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Feb 2011 12:17:40 -0800
parents e8916fe9cfc8
children
rev   line source
4451
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
1 /* Generic implementation for file opening routines.
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
2 * Customizations for specific platforms should go in alternative files.
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
3 */
4884
27ab20a36eba - added directx include path to VS2008 solution
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 4451
diff changeset
4
5062
e8916fe9cfc8 Fixed bug #925
Sam Lantinga <slouken@libsdl.org>
parents: 4884
diff changeset
5 // quiet windows compiler warnings
4884
27ab20a36eba - added directx include path to VS2008 solution
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 4451
diff changeset
6 #define _CRT_SECURE_NO_WARNINGS
27ab20a36eba - added directx include path to VS2008 solution
Andreas Schiffler <aschiffler@ferzkopp.net>
parents: 4451
diff changeset
7
4451
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
8 #include <stdio.h>
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
9 #include "SDL.h"
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
10
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
11 const char* RWOPS_READ = "rwops/read";
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
12 const char* RWOPS_WRITE = "rwops/write";
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
13
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
14 FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
15 {
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
16 return fopen(file, mode);
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
17 }
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
18
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
19 FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
20 {
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
21 return fopen(file, mode);
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
22 }
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
23
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
24 SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
25 {
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
26 return SDL_RWFromFile(file, mode);
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
27 }
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
28
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
29 SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
30 {
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
31 return SDL_RWFromFile(file, mode);
033c455bbe99 Refactored automated rwops tests so read and write directories can be more easily customized.
Eric Wing <ewing . public |-at-| gmail . com>
parents:
diff changeset
32 }