21 #ifdef YARP_HAS_Libedit
22 # include <editline/readline.h>
23 char* szLine = (
char*)
nullptr;
24 bool readlineEOF =
false;
25 #endif // YARP_HAS_Libedit
29 #ifdef YARP_HAS_Libedit
30 if (yarp::os::impl::isatty(yarp::os::impl::fileno(stdin)) != 0) {
33 #endif // YARP_HAS_Libedit
34 return feof(stdin) != 0;
41 #ifdef YARP_HAS_Libedit
42 if (yarp::os::impl::isatty(yarp::os::impl::fileno(stdin)) != 0) {
43 if (szLine !=
nullptr) {
45 szLine = (
char*)
nullptr;
48 szLine = readline(
">>");
49 if ((szLine !=
nullptr) && (*szLine != 0)) {
52 }
else if (szLine ==
nullptr) {
57 #endif // YARP_HAS_Libedit
62 char* result = fgets(buf,
sizeof(buf), stdin);
63 if (result !=
nullptr) {
64 for (
unsigned int i = 0; i < strlen(buf); i++) {
88 if (
EOFreached() || (!txt.empty() && txt[0] < 32 && txt[0] !=
'\n' && txt[0] !=
'\r')) {