]> git.lyx.org Git - lyx.git/blobdiff - src/TexStream.cpp
Natbib authoryear uses (Ref1; Ref2) by default.
[lyx.git] / src / TexStream.cpp
index 808567955c403c54a3ad2d5826fe561ab99cd366..dc1c43c2a9846c318147e0d24ce9d4092ebc288c 100644 (file)
@@ -4,6 +4,9 @@
  * Licence details can be found in the file COPYING.
  *
  * Full author contact details are available in file CREDITS.
+ *
+ * Inspired by Dietmar Kuehl's prefix iostreams found on
+ * http://www.inf.uni-konstanz.de/~kuehl/
  */
 
 #include <config.h>
@@ -31,7 +34,7 @@ public:
        int column() const { return column_; }
 
 protected:
-       int overflow(int);
+       int_type overflow(int_type);
        int sync();
 
 private:
@@ -49,7 +52,7 @@ TexStreamBuffer::TexStreamBuffer(TexStreamBase *sb, TexRow * texrow)
        setg(0, 0, 0);
 }
 
-int TexStreamBuffer::overflow(int c)
+TexStreamBuffer::int_type TexStreamBuffer::overflow(TexStreamBuffer::int_type c)
 {
        if (c == '\n') {
                ++line_;
@@ -101,13 +104,13 @@ int TexStream::line() const
 
 int main(int argc, char *argv[])
 {
-       TexStream out(std::cout.rdbuf());
+       TexStream out(cout.rdbuf());
        char c;
-       while (std::cin) {
-               if (std::cin.get(c))
+       while (cin) {
+               if (cin.get(c))
                        out.put(c);
        }
-       std::cout << "line count: " << out.line() << std::endl;
+       cout << "line count: " << out.line() << endl;
 
        return 0;
 }