EMAN2
Functions
portable_fileio.h File Reference
#include <cstdio>
#include <sys/types.h>
Include dependency graph for portable_fileio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int portable_fseek (FILE *fp, off_t offset, int whence)
 
off_t portable_ftell (FILE *fp)
 

Function Documentation

◆ portable_fseek()

int portable_fseek ( FILE *  fp,
off_t  offset,
int  whence 
)
inline

Definition at line 39 of file portable_fileio.h.

40{
41#if defined(HAVE_FSEEKO)
42 return fseeko(fp, offset, whence);
43#elif defined(HAVE_FSEEK64)
44 return fseek64(fp, offset, whence);
45#elif defined(__BEOS__)
46 return _fseek(fp, offset, whence);
47#else
48 return fseek(fp, offset, whence);
49#endif
50}

Referenced by EMAN::EMUtil::exclude_numbers_io(), EMAN::PifIO::fseek_to(), EMAN::EMUtil::get_image_type(), EMAN::SerIO::get_nimg(), EMAN::EMUtil::process_numbers_io(), EMAN::EMUtil::process_region_io(), EMAN::Gatan::TagGroup::read(), EMAN::Gatan::TagData::read_array_data(), EMAN::GatanDM4::TagData::read_array_data(), EMAN::MrcIO::read_fei_header(), EMAN::GatanDM4::TagEntry::read_tag_entry(), EMAN::MrcIO::update_stats(), EMAN::SpiderIO::write_single_data(), and EMAN::SpiderIO::write_single_header().

◆ portable_ftell()

off_t portable_ftell ( FILE *  fp)
inline

Definition at line 52 of file portable_fileio.h.

53{
54#if defined(HAVE_FTELLO)
55 return ftello(fp);
56#elif defined(HAVE_FTELL64)
57 return ftell64(fp);
58#else
59 return ftell(fp);
60#endif
61}

Referenced by EMAN::EMUtil::get_image_type().