#include #include #include #include "options.h" static struct sic_conf args_info; using std::cout; int main(int argc, char **argv) { int result = 0; struct cmd_parser_params *params; /* initialize the parameters structure */ params = cmd_parser_params_create(); /* call the command line parser */ if (cmd_parser(argc, argv, &args_info) != 0) { result = 1; goto stop; } /* override command line options, but do not initialize args_info, check for required options. NOTICE: we must NOT skip the 0 assignment to initialize, since its default value is 1 and override defaults to 0 while check_required is already set to its default value, 1 */ params->initialize = 1; params->override = 0; /* call the config file parser */ if (cmd_parser_config_file (args_info.conffile_arg, &args_info, params) != 0) { result = 1; goto stop; } //debugcode: cout << "value of port: " << args_info.port_arg << std::endl; cout << "value of daemonize: " << static_cast(args_info.daemonize_flag) << std::endl; cout << "value of listen_given: "<< args_info.listen_given << std::endl ; for (unsigned int i = 0; i < args_info.listen_given; i++) cout << "value of listen: " << args_info.listen_arg[i] <