]> git.lyx.org Git - lyx.git/blobdiff - src/TexStream.cpp
mention source of inspiration
[lyx.git] / src / TexStream.cpp
index 9f2fa6d1d107b264db07e4512d07cb948484c65d..2f46270407146663061b43d98d6eea93bf114bb3 100644 (file)
@@ -1,12 +1,15 @@
-/**\r
- * \file TexStream.cpp\r
- * This file is part of LyX, the document processor.\r
- * Licence details can be found in the file COPYING.\r
- *\r
- * Full author contact details are available in file CREDITS.\r
- */\r
-\r
-#include <config.h>\r
+/**
+ * \file TexStream.cpp
+ * This file is part of LyX, the document processor.
+ * 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>
 
 #include "TexStream.h"
 #include "TexRow.h"
@@ -26,16 +29,16 @@ namespace lyx {
 class TexStreamBuffer : public TexStreamBase
 {
 public:
-  TexStreamBuffer(TexStreamBase * sbuf, TexRow * texrow);
+       TexStreamBuffer(TexStreamBase * sbuf, TexRow * texrow);
        int line() const { return line_; }
        int column() const { return column_; }
 
 protected:
-  int overflow(int);
-  int sync();
+       int overflow(int);
+       int sync();
 
 private:
-  TexStreamBase * sbuf_; 
+       TexStreamBase * sbuf_; 
        TexRow * texrow_;
        int column_;
        int line_;
@@ -45,8 +48,8 @@ private:
 TexStreamBuffer::TexStreamBuffer(TexStreamBase *sb, TexRow * texrow)
   : sbuf_(sb), texrow_(texrow), line_(0)
 {
-  setp(0, 0);
-  setg(0, 0, 0);
+       setp(0, 0);
+       setg(0, 0, 0);
 }
 
 int TexStreamBuffer::overflow(int c)
@@ -63,8 +66,8 @@ int TexStreamBuffer::overflow(int c)
 
 int TexStreamBuffer::sync()
 {
-  sbuf_->pubsync();
-  return 0;
+       sbuf_->pubsync();
+       return 0;
 }
 
   
@@ -109,7 +112,7 @@ int main(int argc, char *argv[])
        }
        std::cout << "line count: " << out.line() << std::endl;
 
-  return 0;
+       return 0;
 }
 
 #endif