Example #1
0
static UINT64 corefile_filesizeproc(void *file)
{
	long l, sz;
	l = core_ftell((core_file*)file);
	if (core_fseek((core_file*)file, 0, SEEK_END))
		return (size_t) -1;
	sz = core_ftell((core_file*)file);
	if (core_fseek((core_file*)file, l, SEEK_SET))
		return (size_t) -1;
	return (size_t) sz;
}
Example #2
0
UINT64 emu_file::tell()
{
    // load the ZIP file now if we haven't yet
    if (compressed_file_ready())
        return 0;

    // tell if we can
    if (m_file != NULL)
        return core_ftell(m_file);

    return 0;
}
Example #3
0
UINT64 emu_file::tell()
{
	// load the ZIP file now if we haven't yet
	if (m_zipfile != NULL && load_zipped_file() != FILERR_NONE)
		return 0;

	// tell if we can
	if (m_file != NULL)
		return core_ftell(m_file);

	return 0;
}