aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/driver.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2017-06-20 05:26:12 +0200
committerClifford Wolf <clifford@clifford.at>2017-06-20 05:26:12 +0200
commit1f517d2b96eb114f156317fb104ec7fc4d3abccc (patch)
treea115fe48c640240530bee5ac41ec219e65ae46d2 /kernel/driver.cc
parentc0ca99483c1c0966305ced16a9a7e00e4c5ecce0 (diff)
downloadyosys-1f517d2b96eb114f156317fb104ec7fc4d3abccc.tar.gz
yosys-1f517d2b96eb114f156317fb104ec7fc4d3abccc.tar.bz2
yosys-1f517d2b96eb114f156317fb104ec7fc4d3abccc.zip
Fix history namespace collision
Diffstat (limited to 'kernel/driver.cc')
-rw-r--r--kernel/driver.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/driver.cc b/kernel/driver.cc
index 0d331712c..1fe61b499 100644
--- a/kernel/driver.cc
+++ b/kernel/driver.cc
@@ -120,19 +120,19 @@ const char *prompt()
#else /* EMSCRIPTEN */
#ifdef YOSYS_ENABLE_READLINE
-int history_offset = 0;
-std::string history_file;
+int yosys_history_offset = 0;
+std::string yosys_history_file;
#endif
void yosys_atexit()
{
#ifdef YOSYS_ENABLE_READLINE
- if (!history_file.empty()) {
- if (history_offset > 0) {
- history_truncate_file(history_file.c_str(), 100);
- append_history(where_history() - history_offset, history_file.c_str());
+ if (!yosys_history_file.empty()) {
+ if (yosys_history_offset > 0) {
+ history_truncate_file(yosys_history_file.c_str(), 100);
+ append_history(where_history() - yosys_history_offset, yosys_history_file.c_str());
} else
- write_history(history_file.c_str());
+ write_history(yosys_history_file.c_str());
}
clear_history();
@@ -161,9 +161,9 @@ int main(int argc, char **argv)
#ifdef YOSYS_ENABLE_READLINE
if (getenv("HOME") != NULL) {
- history_file = stringf("%s/.yosys_history", getenv("HOME"));
- read_history(history_file.c_str());
- history_offset = where_history();
+ yosys_history_file = stringf("%s/.yosys_history", getenv("HOME"));
+ read_history(yosys_history_file.c_str());
+ yosys_history_offset = where_history();
}
#endif