Ignore:
Timestamp:
08/15/11 17:01:20 (13 years ago)
Author:
ogrimm
Message:
Added voltage and system reset rate limit
File:
1 edited

Legend:

Unmodified
Added
Removed
  • fact/BIASctrl/BIASctrl.cc

    r11205 r11906  
    1414#include <readline/history.h>
    1515
    16 const char READLINE_HIST_FILE[] = "/tmp/.history.BIASctrl";
     16using namespace std;
     17
     18const string READLINE_HIST_FILE = string(getenv("HOME"))+"/.history_BIASctrl";
    1719
    1820// Main program
     
    2426  // Uses getc() for readline library (allows interruption by signal) and load history buffer
    2527  rl_getc_function = getc;
    26   read_history(READLINE_HIST_FILE);
     28  read_history(READLINE_HIST_FILE.c_str());
    2729
    2830  // Set signal SIGTERM to interrupt blocking system calls
     
    3840  // Handle command-line input
    3941  while (!M.ExitRequest) {       
    40     Command = readline("\rBias> ");
     42    Command = readline("Bias> ");
    4143       
    4244        // NULL returned if interrupted by signal
     
    5557 
    5658  // Save history buffer 
    57   int Ret = write_history(READLINE_HIST_FILE);
    58   if (Ret != 0 ) printf("Error writing history file to '%s' (%s)\n", READLINE_HIST_FILE, strerror(Ret));
     59  int Ret = write_history(READLINE_HIST_FILE.c_str());
     60  if (Ret != 0 ) printf("Error writing history file to '%s' (%s)\n", READLINE_HIST_FILE.c_str(), strerror(Ret));
    5961}
Note: See TracChangeset for help on using the changeset viewer.