Add support for EOF on input

Also remove unneeded indent in Windows-only blocks.
develop
Jared Adams 2011-05-05 20:10:45 -06:00
parent cfd5a25400
commit 2e47e1f039
1 changed files with 11 additions and 6 deletions

@ -184,6 +184,11 @@ int main (int argc, char** argv)
string command = "";
cout <<"[" << mode << ":" << brushname << ":" << amount << ":" << flowmode << ":" << setmode << "]# ";
getline(cin, command);
if (std::cin.eof())
{
command = "q";
std::cout << std::endl; // No newline from the user here!
}
if(command=="help" || command == "?")
{
cout << "Modes:" << endl