42 lines
794 B
C++
42 lines
794 B
C++
#include "userinterface.hh"
|
|
#include "inputdatareader.hh"
|
|
#include "stock.hh"
|
|
#include "positioning.hh"
|
|
|
|
#include <owlps.h>
|
|
|
|
#include <iostream>
|
|
|
|
#include <csignal>
|
|
|
|
using namespace std ;
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
/* Read options & configuration */
|
|
delete new UserInterface(argc, argv) ;
|
|
|
|
/* Read input data */
|
|
delete new InputDataReader() ;
|
|
|
|
/* Set up signal handlers */
|
|
struct sigaction action ;
|
|
action.sa_flags = 0 ;
|
|
sigemptyset(&action.sa_mask) ;
|
|
action.sa_handler = owl_sigint_handler ;
|
|
sigaction(SIGINT, &action, NULL) ;
|
|
action.sa_handler = owl_sigterm_handler ;
|
|
sigaction(SIGTERM, &action, NULL) ;
|
|
|
|
/* Run! */
|
|
owl_run = owl_true ;
|
|
Positioning positioning ;
|
|
|
|
/* Clean */
|
|
Stock::clear() ;
|
|
|
|
cerr << argv[0] << ": end." << endl ;
|
|
return 0 ;
|
|
}
|