5 namespace Gorgon {
namespace IO {
18 int_type underflow() {
20 return traits_type::eof();
22 return traits_type::to_int_type(*cur);
27 return traits_type::eof();
29 return traits_type::to_int_type(*cur++);
32 int_type pbackfail(int_type ch) {
33 if(cur == begin || (ch != traits_type::eof() && ch != cur[-1]))
34 return traits_type::eof();
36 return traits_type::to_int_type(*--cur);
39 std::streamsize showmanyc() {
43 pos_type seekoff(off_type off, std::ios_base::seekdir way, std::ios_base::openmode which) {
44 if(way == std::ios_base::cur) {
46 if(cur > end) cur = end;
51 if(cur < begin) cur = begin;
56 if(cur > end) cur = end;
61 return pos_type(off_type(-1));
64 pos_type seekpos(pos_type sp, std::ios_base::openmode which) {
65 cur = begin + (int)sp;
66 if(cur > end) cur = end;