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
ewing@4451
     1
/* Generic implementation for file opening routines.
ewing@4451
     2
* Customizations for specific platforms should go in alternative files.
ewing@4451
     3
*/
aschiffler@4884
     4
slouken@7191
     5
/* quiet windows compiler warnings */
aschiffler@4884
     6
#define _CRT_SECURE_NO_WARNINGS
aschiffler@4884
     7
ewing@4451
     8
#include <stdio.h>
ewing@4451
     9
#include "SDL.h"
ewing@4451
    10
ewing@4451
    11
const char* RWOPS_READ = "rwops/read";
ewing@4451
    12
const char* RWOPS_WRITE = "rwops/write";
ewing@4451
    13
ewing@4451
    14
FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
ewing@4451
    15
{
slouken@7191
    16
    return fopen(file, mode);
ewing@4451
    17
}
ewing@4451
    18
ewing@4451
    19
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
ewing@4451
    20
{
slouken@7191
    21
    return fopen(file, mode);
ewing@4451
    22
}
ewing@4451
    23
ewing@4451
    24
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
ewing@4451
    25
{
slouken@7191
    26
    return SDL_RWFromFile(file, mode);
ewing@4451
    27
}
ewing@4451
    28
ewing@4451
    29
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
ewing@4451
    30
{
slouken@7191
    31
    return SDL_RWFromFile(file, mode);
ewing@4451
    32
}