extras/physfsrwops.c
author Ryan C. Gordon <icculus@icculus.org>
Sat, 16 Mar 2002 03:51:09 +0000
changeset 123 53305c50c541
child 132 b53fa5093749
permissions -rw-r--r--
Initial add.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
123
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/*
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
 * This code provides a glue layer between PhysicsFS and Simple Directmedia
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
 *  Layer's (SDL) RWops i/o abstraction.
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
 *
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
 * License: this code is public domain. I make no warranty that it is useful,
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
 *  correct, harmless, or environmentally safe.
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
 *
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     8
 * This particular file may be used however you like, including copying it
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
 *  verbatim into a closed-source project, exploiting it commercially, and
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
 *  removing any trace of my name from the source (although I hope you won't
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
 *  do that). I welcome enhancements and corrections to this file, but I do
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
 *  not require you to send me patches if you make changes.
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
 *
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    14
 * Unless otherwise stated, the rest of PhysicsFS falls under the GNU Lesser
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
 *  General Public License: http://www.gnu.org/licenses/lgpl.txt
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
 *
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    17
 * SDL falls under the LGPL, too. You can get SDL at http://www.libsdl.org/
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    18
 *
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
 *  This file was written by Ryan C. Gordon. (icculus@clutteredmind.org).
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
 */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
#include <stdio.h>  /* used for SEEK_SET, SEEK_CUR, SEEK_END ... */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
#include "physfsrwops.h"
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
static int physfsrwops_seek(SDL_RWops *rw, int offset, int whence)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
    int pos = 0;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
    if (whence == SEEK_SET)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
        pos = offset;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
    } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
    else if (whence == SEEK_CUR)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
        int current = PHYSFS_tell(handle);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
        if (current == -1)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
        {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
            SDL_SetError("Can't find position in file: %s",
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
                          PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
            return(-1);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
        } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
        if (offset == 0)  /* this is a "tell" call. We're done. */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
            return(offset);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
        pos = current + offset;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
    } /* else if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
    else if (whence == SEEK_END)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
        int len = PHYSFS_fileLength(handle);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
        if (len == -1)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
        {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
            SDL_SetError("Can't find end of file: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
            return(-1);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
        } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
        pos = len + offset;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
    } /* else if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
    else
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
        SDL_SetError("Invalid 'whence' parameter.");
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
        return(-1);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
    } /* else */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
    if (!PHYSFS_seek(handle, pos))
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
        return(-1);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
    } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
    return(pos);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
} /* physfsrwops_seek */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
static int physfsrwops_read(SDL_RWops *rw, void *ptr, int size, int maxnum)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
    int rc = PHYSFS_read(handle, ptr, size, maxnum);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
    if (rc != maxnum)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
        if (!PHYSFS_eof(handle)) /* not EOF? Must be an error. */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
            SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    87
    } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    88
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
    return(rc);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
} /* physfsrwops_read */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
static int physfsrwops_write(SDL_RWops *rw, const void *ptr, int size, int num)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
    int rc = PHYSFS_write(handle, ptr, size, num);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
    if (rc != num)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
    return(rc);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
} /* physfsrwops_write */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
static int physfsrwops_close(SDL_RWops *rw)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
    PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
    if (!PHYSFS_close(handle))
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   110
        return(-1);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
    } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   113
    SDL_FreeRW(rw);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   114
    return(0);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   115
} /* physfsrwops_close */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   116
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   117
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   118
static SDL_RWops *create_rwops(PHYSFS_file *handle)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   119
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   120
    SDL_RWops *retval = NULL;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   121
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   122
    if (handle == NULL)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   123
        SDL_SetError("PhysicsFS error: %s", PHYSFS_getLastError());
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   124
    else
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   125
    {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   126
        retval = SDL_AllocRW();
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   127
        if (retval != NULL)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   128
        {
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
            retval->seek  = physfsrwops_seek;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
            retval->read  = physfsrwops_read;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   131
            retval->write = physfsrwops_write;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   132
            retval->close = physfsrwops_close;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   133
            retval->hidden.unknown.data1 = handle;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   134
        } /* if */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
    } /* else */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
    return(retval);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
} /* create_rwops */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
SDL_RWops *PHYSFSRWOPS_makeRWops(PHYSFS_file *handle)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   143
    SDL_RWops *retval = NULL;
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   144
    if (handle == NULL)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   145
        SDL_SetError("NULL pointer passed to PHYSFSRWOPS_makeRWops().");
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   146
    else
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   147
        retval = create_rwops(handle);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   148
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   149
    return(retval);
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   150
} /* PHYSFSRWOPS_makeRWops */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   151
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   152
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   153
SDL_RWops *PHYSFSRWOPS_openRead(const char *fname)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   154
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   155
    return(create_rwops(PHYSFS_openRead(fname)));
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   156
} /* PHYSFSRWOPS_openRead */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   157
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   158
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   159
SDL_RWops *PHYSFSRWOPS_openWrite(const char *fname)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   160
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   161
    return(create_rwops(PHYSFS_openWrite(fname)));
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   162
} /* PHYSFSRWOPS_openWrite */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   163
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   164
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   165
SDL_RWops *PHYSFSRWOPS_openAppend(const char *fname)
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   166
{
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   167
    return(create_rwops(PHYSFS_openAppend(fname)));
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   168
} /* PHYSFSRWOPS_openAppend */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   169
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   170
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   171
/* end of physfsrwops.c ... */
53305c50c541 Initial add.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   172