MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / load_readline_history

Function load_readline_history

tools/cdb2sql/cdb2sql.cpp:1818–1829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1816}
1817
1818void load_readline_history()
1819{
1820 char *home;
1821 if ((home = getenv("HOME")) == NULL)
1822 return;
1823 char histfile[] = "/.cdb2sql_history";
1824 if ((history_file = (char *) malloc(strlen(home) + sizeof(histfile)))
1825 == NULL)
1826 return;
1827 sprintf(history_file, "%s%s", home, histfile);
1828 read_history(history_file);
1829}
1830
1831#define HISTFILE_COMMANDS 200
1832void save_readline_history()

Callers 1

mainFunction · 0.70

Calls 1

mallocFunction · 0.85

Tested by

no test coverage detected