MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / get_next_command

Function get_next_command

samples/memory_leak_test.cpp:12–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10
11
12std::string get_next_command() {
13#ifdef READLINE_AVAILABLE
14 char *input_raw;
15 input_raw = readline("eval> ");
16 add_history(input_raw);
17 return std::string(input_raw);
18#else
19 std::string retval;
20 std::cout << "eval> ";
21 std::getline(std::cin, retval);
22 return retval;
23#endif
24}
25
26void function(void)
27{

Callers 1

mainFunction · 0.70

Calls 3

stringClass · 0.85
readlineFunction · 0.70
add_historyFunction · 0.70

Tested by

no test coverage detected