Changeset - 8582fe3e8daf
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-04-06 21:13:42
ohnobinki@ohnopublishing.net
reindent and clean up options.c
1 file changed with 13 insertions and 23 deletions:
0 comments (0 inline, 0 general)
src/common/options.c
Show inline comments
 
@@ -21,31 +21,21 @@
 

	
 
#include <confuse.h>
 

	
 

	
 
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;
0 comments (0 inline, 0 general)