#include #include "slc.hh" #include "options.hh" #include "screen.hh" #include "history.hh" #include "error.hh" #include "connection.hh" Screen S; Options O; History H; Connection C; /*! ** Program entry point ** ** @param argc arg count ** @param argv arg vector ** ** @return program err code */ int main(int argc, char *argv[]) { try { // get argvline options O.load(argc, argv); // get environment options O.loadenv(); // load cmd history H.load(O.history_file); // Create graphic env S.init(); // Showing login screen. Retrieve user/pass. S.login(); // Showing dialog screen S.dialog(); // start connexion. Launch a thread. C.start(); // Treat keyboards events S.eventsloop(); // Save history H.save(O.history_file); } catch (const Error &e) { endwin(); e.print(); _exit(e.code()); } return 0; }