Skip to content
sls.cc 1.17 KiB
Newer Older
Seblu's avatar
Seblu committed
/*
  This file is part of SLS.
  Copyright (C) 2008 Sebastien LUTTRINGER (<contact@seblu.net> )

  SLS is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  SLS is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with SLS; if not, write to the Free Software
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  US
*/
Seblu's avatar
Seblu committed

#include "sls.hh"
#include "option.hh"
#include "database.hh"
#include "server.hh"
Seblu's avatar
Seblu committed
#include "error.hh"
Seblu's avatar
Seblu committed

int main(int argc, char *argv[])
{
  static Option O;
Seblu's avatar
Seblu committed
  static Database D;
  //   static Server S;
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
  try {
    O.load(argc, argv);
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
    O.loadenv();
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
    D.open(O.database);
Seblu's avatar
Seblu committed

//   S.start();

//   S.listen();

Seblu's avatar
Seblu committed
    D.close();
Seblu's avatar
Seblu committed

Seblu's avatar
Seblu committed
    return ERR_NO;
  }
  catch (const Error &e) {
    e.print();
    return e.code();
  }
Seblu's avatar
Seblu committed
}