1
0
mirror of https://github.com/vivier/EMILE.git synced 2025-01-02 06:30:40 +00:00
EMILE/libblock/block_fstat.c

22 lines
319 B
C

/*
*
* (c) 2005 Laurent Vivier <Laurent@lvivier.info>
*
*/
#include "libblock.h"
#include "block.h"
int block_fstat(stream_FILE *_file, struct stream_stat *buf)
{
block_FILE *file = (block_FILE*)_file;
if (buf == NULL)
return -1;
if (file->size == -1)
return -1;
buf->st_size = file->size;
return 0;
}