archivers/dir.c
changeset 28 529214f57d1b
parent 23 bd6ba9c8717c
child 29 91b45664ec85
equal deleted inserted replaced
27:e1d3292769b2 28:529214f57d1b
    68 {
    68 {
    69     return(fseek((FILE *) (handle->opaque), offset, SEEK_SET) == 0);
    69     return(fseek((FILE *) (handle->opaque), offset, SEEK_SET) == 0);
    70 } /* DIR_seek */
    70 } /* DIR_seek */
    71 
    71 
    72 
    72 
       
    73 static int DIR_fileLength(FileHandle *handle)
       
    74 {
       
    75     return(__PHYSFS_platformFileLength((FILE *) (handle->opaque)));
       
    76 } /* DIR_fileLength */
       
    77 
       
    78 
    73 static int DIR_fileClose(FileHandle *handle)
    79 static int DIR_fileClose(FileHandle *handle)
    74 {
    80 {
    75     FILE *h = (FILE *) (handle->opaque);
    81     FILE *h = (FILE *) (handle->opaque);
    76 
    82 
    77     /*
    83     /*
   281     DIR_read,       /* read() method      */
   287     DIR_read,       /* read() method      */
   282     NULL,           /* write() method     */
   288     NULL,           /* write() method     */
   283     DIR_eof,        /* eof() method       */
   289     DIR_eof,        /* eof() method       */
   284     DIR_tell,       /* tell() method      */
   290     DIR_tell,       /* tell() method      */
   285     DIR_seek,       /* seek() method      */
   291     DIR_seek,       /* seek() method      */
   286     DIR_fileClose,  /* fileClose() method */
   292     DIR_fileLength, /* fileLength() method */
       
   293     DIR_fileClose   /* fileClose() method */
   287 };
   294 };
   288 
   295 
   289 
   296 
   290 static const FileFunctions __PHYSFS_FileFunctions_DIRW =
   297 static const FileFunctions __PHYSFS_FileFunctions_DIRW =
   291 {
   298 {
   292     NULL,           /* read() method      */
   299     NULL,           /* read() method       */
   293     DIR_write,      /* write() method     */
   300     DIR_write,      /* write() method      */
   294     DIR_eof,        /* eof() method       */
   301     DIR_eof,        /* eof() method        */
   295     DIR_tell,       /* tell() method      */
   302     DIR_tell,       /* tell() method       */
   296     DIR_seek,       /* seek() method      */
   303     DIR_seek,       /* seek() method       */
   297     DIR_fileClose   /* fileClose() method */
   304     DIR_fileLength, /* fileLength() method */
       
   305     DIR_fileClose   /* fileClose() method  */
   298 };
   306 };
   299 
   307 
   300 
   308 
   301 const DirFunctions __PHYSFS_DirFunctions_DIR =
   309 const DirFunctions __PHYSFS_DirFunctions_DIR =
   302 {
   310 {