Get rid of unused filestream_get_ext

This commit is contained in:
twinaphex 2017-12-11 17:42:00 +01:00
parent 43c9bb374d
commit ad70bb9866
2 changed files with 0 additions and 19 deletions

View File

@ -45,8 +45,6 @@ typedef struct RFILE RFILE;
int64_t filestream_get_size(RFILE *stream);
const char *filestream_get_ext(RFILE *stream);
/**
* filestream_open:
* @path : path to file

View File

@ -86,7 +86,6 @@
struct RFILE
{
unsigned hints;
char *ext;
int64_t size;
FILE *fp;
@ -111,13 +110,6 @@ struct RFILE
char *buf;
};
const char *filestream_get_ext(RFILE *stream)
{
if (!stream)
return NULL;
return stream->ext;
}
int64_t filestream_get_size(RFILE *stream)
{
if (!stream)
@ -278,12 +270,6 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
#endif
}
{
const char *ld = (const char*)strrchr(path, '.');
if (ld)
stream->ext = strdup(ld + 1);
}
filestream_set_size(stream);
return stream;
@ -493,9 +479,6 @@ int filestream_close(RFILE *stream)
if (!stream)
goto error;
if (!string_is_empty(stream->ext))
free(stream->ext);
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
{
if (stream->fp)