#pragma once #if __has_include() #include #endif /// Different line editing libraries can be used depending on the environment. #if USE_READLINE #include #include #elif USE_LIBEDIT #include #else #include #include #include inline char * readline(const char * prompt) { std::string s; std::cout << prompt; std::getline(std::cin, s); if (!std::cin.good()) return nullptr; return strdup(s.data()); } #define add_history(...) do {} while (0) #define rl_bind_key(...) do {} while (0) #endif