summaryrefslogtreecommitdiff
path: root/src/pstream.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-11 16:03:50 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-11 17:02:25 -0400
commitdea2aed0b509734ec4e1cd163ac2a4f013000da2 (patch)
tree7908da76c67ae5172882306a319bf26df81b73b4 /src/pstream.h
parentd580079df892c30d023b3211d6c4611c17b11f8f (diff)
downloadfork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.gz
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.tar.bz2
fork-ledger-dea2aed0b509734ec4e1cd163ac2a4f013000da2.zip
Untabified all source files
Diffstat (limited to 'src/pstream.h')
-rw-r--r--src/pstream.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/pstream.h b/src/pstream.h
index bba2845e..5fac20bd 100644
--- a/src/pstream.h
+++ b/src/pstream.h
@@ -53,44 +53,44 @@ class ptristream : public std::istream
ptrinbuf& operator=(const ptrinbuf&);
protected:
- char * ptr;
+ char * ptr;
std::size_t len;
public:
ptrinbuf(char * _ptr, std::size_t _len) : ptr(_ptr), len(_len) {
if (*ptr && len == 0)
- len = std::strlen(ptr);
+ len = std::strlen(ptr);
- setg(ptr, // beginning of putback area
- ptr, // read position
- ptr+len); // end position
+ setg(ptr, // beginning of putback area
+ ptr, // read position
+ ptr+len); // end position
}
protected:
virtual int_type underflow() {
// is read position before end of buffer?
if (gptr() < egptr())
- return traits_type::to_int_type(*gptr());
+ return traits_type::to_int_type(*gptr());
else
- return EOF;
+ return EOF;
}
virtual pos_type seekoff(off_type off, ios_base::seekdir way,
- ios_base::openmode)
+ ios_base::openmode)
{
switch (way) {
case std::ios::cur:
- setg(ptr, gptr()+off, ptr+len);
- break;
+ setg(ptr, gptr()+off, ptr+len);
+ break;
case std::ios::beg:
- setg(ptr, ptr+off, ptr+len);
- break;
+ setg(ptr, ptr+off, ptr+len);
+ break;
case std::ios::end:
- setg(ptr, egptr()+off, ptr+len);
- break;
+ setg(ptr, egptr()+off, ptr+len);
+ break;
default:
- return pos_type(off_type(-1));
+ return pos_type(off_type(-1));
}
return pos_type(gptr() - ptr);
}