X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=tools%2Fctsimtext.cpp;h=e1695b127f666d8ab34a22ce2e811a1c05b6957a;hp=a72edd75cbf6ec6ec6c2cbecca7ce65ca22f00c3;hb=728543fba0d875b2977ea2b6562df1ee4a6af8f7;hpb=1a050c98763fbbc0662731b0b76953acede6f5d7 diff --git a/tools/ctsimtext.cpp b/tools/ctsimtext.cpp index a72edd7..e1695b1 100644 --- a/tools/ctsimtext.cpp +++ b/tools/ctsimtext.cpp @@ -7,9 +7,7 @@ ** Date Started: Jan 2001 ** ** This is part of the CTSim program -** Copyright (C) 1983-2000 Kevin Rosenberg -** -** $Id$ +** Copyright (C) 1983-2009 Kevin Rosenberg ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -147,6 +145,10 @@ ctsimtext_main (int argc, char * argv[]) char* pszInputLine = new char [s_MaxLineLength+1]; std::cout << szPrompt; std::cin.getline (pszInputLine, s_MaxLineLength); + if (std::cin.eof()) { + std::cout << "\n"; + break; + } #ifdef DEBUG std::cout << "#" << pszInputLine << "#\n";