# HG changeset patch # User Binki # Date 2009-04-06 21:13:42 # Node ID 8582fe3e8dafdcc24e60c273b56e05a3f95672b7 # Parent 7af1394bffb32623607f3ca7546492b373e29b81 reindent and clean up options.c diff --git a/src/common/options.c b/src/common/options.c --- a/src/common/options.c +++ b/src/common/options.c @@ -21,31 +21,21 @@ #include - -int execlisten() +int options_init(int argc, char *argv[], cfg_t **mycfg, struct options_common **allopts); { - /* execlp("ssh", somethingness ) 0); */ - - - return 0; -} - -int parseconf() -{ + + /* Conf File Parser */ + cfg_opt_t opts[] = + { + CFG_STR("username", "guest", CFGF_NONE), + CFG_END() + }; + cfg_t *cfg; + cfg = cfg_init(opts, CFGF_NONE); + if(cfg_parse(cfg, "distren.conf") == CFG_PARSE_ERROR) + return 1; + /* End Conf File Parser */ -/* Conf File Parser */ - cfg_opt_t opts[] = - { - CFG_STR("username", "guest", CFGF_NONE), - CFG_END() - }; - cfg_t *cfg; - cfg = cfg_init(opts, CFGF_NONE); - if(cfg_parse(cfg, "distren.conf") == CFG_PARSE_ERROR) - return 1; -/* End Conf File Parser */ - -// Testing code: printf("Client Username: %s\n", cfg_getstr(cfg, "username")); cfg_free(cfg); return 0;