15 if (interrupting) {
return -1; }
16 while (inputCache.size() < (
unsigned int)b.
length()) {
17 std::cout <<
"*** CHECK OTHER TERMINAL FOR SOMETHING TO TYPE:"
21 std::cin.getline(buf,1000);
22 needInterrupt =
false;
23 if (interrupting) {
return -1; }
26 std::cout <<
"Thank you" << std::endl;
28 memcpy(b.
get(),inputCache.c_str(),b.
length());
29 inputCache = inputCache.substr(b.
length());
35 while (outputCache.find(
'\n')!=std::string::npos) {
36 size_t idx = outputCache.find(
'\n');
38 show.append(outputCache.c_str(),idx);
39 std::cout <<
"*** TYPE THIS ON THE OTHER TERMINAL: " << show << std::endl;
40 outputCache = outputCache.substr(idx+1);
41 SystemClock::delaySystem(1);