config.c File Reference

This file implements config header file. More...

#include <unistd.h>
#include <string.h>
#include "config.h"
#include "blobtracker.h"
#include "guardmodes.h"
#include <getopt.h>

Include dependency graph for config.c:

Go to the source code of this file.

Defines

#define _GNU_SOURCE

Functions

void initDefaultConfig (config_t *config)
 Initializes the given config with default values.
int processCmdLineOpts (int argc, char *argv[], config_t *config)
 Process command line options and store the parsed values in the given config structure.

Variables

char * optarg
 Variables definded by getopt.
int optind
 Variables definded by getopt.
int opterr
 Variables definded by getopt.
int optopt
 Variables definded by getopt.


Detailed Description

This file implements config header file.

It contains functions for initialization of a default config and functions for parsing the command line options.

Version:
Id
config.c,v 1.5 2008/09/18 12:59:01 prokop Exp

Definition in file config.c.


Define Documentation

#define _GNU_SOURCE

Definition at line 35 of file config.c.


Function Documentation

void initDefaultConfig ( config_t config  ) 

Initializes the given config with default values.

Parameters:
config Pointer to a config structure which should be initialized.

Definition at line 44 of file config.c.

int processCmdLineOpts ( int  argc,
char *  argv[],
config_t config 
)

Process command line options and store the parsed values in the given config structure.

This function also does some error checking on options.

Parameters:
argc Number of command line arguments, as for main()
argv Array of command line strings, as for main()
config Pointer to config structure where parsed values will be stored. You probably want to set default values for the config first.
Returns:
1 on successfull parsing or 0 if there were errors.

Definition at line 66 of file config.c.


Variable Documentation

char* optarg

Variables definded by getopt.

int opterr

Variables definded by getopt.

int optind

Variables definded by getopt.

int optopt

Variables definded by getopt.


Generated on Sun Sep 28 21:20:01 2008 for Guard by  doxygen 1.5.6