24 #include "ppl-config.h"
27 #include "assertions.hh"
47 const size_t r = fread(s, 1, static_cast<size_t>(n),
fp);
54 return static_cast<std::streamsize
>(r);
59 const int_type eof = traits_type::eof();
62 return traits_type::eq_int_type(u, eof) ? eof : ungetc(u,
fp);
68 const size_t r = fwrite(s, 1, static_cast<size_t>(n),
fp);
69 return static_cast<std::streamsize
>(r);
74 const int_type eof = traits_type::eof();
75 if (traits_type::eq_int_type(c, eof)) {
76 return (fflush(
fp) != 0) ? eof : traits_type::not_eof(c);
virtual int_type uflow()
In case of underflow, gets a character and advances the next pointer.
virtual int_type pbackfail(int_type c=traits_type::eof())
Puts character back in case of backup underflow.
virtual std::streamsize xsgetn(char_type *s, std::streamsize n)
Gets a sequence of characters.
FILE * fp
The encapsulated stdio file.
virtual int_type underflow()
Gets a character in case of underflow.
char char_type
Character type of the streambuf.
virtual std::streamsize xsputn(const char_type *s, std::streamsize n)
Writes a sequence of characters.
virtual int_type overflow(int_type c)
Writes a character in case of overflow.
The entire library is confined to this namespace.
int_type unget_char_buf
Buffer for the last character read.
virtual int sync()
Synchronizes the stream buffer.
traits_type::int_type int_type
Integer type of the streambuf.