26 #if defined (HAVE_CONFIG_H)
38 #if ! defined (SEEK_SET)
42 #if ! defined (SEEK_CUR)
46 #if ! defined (SEEK_END)
61 return (c != traits_type::eof ()) ? std::fputc (c,
m_f) :
flush ();
63 return traits_type::not_eof (c);
67 c_file_ptr_buf::underflow_common (
bool bump)
73 if (! bump && c != traits_type::eof ())
79 return traits_type::eof ();
85 return ((c != traits_type::eof () &&
m_f)
86 ? ungetc (c,
m_f) : traits_type::not_eof (c));
93 return std::fwrite (s, 1,
n,
m_f);
102 return std::fread (s, 1,
n,
m_f);
108 seekdir_to_whence (std::ios::seekdir dir)
110 return (dir == std::ios::beg
118 std::ios::seekdir dir,
155 return m_f ? std::fflush (
m_f) : traits_type::eof ();
189 return std::fclose (
m_f);
192 #if defined (HAVE_ZLIB)
205 return (c != traits_type::eof ()) ? gzputc (
m_f, c) :
flush ();
207 return traits_type::not_eof (c);
211 c_zfile_ptr_buf::underflow_common (
bool bump)
217 if (! bump && c != traits_type::eof ())
223 return traits_type::eof ();
229 return ((c != traits_type::eof () &&
m_f)
230 ? gzungetc (c,
m_f) : traits_type::not_eof (c));
237 return gzwrite (
m_f, s,
n);
246 return gzread (
m_f, s,
n);
280 return m_f ? gzflush (
m_f, 0) : traits_type::eof ();
301 OCTAVE_END_NAMESPACE(
octave)
std::streampos seekoff(std::streamoff, std::ios::seekdir, std::ios::openmode=std::ios::in|std::ios::out)
std::streamsize xsgetn(char *, std::streamsize)
int_type overflow(int_type)
std::streamsize xsputn(const char *, std::streamsize)
std::streampos seekpos(std::streampos, std::ios::openmode=std::ios::in|std::ios::out)
static int file_close(FILE *m_f)
int seek(off_t offset, int origin)
std::streambuf::int_type int_type
int_type pbackfail(int_type)
std::streampos seekpos(std::streampos, std::ios::openmode=std::ios::in|std::ios::out)
std::streamsize xsgetn(char *, std::streamsize)
std::streampos seekoff(std::streamoff, std::ios::seekdir, std::ios::openmode=std::ios::in|std::ios::out)
int_type pbackfail(int_type)
int_type overflow(int_type)
std::streamsize xsputn(const char *, std::streamsize)
std::streambuf::int_type int_type
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
int octave_fseeko_wrapper(FILE *fp, off_t offset, int whence)
off_t octave_ftello_wrapper(FILE *fp)