- data = Bioskey();
- if(data) {
- char input[256];
- if(fgets(input, 255, stdin) == NULL)
- strcpy(input, "quit\n");
- if(strncmp(input, "quit", 4) == 0) {
- AbortSearch = true;
- PonderSearch = false;
- Quit = true;
- }
- else if(strncmp(input, "stop", 4) == 0) {
- AbortSearch = true;
- PonderSearch = false;
- }
- else if(strncmp(input, "ponderhit", 9) == 0)
- ponderhit();
- }
+ if (Bioskey())
+ {
+ // We are line oriented, don't read single chars
+ std::string command;
+ if (!std::getline(std::cin, command))
+ command = "quit";