Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixing previous commit. Forgot to add a few files.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauppila committed Aug 10, 2011
1 parent ce0f9b1 commit 83ec8b8
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test-automation/tests/testrwops/TestSupportRWops.h
@@ -0,0 +1,12 @@
#ifndef TestSupportRWops_h
#define TestSupportRWops_h

#include <stdio.h>
#include <SDL/SDL.h>

FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode);
FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode);
SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode);
SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode);

#endif
31 changes: 31 additions & 0 deletions test/test-automation/tests/testrwops/TestSupportRWops_Generic.c
@@ -0,0 +1,31 @@
/* Generic implementation for file opening routines.
* Customizations for specific platforms should go in alternative files.
*/

// quiet windows compiler warnings
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <SDL/SDL.h>

#include "TestSupportRWops.h"

FILE* TestSupportRWops_OpenFPFromReadDir(const char *file, const char *mode)
{
return fopen(file, mode);
}

FILE* TestSupportRWops_OpenFPFromWriteDir(const char *file, const char *mode)
{
return fopen(file, mode);
}

SDL_RWops* TestSupportRWops_OpenRWopsFromReadDir(const char *file, const char *mode)
{
return SDL_RWFromFile(file, mode);
}

SDL_RWops* TestSupportRWops_OpenRWopsFromWriteDir(const char *file, const char *mode)
{
return SDL_RWFromFile(file, mode);
}
1 change: 1 addition & 0 deletions test/test-automation/tests/testrwops/read
@@ -0,0 +1 @@
Hello World!

0 comments on commit 83ec8b8

Please sign in to comment.