projects
/
ctsim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b6b7a4c
)
Exit on EOF
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Wed, 21 Mar 2018 21:20:28 +0000
(15:20 -0600)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Wed, 21 Mar 2018 21:20:28 +0000
(15:20 -0600)
tools/ctsimtext.cpp
patch
|
blob
|
history
diff --git
a/tools/ctsimtext.cpp
b/tools/ctsimtext.cpp
index 5a569c4d70b74429829826746587cd5e9375219c..e1695b127f666d8ab34a22ce2e811a1c05b6957a 100644
(file)
--- a/
tools/ctsimtext.cpp
+++ b/
tools/ctsimtext.cpp
@@
-145,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";