X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTexStream.cpp;h=3ac285ee13b15d4f3c7c53ec0311cd7b99e49a17;hb=13739f37d5208e87e97c44ef2eeba35807ddb9c5;hp=808567955c403c54a3ad2d5826fe561ab99cd366;hpb=da48080cc7869bc7134fb363df840b6ce110c8c7;p=lyx.git diff --git a/src/TexStream.cpp b/src/TexStream.cpp index 808567955c..3ac285ee13 100644 --- a/src/TexStream.cpp +++ b/src/TexStream.cpp @@ -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 @@ -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; }