1 #include "Headers/_os.h"
5 void signal_handler(int s
)
9 cout
<< "\nSIGINT (Ctrl+C) received. Code " << s
<< ". Exiting.\n";
15 cout
<< "\nSIGHUP received. Code " << s
<< ". Exiting.\n";
20 SignalHandler::SignalHandler()
22 signal_action
.sa_handler
= signal_handler
;
23 sigemptyset(&signal_action
.sa_mask
);
24 signal_action
.sa_flags
= 0;
25 sigaction(SIGINT
, &signal_action
, NULL
);
28 CLIInputs::CLIInputs(int argc
, char **argv
)
32 for(short unsigned int i
= 1; i
< argc
; i
++)
34 string s_argv
= argv
[i
];
35 if (!s_argv
.compare("-h") || !s_argv
.compare("--help"))
37 printf("%-20s\tObtain help.\n", "-h, --help");
38 printf("%-20s\tShows additional execution data.\n", "-v, --verbose");
41 if (!s_argv
.compare("-v") || !s_argv
.compare("--verbose"))
43 printf("Executing in verbose mode.\n");