Skip to content
slc.cc 594 B
Newer Older
Seblu's avatar
Seblu committed

#include <getopt.h>

#include "slc.hh"
#include "options.hh"
Seblu's avatar
Seblu committed
#include "screen.hh"
#include "error.hh"
Seblu's avatar
Seblu committed

Screen S;
Seblu's avatar
Seblu committed

/*!
** 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();

    // Create graphic env
    S.init();

    // Try to login
    S.login();

    // Processing
    S.run();
  }
  catch (const Error &e) {
    endwin();
    e.print();
    _exit(e.code());
  }
Seblu's avatar
Seblu committed

  return 0;
}