|
|
|
|
|
|
|
|
#include <fstream> // debug
|
|
|
#include <fstream> // debug
|
|
|
#endif
|
|
|
#endif
|
|
|
#include <string>
|
|
|
#include <string>
|
|
|
|
|
|
#include <vector>
|
|
|
#include <thread>
|
|
|
#include <thread>
|
|
|
#include <chrono>
|
|
|
#include <chrono>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<< std::endl;
|
|
|
<< std::endl;
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
std::string temp;
|
|
|
|
|
|
|
|
|
int const BufferSize = 512;
|
|
|
|
|
|
|
|
|
std::cin >> temp;
|
|
|
|
|
|
|
|
|
std::vector<char> readBuffer;
|
|
|
|
|
|
readBuffer.resize(BufferSize, 0);
|
|
|
|
|
|
|
|
|
|
|
|
std::cin.read(&(readBuffer[0]), BufferSize);
|
|
|
|
|
|
|
|
|
|
|
|
if (!std::cin.eof()) {
|
|
|
|
|
|
|
|
|
if (std::cin.eof()) {
|
|
|
|
|
|
#ifdef DEBUG_MESSAGES
|
|
|
#ifdef DEBUG_MESSAGES
|
|
|
log << "stdin was closed." << std::endl;
|
|
|
|
|
|
|
|
|
log << "stdin was not closed." << std::endl;
|
|
|
#endif
|
|
|
#endif
|
|
|
returnStatus = 15; // Successful return.
|
|
|
|
|
|
|
|
|
returnStatus = 10; // Unsuccessful return.
|
|
|
|
|
|
|
|
|
} else {
|
|
|
} else {
|
|
|
#ifdef DEBUG_MESSAGES
|
|
|
#ifdef DEBUG_MESSAGES
|
|
|
log << "stdin was not closed." << std::endl;
|
|
|
|
|
|
|
|
|
log << "stdin was closed." << std::endl;
|
|
|
#endif
|
|
|
#endif
|
|
|
returnStatus = 10; // Unsuccessful return.
|
|
|
|
|
|
|
|
|
returnStatus = 15; // Successful return.
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
goto exit;
|
|
|
goto exit;
|