Command line argument parsing
[ICd internal functions]


Functions

static void icd_args_usage (const char *program_name, int status)
gint icd_args_decode (int argc, char *argv[], struct icd_context *context)

Variables

static struct option const long_options []

Function Documentation

gint icd_args_decode ( int  argc,
char *  argv[],
struct icd_context context 
)

Process commandline options.

Parameters:
argc Parameter given to main()
argv Parameter given to main()
context ICd context
Returns:
Index of first non-option argument

References icd_context::daemon, icd_args_usage(), icd_log_set_level(), and long_options.

Referenced by main().

static void icd_args_usage ( const char *  program_name,
int  status 
) [static]

Print usage information

Parameters:
program_name name of the executable
status exit with status

Referenced by icd_args_decode().


Variable Documentation

struct option const long_options[] [static]

Initial value:

 {
  {"deamon",   no_argument,       0, 'd'},
  {"help",     no_argument,       0, 'h'},
  {"version",  no_argument,       0, 'V'},
  {"loglevel", required_argument, 0, 'l'},
  {NULL, 0, NULL, 0}
}
icd command line options

Referenced by icd_args_decode().


Generated on Thu Mar 11 09:04:50 2010 for ICd2 by  doxygen 1.5.6