18 #ifdef YARP_HAS_Libedit
19 # include <editline/readline.h>
20 char* szLine = (
char*)
nullptr;
21 bool readlineEOF =
false;
26 #ifdef YARP_HAS_Libedit
27 if (yarp::os::impl::isatty(yarp::os::impl::fileno(stdin)) != 0) {
31 return feof(stdin) != 0;
38 #ifdef YARP_HAS_Libedit
39 if (yarp::os::impl::isatty(yarp::os::impl::fileno(stdin)) != 0) {
40 if (szLine !=
nullptr) {
42 szLine = (
char*)
nullptr;
45 szLine = readline(
">>");
46 if ((szLine !=
nullptr) && (*szLine != 0)) {
49 }
else if (szLine ==
nullptr) {
59 char* result = fgets(buf,
sizeof(buf), stdin);
60 if (result !=
nullptr) {
61 for (
unsigned int i = 0; i < strlen(buf); i++) {
85 if (
EOFreached() || (!txt.empty() && txt[0] < 32 && txt[0] !=
'\n' && txt[0] !=
'\r')) {
std::string readString(bool *eof)