test/automated/rwops/TestSupportRWops_Generic.c
author Sam Lantinga <slouken@libsdl.org>
Sat, 18 May 2013 14:17:52 -0700
changeset 7191 75360622e65f
parent 5062 e8916fe9cfc8
permissions -rw-r--r--
File style cleanup for the SDL 2.0 release
     1 /* Generic implementation for file opening routines.
     2 * Customizations for specific platforms should go in alternative files.
     3 */
     4 
     5 /* quiet windows compiler warnings */
     6 #define _CRT_SECURE_NO_WARNINGS
     7 
     8 #include <stdio.h>
     9 #include "SDL.h"
    10 
    11 const char* RWOPS_READ = "rwops/read";
    12 const char* RWOPS_WRITE = "rwops/write";
    13 
    14 FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
    15 {
    16     return fopen(file, mode);
    17 }
    18 
    19 FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
    20 {
    21     return fopen(file, mode);
    22 }
    23 
    24 SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
    25 {
    26     return SDL_RWFromFile(file, mode);
    27 }
    28 
    29 SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
    30 {
    31     return SDL_RWFromFile(file, mode);
    32 }