src/optlist.c File Reference

#include "mimotera++/optlist.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Include dependency graph for optlist.c:

Go to the source code of this file.

Functions

option_tMakeOpt (const char option, char *const argument, const int index)
option_tGetOptList (const int argc, char *const argv[], char *const options)
void FreeOptList (option_t *list)


Function Documentation

void FreeOptList ( option_t list  ) 

Function to clean up the memory

Parameters:
list A pointer to the object to be deleted

Definition at line 213 of file optlist.c.

References option_t::next.

option_t* GetOptList ( int  argc,
char *const   argv[],
char *const   options 
)

Function to get the option parser Calling this function will cause the command line options to be parsed and stored into option_t strucutures

Use the options string to define all the possible valid options. A colon immediately after an option defines that that particular option takes one argument.

Returns:
A pointer to a option_t struct
Parameters:
argc The argc as coming from the main()
argv The argc as coming from the main()
options A list of valid options

Definition at line 97 of file optlist.c.

References option_t::argIndex, option_t::argument, MakeOpt(), option_t::next, and OL_NOINDEX.

Here is the call graph for this function:

option_t * MakeOpt ( const char  option,
char *const   argument,
const int  index 
)

Definition at line 182 of file optlist.c.

References option_t::argIndex, option_t::argument, option_t::next, and option_t::option.

Referenced by GetOptList().


Generated on Fri Sep 18 19:15:33 2009 for Mimotera++ by  doxygen 1.5.7.1