test/automated/rwops/TestSupportRWops_Generic.c
changeset 7191 75360622e65f
parent 5062 e8916fe9cfc8
equal deleted inserted replaced
7190:11612d544fcd 7191:75360622e65f
     1 /* Generic implementation for file opening routines.
     1 /* Generic implementation for file opening routines.
     2 * Customizations for specific platforms should go in alternative files.
     2 * Customizations for specific platforms should go in alternative files.
     3 */
     3 */
     4 
     4 
     5 // quiet windows compiler warnings
     5 /* quiet windows compiler warnings */
     6 #define _CRT_SECURE_NO_WARNINGS
     6 #define _CRT_SECURE_NO_WARNINGS
     7 
     7 
     8 #include <stdio.h>
     8 #include <stdio.h>
     9 #include "SDL.h"
     9 #include "SDL.h"
    10 
    10 
    11 const char* RWOPS_READ = "rwops/read";
    11 const char* RWOPS_READ = "rwops/read";
    12 const char* RWOPS_WRITE = "rwops/write";
    12 const char* RWOPS_WRITE = "rwops/write";
    13 
    13 
    14 FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
    14 FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
    15 {
    15 {
    16 	return fopen(file, mode);
    16     return fopen(file, mode);
    17 }
    17 }
    18 
    18 
    19 FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
    19 FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
    20 {
    20 {
    21 	return fopen(file, mode);
    21     return fopen(file, mode);
    22 }
    22 }
    23 
    23 
    24 SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
    24 SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
    25 {
    25 {
    26 	return SDL_RWFromFile(file, mode);
    26     return SDL_RWFromFile(file, mode);
    27 }
    27 }
    28 
    28 
    29 SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
    29 SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
    30 {
    30 {
    31 	return SDL_RWFromFile(file, mode);
    31     return SDL_RWFromFile(file, mode);
    32 }
    32 }