Subversion Repositories HomeAutomation

Rev

Rev 1647 | Rev 1652 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1647 Rev 1649
Line 56... Line 56...
56
void CleanUp();
56
void CleanUp();
57
 
57
 
58
char* AutoCompleteGet(const char* text, int state);
58
char* AutoCompleteGet(const char* text, int state);
59
static char** AutoComplete(const char* text, int start, int end);
59
static char** AutoComplete(const char* text, int start, int end);
60
 
60
 
61
std::string GetCwd()
61
std::string GetUserHomeDirectory()
62
{
62
{
63
    return std::string(getpwuid(getuid())->pw_dir);
63
    return std::string(getpwuid(getuid())->pw_dir);
64
}
64
}
65
 
65
 
66
class ConsoleClient : public net::Subscriber
66
class ConsoleClient : public net::Subscriber
Line 189... Line 189...
189
    signal(SIGPIPE, Handler);
189
    signal(SIGPIPE, Handler);
190
   
190
   
191
    boost::mutex guard_mutex;
191
    boost::mutex guard_mutex;
192
   
192
   
193
    // Setup readline
193
    // Setup readline
194
    history_filename = GetCwd() + "/.atomic_history";
194
    history_filename = GetUserHomeDirectory() + "/.atomic_history";
195
    read_history(history_filename.data());
195
    read_history(history_filename.data());
196
   
196
   
197
    rl_attempted_completion_function = AutoComplete;
197
    rl_attempted_completion_function = AutoComplete;
198
   
198
   
199
    // Save command line state
199
    // Save command line state